@vlci/vlcishared 10.0.0 → 11.0.0
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/.eslintrc.json +3 -1
- package/dist/js/vlcishared.js +1 -2
- package/dist/js/vlcishared.js.map +1 -1
- package/package.json +1 -3
- package/webpack.config.dev.js +4 -4
- package/dist/js/camarasTrafico.js +0 -2
- package/dist/js/camarasTrafico.js.map +0 -1
- package/dist/js/tableCalidadAire.js +0 -2
- package/dist/js/tableCalidadAire.js.map +0 -1
- package/dist/js/vlcishared.js.LICENSE.txt +0 -33
- package/dist/js/vlcisharedInitialCalls.js +0 -2
- package/dist/js/vlcisharedInitialCalls.js.map +0 -1
- package/dist/js/vlcisharedKPI.js +0 -2
- package/dist/js/vlcisharedKPI.js.map +0 -1
package/dist/js/vlcishared.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/*! For license information please see vlcishared.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vlcishared=e():t.vlcishared=e()}(self,(()=>(()=>{var t={742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,r=s(t),a=r[0],l=r[1],h=new o(function(t,e,i){return 3*(e+i)/4-i}(0,a,l)),u=0,c=l>0?a-4:a;for(i=0;i<c;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],h[u++]=e>>16&255,h[u++]=e>>8&255,h[u++]=255&e;return 2===l&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,h[u++]=255&e),1===l&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,r=[],a=16383,s=0,h=n-o;s<h;s+=a)r.push(l(t,s,s+a>h?h:s+a));return 1===o?(e=t[n-1],r.push(i[e>>2]+i[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],r.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),r.join("")};for(var i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)i[a]=r[a],n[r.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function l(t,e,n){for(var o,r,a=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(i[(r=o)>>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,i)=>{"use strict";const n=i(742),o=i(645),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=l,e.h2=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,i){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return h(t,e,i)}function h(t,e,i){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const i=0|g(t,e);let n=s(i);const o=n.write(t,e);return o!==i&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,i);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,i);const o=function(t){if(l.isBuffer(t)){const e=0|f(t.length),i=s(e);return 0===i.length||t.copy(i,0,0,e),i}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?s(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return u(t),s(t<0?0:0|f(t))}function d(t){const e=t.length<0?0:0|f(t.length),i=s(e);for(let n=0;n<e;n+=1)i[n]=255&t[n];return i}function p(t,e,i){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(i||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,e):new Uint8Array(t,e,i),Object.setPrototypeOf(n,l.prototype),n}function f(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function g(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const i=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Y(t).length;default:if(o)return n?-1:X(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,i){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,i);case"utf8":case"utf-8":return T(this,e,i);case"ascii":return I(this,e,i);case"latin1":case"binary":return D(this,e,i);case"base64":return M(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function y(t,e,i,n,o){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),K(i=+i)&&(i=o?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(o)return-1;i=t.length-1}else if(i<0){if(!o)return-1;i=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:b(t,e,i,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):b(t,[e],i,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,i,n,o){let r,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,i/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let n=-1;for(r=i;r<s;r++)if(h(t,r)===h(e,-1===n?0:r-n)){if(-1===n&&(n=r),r-n+1===l)return n*a}else-1!==n&&(r-=r-n),n=-1}else for(i+l>s&&(i=s-l),r=i;r>=0;r--){let i=!0;for(let n=0;n<l;n++)if(h(t,r+n)!==h(e,n)){i=!1;break}if(i)return r}return-1}function x(t,e,i,n){i=Number(i)||0;const o=t.length-i;n?(n=Number(n))>o&&(n=o):n=o;const r=e.length;let a;for(n>r/2&&(n=r/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(K(n))return a;t[i+a]=n}return a}function w(t,e,i,n){return Z(X(e,t.length-i),t,i,n)}function _(t,e,i,n){return Z(function(t){const e=[];for(let i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,n)}function C(t,e,i,n){return Z(Y(e),t,i,n)}function S(t,e,i,n){return Z(function(t,e){let i,n,o;const r=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)i=t.charCodeAt(a),n=i>>8,o=i%256,r.push(o),r.push(n);return r}(e,t.length-i),t,i,n)}function M(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function T(t,e,i){i=Math.min(t.length,i);const n=[];let o=e;for(;o<i;){const e=t[o];let r=null,a=e>239?4:e>223?3:e>191?2:1;if(o+a<=i){let i,n,s,l;switch(a){case 1:e<128&&(r=e);break;case 2:i=t[o+1],128==(192&i)&&(l=(31&e)<<6|63&i,l>127&&(r=l));break;case 3:i=t[o+1],n=t[o+2],128==(192&i)&&128==(192&n)&&(l=(15&e)<<12|(63&i)<<6|63&n,l>2047&&(l<55296||l>57343)&&(r=l));break;case 4:i=t[o+1],n=t[o+2],s=t[o+3],128==(192&i)&&128==(192&n)&&128==(192&s)&&(l=(15&e)<<18|(63&i)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(r=l))}}null===r?(r=65533,a=1):r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r),o+=a}return function(t){const e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);let i="",n=0;for(;n<e;)i+=String.fromCharCode.apply(String,t.slice(n,n+=E));return i}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,i){return h(t,e,i)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,i){return function(t,e,i){return u(t),t<=0?s(t):void 0!==e?"string"==typeof i?s(t).fill(e,i):s(t).fill(e):s(t)}(t,e,i)},l.allocUnsafe=function(t){return c(t)},l.allocUnsafeSlow=function(t){return c(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let i=t.length,n=e.length;for(let o=0,r=Math.min(i,n);o<r;++o)if(t[o]!==e[o]){i=t[o],n=e[o];break}return i<n?-1:n<i?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;const n=l.allocUnsafe(e);let o=0;for(i=0;i<t.length;++i){let e=t[i];if(q(e,Uint8Array))o+e.length>n.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)v(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let t="";const i=e.h2;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(t,e,i,n,o){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||i>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=i)return 0;if(n>=o)return-1;if(e>=i)return 1;if(this===t)return 0;let r=(o>>>=0)-(n>>>=0),a=(i>>>=0)-(e>>>=0);const s=Math.min(r,a),h=this.slice(n,o),u=t.slice(e,i);for(let t=0;t<s;++t)if(h[t]!==u[t]){r=h[t],a=u[t];break}return r<a?-1:a<r?1:0},l.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},l.prototype.indexOf=function(t,e,i){return y(this,t,e,i,!0)},l.prototype.lastIndexOf=function(t,e,i){return y(this,t,e,i,!1)},l.prototype.write=function(t,e,i,n){if(void 0===e)n="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)n=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}const o=this.length-e;if((void 0===i||i>o)&&(i=o),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let r=!1;for(;;)switch(n){case"hex":return x(this,t,e,i);case"utf8":case"utf-8":return w(this,t,e,i);case"ascii":case"latin1":case"binary":return _(this,t,e,i);case"base64":return C(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function I(t,e,i){let n="";i=Math.min(t.length,i);for(let o=e;o<i;++o)n+=String.fromCharCode(127&t[o]);return n}function D(t,e,i){let n="";i=Math.min(t.length,i);for(let o=e;o<i;++o)n+=String.fromCharCode(t[o]);return n}function k(t,e,i){const n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);let o="";for(let n=e;n<i;++n)o+=$[t[n]];return o}function A(t,e,i){const n=t.slice(e,i);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function L(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,i,n,o,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<r)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function P(t,e,i,n,o){G(e,n,o,t,i,7);let r=Number(e&BigInt(4294967295));t[i++]=r,r>>=8,t[i++]=r,r>>=8,t[i++]=r,r>>=8,t[i++]=r;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[i++]=a,a>>=8,t[i++]=a,a>>=8,t[i++]=a,a>>=8,t[i++]=a,i}function O(t,e,i,n,o){G(e,n,o,t,i,7);let r=Number(e&BigInt(4294967295));t[i+7]=r,r>>=8,t[i+6]=r,r>>=8,t[i+5]=r,r>>=8,t[i+4]=r;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[i+3]=a,a>>=8,t[i+2]=a,a>>=8,t[i+1]=a,a>>=8,t[i]=a,i+8}function z(t,e,i,n,o,r){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function N(t,e,i,n,r){return e=+e,i>>>=0,r||z(t,0,i,4),o.write(t,e,i,n,23,4),i+4}function B(t,e,i,n,r){return e=+e,i>>>=0,r||z(t,0,i,8),o.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){const i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,i){t>>>=0,e>>>=0,i||L(t,e,this.length);let n=this[t],o=1,r=0;for(;++r<e&&(o*=256);)n+=this[t+r]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,i){t>>>=0,e>>>=0,i||L(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||U(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),l.prototype.readBigUInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||U(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+i;return(BigInt(n)<<BigInt(32))+BigInt(o)})),l.prototype.readIntLE=function(t,e,i){t>>>=0,e>>>=0,i||L(t,e,this.length);let n=this[t],o=1,r=0;for(;++r<e&&(o*=256);)n+=this[t+r]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||L(t,e,this.length);let n=e,o=1,r=this[t+--n];for(;n>0&&(o*=256);)r+=this[t+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);const i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);const i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||U(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||U(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+i)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,i,n){t=+t,e>>>=0,i>>>=0,n||R(this,t,e,i,Math.pow(2,8*i)-1,0);let o=1,r=0;for(this[e]=255&t;++r<i&&(o*=256);)this[e+r]=t/o&255;return e+i},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,i,n){t=+t,e>>>=0,i>>>=0,n||R(this,t,e,i,Math.pow(2,8*i)-1,0);let o=i-1,r=1;for(this[e+o]=255&t;--o>=0&&(r*=256);)this[e+o]=t/r&255;return e+i},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(t,e=0){return O(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*i-1);R(this,t,e,i,n-1,-n)}let o=0,r=1,a=0;for(this[e]=255&t;++o<i&&(r*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/r>>0)-a&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*i-1);R(this,t,e,i,n-1,-n)}let o=i-1,r=1,a=0;for(this[e+o]=255&t;--o>=0&&(r*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/r>>0)-a&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(t,e=0){return O(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,i){return N(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return N(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return B(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return B(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);const o=n-i;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,i,n):Uint8Array.prototype.set.call(t,this.subarray(i,n),e),o},l.prototype.fill=function(t,e,i,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;let o;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o<i;++o)this[o]=t;else{const r=l.isBuffer(t)?t:l.from(t,n),a=r.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<i-e;++o)this[o+e]=r[o%a]}return this};const F={};function V(t,e,i){F[t]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function H(t){let e="",i=t.length;const n="-"===t[0]?1:0;for(;i>=n+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function G(t,e,i,n,o,r){if(t>i||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=r>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(r+1)}${n}`:`>= -(2${n} ** ${8*(r+1)-1}${n}) and < 2 ** ${8*(r+1)-1}${n}`:`>= ${e}${n} and <= ${i}${n}`,new F.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,i){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+i]||U(e,t.length-(i+1))}(n,o,r)}function W(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function U(t,e,i){if(Math.floor(t)!==t)throw W(t,i),new F.ERR_OUT_OF_RANGE(i||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${e}`,t)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(t,e,i){let n=`The value of "${t}" is out of range.`,o=i;return Number.isInteger(i)&&Math.abs(i)>2**32?o=H(String(i)):"bigint"==typeof i&&(o=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(o=H(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function X(t,e){let i;e=e||1/0;const n=t.length;let o=null;const r=[];for(let a=0;a<n;++a){if(i=t.charCodeAt(a),i>55295&&i<57344){if(!o){if(i>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=i;continue}if(i<56320){(e-=3)>-1&&r.push(239,191,189),o=i;continue}i=65536+(o-55296<<10|i-56320)}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,i<128){if((e-=1)<0)break;r.push(i)}else if(i<2048){if((e-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function Y(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,i,n){let o;for(o=0;o<n&&!(o+i>=e.length||o>=t.length);++o)e[o+i]=t[o];return o}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const $=function(){const t="0123456789abcdef",e=new Array(256);for(let i=0;i<16;++i){const n=16*i;for(let o=0;o<16;++o)e[n+o]=t[i]+t[o]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},645:(t,e)=>{e.read=function(t,e,i,n,o){var r,a,s=8*o-n-1,l=(1<<s)-1,h=l>>1,u=-7,c=i?o-1:0,d=i?-1:1,p=t[e+c];for(c+=d,r=p&(1<<-u)-1,p>>=-u,u+=s;u>0;r=256*r+t[e+c],c+=d,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=n;u>0;a=256*a+t[e+c],c+=d,u-=8);if(0===r)r=1-h;else{if(r===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),r-=h}return(p?-1:1)*a*Math.pow(2,r-n)},e.write=function(t,e,i,n,o,r){var a,s,l,h=8*r-o-1,u=(1<<h)-1,c=u>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:r-1,f=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(e*l-1)*Math.pow(2,o),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;t[i+p]=255&s,p+=f,s/=256,o-=8);for(a=a<<o|s,h+=o;h>0;t[i+p]=255&a,p+=f,a/=256,h-=8);t[i+p-f]|=128*g}}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";i.r(n),i.d(n,{addPointInteger:()=>d,calculateMaxYAxis:()=>ij,calculatePentahoPath:()=>r,calculateXAxisStart:()=>ej,configureDataGaugeCommon:()=>rj,configureDataGaugeMonthCommon:()=>aj,configureDataLine:()=>sj,formatMonthAnyo:()=>u,formatName:()=>nj,formatNameHeaderColumn:()=>QX,formatToMillions:()=>f,formatTooltip:()=>QU,formatTooltipPie:()=>tj,formatTrimestre:()=>c,getMaxValue:()=>p,getMonth:()=>h,getSelectCommonOptions:()=>rY,initChart:()=>KU,initTable:()=>JX,initialCalls:()=>o,insertDateHTML:()=>sY,insertTextKPI:()=>aY,printDataChart:()=>JU,printDataInHTMLElements:()=>s,printNoDataChart:()=>$U,processDataPie:()=>lj,processDataStackedBar:()=>oj,resetFilter:()=>oY,resultsetWithFields:()=>a,selectConfigDatasource:()=>nY,selectFilterAll:()=>eY,splitDataset:()=>tY});var t={};function e(t){document.querySelectorAll(`[${t}]`).forEach((e=>{!function(t,e){const i=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(i.innerHTML=this.responseText),404===this.status&&(i.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(e.getAttribute(t),e)}))}function o(){e("include-html-cabecera"),e("include-html-menu"),e("include-html-main-container"),e("include-html-copyright")}function r(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function a(t){const{resultset:e,metadata:i}=t,n=[];return e.forEach((t=>{const e={};t.forEach(((t,n)=>{e[i[n].colName]=t})),n.push(e)})),n}function s(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((i=>{const n=i[0],o=i[1];"object"==typeof o?o.className?document.querySelector(o.className).className=t[n]:o.element&&o.format&&(document.querySelector(o.element).textContent=e[t.id][n].format(t[n])):document.querySelector(o).textContent=t[n]}))}))}i.r(t),i.d(t,{Arc:()=>mg,BezierCurve:()=>pg,BoundingRect:()=>Ge,Circle:()=>kf,CompoundPath:()=>yg,Ellipse:()=>Rf,Group:()=>qo,Image:()=>Hs,IncrementalDisplayable:()=>kg,Line:()=>lg,LinearGradient:()=>xg,OrientedBoundingRect:()=>Eg,Path:()=>Ps,Point:()=>Le,Polygon:()=>eg,Polyline:()=>og,RadialGradient:()=>wg,Rect:()=>qs,Ring:()=>$f,Sector:()=>Zf,Text:()=>cl,applyTransform:()=>Zg,clipPointsByRect:()=>Jg,clipRectByRect:()=>Qg,createIcon:()=>tm,extendPath:()=>zg,extendShape:()=>Pg,getShapeClass:()=>Bg,getTransform:()=>Yg,groupTransition:()=>$g,initProps:()=>xh,isElementRemoved:()=>wh,lineLineIntersect:()=>im,linePolygonIntersect:()=>em,makeImage:()=>Vg,makePath:()=>Fg,mergePath:()=>Gg,registerShape:()=>Ng,removeElement:()=>_h,removeElementWithFadeOut:()=>Sh,resizePath:()=>Wg,setTooltipConfig:()=>om,subPixelOptimize:()=>Xg,subPixelOptimizeLine:()=>Ug,subPixelOptimizeRect:()=>jg,transformDirection:()=>qg,traverseElements:()=>am,updateProps:()=>bh});const l={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function h(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function u(t){const e=t.substring(0,4);return`${l[t.substring(4,6)]} ${e}`}function c(t){const[e,i]=t.split("-");return`${parseFloat(i)/3}T ${e}`}function d(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const i={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",i):t.toLocaleString(e,i)}function p(t,e,i=1){const n=Math.max(...t.map((t=>t[e])))*i;return 5e3*Math.ceil(n/5e3)}function f(t){const e=1e6;return t>=e?t/e+"M":t.toString()}var g=function(t,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},g(t,e)};function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}Object.create,Object.create;var v=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},y=new function(){this.browser=new v,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(y.wxa=!0,y.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?y.worker=!0:"undefined"==typeof navigator?(y.node=!0,y.svgSupported=!0):function(t,e){var i=e.browser,n=t.match(/Firefox\/([\d.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]),o&&(i.ie=!0,i.version=o[1]),r&&(i.edge=!0,i.version=r[1],i.newEdge=+r[1].split(".")[0]>18),a&&(i.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,e.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(i.ie&&"transition"in s||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||i.ie&&+i.version>=9}(navigator.userAgent,y);const b=y;var x,w,_=12,C="sans-serif",S=_+"px "+C,M=function(t){var e={};if("undefined"==typeof JSON)return e;for(var i=0;i<95;i++){var n=String.fromCharCode(i+32),o=(t.charCodeAt(i)-20)/100;e[n]=o}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),T={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!x){var i=T.createCanvas();x=i&&i.getContext("2d")}if(x)return w!==e&&(w=x.font=e||S),x.measureText(t);t=t||"";var n=/(\d+)px/.exec(e=e||S),o=n&&+n[1]||_,r=0;if(e.indexOf("mono")>=0)r=o*t.length;else for(var a=0;a<t.length;a++){var s=M[t[a]];r+=null==s?o:s*o}return{width:r}},loadImage:function(t,e,i){var n=new Image;return n.onload=e,n.onerror=i,n.src=t,n}},E=$(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),I=$(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),D=Object.prototype.toString,k=Array.prototype,A=k.forEach,L=k.filter,R=k.slice,P=k.map,O=function(){}.constructor,z=O?O.prototype:null,N="__proto__",B=2311;function F(){return B++}function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function H(t){if(null==t||"object"!=typeof t)return t;var e=t,i=D.call(t);if("[object Array]"===i){if(!_t(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=H(t[n])}}else if(I[i]){if(!_t(t)){var r=t.constructor;if(r.from)e=r.from(t);else for(e=new r(t.length),n=0,o=t.length;n<o;n++)e[n]=t[n]}}else if(!E[i]&&!_t(t)&&!ut(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==N&&(e[a]=H(t[a]));return e}function G(t,e,i){if(!st(e)||!st(t))return i?H(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==N){var o=t[n],r=e[n];!st(r)||!st(o)||it(r)||it(o)||ut(r)||ut(o)||lt(r)||lt(o)||_t(r)||_t(o)?!i&&n in t||(t[n]=H(e[n])):G(o,r,i)}return t}function W(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=G(i,t[n],e);return i}function U(t,e){if(Object.assign)Object.assign(t,e);else for(var i in e)e.hasOwnProperty(i)&&i!==N&&(t[i]=e[i]);return t}function j(t,e,i){for(var n=Q(e),o=0;o<n.length;o++){var r=n[o];(i?null!=e[r]:null==t[r])&&(t[r]=e[r])}return t}function X(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function Y(t,e,i){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),o=0;o<n.length;o++){var r=n[o];"constructor"!==r&&(i?null!=e[r]:null==t[r])&&(t[r]=e[r])}else j(t,e,i)}function Z(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function q(t,e,i){if(t&&e)if(t.forEach&&t.forEach===A)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(i,t[r],r,t)}function K(t,e,i){if(!t)return[];if(!e)return mt(t);if(t.map&&t.map===P)return t.map(e,i);for(var n=[],o=0,r=t.length;o<r;o++)n.push(e.call(i,t[o],o,t));return n}function $(t,e,i,n){if(t&&e){for(var o=0,r=t.length;o<r;o++)i=e.call(n,i,t[o],o,t);return i}}function J(t,e,i){if(!t)return[];if(!e)return mt(t);if(t.filter&&t.filter===L)return t.filter(e,i);for(var n=[],o=0,r=t.length;o<r;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}function Q(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}T.createCanvas;var tt=z&&nt(z.bind)?z.call.bind(z.bind):function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return function(){return t.apply(e,i.concat(R.call(arguments)))}};function et(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return function(){return t.apply(this,e.concat(R.call(arguments)))}}function it(t){return Array.isArray?Array.isArray(t):"[object Array]"===D.call(t)}function nt(t){return"function"==typeof t}function ot(t){return"string"==typeof t}function rt(t){return"[object String]"===D.call(t)}function at(t){return"number"==typeof t}function st(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function lt(t){return!!E[D.call(t)]}function ht(t){return!!I[D.call(t)]}function ut(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function ct(t){return null!=t.colorStops}function dt(t){return t!=t}function pt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,n=t.length;i<n;i++)if(null!=t[i])return t[i]}function ft(t,e){return null!=t?t:e}function gt(t,e,i){return null!=t?t:null!=e?e:i}function mt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return R.apply(t,e)}function vt(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function yt(t,e){if(!t)throw new Error(e)}function bt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var xt="__ec_primitive__";function wt(t){t[xt]=!0}function _t(t){return t[xt]}var Ct=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return Q(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},t}(),St="function"==typeof Map,Mt=function(){function t(e){var i=it(e);this.data=St?new Map:new Ct;var n=this;function o(t,e){i?n.set(t,e):n.set(e,t)}e instanceof t?e.each(o):e&&q(e,o)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach((function(i,n){t.call(e,i,n)}))},t.prototype.keys=function(){var t=this.data.keys();return St?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function Tt(t){return new Mt(t)}function Et(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function It(t,e){var i;if(Object.create)i=Object.create(t);else{var n=function(){};n.prototype=t,i=new n}return e&&U(i,e),i}function Dt(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function kt(t,e){return t.hasOwnProperty(e)}function At(){}var Lt=180/Math.PI;function Rt(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function Pt(t,e){return t[0]=e[0],t[1]=e[1],t}function Ot(t){return[t[0],t[1]]}function zt(t,e,i){return t[0]=e,t[1]=i,t}function Nt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Bt(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function Ft(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function Vt(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}function Ht(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function Gt(t,e){var i=Vt(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function Wt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Ut=Wt,jt=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function Xt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function Yt(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function Zt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function qt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var Kt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},$t=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Kt(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,r=n-this._y;this._x=i,this._y=n,e.drift(o,r,t),this.handler.dispatchToElement(new Kt(e,t),"drag",t.event);var a=this.handler.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Kt(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new Kt(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Kt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Kt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();const Jt=$t;var Qt=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;var r=this._$eventProcessor;null!=e&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===i)return this;var s={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},l=o[t].length-1,h=o[t][l];return h&&h.callAtLast?o[t].splice(l,0,s):o[t].push(s),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,r=i[t].length;o<r;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},t.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],o=this._$eventProcessor;if(n)for(var r=e.length,a=n.length,s=0;s<a;s++){var l=n[s];if(!o||!o.filter||null==l.query||o.filter(t,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return o&&o.afterTrigger&&o.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],o=this._$eventProcessor;if(n)for(var r=e.length,a=e[r-1],s=n.length,l=0;l<s;l++){var h=n[l];if(!o||!o.filter||null==h.query||o.filter(t,h.query))switch(r){case 0:h.h.call(a);break;case 1:h.h.call(a,e[0]);break;case 2:h.h.call(a,e[0],e[1]);break;default:h.h.apply(a,e.slice(1,r-1))}}return o&&o.afterTrigger&&o.afterTrigger(t),this},t}();const te=Qt;var ee=Math.log(2);function ie(t,e,i,n,o,r){var a=n+"-"+o,s=t.length;if(r.hasOwnProperty(a))return r[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/ee);return t[i][l]}for(var h=n|1<<i,u=i+1;n&1<<u;)u++;for(var c=0,d=0,p=0;d<s;d++){var f=1<<d;f&o||(c+=(p%2?-1:1)*t[i][d]*ie(t,e-1,u,h,o|f,r),p++)}return r[a]=c,c}function ne(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},o=ie(i,8,0,0,0,n);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*ie(i,7,0===a?1:0,1<<a,1<<s,n)/o*e[a];return function(t,e,i){var n=e*r[6]+i*r[7]+1;t[0]=(e*r[0]+i*r[1]+r[2])/n,t[1]=(e*r[3]+i*r[4]+r[5])/n}}}var oe="___zrEVENTSAVED",re=[];function ae(t,e,i,n,o){if(e.getBoundingClientRect&&b.domSupported&&!se(e)){var r=e[oe]||(e[oe]={}),a=function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=r%2,l=(r>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[s]+":0",o[l]+":0",n[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}(e,r),s=function(t,e,i){for(var n=i?"invTrans":"trans",o=e[n],r=e.srcCoords,a=[],s=[],l=!0,h=0;h<4;h++){var u=t[h].getBoundingClientRect(),c=2*h,d=u.left,p=u.top;a.push(d,p),l=l&&r&&d===r[c]&&p===r[c+1],s.push(t[h].offsetLeft,t[h].offsetTop)}return l&&o?o:(e.srcCoords=a,e[n]=i?ne(s,a):ne(a,s))}(a,r,o);if(s)return s(t,i,n),!0}return!1}function se(t){return"CANVAS"===t.nodeName.toUpperCase()}var le=/([&<>"'])/g,he={"&":"&","<":"<",">":">",'"':""","'":"'"};function ue(t){return null==t?"":(t+"").replace(le,(function(t,e){return he[e]}))}var ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,de=[],pe=b.browser.firefox&&+b.browser.version.split(".")[0]<39;function fe(t,e,i,n){return i=i||{},n?ge(t,e,i):pe&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):ge(t,e,i),i}function ge(t,e,i){if(b.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(se(t)){var r=t.getBoundingClientRect();return i.zrX=n-r.left,void(i.zrY=o-r.top)}if(ae(de,t,n,o))return i.zrX=de[0],void(i.zrY=de[1])}i.zrX=i.zrY=0}function me(t){return t||window.event}function ve(t,e,i){if(null!=(e=me(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&fe(t,o,e,i)}else{fe(t,e,e,i);var r=function(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,n=t.deltaY;return null==i||null==n?e:3*(0!==n?Math.abs(n):Math.abs(i))*(n>0?-1:n<0?1:i>0?-1:1)}(e);e.zrDelta=r?r/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&ce.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ye(t,e,i,n){t.addEventListener(e,i,n)}var be=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function xe(t){return 2===t.which||3===t.which}var we=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},r=0,a=n.length;r<a;r++){var s=n[r],l=fe(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},t.prototype._recognize=function(t){for(var e in Ce)if(Ce.hasOwnProperty(e)){var i=Ce[e](this._track,t);if(i)return i}},t}();function _e(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}var Ce={pinch:function(t,e){var i=t.length;if(i){var n,o=(t[i-1]||{}).points,r=(t[i-2]||{}).points||o;if(r&&r.length>1&&o&&o.length>1){var a=_e(o)/_e(r);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((n=o)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function Se(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Me(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Te(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],r=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=l,t}function Ee(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Ie(t,e,i){var n=e[0],o=e[2],r=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=o*u+s*h,t[3]=-o*h+u*s,t[4]=u*r+h*l,t[5]=u*l-h*r,t}function De(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function ke(t,e){var i=e[0],n=e[2],o=e[4],r=e[1],a=e[3],s=e[5],l=i*a-r*n;return l?(l=1/l,t[0]=a*l,t[1]=-r*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*o)*l,t[5]=(r*o-i*s)*l,t):null}var Ae=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,i){t.x=e,t.y=i},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},t.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},t.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},t.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},t.lerp=function(t,e,i,n){var o=1-n;t.x=o*e.x+n*i.x,t.y=o*e.y+n*i.y},t}();const Le=Ae;var Re=Math.min,Pe=Math.max,Oe=new Le,ze=new Le,Ne=new Le,Be=new Le,Fe=new Le,Ve=new Le,He=function(){function t(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return t.prototype.union=function(t){var e=Re(t.x,this.x),i=Re(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Pe(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Pe(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,o=[1,0,0,1,0,0];return Ee(o,o,[-e.x,-e.y]),De(o,o,[i,n]),Ee(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,i){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,o=n.x,r=n.x+n.width,a=n.y,s=n.y+n.height,l=e.x,h=e.x+e.width,u=e.y,c=e.y+e.height,d=!(r<l||h<o||s<u||c<a);if(i){var p=1/0,f=0,g=Math.abs(r-l),m=Math.abs(h-o),v=Math.abs(s-u),y=Math.abs(c-a),b=Math.min(g,m),x=Math.min(v,y);r<l||h<o?b>f&&(f=b,g<m?Le.set(Ve,-g,0):Le.set(Ve,m,0)):b<p&&(p=b,g<m?Le.set(Fe,g,0):Le.set(Fe,-m,0)),s<u||c<a?x>f&&(f=x,v<y?Le.set(Ve,0,-v):Le.set(Ve,0,y)):b<p&&(p=b,v<y?Le.set(Fe,0,v):Le.set(Fe,0,-y))}return i&&Le.copy(i,d?Fe:Ve),d},t.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,i,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var o=n[0],r=n[3],a=n[4],s=n[5];return e.x=i.x*o+a,e.y=i.y*r+s,e.width=i.width*o,e.height=i.height*r,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Oe.x=Ne.x=i.x,Oe.y=Be.y=i.y,ze.x=Be.x=i.x+i.width,ze.y=Ne.y=i.y+i.height,Oe.transform(n),Be.transform(n),ze.transform(n),Ne.transform(n),e.x=Re(Oe.x,ze.x,Ne.x,Be.x),e.y=Re(Oe.y,ze.y,Ne.y,Be.y);var l=Pe(Oe.x,ze.x,Ne.x,Be.x),h=Pe(Oe.y,ze.y,Ne.y,Be.y);e.width=l-e.x,e.height=h-e.y}else e!==i&&t.copy(e,i)},t}();const Ge=He;var We="silent";function Ue(){be(this.event)}var je=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return m(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(te),Xe=function(t,e){this.x=t,this.y=e},Ye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ze=new Ge(0,0,0,0),qe=function(t){function e(e,i,n,o,r){var a=t.call(this)||this;return a._hovered=new Xe(0,0),a.storage=e,a.painter=i,a.painterRoot=o,a._pointerSize=r,n=n||new je,a.proxy=null,a.setHandlerProxy(n),a._draggingMgr=new Jt(a),a}return m(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(q(Ye,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,i=t.zrY,n=Je(this,e,i),o=this._hovered,r=o.target;r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=n?new Xe(e,i):this.findHover(e,i),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==r&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Xe(0,0)},e.prototype.dispatch=function(t,e){var i=this[t];i&&i.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,r=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ue}}(e,t,i);n&&(n[o]&&(r.cancelBubble=!!n[o].call(n,r)),n.trigger(e,r),n=n.__hostTarget?n.__hostTarget:n.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)})))}},e.prototype.findHover=function(t,e,i){var n=this.storage.getDisplayList(),o=new Xe(t,e);if($e(n,o,t,e,i),this._pointerSize&&!o.target){for(var r=[],a=this._pointerSize,s=a/2,l=new Ge(t-s,e-s,a,a),h=n.length-1;h>=0;h--){var u=n[h];u===i||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(Ze.copy(u.getBoundingRect()),u.transform&&Ze.applyTransform(u.transform),Ze.intersect(l)&&r.push(u))}if(r.length)for(var c=Math.PI/12,d=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<d;f+=c)if($e(r,o,t+p*Math.cos(f),e+p*Math.sin(f),i),o.target)return o}return o},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new we);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o;var r=new Xe;r.target=n.target,this.dispatchToElement(r,o,n.event)}},e}(te);function Ke(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n=t,o=void 0,r=!1;n;){if(n.ignoreClip&&(r=!0),!r){var a=n.getClipPath();if(a&&!a.contain(e,i))return!1;n.silent&&(o=!0)}n=n.__hostTarget||n.parent}return!o||We}return!1}function $e(t,e,i,n,o){for(var r=t.length-1;r>=0;r--){var a=t[r],s=void 0;if(a!==o&&!a.ignore&&(s=Ke(a,i,n))&&(!e.topTarget&&(e.topTarget=a),s!==We)){e.target=a;break}}}function Je(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}q(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){qe.prototype[t]=function(e){var i,n,o=e.zrX,r=e.zrY,a=Je(this,o,r);if("mouseup"===t&&a||(n=(i=this.findHover(o,r)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Ut(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}));const Qe=qe;var ti=7;function ei(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&n(t[o],t[o-1])>=0;)o++;return o-e}function ii(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var r,a=t[n],s=e,l=n;s<l;)o(a,t[r=s+l>>>1])<0?l=r:s=r+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function ni(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])>0){for(s=n-o;l<s&&r(t,e[i+o+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&r(t,e[i+o-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}for(a++;a<l;){var u=a+(l-a>>>1);r(t,e[i+u])>0?a=u+1:l=u}return l}function oi(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])<0){for(s=o+1;l<s&&r(t,e[i+o-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}else{for(s=n-o;l<s&&r(t,e[i+o+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var u=a+(l-a>>>1);r(t,e[i+u])<0?l=u:a=u+1}return l}function ri(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(o<2)){var r=0;if(o<32)ii(t,i,n,i+(r=ei(t,i,n,e)),e);else{var a=function(t,e){var i,n,o=ti,r=0;t.length;var a=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===r-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),r--;var d=oi(t[u],t,l,h,0,e);l+=d,0!=(h-=d)&&0!==(c=ni(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,r,s){var l=0;for(l=0;l<n;l++)a[l]=t[i+l];var h=0,u=r,c=i;if(t[c++]=t[u++],0!=--s)if(1!==n){for(var d,p,f,g=o;;){d=0,p=0,f=!1;do{if(e(t[u],a[h])<0){if(t[c++]=t[u++],p++,d=0,0==--s){f=!0;break}}else if(t[c++]=a[h++],d++,p=0,1==--n){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=oi(t[u],a,h,n,0,e))){for(l=0;l<d;l++)t[c+l]=a[h+l];if(c+=d,h+=d,(n-=d)<=1){f=!0;break}}if(t[c++]=t[u++],0==--s){f=!0;break}if(0!==(p=ni(a[h],t,u,s,0,e))){for(l=0;l<p;l++)t[c+l]=t[u+l];if(c+=p,u+=p,0==(s-=p)){f=!0;break}}if(t[c++]=a[h++],1==--n){f=!0;break}g--}while(d>=ti||p>=ti);if(f)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];t[c+s]=a[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=a[h+l]}}else{for(l=0;l<s;l++)t[c+l]=t[u+l];t[c+s]=a[h]}else for(l=0;l<n;l++)t[c+l]=a[h+l]}(l,h,u,c):function(i,n,r,s){var l=0;for(l=0;l<s;l++)a[l]=t[r+l];var h=i+n-1,u=s-1,c=r+s-1,d=0,p=0;if(t[c--]=t[h--],0!=--n)if(1!==s){for(var f=o;;){var g=0,m=0,v=!1;do{if(e(a[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=a[u--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!=(g=n-oi(a[u],t,i,n,n-1,e))){for(n-=g,p=1+(c-=g),d=1+(h-=g),l=g-1;l>=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=a[u--],1==--s){v=!0;break}if(0!=(m=s-ni(t[h],a,0,s,s-1,e))){for(s-=m,p=1+(c-=m),d=1+(u-=m),l=0;l<m;l++)t[p+l]=a[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[h--],0==--n){v=!0;break}f--}while(g>=ti||m>=ti);if(v)break;f<0&&(f=0),f+=2}if((o=f)<1&&(o=1),1===s){for(p=1+(c-=n),d=1+(h-=n),l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=a[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=a[l]}}else{for(p=1+(c-=n),d=1+(h-=n),l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=a[u]}else for(d=c-(s-1),l=0;l<s;l++)t[d+l]=a[l]}(l,h,u,c))}return i=[],n=[],{mergeRuns:function(){for(;r>1;){var t=r-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},forceMergeRuns:function(){for(;r>1;){var t=r-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},pushRun:function(t,e){i[r]=t,n[r]=e,r+=1}}}(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(o);do{if((r=ei(t,i,n,e))<s){var l=o;l>s&&(l=s),ii(t,i,i+l,i+r,e),r=l}a.pushRun(i,r),a.mergeRuns(),o-=r,i+=r}while(0!==o);a.forceMergeRuns()}}}var ai=1,si=4,li=!1;function hi(){li||(li=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ui(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var ci=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ui}return t.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(e),i},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,ri(i,ui)},t.prototype._updateAndAddDisplayable=function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e=e?e.slice():[];for(var o=n,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),r=o,o=o.getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=ai),this._updateAndAddDisplayable(l,e,i)}t.__dirty=0}else{var h=t;e&&e.length?h.__clipPaths=e:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(hi(),h.z=0),isNaN(h.z2)&&(hi(),h.z2=0),isNaN(h.zlevel)&&(hi(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var u=t.getDecalElement&&t.getDecalElement();u&&this._updateAndAddDisplayable(u,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var n=X(this._roots,t);n>=0&&this._roots.splice(n,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const di=ci,pi=b.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var fi={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-fi.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*fi.bounceIn(2*t):.5*fi.bounceOut(2*t-1)+.5}};const gi=fi;var mi=Math.pow,vi=Math.sqrt,yi=1e-8,bi=1e-4,xi=vi(3),wi=1/3,_i=Rt(),Ci=Rt(),Si=Rt();function Mi(t){return t>-yi&&t<yi}function Ti(t){return t>yi||t<-yi}function Ei(t,e,i,n,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*n+3*r*i)}function Ii(t,e,i,n,o){var r=1-o;return 3*(((e-t)*r+2*(i-e)*o)*r+(n-i)*o*o)}function Di(t,e,i,n,o,r){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-o,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,p=0;if(Mi(u)&&Mi(c))Mi(s)?r[0]=0:(S=-l/s)>=0&&S<=1&&(r[p++]=S);else{var f=c*c-4*u*d;if(Mi(f)){var g=c/u,m=-g/2;(S=-s/a+g)>=0&&S<=1&&(r[p++]=S),m>=0&&m<=1&&(r[p++]=m)}else if(f>0){var v=vi(f),y=u*s+1.5*a*(-c+v),b=u*s+1.5*a*(-c-v);(S=(-s-((y=y<0?-mi(-y,wi):mi(y,wi))+(b=b<0?-mi(-b,wi):mi(b,wi))))/(3*a))>=0&&S<=1&&(r[p++]=S)}else{var x=(2*u*s-3*a*c)/(2*vi(u*u*u)),w=Math.acos(x)/3,_=vi(u),C=Math.cos(w),S=(-s-2*_*C)/(3*a),M=(m=(-s+_*(C+xi*Math.sin(w)))/(3*a),(-s+_*(C-xi*Math.sin(w)))/(3*a));S>=0&&S<=1&&(r[p++]=S),m>=0&&m<=1&&(r[p++]=m),M>=0&&M<=1&&(r[p++]=M)}}return p}function ki(t,e,i,n,o){var r=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Mi(a))Ti(r)&&(u=-s/r)>=0&&u<=1&&(o[l++]=u);else{var h=r*r-4*a*s;if(Mi(h))o[0]=-r/(2*a);else if(h>0){var u,c=vi(h),d=(-r-c)/(2*a);(u=(-r+c)/(2*a))>=0&&u<=1&&(o[l++]=u),d>=0&&d<=1&&(o[l++]=d)}}return l}function Ai(t,e,i,n,o,r){var a=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-a)*o+a,u=(l-s)*o+s,c=(u-h)*o+h;r[0]=t,r[1]=a,r[2]=h,r[3]=c,r[4]=c,r[5]=u,r[6]=l,r[7]=n}function Li(t,e,i,n,o,r,a,s,l,h,u){var c,d,p,f,g,m=.005,v=1/0;_i[0]=l,_i[1]=h;for(var y=0;y<1;y+=.05)Ci[0]=Ei(t,i,o,a,y),Ci[1]=Ei(e,n,r,s,y),(f=jt(_i,Ci))<v&&(c=y,v=f);v=1/0;for(var b=0;b<32&&!(m<bi);b++)d=c-m,p=c+m,Ci[0]=Ei(t,i,o,a,d),Ci[1]=Ei(e,n,r,s,d),f=jt(Ci,_i),d>=0&&f<v?(c=d,v=f):(Si[0]=Ei(t,i,o,a,p),Si[1]=Ei(e,n,r,s,p),g=jt(Si,_i),p<=1&&g<v?(c=p,v=g):m*=.5);return u&&(u[0]=Ei(t,i,o,a,c),u[1]=Ei(e,n,r,s,c)),vi(v)}function Ri(t,e,i,n,o,r,a,s,l){for(var h=t,u=e,c=0,d=1/l,p=1;p<=l;p++){var f=p*d,g=Ei(t,i,o,a,f),m=Ei(e,n,r,s,f),v=g-h,y=m-u;c+=Math.sqrt(v*v+y*y),h=g,u=m}return c}function Pi(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function Oi(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function zi(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function Ni(t,e,i,n,o){var r=(e-t)*n+t,a=(i-e)*n+e,s=(a-r)*n+r;o[0]=t,o[1]=r,o[2]=s,o[3]=s,o[4]=a,o[5]=i}function Bi(t,e,i,n,o,r,a,s,l){var h,u=.005,c=1/0;_i[0]=a,_i[1]=s;for(var d=0;d<1;d+=.05)Ci[0]=Pi(t,i,o,d),Ci[1]=Pi(e,n,r,d),(m=jt(_i,Ci))<c&&(h=d,c=m);c=1/0;for(var p=0;p<32&&!(u<bi);p++){var f=h-u,g=h+u;Ci[0]=Pi(t,i,o,f),Ci[1]=Pi(e,n,r,f);var m=jt(Ci,_i);if(f>=0&&m<c)h=f,c=m;else{Si[0]=Pi(t,i,o,g),Si[1]=Pi(e,n,r,g);var v=jt(Si,_i);g<=1&&v<c?(h=g,c=v):u*=.5}}return l&&(l[0]=Pi(t,i,o,h),l[1]=Pi(e,n,r,h)),vi(c)}function Fi(t,e,i,n,o,r,a){for(var s=t,l=e,h=0,u=1/a,c=1;c<=a;c++){var d=c*u,p=Pi(t,i,o,d),f=Pi(e,n,r,d),g=p-s,m=f-l;h+=Math.sqrt(g*g+m*m),s=p,l=f}return h}var Vi=/cubic-bezier\(([0-9,\.e ]+)\)/;function Hi(t){var e=t&&Vi.exec(t);if(e){var i=e[1].split(","),n=+bt(i[0]),o=+bt(i[1]),r=+bt(i[2]),a=+bt(i[3]);if(isNaN(n+o+r+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:Di(0,n,r,1,t,s)&&Ei(0,o,a,1,s[0])}}}const Gi=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||At,this.ondestroy=t.ondestroy||At,this.onrestart=t.onrestart||At,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,n=t-this._startTime-this._pausedTime,o=n/i;o<0&&(o=0),o=Math.min(o,1);var r=this.easingFunc,a=r?r(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=n%i;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=nt(t)?t:gi[t]||Hi(t)},t}();var Wi=function(t){this.value=t},Ui=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Wi(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ji=function(){function t(t){this._list=new Ui,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var r=i.len(),a=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Wi(e),a.key=t,i.insertEntry(a),n[t]=a}return o},t.prototype.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();const Xi=ji;var Yi={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Zi(t){return(t=Math.round(t))<0?0:t>255?255:t}function qi(t){return t<0?0:t>1?1:t}function Ki(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Zi(parseFloat(e)/100*255):Zi(parseInt(e,10))}function $i(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?qi(parseFloat(e)/100):qi(parseFloat(e))}function Ji(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Qi(t,e,i){return t+(e-t)*i}function tn(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function en(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var nn=new Xi(20),on=null;function rn(t,e){on&&en(on,e),on=nn.put(t,on||e.slice())}function an(t,e){if(t){e=e||[];var i=nn.get(t);if(i)return en(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in Yi)return en(e,Yi[n]),rn(t,e),e;var o,r=n.length;if("#"===n.charAt(0))return 4===r||5===r?(o=parseInt(n.slice(1,4),16))>=0&&o<=4095?(tn(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===r?parseInt(n.slice(4),16)/15:1),rn(t,e),e):void tn(e,0,0,0,1):7===r||9===r?(o=parseInt(n.slice(1,7),16))>=0&&o<=16777215?(tn(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===r?parseInt(n.slice(7),16)/255:1),rn(t,e),e):void tn(e,0,0,0,1):void 0;var a=n.indexOf("("),s=n.indexOf(")");if(-1!==a&&s+1===r){var l=n.substr(0,a),h=n.substr(a+1,s-(a+1)).split(","),u=1;switch(l){case"rgba":if(4!==h.length)return 3===h.length?tn(e,+h[0],+h[1],+h[2],1):tn(e,0,0,0,1);u=$i(h.pop());case"rgb":return h.length>=3?(tn(e,Ki(h[0]),Ki(h[1]),Ki(h[2]),3===h.length?u:$i(h[3])),rn(t,e),e):void tn(e,0,0,0,1);case"hsla":return 4!==h.length?void tn(e,0,0,0,1):(h[3]=$i(h[3]),sn(h,e),rn(t,e),e);case"hsl":return 3!==h.length?void tn(e,0,0,0,1):(sn(h,e),rn(t,e),e);default:return}}tn(e,0,0,0,1)}}function sn(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=$i(t[1]),o=$i(t[2]),r=o<=.5?o*(n+1):o+n-o*n,a=2*o-r;return tn(e=e||[],Zi(255*Ji(a,r,i+1/3)),Zi(255*Ji(a,r,i)),Zi(255*Ji(a,r,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ln(t,e){var i=an(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:i[n]<0&&(i[n]=0);return pn(i,4===i.length?"rgba":"rgb")}}function hn(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),r=Math.ceil(n),a=e[o],s=e[r],l=n-o;return i[0]=Zi(Qi(a[0],s[0],l)),i[1]=Zi(Qi(a[1],s[1],l)),i[2]=Zi(Qi(a[2],s[2],l)),i[3]=qi(Qi(a[3],s[3],l)),i}}function un(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),r=Math.ceil(n),a=an(e[o]),s=an(e[r]),l=n-o,h=pn([Zi(Qi(a[0],s[0],l)),Zi(Qi(a[1],s[1],l)),Zi(Qi(a[2],s[2],l)),qi(Qi(a[3],s[3],l))],"rgba");return i?{color:h,leftIndex:o,rightIndex:r,value:n}:h}}function cn(t,e,i,n){var o=an(t);if(t)return o=function(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,a=Math.min(n,o,r),s=Math.max(n,o,r),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+u-d:r===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(o[1]=$i(i)),null!=n&&(o[2]=$i(n)),pn(sn(o),"rgba")}function dn(t,e){var i=an(t);if(i&&null!=e)return i[3]=qi(e),pn(i,"rgba")}function pn(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function fn(t,e){var i=an(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*e:0}var gn=i(764).lW,mn=Math.round;function vn(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var i=an(t);i&&(t="rgb("+i[0]+","+i[1]+","+i[2]+")",e=i[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var yn=1e-4;function bn(t){return t<yn&&t>-yn}function xn(t){return mn(1e3*t)/1e3}function wn(t){return mn(1e4*t)/1e4}var _n={left:"start",right:"end",center:"middle",middle:"middle"};function Cn(t){return t&&!!t.image}function Sn(t){return Cn(t)||function(t){return t&&!!t.svgElement}(t)}function Mn(t){return"linear"===t.type}function Tn(t){return"radial"===t.type}function En(t){return t&&("linear"===t.type||"radial"===t.type)}function In(t){return"url(#"+t+")"}function Dn(t){var e=t.getGlobalScale(),i=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(i)/Math.log(10)),1)}function kn(t){var e=t.x||0,i=t.y||0,n=(t.rotation||0)*Lt,o=ft(t.scaleX,1),r=ft(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||i)&&l.push("translate("+e+"px,"+i+"px)"),n&&l.push("rotate("+n+")"),1===o&&1===r||l.push("scale("+o+","+r+")"),(a||s)&&l.push("skew("+mn(a*Lt)+"deg, "+mn(s*Lt)+"deg)"),l.join(" ")}var An=b.hasGlobalWindow&&nt(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:void 0!==gn?function(t){return gn.from(t).toString("base64")}:function(t){return null},Ln=Array.prototype.slice;function Rn(t,e,i){return(e-t)*i+t}function Pn(t,e,i,n){for(var o=e.length,r=0;r<o;r++)t[r]=Rn(e[r],i[r],n);return t}function On(t,e,i,n){for(var o=e.length,r=0;r<o;r++)t[r]=e[r]+i[r]*n;return t}function zn(t,e,i,n){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=e[a][s]+i[a][s]*n}return t}function Nn(t,e){for(var i=t.length,n=e.length,o=i>n?e:t,r=Math.min(i,n),a=o[r-1]||{color:[0,0,0,0],offset:0},s=r;s<Math.max(i,n);s++)o.push({offset:a.offset,color:a.color.slice()})}function Bn(t,e,i){var n=t,o=e;if(n.push&&o.push){var r=n.length,a=o.length;if(r!==a)if(r>a)n.length=a;else for(var s=r;s<a;s++)n.push(1===i?o[s]:Ln.call(o[s]));var l=n[0]&&n[0].length;for(s=0;s<n.length;s++)if(1===i)isNaN(n[s])&&(n[s]=o[s]);else for(var h=0;h<l;h++)isNaN(n[s][h])&&(n[s][h]=o[s][h])}}function Fn(t){if(Z(t)){var e=t.length;if(Z(t[0])){for(var i=[],n=0;n<e;n++)i.push(Ln.call(t[n]));return i}return Ln.call(t)}return t}function Vn(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Hn(t){return 4===t||5===t}function Gn(t){return 1===t||2===t}var Wn=[0,0,0,0],Un=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,o=n.length,r=!1,a=6,s=e;if(Z(e)){var l=function(t){return Z(t&&t[0])?2:1}(e);a=l,(1===l&&!at(e[0])||2===l&&!at(e[0][0]))&&(r=!0)}else if(at(e)&&!dt(e))a=0;else if(ot(e))if(isNaN(+e)){var h=an(e);h&&(s=h,a=3)}else a=0;else if(ct(e)){var u=U({},s);u.colorStops=K(e.colorStops,(function(t){return{offset:t.offset,color:an(t.color)}})),Mn(e)?a=4:Tn(e)&&(a=5),s=u}0===o?this.valType=a:a===this.valType&&6!==a||(r=!0),this.discrete=this.discrete||r;var c={time:t,value:s,rawValue:e,percent:0};return i&&(c.easing=i,c.easingFunc=nt(i)?i:gi[i]||Hi(i)),n.push(c),c},t.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort((function(t,e){return t.time-e.time}));for(var n=this.valType,o=i.length,r=i[o-1],a=this.discrete,s=Gn(n),l=Hn(n),h=0;h<o;h++){var u=i[h],c=u.value,d=r.value;u.percent=u.time/t,a||(s&&h!==o-1?Bn(c,d,n):l&&Nn(c.colorStops,d.colorStops))}if(!a&&5!==n&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;var p=i[0].value;for(h=0;h<o;h++)0===n?i[h].additiveValue=i[h].value-p:3===n?i[h].additiveValue=On([],i[h].value,p,-1):Gn(n)&&(i[h].additiveValue=1===n?On([],i[h].value,p,-1):zn([],i[h].value,p,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,n,o,r=null!=this._additiveTrack,a=r?"additiveValue":"value",s=this.valType,l=this.keyframes,h=l.length,u=this.propName,c=3===s,d=this._lastFr,p=Math.min;if(1===h)n=o=l[0];else{if(e<0)i=0;else if(e<this._lastFrP){for(i=p(d+1,h-1);i>=0&&!(l[i].percent<=e);i--);i=p(i,h-2)}else{for(i=d;i<h&&!(l[i].percent>e);i++);i=p(i-1,h-2)}o=l[i+1],n=l[i]}if(n&&o){this._lastFr=i,this._lastFrP=e;var f=o.percent-n.percent,g=0===f?1:p((e-n.percent)/f,1);o.easingFunc&&(g=o.easingFunc(g));var m=r?this._additiveValue:c?Wn:t[u];if(!Gn(s)&&!c||m||(m=this._additiveValue=[]),this.discrete)t[u]=g<1?n.rawValue:o.rawValue;else if(Gn(s))1===s?Pn(m,n[a],o[a],g):function(t,e,i,n){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=Rn(e[a][s],i[a][s],n)}}(m,n[a],o[a],g);else if(Hn(s)){var v=n[a],y=o[a],b=4===s;t[u]={type:b?"linear":"radial",x:Rn(v.x,y.x,g),y:Rn(v.y,y.y,g),colorStops:K(v.colorStops,(function(t,e){var i=y.colorStops[e];return{offset:Rn(t.offset,i.offset,g),color:Vn(Pn([],t.color,i.color,g))}})),global:y.global},b?(t[u].x2=Rn(v.x2,y.x2,g),t[u].y2=Rn(v.y2,y.y2,g)):t[u].r=Rn(v.r,y.r,g)}else if(c)Pn(m,n[a],o[a],g),r||(t[u]=Vn(m));else{var x=Rn(n[a],o[a],g);r?this._additiveValue=x:t[u]=x}r&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;0===e?t[i]=t[i]+n:3===e?(an(t[i],Wn),On(Wn,Wn,n,1),t[i]=Vn(Wn)):1===e?On(t[i],t[i],n,1):2===e&&zn(t[i],t[i],n,1)},t}(),jn=function(){function t(t,e,i,n){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?V("Can' use additive animation on looped animation."):(this._additiveAnimators=n,this._allowDiscrete=i)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,Q(e),i)},t.prototype.whenWithKeys=function(t,e,i,n){for(var o=this._tracks,r=0;r<i.length;r++){var a=i[r],s=o[a];if(!s){s=o[a]=new Un(a);var l=void 0,h=this._getAdditiveTrack(a);if(h){var u=h.keyframes,c=u[u.length-1];l=c&&c.value,3===h.valType&&l&&(l=Vn(l))}else l=this._target[a];if(null==l)continue;t>0&&s.addKeyframe(0,Fn(l),n),this._trackKeys.push(a)}s.addKeyframe(t,Fn(e[a]),n)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var o=i[n].getTrack(t);o&&(e=o)}return e},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var r=this._trackKeys[o],a=this._tracks[r],s=this._getAdditiveTrack(r),l=a.keyframes,h=l.length;if(a.prepare(n,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var u=l[h-1];u&&(e._target[a.propName]=u.rawValue),a.setFinished()}else i.push(a)}if(i.length||this._force){var c=new Gi({life:n,loop:this._loop,delay:this._delay||0,onframe:function(t){e._started=2;var n=e._additiveAnimators;if(n){for(var o=!1,r=0;r<n.length;r++)if(n[r]._clip){o=!0;break}o||(e._additiveAnimators=null)}for(r=0;r<i.length;r++)i[r].step(e._target,t);var a=e._onframeCbs;if(a)for(r=0;r<a.length;r++)a[r](e._target,t)},ondestroy:function(){e._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return K(this._trackKeys,(function(e){return t._tracks[e]}))},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,o=0;o<t.length;o++){var r=i[t[o]];r&&!r.isFinished()&&(e?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}var a=!0;for(o=0;o<n.length;o++)if(!i[n[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var o=e[n],r=this._tracks[o];if(r&&!r.isFinished()){var a=r.keyframes,s=a[i?0:a.length-1];s&&(t[o]=Fn(s.rawValue))}}}},t.prototype.__changeFinalValue=function(t,e){e=e||Q(t);for(var i=0;i<e.length;i++){var n=e[i],o=this._tracks[n];if(o){var r=o.keyframes;if(r.length>1){var a=r.pop();o.addKeyframe(a.time,t[n]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},t}();const Xn=jn;function Yn(){return(new Date).getTime()}var Zn=function(t){function e(e){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return m(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,i=t.next;e?e.next=i:this._head=i,i?i.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Yn()-this._pausedTime,i=e-this._time,n=this._head;n;){var o=n.next;n.step(e,i)?(n.ondestroy(),this.removeClip(n),n=o):n=o}this._time=e,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,pi((function e(){t._running&&(pi(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Yn(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Yn(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Yn()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var i=new Xn(t,e.loop);return this.addAnimator(i),i},e}(te);const qn=Zn;var Kn,$n,Jn=b.domSupported,Qn=($n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Kn=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:K(Kn,(function(t){var e=t.replace("mouse","pointer");return $n.hasOwnProperty(e)?e:t}))}),to=["mousemove","mouseup"],eo=["pointermove","pointerup"],io=!1;function no(t){var e=t.pointerType;return"pen"===e||"touch"===e}function oo(t){t&&(t.zrByTouch=!0)}function ro(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}var ao=function(t,e){this.stopPropagation=At,this.stopImmediatePropagation=At,this.preventDefault=At,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},so={mousedown:function(t){t=ve(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ve(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ve(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){ro(this,(t=ve(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){io=!0,t=ve(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){io||(t=ve(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){oo(t=ve(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),so.mousemove.call(this,t),so.mousedown.call(this,t)},touchmove:function(t){oo(t=ve(this.dom,t)),this.handler.processGesture(t,"change"),so.mousemove.call(this,t)},touchend:function(t){oo(t=ve(this.dom,t)),this.handler.processGesture(t,"end"),so.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&so.click.call(this,t)},pointerdown:function(t){so.mousedown.call(this,t)},pointermove:function(t){no(t)||so.mousemove.call(this,t)},pointerup:function(t){so.mouseup.call(this,t)},pointerout:function(t){no(t)||so.mouseout.call(this,t)}};q(["click","dblclick","contextmenu"],(function(t){so[t]=function(e){e=ve(this.dom,e),this.trigger(t,e)}}));var lo={pointermove:function(t){no(t)||lo.mousemove.call(this,t)},pointerup:function(t){lo.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function ho(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,ye(t.domTarget,e,i,n)}function uo(t){var e,i,n,o,r=t.mounted;for(var a in r)r.hasOwnProperty(a)&&(e=t.domTarget,i=a,n=r[a],o=t.listenerOpts[a],e.removeEventListener(i,n,o));t.mounted={}}var co=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const po=function(t){function e(e,i){var n,o,r,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=e,a.painterRoot=i,a._localHandlerScope=new co(e,so),Jn&&(a._globalHandlerScope=new co(document,lo)),n=a,o=a._localHandlerScope,r=o.domHandlers,b.pointerEventsSupported?q(Qn.pointer,(function(t){ho(o,t,(function(e){r[t].call(n,e)}))})):(b.touchEventsSupported&&q(Qn.touch,(function(t){ho(o,t,(function(e){r[t].call(n,e),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(o)}))})),q(Qn.mouse,(function(t){ho(o,t,(function(e){e=me(e),o.touching||r[t].call(n,e)}))}))),a}return m(e,t),e.prototype.dispose=function(){uo(this._localHandlerScope),Jn&&uo(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Jn&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){function i(i){ho(e,i,(function(n){n=me(n),ro(t,n.target)||(n=function(t,e){return ve(t.dom,new ao(t,e),!0)}(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}b.pointerEventsSupported?q(eo,i):b.touchEventsSupported||q(to,i)}(this,e):uo(e)}},e}(te);var fo=1;b.hasGlobalWindow&&(fo=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var go=fo,mo="#333",vo="#ccc",yo=Se;function bo(t){return t>5e-5||t<-5e-5}var xo=[],wo=[],_o=[1,0,0,1,0,0],Co=Math.abs,So=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return bo(this.rotation)||bo(this.x)||bo(this.y)||bo(this.scaleX-1)||bo(this.scaleY-1)||bo(this.skewX)||bo(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||[1,0,0,1,0,0],e?this.getLocalTransform(i):yo(i),t&&(e?Te(i,t,i):Me(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&(yo(i),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(xo);var i=xo[0]<0?-1:1,n=xo[1]<0?-1:1,o=((xo[0]-i)*e+i)/xo[0]||0,r=((xo[1]-n)*e+n)/xo[1]||0;t[0]*=o,t[1]*=o,t[2]*=r,t[3]*=r}this.invTransform=this.invTransform||[1,0,0,1,0,0],ke(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),o=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(o),e=Math.sqrt(e),this.skewX=o,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Te(wo,t.invTransform,e),e=wo);var i=this.originX,n=this.originY;(i||n)&&(_o[4]=i,_o[5]=n,Te(wo,e,_o),wo[4]-=i,wo[5]-=n,e=wo),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Yt(i,i,n),i},t.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Yt(i,i,n),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&Co(t[0]-1)>1e-10&&Co(t[3]-1)>1e-10?Math.sqrt(Co(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){To(this,t)},t.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,o=t.scaleX,r=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,h=t.x,u=t.y,c=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(i||n||a||s){var p=i+a,f=n+s;e[4]=-p*o-c*f*r,e[5]=-f*r-d*p*o}else e[4]=e[5]=0;return e[0]=o,e[3]=r,e[1]=d*o,e[2]=c*r,l&&Ie(e,e,l),e[4]+=i+h,e[5]+=n+u,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Mo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function To(t,e){for(var i=0;i<Mo.length;i++){var n=Mo[i];t[n]=e[n]}}const Eo=So;var Io={};function Do(t,e){var i=Io[e=e||S];i||(i=Io[e]=new Xi(500));var n=i.get(t);return null==n&&(n=T.measureText(t,e).width,i.put(t,n)),n}function ko(t,e,i,n){var o=Do(t,e),r=Po(e),a=Lo(0,o,i),s=Ro(0,r,n);return new Ge(a,s,o,r)}function Ao(t,e,i,n){var o=((t||"")+"").split("\n");if(1===o.length)return ko(o[0],e,i,n);for(var r=new Ge(0,0,0,0),a=0;a<o.length;a++){var s=ko(o[a],e,i,n);0===a?r.copy(s):r.union(s)}return r}function Lo(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ro(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Po(t){return Do("国",t)}function Oo(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function zo(t,e,i){var n=e.position||"inside",o=null!=e.distance?e.distance:5,r=i.height,a=i.width,s=r/2,l=i.x,h=i.y,u="left",c="top";if(n instanceof Array)l+=Oo(n[0],i.width),h+=Oo(n[1],i.height),u=null,c=null;else switch(n){case"left":l-=o,h+=s,u="right",c="middle";break;case"right":l+=o+a,h+=s,c="middle";break;case"top":l+=a/2,h-=o,u="center",c="bottom";break;case"bottom":l+=a/2,h+=r+o,u="center";break;case"inside":l+=a/2,h+=s,u="center",c="middle";break;case"insideLeft":l+=o,h+=s,c="middle";break;case"insideRight":l+=a-o,h+=s,u="right",c="middle";break;case"insideTop":l+=a/2,h+=o,u="center";break;case"insideBottom":l+=a/2,h+=r-o,u="center",c="bottom";break;case"insideTopLeft":l+=o,h+=o;break;case"insideTopRight":l+=a-o,h+=o,u="right";break;case"insideBottomLeft":l+=o,h+=r-o,c="bottom";break;case"insideBottomRight":l+=a-o,h+=r-o,u="right",c="bottom"}return(t=t||{}).x=l,t.y=h,t.align=u,t.verticalAlign=c,t}var No="__zr_normal__",Bo=Mo.concat(["ignore"]),Fo=$(Mo,(function(t,e){return t[e]=!0,t}),{ignore:!1}),Vo={},Ho=new Ge(0,0,0,0),Go=function(){function t(t){this.id=F(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,o=e.innerTransformable,r=void 0,a=void 0,s=!1;o.parent=n?this:null;var l=!1;if(o.copyTransform(e),null!=i.position){var h=Ho;i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Vo,i,h):zo(Vo,i,h),o.x=Vo.x,o.y=Vo.y,r=Vo.align,a=Vo.verticalAlign;var u=i.origin;if(u&&null!=i.rotation){var c=void 0,d=void 0;"center"===u?(c=.5*h.width,d=.5*h.height):(c=Oo(u[0],h.width),d=Oo(u[1],h.height)),l=!0,o.originX=-o.x+c+(n?0:h.x),o.originY=-o.y+d+(n?0:h.y)}}null!=i.rotation&&(o.rotation=i.rotation);var p=i.offset;p&&(o.x+=p[0],o.y+=p[1],l||(o.originX=-p[0],o.originY=-p[1]));var f=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=i.insideFill,v=i.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=i.outsideFill,v=i.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&r===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=r,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=ai,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vo:mo},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof e&&an(e);i||(i=[255,255,255,1]);for(var n=i[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)i[r]=i[r]*n+(o?0:255)*(1-n);return i[3]=1,pn(i,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},U(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(st(t))for(var i=Q(t),n=0;n<i.length;n++){var o=i[n];this.attrKV(o,t[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],o=n.__fromStateTransition;if(!(n.getLoop()||o&&o!==No)){var r=n.targetName,a=r?e[r]:e;n.saveTo(a)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Bo)},t.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var o=i[n];null==t[o]||o in e||(e[o]=this[o])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(No,!1,t)},t.prototype.useState=function(t,e,i,n){var o=t===No;if(this.hasState()||!o){var r=this.currentStates,a=this.stateTransition;if(!(X(r,t)>=0)||!e&&1!==r.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||n);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!i&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,u=this._textGuide;return h&&h.useState(t,e,i,l),u&&u.useState(t,e,i,l),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ai),s}V("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,i){if(t.length){var n=[],o=this.currentStates,r=t.length,a=r===o.length;if(a)for(var s=0;s<r;s++)if(t[s]!==o[s]){a=!1;break}if(a)return;for(s=0;s<r;s++){var l=t[s],h=void 0;this.stateProxy&&(h=this.stateProxy(l,t)),h||(h=this.states[l]),h&&n.push(h)}var u=n[r-1],c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ai)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=X(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},t.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),o=X(n,t),r=X(n,e)>=0;o>=0?r?n.splice(o,1):n[o]=e:i&&!r&&n.push(e),this.useStates(n)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,i={},n=0;n<t.length;n++){var o=t[n];U(i,o),o.textConfig&&U(e=e||{},o.textConfig)}return e&&(i.textConfig=e),i},t.prototype._applyStateObj=function(t,e,i,n,o,r){var a=!(e&&n);e&&e.textConfig?(this.textConfig=U({},n?this.textConfig:i.textConfig),U(this.textConfig,e.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var s={},l=!1,h=0;h<Bo.length;h++){var u=Bo[h],c=o&&Fo[u];e&&null!=e[u]?c?(l=!0,s[u]=e[u]):this[u]=e[u]:a&&null!=i[u]&&(c?(l=!0,s[u]=i[u]):this[u]=i[u])}if(!o)for(h=0;h<this.animators.length;h++){var d=this.animators[h],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||i)[p]:e||i)}l&&this._transitionState(t,s,r)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new Eo,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),U(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=ai;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,e,i){var n=t?this[t]:this,o=new Xn(n,e,i);return t&&(o.targetName=t),this.addAnimator(o,t),o},t.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during((function(){n.updateDuringAnimation(e)})).done((function(){var e=n.animators,i=X(e,t);i>=0&&e.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,o=[],r=0;r<n;r++){var a=i[r];t&&t!==a.scope?o.push(a):a.stop(e)}return this.animators=o,this},t.prototype.animateTo=function(t,e,i){Wo(this,t,e,i)},t.prototype.animateFrom=function(t,e,i){Wo(this,t,e,i,!0)},t.prototype._transitionState=function(t,e,i,n){for(var o=Wo(this,e,i,n),r=0;r<o.length;r++)o[r].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;function i(t,i,n,o){function r(t,e){Object.defineProperty(e,0,{get:function(){return t[n]},set:function(e){t[n]=e}}),Object.defineProperty(e,1,{get:function(){return t[o]},set:function(e){t[o]=e}})}Object.defineProperty(e,t,{get:function(){return this[i]||r(this,this[i]=[]),this[i]},set:function(t){this[n]=t[0],this[o]=t[1],this[i]=t,r(this,t)}})}e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=ai,Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();function Wo(t,e,i,n,o){var r=[];Xo(t,"",t,e,i=i||{},n,r,o);var a=r.length,s=!1,l=i.done,h=i.aborted,u=function(){s=!0,--a<=0&&(s?l&&l():h&&h())},c=function(){--a<=0&&(s?l&&l():h&&h())};a||l&&l(),r.length>0&&i.during&&r[0].during((function(t,e){i.during(e)}));for(var d=0;d<r.length;d++){var p=r[d];u&&p.done(u),c&&p.aborted(c),i.force&&p.duration(i.duration),p.start(i.easing)}return r}function Uo(t,e,i){for(var n=0;n<i;n++)t[n]=e[n]}function jo(t,e,i){if(Z(e[i]))if(Z(t[i])||(t[i]=[]),ht(e[i])){var n=e[i].length;t[i].length!==n&&(t[i]=new e[i].constructor(n),Uo(t[i],e[i],n))}else{var o=e[i],r=t[i],a=o.length;if(Z(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?Uo(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else Uo(r,o,a);r.length=o.length}else t[i]=e[i]}function Xo(t,e,i,n,o,r,a,s){for(var l=Q(n),h=o.duration,u=o.delay,c=o.additive,d=o.setToFinal,p=!st(r),f=t.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=n[v];if(null!=y&&null!=i[v]&&(p||r[v]))if(!st(y)||Z(y)||ct(y))g.push(v);else{if(e){s||(i[v]=y,t.updateDuringAnimation(e));continue}Xo(t,v,i[v],y,o,r&&r[v],a,s)}else s||(i[v]=y,t.updateDuringAnimation(e),g.push(v))}var b=g.length;if(!c&&b)for(var x=0;x<f.length;x++)if((_=f[x]).targetName===e&&_.stopTracks(g)){var w=X(f,_);f.splice(w,1)}if(o.force||(g=J(g,(function(t){return!((e=n[t])===(o=i[t])||Z(e)&&Z(o)&&function(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}(e,o));var e,o})),b=g.length),b>0||o.force&&!a.length){var _,C=void 0,S=void 0,M=void 0;if(s)for(S={},d&&(C={}),x=0;x<b;x++)S[v=g[x]]=i[v],d?C[v]=n[v]:i[v]=n[v];else if(d)for(M={},x=0;x<b;x++)M[v=g[x]]=Fn(i[v]),jo(i,n,v);(_=new Xn(i,!1,!1,c?J(f,(function(t){return t.targetName===e})):null)).targetName=e,o.scope&&(_.scope=o.scope),d&&C&&_.whenWithKeys(0,C,g),M&&_.whenWithKeys(0,M,g),_.whenWithKeys(null==h?500:h,s?S:n,g).delay(u||0),t.addAnimator(_,e),a.push(_)}}Y(Go,te),Y(Go,Eo);const Yo=Go;var Zo=function(t){function e(e){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var i=X(this._children,t);return i>=0&&this.replaceAt(e,i),this},e.prototype.replaceAt=function(t,e){var i=this._children,n=i[e];if(t&&t!==this&&t.parent!==this&&t!==n){i[e]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,i=this._children,n=X(i,t);return n<0||(i.splice(n,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i<t.length;i++){var n=t[i];e&&n.removeSelfFromZr(e),n.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},e.prototype.traverse=function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i],o=t.call(e,n);n.isGroup&&!o&&n.traverse(t,e)}return this},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].addSelfToZr(e)},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].removeSelfFromZr(e)},e.prototype.getBoundingRect=function(t){for(var e=new Ge(0,0,0,0),i=t||this._children,n=[],o=null,r=0;r<i.length;r++){var a=i[r];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(n);l?(Ge.applyTransform(e,s,l),(o=o||e.clone()).union(e)):(o=o||s.clone()).union(s)}}return o||e},e}(Yo);Zo.prototype.type="group";const qo=Zo;var Ko={},$o={},Jo=function(){function t(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var o=new di,r=i.renderer||"canvas";Ko[r]||(r=Q(Ko)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var a=new Ko[r](e,o,i,t),s=i.ssr||a.ssrOnly;this.storage=o,this.painter=a;var l,h=b.node||b.worker||s?null:new po(a.getViewportRoot(),a.root),u=i.useCoarsePointer;(null==u||"auto"===u?b.touchEventsSupported:!!u)&&(l=ft(i.pointerSize,44)),this.handler=new Qe(o,a,h,a.root,l),this.animation=new qn({stage:{update:s?null:function(){return n._flush(!0)}}}),s||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return fn(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,i=0,n=e.length,o=0;o<n;o++)i+=fn(e[o].color,1);return(i/=n)<.4}return!1}(t)},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},t.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},t.prototype.flush=function(){this._flush(!1)},t.prototype._flush=function(t){var e,i=Yn();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=Yn();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof qo&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},t.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete $o[t]},t}();function Qo(t,e){var i=new Jo(F(),t,e);return $o[i.id]=i,i}var tr=1e-4,er=20;function ir(t,e,i,n){var o=e[0],r=e[1],a=i[0],s=i[1],l=r-o,h=s-a;if(0===l)return 0===h?a:(a+s)/2;if(n)if(l>0){if(t<=o)return a;if(t>=r)return s}else{if(t>=o)return a;if(t<=r)return s}else{if(t===o)return a;if(t===r)return s}return(t-o)/l*h+a}function nr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return ot(t)?(i=t,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i}function or(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),er),t=(+t).toFixed(e),i?t:+t}function rr(t){return t.sort((function(t,e){return t-e})),t}function ar(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,i=0;i<15;i++,e*=10)if(Math.round(t*e)/e===t)return i;return function(t){var e=t.toString().toLowerCase(),i=e.indexOf("e"),n=i>0?+e.slice(i+1):0,o=i>0?i:e.length,r=e.indexOf("."),a=r<0?0:o-1-r;return Math.max(0,a-n)}(t)}function sr(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),r=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-o+r,0),20);return isFinite(a)?a:20}function lr(t,e){var i=Math.max(ar(t),ar(e)),n=t+e;return i>er?n:or(n,i)}var hr=9007199254740991;function ur(t){var e=2*Math.PI;return(t%e+e)%e}function cr(t){return t>-1e-4&&t<tr}var dr=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function pr(t){if(t instanceof Date)return t;if(ot(t)){var e=dr.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function fr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function gr(t,e){var i=fr(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t}function mr(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],r=i-n;return r?o+r*(t[n]-o):o}function vr(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,r=t[n].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-i),e=o[a],i=r[a];o[0]===o[1]&&r[0]*r[1]!=1?t.splice(n,1):n++}return t;function s(t,e,i){return t.interval[i]<e.interval[i]||t.interval[i]===e.interval[i]&&(t.close[i]-e.close[i]==(i?-1:1)||!i&&s(t,e,1))}}function yr(t){var e=parseFloat(t);return e==t&&(0!==e||!ot(t)||t.indexOf("x")<=0)?e:NaN}function br(t){return!isNaN(yr(t))}function xr(){return Math.round(9*Math.random())}function wr(t,e){return 0===e?t:wr(e,t%e)}function _r(t,e){return null==t?e:null==e?t:t*e/wr(t,e)}function Cr(t,e,i){return(e-t)*i+t}var Sr="series\0",Mr="\0_ec_\0";function Tr(t){return t instanceof Array?t:null==t?[]:[t]}function Er(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var r=i[n];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var Ir=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Dr(t){return!st(t)||it(t)||t instanceof Date?t:t.value}function kr(t){return st(t)&&!(t instanceof Array)}function Ar(t,e,i){var n="normalMerge"===i,o="replaceMerge"===i,r="replaceAll"===i;t=t||[],e=(e||[]).slice();var a=Tt();q(e,(function(t,i){st(t)||(e[i]=null)}));var s,l,h=function(t,e,i){var n=[];if("replaceAll"===i)return n;for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),n.push({existing:"replaceMerge"===i||zr(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return n}(t,a,i);return(n||o)&&function(t,e,i,n){q(n,(function(o,r){if(o&&null!=o.id){var a=Rr(o.id),s=i.get(a);if(null!=s){var l=t[s];yt(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=o,l.existing=e[s],n[r]=null}}}))}(h,t,a,e),n&&function(t,e){q(e,(function(i,n){if(i&&null!=i.name)for(var o=0;o<t.length;o++){var r=t[o].existing;if(!t[o].newOption&&r&&(null==r.id||null==i.id)&&!zr(i)&&!zr(r)&&Lr("name",r,i))return t[o].newOption=i,void(e[n]=null)}}))}(h,e),n||o?function(t,e,i){q(e,(function(e){if(e){for(var n,o=0;(n=t[o])&&(n.newOption||zr(n.existing)||n.existing&&null!=e.id&&!Lr("id",e,n.existing));)o++;n?(n.newOption=e,n.brandNew=i):t.push({newOption:e,brandNew:i,existing:null,keyInfo:null}),o++}}))}(h,e,o):r&&function(t,e){q(e,(function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})}))}(h,e),s=h,l=Tt(),q(s,(function(t){var e=t.existing;e&&l.set(e.id,t)})),q(s,(function(t){var e=t.newOption;yt(!e||null==e.id||!l.get(e.id)||l.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&l.set(e.id,t),!t.keyInfo&&(t.keyInfo={})})),q(s,(function(t,e){var i=t.existing,n=t.newOption,o=t.keyInfo;if(st(n)){if(o.name=null!=n.name?Rr(n.name):i?i.name:Sr+e,i)o.id=Rr(i.id);else if(null!=n.id)o.id=Rr(n.id);else{var r=0;do{o.id="\0"+o.name+"\0"+r++}while(l.get(o.id))}l.set(o.id,t)}})),h}function Lr(t,e,i){var n=Pr(e[t],null),o=Pr(i[t],null);return null!=n&&null!=o&&n===o}function Rr(t){return Pr(t,"")}function Pr(t,e){return null==t?e:ot(t)?t:at(t)||rt(t)?t+"":e}function Or(t){var e=t.name;return!(!e||!e.indexOf(Sr))}function zr(t){return t&&null!=t.id&&0===Rr(t.id).indexOf(Mr)}function Nr(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?it(e.dataIndex)?K(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?it(e.name)?K(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0}function Br(){var t="__ec_inner_"+Fr++;return function(e){return e[t]||(e[t]={})}}var Fr=xr();function Vr(t,e,i){var n=Hr(e,i),o=n.mainTypeSpecified,r=n.queryOptionMap,a=n.others,s=i?i.defaultMainType:null;return!o&&s&&r.set(s,{}),r.each((function(e,n){var o=Ur(t,n,e,{useDefault:s===n,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});a[n+"Models"]=o.models,a[n+"Model"]=o.models[0]})),a}function Hr(t,e){var i;if(ot(t)){var n={};n[t+"Index"]=0,i=n}else i=t;var o=Tt(),r={},a=!1;return q(i,(function(t,i){if("dataIndex"!==i&&"dataIndexInside"!==i){var n=i.match(/^(\w+)(Index|Id|Name)$/)||[],s=n[1],l=(n[2]||"").toLowerCase();!s||!l||e&&e.includeMainTypes&&X(e.includeMainTypes,s)<0||(a=a||!!s,(o.get(s)||o.set(s,{}))[l]=t)}else r[i]=t})),{mainTypeSpecified:a,queryOptionMap:o,others:r}}var Gr={useDefault:!0,enableAll:!1,enableNone:!1},Wr={useDefault:!1,enableAll:!0,enableNone:!0};function Ur(t,e,i,n){n=n||Gr;var o=i.index,r=i.id,a=i.name,s={models:null,specified:null!=o||null!=r||null!=a};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=t.getComponent(e))?[l]:[],s}return"none"===o||!1===o?(yt(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===o&&(yt(n.enableAll,'`"all"` is not a valid value on index option.'),o=r=a=null),s.models=t.queryComponents({mainType:e,index:o,id:r,name:a}),s)}function jr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Xr(t,e){var i=Tt(),n=[];return q(t,(function(t){var o=e(t);(i.get(o)||(n.push(o),i.set(o,[]))).push(t)})),{keys:n,buckets:i}}function Yr(t,e,i,n,o){var r=null==e||"auto"===e;if(null==n)return n;if(at(n))return or(f=Cr(i||0,n,o),r?Math.max(ar(i||0),ar(n)):e);if(ot(n))return o<1?i:n;for(var a=[],s=i,l=n,h=Math.max(s?s.length:0,l.length),u=0;u<h;++u){var c=t.getDimensionInfo(u);if(c&&"ordinal"===c.type)a[u]=(o<1&&s?s:l)[u];else{var d=s&&s[u]?s[u]:0,p=l[u],f=Cr(d,p,o);a[u]=or(f,r?Math.max(ar(d),ar(p)):e)}}return a}var Zr=".",qr="___EC__COMPONENT__CONTAINER___",Kr="___EC__EXTENDED_CLASS___";function $r(t){var e={main:"",sub:""};if(t){var i=t.split(Zr);e.main=i[0]||"",e.sub=i[1]||""}return e}function Jr(t,e){t.$constructor=t,t.extend=function(t){var e,i,n=this;return nt(i=n)&&/^class\s/.test(Function.prototype.toString.call(i))?e=function(t){function e(){return t.apply(this,arguments)||this}return m(e,t),e}(n):(e=function(){(t.$constructor||n).apply(this,arguments)},function(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);t.prototype.constructor=t,t.superClass=e}(e,this)),U(e.prototype,t),e[Kr]=!0,e.extend=this.extend,e.superCall=ea,e.superApply=ia,e.superClass=n,e}}function Qr(t,e){t.extend=e.extend}var ta=Math.round(10*Math.random());function ea(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,i)}function ia(t,e,i){return this.superClass.prototype[e].apply(t,i)}function na(t){var e={};t.registerClass=function(t){var i,n=t.type||t.prototype.type;if(n){yt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i=n),'componentType "'+i+'" illegal'),t.prototype.type=n;var o=$r(n);if(o.sub){if(o.sub!==qr){var r=function(t){var i=e[t.main];return i&&i[qr]||((i=e[t.main]={})[qr]=!0),i}(o);r[o.sub]=t}}else e[o.main]=t}return t},t.getClass=function(t,i,n){var o=e[t];if(o&&o[qr]&&(o=i?o[i]:null),n&&!o)throw new Error(i?"Component "+t+"."+(i||"")+" is used but not imported.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){var i=$r(t),n=[],o=e[i.main];return o&&o[qr]?q(o,(function(t,e){e!==qr&&n.push(t)})):n.push(o),n},t.hasClass=function(t){var i=$r(t);return!!e[i.main]},t.getAllClassMainTypes=function(){var t=[];return q(e,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){var i=$r(t),n=e[i.main];return n&&n[qr]}}function oa(t,e){for(var i=0;i<t.length;i++)t[i][1]||(t[i][1]=t[i][0]);return e=e||!1,function(i,n,o){for(var r={},a=0;a<t.length;a++){var s=t[a][1];if(!(n&&X(n,s)>=0||o&&X(o,s)<0)){var l=i.getShallow(s,e);null!=l&&(r[t[a][0]]=l)}}return r}}var ra=oa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),aa=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ra(this,t,e)},t}(),sa=new Xi(50);function la(t){if("string"==typeof t){var e=sa.get(t);return e&&e.image}return t}function ha(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var r=sa.get(t),a={hostEl:i,cb:n,cbPayload:o};return r?!ca(e=r.image)&&r.pending.push(a):((e=T.loadImage(t,ua,ua)).__zrImageSrc=t,sa.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function ua(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function ca(t){return t&&t.width&&t.height}var da=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function pa(t,e,i,n,o){if(!e)return"";var r=(t+"").split("\n");o=fa(e,i,n,o);for(var a=0,s=r.length;a<s;a++)r[a]=ga(r[a],o);return r.join("\n")}function fa(t,e,i,n){var o=U({},n=n||{});o.font=e,i=ft(i,"..."),o.maxIterations=ft(n.maxIterations,2);var r=o.minChar=ft(n.minChar,0);o.cnCharWidth=Do("国",e);var a=o.ascCharWidth=Do("a",e);o.placeholder=ft(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&s>=a;l++)s-=a;var h=Do(i,e);return h>s&&(i="",h=0),s=t-h,o.ellipsis=i,o.ellipsisWidth=h,o.contentWidth=s,o.containerWidth=t,o}function ga(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var r=Do(t,n);if(r<=i)return t;for(var a=0;;a++){if(r<=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ma(t,o,e.ascCharWidth,e.cnCharWidth):r>0?Math.floor(t.length*o/r):0;r=Do(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ma(t,e,i,n){for(var o=0,r=0,a=t.length;r<a&&o<e;r++){var s=t.charCodeAt(r);o+=0<=s&&s<=127?i:n}return r}var va=function(){},ya=function(t){this.tokens=[],t&&(this.tokens=t)},ba=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function xa(t,e,i,n,o){var r,a,s=""===e,l=o&&i.rich[o]||{},h=t.lines,u=l.font||i.font,c=!1;if(n){var d=l.padding,p=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Oo(l.width,n.width)+p;h.length>0&&f+n.accumWidth>n.width&&(r=e.split("\n"),c=!0),n.accumWidth=f}else{var g=Ca(e,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+p,a=g.linesWidths,r=g.lines}}else r=e.split("\n");for(var m=0;m<r.length;m++){var v=r[m],y=new va;if(y.styleName=o,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Do(v,u),m||c)h.push(new ya([y]));else{var b=(h[h.length-1]||(h[0]=new ya)).tokens,x=b.length;1===x&&b[0].isLineHolder?b[0]=y:(v||!x||s)&&b.push(y)}}}var wa=$(",&?/;] ".split(""),(function(t,e){return t[e]=!0,t}),{});function _a(t){return!function(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!wa[t]}function Ca(t,e,i,n,o){for(var r=[],a=[],s="",l="",h=0,u=0,c=0;c<t.length;c++){var d=t.charAt(c);if("\n"!==d){var p=Do(d,e),f=!n&&!_a(d);(r.length?u+p>i:o+u+p>i)?u?(s||l)&&(f?(s||(s=l,l="",u=h=0),r.push(s),a.push(u-h),l+=d,s="",u=h+=p):(l&&(s+=l,l="",h=0),r.push(s),a.push(u),s=d,u=p)):f?(r.push(l),a.push(h),l=d,h=p):(r.push(d),a.push(p)):(u+=p,f?(l+=d,h+=p):(l&&(s+=l,l="",h=0),s+=d))}else l&&(s+=l,u+=h),r.push(s),a.push(u),s="",l="",h=0,u=0}return r.length||s||(s=t,l="",h=0),l&&(s+=l),s&&(r.push(s),a.push(u)),1===r.length&&(u+=o),{accumWidth:u,lines:r,linesWidths:a}}var Sa="__zr_style_"+Math.round(10*Math.random()),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ta={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[Sa]=!0;var Ea=["z","z2","invisible"],Ia=["invisible"],Da=function(t){function e(e){return t.call(this,e)||this}var i;return m(e,t),e.prototype._init=function(e){for(var i=Q(e),n=0;n<i.length;n++){var o=i[n];"style"===o?this.useStyle(e[o]):t.prototype.attrKV.call(this,o,e[o])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,e,i,n){var o,r,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=this,r=t,a=e,ka.copy(o.getBoundingRect()),o.transform&&ka.applyTransform(o.transform),Aa.width=r,Aa.height=a,!ka.intersect(Aa))||s&&!s[0]&&!s[3])return!1;if(i&&this.__clipPaths)for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1;if(n&&this.parent)for(var h=this.parent;h;){if(h.ignore)return!1;h=h.parent}return!0},e.prototype.contain=function(t,e){return this.rectContain(t,e)},e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.rectContain=function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,i=this.getBoundingRect(),n=this.style,o=n.shadowBlur||0,r=n.shadowOffsetX||0,a=n.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new Ge(0,0,0,0)),e?Ge.applyTransform(t,i,e):t.copy(i),(o||r||a)&&(t.width+=2*o+Math.abs(r),t.height+=2*o+Math.abs(a),t.x=Math.min(t.x,t.x+r-o),t.y=Math.min(t.y,t.y+a-o));var s=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-s),t.y=Math.floor(t.y-s),t.width=Math.ceil(t.width+1+2*s),t.height=Math.ceil(t.height+1+2*s))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Ge(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(e,i){"style"!==e?t.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:U(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(2&this.__dirty)},e.prototype.styleUpdated=function(){this.__dirty&=-3},e.prototype.createStyle=function(t){return It(Ma,t)},e.prototype.useStyle=function(t){t[Sa]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[Sa]},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,Ea)},e.prototype._applyStateObj=function(e,i,n,o,r,a){t.prototype._applyStateObj.call(this,e,i,n,o,r,a);var s,l=!(i&&o);if(i&&i.style?r?o?s=i.style:(s=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(s,i.style)):(s=this._mergeStyle(this.createStyle(),o?this.style:n.style),this._mergeStyle(s,i.style)):l&&(s=n.style),s)if(r){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var u=Q(h),c=0;c<u.length;c++)(p=u[c])in s&&(s[p]=s[p],this.style[p]=h[p]);var d=Q(s);for(c=0;c<d.length;c++){var p=d[c];this.style[p]=this.style[p]}this._transitionState(e,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Ia:Ea;for(c=0;c<f.length;c++)p=f[c],i&&null!=i[p]?this[p]=i[p]:l&&null!=n[p]&&(this[p]=n[p])},e.prototype._mergeStates=function(e){for(var i,n=t.prototype._mergeStates.call(this,e),o=0;o<e.length;o++){var r=e[o];r.style&&(i=i||{},this._mergeStyle(i,r.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(t,e){return U(t,e),t},e.prototype.getAnimationStyleProps=function(){return Ta},e.initDefaultProps=((i=e.prototype).type="displayable",i.invisible=!1,i.z=0,i.z2=0,i.zlevel=0,i.culling=!1,i.cursor="pointer",i.rectHover=!1,i.incremental=!1,i._rect=null,i.dirtyRectTolerance=0,void(i.__dirty=2|ai)),e}(Yo),ka=new Ge(0,0,0,0),Aa=new Ge(0,0,0,0);const La=Da;var Ra=Math.min,Pa=Math.max,Oa=Math.sin,za=Math.cos,Na=2*Math.PI,Ba=Rt(),Fa=Rt(),Va=Rt();function Ha(t,e,i){if(0!==t.length){for(var n=t[0],o=n[0],r=n[0],a=n[1],s=n[1],l=1;l<t.length;l++)n=t[l],o=Ra(o,n[0]),r=Pa(r,n[0]),a=Ra(a,n[1]),s=Pa(s,n[1]);e[0]=o,e[1]=a,i[0]=r,i[1]=s}}function Ga(t,e,i,n,o,r){o[0]=Ra(t,i),o[1]=Ra(e,n),r[0]=Pa(t,i),r[1]=Pa(e,n)}var Wa=[],Ua=[];function ja(t,e,i,n,o,r,a,s,l,h){var u=ki,c=Ei,d=u(t,i,o,a,Wa);l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0;for(var p=0;p<d;p++){var f=c(t,i,o,a,Wa[p]);l[0]=Ra(f,l[0]),h[0]=Pa(f,h[0])}for(d=u(e,n,r,s,Ua),p=0;p<d;p++){var g=c(e,n,r,s,Ua[p]);l[1]=Ra(g,l[1]),h[1]=Pa(g,h[1])}l[0]=Ra(t,l[0]),h[0]=Pa(t,h[0]),l[0]=Ra(a,l[0]),h[0]=Pa(a,h[0]),l[1]=Ra(e,l[1]),h[1]=Pa(e,h[1]),l[1]=Ra(s,l[1]),h[1]=Pa(s,h[1])}function Xa(t,e,i,n,o,r,a,s){var l=zi,h=Pi,u=Pa(Ra(l(t,i,o),1),0),c=Pa(Ra(l(e,n,r),1),0),d=h(t,i,o,u),p=h(e,n,r,c);a[0]=Ra(t,o,d),a[1]=Ra(e,r,p),s[0]=Pa(t,o,d),s[1]=Pa(e,r,p)}function Ya(t,e,i,n,o,r,a,s,l){var h=Zt,u=qt,c=Math.abs(o-r);if(c%Na<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Ba[0]=za(o)*i+t,Ba[1]=Oa(o)*n+e,Fa[0]=za(r)*i+t,Fa[1]=Oa(r)*n+e,h(s,Ba,Fa),u(l,Ba,Fa),(o%=Na)<0&&(o+=Na),(r%=Na)<0&&(r+=Na),o>r&&!a?r+=Na:o<r&&a&&(o+=Na),a){var d=r;r=o,o=d}for(var p=0;p<r;p+=Math.PI/2)p>o&&(Va[0]=za(p)*i+t,Va[1]=Oa(p)*n+e,h(s,Va,s),u(l,Va,l))}var Za={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},qa=[],Ka=[],$a=[],Ja=[],Qa=[],ts=[],es=Math.min,is=Math.max,ns=Math.cos,os=Math.sin,rs=Math.abs,as=Math.PI,ss=2*as,ls="undefined"!=typeof Float32Array,hs=[];function us(t){return Math.round(t/as*1e8)/1e8%2*as}function cs(t,e){var i=us(t[0]);i<0&&(i+=ss);var n=i-t[0],o=t[1];o+=n,!e&&o-i>=ss?o=i+ss:e&&i-o>=ss?o=i-ss:!e&&i>o?o=i+(ss-us(i-o)):e&&i<o&&(o=i-(ss-us(o-i))),t[0]=i,t[1]=o}var ds=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,i){(i=i||0)>0&&(this._ux=rs(i/go/t)||0,this._uy=rs(i/go/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Za.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var i=rs(t-this._xi),n=rs(e-this._yi),o=i>this._ux||n>this._uy;if(this.addData(Za.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var r=i*i+n*n;r>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r)}return this},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){return this._drawPendingPt(),this.addData(Za.C,t,e,i,n,o,r),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,o,r),this._xi=o,this._yi=r,this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(Za.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},t.prototype.arc=function(t,e,i,n,o,r){this._drawPendingPt(),hs[0]=n,hs[1]=o,cs(hs,r),n=hs[0];var a=(o=hs[1])-n;return this.addData(Za.A,t,e,i,i,n,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,r),this._xi=ns(o)*i+t,this._yi=os(o)*i+e,this},t.prototype.arcTo=function(t,e,i,n,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},t.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Za.R,t,e,i,n),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Za.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!ls||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();for(ls&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i)),o=0;o<e;o++)for(var r=t[o].data,a=0;a<r.length;a++)this.data[n++]=r[a];this._len=n},t.prototype.addData=function(t,e,i,n,o,r,a,s,l){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var u=0;u<arguments.length;u++)h[this._len++]=arguments[u]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,ls&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){$a[0]=$a[1]=Qa[0]=Qa[1]=Number.MAX_VALUE,Ja[0]=Ja[1]=ts[0]=ts[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,n=0,o=0,r=0;for(t=0;t<this._len;){var a=e[t++],s=1===t;switch(s&&(o=i=e[t],r=n=e[t+1]),a){case Za.M:i=o=e[t++],n=r=e[t++],Qa[0]=o,Qa[1]=r,ts[0]=o,ts[1]=r;break;case Za.L:Ga(i,n,e[t],e[t+1],Qa,ts),i=e[t++],n=e[t++];break;case Za.C:ja(i,n,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],Qa,ts),i=e[t++],n=e[t++];break;case Za.Q:Xa(i,n,e[t++],e[t++],e[t],e[t+1],Qa,ts),i=e[t++],n=e[t++];break;case Za.A:var l=e[t++],h=e[t++],u=e[t++],c=e[t++],d=e[t++],p=e[t++]+d;t+=1;var f=!e[t++];s&&(o=ns(d)*u+l,r=os(d)*c+h),Ya(l,h,u,c,d,p,f,Qa,ts),i=ns(p)*u+l,n=os(p)*c+h;break;case Za.R:Ga(o=i=e[t++],r=n=e[t++],o+e[t++],r+e[t++],Qa,ts);break;case Za.Z:i=o,n=r}Zt($a,$a,Qa),qt(Ja,Ja,ts)}return 0===t&&($a[0]=$a[1]=Ja[0]=Ja[1]=0),new Ge($a[0],$a[1],Ja[0]-$a[0],Ja[1]-$a[1])},t.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,h=0,u=0,c=0;c<e;){var d=t[c++],p=1===c;p&&(a=o=t[c],s=r=t[c+1]);var f=-1;switch(d){case Za.M:o=a=t[c++],r=s=t[c++];break;case Za.L:var g=t[c++],m=(b=t[c++])-r;(rs(D=g-o)>i||rs(m)>n||c===e-1)&&(f=Math.sqrt(D*D+m*m),o=g,r=b);break;case Za.C:var v=t[c++],y=t[c++],b=(g=t[c++],t[c++]),x=t[c++],w=t[c++];f=Ri(o,r,v,y,g,b,x,w,10),o=x,r=w;break;case Za.Q:f=Fi(o,r,v=t[c++],y=t[c++],g=t[c++],b=t[c++],10),o=g,r=b;break;case Za.A:var _=t[c++],C=t[c++],S=t[c++],M=t[c++],T=t[c++],E=t[c++],I=E+T;c+=1,t[c++],p&&(a=ns(T)*S+_,s=os(T)*M+C),f=is(S,M)*es(ss,Math.abs(E)),o=ns(I)*S+_,r=os(I)*M+C;break;case Za.R:a=o=t[c++],s=r=t[c++],f=2*t[c++]+2*t[c++];break;case Za.Z:var D=a-o;m=s-r,f=Math.sqrt(D*D+m*m),o=a,r=s}f>=0&&(l[u++]=f,h+=f)}return this._pathLen=h,h},t.prototype.rebuildPath=function(t,e){var i,n,o,r,a,s,l,h,u,c,d=this.data,p=this._ux,f=this._uy,g=this._len,m=e<1,v=0,y=0,b=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,h=e*this._pathLen))t:for(var x=0;x<g;){var w=d[x++],_=1===x;switch(_&&(i=o=d[x],n=r=d[x+1]),w!==Za.L&&b>0&&(t.lineTo(u,c),b=0),w){case Za.M:i=o=d[x++],n=r=d[x++],t.moveTo(o,r);break;case Za.L:a=d[x++],s=d[x++];var C=rs(a-o),S=rs(s-r);if(C>p||S>f){if(m){if(v+(Z=l[y++])>h){var M=(h-v)/Z;t.lineTo(o*(1-M)+a*M,r*(1-M)+s*M);break t}v+=Z}t.lineTo(a,s),o=a,r=s,b=0}else{var T=C*C+S*S;T>b&&(u=a,c=s,b=T)}break;case Za.C:var E=d[x++],I=d[x++],D=d[x++],k=d[x++],A=d[x++],L=d[x++];if(m){if(v+(Z=l[y++])>h){Ai(o,E,D,A,M=(h-v)/Z,qa),Ai(r,I,k,L,M,Ka),t.bezierCurveTo(qa[1],Ka[1],qa[2],Ka[2],qa[3],Ka[3]);break t}v+=Z}t.bezierCurveTo(E,I,D,k,A,L),o=A,r=L;break;case Za.Q:if(E=d[x++],I=d[x++],D=d[x++],k=d[x++],m){if(v+(Z=l[y++])>h){Ni(o,E,D,M=(h-v)/Z,qa),Ni(r,I,k,M,Ka),t.quadraticCurveTo(qa[1],Ka[1],qa[2],Ka[2]);break t}v+=Z}t.quadraticCurveTo(E,I,D,k),o=D,r=k;break;case Za.A:var R=d[x++],P=d[x++],O=d[x++],z=d[x++],N=d[x++],B=d[x++],F=d[x++],V=!d[x++],H=O>z?O:z,G=rs(O-z)>.001,W=N+B,U=!1;if(m&&(v+(Z=l[y++])>h&&(W=N+B*(h-v)/Z,U=!0),v+=Z),G&&t.ellipse?t.ellipse(R,P,O,z,F,N,W,V):t.arc(R,P,H,N,W,V),U)break t;_&&(i=ns(N)*O+R,n=os(N)*z+P),o=ns(W)*O+R,r=os(W)*z+P;break;case Za.R:i=o=d[x],n=r=d[x+1],a=d[x++],s=d[x++];var j=d[x++],X=d[x++];if(m){if(v+(Z=l[y++])>h){var Y=h-v;t.moveTo(a,s),t.lineTo(a+es(Y,j),s),(Y-=j)>0&&t.lineTo(a+j,s+es(Y,X)),(Y-=X)>0&&t.lineTo(a+is(j-Y,0),s+X),(Y-=j)>0&&t.lineTo(a,s+is(X-Y,0));break t}v+=Z}t.rect(a,s,j,X);break;case Za.Z:if(m){var Z;if(v+(Z=l[y++])>h){M=(h-v)/Z,t.lineTo(o*(1-M)+i*M,r*(1-M)+n*M);break t}v+=Z}t.closePath(),o=i,r=n}}},t.prototype.clone=function(){var e=new t,i=this.data;return e.data=i.slice?i.slice():Array.prototype.slice.call(i),e._len=this._len,e},t.CMD=Za,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();const ps=ds;function fs(t,e,i,n,o,r,a){if(0===o)return!1;var s,l=o;if(a>e+l&&a>n+l||a<e-l&&a<n-l||r>t+l&&r>i+l||r<t-l&&r<i-l)return!1;if(t===i)return Math.abs(r-t)<=l/2;var h=(s=(e-n)/(t-i))*r-a+(t*n-i*e)/(t-i);return h*h/(s*s+1)<=l/2*l/2}function gs(t,e,i,n,o,r,a,s,l,h,u){if(0===l)return!1;var c=l;return!(u>e+c&&u>n+c&&u>r+c&&u>s+c||u<e-c&&u<n-c&&u<r-c&&u<s-c||h>t+c&&h>i+c&&h>o+c&&h>a+c||h<t-c&&h<i-c&&h<o-c&&h<a-c)&&Li(t,e,i,n,o,r,a,s,h,u,null)<=c/2}function ms(t,e,i,n,o,r,a,s,l){if(0===a)return!1;var h=a;return!(l>e+h&&l>n+h&&l>r+h||l<e-h&&l<n-h&&l<r-h||s>t+h&&s>i+h&&s>o+h||s<t-h&&s<i-h&&s<o-h)&&Bi(t,e,i,n,o,r,s,l,null)<=h/2}var vs=2*Math.PI;function ys(t){return(t%=vs)<0&&(t+=vs),t}var bs=2*Math.PI;function xs(t,e,i,n,o,r,a,s,l){if(0===a)return!1;var h=a;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||u+h<i)return!1;if(Math.abs(n-o)%bs<1e-4)return!0;if(r){var c=n;n=ys(o),o=ys(c)}else n=ys(n),o=ys(o);n>o&&(o+=bs);var d=Math.atan2(l,s);return d<0&&(d+=bs),d>=n&&d<=o||d+bs>=n&&d+bs<=o}function ws(t,e,i,n,o,r){if(r>e&&r>n||r<e&&r<n)return 0;if(n===e)return 0;var a=(r-e)/(n-e),s=n<e?1:-1;1!==a&&0!==a||(s=n<e?.5:-.5);var l=a*(i-t)+t;return l===o?1/0:l>o?s:0}var _s=ps.CMD,Cs=2*Math.PI,Ss=[-1,-1,-1],Ms=[-1,-1];function Ts(t,e,i,n,o,r,a,s,l,h){if(h>e&&h>n&&h>r&&h>s||h<e&&h<n&&h<r&&h<s)return 0;var u,c=Di(e,n,r,s,h,Ss);if(0===c)return 0;for(var d=0,p=-1,f=void 0,g=void 0,m=0;m<c;m++){var v=Ss[m],y=0===v||1===v?.5:1;Ei(t,i,o,a,v)<l||(p<0&&(p=ki(e,n,r,s,Ms),Ms[1]<Ms[0]&&p>1&&(void 0,u=Ms[0],Ms[0]=Ms[1],Ms[1]=u),f=Ei(e,n,r,s,Ms[0]),p>1&&(g=Ei(e,n,r,s,Ms[1]))),2===p?v<Ms[0]?d+=f<e?y:-y:v<Ms[1]?d+=g<f?y:-y:d+=s<g?y:-y:v<Ms[0]?d+=f<e?y:-y:d+=s<f?y:-y)}return d}function Es(t,e,i,n,o,r,a,s){if(s>e&&s>n&&s>r||s<e&&s<n&&s<r)return 0;var l=function(t,e,i,n,o){var r=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(Mi(r))Ti(a)&&(u=-s/a)>=0&&u<=1&&(o[l++]=u);else{var h=a*a-4*r*s;if(Mi(h))(u=-a/(2*r))>=0&&u<=1&&(o[l++]=u);else if(h>0){var u,c=vi(h),d=(-a-c)/(2*r);(u=(-a+c)/(2*r))>=0&&u<=1&&(o[l++]=u),d>=0&&d<=1&&(o[l++]=d)}}return l}(e,n,r,s,Ss);if(0===l)return 0;var h=zi(e,n,r);if(h>=0&&h<=1){for(var u=0,c=Pi(e,n,r,h),d=0;d<l;d++){var p=0===Ss[d]||1===Ss[d]?.5:1;Pi(t,i,o,Ss[d])<a||(Ss[d]<h?u+=c<e?p:-p:u+=r<c?p:-p)}return u}return p=0===Ss[0]||1===Ss[0]?.5:1,Pi(t,i,o,Ss[0])<a?0:r<e?p:-p}function Is(t,e,i,n,o,r,a,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Ss[0]=-l,Ss[1]=l;var h=Math.abs(n-o);if(h<1e-4)return 0;if(h>=Cs-1e-4){n=0,o=Cs;var u=r?1:-1;return a>=Ss[0]+t&&a<=Ss[1]+t?u:0}if(n>o){var c=n;n=o,o=c}n<0&&(n+=Cs,o+=Cs);for(var d=0,p=0;p<2;p++){var f=Ss[p];if(f+t>a){var g=Math.atan2(s,f);u=r?1:-1,g<0&&(g=Cs+g),(g>=n&&g<=o||g+Cs>=n&&g+Cs<=o)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),d+=u)}}return d}function Ds(t,e,i,n,o){for(var r,a,s,l,h=t.data,u=t.len(),c=0,d=0,p=0,f=0,g=0,m=0;m<u;){var v=h[m++],y=1===m;switch(v===_s.M&&m>1&&(i||(c+=ws(d,p,f,g,n,o))),y&&(f=d=h[m],g=p=h[m+1]),v){case _s.M:d=f=h[m++],p=g=h[m++];break;case _s.L:if(i){if(fs(d,p,h[m],h[m+1],e,n,o))return!0}else c+=ws(d,p,h[m],h[m+1],n,o)||0;d=h[m++],p=h[m++];break;case _s.C:if(i){if(gs(d,p,h[m++],h[m++],h[m++],h[m++],h[m],h[m+1],e,n,o))return!0}else c+=Ts(d,p,h[m++],h[m++],h[m++],h[m++],h[m],h[m+1],n,o)||0;d=h[m++],p=h[m++];break;case _s.Q:if(i){if(ms(d,p,h[m++],h[m++],h[m],h[m+1],e,n,o))return!0}else c+=Es(d,p,h[m++],h[m++],h[m],h[m+1],n,o)||0;d=h[m++],p=h[m++];break;case _s.A:var b=h[m++],x=h[m++],w=h[m++],_=h[m++],C=h[m++],S=h[m++];m+=1;var M=!!(1-h[m++]);r=Math.cos(C)*w+b,a=Math.sin(C)*_+x,y?(f=r,g=a):c+=ws(d,p,r,a,n,o);var T=(n-b)*_/w+b;if(i){if(xs(b,x,_,C,C+S,M,e,T,o))return!0}else c+=Is(b,x,_,C,C+S,M,T,o);d=Math.cos(C+S)*w+b,p=Math.sin(C+S)*_+x;break;case _s.R:if(f=d=h[m++],g=p=h[m++],r=f+h[m++],a=g+h[m++],i){if(fs(f,g,r,g,e,n,o)||fs(r,g,r,a,e,n,o)||fs(r,a,f,a,e,n,o)||fs(f,a,f,g,e,n,o))return!0}else c+=ws(r,g,r,a,n,o),c+=ws(f,a,f,g,n,o);break;case _s.Z:if(i){if(fs(d,p,f,g,e,n,o))return!0}else c+=ws(d,p,f,g,n,o);d=f,p=g}}return i||(s=p,l=g,Math.abs(s-l)<1e-4)||(c+=ws(d,p,f,g,n,o)||0),0!==c}var ks=j({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),As={style:j({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ta.style)},Ls=Mo.concat(["invisible","culling","z","z2","zlevel","parent"]),Rs=function(t){function e(e){return t.call(this,e)||this}var i;return m(e,t),e.prototype.update=function(){var i=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var o=this._decalEl=this._decalEl||new e;o.buildPath===e.prototype.buildPath&&(o.buildPath=function(t){i.buildPath(t,i.shape)}),o.silent=!0;var r=o.style;for(var a in n)r[a]!==n[a]&&(r[a]=n[a]);r.fill=n.fill?n.decal:null,r.decal=null,r.shadowColor=null,n.strokeFirst&&(r.stroke=null);for(var s=0;s<Ls.length;++s)o[Ls[s]]=this[Ls[s]];o.__dirty|=ai}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(e){var i=Q(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var o=0;o<i.length;o++){var r=i[o],a=e[r];"style"===r?this.style?U(this.style,a):this.useStyle(a):"shape"===r?U(this.shape,a):t.prototype.attrKV.call(this,r,a)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(ot(t)){var e=fn(t,0);return e>.5?mo:e>.2?"#eee":vo}if(t)return vo}return mo},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(ot(e)){var i=this.__zr;if(!(!i||!i.isDarkMode())==fn(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,i){},e.prototype.pathUpdated=function(){this.__dirty&=~si},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new ps(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&si)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var r=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(r.width+=s/a,r.height+=s/a,r.x-=s/a/2,r.y-=s/a/2)}return r}return t},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var r=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,i,n){return Ds(t,e,!0,i,n)}(r,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,i){return Ds(t,0,!1,e,i)}(r,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=si,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,i){"shape"===e?this.setShape(i):t.prototype.attrKV.call(this,e,i)},e.prototype.setShape=function(t,e){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=e:U(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&si)},e.prototype.createStyle=function(t){return It(ks,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=U({},this.shape))},e.prototype._applyStateObj=function(e,i,n,o,r,a){t.prototype._applyStateObj.call(this,e,i,n,o,r,a);var s,l=!(i&&o);if(i&&i.shape?r?o?s=i.shape:(s=U({},n.shape),U(s,i.shape)):(s=U({},o?this.shape:n.shape),U(s,i.shape)):l&&(s=n.shape),s)if(r){this.shape=U({},this.shape);for(var h={},u=Q(s),c=0;c<u.length;c++){var d=u[c];"object"==typeof s[d]?this.shape[d]=s[d]:h[d]=s[d]}this._transitionState(e,{shape:h},a)}else this.shape=s,this.dirtyShape()},e.prototype._mergeStates=function(e){for(var i,n=t.prototype._mergeStates.call(this,e),o=0;o<e.length;o++){var r=e[o];r.shape&&(i=i||{},this._mergeStyle(i,r.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return As},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=function(e){function i(i){var n=e.call(this,i)||this;return t.init&&t.init.call(n,i),n}return m(i,e),i.prototype.getDefaultStyle=function(){return H(t.style)},i.prototype.getDefaultShape=function(){return H(t.shape)},i}(e);for(var n in t)"function"==typeof t[n]&&(i.prototype[n]=t[n]);return i},e.initDefaultProps=((i=e.prototype).type="path",i.strokeContainThreshold=5,i.segmentIgnoreThreshold=0,i.subPixelOptimize=!1,i.autoBatch=!1,void(i.__dirty=2|ai|si)),e}(La);const Ps=Rs;var Os=j({strokeFirst:!0,font:S,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},ks),zs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return It(Os,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var i=Ao(e,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var n=t.lineWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(La);zs.prototype.type="tspan";const Ns=zs;var Bs=j({x:0,y:0},Ma),Fs={style:j({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ta.style)},Vs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.createStyle=function(t){return It(Bs,t)},e.prototype._getSize=function(t){var e=this.style,i=e[t];if(null!=i)return i;var n,o=(n=e.image)&&"string"!=typeof n&&n.width&&n.height?e.image:this.__image;if(!o)return 0;var r="width"===t?"height":"width",a=e[r];return null==a?o[t]:o[t]/o[r]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Fs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Ge(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(La);Vs.prototype.type="image";const Hs=Vs;var Gs=Math.round;function Ws(t,e,i){if(e){var n=e.x1,o=e.x2,r=e.y1,a=e.y2;t.x1=n,t.x2=o,t.y1=r,t.y2=a;var s=i&&i.lineWidth;return s?(Gs(2*n)===Gs(2*o)&&(t.x1=t.x2=js(n,s,!0)),Gs(2*r)===Gs(2*a)&&(t.y1=t.y2=js(r,s,!0)),t):t}}function Us(t,e,i){if(e){var n=e.x,o=e.y,r=e.width,a=e.height;t.x=n,t.y=o,t.width=r,t.height=a;var s=i&&i.lineWidth;return s?(t.x=js(n,s,!0),t.y=js(o,s,!0),t.width=Math.max(js(n+r,s,!1)-t.x,0===r?0:1),t.height=Math.max(js(o+a,s,!1)-t.y,0===a?0:1),t):t}}function js(t,e,i){if(!e)return t;var n=Gs(2*t);return(n+Gs(e))%2==0?n/2:(n+(i?1:-1))/2}var Xs=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ys={},Zs=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new Xs},e.prototype.buildPath=function(t,e){var i,n,o,r;if(this.subPixelOptimize){var a=Us(Ys,e,this.style);i=a.x,n=a.y,o=a.width,r=a.height,a.r=e.r,e=a}else i=e.x,n=e.y,o=e.width,r=e.height;e.r?function(t,e){var i,n,o,r,a,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=o=r=c:c instanceof Array?1===c.length?i=n=o=r=c[0]:2===c.length?(i=o=c[0],n=r=c[1]):3===c.length?(i=c[0],n=r=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],r=c[3]):i=n=o=r=0,i+n>h&&(i*=h/(a=i+n),n*=h/a),o+r>h&&(o*=h/(a=o+r),r*=h/a),n+o>u&&(n*=u/(a=n+o),o*=u/a),i+r>u&&(i*=u/(a=i+r),r*=u/a),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.arc(s+h-n,l+n,n,-Math.PI/2,0),t.lineTo(s+h,l+u-o),0!==o&&t.arc(s+h-o,l+u-o,o,0,Math.PI/2),t.lineTo(s+r,l+u),0!==r&&t.arc(s+r,l+u-r,r,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}(t,e):t.rect(i,n,o,r)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ps);Zs.prototype.type="rect";const qs=Zs;var Ks={fill:"#000"},$s={style:j({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Ta.style)},Js=function(t){function e(e){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Ks,i.attr(e),i}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):t.prototype.getLocalTransform.call(this,e)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){var t;this._childCursor=0,rl(t=this.style),q(t.rich,rl),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Ge(0,0,0,0),e=this._children,i=[],n=null,o=0;o<e.length;o++){var r=e[o],a=r.getBoundingRect(),s=r.getLocalTransform(i);s?(t.copy(a),t.applyTransform(s),(n=n||t.clone()).union(t)):(n=n||a.clone()).union(a)}this._rect=n||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Ks},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,e){if(!e)return t;var i=e.rich,n=t.rich||i&&{};return U(t,e),i&&n?(this._mergeRich(n,i),t.rich=n):n&&(t.rich=n),t},e.prototype._mergeRich=function(t,e){for(var i=Q(e),n=0;n<i.length;n++){var o=i[n];t[o]=t[o]||{},U(t[o],e[o])}},e.prototype.getAnimationStyleProps=function(){return $s},e.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},e.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||S,i=t.padding,n=function(t,e){null!=t&&(t+="");var i,n=e.overflow,o=e.padding,r=e.font,a="truncate"===n,s=Po(r),l=ft(e.lineHeight,s),h=!!e.backgroundColor,u="truncate"===e.lineOverflow,c=e.width,d=(i=null==c||"break"!==n&&"breakAll"!==n?t?t.split("\n"):[]:t?Ca(t,e.font,c,"breakAll"===n,0).lines:[]).length*l,p=ft(e.height,d);if(d>p&&u){var f=Math.floor(p/l);i=i.slice(0,f)}if(t&&a&&null!=c)for(var g=fa(c,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;m<i.length;m++)i[m]=ga(i[m],g);var v=p,y=0;for(m=0;m<i.length;m++)y=Math.max(Do(i[m],r),y);null==c&&(c=y);var b=y;return o&&(v+=o[0]+o[2],b+=o[1]+o[3],c+=o[1]+o[3]),h&&(b=c),{lines:i,height:p,outerWidth:b,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:d,width:c}}(hl(t),t),o=ul(t),r=!!t.backgroundColor,a=n.outerHeight,s=n.outerWidth,l=n.contentWidth,h=n.lines,u=n.lineHeight,c=this._defaultStyle,d=t.x||0,p=t.y||0,f=t.align||c.align||"left",g=t.verticalAlign||c.verticalAlign||"top",m=d,v=Ro(p,n.contentHeight,g);if(o||i){var y=Lo(d,s,f),b=Ro(p,a,g);o&&this._renderBackground(t,t,y,b,s,a)}v+=u/2,i&&(m=ll(d,f,i),"top"===g?v+=i[0]:"bottom"===g&&(v-=i[2]));for(var x=0,w=!1,_=(sl("fill"in t?t.fill:(w=!0,c.fill))),C=(al("stroke"in t?t.stroke:r||c.autoStroke&&!w?null:(x=2,c.stroke))),M=t.textShadowBlur>0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),E=n.calculatedLineHeight,I=0;I<h.length;I++){var D=this._getOrCreateChild(Ns),k=D.createStyle();D.useStyle(k),k.text=h[I],k.x=m,k.y=v,f&&(k.textAlign=f),k.textBaseline="middle",k.opacity=t.opacity,k.strokeFirst=!0,M&&(k.shadowBlur=t.textShadowBlur||0,k.shadowColor=t.textShadowColor||"transparent",k.shadowOffsetX=t.textShadowOffsetX||0,k.shadowOffsetY=t.textShadowOffsetY||0),k.stroke=C,k.fill=_,C&&(k.lineWidth=t.lineWidth||x,k.lineDash=t.lineDash,k.lineDashOffset=t.lineDashOffset||0),k.font=e,nl(k,t),v+=u,T&&D.setBoundingRect(new Ge(Lo(k.x,t.width,k.textAlign),Ro(k.y,E,k.textBaseline),l,E))}},e.prototype._updateRichTexts=function(){var t=this.style,e=function(t,e){var i=new ba;if(null!=t&&(t+=""),!t)return i;for(var n,o=e.width,r=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=da.lastIndex=0;null!=(n=da.exec(t));){var h=n.index;h>l&&xa(i,t.substring(l,h),e,s),xa(i,n[2],e,s,n[1]),l=da.lastIndex}l<t.length&&xa(i,t.substring(l,t.length),e,s);var u=[],c=0,d=0,p=e.padding,f="truncate"===a,g="truncate"===e.lineOverflow;function m(t,e,i){t.width=e,t.lineHeight=i,c+=i,d=Math.max(d,e)}t:for(var v=0;v<i.lines.length;v++){for(var y=i.lines[v],b=0,x=0,w=0;w<y.tokens.length;w++){var _=(L=y.tokens[w]).styleName&&e.rich[L.styleName]||{},C=L.textPadding=_.padding,S=C?C[1]+C[3]:0,M=L.font=_.font||e.font;L.contentHeight=Po(M);var T=ft(_.height,L.contentHeight);if(L.innerHeight=T,C&&(T+=C[0]+C[2]),L.height=T,L.lineHeight=gt(_.lineHeight,e.lineHeight,T),L.align=_&&_.align||e.align,L.verticalAlign=_&&_.verticalAlign||"middle",g&&null!=r&&c+L.lineHeight>r){w>0?(y.tokens=y.tokens.slice(0,w),m(y,x,b),i.lines=i.lines.slice(0,v+1)):i.lines=i.lines.slice(0,v);break t}var E=_.width,I=null==E||"auto"===E;if("string"==typeof E&&"%"===E.charAt(E.length-1))L.percentWidth=E,u.push(L),L.contentWidth=Do(L.text,M);else{if(I){var D=_.backgroundColor,k=D&&D.image;k&&ca(k=la(k))&&(L.width=Math.max(L.width,k.width*T/k.height))}var A=f&&null!=o?o-x:null;null!=A&&A<L.width?!I||A<S?(L.text="",L.width=L.contentWidth=0):(L.text=pa(L.text,A-S,M,e.ellipsis,{minChar:e.truncateMinChar}),L.width=L.contentWidth=Do(L.text,M)):L.contentWidth=Do(L.text,M)}L.width+=S,x+=L.width,_&&(b=Math.max(b,L.lineHeight))}m(y,x,b)}for(i.outerWidth=i.width=ft(o,d),i.outerHeight=i.height=ft(r,c),i.contentHeight=c,i.contentWidth=d,p&&(i.outerWidth+=p[1]+p[3],i.outerHeight+=p[0]+p[2]),v=0;v<u.length;v++){var L,R=(L=u[v]).percentWidth;L.width=parseInt(R,10)/100*i.width}return i}(hl(t),t),i=e.width,n=e.outerWidth,o=e.outerHeight,r=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,h=t.align||l.align,u=t.verticalAlign||l.verticalAlign,c=Lo(a,n,h),d=Ro(s,o,u),p=c,f=d;r&&(p+=r[3],f+=r[0]);var g=p+i;ul(t)&&this._renderBackground(t,t,c,d,n,o);for(var m=!!t.backgroundColor,v=0;v<e.lines.length;v++){for(var y=e.lines[v],b=y.tokens,x=b.length,w=y.lineHeight,_=y.width,C=0,S=p,M=g,T=x-1,E=void 0;C<x&&(!(E=b[C]).align||"left"===E.align);)this._placeToken(E,t,w,f,S,"left",m),_-=E.width,S+=E.width,C++;for(;T>=0&&"right"===(E=b[T]).align;)this._placeToken(E,t,w,f,M,"right",m),_-=E.width,M-=E.width,T--;for(S+=(i-(S-p)-(g-M)-_)/2;C<=T;)E=b[C],this._placeToken(E,t,w,f,S+E.width/2,"center",m),S+=E.width,C++;f+=w}},e.prototype._placeToken=function(t,e,i,n,o,r,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,h=n+i/2;"top"===l?h=n+t.height/2:"bottom"===l&&(h=n+i-t.height/2),!t.isLineHolder&&ul(s)&&this._renderBackground(s,e,"right"===r?o-t.width:"center"===r?o-t.width/2:o,h-t.height/2,t.width,t.height);var u=!!s.backgroundColor,c=t.textPadding;c&&(o=ll(o,r,c),h-=t.height/2-c[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ns),p=d.createStyle();d.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=sl("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),y=al("stroke"in s?s.stroke:"stroke"in e?e.stroke:u||a||f.autoStroke&&!g?null:(m=2,f.stroke)),b=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=o,p.y=h,b&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=r,p.textBaseline="middle",p.font=t.font||S,p.opacity=gt(s.opacity,e.opacity,1),nl(p,s),y&&(p.lineWidth=gt(s.lineWidth,e.lineWidth,m),p.lineDash=ft(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var x=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new Ge(Lo(p.x,x,p.textAlign),Ro(p.y,w,p.textBaseline),x,w))},e.prototype._renderBackground=function(t,e,i,n,o,r){var a,s,l,h=t.backgroundColor,u=t.borderWidth,c=t.borderColor,d=h&&h.image,p=h&&!d,f=t.borderRadius,g=this;if(p||t.lineHeight||u&&c){(a=this._getOrCreateChild(qs)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=i,m.y=n,m.width=o,m.height=r,m.r=f,a.dirtyShape()}if(p)(l=a.style).fill=h||null,l.fillOpacity=ft(t.fillOpacity,1);else if(d){(s=this._getOrCreateChild(Hs)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=h.image,v.x=i,v.y=n,v.width=o,v.height=r}u&&c&&((l=a.style).lineWidth=u,l.stroke=c,l.strokeOpacity=ft(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=gt(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return ol(t)&&(e=[t.fontStyle,t.fontWeight,il(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&bt(e)||t.textFont||t.font},e}(La),Qs={left:!0,right:1,center:1},tl={top:1,bottom:1,middle:1},el=["fontStyle","fontWeight","fontSize","fontFamily"];function il(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?_+"px":t+"px":t}function nl(t,e){for(var i=0;i<el.length;i++){var n=el[i],o=e[n];null!=o&&(t[n]=o)}}function ol(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function rl(t){if(t){t.font=Js.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||Qs[e]?e:"left";var i=t.verticalAlign;"center"===i&&(i="middle"),t.verticalAlign=null==i||tl[i]?i:"top",t.padding&&(t.padding=vt(t.padding))}}function al(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function sl(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ll(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function hl(t){var e=t.text;return null!=e&&(e+=""),e}function ul(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}const cl=Js;var dl=Br(),pl=function(t,e,i,n){if(n){var o=dl(n);o.dataIndex=i,o.dataType=e,o.seriesIndex=t,"group"===n.type&&n.traverse((function(n){var o=dl(n);o.seriesIndex=t,o.dataIndex=i,o.dataType=e}))}},fl=1,gl={},ml=Br(),vl=Br(),yl=0,bl=1,xl=2,wl=["emphasis","blur","select"],_l=["normal","emphasis","blur","select"],Cl=10,Sl=9,Ml="highlight",Tl="downplay",El="select",Il="unselect",Dl="toggleSelect";function kl(t){return null!=t&&"none"!==t}var Al=new Xi(100);function Ll(t){if(ot(t)){var e=Al.get(t);return e||(e=ln(t,-.1),Al.put(t,e)),e}if(ct(t)){var i=U({},t);return i.colorStops=K(t.colorStops,(function(t){return{offset:t.offset,color:ln(t.color,-.1)}})),i}return t}function Rl(t,e,i){t.onHoverStateChange&&(t.hoverState||0)!==i&&t.onHoverStateChange(e),t.hoverState=i}function Pl(t){Rl(t,"emphasis",xl)}function Ol(t){t.hoverState===xl&&Rl(t,"normal",yl)}function zl(t){Rl(t,"blur",bl)}function Nl(t){t.hoverState===bl&&Rl(t,"normal",yl)}function Bl(t){t.selected=!0}function Fl(t){t.selected=!1}function Vl(t,e,i){e(t,i)}function Hl(t,e,i){Vl(t,e,i),t.isGroup&&t.traverse((function(t){Vl(t,e,i)}))}function Gl(t,e){switch(e){case"emphasis":t.hoverState=xl;break;case"normal":t.hoverState=yl;break;case"blur":t.hoverState=bl;break;case"select":t.selected=!0}}function Wl(t,e){var i=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,i,n){var o=i&&X(i,"select")>=0,r=!1;if(t instanceof Ps){var a=ml(t),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(kl(s)||kl(l)){var h=(n=n||{}).style||{};"inherit"===h.fill?(r=!0,n=U({},n),(h=U({},h)).fill=s):!kl(h.fill)&&kl(s)?(r=!0,n=U({},n),(h=U({},h)).fill=Ll(s)):!kl(h.stroke)&&kl(l)&&(r||(n=U({},n),h=U({},h)),h.stroke=Ll(l)),n.style=h}}if(n&&null==n.z2){r||(n=U({},n));var u=t.z2EmphasisLift;n.z2=t.z2+(null!=u?u:Cl)}return n}(this,0,e,i);if("blur"===t)return function(t,e,i){var n=X(t.currentStates,e)>=0,o=t.style.opacity,r=n?null:function(t,e,i,n){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?n&&n[s]:l}for(a=0;a<t.animators.length;a++){var h=t.animators[a];h.__fromStateTransition&&h.__fromStateTransition.indexOf(i)<0&&"style"===h.targetName&&h.saveTo(r,e)}return r}(t,["opacity"],e,{opacity:1}),a=(i=i||{}).style||{};return null==a.opacity&&(i=U({},i),a=U({opacity:n?o:.1*r.opacity},a),i.style=a),i}(this,t,i);if("select"===t)return function(t,e,i){if(i&&null==i.z2){i=U({},i);var n=t.z2SelectLift;i.z2=t.z2+(null!=n?n:Sl)}return i}(this,0,i)}return i}function Ul(t){t.stateProxy=Wl;var e=t.getTextContent(),i=t.getTextGuideLine();e&&(e.stateProxy=Wl),i&&(i.stateProxy=Wl)}function jl(t,e){!Ql(t,e)&&!t.__highByOuter&&Hl(t,Pl)}function Xl(t,e){!Ql(t,e)&&!t.__highByOuter&&Hl(t,Ol)}function Yl(t,e){t.__highByOuter|=1<<(e||0),Hl(t,Pl)}function Zl(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&Hl(t,Ol)}function ql(t){Hl(t,zl)}function Kl(t){Hl(t,Nl)}function $l(t){Hl(t,Bl)}function Jl(t){Hl(t,Fl)}function Ql(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function th(t){var e=t.getModel(),i=[],n=[];e.eachComponent((function(e,o){var r=vl(o),a="series"===e,s=a?t.getViewOfSeriesModel(o):t.getViewOfComponentModel(o);!a&&n.push(s),r.isBlured&&(s.group.traverse((function(t){Nl(t)})),a&&i.push(o)),r.isBlured=!1})),q(n,(function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(i,!1,e)}))}function eh(t,e,i,n){var o=n.getModel();function r(t,e){for(var i=0;i<e.length;i++){var n=t.getItemGraphicEl(e[i]);n&&Kl(n)}}if(i=i||"coordinateSystem",null!=t&&e&&"none"!==e){var a=o.getSeriesByIndex(t),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];o.eachSeries((function(t){var o=a===t,h=t.coordinateSystem;if(h&&h.master&&(h=h.master),!("series"===i&&!o||"coordinateSystem"===i&&!(h&&s?h===s:o)||"series"===e&&o)){if(n.getViewOfSeriesModel(t).group.traverse((function(t){t.__highByOuter&&o&&"self"===e||zl(t)})),Z(e))r(t.getData(),e);else if(st(e))for(var u=Q(e),c=0;c<u.length;c++)r(t.getData(u[c]),e[u[c]]);l.push(t),vl(t).isBlured=!0}})),o.eachComponent((function(t,e){if("series"!==t){var i=n.getViewOfComponentModel(e);i&&i.toggleBlurSeries&&i.toggleBlurSeries(l,!0,o)}}))}}function ih(t,e,i){if(null!=t&&null!=e){var n=i.getModel().getComponent(t,e);if(n){vl(n).isBlured=!0;var o=i.getViewOfComponentModel(n);o&&o.focusBlurEnabled&&o.group.traverse((function(t){zl(t)}))}}}function nh(t,e,i,n){var o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==i)return o;var r=n.getModel().getComponent(t,e);if(!r)return o;var a=n.getViewOfComponentModel(r);if(!a||!a.findHighDownDispatchers)return o;for(var s,l=a.findHighDownDispatchers(i),h=0;h<l.length;h++)if("self"===dl(l[h]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function oh(t){q(t.getAllData(),(function(e){var i=e.data,n=e.type;i.eachItemGraphicEl((function(e,i){t.isSelected(i,n)?$l(e):Jl(e)}))}))}function rh(t){var e=[];return t.eachSeries((function(t){q(t.getAllData(),(function(i){i.data;var n=i.type,o=t.getSelectedDataIndices();if(o.length>0){var r={dataIndex:o,seriesIndex:t.seriesIndex};null!=n&&(r.dataType=n),e.push(r)}}))})),e}function ah(t,e,i){dh(t,!0),Hl(t,Ul),lh(t,e,i)}function sh(t,e,i,n){n?function(t){dh(t,!1)}(t):ah(t,e,i)}function lh(t,e,i){var n=dl(t);null!=e?(n.focus=e,n.blurScope=i):n.focus&&(n.focus=null)}var hh=["emphasis","blur","select"],uh={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ch(t,e,i,n){i=i||"itemStyle";for(var o=0;o<hh.length;o++){var r=hh[o],a=e.getModel([r,i]);t.ensureState(r).style=n?n(a):a[uh[i]]()}}function dh(t,e){var i=!1===e,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),i&&!n.__highDownDispatcher||(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!i)}function ph(t){return!(!t||!t.__highDownDispatcher)}function fh(t){var e=t.type;return e===El||e===Il||e===Dl}function gh(t){var e=t.type;return e===Ml||e===Tl}var mh=Br();function vh(t,e,i,n,o){var r;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();r=a&&a.animation}var s="update"===t;if(e&&e.isAnimationEnabled()){var l=void 0,h=void 0,u=void 0;return n?(l=ft(n.duration,200),h=ft(n.easing,"cubicOut"),u=0):(l=e.getShallow(s?"animationDurationUpdate":"animationDuration"),h=e.getShallow(s?"animationEasingUpdate":"animationEasing"),u=e.getShallow(s?"animationDelayUpdate":"animationDelay")),r&&(null!=r.duration&&(l=r.duration),null!=r.easing&&(h=r.easing),null!=r.delay&&(u=r.delay)),nt(u)&&(u=u(i,o)),nt(l)&&(l=l(i)),{duration:l||0,delay:u,easing:h}}return null}function yh(t,e,i,n,o,r,a){var s,l=!1;nt(o)?(a=r,r=o,o=null):st(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var h="leave"===t;h||e.stopAnimation("leave");var u=vh(t,n,o,h?s||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null);if(u&&u.duration>0){var c={duration:u.duration,delay:u.delay||0,easing:u.easing,done:r,force:!!r||!!a,setToFinal:!h,scope:t,during:a};l?e.animateFrom(i,c):e.animateTo(i,c)}else e.stopAnimation(),!l&&e.attr(i),a&&a(1),r&&r()}function bh(t,e,i,n,o,r){yh("update",t,e,i,n,o,r)}function xh(t,e,i,n,o,r){yh("enter",t,e,i,n,o,r)}function wh(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("leave"===t.animators[e].scope)return!0;return!1}function _h(t,e,i,n,o,r){wh(t)||yh("leave",t,e,i,n,o,r)}function Ch(t,e,i,n){t.removeTextContent(),t.removeTextGuideLine(),_h(t,{style:{opacity:0}},e,i,n)}function Sh(t,e,i){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||Ch(t,e,i,n)})):Ch(t,e,i,n)}function Mh(t){mh(t).oldStyle=t.style}var Th={};function Eh(t,e){for(var i=0;i<wl.length;i++){var n=wl[i],o=e[n],r=t.ensureState(n);r.style=r.style||{},r.style.text=o}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(a,!0)}function Ih(t,e,i){var n,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;o&&(n=o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=i?{interpolatedValue:i}:null)),null==n&&(n=nt(t.defaultText)?t.defaultText(r,t,i):t.defaultText);for(var l={normal:n},h=0;h<wl.length;h++){var u=wl[h],c=e[u];l[u]=ft(o?o.getFormattedLabel(r,u,null,a,c&&c.get("formatter")):null,n)}return l}function Dh(t,e,i,n){i=i||Th;for(var o=t instanceof cl,r=!1,a=0;a<_l.length;a++)if((d=e[_l[a]])&&d.getShallow("show")){r=!0;break}var s=o?t:t.getTextContent();if(r){o||(s||(s=new cl,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=Ih(i,e),h=e.normal,u=!!h.getShallow("show"),c=Ah(h,n&&n.normal,i,!1,!o);for(c.text=l.normal,o||t.setTextConfig(Lh(h,i,!1)),a=0;a<wl.length;a++){var d,p=wl[a];if(d=e[p]){var f=s.ensureState(p),g=!!ft(d.getShallow("show"),u);g!==u&&(f.ignore=!g),f.style=Ah(d,n&&n[p],i,!0,!o),f.style.text=l[p],o||(t.ensureState(p).textConfig=Lh(d,i,!0))}}s.silent=!!h.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!u,s.useStyle(c),s.dirty(),i.enableTextSetter&&(Bh(s).setLabelText=function(t){var n=Ih(i,e,t);Eh(s,n)})}else s&&(s.ignore=!0);t.dirty()}function kh(t,e){e=e||"label";for(var i={normal:t.getModel(e)},n=0;n<wl.length;n++){var o=wl[n];i[o]=t.getModel([o,e])}return i}function Ah(t,e,i,n,o){var r={};return function(t,e,i,n,o){i=i||Th;var r,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||Th).rich;if(i){e=e||{};for(var n=Q(i),o=0;o<n.length;o++)e[n[o]]=1}t=t.parentModel}return e}(e);if(l)for(var h in r={},l)if(l.hasOwnProperty(h)){var u=e.getModel(["rich",h]);zh(r[h]={},u,s,i,n,o,!1,!0)}r&&(t.rich=r);var c=e.get("overflow");c&&(t.overflow=c);var d=e.get("minMargin");null!=d&&(t.margin=d),zh(t,e,s,i,n,o,!0,!1)}(r,t,i,n,o),e&&U(r,e),r}function Lh(t,e,i){e=e||{};var n,o={},r=t.getShallow("rotate"),a=ft(t.getShallow("distance"),i?null:5),s=t.getShallow("offset");return"outside"===(n=t.getShallow("position")||(i?null:"inside"))&&(n=e.defaultOutsidePosition||"top"),null!=n&&(o.position=n),null!=s&&(o.offset=s),null!=r&&(r*=Math.PI/180,o.rotation=r),null!=a&&(o.distance=a),o.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",o}var Rh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ph=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Oh=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function zh(t,e,i,n,o,r,a,s){i=!o&&i||Th;var l=n&&n.inheritColor,h=e.getShallow("color"),u=e.getShallow("textBorderColor"),c=ft(e.getShallow("opacity"),i.opacity);"inherit"!==h&&"auto"!==h||(h=l||null),"inherit"!==u&&"auto"!==u||(u=l||null),r||(h=h||i.color,u=u||i.textBorderColor),null!=h&&(t.fill=h),null!=u&&(t.stroke=u);var d=ft(e.getShallow("textBorderWidth"),i.textBorderWidth);null!=d&&(t.lineWidth=d);var p=ft(e.getShallow("textBorderType"),i.textBorderType);null!=p&&(t.lineDash=p);var f=ft(e.getShallow("textBorderDashOffset"),i.textBorderDashOffset);null!=f&&(t.lineDashOffset=f),o||null!=c||s||(c=n&&n.defaultOpacity),null!=c&&(t.opacity=c),o||r||null==t.fill&&n.inheritColor&&(t.fill=n.inheritColor);for(var g=0;g<Rh.length;g++){var m=Rh[g];null!=(y=ft(e.getShallow(m),i[m]))&&(t[m]=y)}for(g=0;g<Ph.length;g++)m=Ph[g],null!=(y=e.getShallow(m))&&(t[m]=y);if(null==t.verticalAlign){var v=e.getShallow("baseline");null!=v&&(t.verticalAlign=v)}if(!a||!n.disableBox){for(g=0;g<Oh.length;g++){var y;m=Oh[g],null!=(y=e.getShallow(m))&&(t[m]=y)}var b=e.getShallow("borderType");null!=b&&(t.borderDash=b),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}function Nh(t,e){var i=e&&e.getModel("textStyle");return bt([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}var Bh=Br();function Fh(t,e,i,n){if(t){var o=Bh(t);o.prevValue=o.value,o.value=i;var r=e.normal;o.valueAnimation=r.get("valueAnimation"),o.valueAnimation&&(o.precision=r.get("precision"),o.defaultInterpolatedText=n,o.statesModels=e)}}function Vh(t,e,i,n,o){var r=Bh(t);if(r.valueAnimation&&r.prevValue!==r.value){var a=r.defaultInterpolatedText,s=ft(r.interpolatedValue,r.prevValue),l=r.value;t.percent=0,(null==r.prevValue?xh:bh)(t,{percent:1},n,e,null,(function(n){var h=Yr(i,r.precision,s,l,n);r.interpolatedValue=1===n?null:h;var u=Ih({labelDataIndex:e,labelFetcher:o,defaultText:a?a(h):h+""},r.statesModels,h);Eh(t,u)}))}}var Hh=["textStyle","color"],Gh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Wh=new cl,Uh=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Hh):null)},t.prototype.getFont=function(){return Nh({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<Gh.length;i++)e[Gh[i]]=this.getShallow(Gh[i]);return Wh.useStyle(e),Wh.update(),Wh.getBoundingRect()},t}();const jh=Uh;var Xh,Yh,Zh=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qh=oa(Zh),Kh=function(){function t(){}return t.prototype.getLineStyle=function(t){return qh(this,t)},t}(),$h=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Jh=oa($h),Qh=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return Jh(this,t,e)},t}(),tu=function(){function t(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return t.prototype.init=function(t,e,i){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o]},t.prototype.mergeOption=function(t,e){G(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var i=this.option,n=null==i?i:i[t];if(null==n&&!e){var o=this.parentModel;o&&(n=o.getShallow(t))}return n},t.prototype.getModel=function(e,i){var n=null!=e,o=n?this.parsePath(e):null;return new t(n?this._doGet(o):this.option,i=i||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(H(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!b.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&(!t[n]||null!=(i=i&&"object"==typeof i?i[t[n]]:null));n++);return null==i&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},t}();Jr(tu),Xh=tu,Yh=["__\0is_clz",ta++].join("_"),Xh.prototype[Yh]=!0,Xh.isInstance=function(t){return!(!t||!t[Yh])},Y(tu,Kh),Y(tu,Qh),Y(tu,aa),Y(tu,jh);const eu=tu;var iu=Math.round(10*Math.random());function nu(t){return[t||"",iu++].join("_")}function ou(t,e){return G(G({},t,!0),e,!0)}var ru="ZH",au="EN",su=au,lu={},hu={},uu=b.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(ru)>-1?ru:su;function cu(t,e){t=t.toUpperCase(),hu[t]=new eu(e),lu[t]=e}function du(t){return hu[t]}cu(au,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),cu(ru,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var pu=1e3,fu=6e4,gu=36e5,mu=864e5,vu=31536e6,yu={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},bu="{yyyy}-{MM}-{dd}",xu={year:"{yyyy}",month:"{yyyy}-{MM}",day:bu,hour:bu+" "+yu.hour,minute:bu+" "+yu.minute,second:bu+" "+yu.second,millisecond:yu.none},wu=["year","month","day","hour","minute","second","millisecond"],_u=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function Su(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Mu(t,e,i,n){var o=pr(t),r=o[Iu(i)](),a=o[Du(i)]()+1,s=Math.floor((a-1)/3)+1,l=o[ku(i)](),h=o["get"+(i?"UTC":"")+"Day"](),u=o[Au(i)](),c=(u-1)%12+1,d=o[Lu(i)](),p=o[Ru(i)](),f=o[Pu(i)](),g=(n instanceof eu?n:du(n||uu)||hu[su]).getModel("time"),m=g.get("month"),v=g.get("monthAbbr"),y=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,Cu(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Cu(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Cu(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[h]).replace(/{ee}/g,b[h]).replace(/{e}/g,h+"").replace(/{HH}/g,Cu(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,Cu(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Cu(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Cu(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Cu(f,3)).replace(/{S}/g,f+"")}function Tu(t,e){var i=pr(t),n=i[Du(e)]()+1,o=i[ku(e)](),r=i[Au(e)](),a=i[Lu(e)](),s=i[Ru(e)](),l=0===i[Pu(e)](),h=l&&0===s,u=h&&0===a,c=u&&0===r,d=c&&1===o;return d&&1===n?"year":d?"month":c?"day":u?"hour":h?"minute":l?"second":"millisecond"}function Eu(t,e,i){var n=at(t)?pr(t):t;switch(e=e||Tu(t,i)){case"year":return n[Iu(i)]();case"half-year":return n[Du(i)]()>=6?1:0;case"quarter":return Math.floor((n[Du(i)]()+1)/4);case"month":return n[Du(i)]();case"day":return n[ku(i)]();case"half-day":return n[Au(i)]()/24;case"hour":return n[Au(i)]();case"minute":return n[Lu(i)]();case"second":return n[Ru(i)]();case"millisecond":return n[Pu(i)]()}}function Iu(t){return t?"getUTCFullYear":"getFullYear"}function Du(t){return t?"getUTCMonth":"getMonth"}function ku(t){return t?"getUTCDate":"getDate"}function Au(t){return t?"getUTCHours":"getHours"}function Lu(t){return t?"getUTCMinutes":"getMinutes"}function Ru(t){return t?"getUTCSeconds":"getSeconds"}function Pu(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Ou(t){return t?"setUTCFullYear":"setFullYear"}function zu(t){return t?"setUTCMonth":"setMonth"}function Nu(t){return t?"setUTCDate":"setDate"}function Bu(t){return t?"setUTCHours":"setHours"}function Fu(t){return t?"setUTCMinutes":"setMinutes"}function Vu(t){return t?"setUTCSeconds":"setSeconds"}function Hu(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Gu(t){if(!br(t))return ot(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Wu(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Uu=vt;function ju(t,e,i){function n(t){return t&&bt(t)?t:"-"}function o(t){return!(null==t||isNaN(t)||!isFinite(t))}var r="time"===e,a=t instanceof Date;if(r||a){var s=r?pr(t):t;if(!isNaN(+s))return Mu(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",i);if(a)return"-"}if("ordinal"===e)return rt(t)?n(t):at(t)&&o(t)?t+"":"-";var l=yr(t);return o(l)?Gu(l):rt(t)?n(t):"boolean"==typeof t?t+"":"-"}var Xu=["a","b","c","d","e","f","g"],Yu=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Zu(t,e,i){it(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],r=0;r<o.length;r++){var a=Xu[r];t=t.replace(Yu(a),Yu(a,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var h=e[s][o[l]];t=t.replace(Yu(Xu[l],s),i?ue(h):h)}return t}function qu(t,e){return e=e||"transparent",ot(t)?t:st(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Ku(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location.href=t}else window.open(t,e)}var $u=q,Ju=["left","right","top","bottom","width","height"],Qu=[["width","left","right"],["height","top","bottom"]];function tc(t,e,i,n,o){var r=0,a=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild((function(l,h){var u,c,d=l.getBoundingRect(),p=e.childAt(h+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(u=r+g)>n||l.newline?(r=0,u=g,a+=s+i,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>o||l.newline?(r+=s+i,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===t?r=u+i:a=c+i)}))}var ec=tc;function ic(t,e,i){i=Uu(i||0);var n=e.width,o=e.height,r=nr(t.left,n),a=nr(t.top,o),s=nr(t.right,n),l=nr(t.bottom,o),h=nr(t.width,n),u=nr(t.height,o),c=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-s-d-r),isNaN(u)&&(u=o-l-c-a),null!=p&&(isNaN(h)&&isNaN(u)&&(p>n/o?h=.8*n:u=.8*o),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(r)&&(r=n-s-h-d),isNaN(a)&&(a=o-l-u-c),t.left||t.right){case"center":r=n/2-h/2-i[3];break;case"right":r=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=o/2-u/2-i[0];break;case"bottom":a=o-u-c}r=r||0,a=a||0,isNaN(h)&&(h=n-d-r-(s||0)),isNaN(u)&&(u=o-c-a-(l||0));var f=new Ge(r+i[3],a+i[0],h,u);return f.margin=i,f}function nc(t,e,i,n,o,r){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],h=o&&o.boundingMode||"all";if((r=r||t).x=t.x,r.y=t.y,!s&&!l)return!1;if("raw"===h)a="group"===t.type?new Ge(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(a=a.clone()).applyTransform(u)}var c=ic(j({width:a.width,height:a.height},e),i,n),d=s?c.x-a.x:0,p=l?c.y-a.y:0;return"raw"===h?(r.x=d,r.y=p):(r.x+=d,r.y+=p),r===t&&t.markRedraw(),!0}function oc(t){var e=t.layoutMode||t.constructor.layoutMode;return st(e)?e:e?{type:e}:null}function rc(t,e,i){var n=i&&i.ignoreSize;!it(n)&&(n=[n,n]);var o=a(Qu[0],0),r=a(Qu[1],1);function a(i,o){var r={},a=0,h={},u=0;if($u(i,(function(e){h[e]=t[e]})),$u(i,(function(t){s(e,t)&&(r[t]=h[t]=e[t]),l(r,t)&&a++,l(h,t)&&u++})),n[o])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&a){if(a>=2)return r;for(var c=0;c<i.length;c++){var d=i[c];if(!s(r,d)&&s(t,d)){r[d]=t[d];break}}return r}return h}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function h(t,e,i){$u(t,(function(t){e[t]=i[t]}))}h(Qu[0],t,o),h(Qu[1],t,r)}function ac(t){return sc({},t)}function sc(t,e){return e&&t&&$u(Ju,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}et(tc,"vertical"),et(tc,"horizontal");var lc=Br(),hc=function(t){function e(e,i,n){var o=t.call(this,e,i,n)||this;return o.uid=nu("ec_cpt_model"),o}return m(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,e){var i=oc(this),n=i?ac(t):{};G(t,e.getTheme().get(this.mainType)),G(t,this.getDefaultOption()),i&&rc(t,n,i)},e.prototype.mergeOption=function(t,e){G(this.option,t,!0);var i=oc(this);i&&rc(this.option,t,i)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t[Kr])}(t))return t.defaultOption;var e=lc(this);if(!e.defaultOption){for(var i=[],n=t;n;){var o=n.prototype.defaultOption;o&&i.push(o),n=n.superClass}for(var r={},a=i.length-1;a>=0;a--)r=G(r,i[a],!0);e.defaultOption=r}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var i=t+"Index",n=t+"Id";return Ur(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(eu);Qr(hc,eu),na(hc),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){var n=$r(t);e[n.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var r=$r(i).main;t.hasSubTypes(i)&&e[r]&&(o=e[r](n))}return o}}(hc),function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,e,n,o){if(t.length){var r=function(t){var e={},n=[];return q(t,(function(o){var r,a,s=i(e,o),l=function(t,e){var i=[];return q(t,(function(t){X(e,t)>=0&&i.push(t)})),i}(s.originalDeps=(r=o,a=[],q(hc.getClassesByMainType(r),(function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])})),a=K(a,(function(t){return $r(t).main})),"dataset"!==r&&X(a,"dataset")<=0&&a.unshift("dataset"),a),t);s.entryCount=l.length,0===s.entryCount&&n.push(o),q(l,(function(t){X(s.predecessor,t)<0&&s.predecessor.push(t);var n=i(e,t);X(n.successor,t)<0&&n.successor.push(o)}))})),{graph:e,noEntryList:n}}(e),a=r.graph,s=r.noEntryList,l={};for(q(t,(function(t){l[t]=!0}));s.length;){var h=s.pop(),u=a[h],c=!!l[h];c&&(n.call(o,h,u.originalDeps.slice()),delete l[h]),q(u.successor,c?p:d)}q(l,(function(){throw new Error("")}))}function d(t){a[t].entryCount--,0===a[t].entryCount&&s.push(t)}function p(t){l[t]=!0,d(t)}}}(hc);const uc=hc;var cc="";"undefined"!=typeof navigator&&(cc=navigator.platform||"");var dc="rgba(0, 0, 0, 0.2)";const pc={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:dc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:dc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:dc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:dc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:dc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:dc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:cc.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var fc=Tt(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),gc="original",mc="arrayRows",vc="objectRows",yc="keyedColumns",bc="typedArray",xc="unknown",wc="column",_c="row",Cc={Must:1,Might:2,Not:3},Sc=Br();function Mc(t,e,i){var n={},o=Ec(e);if(!o||!t)return n;var r,a,s=[],l=[],h=e.ecModel,u=Sc(h).datasetMap,c=o.uid+"_"+i.seriesLayoutBy;q(t=t.slice(),(function(e,i){var o=st(e)?e:t[i]={name:e};"ordinal"===o.type&&null==r&&(r=i,a=f(o)),n[o.name]=[]}));var d=u.get(c)||u.set(c,{categoryWayDim:a,valueWayDim:0});function p(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function f(t){var e=t.dimsDef;return e?e.length:1}return q(t,(function(t,e){var i=t.name,o=f(t);if(null==r){var a=d.valueWayDim;p(n[i],a,o),p(l,a,o),d.valueWayDim+=o}else r===e?(p(n[i],0,o),p(s,0,o)):(a=d.categoryWayDim,p(n[i],a,o),p(l,a,o),d.categoryWayDim+=o)})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n}function Tc(t,e,i){var n={};if(!Ec(t))return n;var o,r=e.sourceFormat,a=e.dimensionsDefine;r!==vc&&r!==yc||q(a,(function(t,e){"name"===(st(t)?t.name:t)&&(o=e)}));var s=function(){for(var t={},n={},s=[],l=0,h=Math.min(5,i);l<h;l++){var u=Dc(e.data,r,e.seriesLayoutBy,a,e.startIndex,l);s.push(u);var c=u===Cc.Not;if(c&&null==t.v&&l!==o&&(t.v=l),(null==t.n||t.n===t.v||!c&&s[t.n]===Cc.Not)&&(t.n=l),d(t)&&s[t.n]!==Cc.Not)return t;c||(u===Cc.Might&&null==n.v&&l!==o&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(n)?n:null}();if(s){n.value=[s.v];var l=null!=o?o:s.n;n.itemName=[l],n.seriesName=[l]}return n}function Ec(t){if(!t.get("data",!0))return Ur(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Gr).models[0]}function Ic(t,e){return Dc(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Dc(t,e,i,n,o,r){var a,s,l;if(ht(t))return Cc.Not;if(n){var h=n[r];st(h)?(s=h.name,l=h.type):ot(h)&&(s=h)}if(null!=l)return"ordinal"===l?Cc.Must:Cc.Not;if(e===mc){var u=t;if(i===_c){for(var c=u[r],d=0;d<(c||[]).length&&d<5;d++)if(null!=(a=b(c[o+d])))return a}else for(d=0;d<u.length&&d<5;d++){var p=u[o+d];if(p&&null!=(a=b(p[r])))return a}}else if(e===vc){var f=t;if(!s)return Cc.Not;for(d=0;d<f.length&&d<5;d++)if((v=f[d])&&null!=(a=b(v[s])))return a}else if(e===yc){var g=t;if(!s)return Cc.Not;if(!(c=g[s])||ht(c))return Cc.Not;for(d=0;d<c.length&&d<5;d++)if(null!=(a=b(c[d])))return a}else if(e===gc){var m=t;for(d=0;d<m.length&&d<5;d++){var v,y=Dr(v=m[d]);if(!it(y))return Cc.Not;if(null!=(a=b(y[r])))return a}}function b(t){var e=ot(t);return null!=t&&isFinite(t)&&""!==t?e?Cc.Might:Cc.Not:e&&"-"!==t?Cc.Must:void 0}return Cc.Not}var kc,Ac,Lc,Rc=Tt(),Pc=Br(),Oc=Br(),zc=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,i){var n=Tr(this.get("color",!0)),o=this.get("colorLayer",!0);return Bc(this,Pc,n,o,t,e,i)},t.prototype.clearColorPalette=function(){!function(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}(this,Pc)},t}();function Nc(t,e,i,n){var o=Tr(t.get(["aria","decal","decals"]));return Bc(t,Oc,o,null,e,i,n)}function Bc(t,e,i,n,o,r,a){var s=e(r=r||t),l=s.paletteIdx||0,h=s.paletteNameMap=s.paletteNameMap||{};if(h.hasOwnProperty(o))return h[o];var u=null!=a&&n?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(n,a):i;if((u=u||i)&&u.length){var c=u[l];return o&&(h[o]=c),s.paletteIdx=(l+1)%u.length,c}}var Fc="\0_ec_inner",Vc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.init=function(t,e,i,n,o,r){n=n||{},this.option=null,this._theme=new eu(n),this._locale=new eu(o),this._optionManager=r},e.prototype.setOption=function(t,e,i){var n=Wc(e);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Wc(e))},e.prototype._resetOption=function(t,e){var i=!1,n=this._optionManager;if(!t||"recreate"===t){var o=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(o,e)):Lc(this,o),i=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(i=!0,this._mergeOption(r,e))}if(!t||"recreate"===t||"media"===t){var a=n.getMediaOption(this);a.length&&q(a,(function(t){i=!0,this._mergeOption(t,e)}),this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var i=this.option,n=this._componentsMap,o=this._componentsCount,r=[],a=Tt(),s=e&&e.replaceMergeMainTypeMap;Sc(this).datasetMap=Tt(),q(t,(function(t,e){null!=t&&(uc.hasClass(e)?e&&(r.push(e),a.set(e,!0)):i[e]=null==i[e]?H(t):G(i[e],t,!0))})),s&&s.each((function(t,e){uc.hasClass(e)&&!a.get(e)&&(r.push(e),a.set(e,!0))})),uc.topologicalTravel(r,uc.getAllClassMainTypes(),(function(e){var r=function(t,e,i){var n=Rc.get(e);if(!n)return i;var o=n(t);return o?i.concat(o):i}(this,e,Tr(t[e])),a=n.get(e),l=Ar(a,r,a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll");(function(t,e,i){q(t,(function(t){var n=t.newOption;st(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,i,n){return e.type?e.type:i?i.subType:n.determineSubType(t,e)}(e,n,t.existing,i))}))})(l,e,uc),i[e]=null,n.set(e,null),o.set(e,0);var h,u=[],c=[],d=0;q(l,(function(t,i){var n=t.existing,o=t.newOption;if(o){var r="series"===e,a=uc.getClass(e,t.keyInfo.subType,!r);if(!a)return;if("tooltip"===e){if(h)return;h=!0}if(n&&n.constructor===a)n.name=t.keyInfo.name,n.mergeOption(o,this),n.optionUpdated(o,!1);else{var s=U({componentIndex:i},t.keyInfo);U(n=new a(o,this,this,s),s),t.brandNew&&(n.__requireNewView=!0),n.init(o,this,this),n.optionUpdated(null,!0)}}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(u.push(n.option),c.push(n),d++):(u.push(void 0),c.push(void 0))}),this),i[e]=u,n.set(e,c),o.set(e,d),"series"===e&&kc(this)}),this),this._seriesIndices||kc(this)},e.prototype.getOption=function(){var t=H(this.option);return q(t,(function(e,i){if(uc.hasClass(i)){for(var n=Tr(e),o=n.length,r=!1,a=o-1;a>=0;a--)n[a]&&!zr(n[a])?r=!0:(n[a]=null,!r&&o--);n.length=o,t[i]=n}})),delete t[Fc],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var i=this._componentsMap.get(t);if(i){var n=i[e||0];if(n)return n;if(null==e)for(var o=0;o<i.length;o++)if(i[o])return i[o]}},e.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,o=t.id,r=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=n?(i=[],q(Tr(n),(function(t){a[t]&&i.push(a[t])}))):i=null!=o?Hc("id",o,a):null!=r?Hc("name",r,a):J(a,(function(t){return!!t})),Gc(i,t)):[]},e.prototype.findComponents=function(t){var e,i,n,o,r,a=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",o=s+"Name",!(e=a)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:s,index:e[i],id:e[n],name:e[o]});return r=Gc(l?this.queryComponents(l):J(this._componentsMap.get(s),(function(t){return!!t})),t),t.filter?J(r,t.filter):r},e.prototype.eachComponent=function(t,e,i){var n=this._componentsMap;if(nt(t)){var o=e,r=t;n.each((function(t,e){for(var i=0;t&&i<t.length;i++){var n=t[i];n&&r.call(o,e,n,n.componentIndex)}}))}else for(var a=ot(t)?n.get(t):st(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(i,l,l.componentIndex)}},e.prototype.getSeriesByName=function(t){var e=Pr(t,null);return J(this._componentsMap.get("series"),(function(t){return!!t&&null!=e&&t.name===e}))},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return J(this._componentsMap.get("series"),(function(e){return!!e&&e.subType===t}))},e.prototype.getSeries=function(){return J(this._componentsMap.get("series"),(function(t){return!!t}))},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,e){Ac(this),q(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},e.prototype.eachRawSeries=function(t,e){q(this._componentsMap.get("series"),(function(i){i&&t.call(e,i,i.componentIndex)}))},e.prototype.eachSeriesByType=function(t,e,i){Ac(this),q(this._seriesIndices,(function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)}),this)},e.prototype.eachRawSeriesByType=function(t,e,i){return q(this.getSeriesByType(t),e,i)},e.prototype.isSeriesFiltered=function(t){return Ac(this),null==this._seriesIndicesMap.get(t.componentIndex)},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,e){Ac(this);var i=[];q(this._seriesIndices,(function(n){var o=this._componentsMap.get("series")[n];t.call(e,o,n)&&i.push(n)}),this),this._seriesIndices=i,this._seriesIndicesMap=Tt(i)},e.prototype.restoreData=function(t){kc(this);var e=this._componentsMap,i=[];e.each((function(t,e){uc.hasClass(e)&&i.push(e)})),uc.topologicalTravel(i,uc.getAllClassMainTypes(),(function(i){q(e.get(i),(function(e){!e||"series"===i&&function(t,e){if(e){var i=e.seriesIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}(e,t)||e.restoreData()}))}))},e.internalField=(kc=function(t){var e=t._seriesIndices=[];q(t._componentsMap.get("series"),(function(t){t&&e.push(t.componentIndex)})),t._seriesIndicesMap=Tt(e)},Ac=function(t){},void(Lc=function(t,e){t.option={},t.option[Fc]=1,t._componentsMap=Tt({series:[]}),t._componentsCount=Tt();var i=e.aria;st(i)&&null==i.enabled&&(i.enabled=!0),function(t,e){var i=t.color&&!t.colorLayer;q(e,(function(e,n){"colorLayer"===n&&i||uc.hasClass(n)||("object"==typeof e?t[n]=t[n]?G(t[n],e,!1):H(e):null==t[n]&&(t[n]=e))}))}(e,t._theme.option),G(e,pc,!1),t._mergeOption(e,null)})),e}(eu);function Hc(t,e,i){if(it(e)){var n=Tt();return q(e,(function(t){null!=t&&null!=Pr(t,null)&&n.set(t,!0)})),J(i,(function(e){return e&&n.get(e[t])}))}var o=Pr(e,null);return J(i,(function(e){return e&&null!=o&&e[t]===o}))}function Gc(t,e){return e.hasOwnProperty("subType")?J(t,(function(t){return t&&t.subType===e.subType})):t}function Wc(t){var e=Tt();return t&&q(Tr(t.replaceMerge),(function(t){e.set(t,!0)})),{replaceMergeMainTypeMap:e}}Y(Vc,zc);const Uc=Vc;var jc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const Xc=function(t){q(jc,(function(e){this[e]=tt(t[e],t)}),this)};var Yc={},Zc=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var i=[];q(Yc,(function(n,o){var r=n.create(t,e);i=i.concat(r||[])})),this._coordinateSystems=i},t.prototype.update=function(t,e){q(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){Yc[t]=e},t.get=function(t){return Yc[t]},t}();const qc=Zc;var Kc=/^(min|max)?(.+)$/,$c=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,i){t&&(q(Tr(t.series),(function(t){t&&t.data&&ht(t.data)&&wt(t.data)})),q(Tr(t.dataset),(function(t){t&&t.source&&ht(t.source)&&wt(t.source)}))),t=H(t);var n=this._optionBackup,o=function(t,e,i){var n,o,r=[],a=t.baseOption,s=t.timeline,l=t.options,h=t.media,u=!!t.media,c=!!(l||s||a&&a.timeline);function d(t){q(e,(function(e){e(t,i)}))}return a?(o=a).timeline||(o.timeline=s):((c||u)&&(t.options=t.media=null),o=t),u&&it(h)&&q(h,(function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})),d(o),q(l,(function(t){return d(t)})),q(r,(function(t){return d(t.option)})),{baseOption:o,timelineOptions:l||[],mediaDefault:n,mediaList:r}}(t,e,!n);this._newBaseOption=o.baseOption,n?(o.timelineOptions.length&&(n.timelineOptions=o.timelineOptions),o.mediaList.length&&(n.mediaList=o.mediaList),o.mediaDefault&&(n.mediaDefault=o.mediaDefault)):this._optionBackup=o},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],H(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=H(i[n.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,i,n=this._api.getWidth(),o=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!r.length&&!a)return l;for(var h=0,u=r.length;h<u;h++)Jc(r[h].query,n,o)&&s.push(h);return!s.length&&a&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=K(s,(function(t){return H(-1===t?a.option:r[t].option)}))),this._currentMediaIndices=s,l},t}();function Jc(t,e,i){var n={width:e,height:i,aspectratio:e/i},o=!0;return q(t,(function(t,e){var i=e.match(Kc);if(i&&i[1]&&i[2]){var r=i[1],a=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[a],t,r)||(o=!1)}})),o}const Qc=$c;var td=q,ed=st,id=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function nd(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=id.length;i<n;i++){var o=id[i],r=e.normal,a=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?G(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(t[o]=t[o]||{},t[o].emphasis?G(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function od(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,j(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o,o.focus&&(t.emphasis.focus=o.focus),o.blurScope&&(t.emphasis.blurScope=o.blurScope))}}function rd(t){od(t,"itemStyle"),od(t,"lineStyle"),od(t,"areaStyle"),od(t,"label"),od(t,"labelLine"),od(t,"upperLabel"),od(t,"edgeLabel")}function ad(t,e){var i=ed(t)&&t[e],n=ed(i)&&i.textStyle;if(n)for(var o=0,r=Ir.length;o<r;o++){var a=Ir[o];n.hasOwnProperty(a)&&(i[a]=n[a])}}function sd(t){t&&(rd(t),ad(t,"label"),t.emphasis&&ad(t.emphasis,"label"))}function ld(t){return it(t)?t:t?[t]:[]}function hd(t){return(it(t)?t[0]:t)||{}}function ud(t){t&&q(cd,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var cd=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],dd=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],pd=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function fd(t){var e=t&&t.itemStyle;if(e)for(var i=0;i<pd.length;i++){var n=pd[i][1],o=pd[i][0];null!=e[n]&&(e[o]=e[n])}}function gd(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function md(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function vd(t,e){if(t)for(var i=0;i<t.length;i++)e(t[i]),t[i]&&vd(t[i].children,e)}function yd(t,e){(function(t,e){td(ld(t.series),(function(t){ed(t)&&function(t){if(ed(t)){nd(t),rd(t),ad(t,"label"),ad(t,"upperLabel"),ad(t,"edgeLabel"),t.emphasis&&(ad(t.emphasis,"label"),ad(t.emphasis,"upperLabel"),ad(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(nd(e),sd(e));var i=t.markLine;i&&(nd(i),sd(i));var n=t.markArea;n&&sd(n);var o=t.data;if("graph"===t.type){o=o||t.nodes;var r=t.links||t.edges;if(r&&!ht(r))for(var a=0;a<r.length;a++)sd(r[a]);q(t.categories,(function(t){rd(t)}))}if(o&&!ht(o))for(a=0;a<o.length;a++)sd(o[a]);if((e=t.markPoint)&&e.data){var s=e.data;for(a=0;a<s.length;a++)sd(s[a])}if((i=t.markLine)&&i.data){var l=i.data;for(a=0;a<l.length;a++)it(l[a])?(sd(l[a][0]),sd(l[a][1])):sd(l[a])}"gauge"===t.type?(ad(t,"axisLabel"),ad(t,"title"),ad(t,"detail")):"treemap"===t.type?(od(t.breadcrumb,"itemStyle"),q(t.levels,(function(t){rd(t)}))):"tree"===t.type&&rd(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),td(i,(function(e){td(ld(t[e]),(function(t){t&&(ad(t,"axisLabel"),ad(t.axisPointer,"label"))}))})),td(ld(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;ad(e,"axisLabel"),ad(e&&e.axisPointer,"label")})),td(ld(t.calendar),(function(t){od(t,"itemStyle"),ad(t,"dayLabel"),ad(t,"monthLabel"),ad(t,"yearLabel")})),td(ld(t.radar),(function(t){ad(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),td(ld(t.geo),(function(t){ed(t)&&(sd(t),td(ld(t.regions),(function(t){sd(t)})))})),td(ld(t.timeline),(function(t){sd(t),od(t,"label"),od(t,"itemStyle"),od(t,"controlStyle",!0);var e=t.data;it(e)&&q(e,(function(t){st(t)&&(od(t,"label"),od(t,"itemStyle"))}))})),td(ld(t.toolbox),(function(t){od(t,"iconStyle"),td(t.feature,(function(t){od(t,"iconStyle")}))})),ad(hd(t.axisPointer),"label"),ad(hd(t.tooltip).axisPointer,"label")})(t,e),t.series=Tr(t.series),q(t.series,(function(t){if(st(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),gd(t.label),(o=t.data)&&!ht(o))for(var i=0;i<o.length;i++)gd(o[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var n=function(t,e){for(var i="pointer.color".split(","),n=t,o=0;o<i.length&&null!=(n=n&&n[i[o]]);o++);return n}(t);null!=n&&function(t,e,i,n){for(var o,r="itemStyle.color".split(","),a=t,s=0;s<r.length-1;s++)null==a[o=r[s]]&&(a[o]={}),a=a[o];null==a[r[s]]&&(a[r[s]]=i)}(t,0,n)}else if("bar"===e){var o;if(fd(t),fd(t.backgroundStyle),fd(t.emphasis),(o=t.data)&&!ht(o))for(i=0;i<o.length;i++)"object"==typeof o[i]&&(fd(o[i]),fd(o[i]&&o[i].emphasis))}else if("sunburst"===e){var r=t.highlightPolicy;r&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=r)),md(t),vd(t.data,md)}else"graph"===e||"sankey"===e?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&j(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),ud(t)}})),t.dataRange&&(t.visualMap=t.dataRange),q(dd,(function(e){var i=t[e];i&&(it(i)||(i=[i]),q(i,(function(t){ud(t)})))}))}function bd(t){q(t,(function(e,i){var n=[],o=[NaN,NaN],r=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(r,(function(r,h,u){var c,d,p=a.get(e.stackedDimension,u);if(isNaN(p))return o;s?d=a.getRawIndex(u):c=a.get(e.stackedByDimension,u);for(var f=NaN,g=i-1;g>=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=lr(p,v),f=v;break}}}return n[0]=p,n[1]=f,n}))}))}var xd,wd,_d,Cd,Sd,Md=function(t){this.data=t.data||(t.sourceFormat===yc?{}:[]),this.sourceFormat=t.sourceFormat||xc,this.seriesLayoutBy=t.seriesLayoutBy||wc,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];null==n.type&&Ic(this,i)===Cc.Must&&(n.type="ordinal")}};function Td(t){return t instanceof Md}function Ed(t,e,i){i=i||Dd(t);var n=e.seriesLayoutBy,o=function(t,e,i,n,o){var r,a;if(!t)return{dimensionsDefine:kd(o),startIndex:a,dimensionsDetectedCount:r};if(e===mc){var s=t;"auto"===n||null==n?Ad((function(t){null!=t&&"-"!==t&&(ot(t)?null==a&&(a=1):a=0)}),i,s,10):a=at(n)?n:n?1:0,o||1!==a||(o=[],Ad((function(t,e){o[e]=null!=t?t+"":""}),i,s,1/0)),r=o?o.length:i===_c?s.length:s[0]?s[0].length:null}else if(e===vc)o||(o=function(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e)return Q(e)}(t));else if(e===yc)o||(o=[],q(t,(function(t,e){o.push(e)})));else if(e===gc){var l=Dr(t[0]);r=it(l)&&l.length||1}return{startIndex:a,dimensionsDefine:kd(o),dimensionsDetectedCount:r}}(t,i,n,e.sourceHeader,e.dimensions);return new Md({data:t,sourceFormat:i,seriesLayoutBy:n,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:H(e)})}function Id(t){return new Md({data:t,sourceFormat:ht(t)?bc:gc})}function Dd(t){var e=xc;if(ht(t))e=bc;else if(it(t)){0===t.length&&(e=mc);for(var i=0,n=t.length;i<n;i++){var o=t[i];if(null!=o){if(it(o)){e=mc;break}if(st(o)){e=vc;break}}}}else if(st(t))for(var r in t)if(kt(t,r)&&Z(t[r])){e=yc;break}return e}function kd(t){if(t){var e=Tt();return K(t,(function(t,i){var n={name:(t=st(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==n.name)return n;n.name+="",null==n.displayName&&(n.displayName=n.name);var o=e.get(n.name);return o?n.name+="-"+o.count++:e.set(n.name,{count:1}),n}))}}function Ad(t,e,i,n){if(e===_c)for(var o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else{var r=i[0]||[];for(o=0;o<r.length&&o<n;o++)t(r[o],o)}}function Ld(t){var e=t.sourceFormat;return e===vc||e===yc}var Rd=function(){function t(t,e){var i=Td(t)?t:Id(t);this._source=i;var n=this._data=i.data;i.sourceFormat===bc&&(this._offset=0,this._dimSize=e,this._data=n),Sd(this,n,i)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var t;Sd=function(t,o,r){var a=r.sourceFormat,s=r.seriesLayoutBy,l=r.startIndex,h=r.dimensionsDefine;if(U(t,Cd[Wd(a,s)]),a===bc)t.getItem=e,t.count=n,t.fillStorage=i;else{var u=zd(a,s);t.getItem=tt(u,null,o,l,h);var c=Fd(a,s);t.count=tt(c,null,o,l,h)}};var e=function(t,e){t-=this._offset,e=e||[];for(var i=this._data,n=this._dimSize,o=n*t,r=0;r<n;r++)e[r]=i[o+r];return e},i=function(t,e,i,n){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=n[a],l=null==s[0]?1/0:s[0],h=null==s[1]?-1/0:s[1],u=e-t,c=i[a],d=0;d<u;d++){var p=o[d*r+a];c[t+d]=p,p<l&&(l=p),p>h&&(h=p)}s[0]=l,s[1]=h}},n=function(){return this._data?this._data.length/this._dimSize:0};function o(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[mc+"_"+wc]={pure:!0,appendData:o},t[mc+"_"+_c]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[vc]={pure:!0,appendData:o},t[yc]={pure:!0,appendData:function(t){var e=this._data;q(t,(function(t,i){for(var n=e[i]||(e[i]=[]),o=0;o<(t||[]).length;o++)n.push(t[o])}))}},t[gc]={appendData:o},t[bc]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},Cd=t}(),t}(),Pd=function(t,e,i,n){return t[n]},Od=((xd={})[mc+"_"+wc]=function(t,e,i,n){return t[n+e]},xd[mc+"_"+_c]=function(t,e,i,n,o){n+=e;for(var r=o||[],a=t,s=0;s<a.length;s++){var l=a[s];r[s]=l?l[n]:null}return r},xd[vc]=Pd,xd[yc]=function(t,e,i,n,o){for(var r=o||[],a=0;a<i.length;a++){var s=t[i[a].name];r[a]=s?s[n]:null}return r},xd[gc]=Pd,xd);function zd(t,e){return Od[Wd(t,e)]}var Nd=function(t,e,i){return t.length},Bd=((wd={})[mc+"_"+wc]=function(t,e,i){return Math.max(0,t.length-e)},wd[mc+"_"+_c]=function(t,e,i){var n=t[0];return n?Math.max(0,n.length-e):0},wd[vc]=Nd,wd[yc]=function(t,e,i){var n=t[i[0].name];return n?n.length:0},wd[gc]=Nd,wd);function Fd(t,e){return Bd[Wd(t,e)]}var Vd=function(t,e,i){return t[e]},Hd=((_d={})[mc]=Vd,_d[vc]=function(t,e,i){return t[i]},_d[yc]=Vd,_d[gc]=function(t,e,i){var n=Dr(t);return n instanceof Array?n[e]:n},_d[bc]=Vd,_d);function Gd(t){return Hd[t]}function Wd(t,e){return t===mc?t+"_"+e:t}function Ud(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o=t.getStore(),r=o.getSource().sourceFormat;if(null!=i){var a=t.getDimensionIndex(i),s=o.getDimensionProperty(a);return Gd(r)(n,a,s)}var l=n;return r===gc&&(l=Dr(n)),l}}}var jd=/\{@(.+?)\}/g,Xd=function(){function t(){}return t.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),r=i.getName(t),a=i.getRawDataItem(t),s=i.getItemVisual(t,"style"),l=s&&s[i.getItemVisual(t,"drawType")||"fill"],h=s&&s.stroke,u=this.mainType,c="series"===u,d=i.userOutput&&i.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:n,color:l,borderColor:h,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,i,n,o,r){e=e||"normal";var a=this.getData(i),s=this.getDataParams(t,i);return r&&(s.value=r.interpolatedValue),null!=n&&it(s.value)&&(s.value=s.value[n]),o||(o=a.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"])),nt(o)?(s.status=e,s.dimensionIndex=n,o(s)):ot(o)?Zu(o,s).replace(jd,(function(e,i){var n=i.length,o=i;"["===o.charAt(0)&&"]"===o.charAt(n-1)&&(o=+o.slice(1,n-1));var s=Ud(a,t,o);if(r&&it(r.interpolatedValue)){var l=a.getDimensionIndex(o);l>=0&&(s=r.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return Ud(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,i){},t}();function Yd(t){var e,i;return st(t)?t.type&&(i=t):e=t,{text:e,frag:i}}function Zd(t){return new qd(t)}var qd=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var r,a=u(this._modBy),s=this._modDataCount||0,l=u(t&&t.modBy),h=t&&t.modDataCount||0;function u(t){return!(t>=1)&&(t=1),t}a===l&&s===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,r=this._doReset(n)),this._modBy=l,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(r||d<p)){var f=this._progress;if(it(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],d,p,l,h);else this._doProgress(f,d,p,l,h)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,i,n,o){Kd.reset(e,i,n,o),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:Kd.next},this.context)},t.prototype._doReset=function(t){var e,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(i=e.forceFirstProgress,e=e.progress),it(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),Kd=function(){var t,e,i,n,o,r={reset:function(l,h,u,c){e=l,t=h,i=u,n=c,o=Math.ceil(n/i),r.next=i>1&&n>0?s:a}};return r;function a(){return e<t?e++:null}function s(){var r=e%o*i+Math.ceil(e/o),a=e>=t?null:r<n?r:e;return e++,a}}();function $d(t){throw new Error(t)}function Jd(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||at(t)||null==t||"-"===t||(t=+pr(t)),null==t||""===t?NaN:+t)}"undefined"!=typeof console&&console.warn&&console.log;var Qd=Tt({number:function(t){return parseFloat(t)},time:function(t){return+pr(t)},trim:function(t){return ot(t)?bt(t):t}});function tp(t){return Qd.get(t)}var ep={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},ip=function(){function t(t,e){at(e)||$d(""),this._opFn=ep[t],this._rvalFloat=yr(e)}return t.prototype.evaluate=function(t){return at(t)?this._opFn(t,this._rvalFloat):this._opFn(yr(t),this._rvalFloat)},t}(),np=function(){function t(t,e){var i="desc"===t;this._resultLT=i?1:-1,null==e&&(e=i?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var i=at(t)?t:yr(t),n=at(e)?e:yr(e),o=isNaN(i),r=isNaN(n);if(o&&(i=this._incomparable),r&&(n=this._incomparable),o&&r){var a=ot(t),s=ot(e);a&&(i=s?t:0),s&&(n=a?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},t}(),op=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=yr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i===this._rvalTypeof||"number"!==i&&"number"!==this._rvalTypeof||(e=yr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function rp(t,e){return"eq"===t||"ne"===t?new op("eq"===t,e):kt(ep,t)?new ip(t,e):null}var ap=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Jd(t,e)},t}();function sp(t){return pp(t.sourceFormat)||$d(""),t.data}function lp(t){var e=t.sourceFormat,i=t.data;if(pp(e)||$d(""),e===mc){for(var n=[],o=0,r=i.length;o<r;o++)n.push(i[o].slice());return n}if(e===vc){for(n=[],o=0,r=i.length;o<r;o++)n.push(U({},i[o]));return n}}function hp(t,e,i){if(null!=i)return at(i)||!isNaN(i)&&!kt(e,i)?t[i]:kt(e,i)?e[i]:void 0}function up(t){return H(t)}var cp=Tt();function dp(t,e,i,n){e.length||$d(""),st(t)||$d("");var o=t.type,r=cp.get(o);r||$d("");var a=K(e,(function(t){return function(t,e){var i=new ap,n=t.data,o=i.sourceFormat=t.sourceFormat,r=t.startIndex;t.seriesLayoutBy!==wc&&$d("");var a=[],s={},l=t.dimensionsDefine;if(l)q(l,(function(t,e){var i=t.name,n={index:e,name:i,displayName:t.displayName};a.push(n),null!=i&&(kt(s,i)&&$d(""),s[i]=n)}));else for(var h=0;h<t.dimensionsDetectedCount;h++)a.push({index:h});var u=zd(o,wc);e.__isBuiltIn&&(i.getRawDataItem=function(t){return u(n,r,a,t)},i.getRawData=tt(sp,null,t)),i.cloneRawData=tt(lp,null,t);var c=Fd(o,wc);i.count=tt(c,null,n,r,a);var d=Gd(o);i.retrieveValue=function(t,e){var i=u(n,r,a,t);return p(i,e)};var p=i.retrieveValueFromItem=function(t,e){if(null!=t){var i=a[e];return i?d(t,e,i.name):void 0}};return i.getDimensionInfo=tt(hp,null,a,s),i.cloneAllDimensionInfo=tt(up,null,a),i}(t,r)}));return K(Tr(r.transform({upstream:a[0],upstreamList:a,config:H(t.config)})),(function(t,i){var n;st(t)||$d(""),t.data||$d(""),pp(Dd(t.data))||$d("");var o=e[0];if(o&&0===i&&!t.dimensions){var r=o.startIndex;r&&(t.data=o.data.slice(0,r).concat(t.data)),n={seriesLayoutBy:wc,sourceHeader:r,dimensions:o.metaRawOption.dimensions}}else n={seriesLayoutBy:wc,sourceHeader:0,dimensions:t.dimensions};return Ed(t.data,n,null)}))}function pp(t){return t===mc||t===vc}var fp,gp="undefined",mp=typeof Uint32Array===gp?Array:Uint32Array,vp=typeof Uint16Array===gp?Array:Uint16Array,yp=typeof Int32Array===gp?Array:Int32Array,bp=typeof Float64Array===gp?Array:Float64Array,xp={float:bp,int:yp,ordinal:Array,number:Array,time:bp};function wp(t){return t>65535?mp:vp}function _p(t,e,i,n,o){var r=xp[i||"float"];if(o){var a=t[e],s=a&&a.length;if(s!==n){for(var l=new r(n),h=0;h<s;h++)l[h]=a[h];t[e]=l}}else t[e]=new r(n)}var Cp=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Tt()}return t.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),o=this.defaultDimValueGetter=fp[n.sourceFormat];this._dimValueGetter=i||o,this._rawExtent=[],Ld(n),this._dimensions=K(e,(function(t){return{type:t.type,property:t.property}})),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,o=i.get(t);if(null!=o){if(n[o].type===e)return o}else o=n.length;return n[o]={type:e},i.set(t,o),this._chunks[o]=new xp[e||"float"](this._rawCount),this._rawExtent[o]=[1/0,-1/0],o},t.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],o=this._rawExtent,r=n.ordinalOffset||0,a=i.length;0===r&&(o[t]=[1/0,-1/0]);for(var s=o[t],l=r;l<a;l++){var h=i[l]=e.parseAndCollect(i[l]);isNaN(h)||(s[0]=Math.min(h,s[0]),s[1]=Math.max(h,s[1]))}n.ordinalMeta=e,n.ordinalOffset=a,n.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},t.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,o=n.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<o;l++)_p(i,l,(p=n[l]).type,s,!0);for(var h=[],u=a;u<s;u++)for(var c=u-a,d=0;d<o;d++){var p=n[d],f=fp.arrayRows.call(this,t[c]||h,p.property,c,d);i[d][u]=f;var g=r[d];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=K(r,(function(t){return t.property})),h=0;h<a;h++){var u=r[h];s[h]||(s[h]=[1/0,-1/0]),_p(o,h,u.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,o,s);else for(var c=[],d=t;d<e;d++){c=n.getItem(d,c);for(var p=0;p<a;p++){var f=o[p],g=this._dimValueGetter(c,l[p],d,p);f[d]=g;var m=s[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},t.prototype.getValues=function(t,e){var i=[],n=[];if(null==e){e=t,t=[];for(var o=0;o<this._dimensions.length;o++)n.push(o)}else n=t;o=0;for(var r=n.length;o<r;o++)i.push(this.get(n[o],e));return i},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},t.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},t.prototype.getMedian=function(t){var e=[];this.each([t],(function(t){isNaN(t)||e.push(t)}));var i=e.sort((function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var r=(n+o)/2|0;if(e[r]<t)n=r+1;else{if(!(e[r]>t))return r;o=r-1}}return-1},t.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks[t],o=[];if(!n)return o;null==i&&(i=1/0);for(var r=1/0,a=-1,s=0,l=0,h=this.count();l<h;l++){var u=e-n[this.getRawIndex(l)],c=Math.abs(u);c<=i&&((c<r||c===r&&u>=0&&a<0)&&(r=c,a=u,s=0),u===a&&(o[s++]=l))}return o.length=s,o},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var o=0;o<n;o++)t[o]=e[o]}else t=new i(e.buffer,0,n)}else for(t=new(i=wp(this._rawCount))(this.count()),o=0;o<t.length;o++)t[o]=o;return t},t.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),o=new(wp(i._rawCount))(n),r=[],a=t.length,s=0,l=t[0],h=i._chunks,u=0;u<n;u++){var c=void 0,d=i.getRawIndex(u);if(0===a)c=e(u);else if(1===a)c=e(h[l][d],u);else{for(var p=0;p<a;p++)r[p]=h[t[p]][d];r[p]=u,c=e.apply(null,r)}c&&(o[s++]=d)}return s<n&&(i._indices=o),i._count=s,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=Q(t),o=n.length;if(!o)return this;var r=e.count(),a=new(wp(e._rawCount))(r),s=0,l=n[0],h=t[l][0],u=t[l][1],c=e._chunks,d=!1;if(!e._indices){var p=0;if(1===o){for(var f=c[n[0]],g=0;g<i;g++)((b=f[g])>=h&&b<=u||isNaN(b))&&(a[s++]=p),p++;d=!0}else if(2===o){f=c[n[0]];var m=c[n[1]],v=t[n[1]][0],y=t[n[1]][1];for(g=0;g<i;g++){var b=f[g],x=m[g];(b>=h&&b<=u||isNaN(b))&&(x>=v&&x<=y||isNaN(x))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===o)for(g=0;g<r;g++){var w=e.getRawIndex(g);((b=c[n[0]][w])>=h&&b<=u||isNaN(b))&&(a[s++]=w)}else for(g=0;g<r;g++){for(var _=!0,C=(w=e.getRawIndex(g),0);C<o;C++){var S=n[C];((b=c[S][w])<t[S][0]||b>t[S][1])&&(_=!1)}_&&(a[s++]=e.getRawIndex(g))}return s<r&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,i){for(var n=t._chunks,o=[],r=e.length,a=t.count(),s=[],l=t._rawExtent,h=0;h<e.length;h++)l[e[h]]=[1/0,-1/0];for(var u=0;u<a;u++){for(var c=t.getRawIndex(u),d=0;d<r;d++)s[d]=n[e[d]][c];s[r]=u;var p=i&&i.apply(null,s);if(null!=p)for("object"!=typeof p&&(o[0]=p,p=o),h=0;h<p.length;h++){var f=e[h],g=p[h],m=l[f],v=n[f];v&&(v[c]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}},t.prototype.lttbDownSample=function(t,e){var i,n,o,r=this.clone([t],!0),a=r._chunks[t],s=this.count(),l=0,h=Math.floor(1/e),u=this.getRawIndex(0),c=new(wp(this._rawCount))(Math.min(2*(Math.ceil(s/h)+2),s));c[l++]=u;for(var d=1;d<s-1;d+=h){for(var p=Math.min(d+h,s-1),f=Math.min(d+2*h,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=a[M=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-p;var b=d,x=Math.min(d+h,s),w=d-1,_=a[u];i=-1,o=b;var C=-1,S=0;for(v=b;v<x;v++){var M;y=a[M=this.getRawIndex(v)],isNaN(y)?(S++,C<0&&(C=M)):(n=Math.abs((w-g)*(y-_)-(w-v)*(m-_)))>i&&(i=n,o=M)}S>0&&S<x-b&&(c[l++]=Math.min(C,o),o=Math.max(C,o)),c[l++]=o,u=o}return c[l++]=this.getRawIndex(s-1),r._count=l,r._indices=c,r.getRawIndex=this._getRawIdx,r},t.prototype.downSample=function(t,e,i,n){for(var o=this.clone([t],!0),r=o._chunks,a=[],s=Math.floor(1/e),l=r[t],h=this.count(),u=o._rawExtent[t]=[1/0,-1/0],c=new(wp(this._rawCount))(Math.ceil(h/s)),d=0,p=0;p<h;p+=s){s>h-p&&(s=h-p,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=i(a),v=this.getRawIndex(Math.min(p+n(a,m)||0,h-1));l[v]=m,m<u[0]&&(u[0]=m),m>u[1]&&(u[1]=m),c[d++]=v}return o._count=d,o._indices=c,o._updateGetRawIdx(),o},t.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(i){case 0:e(o);break;case 1:e(n[t[0]][a],o);break;case 2:e(n[t[0]][a],n[t[1]][a],o);break;default:for(var s=0,l=[];s<i;s++)l[s]=n[t[s]][a];l[s]=o,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e=this._chunks[t],i=[1/0,-1/0];if(!e)return i;var n,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var r=(n=i)[0],a=n[1],s=0;s<o;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),l>a&&(a=l)}return n=[r,a],this._extent[t]=n,n},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,o=0;o<n.length;o++)i.push(n[o][e]);return i},t.prototype.clone=function(e,i){var n,o,r=new t,a=this._chunks,s=e&&$(e,(function(t,e){return t[e]=!0,t}),{});if(s)for(var l=0;l<a.length;l++)r._chunks[l]=s[l]?(o=void 0,(o=(n=a[l]).constructor)===Array?n.slice():new o(n)):a[l];else r._chunks=a;return this._copyCommonProps(r),i||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=H(this._extent),t._rawExtent=H(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,i,n){return Jd(t[n],this._dimensions[n])}fp={arrayRows:t,objectRows:function(t,e,i,n){return Jd(t[e],this._dimensions[n])},keyedColumns:t,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return Jd(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,e,i,n){return t[n]}}}(),t}();const Sp=Cp;var Mp=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,i=this._sourceHost,n=this._getUpstreamSourceManagers(),o=!!n.length;if(Ep(i)){var r=i,a=void 0,s=void 0,l=void 0;if(o){var h=n[0];h.prepareSource(),a=(l=h.getSource()).data,s=l.sourceFormat,e=[h._getVersionSign()]}else s=ht(a=r.get("data",!0))?bc:gc,e=[];var u=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},d=ft(u.seriesLayoutBy,c.seriesLayoutBy)||null,p=ft(u.sourceHeader,c.sourceHeader),f=ft(u.dimensions,c.dimensions);t=d!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||f?[Ed(a,{seriesLayoutBy:d,sourceHeader:p,dimensions:f},s)]:[]}else{var g=i;if(o){var m=this._applyTransform(n);t=m.sourceList,e=m.upstreamSignList}else t=[Ed(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,i=this._sourceHost,n=i.get("transform",!0),o=i.get("fromTransformResult",!0);null!=o&&1!==t.length&&Ip("");var r,a=[],s=[];return q(t,(function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Ip(""),a.push(e),s.push(t._getVersionSign())})),n?e=function(t,e,i){var n=Tr(t),o=n.length;o||$d("");for(var r=0,a=o;r<a;r++)e=dp(n[r],e),r!==a-1&&(e.length=Math.max(e.length,1));return e}(n,a,i.componentIndex):null!=o&&(e=[(r=a[0],new Md({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:H(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount}))]),{sourceList:e,upstreamSignList:s}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},t.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},t.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},t.prototype._innerGetDataStore=function(t,e,i){var n=this._storeList,o=n[0];o||(o=n[0]={});var r=o[i];if(!r){var a=this._getUpstreamSourceManagers()[0];Ep(this._sourceHost)&&a?r=a._innerGetDataStore(t,e,i):(r=new Sp).initData(new Rd(e,t.length),t),o[i]=r}return r},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Ep(t)){var e=Ec(t);return e?[e.getSourceManager()]:[]}return K(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?Ur(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Gr).models:[]}(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,e,i,n=this._sourceHost;if(Ep(n))t=n.get("seriesLayoutBy",!0),e=n.get("sourceHeader",!0),i=n.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=n;t=o.get("seriesLayoutBy",!0),e=o.get("sourceHeader",!0),i=o.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:i}},t}();function Tp(t){t.option.transform&&wt(t.option.transform)}function Ep(t){return"series"===t.mainType}function Ip(t){throw new Error(t)}var Dp="line-height:1";function kp(t,e){var i=t.color||"#6e7079",n=t.fontSize||12,o=t.fontWeight||"400",r=t.color||"#464646",a=t.fontSize||14,s=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+ue(n+"")+"px;color:"+ue(i)+";font-weight:"+ue(o+""),valueStyle:"font-size:"+ue(a+"")+"px;color:"+ue(r)+";font-weight:"+ue(s+"")}:{nameStyle:{fontSize:n,fill:i,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:s}}}var Ap=[0,10,20,30],Lp=["","\n","\n\n","\n\n\n"];function Rp(t,e){return e.type=t,e}function Pp(t){return"section"===t.type}function Op(t){return Pp(t)?Np:Bp}function zp(t){if(Pp(t)){var e=0,i=t.blocks.length,n=i>1||i>0&&!t.noHeader;return q(t.blocks,(function(t){var i=zp(t);i>=e&&(e=i+ +(n&&(!i||Pp(t)&&!t.noHeader)))})),e}return 0}function Np(t,e,i,n){var o,r=e.noHeader,a=(o=zp(e),{html:Ap[o],richText:Lp[o]}),s=[],l=e.blocks||[];yt(!l||it(l)),l=l||[];var h=t.orderMode;if(e.sortBlocks&&h){l=l.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(kt(u,h)){var c=new np(u[h],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===h&&l.reverse()}q(l,(function(i,o){var r=e.valueFormatter,l=Op(i)(r?U(U({},t),{valueFormatter:r}):t,i,o>0?a.html:0,n);null!=l&&s.push(l)}));var d="richText"===t.renderMode?s.join(a.richText):Vp(s.join(""),r?i:a.html);if(r)return d;var p=ju(e.header,"ordinal",t.useUTC),f=kp(n,t.renderMode).nameStyle;return"richText"===t.renderMode?Hp(t,p,f)+a.richText+d:Vp('<div style="'+f+";"+Dp+';">'+ue(p)+"</div>"+d,i)}function Bp(t,e,i,n){var o=t.renderMode,r=e.noName,a=e.noValue,s=!e.markerType,l=e.name,h=t.useUTC,u=e.valueFormatter||t.valueFormatter||function(t){return K(t=it(t)?t:[t],(function(t,e){return ju(t,it(p)?p[e]:p,h)}))};if(!r||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),d=r?"":ju(l,"ordinal",h),p=e.valueType,f=a?[]:u(e.value),g=!s||!r,m=!s&&r,v=kp(n,o),y=v.nameStyle,b=v.valueStyle;return"richText"===o?(s?"":c)+(r?"":Hp(t,d,y))+(a?"":function(t,e,i,n,o){var r=[o],a=n?10:20;return i&&r.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(it(e)?e.join(" "):e,r)}(t,f,g,m,b)):Vp((s?"":c)+(r?"":function(t,e,i){return'<span style="'+i+";"+(e?"margin-left:2px":"")+'">'+ue(t)+"</span>"}(d,!s,y))+(a?"":function(t,e,i,n){return'<span style="'+(e?"float:right;margin-left:"+(i?"10px":"20px"):"")+";"+n+'">'+K(t=it(t)?t:[t],(function(t){return ue(t)})).join(" ")+"</span>"}(f,g,m,b)),i)}}function Fp(t,e,i,n,o,r){if(t)return Op(t)({useUTC:o,renderMode:i,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Vp(t,e){return'<div style="margin: '+e+"px 0 0;"+Dp+';">'+t+'<div style="clear:both"></div></div>'}function Hp(t,e,i){return t.markupStyleCreator.wrapRichTextStyle(e,i)}function Gp(t,e){return qu(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Wp(t,e){var i=t.get("padding");return null!=i?i:"richText"===e?[8,10]:10}var Up=function(){function t(){this.richTextStyles={},this._nextStyleNameId=xr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,i){var n="richText"===i?this._generateStyleName():null,o=function(t,e){var i=ot(t)?{color:t,extraCssText:e}:t||{},n=i.color,o=i.type;e=i.extraCssText;var r=i.renderMode||"html";return n?"html"===r?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+ue(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+ue(n)+";"+(e||"")+'"></span>':{renderMode:r,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}({color:e,type:t,renderMode:i,markerId:n});return ot(o)?o:(this.richTextStyles[n]=o.style,o.content)},t.prototype.wrapRichTextStyle=function(t,e){var i={};it(e)?q(e,(function(t){return U(i,t)})):U(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},t}();function jp(t){var e,i,n,o,r=t.series,a=t.dataIndex,s=t.multipleSeries,l=r.getData(),h=l.mapDimensionsAll("defaultedTooltip"),u=h.length,c=r.getRawValue(a),d=it(c),p=Gp(r,a);if(u>1||d&&!u){var f=function(t,e,i,n,o){var r=e.getData(),a=$(t,(function(t,e,i){var n=r.getDimensionInfo(i);return t||n&&!1!==n.tooltip&&null!=n.displayName}),!1),s=[],l=[],h=[];function u(t,e){var i=r.getDimensionInfo(e);i&&!1!==i.otherDims.tooltip&&(a?h.push(Rp("nameValue",{markerType:"subItem",markerColor:o,name:i.displayName,value:t,valueType:i.type})):(s.push(t),l.push(i.type)))}return n.length?q(n,(function(t){u(Ud(r,i,t),t)})):q(t,u),{inlineValues:s,inlineValueTypes:l,blocks:h}}(c,r,a,h,p);e=f.inlineValues,i=f.inlineValueTypes,n=f.blocks,o=f.inlineValues[0]}else if(u){var g=l.getDimensionInfo(h[0]);o=e=Ud(l,a,h[0]),i=g.type}else o=e=d?c[0]:c;var m=Or(r),v=m&&r.name||"",y=l.getName(a),b=s?v:y;return Rp("section",{header:v,noHeader:s||!m,sortParam:o,blocks:[Rp("nameValue",{markerType:"item",markerColor:p,name:b,noName:!bt(b),value:e,valueType:i})].concat(n||[])})}var Xp=Br();function Yp(t,e){return t.getName(e)||t.getId(e)}var Zp="__universalTransitionEnabled",qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return m(e,t),e.prototype.init=function(t,e,i){this.seriesIndex=this.componentIndex,this.dataTask=Zd({count:$p,reset:Jp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),(Xp(this).sourceManager=new Mp(this)).prepareSource();var n=this.getInitialData(t,i);tf(n,this),this.dataTask.context.data=n,Xp(this).dataBeforeProcessed=n,Kp(this),this._initSelectedMapFromData(n)},e.prototype.mergeDefaultAndTheme=function(t,e){var i=oc(this),n=i?ac(t):{},o=this.subType;uc.hasClass(o)&&(o+="Series"),G(t,e.getTheme().get(this.subType)),G(t,this.getDefaultOption()),Er(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&rc(t,n,i)},e.prototype.mergeOption=function(t,e){t=G(this.option,t,!0),this.fillDataTextStyle(t.data);var i=oc(this);i&&rc(this.option,t,i);var n=Xp(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,e);tf(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Xp(this).dataBeforeProcessed=o,Kp(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!ht(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Er(t[i],"label",e)},e.prototype.getInitialData=function(t,e){},e.prototype.appendData=function(t){this.getRawData().appendData(t.data)},e.prototype.getData=function(t){var e=nf(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return Xp(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var e=nf(this);if(e){var i=e.context;i.outputData=t,e!==this.dataTask&&(i.data=t)}Xp(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return Tt(t)},e.prototype.getSourceManager=function(){return Xp(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Xp(this).dataBeforeProcessed},e.prototype.getColorBy=function(){return this.get("colorBy")||"series"},e.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,e,i){return jp({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(b.node&&(!t||!t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,i){var n=this.ecModel,o=zc.prototype.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,o=this.getData(e);if("series"===n||"all"===i)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var r=0;r<t.length;r++){var a=Yp(o,t[r]);i[a]=!1,this._selectedDataIndicesMap[a]=-1}}},e.prototype.toggleSelect=function(t,e){for(var i=[],n=0;n<t.length;n++)i[0]=t[n],this.isSelected(t[n],e)?this.unselect(i,e):this.select(i,e)},e.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=Q(t),i=[],n=0;n<e.length;n++){var o=t[e[n]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,e){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(e);return("all"===i||i[Yp(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Zp])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var i,n,o=this.option,r=o.selectedMode,a=e.length;if(r&&a)if("series"===r)o.selectedMap="all";else if("multiple"===r){st(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l<a;l++){var h=e[l];s[c=Yp(t,h)]=!0,this._selectedDataIndicesMap[c]=t.getRawIndex(h)}}else if("single"===r||!0===r){var u=e[a-1],c=Yp(t,u);o.selectedMap=((i={})[c]=!0,i),this._selectedDataIndicesMap=((n={})[c]=t.getRawIndex(u),n)}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each((function(i){var n=t.getRawDataItem(i);n&&n.selected&&e.push(i)})),e.length>0&&this._innerSelect(t,e)}},e.registerClass=function(t){return uc.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(uc);function Kp(t){var e=t.name;Or(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimensionsAll("seriesName"),n=[];return q(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}(t)||e)}function $p(t){return t.model.getRawData().count()}function Jp(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Qp}function Qp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function tf(t,e){q(Et(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(i){t.wrapMethod(i,et(ef,e))}))}function ef(t,e){var i=nf(t);return i&&i.setOutputEnd((e||this).count()),e}function nf(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}Y(qp,Xd),Y(qp,zc),Qr(qp,uc);const of=qp;var rf=function(){function t(){this.group=new qo,this.uid=nu("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,i,n){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,i,n){},t.prototype.updateLayout=function(t,e,i,n){},t.prototype.updateVisual=function(t,e,i,n){},t.prototype.toggleBlurSeries=function(t,e,i){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();Jr(rf),na(rf);const af=rf;function sf(){var t=Br();return function(e){var i=t(e),n=e.pipelineContext,o=!!i.large,r=!!i.progressiveRender,a=i.large=!(!n||!n.large),s=i.progressiveRender=!(!n||!n.progressiveRender);return!(o===a&&r===s)&&"reset"}}var lf=ps.CMD,hf=[[],[],[]],uf=Math.sqrt,cf=Math.atan2;function df(t,e){if(e){var i,n,o,r,a,s,l=t.data,h=t.len(),u=lf.M,c=lf.C,d=lf.L,p=lf.R,f=lf.A,g=lf.Q;for(o=0,r=0;o<h;){switch(i=l[o++],r=o,n=0,i){case u:case d:n=1;break;case c:n=3;break;case g:n=2;break;case f:var m=e[4],v=e[5],y=uf(e[0]*e[0]+e[1]*e[1]),b=uf(e[2]*e[2]+e[3]*e[3]),x=cf(-e[1]/b,e[0]/y);l[o]*=y,l[o++]+=m,l[o]*=b,l[o++]+=v,l[o++]*=y,l[o++]*=b,l[o++]+=x,l[o++]+=x,r=o+=2;break;case p:s[0]=l[o++],s[1]=l[o++],Yt(s,s,e),l[r++]=s[0],l[r++]=s[1],s[0]+=l[o++],s[1]+=l[o++],Yt(s,s,e),l[r++]=s[0],l[r++]=s[1]}for(a=0;a<n;a++){var w=hf[a];w[0]=l[o++],w[1]=l[o++],Yt(w,w,e),l[r++]=w[0],l[r++]=w[1]}}t.increaseVersion()}}var pf=Math.sqrt,ff=Math.sin,gf=Math.cos,mf=Math.PI;function vf(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function yf(t,e){return(t[0]*e[0]+t[1]*e[1])/(vf(t)*vf(e))}function bf(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(yf(t,e))}function xf(t,e,i,n,o,r,a,s,l,h,u){var c=l*(mf/180),d=gf(c)*(t-i)/2+ff(c)*(e-n)/2,p=-1*ff(c)*(t-i)/2+gf(c)*(e-n)/2,f=d*d/(a*a)+p*p/(s*s);f>1&&(a*=pf(f),s*=pf(f));var g=(o===r?-1:1)*pf((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,m=g*a*p/s,v=g*-s*d/a,y=(t+i)/2+gf(c)*m-ff(c)*v,b=(e+n)/2+ff(c)*m+gf(c)*v,x=bf([1,0],[(d-m)/a,(p-v)/s]),w=[(d-m)/a,(p-v)/s],_=[(-1*d-m)/a,(-1*p-v)/s],C=bf(w,_);if(yf(w,_)<=-1&&(C=mf),yf(w,_)>=1&&(C=0),C<0){var S=Math.round(C/mf*1e6)/1e6;C=2*mf+S%2*mf}u.addData(h,y,b,a,s,x,C,c,r)}var wf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,_f=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.applyTransform=function(t){},e}(Ps);function Sf(t){return null!=t.setData}function Mf(t,e){var i=function(t){var e=new ps;if(!t)return e;var i,n=0,o=0,r=n,a=o,s=ps.CMD,l=t.match(wf);if(!l)return e;for(var h=0;h<l.length;h++){for(var u=l[h],c=u.charAt(0),d=void 0,p=u.match(_f)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,_=void 0,C=void 0,S=n,M=o,T=void 0,E=void 0;switch(c){case"l":n+=p[m++],o+=p[m++],d=s.L,e.addData(d,n,o);break;case"L":n=p[m++],o=p[m++],d=s.L,e.addData(d,n,o);break;case"m":n+=p[m++],o+=p[m++],d=s.M,e.addData(d,n,o),r=n,a=o,c="l";break;case"M":n=p[m++],o=p[m++],d=s.M,e.addData(d,n,o),r=n,a=o,c="L";break;case"h":n+=p[m++],d=s.L,e.addData(d,n,o);break;case"H":n=p[m++],d=s.L,e.addData(d,n,o);break;case"v":o+=p[m++],d=s.L,e.addData(d,n,o);break;case"V":o=p[m++],d=s.L,e.addData(d,n,o);break;case"C":d=s.C,e.addData(d,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],o=p[m-1];break;case"c":d=s.C,e.addData(d,p[m++]+n,p[m++]+o,p[m++]+n,p[m++]+o,p[m++]+n,p[m++]+o),n+=p[m-2],o+=p[m-1];break;case"S":v=n,y=o,T=e.len(),E=e.data,i===s.C&&(v+=n-E[T-4],y+=o-E[T-3]),d=s.C,S=p[m++],M=p[m++],n=p[m++],o=p[m++],e.addData(d,v,y,S,M,n,o);break;case"s":v=n,y=o,T=e.len(),E=e.data,i===s.C&&(v+=n-E[T-4],y+=o-E[T-3]),d=s.C,S=n+p[m++],M=o+p[m++],n+=p[m++],o+=p[m++],e.addData(d,v,y,S,M,n,o);break;case"Q":S=p[m++],M=p[m++],n=p[m++],o=p[m++],d=s.Q,e.addData(d,S,M,n,o);break;case"q":S=p[m++]+n,M=p[m++]+o,n+=p[m++],o+=p[m++],d=s.Q,e.addData(d,S,M,n,o);break;case"T":v=n,y=o,T=e.len(),E=e.data,i===s.Q&&(v+=n-E[T-4],y+=o-E[T-3]),n=p[m++],o=p[m++],d=s.Q,e.addData(d,v,y,n,o);break;case"t":v=n,y=o,T=e.len(),E=e.data,i===s.Q&&(v+=n-E[T-4],y+=o-E[T-3]),n+=p[m++],o+=p[m++],d=s.Q,e.addData(d,v,y,n,o);break;case"A":b=p[m++],x=p[m++],w=p[m++],_=p[m++],C=p[m++],xf(S=n,M=o,n=p[m++],o=p[m++],_,C,b,x,w,d=s.A,e);break;case"a":b=p[m++],x=p[m++],w=p[m++],_=p[m++],C=p[m++],xf(S=n,M=o,n+=p[m++],o+=p[m++],_,C,b,x,w,d=s.A,e)}}"z"!==c&&"Z"!==c||(d=s.Z,e.addData(d),n=r,o=a),i=d}return e.toStatic(),e}(t),n=U({},e);return n.buildPath=function(t){if(Sf(t))t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e,1);else{var e=t;i.rebuildPath(e,1)}},n.applyTransform=function(t){df(i,t),this.dirtyShape()},n}function Tf(t,e){return new Cf(Mf(t,e))}function Ef(t,e){e=e||{};var i=new Ps;return t.shape&&i.setShape(t.shape),i.setStyle(t.style),e.bakeTransform?df(i.path,t.getComputedTransform()):e.toLocal?i.setLocalTransform(t.getComputedTransform()):i.copyTransform(t),i.buildPath=t.buildPath,i.applyTransform=i.applyTransform,i.z=t.z,i.z2=t.z2,i.zlevel=t.zlevel,i}var If=function(){this.cx=0,this.cy=0,this.r=0},Df=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new If},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(Ps);Df.prototype.type="circle";const kf=Df;var Af=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Lf=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new Af},e.prototype.buildPath=function(t,e){var i=.5522848,n=e.cx,o=e.cy,r=e.rx,a=e.ry,s=r*i,l=a*i;t.moveTo(n-r,o),t.bezierCurveTo(n-r,o-l,n-s,o-a,n,o-a),t.bezierCurveTo(n+s,o-a,n+r,o-l,n+r,o),t.bezierCurveTo(n+r,o+l,n+s,o+a,n,o+a),t.bezierCurveTo(n-s,o+a,n-r,o+l,n-r,o),t.closePath()},e}(Ps);Lf.prototype.type="ellipse";const Rf=Lf;var Pf=Math.PI,Of=2*Pf,zf=Math.sin,Nf=Math.cos,Bf=Math.acos,Ff=Math.atan2,Vf=Math.abs,Hf=Math.sqrt,Gf=Math.max,Wf=Math.min,Uf=1e-4;function jf(t,e,i,n,o,r,a){var s=t-i,l=e-n,h=(a?r:-r)/Hf(s*s+l*l),u=h*l,c=-h*s,d=t+u,p=e+c,f=i+u,g=n+c,m=(d+f)/2,v=(p+g)/2,y=f-d,b=g-p,x=y*y+b*b,w=o-r,_=d*g-f*p,C=(b<0?-1:1)*Hf(Gf(0,w*w*x-_*_)),S=(_*b-y*C)/x,M=(-_*y-b*C)/x,T=(_*b+y*C)/x,E=(-_*y+b*C)/x,I=S-m,D=M-v,k=T-m,A=E-v;return I*I+D*D>k*k+A*A&&(S=T,M=E),{cx:S,cy:M,x0:-u,y0:-c,x1:S*(o/w-1),y1:M*(o/w-1)}}var Xf=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Yf=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new Xf},e.prototype.buildPath=function(t,e){!function(t,e){var i,n=Gf(e.r,0),o=Gf(e.r0||0,0),r=n>0;if(r||o>0){if(r||(n=o,o=0),o>n){var a=n;n=o,o=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var h=e.cx,u=e.cy,c=!!e.clockwise,d=Vf(l-s),p=d>Of&&d%Of;if(p>Uf&&(d=p),n>Uf)if(d>Of-Uf)t.moveTo(h+n*Nf(s),u+n*zf(s)),t.arc(h,u,n,s,l,!c),o>Uf&&(t.moveTo(h+o*Nf(l),u+o*zf(l)),t.arc(h,u,o,l,s,c));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,_=void 0,C=void 0,S=void 0,M=void 0,T=void 0,E=void 0,I=void 0,D=void 0,k=n*Nf(s),A=n*zf(s),L=o*Nf(l),R=o*zf(l),P=d>Uf;if(P){var O=e.cornerRadius;O&&(i=function(t){var e;if(it(t)){var i=t.length;if(!i)return t;e=1===i?[t[0],t[0],0,0]:2===i?[t[0],t[0],t[1],t[1]]:3===i?t.concat(t[2]):t}else e=[t,t,t,t];return e}(O),f=i[0],g=i[1],m=i[2],v=i[3]);var z=Vf(n-o)/2;if(y=Wf(z,m),b=Wf(z,v),x=Wf(z,f),w=Wf(z,g),S=_=Gf(y,b),M=C=Gf(x,w),(_>Uf||C>Uf)&&(T=n*Nf(l),E=n*zf(l),I=o*Nf(s),D=o*zf(s),d<Pf)){var N=function(t,e,i,n,o,r,a,s){var l=i-t,h=n-e,u=a-o,c=s-r,d=c*l-u*h;if(!(d*d<Uf))return[t+(d=(u*(e-r)-c*(t-o))/d)*l,e+d*h]}(k,A,I,D,T,E,L,R);if(N){var B=k-N[0],F=A-N[1],V=T-N[0],H=E-N[1],G=1/zf(Bf((B*V+F*H)/(Hf(B*B+F*F)*Hf(V*V+H*H)))/2),W=Hf(N[0]*N[0]+N[1]*N[1]);S=Wf(_,(n-W)/(G+1)),M=Wf(C,(o-W)/(G-1))}}}if(P)if(S>Uf){var U=Wf(m,S),j=Wf(v,S),X=jf(I,D,k,A,n,U,c),Y=jf(T,E,L,R,n,j,c);t.moveTo(h+X.cx+X.x0,u+X.cy+X.y0),S<_&&U===j?t.arc(h+X.cx,u+X.cy,S,Ff(X.y0,X.x0),Ff(Y.y0,Y.x0),!c):(U>0&&t.arc(h+X.cx,u+X.cy,U,Ff(X.y0,X.x0),Ff(X.y1,X.x1),!c),t.arc(h,u,n,Ff(X.cy+X.y1,X.cx+X.x1),Ff(Y.cy+Y.y1,Y.cx+Y.x1),!c),j>0&&t.arc(h+Y.cx,u+Y.cy,j,Ff(Y.y1,Y.x1),Ff(Y.y0,Y.x0),!c))}else t.moveTo(h+k,u+A),t.arc(h,u,n,s,l,!c);else t.moveTo(h+k,u+A);o>Uf&&P?M>Uf?(U=Wf(f,M),X=jf(L,R,T,E,o,-(j=Wf(g,M)),c),Y=jf(k,A,I,D,o,-U,c),t.lineTo(h+X.cx+X.x0,u+X.cy+X.y0),M<C&&U===j?t.arc(h+X.cx,u+X.cy,M,Ff(X.y0,X.x0),Ff(Y.y0,Y.x0),!c):(j>0&&t.arc(h+X.cx,u+X.cy,j,Ff(X.y0,X.x0),Ff(X.y1,X.x1),!c),t.arc(h,u,o,Ff(X.cy+X.y1,X.cx+X.x1),Ff(Y.cy+Y.y1,Y.cx+Y.x1),c),U>0&&t.arc(h+Y.cx,u+Y.cy,U,Ff(Y.y1,Y.x1),Ff(Y.y0,Y.x0),!c))):(t.lineTo(h+L,u+R),t.arc(h,u,o,l,s,c)):t.lineTo(h+L,u+R)}else t.moveTo(h,u);t.closePath()}}}(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ps);Yf.prototype.type="sector";const Zf=Yf;var qf=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Kf=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new qf},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)},e}(Ps);Kf.prototype.type="ring";const $f=Kf;function Jf(t,e,i){var n=e.smooth,o=e.points;if(o&&o.length>=2){if(n){var r=function(t,e,i,n){var o,r,a,s,l=[],h=[],u=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)Zt(a,a,t[d]),qt(s,s,t[d]);Zt(a,a,n[0]),qt(s,s,n[1])}for(d=0,p=t.length;d<p;d++){var f=t[d];if(i)o=t[d?d-1:p-1],r=t[(d+1)%p];else{if(0===d||d===p-1){l.push(Ot(t[d]));continue}o=t[d-1],r=t[d+1]}Ft(h,r,o),Ht(h,h,e);var g=Wt(f,o),m=Wt(f,r),v=g+m;0!==v&&(g/=v,m/=v),Ht(u,h,-g),Ht(c,h,m);var y=Nt([],f,u),b=Nt([],f,c);n&&(qt(y,y,a),Zt(y,y,s),qt(b,b,a),Zt(b,b,s)),l.push(y),l.push(b)}return i&&l.push(l.shift()),l}(o,n,i,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(i?a:a-1);s++){var l=r[2*s],h=r[2*s+1],u=o[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{t.moveTo(o[0][0],o[0][1]),s=1;for(var c=o.length;s<c;s++)t.lineTo(o[s][0],o[s][1])}i&&t.closePath()}}var Qf=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},tg=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new Qf},e.prototype.buildPath=function(t,e){Jf(t,e,!0)},e}(Ps);tg.prototype.type="polygon";const eg=tg;var ig=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},ng=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ig},e.prototype.buildPath=function(t,e){Jf(t,e,!1)},e}(Ps);ng.prototype.type="polyline";const og=ng;var rg={},ag=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},sg=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ag},e.prototype.buildPath=function(t,e){var i,n,o,r;if(this.subPixelOptimize){var a=Ws(rg,e,this.style);i=a.x1,n=a.y1,o=a.x2,r=a.y2}else i=e.x1,n=e.y1,o=e.x2,r=e.y2;var s=e.percent;0!==s&&(t.moveTo(i,n),s<1&&(o=i*(1-s)+o*s,r=n*(1-s)+r*s),t.lineTo(o,r))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(Ps);sg.prototype.type="line";const lg=sg;var hg=[],ug=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function cg(t,e,i){var n=t.cpx2,o=t.cpy2;return null!=n||null!=o?[(i?Ii:Ei)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Ii:Ei)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Oi:Pi)(t.x1,t.cpx1,t.x2,e),(i?Oi:Pi)(t.y1,t.cpy1,t.y2,e)]}var dg=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ug},e.prototype.buildPath=function(t,e){var i=e.x1,n=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&(Ni(i,a,o,u,hg),a=hg[1],o=hg[2],Ni(n,s,r,u,hg),s=hg[1],r=hg[2]),t.quadraticCurveTo(a,s,o,r)):(u<1&&(Ai(i,a,l,o,u,hg),a=hg[1],l=hg[2],o=hg[3],Ai(n,s,h,r,u,hg),s=hg[1],h=hg[2],r=hg[3]),t.bezierCurveTo(a,s,l,h,o,r)))},e.prototype.pointAt=function(t){return cg(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=cg(this.shape,t,!0);return Gt(e,e)},e}(Ps);dg.prototype.type="bezier-curve";const pg=dg;var fg=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},gg=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new fg},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(r),h=Math.sin(r);t.moveTo(l*o+i,h*o+n),t.arc(i,n,o,r,a,!s)},e}(Ps);gg.prototype.type="arc";const mg=gg;var vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return m(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),i=0;i<t.length;i++)e=e||t[i].shapeChanged();e&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ps.prototype.getBoundingRect.call(this)},e}(Ps);const yg=vg;const bg=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}(),xg=function(t){function e(e,i,n,o,r,a){var s=t.call(this,r)||this;return s.x=null==e?0:e,s.y=null==i?0:i,s.x2=null==n?1:n,s.y2=null==o?0:o,s.type="linear",s.global=a||!1,s}return m(e,t),e}(bg),wg=function(t){function e(e,i,n,o,r){var a=t.call(this,o)||this;return a.x=null==e?.5:e,a.y=null==i?.5:i,a.r=null==n?.5:n,a.type="radial",a.global=r||!1,a}return m(e,t),e}(bg);var _g=[0,0],Cg=[0,0],Sg=new Le,Mg=new Le,Tg=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new Le;for(i=0;i<2;i++)this._axes[i]=new Le;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,o=t.x,r=t.y,a=o+t.width,s=r+t.height;if(i[0].set(o,r),i[1].set(a,r),i[2].set(a,s),i[3].set(o,s),e)for(var l=0;l<4;l++)i[l].transform(e);for(Le.sub(n[0],i[1],i[0]),Le.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize(),l=0;l<2;l++)this._origin[l]=n[l].dot(i[0])},t.prototype.intersect=function(t,e){var i=!0,n=!e;return Sg.set(1/0,1/0),Mg.set(0,0),!this._intersectCheckOneSide(this,t,Sg,Mg,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,Sg,Mg,n,-1)&&(i=!1,n)||n||Le.copy(e,i?Sg:Mg),i},t.prototype._intersectCheckOneSide=function(t,e,i,n,o,r){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,_g),this._getProjMinMaxOnAxis(s,e._corners,Cg),_g[1]<Cg[0]||_g[0]>Cg[1]){if(a=!1,o)return a;var h=Math.abs(Cg[0]-_g[1]),u=Math.abs(_g[0]-Cg[1]);Math.min(h,u)>n.len()&&(h<u?Le.scale(n,l,-h*r):Le.scale(n,l,u*r))}else i&&(h=Math.abs(Cg[0]-_g[1]),u=Math.abs(_g[0]-Cg[1]),Math.min(h,u)<i.len()&&(h<u?Le.scale(i,l,h*r):Le.scale(i,l,-u*r)))}return a},t.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],o=this._origin,r=e[0].dot(n)+o[t],a=r,s=r,l=1;l<e.length;l++){var h=e[l].dot(n)+o[t];a=Math.min(h,a),s=Math.max(h,s)}i[0]=a,i[1]=s},t}();const Eg=Tg;var Ig=[],Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return m(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ge(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(Ig)),t.union(n)}this._rect=t}return this._rect},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},e}(La);const kg=Dg;var Ag=Math.max,Lg=Math.min,Rg={};function Pg(t){return Ps.extend(t)}var Og=function(t,e){var i=Mf(t,e);return function(t){function e(e){var n=t.call(this,e)||this;return n.applyTransform=i.applyTransform,n.buildPath=i.buildPath,n}return m(e,t),e}(Cf)};function zg(t,e){return Og(t,e)}function Ng(t,e){Rg[t]=e}function Bg(t){if(Rg.hasOwnProperty(t))return Rg[t]}function Fg(t,e,i,n){var o=Tf(t,e);return i&&("center"===n&&(i=Hg(i,o.getBoundingRect())),Wg(o,i)),o}function Vg(t,e,i){var n=new Hs({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var o={width:t.width,height:t.height};n.setStyle(Hg(e,o))}}});return n}function Hg(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}var Gg=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var r=t[o];i.push(r.getUpdatedPathProxy(!0))}var a=new Ps(e);return a.createPathProxy(),a.buildPath=function(t){if(Sf(t)){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e,1)}},a};function Wg(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Ug(t,e){return Ws(t,t,{lineWidth:e}),t}function jg(t){return Us(t.shape,t.shape,t.style),t}var Xg=js;function Yg(t,e){for(var i=Se([]);t&&t!==e;)Te(i,t.getLocalTransform(),i),t=t.parent;return i}function Zg(t,e,i){return e&&!Z(e)&&(e=Eo.getLocalTransform(e)),i&&(e=ke([],e)),Yt([],t,e)}function qg(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),r=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return r=Zg(r,e,i),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function Kg(t){return!t.isGroup}function $g(t,e,i){if(t&&e){var n,o=(n={},t.traverse((function(t){Kg(t)&&t.anid&&(n[t.anid]=t)})),n);e.traverse((function(t){if(Kg(t)&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),bh(t,n,i,dl(t).dataIndex)}}}))}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=U({},t.shape)),e}}function Jg(t,e){return K(t,(function(t){var i=t[0];i=Ag(i,e.x),i=Lg(i,e.x+e.width);var n=t[1];return n=Ag(n,e.y),[i,n=Lg(n,e.y+e.height)]}))}function Qg(t,e){var i=Ag(t.x,e.x),n=Lg(t.x+t.width,e.x+e.width),o=Ag(t.y,e.y),r=Lg(t.y+t.height,e.y+e.height);if(n>=i&&r>=o)return{x:i,y:o,width:n-i,height:r-o}}function tm(t,e,i){var n=U({rectHover:!0},e),o=n.style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(o.image=t.slice(8),j(o,i),new Hs(n)):Fg(t.replace("path://",""),n,i,"center")}function em(t,e,i,n,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(im(t,e,i,n,s[0],s[1],a[0],a[1]))return!0;a=s}}function im(t,e,i,n,o,r,a,s){var l,h=i-t,u=n-e,c=a-o,d=s-r,p=nm(c,d,h,u);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=t-o,g=e-r,m=nm(f,g,h,u)/p;if(m<0||m>1)return!1;var v=nm(f,g,c,d)/p;return!(v<0||v>1)}function nm(t,e,i,n){return t*n-i*e}function om(t){var e=t.itemTooltipOption,i=t.componentModel,n=t.itemName,o=ot(e)?{formatter:e}:e,r=i.mainType,a=i.componentIndex,s={componentType:r,name:n,$vars:["name"]};s[r+"Index"]=a;var l=t.formatterParamsExtra;l&&q(Q(l),(function(t){kt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var h=dl(t.el);h.componentMainType=r,h.componentIndex=a,h.tooltipConfig={name:n,option:j({content:n,formatterParams:s},o)}}function rm(t,e){var i;t.isGroup&&(i=e(t)),i||t.traverse(e)}function am(t,e){if(t)if(it(t))for(var i=0;i<t.length;i++)rm(t[i],e);else rm(t,e)}Ng("circle",kf),Ng("ellipse",Rf),Ng("sector",Zf),Ng("ring",$f),Ng("polygon",eg),Ng("polyline",og),Ng("rect",qs),Ng("line",lg),Ng("bezierCurve",pg),Ng("arc",mg);var sm=Br(),lm=sf(),hm=function(){function t(){this.group=new qo,this.uid=nu("viewChart"),this.renderTask=Zd({plan:dm,reset:pm}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,i,n){},t.prototype.highlight=function(t,e,i,n){var o=t.getData(n&&n.dataType);o&&cm(o,n,"emphasis")},t.prototype.downplay=function(t,e,i,n){var o=t.getData(n&&n.dataType);o&&cm(o,n,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.eachRendered=function(t){am(this.group,t)},t.markUpdateMethod=function(t,e){sm(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function um(t,e,i){t&&ph(t)&&("emphasis"===e?Yl:Zl)(t,i)}function cm(t,e,i){var n=Nr(t,e),o=e&&null!=e.highlightKey?function(t){var e=gl[t];return null==e&&fl<=32&&(e=gl[t]=fl++),e}(e.highlightKey):null;null!=n?q(Tr(n),(function(e){um(t.getItemGraphicEl(e),i,o)})):t.eachItemGraphicEl((function(t){um(t,i,o)}))}function dm(t){return lm(t.model)}function pm(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,s=o&&sm(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,i,n,o),fm[l]}Jr(hm),na(hm);var fm={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const gm=hm;var mm="\0__throttleOriginMethod",vm="\0__throttleRate",ym="\0__throttleType";function bm(t,e,i){var n,o,r,a,s,l=0,h=0,u=null;function c(){h=(new Date).getTime(),u=null,t.apply(r,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d<arguments.length;d++)t[d]=arguments[d];n=(new Date).getTime(),r=this,a=t;var p=s||e,f=s||i;s=null,o=n-(f?l:h)-p,clearTimeout(u),f?u=setTimeout(c,p):o>=0?c():u=setTimeout(c,-o),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}function xm(t,e,i,n){var o=t[e];if(o){var r=o[mm]||o,a=o[ym];if(o[vm]!==i||a!==n){if(null==i||!n)return t[e]=r;(o=t[e]=bm(r,i,"debounce"===n))[mm]=r,o[ym]=n,o[vm]=i}return o}}function wm(t,e){var i=t[e];i&&i[mm]&&(i.clear&&i.clear(),t[e]=i[mm])}var _m=Br(),Cm={itemStyle:oa($h,!0),lineStyle:oa(Zh,!0)},Sm={lineStyle:"stroke",itemStyle:"fill"};function Mm(t,e){return t.visualStyleMapper||Cm[e]||(console.warn("Unknown style type '"+e+"'."),Cm.itemStyle)}function Tm(t,e){return t.visualDrawType||Sm[e]||(console.warn("Unknown style type '"+e+"'."),"fill")}var Em={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=t.visualStyleAccessPath||"itemStyle",o=t.getModel(n),r=Mm(t,n)(o),a=o.getShallow("decal");a&&(i.setVisual("decal",a),a.dirty=!0);var s=Tm(t,n),l=r[s],h=nt(l)?l:null,u="auto"===r.fill||"auto"===r.stroke;if(!r[s]||h||u){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());r[s]||(r[s]=c,i.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||nt(r.fill)?c:r.fill,r.stroke="auto"===r.stroke||nt(r.stroke)?c:r.stroke}if(i.setVisual("style",r),i.setVisual("drawType",s),!e.isSeriesFiltered(t)&&h)return i.setVisual("colorFromPalette",!1),{dataEach:function(e,i){var n=t.getDataParams(i),o=U({},r);o[s]=h(n),e.setItemVisual(i,"style",o)}}}},Im=new eu,Dm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var i=t.getData(),n=t.visualStyleAccessPath||"itemStyle",o=Mm(t,n),r=i.getVisual("drawType");return{dataEach:i.hasItemOption?function(t,e){var i=t.getRawDataItem(e);if(i&&i[n]){Im.option=i[n];var a=o(Im);U(t.ensureUniqueItemVisual(e,"style"),a),Im.option.decal&&(t.setItemVisual(e,"decal",Im.option.decal),Im.option.decal.dirty=!0),r in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},km={performRawSeries:!0,overallReset:function(t){var e=Tt();t.eachSeries((function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,o=e.get(n);o||(o={},e.set(n,o)),_m(t).scope=o}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var i=e.getRawData(),n={},o=e.getData(),r=_m(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Tm(e,a);o.each((function(t){var e=o.getRawIndex(t);n[e]=t})),i.each((function(t){var a=n[t];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),h=i.getName(t)||t+"",u=i.count();l[s]=e.getColorFromPalette(h,r,u)}}))}}))}},Am=Math.PI,Lm=function(){function t(t,e,i,n){this._stageTaskMap=Tt(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,r=n&&n.modDataCount;return{step:o,modBy:null!=r?Math.ceil(r/o):null,modDataCount:r}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,r=t.get("large")&&n>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:a,large:r}},t.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=Tt();t.eachSeries((function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;q(this._allHandlers,(function(n){var o=t.get(n.uid)||t.set(n.uid,{});yt(!(n.reset&&n.overallReset),""),n.reset&&this._createSeriesStageTask(n,o,e,i),n.overallReset&&this._createOverallStageTask(n,o,e,i)}),this)},t.prototype.prepareView=function(t,e,i,n){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=i,r.api=n,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},t.prototype._performStageTasks=function(t,e,i,n){n=n||{};var o=!1,r=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}q(t,(function(t,s){if(!n.visualType||n.visualType===t.visualType){var l=r._stageTaskMap.get(t.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each((function(t){a(n,t)&&(t.dirty(),c=!0)})),c&&u.dirty(),r.updatePayload(u,i);var p=r.getPerformArgs(u,n.block);d.each((function(t){t.perform(p)})),u.perform(p)&&(o=!0)}else h&&h.each((function(s,l){a(n,s)&&s.dirty();var h=r.getPerformArgs(s,n.block);h.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),r.updatePayload(s,i),s.perform(h)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,i,n){var o=this,r=e.seriesTaskMap,a=e.seriesTaskMap=Tt(),s=t.seriesType,l=t.getTargetSeries;function h(e){var s=e.uid,l=a.set(s,r&&r.get(s)||Zd({plan:Nm,reset:Bm,count:Hm}));l.context={model:e,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,l)}t.createOnAllSeries?i.eachRawSeries(h):s?i.eachRawSeriesByType(s,h):l&&l(i,n).each(h)},t.prototype._createOverallStageTask=function(t,e,i,n){var o=this,r=e.overallTask=e.overallTask||Zd({reset:Rm});r.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=Tt(),l=t.seriesType,h=t.getTargetSeries,u=!0,c=!1;function d(t){var e=t.uid,i=s.set(e,a&&a.get(e)||(c=!0,Zd({reset:Pm,onDirty:zm})));i.context={model:t,overallProgress:u},i.agent=r,i.__block=u,o._pipe(t,i)}yt(!t.createOnAllSeries,""),l?i.eachRawSeriesByType(l,d):h?h(i,n).each(d):(u=!1,q(i.getSeries(),d)),c&&r.dirty()},t.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},t.wrapStageHandler=function(t,e){return nt(t)&&(t={overallReset:t,seriesType:Gm(t)}),t.uid=nu("stageHandler"),e&&(t.visualType=e),t},t}();function Rm(t){t.overallReset(t.ecModel,t.api,t.payload)}function Pm(t){return t.overallProgress&&Om}function Om(){this.agent.dirty(),this.getDownstream().dirty()}function zm(){this.agent&&this.agent.dirty()}function Nm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Bm(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Tr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?K(e,(function(t,e){return Vm(e)})):Fm}var Fm=Vm(0);function Vm(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var r=e.start;r<e.end;r++)o.dataEach(n,r);else o&&o.progress&&o.progress(e,n)}}function Hm(t){return t.data.count()}function Gm(t){Wm=null;try{t(Um,jm)}catch(t){}return Wm}var Wm,Um={},jm={};function Xm(t,e){for(var i in e.prototype)t[i]=At}Xm(Um,Uc),Xm(jm,Xc),Um.eachSeriesByType=Um.eachRawSeriesByType=function(t){Wm=t},Um.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Wm=t.subType)};const Ym=Lm;var Zm=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const qm={color:Zm,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Zm]};var Km="#B9B8CE",$m="#100C2A",Jm=function(){return{axisLine:{lineStyle:{color:Km}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Qm=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],tv={darkMode:!0,color:Qm,backgroundColor:$m,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Km}},textStyle:{color:Km},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Km}},dataZoom:{borderColor:"#71708A",textStyle:{color:Km},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Km}},timeline:{lineStyle:{color:Km},label:{color:Km},controlStyle:{color:Km,borderColor:Km}},calendar:{itemStyle:{color:$m},dayLabel:{color:Km},monthLabel:{color:Km},yearLabel:{color:Km}},timeAxis:Jm(),logAxis:Jm(),valueAxis:Jm(),categoryAxis:Jm(),line:{symbol:"circle"},graph:{color:Qm},gauge:{title:{color:Km},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Km},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};tv.categoryAxis.splitLine.show=!1;const ev=tv;var iv=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},i={},n={};if(ot(t)){var o=$r(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var r=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};q(t,(function(t,o){for(var s=!1,l=0;l<r.length;l++){var h=r[l],u=o.lastIndexOf(h);if(u>0&&u===o.length-h.length){var c=o.slice(0,u);"data"!==c&&(e.mainType=c,e[h.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},t.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,o=i.packedEvent,r=i.model,a=i.view;if(!r||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return h(s,r,"mainType")&&h(s,r,"subType")&&h(s,r,"index","componentIndex")&&h(s,r,"name")&&h(s,r,"id")&&h(l,o,"name")&&h(l,o,"dataIndex")&&h(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,n,o));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),nv=["symbol","symbolSize","symbolRotate","symbolOffset"],ov=nv.concat(["symbolKeepAspect"]),rv={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData();if(t.legendIcon&&i.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var n={},o={},r=!1,a=0;a<nv.length;a++){var s=nv[a],l=t.get(s);nt(l)?(r=!0,o[s]=l):n[s]=l}if(n.symbol=n.symbol||t.defaultSymbol,i.setVisual(U({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),!e.isSeriesFiltered(t)){var h=Q(o);return{dataEach:r?function(e,i){for(var n=t.getRawValue(i),r=t.getDataParams(i),a=0;a<h.length;a++){var s=h[a];e.setItemVisual(i,s,o[s](n,r))}}:null}}}}},av={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var i=t.getItemModel(e),n=0;n<ov.length;n++){var o=ov[n],r=i.getShallow(o,!0);null!=r&&t.setItemVisual(e,o,r)}}:null}}};function sv(t,e,i){switch(i){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,i)}}function lv(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function hv(t,e,i,n){switch(i){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=n,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,i,n)}}function uv(t,e){function i(e,i){var n=[];return e.eachComponent({mainType:"series",subType:t,query:i},(function(t){n.push(t.seriesIndex)})),n}q([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,n,o){e=U({},e),o.dispatchAction(U(e,{type:t[1],seriesIndex:i(n,e)}))}))}))}function cv(t,e,i,n,o){var r=t+e;i.isSilent(r)||n.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,n=t.option.selectedMap,a=o.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===e){var l=t.getData(),h=Nr(l,o.fromActionPayload);i.trigger(r,{type:r,seriesId:t.id,name:it(h)?l.getName(h[0]):l.getName(h),selected:ot(n)?n:U({},n)})}}))}function dv(t,e,i){for(var n;t&&(!e(t)||(n=t,!i));)t=t.__hostTarget||t.parent;return n}var pv=Math.round(9*Math.random()),fv="function"==typeof Object.defineProperty,gv=function(){function t(){this._id="__ec_inner_"+pv++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var i=this._guard(t);return fv?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();const mv=gv;var vv=Ps.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+o,n+r),t.lineTo(i-o,n+r),t.closePath()}}),yv=Ps.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+o,n),t.lineTo(i,n+r),t.lineTo(i-o,n),t.closePath()}}),bv=Ps.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,r=Math.max(o,e.height),a=o/2,s=a*a/(r-a),l=n-r+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),p=.6*a,f=.7*a;t.moveTo(i-u,l+s),t.arc(i,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*p,l+s+d*p,i,n-f,i,n),t.bezierCurveTo(i,n-f,i-u+c*p,l+s+d*p,i-u,l+s),t.closePath()}}),xv=Ps.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,r=e.y,a=n/3*2;t.moveTo(o,r),t.lineTo(o+a,r+i),t.lineTo(o,r+i/4*3),t.lineTo(o-a,r+i),t.lineTo(o,r),t.closePath()}}),wv={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var r=Math.min(i,n);o.x=t,o.y=e,o.width=r,o.height=r},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},_v={};q({line:lg,rect:qs,roundRect:qs,square:qs,circle:kf,diamond:yv,pin:bv,arrow:xv,triangle:vv},(function(t,e){_v[e]=new t}));var Cv=Ps.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=zo(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.position&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=_v[n];o||(o=_v[n="rect"]),wv[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}});function Sv(t,e){if("image"!==this.type){var i=this.style;this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff",i.lineWidth=2):"line"===this.shape.symbolType?i.stroke=t:i.fill=t,this.markRedraw()}}function Mv(t,e,i,n,o,r,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Vg(t.slice(8),new Ge(e,i,n,o),a?"center":"cover"):0===t.indexOf("path://")?Fg(t.slice(7),{},new Ge(e,i,n,o),a?"center":"cover"):new Cv({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=Sv,r&&s.setColor(r),s}function Tv(t){return it(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function Ev(t,e){if(null!=t)return it(t)||(t=[t,t]),[nr(t[0],e[0])||0,nr(ft(t[1],t[0]),e[1])||0]}function Iv(t){return isFinite(t)}function Dv(t,e,i){for(var n="radial"===e.type?function(t,e,i){var n=i.width,o=i.height,r=Math.min(n,o),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*n+i.x,s=s*o+i.y,l*=r),a=Iv(a)?a:.5,s=Iv(s)?s:.5,l=l>=0&&Iv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,i):function(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,r=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,r=r*i.height+i.y,a=a*i.height+i.y),n=Iv(n)?n:0,o=Iv(o)?o:1,r=Iv(r)?r:0,a=Iv(a)?a:0,t.createLinearGradient(n,r,o,a)}(t,e,i),o=e.colorStops,r=0;r<o.length;r++)n.addColorStop(o[r].offset,o[r].color);return n}function kv(t){return parseInt(t,10)}function Av(t,e,i){var n=["width","height"][e],o=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=i[n]&&"auto"!==i[n])return parseFloat(i[n]);var s=document.defaultView.getComputedStyle(t);return(t[o]||kv(s[n])||kv(t.style[n]))-(kv(s[r])||0)-(kv(s[a])||0)|0}function Lv(t){var e,i,n=t.style,o=n.lineDash&&n.lineWidth>0&&(e=n.lineDash,i=n.lineWidth,e&&"solid"!==e&&i>0?"dashed"===e?[4*i,2*i]:"dotted"===e?[i]:at(e)?[e]:it(e)?e:null:null),r=n.lineDashOffset;if(o){var a=n.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(o=K(o,(function(t){return t/a})),r/=a)}return[o,r]}var Rv=new ps(!0);function Pv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Ov(t){return"string"==typeof t&&"none"!==t}function zv(t){var e=t.fill;return null!=e&&"none"!==e}function Nv(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var i=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=i}else t.fill()}function Bv(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var i=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=i}else t.stroke()}function Fv(t,e,i){var n=ha(e.image,e.__image,i);if(ca(n)){var o=t.createPattern(n,e.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var r=new DOMMatrix;r.translateSelf(e.x||0,e.y||0),r.rotateSelf(0,0,(e.rotation||0)*Lt),r.scaleSelf(e.scaleX||1,e.scaleY||1),o.setTransform(r)}return o}}var Vv=["shadowBlur","shadowOffsetX","shadowOffsetY"],Hv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Gv(t,e,i,n,o){var r=!1;if(!n&&e===(i=i||{}))return!1;if(n||e.opacity!==i.opacity){qv(t,o),r=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Ma.opacity:a}(n||e.blend!==i.blend)&&(r||(qv(t,o),r=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s<Vv.length;s++){var l=Vv[s];(n||e[l]!==i[l])&&(r||(qv(t,o),r=!0),t[l]=t.dpr*(e[l]||0))}return(n||e.shadowColor!==i.shadowColor)&&(r||(qv(t,o),r=!0),t.shadowColor=e.shadowColor||Ma.shadowColor),r}function Wv(t,e,i,n,o){var r=Kv(e,o.inHover),a=n?null:i&&Kv(i,o.inHover)||{};if(r===a)return!1;var s=Gv(t,r,a,n,o);if((n||r.fill!==a.fill)&&(s||(qv(t,o),s=!0),Ov(r.fill)&&(t.fillStyle=r.fill)),(n||r.stroke!==a.stroke)&&(s||(qv(t,o),s=!0),Ov(r.stroke)&&(t.strokeStyle=r.stroke)),(n||r.opacity!==a.opacity)&&(s||(qv(t,o),s=!0),t.globalAlpha=null==r.opacity?1:r.opacity),e.hasStroke()){var l=r.lineWidth/(r.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(qv(t,o),s=!0),t.lineWidth=l)}for(var h=0;h<Hv.length;h++){var u=Hv[h],c=u[0];(n||r[c]!==a[c])&&(s||(qv(t,o),s=!0),t[c]=r[c]||u[1])}return s}function Uv(t,e){var i=e.transform,n=t.dpr||1;i?t.setTransform(n*i[0],n*i[1],n*i[2],n*i[3],n*i[4],n*i[5]):t.setTransform(n,0,0,n,0,0)}var jv=1,Xv=2,Yv=3,Zv=4;function qv(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Kv(t,e){return e&&t.__hoverStyle||t.style}function $v(t,e){Jv(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Jv(t,e,i,n){var o=e.transform;if(!e.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return e.__dirty&=~ai,void(e.__isRendered=!1);var r=e.__clipPaths,a=i.prevElClipPaths,s=!1,l=!1;if(a&&!function(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(r,a)||(a&&a.length&&(qv(t,i),t.restore(),l=s=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),r&&r.length&&(qv(t,i),t.save(),function(t,e,i){for(var n=!1,o=0;o<t.length;o++){var r=t[o];n=n||r.isZeroArea(),Uv(e,r),e.beginPath(),r.buildPath(e,r.shape),e.clip()}i.allClipped=n}(r,t,i),s=!0),i.prevElClipPaths=r),i.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var h=i.prevEl;h||(l=s=!0);var u,c,d=e instanceof Ps&&e.autoBatch&&function(t){var e=zv(t),i=Pv(t);return!(t.lineDash||!(+e^+i)||e&&"string"!=typeof t.fill||i&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(e.style);s||(u=o,c=h.transform,u&&c?u[0]!==c[0]||u[1]!==c[1]||u[2]!==c[2]||u[3]!==c[3]||u[4]!==c[4]||u[5]!==c[5]:u||c)?(qv(t,i),Uv(t,e)):d||qv(t,i);var p=Kv(e,i.inHover);e instanceof Ps?(i.lastDrawType!==jv&&(l=!0,i.lastDrawType=jv),Wv(t,e,h,l,i),d&&(i.batchFill||i.batchStroke)||t.beginPath(),function(t,e,i,n){var o,r=Pv(i),a=zv(i),s=i.strokePercent,l=s<1,h=!e.path;e.silent&&!l||!h||e.createPathProxy();var u=e.path||Rv,c=e.__dirty;if(!n){var d=i.fill,p=i.stroke,f=a&&!!d.colorStops,g=r&&!!p.colorStops,m=a&&!!d.image,v=r&&!!p.image,y=void 0,b=void 0,x=void 0,w=void 0,_=void 0;(f||g)&&(_=e.getBoundingRect()),f&&(y=c?Dv(t,d,_):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?Dv(t,p,_):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),m&&(x=c||!e.__canvasFillPattern?Fv(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=x),v&&(w=c||!e.__canvasStrokePattern?Fv(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),f?t.fillStyle=y:m&&(x?t.fillStyle=x:a=!1),g?t.strokeStyle=b:v&&(w?t.strokeStyle=w:r=!1)}var C,S,M=e.getGlobalScale();u.setScale(M[0],M[1],e.segmentIgnoreThreshold),t.setLineDash&&i.lineDash&&(C=(o=Lv(e))[0],S=o[1]);var T=!0;(h||c&si)&&(u.setDPR(t.dpr),l?u.setContext(null):(u.setContext(t),T=!1),u.reset(),e.buildPath(u,e.shape,n),u.toStatic(),e.pathUpdated()),T&&u.rebuildPath(t,l?s:1),C&&(t.setLineDash(C),t.lineDashOffset=S),n||(i.strokeFirst?(r&&Bv(t,i),a&&Nv(t,i)):(a&&Nv(t,i),r&&Bv(t,i))),C&&t.setLineDash([])}(t,e,p,d),d&&(i.batchFill=p.fill||"",i.batchStroke=p.stroke||"")):e instanceof Ns?(i.lastDrawType!==Yv&&(l=!0,i.lastDrawType=Yv),Wv(t,e,h,l,i),function(t,e,i){var n,o=i.text;if(null!=o&&(o+=""),o){t.font=i.font||S,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline;var r=void 0,a=void 0;t.setLineDash&&i.lineDash&&(r=(n=Lv(e))[0],a=n[1]),r&&(t.setLineDash(r),t.lineDashOffset=a),i.strokeFirst?(Pv(i)&&t.strokeText(o,i.x,i.y),zv(i)&&t.fillText(o,i.x,i.y)):(zv(i)&&t.fillText(o,i.x,i.y),Pv(i)&&t.strokeText(o,i.x,i.y)),r&&t.setLineDash([])}}(t,e,p)):e instanceof Hs?(i.lastDrawType!==Xv&&(l=!0,i.lastDrawType=Xv),function(t,e,i,n,o){Gv(t,Kv(e,o.inHover),i&&Kv(i,o.inHover),n,o)}(t,e,h,l,i),function(t,e,i){var n=e.__image=ha(i.image,e.__image,e,e.onload);if(n&&ca(n)){var o=i.x||0,r=i.y||0,a=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=n.width,s=n.height),i.sWidth&&i.sHeight){var h=i.sx||0,u=i.sy||0;t.drawImage(n,h,u,i.sWidth,i.sHeight,o,r,a,s)}else if(i.sx&&i.sy){var c=a-(h=i.sx),d=s-(u=i.sy);t.drawImage(n,h,u,c,d,o,r,a,s)}else t.drawImage(n,o,r,a,s)}}(t,e,p)):e.getTemporalDisplayables&&(i.lastDrawType!==Zv&&(l=!0,i.lastDrawType=Zv),function(t,e,i){var n=e.getDisplayables(),o=e.getTemporalDisplayables();t.save();var r,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,inHover:i.inHover};for(r=e.getCursor(),a=n.length;r<a;r++)(u=n[r]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Jv(t,u,s,r===a-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u;for(var l=0,h=o.length;l<h;l++){var u;(u=o[l]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Jv(t,u,s,l===h-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,i)),d&&n&&qv(t,i),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),i.prevEl=e,e.__dirty=0,e.__isRendered=!0}}var Qv=new mv,ty=new Xi(100),ey=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function iy(t,e){if("none"===t)return null;var i=e.getDevicePixelRatio(),n=e.getZr(),o="svg"===n.painter.type;t.dirty&&Qv.delete(t);var r=Qv.get(t);if(r)return r;var a=j(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(t){for(var e,r=[i],s=!0,l=0;l<ey.length;++l){var h=a[ey[l]];if(null!=h&&!it(h)&&!ot(h)&&!at(h)&&"boolean"!=typeof h){s=!1;break}r.push(h)}if(s){e=r.join(",")+(o?"-svg":"");var u=ty.get(e);u&&(o?t.svgElement=u:t.image=u)}var c,d=oy(a.dashArrayX),p=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(at(t)){var e=Math.ceil(t);return[e,e]}var i=K(t,(function(t){return Math.ceil(t)}));return t.length%2?i.concat(i):i}(a.dashArrayY),f=ny(a.symbol),g=K(d,(function(t){return ry(t)})),m=ry(p),v=!o&&T.createCanvas(),y=o&&{tag:"g",attrs:{},key:"dcl",children:[]},b=function(){for(var t=1,e=0,i=g.length;e<i;++e)t=_r(t,g[e]);var n=1;for(e=0,i=f.length;e<i;++e)n=_r(n,f[e].length);t*=n;var o=m*g.length*f.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();v&&(v.width=b.width*i,v.height=b.height*i,c=v.getContext("2d")),function(){c&&(c.clearRect(0,0,v.width,v.height),a.backgroundColor&&(c.fillStyle=a.backgroundColor,c.fillRect(0,0,v.width,v.height)));for(var t=0,e=0;e<p.length;++e)t+=p[e];if(!(t<=0))for(var r=-m,s=0,l=0,h=0;r<b.height;){if(s%2==0){for(var u=l/2%f.length,g=0,x=0,w=0;g<2*b.width;){var _=0;for(e=0;e<d[h].length;++e)_+=d[h][e];if(_<=0)break;if(x%2==0){var C=.5*(1-a.symbolSize),S=g+d[h][x]*C,M=r+p[s]*C,T=d[h][x]*a.symbolSize,E=p[s]*a.symbolSize,I=w/2%f[u].length;D(S,M,T,E,f[u][I])}g+=d[h][x],++w,++x===d[h].length&&(x=0)}++h===d.length&&(h=0)}r+=p[s],++l,++s===p.length&&(s=0)}function D(t,e,r,s,l){var h=o?1:i,u=Mv(l,t*h,e*h,r*h,s*h,a.color,a.symbolKeepAspect);if(o){var d=n.painter.renderOneToVNode(u);d&&y.children.push(d)}else $v(c,u)}}(),s&&ty.put(e,v||y),t.image=v,t.svgElement=y,t.svgWidth=b.width,t.svgHeight=b.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=o?1:1/i,Qv.set(t,s),t.dirty=!1,s}function ny(t){if(!t||0===t.length)return[["rect"]];if(ot(t))return[[t]];for(var e=!0,i=0;i<t.length;++i)if(!ot(t[i])){e=!1;break}if(e)return ny([t]);var n=[];for(i=0;i<t.length;++i)ot(t[i])?n.push([t[i]]):n.push(t[i]);return n}function oy(t){if(!t||0===t.length)return[[0,0]];if(at(t))return[[o=Math.ceil(t),o]];for(var e=!0,i=0;i<t.length;++i)if(!at(t[i])){e=!1;break}if(e)return oy([t]);var n=[];for(i=0;i<t.length;++i)if(at(t[i])){var o=Math.ceil(t[i]);n.push([o,o])}else(o=K(t[i],(function(t){return Math.ceil(t)}))).length%2==1?n.push(o.concat(o)):n.push(o);return n}function ry(t){for(var e=0,i=0;i<t.length;++i)e+=t[i];return t.length%2==1?2*e:e}const ay=new te;var sy={},ly=2e3,hy=4500,uy={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:ly,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:hy,ARIA:6e3,DECAL:7e3}},cy="__flagInMainProcess",dy="__pendingUpdate",py="__needsUpdateStatus",fy=/^[a-zA-Z0-9_]+$/,gy="__connectUpdateStatus";function my(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(!this.isDisposed())return yy(this,t,e);Gy(this.id)}}function vy(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return yy(this,t,e)}}function yy(t,e,i){return i[0]=i[0]&&i[0].toLowerCase(),te.prototype[e].apply(t,i)}var by,xy,wy,_y,Cy,Sy,My,Ty,Ey,Iy,Dy,ky,Ay,Ly,Ry,Py,Oy,zy,Ny=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e}(te),By=Ny.prototype;By.on=vy("on"),By.off=vy("off");var Fy=function(t){function e(e,i,n){var o=t.call(this,new iv)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],n=n||{},ot(i)&&(i=Zy[i]),o._dom=e;var r=o._zr=Qo(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:ft(n.useDirtyRect,!1),useCoarsePointer:ft(n.useCoarsePointer,"auto"),pointerSize:n.pointerSize});o._ssr=n.ssr,o._throttledZrFlush=bm(tt(r.flush,r),17),(i=H(i))&&yd(i,!0),o._theme=i,o._locale=function(t){if(ot(t)){var e=lu[t.toUpperCase()]||{};return t===ru||t===au?H(e):G(H(e),H(lu[su]),!1)}return G(H(t),H(lu[su]),!1)}(n.locale||uu),o._coordSysMgr=new qc;var a=o._api=Ry(o);function s(t,e){return t.__prio-e.__prio}return ri(Yy,s),ri(jy,s),o._scheduler=new Ym(o,a,jy,Yy),o._messageCenter=new Ny,o._initEvents(),o.resize=tt(o.resize,o),r.animation.on("frame",o._onframe,o),Iy(r,o),Dy(r,o),wt(o),o}return m(e,t),e.prototype._onframe=function(){if(!this._disposed){zy(this);var t=this._scheduler;if(this[dy]){var e=this[dy].silent;this[cy]=!0;try{by(this),_y.update.call(this,null,this[dy].updateParams)}catch(t){throw this[cy]=!1,this[dy]=null,t}this._zr.flush(),this[cy]=!1,this[dy]=null,Ty.call(this,e),Ey.call(this,e)}else if(t.unfinished){var i=1,n=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Sy(this,n),t.performVisualTasks(n),Ly(this,this._model,o,"remain",{}),i-=+new Date-r}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,i){if(!this[cy])if(this._disposed)Gy(this.id);else{var n,o,r;if(st(e)&&(i=e.lazyUpdate,n=e.silent,o=e.replaceMerge,r=e.transition,e=e.notMerge),this[cy]=!0,!this._model||e){var a=new Qc(this._api),s=this._theme,l=this._model=new Uc;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:o},Xy);var h={seriesTransition:r,optionChanged:!0};if(i)this[dy]={silent:n,updateParams:h},this[cy]=!1,this.getZr().wakeUp();else{try{by(this),_y.update.call(this,null,h)}catch(t){throw this[dy]=null,this[cy]=!1,t}this._ssr||this._zr.flush(),this[dy]=null,this[cy]=!1,Ty.call(this,n),Ey.call(this,n)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||b.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(b.svgSupported){var t=this._zr;return q(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;q(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return q(n,(function(t){t.group.ignore=!1})),r}Gy(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,i=this.group,n=Math.min,o=Math.max,r=1/0;if($y[i]){var a=r,s=r,l=-1/0,h=-1/0,u=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();q(Ky,(function(r,c){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(H(t)),p=r.getDom().getBoundingClientRect();a=n(p.left,a),s=n(p.top,s),l=o(p.right,l),h=o(p.bottom,h),u.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=c)-(a*=c),p=(h*=c)-(s*=c),f=T.createCanvas(),g=Qo(f,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:p}),e){var m="";return q(u,(function(t){var e=t.left-a,i=t.top-s;m+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new qs({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),q(u,(function(t){var e=new Hs({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}Gy(this.id)},e.prototype.convertToPixel=function(t,e){return Cy(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Cy(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var i;if(!this._disposed)return q(Vr(this._model,t),(function(t,n){n.indexOf("Models")>=0&&q(t,(function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i=i||!!o.containPoint(e);else if("seriesModels"===n){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(i=i||r.containPoint(e,t))}}),this)}),this),!!i;Gy(this.id)},e.prototype.getVisual=function(t,e){var i=Vr(this._model,t,{defaultMainType:"series"}),n=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?n.indexOfRawIndex(i.dataIndex):null;return null!=o?sv(n,o,e):lv(n,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,i,n=this;q(Hy,(function(t){var e=function(e){var i,o=n.getModel(),r=e.target;if("globalout"===t?i={}:r&&dv(r,(function(t){var e=dl(t);if(e&&null!=e.dataIndex){var n=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType,r)||{},!0}if(e.eventData)return i=U({},e.eventData),!0}),!0),i){var a=i.componentType,s=i.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=i.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),h=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,n._$eventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:h},n.trigger(t,i)}};e.zrEventfulCallAtLast=!0,n._zr.on(t,e,n)})),q(Uy,(function(t,e){n._messageCenter.on(e,(function(t){this.trigger(e,t)}),n)})),q(["selectchanged"],(function(t){n._messageCenter.on(t,(function(e){this.trigger(t,e)}),n)})),t=this._messageCenter,e=this,i=this._api,t.on("selectchanged",(function(t){var n=i.getModel();t.isFromClick?(cv("map","selectchanged",e,n,t),cv("pie","selectchanged",e,n,t)):"select"===t.fromAction?(cv("map","selected",e,n,t),cv("pie","selected",e,n,t)):"unselect"===t.fromAction&&(cv("map","unselected",e,n,t),cv("pie","unselected",e,n,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Gy(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Gy(this.id);else{this._disposed=!0,this.getDom()&&jr(this.getDom(),Qy,"");var t=this,e=t._api,i=t._model;q(t._componentsViews,(function(t){t.dispose(i,e)})),q(t._chartsViews,(function(t){t.dispose(i,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Ky[t.id]}},e.prototype.resize=function(t){if(!this[cy])if(this._disposed)Gy(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[dy]&&(null==n&&(n=this[dy].silent),i=!0,this[dy]=null),this[cy]=!0;try{i&&by(this),_y.update.call(this,{type:"resize",animation:U({duration:0},t&&t.animation)})}catch(t){throw this[cy]=!1,t}this[cy]=!1,Ty.call(this,n),Ey.call(this,n)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Gy(this.id);else if(st(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),qy[t]){var i=qy[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){this._disposed?Gy(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=U({},t);return e.type=Uy[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Gy(this.id);else if(st(e)||(e={silent:!!e}),Wy[t.type]&&this._model)if(this[cy])this._pendingActions.push(t);else{var i=e.silent;My.call(this,t,i);var n=e.flush;n?this._zr.flush():!1!==n&&b.browser.weChat&&this._throttledZrFlush(),Ty.call(this,i),Ey.call(this,i)}},e.prototype.updateLabelLayout=function(){ay.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)Gy(this.id);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],i=t.currentStates,n=0;n<i.length;n++){var o=i[n];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),t.hoverState===xl&&t.states.emphasis?e.push("emphasis"):t.hoverState===bl&&t.states.blur&&e.push("blur"),t.useStates(e)}function i(t,e){if(!t.preventAutoZ){var i=t.get("z")||0,o=t.get("zlevel")||0;e.eachRendered((function(t){return n(t,i,o,-1/0),!0}))}}function n(t,e,i,o){var r=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)o=Math.max(n(s[l],e,i,o),o);else t.z=e,t.zlevel=i,o=Math.max(t.z2,o);if(r&&(r.z=e,r.zlevel=i,isFinite(o)&&(r.z2=o+2)),a){var h=t.textGuideLineConfig;a.z=e,a.zlevel=i,isFinite(o)&&(a.z2=o+(h&&h.showAbove?1:-1))}return o}function o(t,e){e.eachRendered((function(t){if(!wh(t)){var e=t.getTextContent(),i=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),i&&i.stateTransition&&(i.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function r(t,i){var n=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),r=n.get("duration"),a=r>0?{duration:r,delay:n.get("delay"),easing:n.get("easing")}:null;i.eachRendered((function(t){if(t.states&&t.states.emphasis){if(wh(t))return;if(t instanceof Ps&&function(t){var e=ml(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var i=t.states.select||{};e.selectFill=i.style&&i.style.fill||null,e.selectStroke=i.style&&i.style.stroke||null}(t),t.__dirty){var i=t.prevStates;i&&t.useStates(i)}if(o){t.stateTransition=a;var n=t.getTextContent(),r=t.getTextGuideLine();n&&(n.stateTransition=a),r&&(r.stateTransition=a)}t.__dirty&&e(t)}}))}by=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),xy(t,!0),xy(t,!1),e.plan()},xy=function(t,e){for(var i=t._model,n=t._scheduler,o=e?t._componentsViews:t._chartsViews,r=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<o.length;l++)o[l].__alive=!1;function h(t){var l=t.__requireNewView;t.__requireNewView=!1;var h="_ec_"+t.id+"_"+t.type,u=!l&&r[h];if(!u){var c=$r(t.type);(u=new(e?af.getClass(c.main,c.sub):gm.getClass(c.sub))).init(i,s),r[h]=u,o.push(u),a.add(u.group)}t.__viewId=u.__id=h,u.__alive=!0,u.__model=t,u.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&n.prepareView(u,t,i,s)}for(e?i.eachComponent((function(t,e){"series"!==t&&h(e)})):i.eachSeries(h),l=0;l<o.length;){var u=o[l];u.__alive?l++:(!e&&u.renderTask.dispose(),a.remove(u.group),u.dispose(i,s),o.splice(l,1),r[u.__id]===u&&delete r[u.__id],u.__id=u.group.__ecComponentInfo=null)}},wy=function(t,e,i,n,o){var r=t._model;if(r.setUpdatePayload(i),n){var a={};a[n+"Id"]=i[n+"Id"],a[n+"Index"]=i[n+"Index"],a[n+"Name"]=i[n+"Name"];var s={mainType:n,query:a};o&&(s.subType=o);var l,h=i.excludeSeriesId;null!=h&&(l=Tt(),q(Tr(h),(function(t){var e=Pr(t,null);null!=e&&l.set(e,!0)}))),r&&r.eachComponent(s,(function(e){if(!l||null==l.get(e.id))if(gh(i))if(e instanceof of)i.type!==Ml||i.notBlur||e.get(["emphasis","disabled"])||function(t,e,i){var n=t.seriesIndex,o=t.getData(e.dataType);if(o){var r=Nr(o,e);r=(it(r)?r[0]:r)||0;var a=o.getItemGraphicEl(r);if(!a)for(var s=o.count(),l=0;!a&&l<s;)a=o.getItemGraphicEl(l++);if(a){var h=dl(a);eh(n,h.focus,h.blurScope,i)}else{var u=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);null!=u&&eh(n,u,c,i)}}}(e,i,t._api);else{var n=nh(e.mainType,e.componentIndex,i.name,t._api),o=n.focusSelf,r=n.dispatchers;i.type===Ml&&o&&!i.notBlur&&ih(e.mainType,e.componentIndex,t._api),r&&q(r,(function(t){i.type===Ml?Yl(t):Zl(t)}))}else fh(i)&&e instanceof of&&(function(t,e,i){if(fh(e)){var n=e.dataType,o=Nr(t.getData(n),e);it(o)||(o=[o]),t[e.type===Dl?"toggleSelect":e.type===El?"select":"unselect"](o,n)}}(e,i,t._api),oh(e),Oy(t))}),t),r&&r.eachComponent(s,(function(e){l&&null!=l.get(e.id)||u(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else q([].concat(t._componentsViews).concat(t._chartsViews),u);function u(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}},_y={prepareAndUpdate:function(t){by(this),_y.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(e,i){var n=this._model,o=this._api,r=this._zr,a=this._coordSysMgr,s=this._scheduler;if(n){n.setUpdatePayload(e),s.restoreData(n,e),s.performSeriesTasks(n),a.create(n,o),s.performDataProcessorTasks(n,e),Sy(this,n),a.update(n,o),t(n),s.performVisualTasks(n,e),ky(this,n,o,e,i);var l=n.get("backgroundColor")||"transparent",h=n.get("darkMode");r.setBackgroundColor(l),null!=h&&"auto"!==h&&r.setDarkMode(h),ay.trigger("afterupdate",n,o)}},updateTransform:function(e){var i=this,n=this._model,o=this._api;if(n){n.setUpdatePayload(e);var r=[];n.eachComponent((function(t,a){if("series"!==t){var s=i.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,n,o,e);l&&l.update&&r.push(s)}else r.push(s)}}));var a=Tt();n.eachSeries((function(t){var r=i._chartsMap[t.__viewId];if(r.updateTransform){var s=r.updateTransform(t,n,o,e);s&&s.update&&a.set(t.uid,1)}else a.set(t.uid,1)})),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),Ly(this,n,o,e,{},a),ay.trigger("afterupdate",n,o)}},updateView:function(e){var i=this._model;i&&(i.setUpdatePayload(e),gm.markUpdateMethod(e,"updateView"),t(i),this._scheduler.performVisualTasks(i,e,{setDirty:!0}),ky(this,i,this._api,e,{}),ay.trigger("afterupdate",i,this._api))},updateVisual:function(e){var i=this,n=this._model;n&&(n.setUpdatePayload(e),n.eachSeries((function(t){t.getData().clearAllVisual()})),gm.markUpdateMethod(e,"updateVisual"),t(n),this._scheduler.performVisualTasks(n,e,{visualType:"visual",setDirty:!0}),n.eachComponent((function(t,o){if("series"!==t){var r=i.getViewOfComponentModel(o);r&&r.__alive&&r.updateVisual(o,n,i._api,e)}})),n.eachSeries((function(t){i._chartsMap[t.__viewId].updateVisual(t,n,i._api,e)})),ay.trigger("afterupdate",n,this._api))},updateLayout:function(t){_y.update.call(this,t)}},Cy=function(t,e,i,n){if(t._disposed)Gy(t.id);else for(var o,r=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=Vr(r,i),l=0;l<a.length;l++){var h=a[l];if(h[e]&&null!=(o=h[e](r,s,n)))return o}},Sy=function(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))},My=function(t,e){var i=this,n=this.getModel(),o=t.type,r=t.escapeConnect,a=Wy[o],s=a.actionInfo,l=(s.update||"update").split(":"),h=l.pop(),u=null!=l[0]&&$r(l[0]);this[cy]=!0;var c=[t],d=!1;t.batch&&(d=!0,c=K(t.batch,(function(e){return(e=j(U({},e),t)).batch=null,e})));var p,f=[],g=fh(t),m=gh(t);if(m&&th(this._api),q(c,(function(e){if((p=(p=a.action(e,i._model,i._api))||U({},e)).type=s.event||p.type,f.push(p),m){var n=Hr(t),o=n.queryOptionMap,r=n.mainTypeSpecified?o.keys()[0]:"series";wy(i,h,e,r),Oy(i)}else g?(wy(i,h,e,"series"),Oy(i)):u&&wy(i,h,e,u.main,u.sub)})),"none"!==h&&!m&&!g&&!u)try{this[dy]?(by(this),_y.update.call(this,t),this[dy]=null):_y[h].call(this,t)}catch(t){throw this[cy]=!1,t}if(p=d?{type:s.event||o,escapeConnect:r,batch:f}:f[0],this[cy]=!1,!e){var v=this._messageCenter;if(v.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:r,selected:rh(n),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};v.trigger(y.type,y)}}},Ty=function(t){for(var e=this._pendingActions;e.length;){var i=e.shift();My.call(this,i,t)}},Ey=function(t){!t&&this.trigger("updated")},Iy=function(t,e){t.on("rendered",(function(i){e.trigger("rendered",i),!t.animation.isFinished()||e[dy]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))},Dy=function(t,e){t.on("mouseover",(function(t){var i=dv(t.target,ph);i&&(function(t,e,i){var n=dl(t),o=nh(n.componentMainType,n.componentIndex,n.componentHighDownName,i),r=o.dispatchers,a=o.focusSelf;r?(a&&ih(n.componentMainType,n.componentIndex,i),q(r,(function(t){return jl(t,e)}))):(eh(n.seriesIndex,n.focus,n.blurScope,i),"self"===n.focus&&ih(n.componentMainType,n.componentIndex,i),jl(t,e))}(i,t,e._api),Oy(e))})).on("mouseout",(function(t){var i=dv(t.target,ph);i&&(function(t,e,i){th(i);var n=dl(t),o=nh(n.componentMainType,n.componentIndex,n.componentHighDownName,i).dispatchers;o?q(o,(function(t){return Xl(t,e)})):Xl(t,e)}(i,t,e._api),Oy(e))})).on("click",(function(t){var i=dv(t.target,(function(t){return null!=dl(t).dataIndex}),!0);if(i){var n=i.selected?"unselect":"select",o=dl(i);e._api.dispatchAction({type:n,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}}))},ky=function(t,e,i,n,o){!function(t){var e=[],i=[],n=!1;if(t.eachComponent((function(t,o){var r=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();n=n||!!s,("series"===t?i:e).push({zlevel:r,z:a,idx:o.componentIndex,type:t,key:s})})),n){var o,r,a=e.concat(i);ri(a,(function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel})),q(a,(function(e){var i=t.getComponent(e.type,e.idx),n=e.zlevel,a=e.key;null!=o&&(n=Math.max(o,n)),a?(n===o&&a!==r&&n++,r=a):r&&(n===o&&n++,r=""),o=n,i.setZLevel(n)}))}}(e),Ay(t,e,i,n,o),q(t._chartsViews,(function(t){t.__alive=!1})),Ly(t,e,i,n,o),q(t._chartsViews,(function(t){t.__alive||t.remove(e,i)}))},Ay=function(t,e,n,a,s,l){q(l||t._componentsViews,(function(t){var s=t.__model;o(0,t),t.render(s,e,n,a),i(s,t),r(s,t)}))},Ly=function(t,e,n,a,s,l){var h=t._scheduler;s=U(s||{},{updatedSeries:e.getSeries()}),ay.trigger("series:beforeupdate",e,n,s);var u=!1;e.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var n=i.renderTask;h.updatePayload(n,a),o(0,i),l&&l.get(e.uid)&&n.dirty(),n.perform(h.getPerformArgs(n))&&(u=!0),i.group.silent=!!e.get("silent"),function(t,e){var i=t.get("blendMode")||null;e.eachRendered((function(t){t.isGroup||(t.style.blend=i)}))}(e,i),oh(e)})),h.unfinished=u||h.unfinished,ay.trigger("series:layoutlabels",e,n,s),ay.trigger("series:transition",e,n,s),e.eachSeries((function(e){var n=t._chartsMap[e.__viewId];i(e,n),r(e,n)})),function(t,e){var i=t._zr.storage,n=0;i.traverse((function(t){t.isGroup||n++})),n>e.get("hoverLayerThreshold")&&!b.node&&!b.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),ay.trigger("series:afterupdate",e,n,s)},Oy=function(t){t[py]=!0,t.getZr().wakeUp()},zy=function(t){t[py]&&(t.getZr().storage.traverse((function(t){wh(t)||e(t)})),t[py]=!1)},Ry=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return m(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}},i.prototype.enterEmphasis=function(e,i){Yl(e,i),Oy(t)},i.prototype.leaveEmphasis=function(e,i){Zl(e,i),Oy(t)},i.prototype.enterBlur=function(e){ql(e),Oy(t)},i.prototype.leaveBlur=function(e){Kl(e),Oy(t)},i.prototype.enterSelect=function(e){$l(e),Oy(t)},i.prototype.leaveSelect=function(e){Jl(e),Oy(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(Xc))(t)},Py=function(t){function e(t,e){for(var i=0;i<t.length;i++)t[i][gy]=e}q(Uy,(function(i,n){t._messageCenter.on(n,(function(i){if($y[t.group]&&0!==t[gy]){if(i&&i.escapeConnect)return;var n=t.makeActionFromEvent(i),o=[];q(Ky,(function(e){e!==t&&e.group===t.group&&o.push(e)})),e(o,0),q(o,(function(t){1!==t[gy]&&t.dispatchAction(n)})),e(o,2)}}))}))}}(),e}(te),Vy=Fy.prototype;Vy.on=my("on"),Vy.off=my("off"),Vy.one=function(t,e,i){var n=this;this.on.call(this,t,(function i(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];e&&e.apply&&e.apply(this,o),n.off(t,i)}),i)};var Hy=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Gy(t){}var Wy={},Uy={},jy=[],Xy=[],Yy=[],Zy={},qy={},Ky={},$y={},Jy=+new Date-0,Qy=(new Date,"_echarts_instance_");function tb(t,e){Zy[t]=e}function eb(t){X(Xy,t)<0&&Xy.push(t)}function ib(t,e){sb(jy,t,e,2e3)}function nb(t,e){ay.on(t,e)}function ob(t,e,i){nt(e)&&(i=e,e="");var n=st(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Uy[e]||(yt(fy.test(n)&&fy.test(e)),Wy[n]||(Wy[n]={action:i,actionInfo:t}),Uy[e]=n)}function rb(t,e){sb(Yy,t,e,3e3,"visual")}var ab=[];function sb(t,e,i,n,o){if((nt(e)||st(e))&&(i=e,e=n),!(X(ab,i)>=0)){ab.push(i);var r=Ym.wrapStageHandler(i,o);r.__prio=e,r.__raw=i,t.push(r)}}function lb(t,e){qy[t]=e}rb(ly,Em),rb(hy,Dm),rb(hy,km),rb(ly,rv),rb(hy,av),rb(7e3,(function(t,e){t.eachRawSeries((function(i){if(!t.isSeriesFiltered(i)){var n=i.getData();n.hasItemVisual()&&n.each((function(t){var i=n.getItemVisual(t,"decal");i&&(n.ensureUniqueItemVisual(t,"style").decal=iy(i,e))}));var o=n.getVisual("decal");o&&(n.getVisual("style").decal=iy(o,e))}}))})),eb(yd),ib(900,(function(t){var e=Tt();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),r={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(r)}})),e.each(bd)})),lb("default",(function(t,e){j(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new qo,n=new qs({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var o,r=new cl({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new qs({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return i.add(a),e.showSpinner&&((o=new mg({shape:{startAngle:-Am/2,endAngle:-Am/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Am/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Am/2}).delay(300).start("circularInOut"),i.add(o)),i.resize=function(){var i=r.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner&&i?0:5+i/2)+(e.showSpinner?0:i/2)+(i?0:s),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:h}),a.setShape({x:l-s,y:h-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i})),ob({type:Ml,event:Ml,update:Ml},At),ob({type:Tl,event:Tl,update:Tl},At),ob({type:El,event:El,update:El},At),ob({type:Il,event:Il,update:Il},At),ob({type:Dl,event:Dl,update:Dl},At),tb("light",qm),tb("dark",ev);var hb=[],ub={registerPreprocessor:eb,registerProcessor:ib,registerPostInit:function(t){nb("afterinit",t)},registerPostUpdate:function(t){nb("afterupdate",t)},registerUpdateLifecycle:nb,registerAction:ob,registerCoordinateSystem:function(t,e){qc.register(t,e)},registerLayout:function(t,e){sb(Yy,t,e,1e3,"layout")},registerVisual:rb,registerTransform:function(t){var e=(t=H(t)).type;e||$d("");var i=e.split(":");2!==i.length&&$d("");var n=!1;"echarts"===i[0]&&(e=i[1],n=!0),t.__isBuiltIn=n,cp.set(e,t)},registerLoading:lb,registerMap:function(t,e,i){var n=sy.registerMap;n&&n(t,e,i)},registerImpl:function(t,e){sy[t]=e},PRIORITY:uy,ComponentModel:uc,ComponentView:af,SeriesModel:of,ChartView:gm,registerComponentModel:function(t){uc.registerClass(t)},registerComponentView:function(t){af.registerClass(t)},registerSeriesModel:function(t){of.registerClass(t)},registerChartView:function(t){gm.registerClass(t)},registerSubTypeDefaulter:function(t,e){uc.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){var i;i=e,Ko[t]=i}};function cb(t){it(t)?q(t,(function(t){cb(t)})):X(hb,t)>=0||(hb.push(t),nt(t)&&(t={install:t}),t.install(ub))}var db=2*Math.PI,pb=ps.CMD,fb=["top","right","bottom","left"];function gb(t,e,i,n,o){var r=i.width,a=i.height;switch(t){case"top":n.set(i.x+r/2,i.y-e),o.set(0,-1);break;case"bottom":n.set(i.x+r/2,i.y+a+e),o.set(0,1);break;case"left":n.set(i.x-e,i.y+a/2),o.set(-1,0);break;case"right":n.set(i.x+r+e,i.y+a/2),o.set(1,0)}}function mb(t,e,i,n,o,r,a,s,l){a-=t,s-=e;var h=Math.sqrt(a*a+s*s),u=(a/=h)*i+t,c=(s/=h)*i+e;if(Math.abs(n-o)%db<1e-4)return l[0]=u,l[1]=c,h-i;if(r){var d=n;n=ys(o),o=ys(d)}else n=ys(n),o=ys(o);n>o&&(o+=db);var p=Math.atan2(s,a);if(p<0&&(p+=db),p>=n&&p<=o||p+db>=n&&p+db<=o)return l[0]=u,l[1]=c,h-i;var f=i*Math.cos(n)+t,g=i*Math.sin(n)+e,m=i*Math.cos(o)+t,v=i*Math.sin(o)+e,y=(f-a)*(f-a)+(g-s)*(g-s),b=(m-a)*(m-a)+(v-s)*(v-s);return y<b?(l[0]=f,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(b))}function vb(t,e,i,n,o,r,a,s){var l=o-t,h=r-e,u=i-t,c=n-e,d=Math.sqrt(u*u+c*c),p=(l*(u/=d)+h*(c/=d))/d;s&&(p=Math.min(Math.max(p,0),1)),p*=d;var f=a[0]=t+p*u,g=a[1]=e+p*c;return Math.sqrt((f-o)*(f-o)+(g-r)*(g-r))}function yb(t,e,i,n,o,r,a){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n);var s=t+i,l=e+n,h=a[0]=Math.min(Math.max(o,t),s),u=a[1]=Math.min(Math.max(r,e),l);return Math.sqrt((h-o)*(h-o)+(u-r)*(u-r))}var bb=[];function xb(t,e,i){var n=yb(e.x,e.y,e.width,e.height,t.x,t.y,bb);return i.set(bb[0],bb[1]),n}function wb(t,e,i){for(var n,o,r=0,a=0,s=0,l=0,h=1/0,u=e.data,c=t.x,d=t.y,p=0;p<u.length;){var f=u[p++];1===p&&(s=r=u[p],l=a=u[p+1]);var g=h;switch(f){case pb.M:r=s=u[p++],a=l=u[p++];break;case pb.L:g=vb(r,a,u[p],u[p+1],c,d,bb,!0),r=u[p++],a=u[p++];break;case pb.C:g=Li(r,a,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],c,d,bb),r=u[p++],a=u[p++];break;case pb.Q:g=Bi(r,a,u[p++],u[p++],u[p],u[p+1],c,d,bb),r=u[p++],a=u[p++];break;case pb.A:var m=u[p++],v=u[p++],y=u[p++],b=u[p++],x=u[p++],w=u[p++];p+=1;var _=!!(1-u[p++]);n=Math.cos(x)*y+m,o=Math.sin(x)*b+v,p<=1&&(s=n,l=o),g=mb(m,v,b,x,x+w,_,(c-m)*b/y+m,d,bb),r=Math.cos(x+w)*y+m,a=Math.sin(x+w)*b+v;break;case pb.R:g=yb(s=r=u[p++],l=a=u[p++],u[p++],u[p++],c,d,bb);break;case pb.Z:g=vb(r,a,s,l,c,d,bb,!0),r=s,a=l}g<h&&(h=g,i.set(bb[0],bb[1]))}return h}var _b=new Le,Cb=new Le,Sb=new Le,Mb=new Le,Tb=new Le;function Eb(t,e){if(t){var i=t.getTextGuideLine(),n=t.getTextContent();if(n&&i){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||fb,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,h=o.anchor,u=t.getComputedTransform(),c=u&&ke([],u),d=e.get("length2")||0;h&&Sb.copy(h);for(var p=0;p<a.length;p++){gb(a[p],0,s,_b,Mb),Le.scaleAndAdd(Cb,_b,Mb,d),Cb.transform(c);var f=t.getBoundingRect(),g=h?h.distance(Cb):t instanceof Ps?wb(Cb,t.path,Sb):xb(Cb,f,Sb);g<l&&(l=g,Cb.transform(u),Sb.transform(u),Sb.toArray(r[0]),Cb.toArray(r[1]),_b.toArray(r[2]))}kb(r,e.get("minTurnAngle")),i.setShape({points:r})}}}var Ib=[],Db=new Le;function kb(t,e){if(e<=180&&e>0){e=e/180*Math.PI,_b.fromArray(t[0]),Cb.fromArray(t[1]),Sb.fromArray(t[2]),Le.sub(Mb,_b,Cb),Le.sub(Tb,Sb,Cb);var i=Mb.len(),n=Tb.len();if(!(i<.001||n<.001)){Mb.scale(1/i),Tb.scale(1/n);var o=Mb.dot(Tb);if(Math.cos(e)<o){var r=vb(Cb.x,Cb.y,Sb.x,Sb.y,_b.x,_b.y,Ib,!1);Db.fromArray(Ib),Db.scaleAndAdd(Tb,r/Math.tan(Math.PI-e));var a=Sb.x!==Cb.x?(Db.x-Cb.x)/(Sb.x-Cb.x):(Db.y-Cb.y)/(Sb.y-Cb.y);if(isNaN(a))return;a<0?Le.copy(Db,Cb):a>1&&Le.copy(Db,Sb),Db.toArray(t[1])}}}}function Ab(t,e,i){if(i<=180&&i>0){i=i/180*Math.PI,_b.fromArray(t[0]),Cb.fromArray(t[1]),Sb.fromArray(t[2]),Le.sub(Mb,Cb,_b),Le.sub(Tb,Sb,Cb);var n=Mb.len(),o=Tb.len();if(!(n<.001||o<.001)&&(Mb.scale(1/n),Tb.scale(1/o),Mb.dot(e)<Math.cos(i))){var r=vb(Cb.x,Cb.y,Sb.x,Sb.y,_b.x,_b.y,Ib,!1);Db.fromArray(Ib);var a=Math.PI/2,s=a+Math.acos(Tb.dot(e))-i;if(s>=a)Le.copy(Db,Sb);else{Db.scaleAndAdd(Tb,r/Math.tan(Math.PI/2-s));var l=Sb.x!==Cb.x?(Db.x-Cb.x)/(Sb.x-Cb.x):(Db.y-Cb.y)/(Sb.y-Cb.y);if(isNaN(l))return;l<0?Le.copy(Db,Cb):l>1&&Le.copy(Db,Sb)}Db.toArray(t[1])}}}function Lb(t,e,i,n){var o="normal"===i,r=o?t:t.ensureState(i);r.ignore=e;var a=n.get("smooth");a&&!0===a&&(a=.3),r.shape=r.shape||{},a>0&&(r.shape.smooth=a);var s=n.getModel("lineStyle").getLineStyle();o?t.useStyle(s):r.style=s}function Rb(t,e){var i=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),i>0&&n.length>=3){var o=Ut(n[0],n[1]),r=Ut(n[1],n[2]);if(!o||!r)return t.lineTo(n[1][0],n[1][1]),void t.lineTo(n[2][0],n[2][1]);var a=Math.min(o,r)*i,s=Xt([],n[1],n[0],a/o),l=Xt([],n[1],n[2],a/r),h=Xt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],h[0],h[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var u=1;u<n.length;u++)t.lineTo(n[u][0],n[u][1])}function Pb(t,e,i){var n=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<_l.length;l++){var h=_l[l],u=e[h],c="normal"===h;if(u){var d=u.get("show");if((c?s:ft(o.states[h]&&o.states[h].ignore,s))||!ft(d,a)){var p=c?n:n&&n.states[h];p&&(p.ignore=!0);continue}n||(n=new og,t.setTextGuideLine(n),c||!s&&a||Lb(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),Lb(n,!1,h,u)}}if(n){j(n.style,i),n.style.fill=null;var f=r.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=f||!1,n.buildPath=Rb}}else n&&t.removeTextGuideLine()}function Ob(t,e){e=e||"labelLine";for(var i={normal:t.getModel(e)},n=0;n<wl.length;n++){var o=wl[n];i[o]=t.getModel([o,e])}return i}function zb(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];if(!n.defaultAttr.ignore){var o=n.label,r=o.getComputedTransform(),a=o.getBoundingRect(),s=!r||r[1]<1e-5&&r[2]<1e-5,l=o.style.margin||0,h=a.clone();h.applyTransform(r),h.x-=l/2,h.y-=l/2,h.width+=l,h.height+=l;var u=s?new Eg(a,r):null;e.push({label:o,labelLine:n.labelLine,rect:h,localRect:a,obb:u,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:r})}}return e}function Nb(t,e,i,n,o,r){var a=t.length;if(!(a<2)){t.sort((function(t,i){return t.rect[e]-i.rect[e]}));for(var s,l=0,h=!1,u=[],c=0,d=0;d<a;d++){var p=t[d],f=p.rect;(s=f[e]-l)<0&&(f[e]-=s,p.label[e]-=s,h=!0);var g=Math.max(-s,0);u.push(g),c+=g,l=f[e]+f[i]}c>0&&r&&_(-c/a,0,a);var m,v,y=t[0],b=t[a-1];return x(),m<0&&C(-m,.8),v<0&&C(v,.8),x(),w(m,v,1),w(v,m,-1),x(),m<0&&S(-m),v<0&&S(v),h}function x(){m=y.rect[e]-n,v=o-b.rect[e]-b.rect[i]}function w(t,e,i){if(t<0){var n=Math.min(e,-t);if(n>0){_(n*i,0,a);var o=n+t;o<0&&C(-o*i,1)}else C(-t*i,1)}}function _(i,n,o){0!==i&&(h=!0);for(var r=n;r<o;r++){var a=t[r];a.rect[e]+=i,a.label[e]+=i}}function C(n,o){for(var r=[],s=0,l=1;l<a;l++){var h=t[l-1].rect,u=Math.max(t[l].rect[e]-h[e]-h[i],0);r.push(u),s+=u}if(s){var c=Math.min(Math.abs(n)/s,o);if(n>0)for(l=0;l<a-1;l++)_(r[l]*c,0,l+1);else for(l=a-1;l>0;l--)_(-r[l-1]*c,l,a)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var i=Math.ceil(t/(a-1)),n=0;n<a-1;n++)if(e>0?_(i,0,n+1):_(-i,a-n-1,a),(t-=i)<=0)return}}function Bb(t,e,i,n){return Nb(t,"y","height",e,i,n)}function Fb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var i=new Ge(0,0,0,0);function n(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var o=0;o<t.length;o++){var r=t[o],a=r.axisAligned,s=r.localRect,l=r.transform,h=r.label,u=r.labelLine;i.copy(r.rect),i.width-=.1,i.height-=.1,i.x+=.05,i.y+=.05;for(var c=r.obb,d=!1,p=0;p<e.length;p++){var f=e[p];if(i.intersect(f.rect)){if(a&&f.axisAligned){d=!0;break}if(f.obb||(f.obb=new Eg(f.localRect,f.transform)),c||(c=new Eg(s,l)),c.intersect(f.obb)){d=!0;break}}}d?(n(h),u&&n(u)):(h.attr("ignore",r.defaultAttr.ignore),u&&u.attr("ignore",r.defaultAttr.labelGuideIgnore),e.push(r))}}function Vb(t){if(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].slice());return e}}function Hb(t,e){var i=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:i.style.align,verticalAlign:i.style.verticalAlign,labelLinePoints:Vb(n&&n.shape.points)}}var Gb=["align","verticalAlign","width","height","fontSize"],Wb=new Eo,Ub=Br(),jb=Br();function Xb(t,e,i){for(var n=0;n<i.length;n++){var o=i[n];null!=e[o]&&(t[o]=e[o])}}var Yb=["x","y","rotation"],Zb=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,i,n,o){var r=n.style,a=n.__hostTarget.textConfig||{},s=n.getComputedTransform(),l=n.getBoundingRect().plain();Ge.applyTransform(l,l,s),s?Wb.setLocalTransform(s):(Wb.x=Wb.y=Wb.rotation=Wb.originX=Wb.originY=0,Wb.scaleX=Wb.scaleY=1),Wb.rotation=ys(Wb.rotation);var h,u=n.__hostTarget;if(u){h=u.getBoundingRect().plain();var c=u.getComputedTransform();Ge.applyTransform(h,h,c)}var d=h&&u.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:i,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:Wb.x,y:Wb.y,scaleX:Wb.scaleX,scaleY:Wb.scaleY,rotation:Wb.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:n.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var i=t.__model,n=i.get("labelLayout");(nt(n)||Q(n).length)&&t.group.traverse((function(t){if(t.ignore)return!0;var o=t.getTextContent(),r=dl(t);o&&!o.disableLabelLayout&&e._addLabel(r.dataIndex,r.dataType,i,o,n)}))},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),i=t.getHeight();function n(t,e){return function(){Eb(t,e)}}for(var o=0;o<this._labelList.length;o++){var r=this._labelList[o],a=r.label,s=a.__hostTarget,l=r.defaultAttr,h=void 0;h=(h=nt(r.layoutOption)?r.layoutOption(Hb(r,s)):r.layoutOption)||{},r.computedLayoutOption=h;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=h.x||null!=h.y?null:l.attachedPos,rotation:null!=h.rotate?h.rotate*u:l.attachedRot,offset:[h.dx||0,h.dy||0]});var c=!1;if(null!=h.x?(a.x=nr(h.x,e),a.setStyle("x",0),c=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=h.y?(a.y=nr(h.y,i),a.setStyle("y",0),c=!0):(a.y=l.y,a.setStyle("y",l.style.y)),h.labelLinePoints){var d=s.getTextGuideLine();d&&(d.setShape({points:h.labelLinePoints}),c=!1)}Ub(a).needsUpdateLabelLine=c,a.rotation=null!=h.rotate?h.rotate*u:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<Gb.length;p++){var f=Gb[p];a.setStyle(f,null!=h[f]?h[f]:l.style[f])}if(h.draggable){if(a.draggable=!0,a.cursor="move",s){var g=r.seriesModel;null!=r.dataIndex&&(g=r.seriesModel.getData(r.dataType).getItemModel(r.dataIndex)),a.on("drag",n(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),i=t.getHeight(),n=zb(this._labelList),o=J(n,(function(t){return"shiftX"===t.layoutOption.moveOverlap})),r=J(n,(function(t){return"shiftY"===t.layoutOption.moveOverlap}));Nb(o,"x","width",0,e,void 0),Bb(r,0,i),Fb(J(n,(function(t){return t.layoutOption.hideOverlap})))},t.prototype.processLabelsOverall=function(){var t=this;q(this._chartViewList,(function(e){var i=e.__model,n=e.ignoreLabelLineUpdate,o=i.isAnimationEnabled();e.group.traverse((function(e){if(e.ignore&&!e.forceLabelAnimation)return!0;var r=!n,a=e.getTextContent();!r&&a&&(r=Ub(a).needsUpdateLabelLine),r&&t._updateLabelLine(e,i),o&&t._animateLabels(e,i)}))}))},t.prototype._updateLabelLine=function(t,e){var i=t.getTextContent(),n=dl(t),o=n.dataIndex;if(i&&null!=o){var r=e.getData(n.dataType),a=r.getItemModel(o),s={},l=r.getItemVisual(o,"style");if(l){var h=r.getVisual("drawType");s.stroke=l[h]}var u=a.getModel("labelLine");Pb(t,Ob(a),s),Eb(t,u)}},t.prototype._animateLabels=function(t,e){var i=t.getTextContent(),n=t.getTextGuideLine();if(i&&(t.forceLabelAnimation||!i.ignore&&!i.invisible&&!t.disableLabelAnimation&&!wh(t))){var o=(p=Ub(i)).oldLayout,r=dl(t),a=r.dataIndex,s={x:i.x,y:i.y,rotation:i.rotation},l=e.getData(r.dataType);if(o){i.attr(o);var h=t.prevStates;h&&(X(h,"select")>=0&&i.attr(p.oldLayoutSelect),X(h,"emphasis")>=0&&i.attr(p.oldLayoutEmphasis)),bh(i,s,e,a)}else if(i.attr(s),!Bh(i).valueAnimation){var u=ft(i.style.opacity,1);i.style.opacity=0,xh(i,{style:{opacity:u}},e,a)}if(p.oldLayout=s,i.states.select){var c=p.oldLayoutSelect={};Xb(c,s,Yb),Xb(c,i.states.select,Yb)}if(i.states.emphasis){var d=p.oldLayoutEmphasis={};Xb(d,s,Yb),Xb(d,i.states.emphasis,Yb)}Vh(i,a,l,e,e)}if(n&&!n.ignore&&!n.invisible){o=(p=jb(n)).oldLayout;var p,f={points:n.shape.points};o?(n.attr({shape:o}),bh(n,{shape:f},e)):(n.setShape(f),n.style.strokePercent=0,xh(n,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}();const qb=Zb;var Kb=Br();function $b(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,i){var n=Kb(e).labelManager;n||(n=Kb(e).labelManager=new qb),n.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,i){var n=Kb(e).labelManager;i.updatedSeries.forEach((function(t){n.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()}))}function Jb(t,e,i){var n=T.createCanvas(),o=e.getWidth(),r=e.getHeight(),a=n.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=r+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=r*i,n}cb($b);var Qb=function(t){function e(e,i,n){var o,r=t.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null,n=n||go,"string"==typeof e?o=Jb(e,i,n):st(e)&&(e=(o=e).id),r.id=e,r.dom=o;var a=o.style;return a&&(Dt(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),r.painter=i,r.dpr=n,r}return m(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Jb("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,r=[],a=this.maxRepaintRectCount,s=!1,l=new Ge(0,0,0,0);function h(t){if(t.isFinite()&&!t.isZero())if(0===r.length)(e=new Ge(0,0,0,0)).copy(t),r.push(e);else{for(var e,i=!1,n=1/0,o=0,h=0;h<r.length;++h){var u=r[h];if(u.intersect(t)){var c=new Ge(0,0,0,0);c.copy(u),c.union(t),r[h]=c,i=!0;break}if(s){l.copy(t),l.union(u);var d=t.width*t.height,p=u.width*u.height,f=l.width*l.height-d-p;f<n&&(n=f,o=h)}}s&&(r[o].union(t),i=!0),i||((e=new Ge(0,0,0,0)).copy(t),r.push(e)),s||(s=r.length>=a)}}for(var u=this.__startIndex;u<this.__endIndex;++u)if(p=t[u]){var c=p.shouldBePainted(i,n,!0,!0);(f=p.__isRendered&&(p.__dirty&ai||!c)?p.getPrevPaintRect():null)&&h(f);var d=c&&(p.__dirty&ai||!p.__isRendered)?p.getPaintRect():null;d&&h(d)}for(u=this.__prevStartIndex;u<this.__prevEndIndex;++u){var p,f;c=(p=e[u]).shouldBePainted(i,n,!0,!0),!p||c&&p.__zr||!p.__isRendered||(f=p.getPrevPaintRect())&&h(f)}do{for(o=!1,u=0;u<r.length;)if(r[u].isZero())r.splice(u,1);else{for(var g=u+1;g<r.length;)r[u].intersect(r[g])?(o=!0,r[u].union(r[g]),r.splice(g,1)):g++;u++}}while(o);return this._paintRects=r,r},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,e){var i=this.dpr,n=this.dom,o=n.style,r=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,r&&(r.width=t*i,r.height=e*i,1!==i&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,e,i){var n=this.dom,o=this.ctx,r=n.width,a=n.height;e=e||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,r/h,a/h));var c=this.domBack;function d(t,i,n,r){if(o.clearRect(t,i,n,r),e&&"transparent"!==e){var a=void 0;ct(e)?(a=(e.global||e.__width===n&&e.__height===r)&&e.__canvasGradient||Dv(o,e,{x:0,y:0,width:n,height:r}),e.__canvasGradient=a,e.__width=n,e.__height=r):null!=e.image&&(e.scaleX=e.scaleX||h,e.scaleY=e.scaleY||h,a=Fv(o,e,{dirty:function(){u.setUnpainted(),u.__painter.refresh()}})),o.save(),o.fillStyle=a||e,o.fillRect(t,i,n,r),o.restore()}s&&(o.save(),o.globalAlpha=l,o.drawImage(c,t,i,n,r),o.restore())}!i||s?d(0,0,r,a):i.length&&q(i,(function(t){d(t.x*h,t.y*h,t.width*h,t.height*h)}))},e}(te);const tx=Qb;var ex=1e5,ix=314159,nx=.01,ox=function(){function t(t,e,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=U({},i||{}),this.dpr=i.devicePixelRatio||go,this._singleCanvas=o,this.root=t,t.style&&(Dt(t),t.innerHTML=""),this.storage=e;var r=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(o){var s=t,l=s.width,h=s.height;null!=i.width&&(l=i.width),null!=i.height&&(h=i.height),this.dpr=i.devicePixelRatio||1,s.width=l*this.dpr,s.height=h*this.dpr,this._width=l,this._height=h;var u=new tx(s,this,this.dpr);u.__builtin__=!0,u.initContext(),a[314159]=u,u.zlevel=ix,r.push(ix),this._domRoot=t}else{this._width=Av(t,0,i),this._height=Av(t,1,i);var c=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(c)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var o=0;o<n.length;o++){var r=n[o],a=this._layers[r];if(!a.__builtin__&&a.refresh){var s=0===o?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){for(var n,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<e;r++){var a=t[r];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(ex)),n||(n=i.ctx).save(),Jv(n,a,o,r===e-1))}n&&n.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(ex)},t.prototype.paintOne=function(t,e){$v(t,e)},t.prototype._paintList=function(t,e,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(t);var o=this._doPaintList(t,e,i),r=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),r)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var s=this;pi((function(){s._paintList(t,e,i,n)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(ix).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer((function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)}))},t.prototype._doPaintList=function(t,e,i){for(var n=this,o=[],r=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||i)&&o.push(l)}for(var h=!0,u=!1,c=function(a){var s,l=o[a],c=l.ctx,p=r&&l.createRepaintRects(t,e,d._width,d._height),f=i?l.__startIndex:l.__drawIndex,g=!i&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(f===l.__startIndex){var y=t[f];y.incremental&&y.notClear&&!i||l.clear(!1,v,p)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var b=function(e){var i={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(s=f;s<l.__endIndex;s++){var o=t[s];if(o.__inHover&&(u=!0),n._doPaintEl(o,l,r,e,i,s===l.__endIndex-1),g&&Date.now()-m>15)break}i.prevElClipPaths&&c.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=d.dpr,w=0;w<p.length;++w){var _=p[w];c.save(),c.beginPath(),c.rect(_.x*x,_.y*x,_.width*x,_.height*x),c.clip(),b(_),c.restore()}else c.save(),b(),c.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(h=!1)},d=this,p=0;p<o.length;p++)c(p);return b.wxa&&q(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:h,needsRefreshHover:u}},t.prototype._doPaintEl=function(t,e,i,n,o,r){var a=e.ctx;if(i){var s=t.getPaintRect();(!n||s&&s.intersect(n))&&(Jv(a,t,o,r),t.setPrevPaintRect(s))}else Jv(a,t,o,r)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ix);var i=this._layers[t];return i||((i=new tx("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?G(i,this._layerConfig[t],!0):this._layerConfig[t-nx]&&G(i,this._layerConfig[t-nx],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},t.prototype.insertLayer=function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,r=this._domRoot,a=null,s=-1;if(!i[t]&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(o>0&&t>n[0]){for(s=0;s<o-1&&!(n[s]<t&&n[s+1]>t);s++);a=i[n[s]]}if(n.splice(s+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?r.insertBefore(e.dom,l.nextSibling):r.appendChild(e.dom)}else r.firstChild?r.insertBefore(e.dom,r.firstChild):r.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n];t.call(e,this._layers[o],o)}},t.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},t.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var o=i[n],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++)if((s=t[i]).zlevel!==t[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}var n,o,r=null,a=0;for(o=0;o<t.length;o++){var s,l=(s=t[o]).zlevel,h=void 0;n!==l&&(n=l,a=0),s.incremental?((h=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):h=this.getLayer(l+(a>0?nx:0),this._needsManuallyCompositing),h.__builtin__||V("ZLevel "+l+" has been used by unkown layer "+h.id),h!==r&&(h.__used=!0,h.__startIndex!==o&&(h.__dirty=!0),h.__startIndex=o,h.incremental?h.__drawIndex=-1:h.__drawIndex=o,e(o),r=h),s.__dirty&ai&&!s.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,q(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?G(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];o!==t&&o!==t+nx||G(this._layers[o],i[t],!0)}}},t.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(X(i,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,o=this.root;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=Av(o,0,n),e=Av(o,1,n),i.style.display="",this._width!==t||e!==this._height){for(var r in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(ix).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new tx("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,o=e.dom.height;this.eachLayer((function(t){t.__builtin__?i.drawImage(t.dom,0,0,n,o):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())}))}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var h=a[s];Jv(i,h,r,s===l-1)}return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();const rx=ox;var ax=Math.sin,sx=Math.cos,lx=Math.PI,hx=2*Math.PI,ux=180/lx,cx=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){this._add("C",t,e,i,n,o,r)},t.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},t.prototype.arc=function(t,e,i,n,o,r){this.ellipse(t,e,i,i,0,n,o,r)},t.prototype.ellipse=function(t,e,i,n,o,r,a,s){var l,h=a-r,u=!s,c=Math.abs(h),d=bn(c-hx)||(u?h>=hx:-h>=hx),p=h>0?h%hx:h%hx+hx;l=!!d||!bn(c)&&p>=lx==!!u;var f=t+i*sx(r),g=e+n*ax(r);this._start&&this._add("M",f,g);var m=Math.round(o*ux);if(d){var v=1/this._p,y=(u?1:-1)*(hx-v);this._add("A",i,n,m,1,+u,t+i*sx(r+y),e+n*ax(r+y)),v>.01&&this._add("A",i,n,m,0,+u,f,g)}else{var b=t+i*sx(a),x=e+n*ax(a);this._add("A",i,n,m,+l,+u,b,x)}},t.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,i,n,o,r,a,s,l){for(var h=[],u=this._p,c=1;c<arguments.length;c++){var d=arguments[c];if(isNaN(d))return void(this._invalid=!0);h.push(Math.round(d*u)/u)}this._d.push(t+h.join(" ")),this._start="Z"===t},t.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},t.prototype.getStr=function(){return this._str},t}();const dx=cx;var px="none",fx=Math.round,gx=["lineCap","miterLimit","lineJoin"],mx=K(gx,(function(t){return"stroke-"+t.toLowerCase()}));var vx="http://www.w3.org/2000/svg",yx="http://www.w3.org/1999/xlink",bx="http://www.w3.org/2000/xmlns/",xx="http://www.w3.org/XML/1998/namespace";function _x(t){return document.createElementNS(vx,t)}function Cx(t,e,i,n,o){return{tag:t,attrs:i||{},children:n,text:o,key:e}}function Sx(t,e){var i=(e=e||{}).newline?"\n":"";return function t(e){var n=e.children,o=e.tag,r=e.attrs,a=e.text;return function(t,e){var i=[];if(e)for(var n in e){var o=e[n],r=n;!1!==o&&(!0!==o&&null!=o&&(r+='="'+o+'"'),i.push(r))}return"<"+t+" "+i.join(" ")+">"}(o,r)+("style"!==o?ue(a):a||"")+(n?""+i+K(n,(function(e){return t(e)})).join(i)+i:"")+"</"+o+">"}(t)}function Mx(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Tx(t,e,i,n){return Cx("svg","root",{width:t,height:e,xmlns:vx,"xmlns:xlink":yx,version:"1.1",baseProfile:"full",viewBox:!!n&&"0 0 "+t+" "+e},i)}var Ex={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ix="transform-origin";function Dx(t,e,i){var n=U({},t.shape);U(n,e),t.buildPath(i,n);var o=new dx;return o.reset(Dn(t)),i.rebuildPath(o,1),o.generateStr(),o.getStr()}function kx(t,e){var i=e.originX,n=e.originY;(i||n)&&(t[Ix]=i+"px "+n+"px")}var Ax={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Lx(t,e){var i=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[i]=t,i}function Rx(t){return ot(t)?Ex[t]?"cubic-bezier("+Ex[t]+")":Hi(t)?t:"":""}function Px(t,e,i,n){var o=t.animators,r=o.length,a=[];if(t instanceof yg){var s=function(t,e,i){var n,o,r=t.shape.paths,a={};if(q(r,(function(t){var e=Mx(i.zrId);e.animation=!0,Px(t,{},e,!0);var r=e.cssAnims,s=e.cssNodes,l=Q(r),h=l.length;if(h){var u=r[o=l[h-1]];for(var c in u){var d=u[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(o)>=0&&(n=f)}}})),n){e.d=!1;var s=Lx(a,i);return n.replace(o,s)}}(t,e,i);if(s)a.push(s);else if(!r)return}else if(!r)return;for(var l={},h=0;h<r;h++){var u=o[h],c=[u.getMaxTime()/1e3+"s"],d=Rx(u.getClip().easing),p=u.getDelay();d?c.push(d):c.push("linear"),p&&c.push(p/1e3+"s"),u.getLoop()&&c.push("infinite");var f=c.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(u)}function g(o){var r,a=o[1],s=a.length,l={},h={},u={},c="animation-timing-function";function d(t,e,i){for(var n=t.getTracks(),o=t.getMaxTime(),r=0;r<n.length;r++){var a=n[r];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(i&&(l=i(l)),l)for(var h=0;h<s.length;h++){var u=s[h],d=Math.round(u.time/o*100)+"%",p=Rx(u.easing),f=u.rawValue;(ot(f)||at(f))&&(e[d]=e[d]||{},e[d][l]=u.rawValue,p&&(e[d][c]=p))}}}}for(var p=0;p<s;p++)(C=(_=a[p]).targetName)?"shape"===C&&d(_,h):!n&&d(_,l);for(var f in l){var g={};To(g,t),U(g,l[f]);var m=kn(g),v=l[f][c];u[f]=m?{transform:m}:{},kx(u[f],g),v&&(u[f][c]=v)}var y=!0;for(var f in h){u[f]=u[f]||{};var b=!r;v=h[f][c],b&&(r=new ps);var x=r.len();r.reset(),u[f].d=Dx(t,h[f],r);var w=r.len();if(!b&&x!==w){y=!1;break}v&&(u[f][c]=v)}if(!y)for(var f in u)delete u[f].d;if(!n)for(p=0;p<s;p++){var _,C;"style"===(C=(_=a[p]).targetName)&&d(_,u,(function(t){return Ax[t]}))}var S,M=Q(u),T=!0;for(p=1;p<M.length;p++){var E=M[p-1],I=M[p];if(u[E][Ix]!==u[I][Ix]){T=!1;break}S=u[E][Ix]}if(T&&S){for(var f in u)u[f][Ix]&&delete u[f][Ix];e[Ix]=S}if(J(M,(function(t){return Q(u[t]).length>0})).length)return Lx(u,i)+" "+o[0]+" both"}for(var m in l)(s=g(l[m]))&&a.push(s);if(a.length){var v=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+v]={animation:a.join(",")},e.class=v}}var Ox=Math.round;function zx(t){return t&&ot(t.src)}function Nx(t){return t&&nt(t.toDataURL)}function Bx(t,e,i,n){(function(t,e,i,n){var o=null==e.opacity?1:e.opacity;if(i instanceof Hs)t("opacity",o);else{if(function(t){var e=t.fill;return null!=e&&e!==px}(e)){var r=vn(e.fill);t("fill",r.color);var a=null!=e.fillOpacity?e.fillOpacity*r.opacity*o:r.opacity*o;(n||a<1)&&t("fill-opacity",a)}else t("fill",px);if(function(t){var e=t.stroke;return null!=e&&e!==px}(e)){var s=vn(e.stroke);t("stroke",s.color);var l=e.strokeNoScale?i.getLineScale():1,h=l?(e.lineWidth||0)/l:0,u=null!=e.strokeOpacity?e.strokeOpacity*s.opacity*o:s.opacity*o,c=e.strokeFirst;if((n||1!==h)&&t("stroke-width",h),(n||c)&&t("paint-order",c?"stroke":"fill"),(n||u<1)&&t("stroke-opacity",u),e.lineDash){var d=Lv(i),p=d[0],f=d[1];p&&(f=fx(f||0),t("stroke-dasharray",p.join(",")),(f||n)&&t("stroke-dashoffset",f))}else n&&t("stroke-dasharray",px);for(var g=0;g<gx.length;g++){var m=gx[g];if(n||e[m]!==ks[m]){var v=e[m]||ks[m];v&&t(mx[g],v)}}}else n&&t("stroke",px)}})((function(o,r){var a="fill"===o||"stroke"===o;a&&En(r)?Zx(e,t,o,n):a&&Sn(r)?qx(i,t,o,n):t[o]=r}),e,i,!1),function(t,e,i){var n=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(n)){var o=function(t){var e=t.style,i=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(",")}(t),r=i.shadowCache,a=r[o];if(!a){var s=t.getGlobalScale(),l=s[0],h=s[1];if(!l||!h)return;var u=n.shadowOffsetX||0,c=n.shadowOffsetY||0,d=n.shadowBlur,p=vn(n.shadowColor),f=p.opacity,g=p.color,m=d/2/l+" "+d/2/h;a=i.zrId+"-s"+i.shadowIdx++,i.defs[a]=Cx("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Cx("feDropShadow","",{dx:u/l,dy:c/h,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),r[o]=a}e.filter=In(a)}}(i,t,n)}function Fx(t){return bn(t[0]-1)&&bn(t[1])&&bn(t[2])&&bn(t[3]-1)}function Vx(t,e,i){if(e&&(!function(t){return bn(t[4])&&bn(t[5])}(e)||!Fx(e))){var n=i?10:1e4;t.transform=Fx(e)?"translate("+Ox(e[4]*n)/n+" "+Ox(e[5]*n)/n+")":function(t){return"matrix("+xn(t[0])+","+xn(t[1])+","+xn(t[2])+","+xn(t[3])+","+wn(t[4])+","+wn(t[5])+")"}(e)}}function Hx(t,e,i){for(var n=t.points,o=[],r=0;r<n.length;r++)o.push(Ox(n[r][0]*i)/i),o.push(Ox(n[r][1]*i)/i);e.points=o.join(" ")}function Gx(t){return!t.smooth}var Wx,Ux,jx={circle:[(Wx=["cx","cy","r"],Ux=K(Wx,(function(t){return"string"==typeof t?[t,t]:t})),function(t,e,i){for(var n=0;n<Ux.length;n++){var o=Ux[n],r=t[o[0]];null!=r&&(e[o[1]]=Ox(r*i)/i)}})],polyline:[Hx,Gx],polygon:[Hx,Gx]};function Xx(t,e){var i=t.style,n=t.shape,o=jx[t.type],r={},a=e.animation,s="path",l=t.style.strokePercent,h=e.compress&&Dn(t)||4;if(!o||e.willUpdate||o[1]&&!o[1](n)||a&&function(t){for(var e=t.animators,i=0;i<e.length;i++)if("shape"===e[i].targetName)return!0;return!1}(t)||l<1){var u=!t.path||t.shapeChanged();t.path||t.createPathProxy();var c=t.path;u&&(c.beginPath(),t.buildPath(c,t.shape),t.pathUpdated());var d=c.getVersion(),p=t,f=p.__svgPathBuilder;p.__svgPathVersion===d&&f&&l===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new dx),f.reset(h),c.rebuildPath(f,l),f.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),r.d=f.getStr()}else{s=t.type;var g=Math.pow(10,h);o[0](n,r,g)}return Vx(r,t.transform),Bx(r,i,t,e),e.animation&&Px(t,r,e),Cx(s,t.id+"",r)}function Yx(t,e){return t instanceof Ps?Xx(t,e):t instanceof Hs?function(t,e){var i=t.style,n=i.image;if(n&&!ot(n)&&(zx(n)?n=n.src:Nx(n)&&(n=n.toDataURL())),n){var o=i.x||0,r=i.y||0,a={href:n,width:i.width,height:i.height};return o&&(a.x=o),r&&(a.y=r),Vx(a,t.transform),Bx(a,i,t,e),e.animation&&Px(t,a,e),Cx("image",t.id+"",a)}}(t,e):t instanceof Ns?function(t,e){var i=t.style,n=i.text;if(null!=n&&(n+=""),n&&!isNaN(i.x)&&!isNaN(i.y)){var o=i.font||S,r=i.x||0,a=function(t,e,i){return"top"===i?t+=e/2:"bottom"===i&&(t-=e/2),t}(i.y||0,Po(o),i.textBaseline),s={"dominant-baseline":"central","text-anchor":_n[i.textAlign]||i.textAlign};if(ol(i)){var l="",h=i.fontStyle,u=il(i.fontSize);if(!parseFloat(u))return;var c=i.fontFamily||C,d=i.fontWeight;l+="font-size:"+u+";font-family:"+c+";",h&&"normal"!==h&&(l+="font-style:"+h+";"),d&&"normal"!==d&&(l+="font-weight:"+d+";"),s.style=l}else s.style="font: "+o;return n.match(/\s/)&&(s["xml:space"]="preserve"),r&&(s.x=r),a&&(s.y=a),Vx(s,t.transform),Bx(s,i,t,e),e.animation&&Px(t,s,e),Cx("text",t.id+"",s,void 0,n)}}(t,e):void 0}function Zx(t,e,i,n){var o,r=t[i],a={gradientUnits:r.global?"userSpaceOnUse":"objectBoundingBox"};if(Mn(r))o="linearGradient",a.x1=r.x,a.y1=r.y,a.x2=r.x2,a.y2=r.y2;else{if(!Tn(r))return;o="radialGradient",a.cx=ft(r.x,.5),a.cy=ft(r.y,.5),a.r=ft(r.r,.5)}for(var s=r.colorStops,l=[],h=0,u=s.length;h<u;++h){var c=100*wn(s[h].offset)+"%",d=vn(s[h].color),p=d.color,f=d.opacity,g={offset:c};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(Cx("stop",h+"",g))}var m=Sx(Cx(o,"",a,l)),v=n.gradientCache,y=v[m];y||(y=n.zrId+"-g"+n.gradientIdx++,v[m]=y,a.id=y,n.defs[y]=Cx(o,y,a,l)),e[i]=In(y)}function qx(t,e,i,n){var o,r=t.style[i],a=t.getBoundingRect(),s={},l=r.repeat,h="no-repeat"===l,u="repeat-x"===l,c="repeat-y"===l;if(Cn(r)){var d=r.imageWidth,p=r.imageHeight,f=void 0,g=r.image;if(ot(g)?f=g:zx(g)?f=g.src:Nx(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";yt(d,m),yt(p,m)}else if(null==d||null==p){var v=function(t,e){if(t){var i=t.elm,n=d||e.width,o=p||e.height;"pattern"===t.tag&&(u?(o=1,n/=a.width):c&&(n=1,o/=a.height)),t.attrs.width=n,t.attrs.height=o,i&&(i.setAttribute("width",n),i.setAttribute("height",o))}},y=ha(f,null,t,(function(t){h||v(_,t),v(o,t)}));y&&y.width&&y.height&&(d=d||y.width,p=p||y.height)}o=Cx("image","img",{href:f,width:d,height:p}),s.width=d,s.height=p}else r.svgElement&&(o=H(r.svgElement),s.width=r.svgWidth,s.height=r.svgHeight);if(o){var b,x;h?b=x=1:u?(x=1,b=s.width/a.width):c?(b=1,x=s.height/a.height):s.patternUnits="userSpaceOnUse",null==b||isNaN(b)||(s.width=b),null==x||isNaN(x)||(s.height=x);var w=kn(r);w&&(s.patternTransform=w);var _=Cx("pattern","",s,[o]),C=Sx(_),S=n.patternCache,M=S[C];M||(M=n.zrId+"-p"+n.patternIdx++,S[C]=M,s.id=M,_=n.defs[M]=Cx("pattern",M,s,[o])),e[i]=In(M)}}function Kx(t,e,i){var n=i.clipPathCache,o=i.defs,r=n[t.id];if(!r){var a={id:r=i.zrId+"-c"+i.clipPathIdx++};n[t.id]=r,o[r]=Cx("clipPath",r,a,[Xx(t,i)])}e["clip-path"]=In(r)}function $x(t){return document.createTextNode(t)}function Jx(t,e,i){t.insertBefore(e,i)}function Qx(t,e){t.removeChild(e)}function tw(t,e){t.appendChild(e)}function ew(t){return t.parentNode}function iw(t){return t.nextSibling}function nw(t,e){t.textContent=e}var ow=58,rw=120,aw=Cx("","");function sw(t){return void 0===t}function lw(t){return void 0!==t}function hw(t,e,i){for(var n={},o=e;o<=i;++o){var r=t[o].key;void 0!==r&&(n[r]=o)}return n}function uw(t,e){var i=t.key===e.key;return t.tag===e.tag&&i}function cw(t){var e,i=t.children,n=t.tag;if(lw(n)){var o=t.elm=_x(n);if(fw(aw,t),it(i))for(e=0;e<i.length;++e){var r=i[e];null!=r&&tw(o,cw(r))}else lw(t.text)&&!st(t.text)&&tw(o,$x(t.text))}else t.elm=$x(t.text);return t.elm}function dw(t,e,i,n,o){for(;n<=o;++n){var r=i[n];null!=r&&Jx(t,cw(r),e)}}function pw(t,e,i,n){for(;i<=n;++i){var o=e[i];null!=o&&(lw(o.tag)?Qx(ew(o.elm),o.elm):Qx(t,o.elm))}}function fw(t,e){var i,n=e.elm,o=t&&t.attrs||{},r=e.attrs||{};if(o!==r){for(i in r){var a=r[i];o[i]!==a&&(!0===a?n.setAttribute(i,""):!1===a?n.removeAttribute(i):i.charCodeAt(0)!==rw?n.setAttribute(i,a):"xmlns:xlink"===i||"xmlns"===i?n.setAttributeNS(bx,i,a):i.charCodeAt(3)===ow?n.setAttributeNS(xx,i,a):i.charCodeAt(5)===ow?n.setAttributeNS(yx,i,a):n.setAttribute(i,a))}for(i in o)i in r||n.removeAttribute(i)}}function gw(t,e){var i=e.elm=t.elm,n=t.children,o=e.children;t!==e&&(fw(t,e),sw(e.text)?lw(n)&&lw(o)?n!==o&&function(t,e,i){for(var n,o,r,a=0,s=0,l=e.length-1,h=e[0],u=e[l],c=i.length-1,d=i[0],p=i[c];a<=l&&s<=c;)null==h?h=e[++a]:null==u?u=e[--l]:null==d?d=i[++s]:null==p?p=i[--c]:uw(h,d)?(gw(h,d),h=e[++a],d=i[++s]):uw(u,p)?(gw(u,p),u=e[--l],p=i[--c]):uw(h,p)?(gw(h,p),Jx(t,h.elm,iw(u.elm)),h=e[++a],p=i[--c]):uw(u,d)?(gw(u,d),Jx(t,u.elm,h.elm),u=e[--l],d=i[++s]):(sw(n)&&(n=hw(e,a,l)),sw(o=n[d.key])||(r=e[o]).tag!==d.tag?Jx(t,cw(d),h.elm):(gw(r,d),e[o]=void 0,Jx(t,r.elm,h.elm)),d=i[++s]);(a<=l||s<=c)&&(a>l?dw(t,null==i[c+1]?null:i[c+1].elm,i,s,c):pw(t,e,a,l))}(i,n,o):lw(o)?(lw(t.text)&&nw(i,""),dw(i,null,o,0,o.length-1)):lw(n)?pw(i,n,0,n.length-1):lw(t.text)&&nw(i,""):t.text!==e.text&&(lw(n)&&pw(i,n,0,n.length-1),nw(i,e.text)))}var mw=0,vw=function(){function t(t,e,i){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=i=U({},i),this.root=t,this._id="zr"+mw++,this._oldVNode=Tx(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=_x("svg");fw(null,this._oldVNode),n.appendChild(o),t.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(uw(t,e))gw(t,e);else{var i=t.elm,n=ew(i);cw(e),null!==n&&(Jx(n,e.elm,iw(i)),pw(n,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Yx(t,Mx(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,n=this._height,o=Mx(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var r=[],a=this._bgVNode=function(t,e,i,n){var o;if(i&&"none"!==i)if(o=Cx("rect","bg",{width:t,height:e,x:"0",y:"0",id:"0"}),En(i))Zx({fill:i},o.attrs,"fill",n);else if(Sn(i))qx({style:{fill:i},dirty:At,getBoundingRect:function(){return{width:t,height:e}}},o.attrs,"fill",n);else{var r=vn(i),a=r.color,s=r.opacity;o.attrs.fill=a,s<1&&(o.attrs["fill-opacity"]=s)}return o}(i,n,this._backgroundColor,o);a&&r.push(a);var s=t.compress?null:this._mainVNode=Cx("g","main",{},[]);this._paintList(e,o,s?s.children:r),s&&r.push(s);var l=K(Q(o.defs),(function(t){return o.defs[t]}));if(l.length&&r.push(Cx("defs","defs",{},l)),t.animation){var h=function(t,e,i){var n=(i=i||{}).newline?"\n":"",o=" {"+n,r=n+"}",a=K(Q(t),(function(e){return e+o+K(Q(t[e]),(function(i){return i+":"+t[e][i]+";"})).join(n)+r})).join(n),s=K(Q(e),(function(t){return"@keyframes "+t+o+K(Q(e[t]),(function(i){return i+o+K(Q(e[t][i]),(function(n){var o=e[t][i][n];return"d"===n&&(o='path("'+o+'")'),n+":"+o+";"})).join(n)+r})).join(n)+r})).join(n);return a||s?["<![CDATA[",a,s,"]]>"].join(n):""}(o.cssNodes,o.cssAnims,{newline:!0});if(h){var u=Cx("style","stl",{},[],h);r.push(u)}}return Tx(i,n,r,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},Sx(this.renderToVNode({animation:ft(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:ft(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,i){for(var n,o,r=t.length,a=[],s=0,l=0,h=0;h<r;h++){var u=t[h];if(!u.invisible){var c=u.__clipPaths,d=c&&c.length||0,p=o&&o.length||0,f=void 0;for(f=Math.max(d-1,p-1);f>=0&&(!c||!o||c[f]!==o[f]);f--);for(var g=p-1;g>f;g--)n=a[--s-1];for(var m=f+1;m<d;m++){var v={};Kx(c[m],v,e);var y=Cx("g","clip-g-"+l++,v,[]);(n?n.children:i).push(y),a[s++]=y,n=y}o=c;var b=Yx(u,e);b&&(n?n.children:i).push(b)}}},t.prototype.resize=function(t,e){var i=this._opts,n=this.root,o=this._viewport;if(null!=t&&(i.width=t),null!=e&&(i.height=e),n&&o&&(o.style.display="none",t=Av(n,0,i),e=Av(n,1,i),o.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,o){var r=o.style;r.width=t+"px",r.height=e+"px"}if(Sn(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",t),a.setAttribute("height",e));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",t),s.setAttribute("height",e))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var e=this.renderToString(),i="data:image/svg+xml;";return t?(e=An(e))&&i+"base64,"+e:i+"charset=UTF-8,"+encodeURIComponent(e)},t}();const yw=vw;function bw(t){return null==t?0:t.length||1}function xw(t){return t}var ww=function(){function t(t,e,i,n,o,r){this._old=t,this._new=e,this._oldKeyGetter=i||xw,this._newKeyGetter=n||xw,this.context=o,this._diffModeMultiple="multiple"===r}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a=n[r],s=i[a],l=bw(s);if(l>1){var h=s.shift();1===s.length&&(i[a]=s[0]),this._update&&this._update(h,r)}else 1===l?(i[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,i)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},o=[],r=[];this._initIndexMap(t,i,o,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=i[s],h=n[s],u=bw(l),c=bw(h);if(u>1&&1===c)this._updateManyToOne&&this._updateManyToOne(h,l),n[s]=null;else if(1===u&&c>1)this._updateOneToMany&&this._updateOneToMany(h,l),n[s]=null;else if(1===u&&1===c)this._update&&this._update(h,l),n[s]=null;else if(u>1&&c>1)this._updateManyToMany&&this._updateManyToMany(h,l),n[s]=null;else if(u>1)for(var d=0;d<u;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(r,n)},t.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],o=e[n],r=bw(o);if(r>1)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[n]=null}},t.prototype._initIndexMap=function(t,e,i,n){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a="_ec_"+this[n](t[r],r);if(o||(i[r]=a),e){var s=e[a],l=bw(s);0===l?(e[a]=r,o&&i.push(a)):1===l?e[a]=[s,r]:s.push(r)}}},t}();const _w=ww;var Cw=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function Sw(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Mw(t){return"category"===t?"ordinal":"time"===t?"time":"float"}const Tw=function(t){this.otherDims={},null!=t&&U(this,t)};var Ew=Br(),Iw={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Dw=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Lw(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return ft(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Ld(this.source),i=!Rw(t),n="",o=[],r=0,a=0;r<t;r++){var s=void 0,l=void 0,h=void 0,u=this.dimensions[a];if(u&&u.storeDimIndex===r)s=e?u.name:null,l=u.type,h=u.ordinalMeta,a++;else{var c=this.getSourceDimension(r);c&&(s=e?c.name:null,l=c.type)}o.push({property:s,type:l,ordinalMeta:h}),!e||null==s||u&&u.isCalculationCoord||(n+=i?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),n+="$",n+=Iw[l]||"f",h&&(n+=h.uid),n+="$"}var d=this.source;return{dimensions:o,hash:[d.seriesLayoutBy,d.startIndex,n].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,o=this.dimensions[i];if(o&&o.storeDimIndex===e)o.isCalculationCoord||(n=o.name),i++;else{var r=this.getSourceDimension(e);r&&(n=r.name)}t.push(n)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function kw(t){return t instanceof Dw}function Aw(t){for(var e=Tt(),i=0;i<(t||[]).length;i++){var n=t[i],o=st(n)?n.name:n;null!=o&&null==e.get(o)&&e.set(o,i)}return e}function Lw(t){var e=Ew(t);return e.dimNameMap||(e.dimNameMap=Aw(t.dimensionsDefine))}function Rw(t){return t>30}var Pw,Ow,zw,Nw,Bw,Fw,Vw,Hw=st,Gw=K,Ww="undefined"==typeof Int32Array?Array:Int32Array,Uw=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],jw=["_approximateExtent"],Xw=function(){function t(t,e){var i;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n=!1;kw(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var o={},r=[],a={},s=!1,l={},h=0;h<i.length;h++){var u=i[h],c=ot(u)?new Tw({name:u}):u instanceof Tw?u:new Tw(u),d=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=d,c.coordDimIndex=0);var p=c.otherDims=c.otherDims||{};r.push(d),o[d]=c,null!=l[d]&&(s=!0),c.createInvertedIndices&&(a[d]=[]),0===p.itemName&&(this._nameDimIdx=h),0===p.itemId&&(this._idDimIdx=h),n&&(c.storeDimIndex=h)}if(this.dimensions=r,this._dimInfos=o,this._initGetDimensionInfo(s),this.hostModel=e,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=Tt();q(r,(function(t){f.set(o[t].storeDimIndex,t)}))}}return t.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(null!=i)return i;var n=this._schema.getSourceDimension(e);return n?n.name:void 0},t.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(at(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,e,i){var n,o=this;if(t instanceof Sp&&(n=t),!n){var r=this.dimensions,a=Td(t)||Z(t)?new Rd(t,r.length):t;n=new Sp;var s=Gw(r,(function(t){return{type:o._dimInfos[t].type,property:t}}));n.initData(a,s,i)}this._store=n,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,n.count()),this._dimSummary=function(t,e){var i={},n=i.encode={},o=Tt(),r=[],a=[],s={};q(t.dimensions,(function(e){var i,l=t.getDimensionInfo(e),h=l.coordDim;if(h){var u=l.coordDimIndex;Sw(n,h)[u]=e,l.isExtraCoord||(o.set(h,1),"ordinal"!==(i=l.type)&&"time"!==i&&(r[0]=e),Sw(s,h)[u]=t.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(e)}fc.each((function(t,e){var i=Sw(n,e),o=l.otherDims[e];null!=o&&!1!==o&&(i[o]=l.name)}))}));var l=[],h={};o.each((function(t,e){var i=n[e];h[e]=i[0],l=l.concat(i)})),i.dataDimsOnCoord=l,i.dataDimIndicesOnCoord=K(l,(function(e){return t.getDimensionInfo(e).storeDimIndex})),i.encodeFirstDimNotExtra=h;var u=n.label;u&&u.length&&(r=u.slice());var c=n.tooltip;return c&&c.length?a=c.slice():a.length||(a=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=a,i.userOutput=new Cw(s,e),i}(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},t.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e.length),n=i.start,o=i.end,r=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var a=n;a<o;a++){var s=a-n;this._nameList[a]=e[s],r&&Vw(this,a)}},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==bc&&!t.fillStorage},t.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList;if(i.getSource().sourceFormat===gc&&!i.pure)for(var r=[],a=t;a<e;a++){var s=i.getItem(a,r);if(!this.hasItemOption&&kr(s)&&(this.hasItemOption=!0),s){var l=s.name;null==n[a]&&null!=l&&(n[a]=Pr(l,null));var h=s.id;null==o[a]&&null!=h&&(o[a]=Pr(h,null))}}if(this._shouldMakeIdFromName())for(a=t;a<e;a++)Vw(this,a);Pw(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){Hw(t)?U(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return null==i&&null!=this._nameDimIdx&&(i=zw(this,this._nameDimIdx,e)),null==i&&(i=""),i},t.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},t.prototype.getId=function(t){return Ow(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},t.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,e){var i=this,n=this._store;return it(t)?n.getValues(Gw(t,(function(t){return i._getStoreDimIndex(t)})),e):n.getValues(t)},t.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},t.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},t.prototype.each=function(t,e,i){nt(t)&&(i=e,e=t,t=[]);var n=i||this,o=Gw(Nw(t),this._getStoreDimIndex,this);this._store.each(o,n?tt(e,n):e)},t.prototype.filterSelf=function(t,e,i){nt(t)&&(i=e,e=t,t=[]);var n=i||this,o=Gw(Nw(t),this._getStoreDimIndex,this);return this._store=this._store.filter(o,n?tt(e,n):e),this},t.prototype.selectRange=function(t){var e=this,i={},n=Q(t),o=[];return q(n,(function(n){var r=e._getStoreDimIndex(n);i[r]=t[n],o.push(r)})),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(t,e,i){nt(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,(function(){n.push(e&&e.apply(this,arguments))}),i),n},t.prototype.map=function(t,e,i,n){var o=i||n||this,r=Gw(Nw(t),this._getStoreDimIndex,this),a=Fw(this);return a._store=this._store.map(r,o?tt(e,o):e),a},t.prototype.modify=function(t,e,i,n){var o=i||n||this,r=Gw(Nw(t),this._getStoreDimIndex,this);this._store.modify(r,o?tt(e,o):e)},t.prototype.downSample=function(t,e,i,n){var o=Fw(this);return o._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),o},t.prototype.lttbDownSample=function(t,e){var i=Fw(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new eu(i,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new _w(t?t.getStore().getIndices():[],this.getStore().getIndices(),(function(e){return Ow(t,e)}),(function(t){return Ow(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},Hw(t)?U(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return null==n?this.getVisual(e):n},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var o=n[e];return null==o&&(it(o=this.getVisual(e))?o=o.slice():Hw(o)&&(o=U({},o)),n[e]=o),o},t.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,Hw(e)?U(n,e):n[e]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){Hw(t)?U(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?U(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;pl(i,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){q(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Gw(this.dimensions,this._getDimInfo,this),this.hostModel)),Bw(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var i=this[t];nt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(mt(arguments)))})},t.internalField=(Pw=function(t){var e=t._invertedIndicesMap;q(e,(function(i,n){var o=t._dimInfos[n],r=o.ordinalMeta,a=t._store;if(r){i=e[n]=new Ww(r.categories.length);for(var s=0;s<i.length;s++)i[s]=-1;for(s=0;s<a.count();s++)i[a.get(o.storeDimIndex,s)]=s}}))},zw=function(t,e,i){return Pr(t._getCategory(e,i),null)},Ow=function(t,e){var i=t._idList[e];return null==i&&null!=t._idDimIdx&&(i=zw(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i},Nw=function(t){return it(t)||(t=null!=t?[t]:[]),t},Fw=function(e){var i=new t(e._schema?e._schema:Gw(e.dimensions,e._getDimInfo,e),e.hostModel);return Bw(i,e),i},Bw=function(t,e){q(Uw.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,q(jw,(function(i){t[i]=H(e[i])})),t._calculationInfo=U({},e._calculationInfo)},void(Vw=function(t,e){var i=t._nameList,n=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=i[e],s=n[e];if(null==a&&null!=o&&(i[e]=a=zw(t,o,e)),null==s&&null!=r&&(n[e]=s=zw(t,r,e)),null==s&&null!=a){var l=t._nameRepeatCount,h=l[a]=(l[a]||0)+1;s=a,h>1&&(s+="__ec__"+h),n[e]=s}})),t}();const Yw=Xw;function Zw(t,e){Td(t)||(t=Id(t));var i=(e=e||{}).coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],o=Tt(),r=[],a=function(t,e,i,n){var o=Math.max(t.dimensionsDetectedCount||1,e.length,i.length,n||0);return q(e,(function(t){var e;st(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))})),o}(t,i,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Rw(a),l=n===t.dimensionsDefine,h=l?Lw(t):Aw(n),u=e.encodeDefine;!u&&e.encodeDefaulter&&(u=e.encodeDefaulter(t,a));for(var c=Tt(u),d=new yp(a),p=0;p<d.length;p++)d[p]=-1;function f(t){var e=d[t];if(e<0){var i=n[t],o=st(i)?i:{name:i},a=new Tw,s=o.name;null!=s&&null!=h.get(s)&&(a.name=a.displayName=s),null!=o.type&&(a.type=o.type),null!=o.displayName&&(a.displayName=o.displayName);var l=r.length;return d[t]=l,a.storeDimIndex=t,r.push(a),a}return r[e]}if(!s)for(p=0;p<a;p++)f(p);c.each((function(t,e){var i=Tr(t).slice();if(1===i.length&&!ot(i[0])&&i[0]<0)c.set(e,!1);else{var n=c.set(e,[]);q(i,(function(t,i){var o=ot(t)?h.get(t):t;null!=o&&o<a&&(n[i]=o,m(f(o),e,i))}))}}));var g=0;function m(t,e,i){null!=fc.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,o.set(e,!0))}q(i,(function(t){var e,i,n,o;if(ot(t))e=t,o={};else{e=(o=t).name;var r=o.ordinalMeta;o.ordinalMeta=null,(o=U({},o)).ordinalMeta=r,i=o.dimsDef,n=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}var s=c.get(e);if(!1!==s){if(!(s=Tr(s)).length)for(var h=0;h<(i&&i.length||1);h++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}q(s,(function(t,r){var a=f(t);if(l&&null!=o.type&&(a.type=o.type),m(j(a,o),e,r),null==a.name&&i){var s=i[r];!st(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}n&&j(a.otherDims,n)}))}}));var v=e.generateCoord,y=e.generateCoordCount,b=null!=y;y=v?y||1:0;var x=v||"value";function w(t){null==t.name&&(t.name=t.coordDim)}if(s)q(r,(function(t){w(t)})),r.sort((function(t,e){return t.storeDimIndex-e.storeDimIndex}));else for(var _=0;_<a;_++){var C=f(_);null==C.coordDim&&(C.coordDim=qw(x,o,b),C.coordDimIndex=0,(!v||y<=0)&&(C.isExtraCoord=!0),y--),w(C),null!=C.type||Ic(t,_)!==Cc.Must&&(!C.isExtraCoord||null==C.otherDims.itemName&&null==C.otherDims.seriesName)||(C.type="ordinal")}return function(t){for(var e=Tt(),i=0;i<t.length;i++){var n=t[i],o=n.name,r=e.get(o)||0;r>0&&(n.name=o+(r-1)),r++,e.set(o,r)}}(r),new Dw({source:t,dimensions:r,fullDimensionCount:a,dimensionOmitted:s})}function qw(t,e,i){if(i||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Kw=function(t){this.coordSysDims=[],this.axisMap=Tt(),this.categoryAxisMap=Tt(),this.coordSysName=t},$w={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis",Gr).models[0],r=t.getReferringComponents("yAxis",Gr).models[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",r),Jw(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),Jw(r)&&(n.set("y",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis",Gr).models[0];e.coordSysDims=["single"],i.set("single",o),Jw(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar",Gr).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",r),i.set("angle",a),Jw(r)&&(n.set("radius",r),e.firstCategoryDimIndex=0),Jw(a)&&(n.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,r=o.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=r.dimensions.slice();q(r.parallelAxisIndex,(function(t,r){var s=o.getComponent("parallelAxis",t),l=a[r];i.set(l,s),Jw(s)&&(n.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=r))}))}};function Jw(t){return"category"===t.get("type")}function Qw(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function t_(t,e){return Qw(t,e)?t.getCalculationInfo("stackResultDimension"):e}const e_=function(t,e,i){i=i||{};var n,o=e.getSourceManager(),r=!1;t?(r=!0,n=Id(t)):r=(n=o.getSource()).sourceFormat===gc;var a=function(t){var e=t.get("coordinateSystem"),i=new Kw(e),n=$w[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}(e),s=function(t,e){var i,n=t.get("coordinateSystem"),o=qc.get(n);return e&&e.coordSysDims&&(i=K(e.coordSysDims,(function(t){var i={name:t},n=e.axisMap.get(t);if(n){var o=n.get("type");i.type=Mw(o)}return i}))),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),i}(e,a),l=i.useEncodeDefaulter,h=nt(l)?l:l?et(Mc,s,e):null,u=Zw(n,{coordDimensions:s,generateCoord:i.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:h,canOmitUnusedDimensions:!r}),c=function(t,e,i){var n,o;return i&&q(t,(function(t,r){var a=t.coordDim,s=i.categoryAxisMap.get(a);s&&(null==n&&(n=r),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==n||(t[n].otherDims.itemName=0),n}(u.dimensions,i.createInvertedIndices,a),d=r?null:o.getSharedDataStore(u),p=function(t,e,i){var n,o,r,a=(i=i||{}).byIndex,s=i.stackedCoordDimension;!function(t){return!kw(t.schema)}(e)?(o=e.schema,n=o.dimensions,r=e.store):n=e;var l,h,u,c,d=!(!t||!t.get("stack"));if(q(n,(function(t,e){ot(t)&&(n[e]=t={name:t}),d&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),h||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(h=t))})),!h||a||l||(a=!0),h){u="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=h.coordDim,f=h.type,g=0;q(n,(function(t){t.coordDim===p&&g++}));var m={name:u,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},v={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(r&&(m.storeDimIndex=r.ensureCalculationDimension(c,f),v.storeDimIndex=r.ensureCalculationDimension(u,f)),o.appendCalculationDimension(m),o.appendCalculationDimension(v)):(n.push(m),n.push(v))}return{stackedDimension:h&&h.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:u}}(e,{schema:u,store:d}),f=new Yw(u,e);f.setCalculationInfo(p);var g=null!=c&&function(t){if(t.sourceFormat===gc){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return!it(Dr(e))}}(n)?function(t,e,i,n){return n===c?i:this.defaultDimValueGetter(t,e,i,n)}:null;return f.hasItemOption=!1,f.initData(r?n:d,null,g),f},i_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return m(e,t),e.prototype.getInitialData=function(t){return e_(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new qo,i=Mv("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(i),i.setStyle(t.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),r="none"===n?"circle":n,a=.8*t.itemHeight,s=Mv(r,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?o:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),r.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(of);function n_(t,e){var i=t.mapDimensionsAll("defaultedLabel"),n=i.length;if(1===n){var o=Ud(t,e,i[0]);return null!=o?o+"":null}if(n){for(var r=[],a=0;a<i.length;a++)r.push(Ud(t,e,i[a]));return r.join(" ")}}function o_(t,e){var i=t.mapDimensionsAll("defaultedLabel");if(!it(e))return e+"";for(var n=[],o=0;o<i.length;o++){var r=t.getDimensionIndex(i[o]);r>=0&&n.push(e[r])}return n.join(" ")}var r_=function(t){function e(e,i,n,o){var r=t.call(this)||this;return r.updateData(e,i,n,o),r}return m(e,t),e.prototype._createSymbol=function(t,e,i,n,o){this.removeAll();var r=Mv(t,-1,-1,2,2,null,o);r.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),r.drift=a_,this._symbolType=t,this.add(r)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Yl(this.childAt(0))},e.prototype.downplay=function(){Zl(this.childAt(0))},e.prototype.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},e.prototype.setDraggable=function(t,e){var i=this.childAt(0);i.draggable=t,i.cursor=!e&&t?"move":i.cursor},e.prototype.updateData=function(t,i,n,o){this.silent=!1;var r=t.getItemVisual(i,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,i),l=r!==this._symbolType,h=o&&o.disableAnimation;if(l){var u=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(r,t,i,s,u)}else{(d=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};h?d.attr(c):bh(d,c,a,i),Mh(d)}if(this._updateCommon(t,i,s,n,o),l){var d=this.childAt(0);h||(c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,xh(d,c,a,i))}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,i,n,o){var r,a,s,l,h,u,c,d,p,f=this.childAt(0),g=t.hostModel;if(n&&(r=n.emphasisItemStyle,a=n.blurItemStyle,s=n.selectItemStyle,l=n.focus,h=n.blurScope,c=n.labelStatesModels,d=n.hoverScale,p=n.cursorStyle,u=n.emphasisDisabled),!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e),v=m.getModel("emphasis");r=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),h=v.get("blurScope"),u=v.get("disabled"),c=kh(m),d=v.getShallow("scale"),p=m.getShallow("cursor")}var y=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var b=Ev(t.getItemVisual(e,"symbolOffset"),i);b&&(f.x=b[0],f.y=b[1]),p&&f.attr("cursor",p);var x=t.getItemVisual(e,"style"),w=x.fill;if(f instanceof Hs){var _=f.style;f.useStyle(U({image:_.image,x:_.x,y:_.y,width:_.width,height:_.height},x))}else f.__isEmptyBrush?f.useStyle(U({},x)):f.useStyle(x),f.style.decal=null,f.setColor(w,o&&o.symbolInnerColor),f.style.strokeNoScale=!0;var C=t.getItemVisual(e,"liftZ"),S=this._z2;null!=C?null==S&&(this._z2=f.z2,f.z2+=C):null!=S&&(f.z2=S,this._z2=null);var M=o&&o.useNameLabel;Dh(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return M?t.getName(e):n_(t,e)},inheritColor:w,defaultOpacity:x.opacity}),this._sizeX=i[0]/2,this._sizeY=i[1]/2;var T=f.ensureState("emphasis");T.style=r,f.ensureState("select").style=s,f.ensureState("blur").style=a;var E=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;T.scaleX=this._sizeX*E,T.scaleY=this._sizeY*E,this.setSymbolScale(1),sh(this,l,h,u)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,i){var n=this.childAt(0),o=dl(this).dataIndex,r=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var a=n.getTextContent();a&&_h(a,{style:{opacity:0}},e,{dataIndex:o,removeOpt:r,cb:function(){n.removeTextContent()}})}else n.removeTextContent();_h(n,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:r})},e.getSymbolSize=function(t,e){return Tv(t.getItemVisual(e,"symbolSize"))},e}(qo);function a_(t,e){this.parent.drift(t,e)}const s_=r_;function l_(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function h_(t){return null==t||st(t)||(t={isIgnore:t}),t||{}}function u_(t){var e=t.hostModel,i=e.getModel("emphasis");return{emphasisItemStyle:i.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:i.get("focus"),blurScope:i.get("blurScope"),emphasisDisabled:i.get("disabled"),hoverScale:i.get("scale"),labelStatesModels:kh(e),cursorStyle:e.get("cursor")}}var c_=function(){function t(t){this.group=new qo,this._SymbolCtor=t||s_}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=h_(e);var i=this.group,n=t.hostModel,o=this._data,r=this._SymbolCtor,a=e.disableAnimation,s=u_(t),l={disableAnimation:a},h=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||i.removeAll(),t.diff(o).add((function(n){var o=h(n);if(l_(t,o,n,e)){var a=new r(t,n,s,l);a.setPosition(o),t.setItemGraphicEl(n,a),i.add(a)}})).update((function(u,c){var d=o.getItemGraphicEl(c),p=h(u);if(l_(t,p,u,e)){var f=t.getItemVisual(u,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)i.remove(d),(d=new r(t,u,s,l)).setPosition(p);else{d.updateData(t,u,s,l);var m={x:p[0],y:p[1]};a?d.attr(m):bh(d,m,n)}i.add(d),t.setItemGraphicEl(u,d)}else i.remove(d)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}),n)})).execute(),this._getSymbolPoint=h,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,i){var n=t._getSymbolPoint(i);e.setPosition(n),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=u_(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],i=h_(i);for(var o=t.start;o<t.end;o++){var r=e.getItemLayout(o);if(l_(e,r,o,i)){var a=new this._SymbolCtor(e,o,this._seriesScope);a.traverse(n),a.setPosition(r),this.group.add(a),e.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}),i.hostModel)})):e.removeAll()},t}();const d_=c_;function p_(t,e,i){var n=t.getBaseAxis(),o=t.getOtherAxis(n),r=function(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:at(e)&&!isNaN(e)?i=e:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]),i}(o,i),a=n.dim,s=o.dim,l=e.mapDimension(s),h=e.mapDimension(a),u="x"===s||"radius"===s?1:0,c=K(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,p=e.getCalculationInfo("stackResultDimension");return Qw(e,c[0])&&(d=!0,c[0]=p),Qw(e,c[1])&&(d=!0,c[1]=p),{dataDimsForPoint:c,valueStart:r,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:h,baseDataOffset:u,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function f_(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=i.get(t.baseDim,n),a[1-r]=o,e.dataToPoint(a)}var g_="undefined"!=typeof Float32Array,m_=g_?Float32Array:Array;function v_(t){return it(t)?g_?new Float32Array(t):t:new m_(t)}var y_=Math.min,b_=Math.max;function x_(t,e){return isNaN(t)||isNaN(e)}function w_(t,e,i,n,o,r,a,s,l){for(var h,u,c,d,p,f,g=i,m=0;m<n;m++){var v=e[2*g],y=e[2*g+1];if(g>=o||g<0)break;if(x_(v,y)){if(l){g+=r;continue}break}if(g===i)t[r>0?"moveTo":"lineTo"](v,y),c=v,d=y;else{var b=v-h,x=y-u;if(b*b+x*x<.5){g+=r;continue}if(a>0){for(var w=g+r,_=e[2*w],C=e[2*w+1];_===v&&C===y&&m<n;)m++,g+=r,_=e[2*(w+=r)],C=e[2*w+1],b=(v=e[2*g])-h,x=(y=e[2*g+1])-u;var S=m+1;if(l)for(;x_(_,C)&&S<n;)S++,_=e[2*(w+=r)],C=e[2*w+1];var M=.5,T=0,E=0,I=void 0,D=void 0;if(S>=n||x_(_,C))p=v,f=y;else{T=_-h,E=C-u;var k=v-h,A=_-v,L=y-u,R=C-y,P=void 0,O=void 0;if("x"===s){var z=T>0?1:-1;p=v-z*(P=Math.abs(k))*a,f=y,I=v+z*(O=Math.abs(A))*a,D=y}else if("y"===s){var N=E>0?1:-1;p=v,f=y-N*(P=Math.abs(L))*a,I=v,D=y+N*(O=Math.abs(R))*a}else P=Math.sqrt(k*k+L*L),p=v-T*a*(1-(M=(O=Math.sqrt(A*A+R*R))/(O+P))),f=y-E*a*(1-M),D=y+E*a*M,I=y_(I=v+T*a*M,b_(_,v)),D=y_(D,b_(C,y)),I=b_(I,y_(_,v)),f=y-(E=(D=b_(D,y_(C,y)))-y)*P/O,p=y_(p=v-(T=I-v)*P/O,b_(h,v)),f=y_(f,b_(u,y)),I=v+(T=v-(p=b_(p,y_(h,v))))*O/P,D=y+(E=y-(f=b_(f,y_(u,y))))*O/P}t.bezierCurveTo(c,d,p,f,v,y),c=I,d=D}else t.lineTo(v,y)}h=v,u=y,g+=r}return m}var __=function(){this.smooth=0,this.smoothConstraint=!0},C_=function(t){function e(e){var i=t.call(this,e)||this;return i.type="ec-polyline",i}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new __},e.prototype.buildPath=function(t,e){var i=e.points,n=0,o=i.length/2;if(e.connectNulls){for(;o>0&&x_(i[2*o-2],i[2*o-1]);o--);for(;n<o&&x_(i[2*n],i[2*n+1]);n++);}for(;n<o;)n+=w_(t,i,n,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i,n,o=this.path.data,r=ps.CMD,a="x"===e,s=[],l=0;l<o.length;){var h=void 0,u=void 0,c=void 0,d=void 0,p=void 0,f=void 0,g=void 0;switch(o[l++]){case r.M:i=o[l++],n=o[l++];break;case r.L:if(h=o[l++],u=o[l++],(g=a?(t-i)/(h-i):(t-n)/(u-n))<=1&&g>=0){var m=a?(u-n)*g+n:(h-i)*g+i;return a?[t,m]:[m,t]}i=h,n=u;break;case r.C:h=o[l++],u=o[l++],c=o[l++],d=o[l++],p=o[l++],f=o[l++];var v=a?Di(i,h,c,p,t,s):Di(n,u,d,f,t,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0)return m=a?Ei(n,u,d,f,b):Ei(i,h,c,p,b),a?[t,m]:[m,t]}i=p,n=f}}},e}(Ps),S_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e}(__),M_=function(t){function e(e){var i=t.call(this,e)||this;return i.type="ec-polygon",i}return m(e,t),e.prototype.getDefaultShape=function(){return new S_},e.prototype.buildPath=function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,r=i.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;r>0&&x_(i[2*r-2],i[2*r-1]);r--);for(;o<r&&x_(i[2*o],i[2*o+1]);o++);}for(;o<r;){var s=w_(t,i,o,r,r,1,e.smooth,a,e.connectNulls);w_(t,n,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},e}(Ps);function T_(t,e,i,n,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,h=r.height,u=i.get(["lineStyle","width"])||2;a-=u/2,s-=u/2,l+=u,h+=u,a=Math.floor(a),l=Math.round(l);var c=new qs({shape:{x:a,y:s,width:l,height:h}});if(e){var d=t.getBaseAxis(),p=d.isHorizontal(),f=d.inverse;p?(f&&(c.shape.x+=l),c.shape.width=0):(f||(c.shape.y+=h),c.shape.height=0);var g=nt(o)?function(t){o(t,c)}:null;xh(c,{shape:{width:l,height:h,x:a,y:s}},i,null,n,g)}return c}function E_(t,e,i){var n=t.getArea(),o=or(n.r0,1),r=or(n.r,1),a=new Zf({shape:{cx:or(t.cx,1),cy:or(t.cy,1),r0:o,r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=n.startAngle:a.shape.r=o,xh(a,{shape:{endAngle:n.endAngle,r}},i)),a}function I_(t,e,i,n,o){return t?"polar"===t.type?E_(t,e,i):"cartesian2d"===t.type?T_(t,e,i,n,o):null:null}function D_(t,e){return t.type===e}function k_(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++)if(t[i]!==e[i])return;return!0}}function A_(t){for(var e=1/0,i=1/0,n=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),n=Math.max(a,n)),isNaN(s)||(i=Math.min(s,i),o=Math.max(s,o))}return[[e,i],[n,o]]}function L_(t,e){var i=A_(t),n=i[0],o=i[1],r=A_(e),a=r[0],s=r[1];return Math.max(Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]),Math.abs(o[0]-s[0]),Math.abs(o[1]-s[1]))}function R_(t){return at(t)?t:t?.5:0}function P_(t,e,i,n){var o=e.getBaseAxis(),r="x"===o.dim||"radius"===o.dim?0:1,a=[],s=0,l=[],h=[],u=[],c=[];if(n){for(s=0;s<t.length;s+=2)isNaN(t[s])||isNaN(t[s+1])||c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(u[0]=t[s+2],u[1]=t[s+3],h[0]=t[s],h[1]=t[s+1],a.push(h[0],h[1]),i){case"end":l[r]=u[r],l[1-r]=h[1-r],a.push(l[0],l[1]);break;case"middle":var d=(h[r]+u[r])/2,p=[];l[r]=p[r]=d,l[1-r]=h[1-r],p[1-r]=u[1-r],a.push(l[0],l[1]),a.push(p[0],p[1]);break;default:l[r]=h[r],l[1-r]=u[1-r],a.push(l[0],l[1])}return a.push(t[s++],t[s++]),a}function O_(t,e){return[t[2*e],t[2*e+1]]}function z_(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<wl.length;e++)if(t.get([wl[e],"endLabel","show"]))return!0;return!1}function N_(t,e,i,n){if(D_(e,"cartesian2d")){var o=n.getModel("endLabel"),r=o.get("valueAnimation"),a=n.getData(),s={lastFrameIndex:0},l=z_(n)?function(i,n){t._endLabelOnDuring(i,n,a,s,r,o,e)}:null,h=e.getBaseAxis().isHorizontal(),u=T_(e,i,n,(function(){var e=t._endLabel;e&&i&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})}),l);if(!n.get("clip",!0)){var c=u.shape,d=Math.max(c.width,c.height);h?(c.y-=d,c.height+=2*d):(c.x-=d,c.width+=2*d)}return l&&l(1,u),u}return E_(e,i,n)}var B_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.init=function(){var t=new qo,e=new d_;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,i){var n=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),h=a.getLayout("points")||[],u="polar"===o.type,c=this._coordSys,d=this._symbolDraw,p=this._polyline,f=this._polygon,g=this._lineGroup,m=!e.ssr&&t.isAnimationEnabled(),v=!l.isEmpty(),y=l.get("origin"),b=p_(o,a,y),x=v&&function(t,e,i){if(!i.valueDim)return[];for(var n=e.count(),o=v_(2*n),r=0;r<n;r++){var a=f_(i,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,b),w=t.get("showSymbol"),_=t.get("connectNulls"),C=w&&!u&&function(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var r=i.getAxesByScale("ordinal")[0];if(r&&(!o||!function(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*s_.getSymbolSize(e,a)[t.isHorizontal()?1:0]>n)return!1;return!0}(r,e))){var a=e.mapDimension(r.dim),s={};return q(r.getViewLabels(),(function(t){var e=r.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,o),S=this._data;S&&S.eachItemGraphicEl((function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))})),w||d.remove(),r.add(g);var M,T=!u&&t.get("step");o&&o.getArea&&t.get("clip",!0)&&(null!=(M=o.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var E=function(t,e,i){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var o,r,a=n.length-1;a>=0;a--){var s=t.getDimensionInfo(n[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){r=n[a];break}}if(r){var l=e.getAxis(o),h=K(r.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),u=h.length,c=r.outerColors.slice();u&&h[0].coord>h[u-1].coord&&(h.reverse(),c.reverse());var d=function(t,e){var i,n,o=[],r=t.length;function a(t,e,i){var n=t.coord;return{coord:i,color:un((i-n)/(e.coord-n),[t.color,e.color])}}for(var s=0;s<r;s++){var l=t[s],h=l.coord;if(h<0)i=l;else{if(h>e){n?o.push(a(n,l,e)):i&&o.push(a(i,l,0),a(i,l,e));break}i&&(o.push(a(i,l,0)),i=null),o.push(l),n=l}}return o}(h,"x"===o?i.getWidth():i.getHeight()),p=d.length;if(!p&&u)return h[0].coord<0?c[1]?c[1]:h[u-1].color:c[0]?c[0]:h[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,m=g-f;if(m<.001)return"transparent";q(d,(function(t){t.offset=(t.coord-f)/m})),d.push({offset:p?d[p-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:c[0]||"transparent"});var v=new xg(0,0,0,0,d,!0);return v[o]=f,v[o+"2"]=g,v}}}(a,o,i)||a.getVisual("style")[a.getVisual("drawType")];if(p&&c.type===o.type&&T===this._step){v&&!f?f=this._newPolygon(h,x):f&&!v&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(t,o,qu(E));var I=g.getClipPath();I?xh(I,{shape:N_(this,o,!1,t).shape},t):g.setClipPath(N_(this,o,!0,t)),w&&d.updateData(a,{isIgnore:C,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[h[2*t],h[2*t+1]]}}),k_(this._stackedOnPoints,x)&&k_(this._points,h)||(m?this._doUpdateAnimation(a,x,o,i,T,y,_):(T&&(h=P_(h,o,T,_),x&&(x=P_(x,o,T,_))),p.setShape({points:h}),f&&f.setShape({points:h,stackedOnPoints:x})))}else w&&d.updateData(a,{isIgnore:C,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[h[2*t],h[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,o,M),T&&(h=P_(h,o,T,_),x&&(x=P_(x,o,T,_))),p=this._newPolyline(h),v?f=this._newPolygon(h,x):f&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(t,o,qu(E)),g.setClipPath(N_(this,o,!0,t));var D=t.getModel("emphasis"),k=D.get("focus"),A=D.get("blurScope"),L=D.get("disabled");p.useStyle(j(s.getLineStyle(),{fill:"none",stroke:E,lineJoin:"bevel"})),ch(p,t,"lineStyle"),p.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1),dl(p).seriesIndex=t.seriesIndex,sh(p,k,A,L);var R=R_(t.get("smooth")),P=t.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:P,connectNulls:_}),f){var O=a.getCalculationInfo("stackedOnSeries"),z=0;f.useStyle(j(l.getAreaStyle(),{fill:E,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),O&&(z=R_(O.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:z,smoothMonotone:P,connectNulls:_}),ch(f,t,"areaStyle"),dl(f).seriesIndex=t.seriesIndex,sh(f,k,A,L)}var N=function(t){n._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=N)})),this._polyline.onHoverStateChange=N,this._data=a,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=T,this._valueOrigin=y,t.get("triggerLineEvent")&&(this.packEventData(t,p),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){dl(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,i,n){var o=t.getData(),r=Nr(o,n);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],h=a[2*r+1];if(isNaN(l)||isNaN(h))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,h))return;var u=t.get("zlevel")||0,c=t.get("z")||0;(s=new s_(o,r)).x=l,s.y=h,s.setZ(u,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=u,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else gm.prototype.highlight.call(this,t,e,i,n)},e.prototype.downplay=function(t,e,i,n){var o=t.getData(),r=Nr(o,n);if(this._changePolyState("normal"),null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else gm.prototype.downplay.call(this,t,e,i,n)},e.prototype._changePolyState=function(t){var e=this._polygon;Gl(this._polyline,t),e&&Gl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new C_({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new M_({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,e,i){var n,o,r=e.getBaseAxis(),a=r.inverse;"cartesian2d"===e.type?(n=r.isHorizontal(),o=!1):"polar"===e.type&&(n="angle"===r.dim,o=!0);var s=t.hostModel,l=s.get("animationDuration");nt(l)&&(l=l(null));var h=s.get("animationDelay")||0,u=nt(h)?h(null):h;t.eachItemGraphicEl((function(t,r){var s=t;if(s){var c=[t.x,t.y],d=void 0,p=void 0,f=void 0;if(i)if(o){var g=i,m=e.pointToCoord(c);n?(d=g.startAngle,p=g.endAngle,f=-m[1]/180*Math.PI):(d=g.r0,p=g.r,f=m[0])}else{var v=i;n?(d=v.x,p=v.x+v.width,f=t.x):(d=v.y+v.height,p=v.y,f=t.y)}var y=p===d?0:(f-d)/(p-d);a&&(y=1-y);var b=nt(h)?h(r):l*y+u,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:b}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,i){var n=t.getModel("endLabel");if(z_(t)){var o=t.getData(),r=this._polyline,a=o.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new cl({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var l=function(t){for(var e,i,n=t.length/2;n>0&&(e=t[2*n-2],i=t[2*n-1],isNaN(e)||isNaN(i));n--);return n-1}(a);l>=0&&(Dh(r,kh(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,i){return null!=i?o_(o,i):n_(o,t)},enableTextSetter:!0},function(t,e){var i=e.getBaseAxis(),n=i.isHorizontal(),o=i.inverse,r=n?o?"right":"left":"center",a=n?"middle":o?"top":"bottom";return{normal:{align:t.get("align")||r,verticalAlign:t.get("verticalAlign")||a}}}(n,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,i,n,o,r,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==n.originalX&&(n.originalX=s.x,n.originalY=s.y);var h=i.getLayout("points"),u=i.hostModel,c=u.get("connectNulls"),d=r.get("precision"),p=r.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,b=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),w=g?"x":"y",_=function(t,e,i){for(var n,o,r=t.length/2,a="x"===i?0:1,s=0,l=-1,h=0;h<r;h++)if(o=t[2*h+a],!isNaN(o)&&!isNaN(t[2*h+1-a]))if(0!==h){if(n<=e&&o>=e||n>=e&&o<=e){l=h;break}s=h,n=o}else n=o;return{range:[s,l],t:(e-n)/(o-n)}}(h,y,w),C=_.range,S=C[1]-C[0],M=void 0;if(S>=1){if(S>1&&!c){var T=O_(h,C[0]);s.attr({x:T[0]+b,y:T[1]+x}),o&&(M=u.getRawValue(C[0]))}else{(T=l.getPointOn(y,w))&&s.attr({x:T[0]+b,y:T[1]+x});var E=u.getRawValue(C[0]),I=u.getRawValue(C[1]);o&&(M=Yr(i,d,E,I,_.t))}n.lastFrameIndex=C[0]}else{var D=1===t||n.lastFrameIndex>0?C[0]:0;T=O_(h,D),o&&(M=u.getRawValue(D)),s.attr({x:T[0]+b,y:T[1]+x})}if(o){var k=Bh(s);"function"==typeof k.setLabelText&&k.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,e,i,n,o,r,a){var s=this._polyline,l=this._polygon,h=t.hostModel,u=function(t,e,i,n,o,r,a,s){for(var l=function(t,e){var i=[];return e.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,e){i.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,e),h=[],u=[],c=[],d=[],p=[],f=[],g=[],m=p_(o,e,a),v=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<l.length;b++){var x=l[b],w=!0,_=void 0,C=void 0;switch(x.cmd){case"=":_=2*x.idx,C=2*x.idx1;var S=v[_],M=v[_+1],T=y[C],E=y[C+1];(isNaN(S)||isNaN(M))&&(S=T,M=E),h.push(S,M),u.push(T,E),c.push(i[_],i[_+1]),d.push(n[C],n[C+1]),g.push(e.getRawIndex(x.idx1));break;case"+":var I=x.idx,D=m.dataDimsForPoint,k=o.dataToPoint([e.get(D[0],I),e.get(D[1],I)]);C=2*I,h.push(k[0],k[1]),u.push(y[C],y[C+1]);var A=f_(m,o,e,I);c.push(A[0],A[1]),d.push(n[C],n[C+1]),g.push(e.getRawIndex(I));break;case"-":w=!1}w&&(p.push(x),f.push(f.length))}f.sort((function(t,e){return g[t]-g[e]}));var L=h.length,R=v_(L),P=v_(L),O=v_(L),z=v_(L),N=[];for(b=0;b<f.length;b++){var B=f[b],F=2*b,V=2*B;R[F]=h[V],R[F+1]=h[V+1],P[F]=u[V],P[F+1]=u[V+1],O[F]=c[V],O[F+1]=c[V+1],z[F]=d[V],z[F+1]=d[V+1],N[b]=p[B]}return{current:R,next:P,stackedOnCurrent:O,stackedOnNext:z,status:N}}(this._data,t,this._stackedOnPoints,e,this._coordSys,0,this._valueOrigin),c=u.current,d=u.stackedOnCurrent,p=u.next,f=u.stackedOnNext;if(o&&(c=P_(u.current,i,o,a),d=P_(u.stackedOnCurrent,i,o,a),p=P_(u.next,i,o,a),f=P_(u.stackedOnNext,i,o,a)),L_(c,p)>3e3||l&&L_(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=u.current,s.shape.points=c;var g={shape:{points:p}};u.current!==c&&(g.shape.__points=u.next),s.stopAnimation(),bh(s,g,h),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),bh(l,{shape:{stackedOnPoints:f}},h),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=u.status,y=0;y<v.length;y++)if("="===v[y].cmd){var b=t.getItemGraphicEl(v[y].idx1);b&&m.push({el:b,ptIdx:y})}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var t=s.shape.__points,e=0;e<m.length;e++){var i=m[e].el,n=2*m[e].ptIdx;i.x=t[n],i.y=t[n+1],i.markRedraw()}}))},e.prototype.remove=function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(gm);const F_=B_;function V_(t,e){return{seriesType:t,plan:sf(),reset:function(t){var i=t.getData(),n=t.coordinateSystem,o=t.pipelineContext,r=e||o.large;if(n){var a=K(n.dimensions,(function(t){return i.mapDimension(t)})).slice(0,2),s=a.length,l=i.getCalculationInfo("stackResultDimension");Qw(i,a[0])&&(a[0]=l),Qw(i,a[1])&&(a[1]=l);var h=i.getStore(),u=i.getDimensionIndex(a[0]),c=i.getDimensionIndex(a[1]);return s&&{progress:function(t,e){for(var i=t.end-t.start,o=r&&v_(i*s),a=[],l=[],d=t.start,p=0;d<t.end;d++){var f=void 0;if(1===s){var g=h.get(u,d);f=n.dataToPoint(g,null,l)}else a[0]=h.get(u,d),a[1]=h.get(c,d),f=n.dataToPoint(a,null,l);r?(o[p++]=f[0],o[p++]=f[1]):e.setItemLayout(d,f.slice())}r&&e.setLayout("points",o)}}}}}}var H_={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},G_=function(t){return Math.round(t.length/2)};function W_(t){return{seriesType:t,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),r=t.coordinateSystem,a=n.count();if(a>10&&"cartesian2d"===r.type&&o){var s=r.getBaseAxis(),l=r.getOtherAxis(s),h=s.getExtent(),u=i.getDevicePixelRatio(),c=Math.abs(h[1]-h[0])*(u||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===o&&t.setData(n.lttbDownSample(n.mapDimension(l.dim),1/d));var p=void 0;ot(o)?p=H_[o]:nt(o)&&(p=o),p&&t.setData(n.downSample(n.mapDimension(l.dim),1/d,p,G_))}}}}}var U_="__ec_stack_";function j_(t){return t.get("stack")||U_+t.seriesIndex}function X_(t){return t.dim+t.index}function Y_(t,e){var i=[];return e.eachSeriesByType(t,(function(t){J_(t)&&i.push(t)})),i}function Z_(t){var e=function(t){var e={};q(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=t.getData(),o=i.dim+"_"+i.index,r=n.getDimensionIndex(n.mapDimension(i.dim)),a=n.getStore(),s=0,l=a.count();s<l;++s){var h=a.get(r,s);e[o]?e[o].push(h):e[o]=[h]}}));var i={};for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(o){o.sort((function(t,e){return t-e}));for(var r=null,a=1;a<o.length;++a){var s=o[a]-o[a-1];s>0&&(r=null===r?s:Math.min(r,s))}i[n]=r}}return i}(t),i=[];return q(t,(function(t){var n,o=t.coordinateSystem.getBaseAxis(),r=o.getExtent();if("category"===o.type)n=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=e[a],l=Math.abs(r[1]-r[0]),h=o.scale.getExtent(),u=Math.abs(h[1]-h[0]);n=s?l/u*s:l}else{var c=t.getData();n=Math.abs(r[1]-r[0])/c.count()}var d=nr(t.get("barWidth"),n),p=nr(t.get("barMaxWidth"),n),f=nr(t.get("barMinWidth")||(Q_(t)?.5:1),n),g=t.get("barGap"),m=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:X_(o),stackId:j_(t)})})),q_(i)}function q_(t){var e={};q(t,(function(t,i){var n=t.axisKey,o=t.bandWidth,r=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=r.stacks;e[n]=r;var s=t.stackId;a[s]||r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var h=t.barMaxWidth;h&&(a[s].maxWidth=h);var u=t.barMinWidth;u&&(a[s].minWidth=u);var c=t.barGap;null!=c&&(r.gap=c);var d=t.barCategoryGap;null!=d&&(r.categoryGap=d)}));var i={};return q(e,(function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,r=t.categoryGap;if(null==r){var a=Q(n).length;r=Math.max(35-4*a,15)+"%"}var s=nr(r,o),l=nr(t.gap,1),h=t.remainedWidth,u=t.autoWidthCount,c=(h-s)/(u+(u-1)*l);c=Math.max(c,0),q(n,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width)n=t.width,e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,h-=n+l*n,u--;else{var n=c;e&&e<n&&(n=Math.min(e,h)),i&&i>n&&(n=i),n!==c&&(t.width=n,h-=n+l*n,u--)}})),c=(h-s)/(u+(u-1)*l),c=Math.max(c,0);var d,p=0;q(n,(function(t,e){t.width||(t.width=c),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;q(n,(function(t,n){i[e][n]=i[e][n]||{bandWidth:o,offset:f,width:t.width},f+=t.width*(1+l)}))})),i}function K_(t,e){var i=Y_(t,e),n=Z_(i);q(i,(function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=j_(t),r=n[X_(i)][o],a=r.offset,s=r.width;e.setLayout({bandWidth:r.bandWidth,offset:a,size:s})}))}function $_(t){return{seriesType:t,plan:sf(),reset:function(t){if(J_(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),r=e.getDimensionIndex(e.mapDimension(o.dim)),a=e.getDimensionIndex(e.mapDimension(n.dim)),s=t.get("showBackground",!0),l=e.mapDimension(o.dim),h=e.getCalculationInfo("stackResultDimension"),u=Qw(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=o.isHorizontal(),d=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,o),p=Q_(t),f=t.get("barMinHeight")||0,g=h&&e.getDimensionIndex(h),m=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var n,o=t.count,l=p&&v_(3*o),h=p&&s&&v_(3*o),y=p&&v_(o),b=i.master.getRect(),x=c?b.width:b.height,w=e.getStore(),_=0;null!=(n=t.next());){var C=w.get(u?g:r,n),S=w.get(a,n),M=d,T=void 0;u&&(T=+C-w.get(r,n));var E=void 0,I=void 0,D=void 0,k=void 0;if(c){var A=i.dataToPoint([C,S]);u&&(M=i.dataToPoint([T,S])[0]),E=M,I=A[1]+v,D=A[0]-M,k=m,Math.abs(D)<f&&(D=(D<0?-1:1)*f)}else A=i.dataToPoint([S,C]),u&&(M=i.dataToPoint([S,T])[1]),E=A[0]+v,I=M,D=m,k=A[1]-M,Math.abs(k)<f&&(k=(k<=0?-1:1)*f);p?(l[_]=E,l[_+1]=I,l[_+2]=c?D:k,h&&(h[_]=c?b.x:E,h[_+1]=c?I:b.y,h[_+2]=x),y[n]=n):e.setItemLayout(n,{x:E,y:I,width:D,height:k}),_+=3}p&&e.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:h,valueAxisHorizontal:c})}}}}}}function J_(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Q_(t){return t.pipelineContext&&t.pipelineContext.large}var tC=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.getInitialData=function(t,e){return e_(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),r=n.dataToPoint(o);if(i)q(n.getAxes(),(function(t,i){if("category"===t.type&&null!=e){var n=t.getTicksCoords(),a=o[i],s="x1"===e[i]||"y1"===e[i];if(s&&(a+=1),n.length<2)return;if(2===n.length)return void(r[i]=t.toGlobalCoord(t.getExtent()[s?1:0]));for(var l=void 0,h=void 0,u=1,c=0;c<n.length;c++){var d=n[c].coord,p=c===n.length-1?n[c-1].tickValue+u:n[c].tickValue;if(p===a){h=d;break}if(p<a)l=d;else if(null!=l&&p>a){h=(d+l)/2;break}1===c&&(u=p-n[0].tickValue)}null==h&&(l?l&&(h=n[n.length-1].coord):h=n[0].coord),r[i]=t.toGlobalCoord(h)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),h=n.getBaseAxis().isHorizontal()?0:1;r[h]+=s+l/2}return r}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(of);of.registerClass(tC);const eC=tC,iC=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.getInitialData=function(){return e_(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,i){return i.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ou(eC.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(eC);var nC=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},oC=function(t){function e(e){var i=t.call(this,e)||this;return i.type="sausage",i}return m(e,t),e.prototype.getDefaultShape=function(){return new nC},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,h=e.endAngle,u=e.clockwise,c=2*Math.PI,d=u?h-l<c:l-h<c;d||(l=h-(u?c:-c));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(h),m=Math.sin(h);d?(t.moveTo(p*o+i,f*o+n),t.arc(p*s+i,f*s+n,a,-Math.PI+l,l,!u)):t.moveTo(p*r+i,f*r+n),t.arc(i,n,r,l,h,!u),t.arc(g*s+i,m*s+n,a,h-2*Math.PI,h-Math.PI,!u),0!==o&&t.arc(i,n,o,h,l,u)},e}(Ps);const rC=oC;function aC(t,e,i){return e*Math.sin(t)*(i?-1:1)}function sC(t,e,i){return e*Math.cos(t)*(i?1:-1)}function lC(t,e,i){var n=t.get("borderRadius");if(null==n)return i?{cornerRadius:0}:null;it(n)||(n=[n,n,n,n]);var o=Math.abs(e.r||0-e.r0||0);return{cornerRadius:K(n,(function(t){return Oo(t,o)}))}}var hC=Math.max,uC=Math.min,cC=function(t){function e(){var i=t.call(this)||this;return i.type=e.type,i._isFirstFrame=!0,i}return m(e,t),e.prototype.render=function(t,e,i,n){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i,n))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,i,n){var o,r=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,h=l.getBaseAxis();"cartesian2d"===l.type?o=h.isHorizontal():"polar"===l.type&&(o="angle"===h.dim);var u=t.isAnimationEnabled()?t:null,c=function(t,e){var i=t.get("realtimeSort",!0),n=e.getBaseAxis();if(i&&"category"===n.type&&"cartesian2d"===e.type)return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}(t,l);c&&this._enableRealtimeSort(c,a,i);var d=t.get("clip",!0)||c,p=function(t,e){var i=t.getArea&&t.getArea();if(D_(t,"cartesian2d")){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var o=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=o,i.width+=2*o):(i.y-=o,i.height+=2*o)}}return i}(l,a);r.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],b=this._backgroundEls,x=n&&n.isInitSort,w=n&&"changeAxisOrder"===n.type;function _(t){var e=bC[l.type](a,t),i=function(t,e,i){return new("polar"===t.type?Zf:qs)({shape:TC(e,i,t),silent:!0,z2:0})}(l,o,e);return i.useStyle(m.getItemStyle()),"cartesian2d"===l.type?i.setShape("r",v):i.setShape("cornerRadius",v),y[t]=i,i}a.diff(s).add((function(e){var i=a.getItemModel(e),n=bC[l.type](a,e,i);if(g&&_(e),a.hasValue(e)&&yC[l.type](n)){var s=!1;d&&(s=dC[l.type](p,n));var m=pC[l.type](t,a,e,n,o,u,h.model,!1,f);c&&(m.forceLabelAnimation=!0),wC(m,a,e,i,n,t,o,"polar"===l.type),x?m.attr({shape:n}):c?fC(c,u,m,n,e,o,!1,!1):xh(m,{shape:n},t,e),a.setItemGraphicEl(e,m),r.add(m),m.ignore=s}})).update((function(e,i){var n=a.getItemModel(e),C=bC[l.type](a,e,n);if(g){var S=void 0;0===b.length?S=_(i):((S=b[i]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?S.setShape("r",v):S.setShape("cornerRadius",v),y[e]=S);var M=bC[l.type](a,e);bh(S,{shape:TC(o,M,l)},u,e)}var T=s.getItemGraphicEl(i);if(a.hasValue(e)&&yC[l.type](C)){var E=!1;if(d&&(E=dC[l.type](p,C))&&r.remove(T),T?Mh(T):T=pC[l.type](t,a,e,C,o,u,h.model,!!T,f),c&&(T.forceLabelAnimation=!0),w){var I=T.getTextContent();if(I){var D=Bh(I);null!=D.prevValue&&(D.prevValue=D.value)}}else wC(T,a,e,n,C,t,o,"polar"===l.type);x?T.attr({shape:C}):c?fC(c,u,T,C,e,o,!0,w):bh(T,{shape:C},t,e,null),a.setItemGraphicEl(e,T),T.ignore=E,r.add(T)}else r.remove(T)})).remove((function(e){var i=s.getItemGraphicEl(e);i&&Sh(i,t,e)})).execute();var C=this._backgroundGroup||(this._backgroundGroup=new qo);C.removeAll();for(var S=0;S<y.length;++S)C.add(y[S]);r.add(C),this._backgroundEls=y,this._data=a},e.prototype._renderLarge=function(t,e,i){this._clear(),SC(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),SC(e,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)&&I_(t.coordinateSystem,!1,t),i=this.group;e?i.setClipPath(e):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,e,i){var n=this;if(e.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(e,t,i),this._isFirstFrame=!1;else{var r=function(t){var i=e.getItemGraphicEl(t),n=i&&i.shape;return n&&Math.abs(o.isHorizontal()?n.height:n.width)||0};this._onRendered=function(){n._updateSortWithinSameData(e,r,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,e,i){var n=[];return t.each(t.mapDimension(e.dim),(function(t,e){var o=i(e);o=null==o?NaN:o,n.push({dataIndex:e,mappedValue:o,ordinalNumber:t})})),n.sort((function(t,e){return e.mappedValue-t.mappedValue})),{ordinalNumbers:K(n,(function(t){return t.ordinalNumber}))}},e.prototype._isOrderChangedWithinSameData=function(t,e,i){for(var n=i.scale,o=t.mapDimension(i.dim),r=Number.MAX_VALUE,a=0,s=n.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(o,n.getRawOrdinalNumber(a)),h=l<0?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(h>r)return!0;r=h}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var i=e.scale,n=i.getExtent(),o=Math.max(0,n[0]),r=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=r;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,e,i,n){if(this._isOrderChangedWithinSameData(t,e,i)){var o=this._dataSort(t,i,e);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,e,i){var n=e.baseAxis,o=this._dataSort(t,n,(function(i){return t.get(t.mapDimension(e.otherAxis.dim),i)}));i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(e){Sh(e,t,dl(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(gm),dC={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,r=t.y+t.height,a=hC(e.x,t.x),s=uC(e.x+e.width,o),l=hC(e.y,t.y),h=uC(e.y+e.height,r),u=s<a,c=h<l;return e.x=u&&a>o?s:a,e.y=c&&l>r?h:l,e.width=u?0:s-a,e.height=c?0:h-l,i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),u||c},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(i<0){var n=e.r;e.r=e.r0,e.r0=n}var o=uC(e.r,t.r),r=hC(e.r0,t.r0);e.r=o,e.r0=r;var a=o-r<0;return i<0&&(n=e.r,e.r=e.r0,e.r0=n),a}},pC={cartesian2d:function(t,e,i,n,o,r,a,s,l){var h=new qs({shape:U({},n),z2:1});return h.__dataIndex=i,h.name="item",r&&(h.shape[o?"height":"width"]=0),h},polar:function(t,e,i,n,o,r,a,s,l){var h=!o&&l?rC:Zf,u=new h({shape:n,z2:1});u.name="item";var c,d,p=xC(o);if(u.calculateTextPosition=(c=p,d=({isRoundCap:h===rC}||{}).isRoundCap,function(t,e,i){var n=e.position;if(!n||n instanceof Array)return zo(t,e,i);var o=c(n),r=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,h=a.r,u=a.r0,p=(h+u)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(h-u)/2:0,y=Math.cos,b=Math.sin,x=s+h*y(f),w=l+h*b(f),_="left",C="top";switch(o){case"startArc":x=s+(u-r)*y(m),w=l+(u-r)*b(m),_="center",C="top";break;case"insideStartArc":x=s+(u+r)*y(m),w=l+(u+r)*b(m),_="center",C="bottom";break;case"startAngle":x=s+p*y(f)+aC(f,r+v,!1),w=l+p*b(f)+sC(f,r+v,!1),_="right",C="middle";break;case"insideStartAngle":x=s+p*y(f)+aC(f,-r+v,!1),w=l+p*b(f)+sC(f,-r+v,!1),_="left",C="middle";break;case"middle":x=s+p*y(m),w=l+p*b(m),_="center",C="middle";break;case"endArc":x=s+(h+r)*y(m),w=l+(h+r)*b(m),_="center",C="bottom";break;case"insideEndArc":x=s+(h-r)*y(m),w=l+(h-r)*b(m),_="center",C="top";break;case"endAngle":x=s+p*y(g)+aC(g,r+v,!0),w=l+p*b(g)+sC(g,r+v,!0),_="left",C="middle";break;case"insideEndAngle":x=s+p*y(g)+aC(g,-r+v,!0),w=l+p*b(g)+sC(g,-r+v,!0),_="right",C="middle";break;default:return zo(t,e,i)}return(t=t||{}).x=x,t.y=w,t.align=_,t.verticalAlign=C,t}),r){var f=o?"r":"endAngle",g={};u.shape[f]=o?n.r0:n.startAngle,g[f]=n[f],(s?bh:xh)(u,{shape:g},r)}return u}};function fC(t,e,i,n,o,r,a,s){var l,h;r?(h={x:n.x,width:n.width},l={y:n.y,height:n.height}):(h={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(a?bh:xh)(i,{shape:l},e,o,null),(a?bh:xh)(i,{shape:h},e?t.baseAxis.model:null,o)}function gC(t,e){for(var i=0;i<e.length;i++)if(!isFinite(t[e[i]]))return!0;return!1}var mC=["x","y","width","height"],vC=["cx","cy","r","startAngle","endAngle"],yC={cartesian2d:function(t){return!gC(t,mC)},polar:function(t){return!gC(t,vC)}},bC={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=i?function(t,e){var i=t.get(["itemStyle","borderColor"]);if(!i||"none"===i)return 0;var n=t.get(["itemStyle","borderWidth"])||0,o=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,o,r)}(i,n):0,r=n.width>0?1:-1,a=n.height>0?1:-1;return{x:n.x+r*o/2,y:n.y+a*o/2,width:n.width-r*o,height:n.height-a*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function xC(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function wC(t,e,i,n,o,r,a,s){var l=e.getItemVisual(i,"style");if(s){if(!r.get("roundCap")){var h=t.shape;U(h,lC(n.getModel("itemStyle"),h,!0)),t.setShape(h)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var c=n.getShallow("cursor");c&&t.attr("cursor",c);var d=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",p=kh(n);Dh(t,p,{labelFetcher:r,labelDataIndex:i,defaultText:n_(r.getData(),i),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var f=t.getTextContent();if(s&&f){var g=n.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,i,n){if(at(n))t.setTextConfig({rotation:n});else if(it(e))t.setTextConfig({rotation:0});else{var o,r=t.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=(a+s)/2,h=i(e);switch(h){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void t.setTextConfig({rotation:0})}var u=1.5*Math.PI-o;"middle"===h&&u>Math.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),t.setTextConfig({rotation:u})}}(t,"outside"===g?d:g,xC(a),n.get(["label","rotate"]))}Fh(f,p,r.getRawValue(i),(function(t){return o_(e,t)}));var m=n.getModel(["emphasis"]);sh(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),ch(t,n),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(o)&&(t.style.fill="none",t.style.stroke="none",q(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var _C=function(){},CC=function(t){function e(e){var i=t.call(this,e)||this;return i.type="largeBar",i}return m(e,t),e.prototype.getDefaultShape=function(){return new _C},e.prototype.buildPath=function(t,e){for(var i=e.points,n=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l<i.length;l+=3)a[n]=s,a[o]=i[l+2],r[n]=i[l+n],r[o]=i[l+o],t.rect(r[0],r[1],a[0],a[1])},e}(Ps);function SC(t,e,i,n){var o=t.getData(),r=o.getLayout("valueAxisHorizontal")?1:0,a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=t.getModel("backgroundStyle"),h=o.getLayout("largeBackgroundPoints");if(h){var u=new CC({shape:{points:h},incremental:!!n,silent:!0,z2:0});u.baseDimIdx=r,u.largeDataIndices=a,u.barWidth=s,u.useStyle(l.getItemStyle()),e.add(u),i&&i.push(u)}var c=new CC({shape:{points:o.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=r,c.largeDataIndices=a,c.barWidth=s,e.add(c),c.useStyle(o.getVisual("style")),dl(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",MC),c.on("mousemove",MC)),i&&i.push(c)}var MC=bm((function(t){var e=function(t,e,i){for(var n=t.baseDimIdx,o=1-n,r=t.shape.points,a=t.largeDataIndices,s=[],l=[],h=t.barWidth,u=0,c=r.length/3;u<c;u++){var d=3*u;if(l[n]=h,l[o]=r[d+2],s[n]=r[d+n],s[o]=r[d+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),e>=s[0]&&e<=s[0]+l[0]&&i>=s[1]&&i<=s[1]+l[1])return a[u]}return-1}(this,t.offsetX,t.offsetY);dl(this).dataIndex=e>=0?e:null}),30,!1);function TC(t,e,i){if(D_(i,"cartesian2d")){var n=e,o=i.getArea();return{x:t?n.x:o.x,y:t?o.y:n.y,width:t?n.width:o.width,height:t?o.height:n.height}}var r=e;return{cx:(o=i.getArea()).cx,cy:o.cy,r0:t?o.r0:r.r0,r:t?o.r:r.r,startAngle:t?r.startAngle:0,endAngle:t?r.endAngle:2*Math.PI}}const EC=cC;var IC=2*Math.PI,DC=Math.PI/180;function kC(t,e){return ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function AC(t,e){var i=kC(t,e),n=t.get("center"),o=t.get("radius");it(o)||(o=[0,o]);var r,a,s=nr(i.width,e.getWidth()),l=nr(i.height,e.getHeight()),h=Math.min(s,l),u=nr(o[0],h/2),c=nr(o[1],h/2),d=t.coordinateSystem;if(d){var p=d.dataToPoint(n);r=p[0]||0,a=p[1]||0}else it(n)||(n=[n,n]),r=nr(n[0],s)+i.x,a=nr(n[1],l)+i.y;return{cx:r,cy:a,r0:u,r:c}}function LC(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.getData(),n=e.mapDimension("value"),o=kC(t,i),r=AC(t,i),a=r.cx,s=r.cy,l=r.r,h=r.r0,u=-t.get("startAngle")*DC,c=t.get("minAngle")*DC,d=0;e.each(n,(function(t){!isNaN(t)&&d++}));var p=e.getSum(n),f=Math.PI/(p||d)*2,g=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),y=e.getDataExtent(n);y[0]=0;var b=IC,x=0,w=u,_=g?1:-1;if(e.setLayout({viewRect:o,r:l}),e.each(n,(function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:h,r:m?NaN:l});else{(n="area"!==m?0===p&&v?f:t*f:IC/d)<c?(n=c,b-=c):x+=t;var o=w+_*n;e.setItemLayout(i,{angle:n,startAngle:w,endAngle:o,clockwise:g,cx:a,cy:s,r0:h,r:m?ir(t,y,[h,l]):l}),w=o}})),b<IC&&d)if(b<=.001){var C=IC/d;e.each(n,(function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=C,n.startAngle=u+_*i*C,n.endAngle=u+_*(i+1)*C}}))}else f=b/x,w=u,e.each(n,(function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),o=n.angle===c?c:t*f;n.startAngle=w,n.endAngle=w+_*o,w+=_*o}}))}))}function RC(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf((function(t){for(var e=n.getName(t),o=0;o<i.length;o++)if(!i[o].isSelected(e))return!1;return!0}))}}}}var PC=Math.PI/180;function OC(t,e,i,n,o,r,a,s,l,h){if(!(t.length<2)){for(var u=t.length,c=0;c<u;c++)if("outer"===t[c].position&&"labelLine"===t[c].labelAlignTo){var d=t[c].label.x-h;t[c].linePoints[1][0]+=d,t[c].label.x=h}Bb(t,l,l+a)&&function(t){for(var r={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var l=t[s],h=l.label.y>i?a:r,u=Math.abs(l.label.y-i);if(u>=h.maxY){var c=l.label.x-e-l.len2*o,d=n+l.len,f=Math.abs(c)<d?Math.sqrt(u*u/(1-c*c/d/d)):d;h.rB=f,h.maxY=u}h.list.push(l)}p(r),p(a)}(t)}function p(t){for(var r=t.rB,a=r*r,s=0;s<t.list.length;s++){var l=t.list[s],h=Math.abs(l.label.y-i),u=n+l.len,c=u*u,d=Math.sqrt((1-Math.abs(h*h/a))*c),p=e+(d+l.len2)*o,f=p-l.label.x;zC(l,l.targetTextWidth-f*o,!0),l.label.x=p}}}function zC(t,e,i){if(void 0===i&&(i=!1),null==t.labelStyleWidth){var n=t.label,o=n.style,r=t.rect,a=o.backgroundColor,s=o.padding,l=s?s[1]+s[3]:0,h=o.overflow,u=r.width+(a?0:l);if(e<u||i){var c=r.height;if(h&&h.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var d=n.getBoundingRect();n.setStyle("width",Math.ceil(d.width)),n.setStyle("backgroundColor",a)}else{var p=e-l,f=e<u?p:i?p>t.unconstrainedWidth?null:p:null;n.setStyle("width",f)}var g=n.getBoundingRect();r.width=g.width;var m=(n.style.margin||0)+2.1;r.height=g.height+m,r.y-=(r.height-c)/2}}}function NC(t){return"center"===t.position}var BC=function(t){function e(e,i,n){var o=t.call(this)||this;o.z2=2;var r=new cl;return o.setTextContent(r),o.updateData(e,i,n,!0),o}return m(e,t),e.prototype.updateData=function(t,e,i,n){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),h=U(lC(a.getModel("itemStyle"),l,!0),l);if(isNaN(h.startAngle))o.setShape(h);else{if(n){o.setShape(h);var u=r.getShallow("animationType");r.ecModel.ssr?(xh(o,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):"scale"===u?(o.shape.r=l.r0,xh(o,{shape:{r:l.r}},r,e)):null!=i?(o.setShape({startAngle:i,endAngle:i}),xh(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,bh(o,{shape:{endAngle:l.endAngle}},r,e))}else Mh(o),bh(o,{shape:h},r,e);o.useStyle(t.getItemVisual(e,"style")),ch(o,a);var c=(l.startAngle+l.endAngle)/2,d=r.get("selectedOffset"),p=Math.cos(c)*d,f=Math.sin(c)*d,g=a.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=U({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},lC(s.getModel("itemStyle"),l)),U(o.ensureState("select"),{x:p,y:f,shape:lC(a.getModel(["select","itemStyle"]),l)}),U(o.ensureState("blur"),{shape:lC(a.getModel(["blur","itemStyle"]),l)});var m=o.getTextGuideLine(),v=o.getTextContent();m&&U(m.ensureState("select"),{x:p,y:f}),U(v.ensureState("select"),{x:p,y:f}),sh(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},e.prototype._updateLabel=function(t,e,i){var n=this,o=e.getItemModel(i),r=o.getModel("labelLine"),a=e.getItemVisual(i,"style"),s=a&&a.fill,l=a&&a.opacity;Dh(n,kh(o),{labelFetcher:e.hostModel,labelDataIndex:i,inheritColor:s,defaultOpacity:l,defaultText:t.getFormattedLabel(i,"normal")||e.getName(i)});var h=n.getTextContent();n.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var u=t.get(["label","position"]);if("outside"!==u&&"outer"!==u)n.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new og,this.setTextGuideLine(c)),Pb(this,Ob(o),{stroke:s,opacity:gt(r.get(["lineStyle","opacity"]),l,1)})}},e}(Zf);const FC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return m(e,t),e.prototype.render=function(t,e,i,n){var o,r=t.getData(),a=this._data,s=this.group;if(!a&&r.count()>0){for(var l=r.getItemLayout(0),h=1;isNaN(l&&l.startAngle)&&h<r.count();++h)l=r.getItemLayout(h);l&&(o=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===r.count()&&t.get("showEmptyCircle")){var u=new Zf({shape:AC(t,i)});u.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=u,s.add(u)}r.diff(a).add((function(t){var e=new BC(r,t,o);r.setItemGraphicEl(t,e),s.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);i.updateData(r,t,o),i.off("click"),s.add(i),r.setItemGraphicEl(t,i)})).remove((function(e){Sh(a.getItemGraphicEl(e),t,e)})).execute(),function(t){var e,i,n=t.getData(),o=[],r=!1,a=(t.get("minShowLabelAngle")||0)*PC,s=n.getLayout("viewRect"),l=n.getLayout("r"),h=s.width,u=s.x,c=s.y,d=s.height;function p(t){t.ignore=!0}n.each((function(t){var s=n.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),f=s.getTextGuideLine(),g=n.getItemModel(t),m=g.getModel("label"),v=m.get("position")||g.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),b=m.get("alignTo"),x=nr(m.get("edgeDistance"),h),w=m.get("bleedMargin"),_=g.getModel("labelLine"),C=_.get("length");C=nr(C,h);var S=_.get("length2");if(S=nr(S,h),Math.abs(c.endAngle-c.startAngle)<a)return q(d.states,p),d.ignore=!0,void(f&&(q(f.states,p),f.ignore=!0));if(function(t){if(!t.ignore)return!0;for(var e in t.states)if(!1===t.states[e].ignore)return!0;return!1}(d)){var M,T,E,I,D=(c.startAngle+c.endAngle)/2,k=Math.cos(D),A=Math.sin(D);e=c.cx,i=c.cy;var L="inside"===v||"inner"===v;if("center"===v)M=c.cx,T=c.cy,I="center";else{var R=(L?(c.r+c.r0)/2*k:c.r*k)+e,P=(L?(c.r+c.r0)/2*A:c.r*A)+i;if(M=R+3*k,T=P+3*A,!L){var O=R+k*(C+l-c.r),z=P+A*(C+l-c.r),N=O+(k<0?-1:1)*S;M="edge"===b?k<0?u+x:u+h-x:N+(k<0?-y:y),T=z,E=[[R,P],[O,z],[N,z]]}I=L?"center":"edge"===b?k>0?"right":"left":k>0?"left":"right"}var B=Math.PI,F=0,V=m.get("rotate");if(at(V))F=V*(B/180);else if("center"===v)F=0;else if("radial"===V||!0===V)F=k<0?-D+B:-D;else if("tangential"===V&&"outside"!==v&&"outer"!==v){var H=Math.atan2(k,A);H<0&&(H=2*B+H),A>0&&(H=B+H),F=H-B}if(r=!!F,d.x=M,d.y=T,d.rotation=F,d.setStyle({verticalAlign:"middle"}),L){d.setStyle({align:I});var G=d.states.select;G&&(G.x+=d.x,G.y+=d.y)}else{var W=d.getBoundingRect().clone();W.applyTransform(d.getComputedTransform());var U=(d.style.margin||0)+2.1;W.y-=U/2,W.height+=U,o.push({label:d,labelLine:f,position:v,len:C,len2:S,minTurnAngle:_.get("minTurnAngle"),maxSurfaceAngle:_.get("maxSurfaceAngle"),surfaceNormal:new Le(k,A),linePoints:E,textAlign:I,labelDistance:y,labelAlignTo:b,edgeDistance:x,bleedMargin:w,rect:W,unconstrainedWidth:W.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:L})}})),!r&&t.get("avoidLabelOverlap")&&function(t,e,i,n,o,r,a,s){for(var l=[],h=[],u=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++){var p=t[d].label;NC(t[d])||(p.x<e?(u=Math.min(u,p.x),l.push(t[d])):(c=Math.max(c,p.x),h.push(t[d])))}for(d=0;d<t.length;d++)if(!NC(m=t[d])&&m.linePoints){if(null!=m.labelStyleWidth)continue;p=m.label;var f,g=m.linePoints;f="edge"===m.labelAlignTo?p.x<e?g[2][0]-m.labelDistance-a-m.edgeDistance:a+o-m.edgeDistance-g[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?p.x<e?u-a-m.bleedMargin:a+o-c-m.bleedMargin:p.x<e?p.x-a-m.bleedMargin:a+o-p.x-m.bleedMargin,m.targetTextWidth=f,zC(m,f)}for(OC(h,e,i,n,1,0,r,0,s,c),OC(l,e,i,n,-1,0,r,0,s,u),d=0;d<t.length;d++){var m;if(!NC(m=t[d])&&m.linePoints){p=m.label,g=m.linePoints;var v="edge"===m.labelAlignTo,y=p.style.padding,b=y?y[1]+y[3]:0,x=p.style.backgroundColor?0:b,w=m.rect.width+x,_=g[1][0]-g[2][0];v?p.x<e?g[2][0]=a+m.edgeDistance+w+m.labelDistance:g[2][0]=a+o-m.edgeDistance-w-m.labelDistance:(p.x<e?g[2][0]=p.x+m.labelDistance:g[2][0]=p.x-m.labelDistance,g[1][0]=g[2][0]+_),g[1][1]=g[2][1]=p.y}}}(o,e,i,l,h,d,u,c);for(var f=0;f<o.length;f++){var g=o[f],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(q(m.states,p),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(v){var x=g.linePoints;y||!x?(q(v.states,p),v.ignore=!0):(kb(x,g.minTurnAngle),Ab(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),m.__hostTarget.textGuideLineConfig={anchor:new Le(x[0][0],x[0][1])})}}}(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=r)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,r=Math.sqrt(n*n+o*o);return r<=i.r&&r>=i.r0}},e.type="pie",e}(gm);function VC(t,e,i){e=it(e)&&{coordDimensions:e}||U({encodeDefine:t.getEncode()},e);var n=t.getSource(),o=Zw(n,e).dimensions,r=new Yw(o,t);return r.initData(n,i),r}var HC=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}();const GC=HC;var WC=Br();const UC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new GC(tt(this.getData,this),tt(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return VC(this,{coordDimensions:["value"],encodeDefaulter:et(Tc,this)})},e.prototype.getDataParams=function(e){var i=this.getData(),n=WC(i),o=n.seats;if(!o){var r=[];i.each(i.mapDimension("value"),(function(t){r.push(t)})),o=n.seats=function(t,e){var i=$(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return[];for(var n=Math.pow(10,e),o=K(t,(function(t){return(isNaN(t)?0:t)/i*n*100})),r=100*n,a=K(o,(function(t){return Math.floor(t)})),s=$(a,(function(t,e){return t+e}),0),l=K(o,(function(t,e){return t-a[e]}));s<r;){for(var h=Number.NEGATIVE_INFINITY,u=null,c=0,d=l.length;c<d;++c)l[c]>h&&(h=l[c],u=c);++a[u],l[u]=0,++s}return K(a,(function(t){return t/n}))}(r,i.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=o[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){Er(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(of),jC=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return m(e,t),e.prototype.getInitialData=function(t,e){return e_(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,i){return i.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(of);var XC=function(){},YC=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return m(e,t),e.prototype.getDefaultShape=function(){return new XC},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var i,n=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,h=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,i=this._off;i<n.length;){var u=n[i++],c=n[i++];isNaN(u)||isNaN(c)||h&&!h.contain(u,c)||(a.x=u-o[0]/2,a.y=c-o[1]/2,a.width=o[0],a.height=o[1],r.buildPath(t,a,!0))}this.incremental&&(this._off=i,this.notClear=!0)}},e.prototype.afterBrush=function(){var t,e=this.shape,i=e.points,n=e.size,o=this._ctx,r=this.softClipShape;if(o){for(t=this._off;t<i.length;){var a=i[t++],s=i[t++];isNaN(a)||isNaN(s)||r&&!r.contain(a,s)||o.fillRect(a-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=t,this.notClear=!0)}},e.prototype.findDataIndex=function(t,e){for(var i=this.shape,n=i.points,o=i.size,r=Math.max(o[0],4),a=Math.max(o[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,h=n[l]-r/2,u=n[l+1]-a/2;if(t>=h&&e>=u&&t<=h+r&&e<=u+a)return s}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,i=e.points,n=e.size,o=n[0],r=n[1],a=1/0,s=1/0,l=-1/0,h=-1/0,u=0;u<i.length;){var c=i[u++],d=i[u++];a=Math.min(c,a),l=Math.max(c,l),s=Math.min(d,s),h=Math.max(d,h)}t=this._rect=new Ge(a-o/2,s-r/2,l-a+o,h-s+r)}return t},e}(Ps),ZC=function(){function t(){this.group=new qo}return t.prototype.updateData=function(t,e){this._clear();var i=this._create();i.setShape({points:t.getLayout("points")}),this._setCommon(i,t,e)},t.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e),t.reset()}))},t.prototype.incrementalPrepareUpdate=function(t){this._clear()},t.prototype.incrementalUpdate=function(t,e,i){var n=this._newAdded[0],o=e.getLayout("points"),r=n&&n.shape.points;if(r&&r.length<2e4){var a=r.length,s=new Float32Array(a+o.length);s.set(r),s.set(o,a),n.endIndex=t.end,n.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=t.start,l.endIndex=t.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,e,i)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new YC({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,e,i){var n=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=Mv(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var l=dl(t);l.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){l.dataIndex=null;var i=t.hoverDataIdx;i>=0&&(l.dataIndex=i+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const qC=ZC,KC=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=V_("").reset(t,e,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new qC:new d_,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(gm),$C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(uc);var JC=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),QC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Gr).models[0]},e.type="cartesian2dAxis",e}(uc);Y(QC,JC);var tS={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},eS=G({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},tS),iS=G({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},tS);const nS={category:eS,value:iS,time:G({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},iS),log:j({logBase:10},iS)};var oS=0;function rS(t){return st(t)&&null!=t.value?t.value:t+""}const aS=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++oS}return t.createByAxisModel=function(e){var i=e.option,n=i.data,o=n&&K(n,rS);return new t({categories:o,needCollect:!o,deduplication:!1!==i.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!ot(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Tt(this.categories))},t}();var sS={value:1,category:1,time:1,log:1};function lS(t,e,i,n){q(sS,(function(o,r){var a=G(G({},nS[r],!0),n,!0),s=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e+"Axis."+r,i}return m(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var i=oc(this),n=i?ac(t):{};G(t,e.getTheme().get(r+"Axis")),G(t,this.getDefaultOption()),t.type=hS(t),i&&rc(t,n,i)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=aS.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=e+"Axis."+r,i.defaultOption=a,i}(i);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(e+"Axis",hS)}function hS(t){return t.type||(t.data?"category":"value")}var uS=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();na(uS);const cS=uS;function dS(t){return"interval"===t.type||"log"===t.type}function pS(t){var e=Math.pow(10,fr(t)),i=t/e;return i?2===i?i=3:3===i?i=5:i*=2:i=1,or(i*e)}function fS(t){return ar(t)+2}function gS(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function mS(t,e){return t>=e[0]&&t<=e[1]}function vS(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function yS(t,e){return t*(e[1]-e[0])+e[0]}var bS=function(t){function e(e){var i=t.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new aS({})),it(n)&&(n=new aS({categories:K(n,(function(t){return st(t)?t.value:t}))})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return m(e,t),e.prototype.parse=function(t){return null==t?NaN:ot(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return mS(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return vS(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(yS(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o<a;++o){var s=e[o];i[o]=s,n[s]=o}for(var l=0;o<r;++o){for(;null!=n[l];)l++;i.push(l),n[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},e.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[e];return null==i?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(cS);cS.registerClass(bS);const xS=bS;var wS=or,_S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return m(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return mS(t,this._extent)},e.prototype.normalize=function(t){return vS(t,this._extent)},e.prototype.scale=function(t){return yS(t,this._extent)},e.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=fS(t)},e.prototype.getTicks=function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;i[0]<n[0]&&(t?r.push({value:wS(n[0]-e,o)}):r.push({value:i[0]}));for(var a=n[0];a<=n[1]&&(r.push({value:a}),(a=wS(a+e,o))!==r[r.length-1].value);)if(r.length>1e4)return[];var s=r.length?r[r.length-1].value:n[1];return i[1]>s&&(t?r.push({value:wS(s+e,o)}):r.push({value:i[1]})),r},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],h=(r.value-a.value)/t;s<t-1;){var u=wS(a.value+(s+1)*h);u>n[0]&&u<n[1]&&l.push(u),s++}i.push(l)}return i},e.prototype.getLabel=function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=ar(t.value)||0:"auto"===i&&(i=this._intervalPrecision),Gu(wS(t.value,i,!0))},e.prototype.calcNiceTicks=function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var r=function(t,e,i,n){var o={},r=t[1]-t[0],a=o.interval=gr(r/e,!0);null!=i&&a<i&&(a=o.interval=i),null!=n&&a>n&&(a=o.interval=n);var s=o.intervalPrecision=fS(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),gS(t,0,e),gS(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[or(Math.ceil(t[0]/a)*a,s),or(Math.floor(t[1]/a)*a,s)],t),o}(n,t,e,i);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=Math.abs(e[0]);t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=wS(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=wS(Math.ceil(e[1]/o)*o))},e.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},e.type="interval",e}(cS);cS.registerClass(_S);const CS=_S;var SS=function(t){function e(e){var i=t.call(this,e)||this;return i.type="time",i}return m(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Mu(t.value,xu[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Su(this._minLevelUnit))]||xu.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,i){var n=this.getSetting("useUTC");return function(t,e,i,n,o){var r=null;if(ot(i))r=i;else if(nt(i))r=i(t.value,e,{level:t.level});else{var a=U({},yu);if(t.level>0)for(var s=0;s<wu.length;++s)a[wu[s]]="{primary|"+a[wu[s]]+"}";var l=i?!1===i.inherit?i:j(i,a):a,h=Tu(t.value,o);if(l[h])r=l[h];else if(l.inherit){for(s=_u.indexOf(h)-1;s>=0;--s)if(l[h]){r=l[h];break}r=r||a.none}if(it(r)){var u=null==t.level?0:t.level>=0?t.level:r.length+t.level;r=r[u=Math.min(u,r.length-1)]}}return Mu(new Date(t.value),r,o,n)}(t,e,i,this.getSetting("locale"),n)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,i=[];if(!t)return i;i.push({value:e[0],level:0});var n=this.getSetting("useUTC"),o=function(t,e,i,n){var o,r=_u,a=0;function s(t,e,i,o,r,a,s){for(var l=new Date(e),h=e,u=l[o]();h<i&&h<=n[1];)s.push({value:h}),u+=t,l[r](u),h=l.getTime();s.push({value:h,notAdd:!0})}function l(t,o,r){var a=[],l=!o.length;if(!function(t,e,i,n){var o=pr(e),r=pr(i),a=function(t){return Eu(o,t,n)===Eu(r,t,n)},s=function(){return a("year")},l=function(){return s()&&a("month")},h=function(){return l()&&a("day")},u=function(){return h()&&a("hour")},c=function(){return u()&&a("minute")},d=function(){return c()&&a("second")};switch(t){case"year":return s();case"month":return l();case"day":return h();case"hour":return u();case"minute":return c();case"second":return d();case"millisecond":return d()&&a("millisecond")}}(Su(t),n[0],n[1],i)){l&&(o=[{value:AS(new Date(n[0]),t,i)},{value:n[1]}]);for(var h=0;h<o.length-1;h++){var u=o[h].value,c=o[h+1].value;if(u!==c){var d=void 0,p=void 0,f=void 0;switch(t){case"year":d=Math.max(1,Math.round(e/mu/365)),p=Iu(i),f=Ou(i);break;case"half-year":case"quarter":case"month":d=ES(e),p=Du(i),f=zu(i);break;case"week":case"half-week":case"day":d=TS(e),p=ku(i),f=Nu(i),!0;break;case"half-day":case"quarter-day":case"hour":d=IS(e),p=Au(i),f=Bu(i);break;case"minute":d=DS(e,!0),p=Lu(i),f=Fu(i);break;case"second":d=DS(e,!1),p=Ru(i),f=Vu(i);break;case"millisecond":d=kS(e),p=Pu(i),f=Hu(i)}s(d,u,c,p,f,0,a),"year"===t&&r.length>1&&0===h&&r.unshift({value:r[0].value-d})}}for(h=0;h<a.length;h++)r.push(a[h]);return a}}for(var h=[],u=[],c=0,d=0,p=0;p<r.length&&a++<1e4;++p){var f=Su(r[p]);if((o=r[p])===Su(o)&&(l(r[p],h[h.length-1]||[],u),f!==(r[p+1]?Su(r[p+1]):null))){if(u.length){d=c,u.sort((function(t,e){return t.value-e.value}));for(var g=[],m=0;m<u.length;++m){var v=u[m].value;0!==m&&u[m-1].value===v||(g.push(u[m]),v>=n[0]&&v<=n[1]&&c++)}var y=(n[1]-n[0])/e;if(c>1.5*y&&d>y/1.5)break;if(h.push(g),c>y||t===r[p])break}u=[]}}var b=J(K(h,(function(t){return J(t,(function(t){return t.value>=n[0]&&t.value<=n[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],w=b.length-1;for(p=0;p<b.length;++p)for(var _=b[p],C=0;C<_.length;++C)x.push({value:_[C].value,level:w-p});x.sort((function(t,e){return t.value-e.value}));var S=[];for(p=0;p<x.length;++p)0!==p&&x[p].value===x[p-1].value||S.push(x[p]);return S}(this._minLevelUnit,this._approxInterval,n,e);return(i=i.concat(o)).push({value:e[1],level:0}),i},e.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=mu,e[1]+=mu),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-mu}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0];this._approxInterval=o/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=i&&this._approxInterval>i&&(this._approxInterval=i);var r=MS.length,a=Math.min(function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=o+1:n=o}return i}(MS,this._approxInterval,0,r),r-1);this._interval=MS[a][1],this._minLevelUnit=MS[Math.max(a-1,0)][0]},e.prototype.parse=function(t){return at(t)?t:+pr(t)},e.prototype.contain=function(t){return mS(this.parse(t),this._extent)},e.prototype.normalize=function(t){return vS(this.parse(t),this._extent)},e.prototype.scale=function(t){return yS(t,this._extent)},e.type="time",e}(CS),MS=[["second",pu],["minute",fu],["hour",gu],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",vu/2],["year",vu]];function TS(t,e){return(t/=mu)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function ES(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function IS(t){return(t/=gu)>12?12:t>6?6:t>3.5?4:t>2?2:1}function DS(t,e){return(t/=e?fu:pu)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function kS(t){return gr(t,!0)}function AS(t,e,i){var n=new Date(t);switch(Su(e)){case"year":case"month":n[zu(i)](0);case"day":n[Nu(i)](1);case"hour":n[Bu(i)](0);case"minute":n[Fu(i)](0);case"second":n[Vu(i)](0),n[Hu(i)](0)}return n.getTime()}cS.registerClass(SS);const LS=SS;var RS=cS.prototype,PS=CS.prototype,OS=or,zS=Math.floor,NS=Math.ceil,BS=Math.pow,FS=Math.log,VS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new CS,e._interval=0,e}return m(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return K(PS.getTicks.call(this,t),(function(t){var e=t.value,o=or(BS(this.base,e));return o=e===i[0]&&this._fixMin?GS(o,n[0]):o,{value:o=e===i[1]&&this._fixMax?GS(o,n[1]):o}}),this)},e.prototype.setExtent=function(t,e){var i=FS(this.base);t=FS(Math.max(0,t))/i,e=FS(Math.max(0,e))/i,PS.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=RS.getExtent.call(this);e[0]=BS(t,e[0]),e[1]=BS(t,e[1]);var i=this._originalScale.getExtent();return this._fixMin&&(e[0]=GS(e[0],i[0])),this._fixMax&&(e[1]=GS(e[1],i[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=FS(t[0])/FS(e),t[1]=FS(t[1])/FS(e),RS.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n,o=(n=i,Math.pow(10,fr(n)));for(t/i*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var r=[or(NS(e[0]/o)*o),or(zS(e[1]/o)*o)];this._interval=o,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){PS.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return mS(t=FS(t)/FS(this.base),this._extent)},e.prototype.normalize=function(t){return vS(t=FS(t)/FS(this.base),this._extent)},e.prototype.scale=function(t){return t=yS(t,this._extent),BS(this.base,t)},e.type="log",e}(cS),HS=VS.prototype;function GS(t,e){return OS(t,ar(e))}HS.getMinorTicks=PS.getMinorTicks,HS.getLabel=PS.getLabel,cS.registerClass(VS);const WS=VS;var US=function(){function t(t,e,i){this._prepareParams(t,e,i)}return t.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero();var o=this._modelMinRaw=e.get("min",!0);nt(o)?this._modelMinNum=ZS(t,o({min:i[0],max:i[1]})):"dataMin"!==o&&(this._modelMinNum=ZS(t,o));var r=this._modelMaxRaw=e.get("max",!0);if(nt(r)?this._modelMaxNum=ZS(t,r({min:i[0],max:i[1]})):"dataMax"!==r&&(this._modelMaxNum=ZS(t,r)),n)this._axisDataLen=e.getCategories().length;else{var a=e.get("boundaryGap"),s=it(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Oo(s[0],1),Oo(s[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,n=this._axisDataLen,o=this._boundaryGapInner,r=t?null:i-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?i:this._modelMaxNum,l=null!=a,h=null!=s;null==a&&(a=t?n?0:NaN:e-o[0]*r),null==s&&(s=t?n?n-1:NaN:i+o[1]*r),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var u=dt(a)||dt(s)||t&&!n;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!h&&(s=0));var c=this._determinedMin,d=this._determinedMax;return null!=c&&(a=c,l=!0),null!=d&&(s=d,h=!0),{min:a,max:s,minFixed:l,maxFixed:h,isBlank:u}},t.prototype.modifyDataMinMax=function(t,e){this[XS[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[jS[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),jS={min:"_determinedMin",max:"_determinedMax"},XS={min:"_dataMin",max:"_dataMax"};function YS(t,e,i){var n=t.rawExtentInfo;return n||(n=new US(t,e,i),t.rawExtentInfo=n,n)}function ZS(t,e){return null==e?null:dt(e)?NaN:t.parse(e)}function qS(t,e){var i=t.type,n=YS(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var o=n.min,r=n.max,a=e.ecModel;if(a&&"time"===i){var s=Y_("bar",a),l=!1;if(q(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var h=Z_(s),u=function(t,e,i,n){var o=i.axis.getExtent(),r=o[1]-o[0],a=function(t,e,i){if(t&&e){var n=t[X_(e)];return n}}(n,i.axis);if(void 0===a)return{min:t,max:e};var s=1/0;q(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;q(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=u/(1-(s+l)/r)-u;return{min:t-=c*(s/h),max:e+=c*(l/h)}}(o,r,e,h);o=u.min,r=u.max}}return{extent:[o,r],fixMin:n.minFixed,fixMax:n.maxFixed}}function KS(t,e){var i=e,n=qS(t,i),o=n.extent,r=i.get("splitNumber");t instanceof WS&&(t.base=i.get("logBase"));var a=t.type,s=i.get("interval"),l="interval"===a||"time"===a;t.setExtent(o[0],o[1]),t.calcNiceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?i.get("minInterval"):null,maxInterval:l?i.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function $S(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xS({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new LS({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(cS.getClass(e)||CS)}}function JS(t){var e,i,n=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(i=n,function(e,n){return t.scale.getFormattedLabel(e,n,i)}):ot(n)?function(e){return function(i){var n=t.scale.getLabel(i);return e.replace("{value}",null!=n?n:"")}}(n):nt(n)?(e=n,function(i,n){return null!=o&&(n=i.value-o),e(QS(t,i),n,null!=i.level?{level:i.level}:null)}):function(e){return t.scale.getLabel(e)}}function QS(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function tM(t,e){var i=e*Math.PI/180,n=t.width,o=t.height,r=n*Math.abs(Math.cos(i))+Math.abs(o*Math.sin(i)),a=n*Math.abs(Math.sin(i))+Math.abs(o*Math.cos(i));return new Ge(t.x,t.y,r,a)}function eM(t){var e=t.get("interval");return null==e?"auto":e}function iM(t){return"category"===t.type&&0===eM(t.getLabelModel())}function nM(t,e){var i={};return q(t.mapDimensionsAll(e),(function(e){i[t_(t,e)]=!0})),Q(i)}var oM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return K(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),J(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),rM=["x","y"];function aM(t){return"interval"===t.type||"time"===t.type}var sM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=rM,e}return m(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(aM(t)&&aM(e)){var i=t.getExtent(),n=e.getExtent(),o=this.dataToPoint([i[0],n[0]]),r=this.dataToPoint([i[1],n[1]]),a=i[1]-i[0],s=n[1]-n[0];if(a&&s){var l=(r[0]-o[0])/a,h=(r[1]-o[1])/s,u=o[0]-i[0]*l,c=o[1]-n[0]*h,d=this._transform=[l,0,0,h,u,c];this._invTransform=ke([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var i=this.dataToPoint(t),n=this.dataToPoint(e),o=this.getArea(),r=new Ge(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(r)},e.prototype.dataToPoint=function(t,e,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&null!=n&&isFinite(n)&&null!=o&&isFinite(o))return Yt(i,t,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return i[0]=r.toGlobalCoord(r.dataToCoord(n,e)),i[1]=a.toGlobalCoord(a.dataToCoord(o,e)),i},e.prototype.clampData=function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),r=n.getExtent(),a=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),e},e.prototype.pointToData=function(t,e){var i=[];if(this._invTransform)return Yt(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),e),i[1]=o.coordToData(o.toLocalCoord(t[1]),e),i},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),o=Math.max(t[0],t[1])-i,r=Math.max(e[0],e[1])-n;return new Ge(i,n,o,r)},e}(oM);const lM=sM;var hM=Br();function uM(t,e){var i,n,o=cM(t,"labels"),r=eM(e);return dM(o,r)||(nt(r)?i=gM(t,r):(n="auto"===r?function(t){var e=hM(t).autoInterval;return null!=e?e:hM(t).autoInterval=t.calculateCategoryInterval()}(t):r,i=fM(t,n)),pM(o,r,{labels:i,labelCategoryInterval:n}))}function cM(t,e){return hM(t)[e]||(hM(t)[e]=[])}function dM(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function pM(t,e,i){return t.push({key:e,value:i}),i}function fM(t,e,i){var n=JS(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),h=r[0],u=o.count();0!==h&&l>1&&u/l>2&&(h=Math.round(Math.ceil(h/l)*l));var c=iM(t),d=a.get("showMinLabel")||c,p=a.get("showMaxLabel")||c;d&&h!==r[0]&&g(r[0]);for(var f=h;f<=r[1];f+=l)g(f);function g(t){var e={value:t};s.push(i?t:{formattedLabel:n(e),rawLabel:o.getLabel(e),tickValue:t})}return p&&f-l!==r[1]&&g(r[1]),s}function gM(t,e,i){var n=t.scale,o=JS(t),r=[];return q(n.getTicks(),(function(t){var a=n.getLabel(t),s=t.value;e(t.value,a)&&r.push(i?s:{formattedLabel:o(t),rawLabel:a,tickValue:s})})),r}var mM=[0,1],vM=function(){function t(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return t.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return sr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},t.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&yM(i=i.slice(),n.count()),ir(t,mM,i,e)},t.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&yM(i=i.slice(),n.count());var o=ir(t,i,mM,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=K(function(t,e){return"category"===t.type?function(t,e){var i,n,o=cM(t,"ticks"),r=eM(e),a=dM(o,r);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(i=[]),nt(r))i=gM(t,r,!0);else if("auto"===r){var s=uM(t,t.getLabelModel());n=s.labelCategoryInterval,i=K(s.labels,(function(t){return t.tickValue}))}else i=fM(t,n=r,!0);return pM(o,r,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:K(t.scale.getTicks(),(function(t){return t.value}))}}(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,i,n){var o=e.length;if(t.onBand&&!i&&o){var r,a,s=t.getExtent();if(1===o)e[0].coord=s[0],r=e[1]={coord:s[1]};else{var l=e[o-1].tickValue-e[0].tickValue,h=(e[o-1].coord-e[0].coord)/l;q(e,(function(t){t.coord-=h/2})),a=1+t.scale.getExtent()[1]-e[o-1].tickValue,r={coord:e[o-1].coord+h*a},e.push(r)}var u=s[0]>s[1];c(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift()),n&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]}),c(s[1],r.coord)&&(n?r.coord=s[1]:e.pop()),n&&c(r.coord,s[1])&&e.push({coord:s[1]})}function c(t,e){return t=or(t),e=or(e),u?t>e:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),K(this.scale.getMinorTicks(t),(function(t){return K(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var e=t.getLabelModel(),i=uM(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=JS(t);return{labels:K(e,(function(e,n){return{level:e.level,formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=JS(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,r=o.getExtent(),a=o.count();if(r[1]-r[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=r[0],h=t.dataToCoord(l+1)-t.dataToCoord(l),u=Math.abs(h*Math.cos(n)),c=Math.abs(h*Math.sin(n)),d=0,p=0;l<=r[1];l+=s){var f,g,m=Ao(i({value:l}),e.font,"center","top");f=1.3*m.width,g=1.3*m.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/u,y=p/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(v,y))),x=hM(t.model),w=t.getExtent(),_=x.lastAutoInterval,C=x.lastTickCount;return null!=_&&null!=C&&Math.abs(_-b)<=1&&Math.abs(C-a)<=1&&_>b&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?b=_:(x.lastTickCount=a,x.lastAutoInterval=b,x.axisExtent0=w[0],x.axisExtent1=w[1]),b}(this)},t}();function yM(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}const bM=vM;var xM=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return m(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(bM);const wM=xM;function _M(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,h=o.dim,u=n.getRect(),c=[u.x,u.x+u.width,u.y,u.y+u.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===h?[c[2]-p,c[3]+p]:[c[0]-p,c[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===h?f[d[l]]:c[0],"x"===h?f[d[l]]:c[3]],r.rotation=Math.PI/2*("x"===h?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?f[d[s]]-f[d.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),pt(i.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var m=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-m:m,r.z2=1,r}function CM(t){return"cartesian2d"===t.get("coordinateSystem")}function SM(t){var e={xAxisModel:null,yAxisModel:null};return q(e,(function(i,n){var o=n.replace(/Model$/,""),r=t.getReferringComponents(o,Gr).models[0];e[n]=r})),e}var MM=Math.log;function TM(t,e,i){var n=CS.prototype,o=n.getTicks.call(i),r=n.getTicks.call(i,!0),a=o.length-1,s=n.getInterval.call(i),l=qS(t,e),h=l.extent,u=l.fixMin,c=l.fixMax;if("log"===t.type){var d=MM(t.base);h=[MM(h[0])/d,MM(h[1])/d]}t.setExtent(h[0],h[1]),t.calcNiceExtent({splitNumber:a,fixMin:u,fixMax:c});var p=n.getExtent.call(t);u&&(h[0]=p[0]),c&&(h[1]=p[1]);var f=n.getInterval.call(t),g=h[0],m=h[1];if(u&&c)f=(m-g)/a;else if(u)for(m=h[0]+f*a;m<h[1]&&isFinite(m)&&isFinite(h[1]);)f=pS(f),m=h[0]+f*a;else if(c)for(g=h[1]-f*a;g>h[0]&&isFinite(g)&&isFinite(h[0]);)f=pS(f),g=h[1]-f*a;else{t.getTicks().length-1>a&&(f=pS(f));var v=f*a;(g=or((m=Math.ceil(h[1]/f)*f)-v))<0&&h[0]>=0?(g=0,m=or(v)):m>0&&h[1]<=0&&(m=0,g=-or(v))}var y=(o[0].value-r[0].value)/s,b=(o[a].value-r[a].value)/s;n.setExtent.call(t,g+f*y,m+f*b),n.setInterval.call(t,f),(y||b)&&n.setNiceExtent.call(t,g+f,m-f)}var EM=function(){function t(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=rM,this._initCartesian(t,e,i),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var i=this._axesMap;function n(t){var e,i=Q(t),n=i.length;if(n){for(var o=[],r=n-1;r>=0;r--){var a=t[+i[r]],s=a.model,l=a.scale;dS(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(KS(l,s),dS(l)&&(e=a))}o.length&&(e||KS((e=o.pop()).scale,e.model),q(o,(function(t){TM(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),n(i.x),n(i.y);var o={};q(i.x,(function(t){DM(i,"y",t,o)})),q(i.y,(function(t){DM(i,"x",t,o)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,i){var n=t.getBoxLayoutParams(),o=!i&&t.get("containLabel"),r=ic(n,{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;function s(){q(a,(function(t){var e=t.isHorizontal(),i=e?[0,r.width]:[0,r.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?r.x:r.y)}))}s(),o&&(q(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,i=t.scale;if(e.get(["axisLabel","show"])&&!i.isBlank()){var n,o,r=i.getExtent();o=i instanceof xS?i.count():(n=i.getTicks()).length;var a,s=t.getLabelModel(),l=JS(t),h=1;o>40&&(h=Math.ceil(o/40));for(var u=0;u<o;u+=h){var c=l(n?n[u]:{value:r[0]+u},u),d=tM(s.getTextRect(c),s.get("rotate")||0);a?a.union(d):a=d}return a}}(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get(["axisLabel","margin"]);r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}})),s()),q(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i)return i[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}st(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},t.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},t.prototype._findConvertTarget=function(t){var e,i,n=t.seriesModel,o=t.xAxisModel||n&&n.getReferringComponents("xAxis",Gr).models[0],r=t.yAxisModel||n&&n.getReferringComponents("yAxis",Gr).models[0],a=t.gridModel,s=this._coordsList;return n?X(s,e=n.coordinateSystem)<0&&(e=null):o&&r?e=this.getCartesian(o.componentIndex,r.componentIndex):o?i=this.getAxis("x",o.componentIndex):r?i=this.getAxis("y",r.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:i}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,i){var n=this,o=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(e.eachComponent("xAxis",l("x"),this),e.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(e){return function(i,n){if(IM(i,t)){var l=i.get("position");"x"===e?"top"!==l&&"bottom"!==l&&(l=r.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=r.left?"right":"left"),r[l]=!0;var h=new wM(e,$S(i),[0,0],i.get("type"),l),u="category"===h.type;h.onBand=u&&i.get("boundaryGap"),h.inverse=i.get("inverse"),i.axis=h,h.model=i,h.grid=o,h.index=n,o._axesList.push(h),a[e][n]=h,s[e]++}}}this._axesMap=a,q(a.x,(function(e,i){q(a.y,(function(o,r){var a="x"+i+"y"+r,s=new lM(a);s.master=n,s.model=t,n._coordsMap[a]=s,n._coordsList.push(s),s.addAxis(e),s.addAxis(o)}))}))},t.prototype._updateScale=function(t,e){function i(t,e){q(nM(t,e.dim),(function(i){e.scale.unionExtentFromData(t,i)}))}q(this._axesList,(function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setSortInfo(e)}})),t.eachSeries((function(t){if(CM(t)){var n=SM(t),o=n.xAxisModel,r=n.yAxisModel;if(!IM(o,e)||!IM(r,e))return;var a=this.getCartesian(o.componentIndex,r.componentIndex),s=t.getData(),l=a.getAxis("x"),h=a.getAxis("y");i(s,l),i(s,h)}}),this)},t.prototype.getTooltipAxes=function(t){var e=[],i=[];return q(this.getCartesians(),(function(n){var o=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),r=n.getOtherAxis(o);X(e,o)<0&&e.push(o),X(i,r)<0&&i.push(r)})),{baseAxes:e,otherAxes:i}},t.create=function(e,i){var n=[];return e.eachComponent("grid",(function(o,r){var a=new t(o,e,i);a.name="grid_"+r,a.resize(o,i,!0),o.coordinateSystem=a,n.push(a)})),e.eachSeries((function(t){if(CM(t)){var e=SM(t),i=e.xAxisModel,n=e.yAxisModel,o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}})),n},t.dimensions=rM,t}();function IM(t,e){return t.getCoordSysModel()===e}function DM(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],a=i.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)kM(r[l])&&(o=r[l]);else for(var h in r)if(r.hasOwnProperty(h)&&kM(r[h])&&!n[u(r[h])]){o=r[h];break}o&&(n[u(o)]=!0)}function u(t){return t.dim+"_"+t.index}}function kM(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}(t)}const AM=EM;var LM=Math.PI,RM=function(){function t(t,e){this.group=new qo,this.opt=e,this.axisModel=t,j(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new qo({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return t.prototype.hasBuilder=function(t){return!!PM[t]},t.prototype.add=function(t){PM[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,i){var n,o,r=ur(e-t);return cr(r)?(o=i>0?"top":"bottom",n="center"):cr(r-LM)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=r>0&&r<LM?i>0?"right":"left":i>0?"left":"right"),{rotation:r,textAlign:n,textVerticalAlign:o}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),PM={axisLine:function(t,e,i,n){var o=e.get(["axisLine","show"]);if("auto"===o&&t.handleAutoShown&&(o=t.handleAutoShown("axisLine")),o){var r=e.axis.getExtent(),a=n.transform,s=[r[0],0],l=[r[1],0],h=s[0]>l[0];a&&(Yt(s,s,a),Yt(l,l,a));var u=U({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new lg({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Ug(c.shape,c.style.lineWidth),c.anid="line",i.add(c);var d=e.get(["axisLine","symbol"]);if(null!=d){var p=e.get(["axisLine","symbolSize"]);ot(d)&&(d=[d,d]),(ot(p)||at(p))&&(p=[p,p]);var f=Ev(e.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];q([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,n){if("none"!==d[n]&&null!=d[n]){var o=Mv(d[n],-g/2,-m/2,g,m,u.stroke,!0),r=e.r+e.offset,a=h?l:s;o.attr({rotation:e.rotate,x:a[0]+r*Math.cos(t.rotation),y:a[1]-r*Math.sin(t.rotation),silent:!0,z2:11}),i.add(o)}}))}}},axisTickLabel:function(t,e,i,n){var o=function(t,e,i,n){var o=i.axis,r=i.getModel("axisTick"),a=r.get("show");if("auto"===a&&n.handleAutoShown&&(a=n.handleAutoShown("axisTick")),a&&!o.scale.isBlank()){for(var s=r.getModel("lineStyle"),l=n.tickDirection*r.get("length"),h=BM(o.getTicksCoords(),e.transform,l,j(s.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),u=0;u<h.length;u++)t.add(h[u]);return h}}(i,n,e,t),r=function(t,e,i,n){var o=i.axis;if(pt(n.axisLabelShow,i.get(["axisLabel","show"]))&&!o.scale.isBlank()){var r=i.getModel("axisLabel"),a=r.get("margin"),s=o.getViewLabels(),l=(pt(n.labelRotate,r.get("rotate"))||0)*LM/180,h=RM.innerTextLayout(n.rotation,l,n.labelDirection),u=i.getCategories&&i.getCategories(!0),c=[],d=RM.isLabelSilent(i),p=i.get("triggerEvent");return q(s,(function(s,l){var f="ordinal"===o.scale.type?o.scale.getRawOrdinalNumber(s.tickValue):s.tickValue,g=s.formattedLabel,m=s.rawLabel,v=r;if(u&&u[f]){var y=u[f];st(y)&&y.textStyle&&(v=new eu(y.textStyle,r,i.ecModel))}var b=v.getTextColor()||i.get(["axisLine","lineStyle","color"]),x=o.dataToCoord(f),w=new cl({x,y:n.labelOffset+n.labelDirection*a,rotation:h.rotation,silent:d,z2:10+(s.level||0),style:Ah(v,{text:g,align:v.getShallow("align",!0)||h.textAlign,verticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||h.textVerticalAlign,fill:nt(b)?b("category"===o.type?m:"value"===o.type?f+"":f,l):b})});if(w.anid="label_"+f,p){var _=RM.makeAxisEventDataBase(i);_.targetType="axisLabel",_.value=m,_.tickIndex=l,"category"===o.type&&(_.dataIndex=f),dl(w).eventData=_}e.add(w),w.updateTransform(),c.push(w),t.add(w),w.decomposeTransform()})),c}}(i,n,e,t);(function(t,e,i){if(!iM(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]);i=i||[];var r=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(OM(r),OM(h)):zM(r,a)&&(n?(OM(a),OM(u)):(OM(r),OM(h))),!1===o?(OM(s),OM(c)):zM(l,s)&&(o?(OM(l),OM(d)):(OM(s),OM(c)))}})(e,r,o),function(t,e,i,n){var o=i.axis,r=i.getModel("minorTick");if(r.get("show")&&!o.scale.isBlank()){var a=o.getMinorTicksCoords();if(a.length)for(var s=r.getModel("lineStyle"),l=n*r.get("length"),h=j(s.getLineStyle(),j(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),u=0;u<a.length;u++)for(var c=BM(a[u],e.transform,l,h,"minorticks_"+u),d=0;d<c.length;d++)t.add(c[d])}}(i,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])&&Fb(zb(K(r,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}}))))},axisName:function(t,e,i,n){var o=pt(t.axisName,e.get("name"));if(o){var r,a,s=e.get("nameLocation"),l=t.nameDirection,h=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,c=e.axis.getExtent(),d=c[0]>c[1]?-1:1,p=["start"===s?c[0]-d*u:"end"===s?c[1]+d*u:(c[0]+c[1])/2,NM(s)?t.labelOffset+l*u:0],f=e.get("nameRotate");null!=f&&(f=f*LM/180),NM(s)?r=RM.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(r=function(t,e,i,n){var o,r,a=ur(i-t),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return cr(a-LM/2)?(r=l?"bottom":"top",o="center"):cr(a-1.5*LM)?(r=l?"top":"bottom",o="center"):(r="middle",o=a<1.5*LM&&a>LM/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:o,textVerticalAlign:r}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var g=h.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,y=pt(t.nameTruncateMaxWidth,m.maxWidth,a),b=new cl({x:p[0],y:p[1],rotation:r.rotation,silent:RM.isLabelSilent(e),style:Ah(h,{text:o,font:g,overflow:"truncate",width:y,ellipsis:v,fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:h.get("align")||r.textAlign,verticalAlign:h.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(om({el:b,componentModel:e,itemName:o}),b.__fullText=o,b.anid="name",e.get("triggerEvent")){var x=RM.makeAxisEventDataBase(e);x.targetType="axisName",x.name=o,dl(b).eventData=x}n.add(b),b.updateTransform(),i.add(b),b.decomposeTransform()}}};function OM(t){t&&(t.ignore=!0)}function zM(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=Se([]);return Ie(o,o,-t.rotation),i.applyTransform(Te([],o,t.getLocalTransform())),n.applyTransform(Te([],o,e.getLocalTransform())),i.intersect(n)}}function NM(t){return"middle"===t||"center"===t}function BM(t,e,i,n,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var h=t[l].coord;a[0]=h,a[1]=0,s[0]=h,s[1]=i,e&&(Yt(a,a,e),Yt(s,s,e));var u=new lg({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ug(u.shape,u.style.lineWidth),u.anid=o+"_"+t[l].tickValue,r.push(u)}return r}const FM=RM;function VM(t,e){return"all"===t||it(t)&&X(t,e)>=0||t===e}function HM(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[WM(t)]}function GM(t){return!!t.get(["handle","show"])}function WM(t){return t.type+"||"+t.id}var UM={},jM=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(e,i,n,o){this.axisPointerClass&&function(t){var e=HM(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,r=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=GM(i);null==r&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},e.prototype.updateAxisPointer=function(t,e,i,n){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,e){var i=this._axisPointer;i&&i.remove(e)},e.prototype.dispose=function(e,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,n){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var r=function(t){var e=HM(t);return e&&e.axisPointerModel}(t);r?(this._axisPointer||(this._axisPointer=new o)).render(t,r,i,n):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){UM[t]=e},e.getAxisPointerClass=function(t){return t&&UM[t]},e.type="axis",e}(af);const XM=jM;var YM=Br();function ZM(t,e,i,n){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitArea"),a=r.getModel("areaStyle"),s=a.get("color"),l=n.coordinateSystem.getRect(),h=o.getTicksCoords({tickModel:r,clamp:!0});if(h.length){var u=s.length,c=YM(t).splitAreaColors,d=Tt(),p=0;if(c)for(var f=0;f<h.length;f++){var g=c.get(h[f].tickValue);if(null!=g){p=(g+(u-1)*f)%u;break}}var m=o.toGlobalCoord(h[0].coord),v=a.getAreaStyle();for(s=it(s)?s:[s],f=1;f<h.length;f++){var y=o.toGlobalCoord(h[f].coord),b=void 0,x=void 0,w=void 0,_=void 0;o.isHorizontal()?(b=m,x=l.y,w=y-b,_=l.height,m=b+w):(b=l.x,x=m,w=l.width,m=x+(_=y-x));var C=h[f-1].tickValue;null!=C&&d.set(C,p),e.add(new qs({anid:null!=C?"area_"+C:null,shape:{x:b,y:x,width:w,height:_},style:j({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%u}YM(t).splitAreaColors=d}}}function qM(t){YM(t).splitAreaColors=null}var KM=["axisLine","axisTickLabel","axisName"],$M=["splitArea","splitLine","minorSplitLine"],JM=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="CartesianAxisPointer",i}return m(e,t),e.prototype.render=function(e,i,n,o){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new qo,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),s=_M(a,e),l=new FM(e,U({handleAutoShown:function(t){for(var i=a.coordinateSystem.getCartesians(),n=0;n<i.length;n++)if(dS(i[n].getOtherAxis(e.axis).scale))return!0;return!1}},s));q(KM,l.add,l),this._axisGroup.add(l.getGroup()),q($M,(function(t){e.get([t,"show"])&&QM[t](this,this._axisGroup,e,a)}),this),o&&"changeAxisOrder"===o.type&&o.isInitSort||$g(r,this._axisGroup,e),t.prototype.render.call(this,e,i,n,o)}},e.prototype.remove=function(){qM(this)},e.type="cartesianAxis",e}(XM),QM={splitLine:function(t,e,i,n){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=it(s)?s:[s];for(var l=n.coordinateSystem.getRect(),h=o.isHorizontal(),u=0,c=o.getTicksCoords({tickModel:r}),d=[],p=[],f=a.getLineStyle(),g=0;g<c.length;g++){var m=o.toGlobalCoord(c[g].coord);h?(d[0]=m,d[1]=l.y,p[0]=m,p[1]=l.y+l.height):(d[0]=l.x,d[1]=m,p[0]=l.x+l.width,p[1]=m);var v=u++%s.length,y=c[g].tickValue,b=new lg({anid:null!=y?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:j({stroke:s[v]},f),silent:!0});Ug(b.shape,f.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,i,n){var o=i.axis,r=i.getModel("minorSplitLine").getModel("lineStyle"),a=n.coordinateSystem.getRect(),s=o.isHorizontal(),l=o.getMinorTicksCoords();if(l.length)for(var h=[],u=[],c=r.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var f=o.toGlobalCoord(l[d][p].coord);s?(h[0]=f,h[1]=a.y,u[0]=f,u[1]=a.y+a.height):(h[0]=a.x,h[1]=f,u[0]=a.x+a.width,u[1]=f);var g=new lg({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:u[0],y2:u[1]},style:c,silent:!0});Ug(g.shape,c.lineWidth),e.add(g)}},splitArea:function(t,e,i,n){ZM(t,e,i,n)}},tT=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="xAxis",e}(JM),eT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=tT.type,e}return m(e,t),e.type="yAxis",e}(JM),iT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return m(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new qs({shape:t.coordinateSystem.getRect(),style:j({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(af),nT={offset:0};function oT(t){t.registerComponentView(iT),t.registerComponentModel($C),t.registerCoordinateSystem("cartesian2d",AM),lS(t,"x",QC,nT),lS(t,"y",QC,nT),t.registerComponentView(tT),t.registerComponentView(eT),t.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))}function rT(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var o=n.getIndicatorAxes();q(o,(function(t,r){e.each(e.mapDimension(o[r].dim),(function(t,e){i[e]=i[e]||[];var o=n.dataToPoint(t,r);i[e][r]=aT(o)?o:sT(n)}))})),e.each((function(t){var o=function(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(undefined,t[n],n,t))return t[n]}(i[t],(function(t){return aT(t)}))||sT(n);i[t].push(o.slice()),e.setItemLayout(t,i[t])}))}}))}function aT(t){return!isNaN(t[0])&&!isNaN(t[1])}function sT(t){return[t.cx,t.cy]}function lT(t){var e=t.polar;if(e){it(e)||(e=[e]);var i=[];q(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],it(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}q(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}var hT=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.type,t}return m(i,e),i.prototype.render=function(e,i,n){var o=e.coordinateSystem,r=this.group,a=e.getData(),s=this._data;function l(t,e){var i=t.getItemVisual(e,"symbol")||"circle";if("none"!==i){var n=Tv(t.getItemVisual(e,"symbolSize")),o=Mv(i,-1,-1,2,2),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:n[0]/2,scaleY:n[1]/2,rotation:r*Math.PI/180||0}),o}}function h(i,n,o,r,a,s){o.removeAll();for(var h=0;h<n.length-1;h++){var u=l(r,a);u&&(u.__dimIdx=h,i[h]?(u.setPosition(i[h]),t[s?"initProps":"updateProps"](u,{x:n[h][0],y:n[h][1]},e,a)):u.setPosition(n[h]),o.add(u))}}function u(t){return K(t,(function(t){return[o.cx,o.cy]}))}a.diff(s).add((function(t){var i=a.getItemLayout(t);if(i){var n=new eg,o=new og,r={shape:{points:i}};n.shape.points=u(i),o.shape.points=u(i),xh(n,r,e,t),xh(o,r,e,t);var s=new qo,l=new qo;s.add(o),s.add(n),s.add(l),h(o.shape.points,i,l,a,t,!0),a.setItemGraphicEl(t,s)}})).update((function(t,i){var n=s.getItemGraphicEl(i),o=n.childAt(0),r=n.childAt(1),l=n.childAt(2),u={shape:{points:a.getItemLayout(t)}};u.shape.points&&(h(o.shape.points,u.shape.points,l,a,t,!1),Mh(r),Mh(o),bh(o,u,e),bh(r,u,e),a.setItemGraphicEl(t,n))})).remove((function(t){r.remove(s.getItemGraphicEl(t))})).execute(),a.eachItemGraphicEl((function(t,e){var i=a.getItemModel(e),n=t.childAt(0),o=t.childAt(1),s=t.childAt(2),l=a.getItemVisual(e,"style"),h=l.fill;r.add(t),n.useStyle(j(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:h})),ch(n,i,"lineStyle"),ch(o,i,"areaStyle");var u=i.getModel("areaStyle"),c=u.isEmpty()&&u.parentModel.isEmpty();o.ignore=c,q(["emphasis","select","blur"],(function(t){var e=i.getModel([t,"areaStyle"]),n=e.isEmpty()&&e.parentModel.isEmpty();o.ensureState(t).ignore=n&&c})),o.useStyle(j(u.getAreaStyle(),{fill:h,opacity:.7,decal:l.decal}));var d=i.getModel("emphasis"),p=d.getModel("itemStyle").getItemStyle();s.eachChild((function(t){if(t instanceof Hs){var n=t.style;t.useStyle(U({image:n.image,x:n.x,y:n.y,width:n.width,height:n.height},l))}else t.useStyle(l),t.setColor(h),t.style.strokeNoScale=!0;t.ensureState("emphasis").style=H(p);var o=a.getStore().get(a.getDimensionIndex(t.__dimIdx),e);(null==o||isNaN(o))&&(o=""),Dh(t,kh(i),{labelFetcher:a.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:o,inheritColor:h,defaultOpacity:l.opacity})})),sh(t,d.get("focus"),d.get("blurScope"),d.get("disabled"))})),this._data=a},i.prototype.remove=function(){this.group.removeAll(),this._data=null},i.type="radar",i}(gm);const uT=hT;var cT=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new GC(tt(this.getData,this),tt(this.getRawData,this))},e.prototype.getInitialData=function(t,e){return VC(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(t),a=""===r?this.name:r,s=Gp(this,t);return Rp("section",{header:a,sortBlocks:!0,blocks:K(o,(function(e){var i=n.get(n.mapDimension(e.dim),t);return Rp("nameValue",{markerType:"subItem",markerColor:s,name:e.name,value:i,sortParam:i})}))})},e.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(K(i.dimensions,(function(t){return e.mapDimension(t)})),t),o=0,r=n.length;o<r;o++)if(!isNaN(n[o])){var a=i.getIndicatorAxes();return i.coordToPoint(a[o].dataToCoord(n[o]),o)}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(of);const dT=cT;var pT=nS.value;function fT(t,e){return j({show:e},t)}var gT=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),r=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),u=this.get("triggerEvent"),c=K(this.get("indicator")||[],(function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=j({color:c.color},a));var p=G(H(c),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:o,axisLabel:r,name:c.text,showName:s,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1);if(ot(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else nt(l)&&(p.name=l(p.name,p));var g=new eu(p,null,this.ecModel);return Y(g,JC.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:G({lineStyle:{color:"#bbb"}},pT.axisLine),axisLabel:fT(pT.axisLabel,!1),axisTick:fT(pT.axisTick,!1),splitLine:fT(pT.splitLine,!0),splitArea:fT(pT.splitArea,!0),indicator:[]},e}(uc);const mT=gT;var vT=["axisLine","axisTickLabel","axisName"],yT=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;q(K(e.getIndicatorAxes(),(function(t){var i=t.model.get("showName")?t.name:"";return new FM(t.model,{axisName:i,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){q(vT,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),a=o.getModel("lineStyle"),s=r.getModel("areaStyle"),l=o.get("show"),h=r.get("show"),u=a.get("color"),c=s.get("color"),d=it(u)?u:[u],p=it(c)?c:[c],f=[],g=[];if("circle"===n)for(var m=i[0].getTicksCoords(),v=e.cx,y=e.cy,b=0;b<m.length;b++)l&&f[E(f,d,b)].push(new kf({shape:{cx:v,cy:y,r:m[b].coord}})),h&&b<m.length-1&&g[E(g,p,b)].push(new $f({shape:{cx:v,cy:y,r0:m[b].coord,r:m[b+1].coord}}));else{var x,w=K(i,(function(t,i){var n=t.getTicksCoords();return x=null==x?n.length-1:Math.min(n.length-1,x),K(n,(function(t){return e.coordToPoint(t.coord,i)}))})),_=[];for(b=0;b<=x;b++){for(var C=[],S=0;S<i.length;S++)C.push(w[S][b]);C[0]&&C.push(C[0].slice()),l&&f[E(f,d,b)].push(new og({shape:{points:C}})),h&&_&&g[E(g,p,b-1)].push(new eg({shape:{points:C.concat(_)}})),_=C.slice().reverse()}}var M=a.getLineStyle(),T=s.getAreaStyle();q(g,(function(t,e){this.group.add(Gg(t,{style:j({stroke:"none",fill:p[e%p.length]},T),silent:!0}))}),this),q(f,(function(t,e){this.group.add(Gg(t,{style:j({fill:"none",stroke:d[e%d.length]},M),silent:!0}))}),this)}function E(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}},e.type="radar",e}(af);const bT=yT;var xT=function(t){function e(e,i,n){var o=t.call(this,e,i,n)||this;return o.type="value",o.angle=0,o.name="",o}return m(e,t),e}(bM);const wT=xT;var _T=function(){function t(t,e,i){this.dimensions=[],this._model=t,this._indicatorAxes=K(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new wT(i,new CS);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},t.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},t.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,r=Math.atan2(-i,e),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(r-h.angle);u<a&&(o=h,s=l,a=u)}return[s,+(o&&o.coordToData(n))]},t.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),r=Math.min(n,o)/2;this.cx=nr(i[0],n),this.cy=nr(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var a=t.get("radius");(ot(a)||at(a))&&(a=[0,a]),this.r0=nr(a[0],r),this.r=nr(a[1],r),q(this._indicatorAxes,(function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i}),this)},t.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;q(i,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,o){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var r=e.getData();q(i,(function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))}))}}),this);var o=n.get("splitNumber"),r=new CS;r.setExtent(0,o),r.setInterval(1),q(i,(function(t,e){TM(t.scale,t.model,r)}))},t.prototype.convertToPixel=function(t,e,i){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,i){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,i){var n=[];return e.eachComponent("radar",(function(o){var r=new t(o,e,i);n.push(r),o.coordinateSystem=r})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])})),n},t.dimensions=[],t}();const CT=_T;function ST(t){t.registerCoordinateSystem("radar",CT),t.registerComponentModel(mT),t.registerComponentView(bT),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each((function(t){e.setItemVisual(t,"legendIcon","roundRect")})),e.setVisual("legendIcon","roundRect")}})}var MT="\0_ec_interaction_mutex";function TT(t,e){return!!ET(t)[e]}function ET(t){return t[MT]||(t[MT]={})}ob({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},At);var IT=function(t){function e(e){var i=t.call(this)||this;i._zr=e;var n=tt(i._mousedownHandler,i),o=tt(i._mousemoveHandler,i),r=tt(i._mouseupHandler,i),a=tt(i._mousewheelHandler,i),s=tt(i._pinchHandler,i);return i.enable=function(t,i){this.disable(),this._opt=j(H(i)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",n),e.on("mousemove",o),e.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},i.disable=function(){e.off("mousedown",n),e.off("mousemove",o),e.off("mouseup",r),e.off("mousewheel",a),e.off("pinch",s)},i}return m(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!xe(t)){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var i=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,i,n)&&(this._x=i,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&AT("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!TT(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,r=e-n,a=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&be(t.event),kT(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:n,oldY:o,newX:e,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){xe(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=AT("zoomOnMouseWheel",t,this._opt),i=AT("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),r=t.offsetX,a=t.offsetY;if(0!==n&&(e||i)){if(e){var s=o>3?1.4:o>1?1.2:1.1;DT(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(i){var l=Math.abs(n);DT(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){TT(this._zr,"globalPan")||DT(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(te);function DT(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(be(n.event),kT(t,e,i,n,o))}function kT(t,e,i,n,o){o.isAvailableBehavior=tt(AT,null,i,n),t.trigger(e,o)}function AT(t,e,i){var n=i[t];return!t||n&&(!ot(n)||e.event[n+"Key"])}const LT=IT;function RT(t,e,i){var n=t.target;n.x+=e,n.y+=i,n.dirty()}function PT(t,e,i,n){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,r){var s=r.min||0,l=r.max||1/0;a=Math.max(Math.min(l,a),s)}var h=a/t.zoom;t.zoom=a,o.x-=(i-o.x)*(h-1),o.y-=(n-o.y)*(h-1),o.scaleX*=h,o.scaleY*=h,o.dirty()}var OT,zT={axisPointer:1,tooltip:1,brush:1};function NT(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!zT.hasOwnProperty(n.mainType)&&o&&o.model!==i}function BT(t){ot(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var FT={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},VT=Q(FT),HT={"alignment-baseline":"textBaseline","stop-color":"stopColor"},GT=Q(HT),WT=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var i=BT(t);this._defsUsePending=[];var n=new qo;this._root=n;var o=[],r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),s=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),qT(i,n,null,!0,!1);for(var l,h,u=i.firstChild;u;)this._parseNode(u,n,o,null,!1,!1),u=u.nextSibling;if(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n[0].style[n[1]]=t[n[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],r){var c=QT(r);c.length>=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(h=oE(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=n;(n=new qo).add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return e.ignoreRootClip||null==a||null==s||n.setClipPath(new qs({shape:{x:0,y:0,width:a,height:s}})),{root:n,width:a,height:s,viewBoxRect:l,viewBoxTransform:h,named:o}},t.prototype._parseNode=function(t,e,i,n,o,r){var a,s=t.nodeName.toLowerCase(),l=n;if("defs"===s&&(o=!0),"text"===s&&(r=!0),"defs"===s||"switch"===s)a=e;else{if(!o){var h=OT[s];if(h&&kt(OT,s)){a=h.call(this,t,e);var u=t.getAttribute("name");if(u){var c={name:u,namedFrom:null,svgNodeTagLower:s,el:a};i.push(c),"g"===s&&(l=c)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:a});e.add(a)}}var d=UT[s];if(d&&kt(UT,s)){var p=d.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,i,l,o,r):3===g.nodeType&&r&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var i=new Ns({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});YT(e,i),qT(t,i,this._defsUsePending,!1,!1),function(t,e){var i=e.__selfStyle;if(i){var n=i.textBaseline,o=n;n&&"auto"!==n?"baseline"===n?o="alphabetic":"before-edge"===n||"text-before-edge"===n?o="top":"after-edge"===n||"text-after-edge"===n?o="bottom":"central"!==n&&"mathematical"!==n||(o="middle"):o="alphabetic",t.style.textBaseline=o}var r=e.__inheritedStyle;if(r){var a=r.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(i,e);var n=i.style,o=n.fontSize;o&&o<9&&(n.fontSize=9,i.scaleX*=o/9,i.scaleY*=o/9);var r=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=r;var a=i.getBoundingRect();return this._textX+=a.width,e.add(i),i},t.internalField=void(OT={g:function(t,e){var i=new qo;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new qs;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new kf;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new lg;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new Rf;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,n=t.getAttribute("points");n&&(i=ZT(n));var o=new eg({shape:{points:i||[]},silent:!0});return YT(e,o),qT(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var i,n=t.getAttribute("points");n&&(i=ZT(n));var o=new og({shape:{points:i||[]},silent:!0});return YT(e,o),qT(t,o,this._defsUsePending,!1,!1),o},image:function(t,e){var i=new Hs;return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(r);var a=new qo;return YT(e,a),qT(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0",a=new qo;return YT(e,a),qT(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(r),a},path:function(t,e){var i=Tf(t.getAttribute("d")||"");return YT(e,i),qT(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),UT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),i=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),r=new xg(e,i,n,o);return jT(t,r),XT(t,r),r},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),i=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),o=new wg(e,i,n);return jT(t,o),XT(t,o),o}};function jT(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function XT(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType&&"stop"===i.nodeName.toLocaleLowerCase()){var n,o=i.getAttribute("offset");n=o&&o.indexOf("%")>0?parseInt(o,10)/100:o?parseFloat(o):0;var r={};nE(i,r,r);var a=r.stopColor||i.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:a})}i=i.nextSibling}}function YT(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),j(e.__inheritedStyle,t.__inheritedStyle))}function ZT(t){for(var e=QT(t),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),r=parseFloat(e[n+1]);i.push([o,r])}return i}function qT(t,e,i,n,o){var r=e,a=r.__inheritedStyle=r.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=[],o=null;i.replace(tE,(function(t,e,i){return n.push(e,i),""}));for(var r=n.length-1;r>0;r-=2){var a=n[r],s=n[r-1],l=QT(a);switch(o=o||[1,0,0,1,0,0],s){case"translate":Ee(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":De(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ie(o,o,-parseFloat(l[0])*eE);break;case"skewX":Te(o,[1,0,Math.tan(parseFloat(l[0])*eE),1,0,0],o);break;case"skewY":Te(o,[1,Math.tan(parseFloat(l[0])*eE),0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}e.setLocalTransform(o)}}(t,e),nE(t,a,s),n||function(t,e,i){for(var n=0;n<VT.length;n++){var o=VT[n];null!=(r=t.getAttribute(o))&&(e[FT[o]]=r)}for(n=0;n<GT.length;n++){var r;o=GT[n],null!=(r=t.getAttribute(o))&&(i[HT[o]]=r)}}(t,a,s)),r.style=r.style||{},null!=a.fill&&(r.style.fill=$T(r,"fill",a.fill,i)),null!=a.stroke&&(r.style.stroke=$T(r,"stroke",a.stroke,i)),q(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))})),q(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(t){null!=a[t]&&(r.style[t]=a[t])})),o&&(r.__selfStyle=s),a.lineDash&&(r.style.lineDash=K(QT(a.lineDash),(function(t){return parseFloat(t)}))),"hidden"!==a.visibility&&"collapse"!==a.visibility||(r.invisible=!0),"none"===a.display&&(r.ignore=!0)}var KT=/^url\(\s*#(.*?)\)/;function $T(t,e,i,n){var o=i&&i.match(KT);if(!o)return"none"===i&&(i=null),i;var r=bt(o[1]);n.push([t,e,r])}var JT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function QT(t){return t.match(JT)||[]}var tE=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,eE=Math.PI/180,iE=/([^\s:;]+)\s*:\s*([^:;]+)/g;function nE(t,e,i){var n,o=t.getAttribute("style");if(o)for(iE.lastIndex=0;null!=(n=iE.exec(o));){var r=n[1],a=kt(FT,r)?FT[r]:null;a&&(e[a]=n[2]);var s=kt(HT,r)?HT[r]:null;s&&(i[s]=n[2])}}function oE(t,e){var i=e.width/t.width,n=e.height/t.height,o=Math.min(i,n);return{scale:o,x:-(t.x+t.width/2)*o+(e.x+e.width/2),y:-(t.y+t.height/2)*o+(e.y+e.height/2)}}var rE=1e-8;function aE(t,e){return Math.abs(t-e)<rE}function sE(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var r=1;r<t.length;r++){var a=t[r];n+=ws(o[0],o[1],a[0],a[1],e,i),o=a}var s=t[0];return aE(o[0],s[0])&&aE(o[1],s[1])||(n+=ws(o[0],o[1],s[0],s[1],e,i)),0!==n}var lE=[];function hE(t,e){for(var i=0;i<t.length;i++)Yt(t[i],t[i],e)}function uE(t,e,i,n){for(var o=0;o<t.length;o++){var r=t[o];n&&(r=n.project(r)),r&&isFinite(r[0])&&isFinite(r[1])&&(Zt(e,e,r),qt(i,i,r))}}var cE=function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),dE=function(t,e){this.type="polygon",this.exterior=t,this.interiors=e},pE=function(t){this.type="linestring",this.points=t},fE=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.type="geoJSON",o.geometries=i,o._center=n&&[n[0],n[1]],o}return m(e,t),e.prototype.calcCenter=function(){for(var t,e=this.geometries,i=0,n=0;n<e.length;n++){var o=e[n],r=o.exterior,a=r&&r.length;a>i&&(t=o,i=a)}if(t)return function(t){for(var e=0,i=0,n=0,o=t.length,r=t[o-1][0],a=t[o-1][1],s=0;s<o;s++){var l=t[s][0],h=t[s][1],u=r*h-l*a;e+=u,i+=(r+l)*u,n+=(a+h)*u,r=l,a=h}return e?[i/e/3,n/e/3,e]:[t[0][0]||0,t[0][1]||0]}(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var i=[1/0,1/0],n=[-1/0,-1/0];return q(this.geometries,(function(e){"polygon"===e.type?uE(e.exterior,i,n,t):q(e.points,(function(e){uE(e,i,n,t)}))})),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),e=new Ge(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++){var r=i[n];if("polygon"===r.type){var a=r.exterior,s=r.interiors;if(sE(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(sE(s[l],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=o.width/o.height;i?n||(n=i/r):i=r*n;for(var a=new Ge(t,e,i,n),s=o.calculateTransform(a),l=this.geometries,h=0;h<l.length;h++){var u=l[h];"polygon"===u.type?(hE(u.exterior,s),q(u.interiors,(function(t){hE(t,s)}))):q(u.points,(function(t){hE(t,s)}))}(o=this._rect).copy(a),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){null==t&&(t=this.name);var i=new e(t,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},e}(cE),gE=function(t){function e(e,i){var n=t.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return m(e,t),e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),i=[e.x+e.width/2,e.y+e.height/2],n=Se(lE),o=t;o&&!o.isGeoSVGGraphicRoot;)Te(n,o.getLocalTransform(),n),o=o.parent;return ke(n,n),Yt(i,i,n),i},e}(cE),mE=Tt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),vE=function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=Tt(),this._freedGraphics=[],this._mapName=t,this._parsedXML=BT(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(t){var e=[],i=Tt();return q(t,(function(t){if(null==t.namedFrom){var n=new gE(t.name,t.el);e.push(n),i.set(t.name,n)}})),{regions:e,regionsMap:i}}(t.named),i=e.regions,n=e.regionsMap;this._regions=i,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var e,i,n,o;try{yt(null!=(i=(e=t&&(n=t,o={ignoreViewBox:!0,ignoreRootClip:!0},(new WT).parse(n,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var r=new qo;r.add(i),r.isGeoSVGGraphicRoot=!0;var a=e.width,s=e.height,l=e.viewBoxRect,h=this._boundingRect;if(!h){var u=void 0,c=void 0,d=void 0,p=void 0;if(null!=a?(u=0,d=a):l&&(u=l.x,d=l.width),null!=s?(c=0,p=s):l&&(c=l.y,p=l.height),null==u||null==c){var f=i.getBoundingRect();null==u&&(u=f.x,d=f.width),null==c&&(c=f.y,p=f.height)}h=this._boundingRect=new Ge(u,c,d,p)}if(l){var g=oE(l,h);i.scaleX=i.scaleY=g.scale,i.x=g.x,i.y=g.y}r.setClipPath(new qs({shape:h.plain()}));var m=[];return q(e.named,(function(t){var e;null!=mE.get(t.svgNodeTagLower)&&(m.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse((function(t){t.silent=!1})))})),{root:r,boundingRect:h,named:m}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,i),i)},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);i&&(e.removeKey(t),this._freedGraphics.push(i))},t}();function yE(t,e,i){for(var n=0;n<t.length;n++)t[n]=bE(t[n],e[n],i)}function bE(t,e,i){for(var n=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,n.push([s/i,l/i])}return n}for(var xE=[126,25],wE="南海诸岛",_E=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],CE=0;CE<_E.length;CE++)for(var SE=0;SE<_E[CE].length;SE++)_E[CE][SE][0]/=10.5,_E[CE][SE][1]/=-14,_E[CE][SE][0]+=xE[0],_E[CE][SE][1]+=xE[1];var ME={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]},TE=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],EE=function(){function t(t,e,i){var n;this.type="geoJSON",this._parsedMap=Tt(),this._mapName=t,this._specialAreas=i,this._geoJSON=ot(n=e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(n):new Function("return ("+n+");")():n}return t.prototype.load=function(t,e){e=e||"name";var i=this._parsedMap.get(e);if(!i){var n=this._parseToRegions(e);i=this._parsedMap.set(e,{regions:n,boundingRect:IE(n)})}var o=Tt(),r=[];return q(i.regions,(function(e){var i=e.name;t&&kt(t,i)&&(e=e.cloneShallow(i=t[i])),r.push(e),o.set(i,e)})),{regions:r,boundingRect:i.boundingRect||new Ge(0,0,0,0),regionsMap:o}},t.prototype._parseToRegions=function(t){var e,i=this._mapName,n=this._geoJSON;try{e=n?function(t,e){return K(J((t=function(t){if(!t.UTF8Encoding)return t;var e=t,i=e.UTF8Scale;return null==i&&(i=1024),q(e.features,(function(t){var e=t.geometry,n=e.encodeOffsets,o=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=bE(o,n,i);break;case"Polygon":case"MultiLineString":yE(o,n,i);break;case"MultiPolygon":q(o,(function(t,e){return yE(t,n[e],i)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,n=t.geometry,o=[];switch(n.type){case"Polygon":var r=n.coordinates;o.push(new dE(r[0],r.slice(1)));break;case"MultiPolygon":q(n.coordinates,(function(t){t[0]&&o.push(new dE(t[0],t.slice(1)))}));break;case"LineString":o.push(new pE([n.coordinates]));break;case"MultiLineString":o.push(new pE(n.coordinates))}var a=new fE(i[e||"name"],o,i.cp);return a.properties=i,a}))}(n,t):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,e){if("china"===t){for(var i=0;i<e.length;i++)if(e[i].name===wE)return;e.push(new fE(wE,K(_E,(function(t){return{type:"polygon",exterior:t}})),xE))}}(i,e),q(e,(function(t){var e=t.name;!function(t,e){if("china"===t){var i=ME[e.name];if(i){var n=e.getCenter();n[0]+=i[0]/10.5,n[1]+=-i[1]/14,e.setCenter(n)}}}(i,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:TE[0]})}(i,t);var n=this._specialAreas&&this._specialAreas[e];n&&t.transformTo(n.left,n.top,n.width,n.height)}),this),e},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function IE(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}var DE=Tt();const kE={registerMap:function(t,e,i){if(e.svg){var n=new vE(t,e.svg);DE.set(t,n)}else{var o=e.geoJson||e.geoJSON;o&&!e.features?i=e.specialAreas:o=e,n=new EE(t,o,i),DE.set(t,n)}},getGeoResource:function(t){return DE.get(t)},getMapForUser:function(t){var e=DE.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()},load:function(t,e,i){var n=DE.get(t);if(n)return n.load(e,i)}};var AE=["rect","circle","line","ellipse","polygon","polyline","path"],LE=Tt(AE),RE=Tt(AE.concat(["g"])),PE=Tt(AE.concat(["g"])),OE=Br();function zE(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function NE(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var BE=function(){function t(t){var e=new qo;this.uid=nu("ec_map_draw"),this._controller=new LT(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new qo),e.add(this._svgGroup=new qo)}return t.prototype.draw=function(t,e,i,n,o){var r="geo"===t.mainType,a=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem,l=this._regionsGroup,h=this.group,u=s.getTransformInfo(),c=u.raw,d=u.roam;!l.childAt(0)||o?(h.x=d.x,h.y=d.y,h.scaleX=d.scaleX,h.scaleY=d.scaleY,h.dirty()):bh(h,d,t);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:i,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,i),this._updateMapSelectHandler(t,l,i,n)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Tt(),i=Tt(),n=this._regionsGroup,o=t.transformInfoRaw,r=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function h(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function u(t){for(var e=[],i=!l&&s&&s.project,n=0;n<t.length;++n){var o=h(t[n],i);o&&e.push(o)}return e}function c(t){return{shape:{points:u(t)}}}n.removeAll(),q(t.geo.regions,(function(o){var u=o.name,d=e.get(u),p=i.get(u)||{},f=p.dataIdx,g=p.regionModel;d||(d=e.set(u,new qo),n.add(d),f=a?a.indexOfName(u):null,g=t.isGeo?r.getRegionModel(u):a?a.getItemModel(f):null,i.set(u,{dataIdx:f,regionModel:g}));var m=[],v=[];q(o.geometries,(function(t){if("polygon"===t.type){var e=[t.exterior].concat(t.interiors||[]);l&&(e=UE(e,l)),q(e,(function(t){m.push(new eg(c(t)))}))}else{var i=t.points;l&&(i=UE(i,l,!0)),q(i,(function(t){v.push(new og(c(t)))}))}}));var y=h(o.getCenter(),s&&s.project);function b(e,i){if(e.length){var n=new yg({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});d.add(n),FE(t,n,f,g),VE(t,n,u,g,r,f,y),i&&(NE(n),q(n.states,NE))}}b(m),b(v,!0)})),e.each((function(e,n){var o=i.get(n),a=o.dataIdx,s=o.regionModel;HE(t,e,n,s,r,a),GE(t,e,n,s,r),WE(t,e,n,s,r)}),this)},t.prototype._buildSVG=function(t){var e=t.geo.map,i=t.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var n=this._svgDispatcherMap=Tt(),o=!1;q(this._svgGraphicRecord.named,(function(e){var i=e.name,r=t.mapOrGeoModel,a=t.data,s=e.svgNodeTagLower,l=e.el,h=a?a.indexOfName(i):null,u=r.getRegionModel(i);null!=LE.get(s)&&l instanceof La&&FE(t,l,h,u),l instanceof La&&(l.culling=!0),l.z2EmphasisLift=0,e.namedFrom||(null!=PE.get(s)&&VE(t,l,i,u,r,h,null),HE(t,l,i,u,r,h),GE(t,l,i,u,r),null!=RE.get(s)&&("self"===WE(t,l,i,u,r)&&(o=!0),(n.get(i)||n.set(i,[])).push(l)))}),this),this._enableBlurEntireSVG(o,t)},t.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var i=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse((function(t){if(!t.isGroup){Ul(t);var e=t.ensureState("blur").style||{};null==e.opacity&&null!=i&&(e.opacity=i),t.ensureState("emphasis")}}))}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var i=e.coordinateSystem;if("geoJSON"===i.resourceType){var n=this._regionsGroupByName;if(n){var o=n.get(t);return o?[o]:[]}}else if("geoSVG"===i.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var e=kE.getGeoResource(t);if(e&&"geoSVG"===e.type){var i=e.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var e=kE.getGeoResource(t);e&&"geoSVG"===e.type&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,e,i){var n=t.coordinateSystem,o=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=n.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}o.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,RT(r,t.dx,t.dy),i.dispatchAction(U(s(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))}),this),o.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,PT(r,t.scale,t.originX,t.originY),i.dispatchAction(U(s(),{zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))}),this),o.setPointerChecker((function(e,o,r){return n.containPoint([o,r])&&!NT(e,i,t)}))},t.prototype.resetForLabelLayout=function(){this.group.traverse((function(t){var e=t.getTextContent();e&&(e.ignore=OE(e).ignore)}))},t.prototype._updateMapSelectHandler=function(t,e,i,n){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",(function(){o._mouseDownFlag=!0})),e.on("click",(function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)})))},t}();function FE(t,e,i,n){var o=n.getModel("itemStyle"),r=n.getModel(["emphasis","itemStyle"]),a=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=zE(o),h=zE(r),u=zE(s),c=zE(a),d=t.data;if(d){var p=d.getItemVisual(i,"style"),f=d.getItemVisual(i,"decal");t.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=iy(f,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=h,e.ensureState("select").style=u,e.ensureState("blur").style=c,Ul(e)}function VE(t,e,i,n,o,r,a){var s=t.data,l=t.isGeo,h=s&&isNaN(s.get(s.mapDimension("value"),r)),u=s&&s.getItemLayout(r);if(l||h||u&&u.showLabel){var c=l?i:r,d=void 0;(!s||r>=0)&&(d=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Dh(e,kh(n),{labelFetcher:d,labelDataIndex:c,defaultText:i},p);var f=e.getTextContent();if(f&&(OE(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function HE(t,e,i,n,o,r){t.data?t.data.setItemGraphicEl(r,e):dl(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:i,region:n&&n.option||{}}}function GE(t,e,i,n,o){t.data||om({el:e,componentModel:o,itemName:i,itemTooltipOption:n.get("tooltip")})}function WE(t,e,i,n,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=n.getModel("emphasis"),a=r.get("focus");return sh(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&function(t,e,i){var n=dl(t);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=i}(e,o,i),a}function UE(t,e,i){var n,o=[];function r(){n=[]}function a(){n.length&&(o.push(n),n=[])}var s=e({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&n.push([t,e])},sphere:function(){}});return!i&&s.polygonStart(),q(t,(function(t){s.lineStart();for(var e=0;e<t.length;e++)s.point(t[e][0],t[e][1]);s.lineEnd()})),!i&&s.polygonEnd(),o}const jE=BE;var XE=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&"geoRoam"===n.type&&this._mapDraw.resetForLabelLayout(),n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(r=this._mapDraw)&&o.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new jE(i);o.add(r.group),r.draw(t,e,i,this,n),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),(function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var a=r.point,s=r.offset,l=new kf({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:Cl+1)});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),p=d.getModel("label"),f=h.getItemGraphicEl(c);Dh(l,kh(d),{labelFetcher:{getFormattedLabel:function(e,i){return t.getFormattedLabel(c,i)}},defaultText:u}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){Gl(l,t)}}o.add(l)}}}))},e.type="map",e}(gm);const YE=XE;var ZE=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.needsDrawMap=!1,i.seriesGroup=[],i.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.getCenter())}},i}return m(e,t),e.prototype.getInitialData=function(t){for(var e=VC(this,{coordDimensions:["value"],encodeDefaulter:et(Tc,this)}),i=Tt(),n=[],o=0,r=e.count();o<r;o++){var a=e.getName(o);i.set(a,!0)}return q(kE.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,(function(t){var e=t.name;i.get(e)||n.push(e)})),e.appendValues([],n),e},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},e.prototype.formatTooltip=function(t,e,i){for(var n=this.getData(),o=this.getRawValue(t),r=n.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var h=a[l].originalData.indexOfName(r),u=n.mapDimension("value");isNaN(a[l].originalData.get(u,h))||s.push(a[l].name)}return Rp("section",{header:s.join(", "),noHeader:!s.length,blocks:[Rp("nameValue",{name:r,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",i=Mv(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",e.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(of);const qE=ZE;function KE(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),q(e,(function(t,e){for(var i,n,o,r=(i=K(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),o={},q(i,(function(t){t.each(t.mapDimension("value"),(function(e,i){var n="ec-"+t.getName(i);o[n]=o[n]||[],isNaN(e)||o[n].push(e)}))})),i[0].map(i[0].mapDimension("value"),(function(t,e){for(var r="ec-"+i[0].getName(e),a=0,s=1/0,l=-1/0,h=o[r].length,u=0;u<h;u++)s=Math.min(s,o[r][u]),l=Math.max(l,o[r][u]),a+=o[r][u];return 0===h?NaN:"min"===n?s:"max"===n?l:"average"===n?a/h:a}))),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=0===a&&!t[a].getHostGeoModel(),t[a].setData(r.cloneShallow()),t[a].mainSeries=t[0]}))}function $E(t){var e={};t.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};q(i.seriesGroup,(function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each(n.mapDimension("value"),(function(t,e){var r=n.getName(e),a=i.getRegion(r);if(a&&!isNaN(t)){var s=o[r]||0,l=i.dataToPoint(a.getCenter());o[r]=s+1,n.setItemLayout(e,{point:l,offset:s})}}))}));var r=i.getData();r.each((function(t){var e=r.getName(t),i=r.getItemLayout(t)||{};i.showLabel=!o[e],r.setItemLayout(t,i)})),e[n]=!0}}))}var JE=Yt,QE=function(t){function e(e){var i=t.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Eo,i._rawTransformable=new Eo,i.name=e,i}return m(e,t),e.prototype.setBoundingRect=function(t,e,i,n){return this._rect=new Ge(t,e,i,n),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,i,n){this._transformTo(t,e,i,n),this._viewRect=new Ge(t,e,i,n)},e.prototype._transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new Ge(t,e,i,n));var a=r.parent;r.parent=null,r.decomposeTransform(),r.parent=a,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[nr(t[0],e.getWidth()),nr(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Yt([],n,t),i=Yt([],i,t),e.originX=n[0],e.originY=n[1],e.x=i[0]-n[0],e.y=i[1]-n[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Me(this.transform||(this.transform=[]),e.transform||[1,0,0,1,0,0]),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ke(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,i=new Eo;return i.transform=e.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?JE(i,t,n):Pt(i,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?JE([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,i){var n=tI(e);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,e,i){var n=tI(e);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Eo);function tI(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const eI=QE;var iI={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},nI=["lng","lat"],oI=function(t){function e(e,i,n){var o=t.call(this,e)||this;o.dimensions=nI,o.type="geo",o._nameCoordMap=Tt(),o.map=i;var r,a=n.projection,s=kE.load(i,n.nameMap,n.nameProperty),l=kE.getGeoResource(i),h=(o.resourceType=l?l.type:null,o.regions=s.regions),u=iI[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,o.projection=a,a)for(var c=0;c<h.length;c++){var d=h[c].getBoundingRect(a);(r=r||d.clone()).union(d)}else r=s.boundingRect;return o.setBoundingRect(r.x,r.y,r.width,r.height),o.aspectScale=a?1:ft(n.aspectScale,u.aspectScale),o._invertLongitute=!a&&u.invertLongitute,o}return m(e,t),e.prototype._transformTo=function(t,e,i,n){var o=this.getBoundingRect(),r=this._invertLongitute;o=o.clone(),r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new Ge(t,e,i,n));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,r&&(a.scaleY=-a.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var e=this.regions,i=0;i<e.length;i++){var n=e[i];if("geoJSON"===n.type&&n.contain(t))return e[i]}},e.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},e.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},e.prototype.dataToPoint=function(t,e,i){if(ot(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t,e,i)}},e.prototype.pointToData=function(t){var e=this.projection;return e&&(t=e.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(e){return t.prototype.pointToData.call(this,e)},e.prototype.projectedToPoint=function(e,i,n){return t.prototype.dataToPoint.call(this,e,i,n)},e.prototype.convertToPixel=function(t,e,i){var n=rI(e);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,e,i){var n=rI(e);return n===this?n.pointToData(i):null},e}(eI);function rI(t){var e=t.geoModel,i=t.seriesModel;return e?e.coordinateSystem:i?i.coordinateSystem||(i.getReferringComponents("geo",Gr).models[0]||{}).coordinateSystem:null}Y(oI,eI);const aI=oI;function sI(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(o[0])&&isFinite(o[1])){var r=this.projection;if(r){var a=n[0],s=n[1],l=o[0],h=o[1];n=[1/0,1/0],o=[-1/0,-1/0];var u=function(t,e,i,a){for(var s=i-t,l=a-e,h=0;h<=100;h++){var u=h/100,c=r.project([t+s*u,e+l*u]);Zt(n,n,c),qt(o,o,c)}};u(a,s,l,s),u(l,s,l,h),u(l,h,a,h),u(a,h,l,s)}this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}}var c,d,p,f=this.getBoundingRect(),g=t.get("layoutCenter"),m=t.get("layoutSize"),v=e.getWidth(),y=e.getHeight(),b=f.width/f.height*this.aspectScale,x=!1;if(g&&m&&(c=[nr(g[0],v),nr(g[1],y)],d=nr(m,Math.min(v,y)),isNaN(c[0])||isNaN(c[1])||isNaN(d)||(x=!0)),x)p={},b>1?(p.width=d,p.height=d/b):(p.height=d,p.width=d*b),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var w=t.getBoxLayoutParams();w.aspect=b,p=ic(w,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var lI=function(){function t(){this.dimensions=nI}return t.prototype.create=function(t,e){var i=[];function n(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,o){var r=t.get("map"),a=new aI(r+o,r,U({nameMap:t.get("nameMap")},n(t)));a.zoomLimit=t.get("scaleLimit"),i.push(a),t.coordinateSystem=a,a.model=t,a.resize=sI,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),q(o,(function(t,o){var r=K(t,(function(t){return t.get("nameMap")})),a=new aI(o,o,U({nameMap:W(r)},n(t[0])));a.zoomLimit=pt.apply(null,K(t,(function(t){return t.get("scaleLimit")}))),i.push(a),a.resize=sI,a.resize(t[0],e),q(t,(function(t){t.coordinateSystem=a,function(t,e){q(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}(a,t)}))})),i},t.prototype.getFilledRegions=function(t,e,i,n){for(var o=(t||[]).slice(),r=Tt(),a=0;a<o.length;a++)r.set(o[a].name,o[a]);return q(kE.load(e,i,n).regions,(function(t){var e=t.name;!r.get(e)&&o.push({name:e})})),o},t}();const hI=new lI;var uI=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(t,e,i){var n=kE.getGeoResource(t.map);if(n&&"geoJSON"===n.type){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),Er(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,e=this.option;e.regions=hI.getFilledRegions(e.regions,e.map,e.nameMap,e.nameProperty);var i={};this._optionModelMap=$(e.regions||[],(function(e,n){var o=n.name;return o&&(e.set(o,new eu(n,t,t.ecModel)),n.selected&&(i[o]=!0)),e}),Tt()),e.selectedMap||(e.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new eu(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,e){var i=this.getRegionModel(t),n="normal"===e?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};return nt(n)?(o.status=e,n(o)):ot(n)?n.replace("{a}",null!=t?t:""):void 0},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var e=this.option,i=e.selectedMode;i&&("multiple"!==i&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},e.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(uc);const cI=uI;function dI(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function pI(t,e,i,n){var o=t.getZoom(),r=t.getCenter(),a=e.zoom,s=t.projectedToPoint?t.projectedToPoint(r):t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(s[0]-=e.dx,s[1]-=e.dy,t.setCenter(dI(t,s),n)),null!=a){if(i){var l=i.min||0,h=i.max||1/0;a=Math.max(Math.min(o*a,h),l)/o}t.scaleX*=a,t.scaleY*=a;var u=(e.originX-t.x)*(a-1),c=(e.originY-t.y)*(a-1);t.x-=u,t.y-=c,t.updateTransform(),t.setCenter(dI(t,s),n),t.setZoom(a*o)}return{center:t.getCenter(),zoom:t.getZoom()}}var fI=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.focusBlurEnabled=!0,i}return m(e,t),e.prototype.init=function(t,e){this._api=e},e.prototype.render=function(t,e,i,n){if(this._model=t,!t.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new jE(i));var o=this._mapDraw;o.draw(t,e,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,e,i)},e.prototype._handleRegionClick=function(t){var e;dv(t.target,(function(t){return null!=(e=dl(t).eventData)}),!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},e.prototype.updateSelectStatus=function(t,e,i){var n=this;this._mapDraw.group.traverse((function(t){var e=dl(t).eventData;if(e)return n._model.isSelected(e.name)?i.enterSelect(t):i.leaveSelect(t),!0}))},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(af);const gI=fI;function mI(t,e,i){kE.registerMap(t,e,i)}function vI(t){function e(e,i){i.update="geo:updateSelectStatus",t.registerAction(i,(function(t,i){var n={},o=[];return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name),q(i.coordinateSystem.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}));var r=[];q(n,(function(t,e){n[e]&&r.push(e)})),o.push({geoIndex:i.componentIndex,name:r})})),{selected:n,allSelected:o,name:t.name}}))}t.registerCoordinateSystem("geo",hI),t.registerComponentModel(cI),t.registerComponentView(gI),t.registerImpl("registerMap",mI),t.registerImpl("getMap",(function(t){return kE.getMapForUser(t)})),e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e,i){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){var o=e.coordinateSystem;if("geo"===o.type){var r=pI(o,t,e.get("scaleLimit"),i);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===n&&q(e.seriesGroup,(function(t){t.setCenter(r.center),t.setZoom(r.zoom)}))}}))}))}function yI(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var r=e[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,o+=r.hierNode.change,n+=r.hierNode.shift+o}}(t);var r=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,h=r.hierNode.modifier,u=a.hierNode.modifier,c=s.hierNode.modifier;s=_I(s),r=CI(r),s&&r;){o=_I(o),a=CI(a),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-r.hierNode.prelim-h+n(s,r);d>0&&(MI(SI(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=r.hierNode.modifier,l+=o.hierNode.modifier,u+=a.hierNode.modifier}s&&!_I(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),r&&!CI(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=h-u,i=t)}return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function bI(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function xI(t){return arguments.length?t:TI}function wI(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function _I(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function CI(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function SI(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function MI(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function TI(t,e){return t.parentNode===e.parentNode?1:2}var EI=function(){this.parentPoint=[],this.childPoints=[]},II=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new EI},e.prototype.buildPath=function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,r=i[0],a=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,h=1-l,u=nr(e.forkPosition,1),c=[];c[l]=o[l],c[h]=o[h]+(a[h]-o[h])*u,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(r[0],r[1]),c[l]=r[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;d<n-1;d++){var p=i[d];t.moveTo(p[0],p[1]),c[l]=p[l],t.lineTo(c[0],c[1])}},e}(Ps),DI=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._mainGroup=new qo,i}return m(e,t),e.prototype.init=function(t,e){this._controller=new LT(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,i){var n=t.getData(),o=t.layoutInfo,r=this._mainGroup;"radial"===t.get("layout")?(r.x=o.x+o.width/2,r.y=o.y+o.height/2):(r.x=o.x,r.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,e,i);var a=this._data;n.diff(a).add((function(e){kI(n,e)&&AI(n,e,null,r,t)})).update((function(e,i){var o=a.getItemGraphicEl(i);kI(n,e)?AI(n,e,o,r,t):o&&PI(a,i,o,r,t)})).remove((function(e){var i=a.getItemGraphicEl(e);i&&PI(a,e,i,r,t)})).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&n.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=n},e.prototype._updateViewCoordSys=function(t,e){var i=t.getData(),n=[];i.each((function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])}));var o=[],r=[];Ha(n,o,r);var a=this._min,s=this._max;r[0]-o[0]==0&&(o[0]=a?a[0]:o[0]-1,r[0]=s?s[0]:r[0]+1),r[1]-o[1]==0&&(o[1]=a?a[1]:o[1]-1,r[1]=s?s[1]:r[1]+1);var l=t.coordinateSystem=new eI;l.zoomLimit=t.get("scaleLimit"),l.setBoundingRect(o[0],o[1],r[0]-o[0],r[1]-o[1]),l.setCenter(t.get("center"),e),l.setZoom(t.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=r},e.prototype._updateController=function(t,e,i){var n=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!NT(e,i,t)})),o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){RT(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){PT(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),n._updateNodeAndLinkScale(t),i.updateLabelLayout()}))},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),i=this._getNodeGlobalScale(t);e.eachItemGraphicEl((function(t,e){t.setSymbolScale(i)}))},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scaleX||1;return((e.getZoom()-1)*i+1)/n},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(gm);function kI(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)}function AI(t,e,i,n,o){var r=!i,a=t.tree.getNodeByDataIndex(e),s=a.getModel(),l=a.getVisual("style").fill,h=!1===a.isExpand&&0!==a.children.length?l:"#fff",u=t.tree.root,c=a.parentNode===u?a:a.parentNode||a,d=t.getItemGraphicEl(c.dataIndex),p=c.getLayout(),f=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:p,g=a.getLayout();r?((i=new s_(t,e,null,{symbolInnerColor:h,useNameLabel:!0})).x=f.x,i.y=f.y):i.updateData(t,e,null,{symbolInnerColor:h,useNameLabel:!0}),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=g.rawX,i.__radialRawY=g.rawY,n.add(i),t.setItemGraphicEl(e,i),i.__oldX=i.x,i.__oldY=i.y,bh(i,{x:g.x,y:g.y},o);var m=i.getSymbolPath();if("radial"===o.get("layout")){var v=u.children[0],y=v.getLayout(),b=v.children.length,x=void 0,w=void 0;if(g.x===y.x&&!0===a.isExpand&&v.children.length){var _={x:(v.children[0].getLayout().x+v.children[b-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[b-1].getLayout().y)/2};(x=Math.atan2(_.y-y.y,_.x-y.x))<0&&(x=2*Math.PI+x),(w=_.x<y.x)&&(x-=Math.PI)}else(x=Math.atan2(g.y-y.y,g.x-y.x))<0&&(x=2*Math.PI+x),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(w=g.x<y.x)&&(x-=Math.PI):(w=g.x>y.x)||(x-=Math.PI);var C=w?"left":"right",S=s.getModel("label"),M=S.get("rotate"),T=M*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:S.get("position")||C,rotation:null==M?-x:T,origin:"center"}),E.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),D="relative"===I?Et(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;D&&(dl(i).focus=D),function(t,e,i,n,o,r,a,s){var l=e.getModel(),h=t.get("edgeShape"),u=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if("curve"===h)e.parentNode&&e.parentNode!==i&&(g||(g=n.__edge=new pg({shape:OI(u,c,d,o,o)})),bh(g,{shape:OI(u,c,d,r,a)},t));else if("polyline"===h&&"orthogonal"===u&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,v=[],y=0;y<m.length;y++){var b=m[y].getLayout();v.push([b.x,b.y])}g||(g=n.__edge=new II({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:c,forkPosition:p}})),bh(g,{shape:{parentPoint:[a.x,a.y],childPoints:v}},t)}g&&("polyline"!==h||e.isExpand)&&(g.useStyle(j({strokeNoScale:!0,fill:null},f)),ch(g,l,"lineStyle"),Ul(g),s.add(g))}(o,a,u,i,f,p,g,n),i.__edge&&(i.onHoverStateChange=function(e){if("blur"!==e){var n=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);n&&n.hoverState===bl||Gl(i.__edge,e)}})}function LI(t,e,i,n,o){var r=RI(e.tree.root,t),a=r.source,s=r.sourceLayout,l=e.getItemGraphicEl(t.dataIndex);if(l){var h=e.getItemGraphicEl(a.dataIndex).__edge,u=l.__edge||(!1===a.isExpand||1===a.children.length?h:void 0),c=n.get("edgeShape"),d=n.get("layout"),p=n.get("orient"),f=n.get(["lineStyle","curveness"]);u&&("curve"===c?_h(u,{shape:OI(d,p,f,s,s),style:{opacity:0}},n,{cb:function(){i.remove(u)},removeOpt:o}):"polyline"===c&&"orthogonal"===n.get("layout")&&_h(u,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},n,{cb:function(){i.remove(u)},removeOpt:o}))}}function RI(t,e){for(var i,n=e.parentNode===t?e:e.parentNode||e;null==(i=n.getLayout());)n=n.parentNode===t?n:n.parentNode||n;return{source:n,sourceLayout:i}}function PI(t,e,i,n,o){var r=t.tree.getNodeByDataIndex(e),a=RI(t.tree.root,r).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};_h(i,{x:a.x+1,y:a.y+1},o,{cb:function(){n.remove(i),t.setItemGraphicEl(e,null)},removeOpt:s}),i.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),r.children.forEach((function(e){LI(e,t,n,o,s)})),LI(r,t,n,o,s)}function OI(t,e,i,n,o){var r,a,s,l,h,u,c,d;if("radial"===t){h=n.rawX,c=n.rawY,u=o.rawX,d=o.rawY;var p=wI(h,c),f=wI(h,c+(d-c)*i),g=wI(u,d+(c-d)*i),m=wI(u,d);return{x1:p.x||0,y1:p.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return h=n.x,c=n.y,u=o.x,d=o.y,"LR"!==e&&"RL"!==e||(r=h+(u-h)*i,a=c,s=u+(h-u)*i,l=d),"TB"!==e&&"BT"!==e||(r=h,a=c+(d-c)*i,s=u,l=d+(c-d)*i),{x1:h,y1:c,x2:u,y2:d,cpx1:r,cpy1:a,cpx2:s,cpy2:l}}const zI=DI;var NI=Br();function BI(t,e){if(NI(this).mainData===this){var i=U({},NI(this).datas);i[this.dataType]=e,WI(e,i,t)}else UI(e,this.dataType,NI(this).mainData,t);return e}function FI(t,e){return t.struct&&t.struct.update(),e}function VI(t,e){return q(NI(e).datas,(function(i,n){i!==e&&UI(i.cloneShallow(),n,e,t)})),e}function HI(t){var e=NI(this).mainData;return null==t||null==e?e:NI(e).datas[t]}function GI(){var t=NI(this).mainData;return null==t?[{data:t}]:K(Q(NI(t).datas),(function(e){return{type:e,data:NI(t).datas[e]}}))}function WI(t,e,i){NI(t).datas={},q(e,(function(e,n){UI(e,n,t,i)}))}function UI(t,e,i,n){NI(i).datas[e]=t,NI(t).mainData=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=HI,t.getLinkedDataAll=GI}const jI=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,WI(e,i,t),q(i,(function(i){q(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,et(BI,t))}))})),e.wrapMethod("cloneShallow",et(VI,t)),q(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,et(FI,t))})),yt(i[e.dataType]===e)};var XI=function(){function t(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,e,i){nt(t)&&(i=e,e=t,t=null),ot(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",r=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var a=0;!n&&a<r.length;a++)r[a].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},t.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},t.prototype.contains=function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},t.prototype.getAncestors=function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},t.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode((function(e){t.push(e.dataIndex)})),t},t.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),YI=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,i){this.root.eachNode(t,e,i)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,i,n){var o=new t(i),r=[],a=1;!function t(e,i){var n=e.value;a=Math.max(a,it(n)?n.length:1),r.push(e);var s=new XI(Pr(e.name,""),o);i?function(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}(s,i):o.root=s,o._nodes.push(s);var l=e.children;if(l)for(var h=0;h<l.length;h++)t(l[h],s)}(e),o.root.updateDepthAndHeight(0);var s=Zw(r,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new Yw(s,i);return l.initData(r),n&&n(l),jI({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},t}();const ZI=YI;function qI(t,e,i){if(t&&X(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if(ot(o)&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var r=t.targetNodeId;if(null!=r&&(o=n.getNodeById(r)))return{node:o}}}function KI(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function $I(t,e){return X(KI(t),e)>=0}function JI(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}var QI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return m(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n=new eu(i,this,this.ecModel),o=ZI.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e);return i&&i.children.length&&i.isExpand||(t.parentModel=n),t}))})),r=0;o.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,i){for(var n=this.getData().tree,o=n.root.children[0],r=n.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return Rp("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=JI(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(of);const tD=QI;function eD(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var r=o.length-1;r>=0;r--)n.push(o[r])}}function iD(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var i=function(t,e){return ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,r=0,a=null;"radial"===n?(o=2*Math.PI,r=Math.min(i.height,i.width)/2,a=xI((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=i.width,r=i.height,a=xI());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var i,n,o=[e];i=o.pop();)if(n=i.children,i.isExpand&&n.length)for(var r=n.length-1;r>=0;r--){var a=n[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,i){for(var n,o=[t],r=[];n=o.pop();)if(r.push(n),n.isExpand){var a=n.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;n=r.pop();)e(n,i)}(l,yI,a),s.hierNode.modifier=-l.hierNode.prelim,eD(l,bI);var h=l,u=l,c=l;eD(l,(function(t){var e=t.getLayout().x;e<h.getLayout().x&&(h=t),e>u.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)}));var d=h===u?1:a(h,u)/2,p=d-h.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===n)f=o/(u.getLayout().x+d+p),g=r/(c.depth-1||1),eD(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=wI(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=r/(u.getLayout().x+d+p),f=o/(c.depth-1||1),eD(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:o-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=o/(u.getLayout().x+d+p),g=r/(c.depth-1||1),eD(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:r-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function nD(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var i=t.getModel().getModel("itemStyle").getItemStyle();U(e.ensureUniqueItemVisual(t.dataIndex,"style"),i)}))}))}var oD=["treemapZoomToNode","treemapRender","treemapMove"];function rD(t){var e=t.getData().tree,i={};e.eachNode((function(e){for(var n=e;n&&n.depth>1;)n=n.parentNode;var o=Nc(t.ecModel,n.name||n.dataIndex+"",i);e.setVisual("decal",o)}))}function aD(t){var e=0;q(t.children,(function(t){aD(t);var i=t.value;it(i)&&(i=i[0]),e+=i}));var i=t.value;it(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),it(t.value)?t.value[0]=i:t.value=i}const sD=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.preventUsingHoverLayer=!0,i}return m(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};aD(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},r=new eu({itemStyle:o},this,e);n=t.levels=function(t,e){var i,n,o=Tr(e.get("color")),r=Tr(e.get(["aria","decal","decals"]));if(o){q(t=t||[],(function(t){var e=new eu(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(i=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(n=!0)}));var a=t[0]||(t[0]={});return i||(a.color=o.slice()),!n&&r&&(a.decal=r.slice()),t}}(n,e);var a=K(n||[],(function(t){return new eu(t,r,e)}),this),s=ZI.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=s.getNodeByDataIndex(e),n=i?a[i.depth]:null;return t.parentModel=n||r,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.getRawValue(t);return Rp("nameValue",{name:n.getName(t),value:o})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=JI(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Tt(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){rD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(of);var lD=function(){function t(t){this.group=new qo,t.add(this.group)}return t.prototype.render=function(t,e,i,n){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&i){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),h=s.getModel(["itemStyle","textStyle"]),u={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,u,l),this._renderContent(t,u,a,s,l,h,n),nc(r,u.pos,u.box)}},t.prototype._prepare=function(t,e,i){for(var n=t;n;n=n.parentNode){var o=Pr(n.getModel().get("name"),""),r=i.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:n,text:o,width:a})}},t.prototype._renderContent=function(t,e,i,n,o,r,a){for(var s,l,h,u,c,d,p,f,g,m=0,v=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),b=(s=e.pos,u=(l=e.box).width,c=l.height,d=nr(s.left,u),p=nr(s.top,c),f=nr(s.right,u),g=nr(s.bottom,c),(isNaN(d)||isNaN(parseFloat(s.left)))&&(d=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=u),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=c),h=Uu(h||0),{width:Math.max(f-d-h[1]-h[3],0),height:Math.max(g-p-h[0]-h[2],0)}),x=e.totalWidth,w=e.renderList,_=n.getModel("itemStyle").getItemStyle(),C=w.length-1;C>=0;C--){var S=w[C],M=S.node,T=S.width,E=S.text;x>b.width&&(x-=T-v,T=v,E=null);var I=new eg({shape:{points:hD(m,0,T,y,C===w.length-1,0===C)},style:j(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new cl({style:Ah(o,{text:E})}),textConfig:{position:"inside"},z2:1e4*Cl,onclick:et(a,M)});I.disableLabelAnimation=!0,I.getTextContent().ensureState("emphasis").style=Ah(r,{text:E}),I.ensureState("emphasis").style=_,sh(I,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(I),uD(I,t,M),m+=T+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function hD(t,e,i,n,o,r){var a=[[o?t:t-5,e],[t+i,e],[t+i,e+n],[o?t:t-5,e+n]];return!r&&a.splice(2,0,[t+i+5,e+n/2]),!o&&a.push([t,e+n/2]),a}function uD(t,e,i){dl(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&JI(i,e)}}const cD=lD;var dD=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,i,n,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:i,delay:n,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,i=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,o=this._storage.length;n<o;n++){var r=this._storage[n];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:i,aborted:i})}return this},t}(),pD=qo,fD=qs,gD="label",mD="upperLabel",vD=10*Cl,yD=2*Cl,bD=3*Cl,xD=oa([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),wD=function(t){var e=xD(t);return e.stroke=e.fill=e.lineWidth=null,e},_D=Br(),CD=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._state="ready",i._storage={nodeGroup:[],background:[],content:[]},i}return m(e,t),e.prototype.render=function(t,e,i,n){if(!(X(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=qI(n,["treemapZoomToNode","treemapRootToNode"],t),r=n&&n.type,a=t.layoutInfo,s=!this._oldTree,l=this._storage,h="treemapRootToNode"===r&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,u=this._giveContainerGroup(a),c=t.get("animation"),d=this._doRender(u,t,h);!c||s||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?d.renderFinally():this._doAnimation(u,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new pD,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,i){var n=e.getData().tree,o=this._oldTree,r={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function h(t,n,o,h){return function(t,e,i,n,o,r,a,s,l,h){if(a){var u=a.getLayout(),c=t.getData(),d=a.getModel();if(c.setItemGraphicEl(a.dataIndex,null),u&&u.isInView){var p=u.width,f=u.height,g=u.borderWidth,m=u.invisible,v=a.getRawIndex(),y=s&&s.getRawIndex(),b=a.viewChildren,x=u.upperHeight,w=b&&b.length,_=d.getModel("itemStyle"),C=d.getModel(["emphasis","itemStyle"]),S=d.getModel(["blur","itemStyle"]),M=d.getModel(["select","itemStyle"]),T=_.get("borderRadius")||0,E=B("nodeGroup",pD);if(E){if(l.add(E),E.x=u.x||0,E.y=u.y||0,E.markRedraw(),_D(E).nodeWidth=p,_D(E).nodeHeight=f,u.isAboveViewRoot)return E;var I=B("background",fD,h,yD);I&&function(e,i,n){var o=dl(i);if(o.dataIndex=a.dataIndex,o.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:p,height:f,r:T}),m)O(i);else{i.invisible=!1;var r=a.getVisual("style"),s=r.stroke,l=wD(_);l.fill=s;var h=xD(C);h.fill=C.get("borderColor");var u=xD(S);u.fill=S.get("borderColor");var c=xD(M);if(c.fill=M.get("borderColor"),n){var d=p-2*g;z(i,s,r.opacity,{x:g,y:0,width:d,height:x})}else i.removeTextContent();i.setStyle(l),i.ensureState("emphasis").style=h,i.ensureState("blur").style=u,i.ensureState("select").style=c,Ul(i)}e.add(i)}(E,I,w&&u.upperLabelHeight);var D=d.getModel("emphasis"),k=D.get("focus"),A=D.get("blurScope"),L=D.get("disabled"),R="ancestor"===k?a.getAncestorsIndices():"descendant"===k?a.getDescendantIndices():k;if(w)ph(E)&&dh(E,!1),I&&(dh(I,!L),c.setItemGraphicEl(a.dataIndex,I),lh(I,R,A));else{var P=B("content",fD,h,bD);P&&function(e,i){var n=dl(i);n.dataIndex=a.dataIndex,n.seriesIndex=t.seriesIndex;var o=Math.max(p-2*g,0),r=Math.max(f-2*g,0);if(i.culling=!0,i.setShape({x:g,y:g,width:o,height:r,r:T}),m)O(i);else{i.invisible=!1;var s=a.getVisual("style"),l=s.fill,h=wD(_);h.fill=l,h.decal=s.decal;var u=xD(C),c=xD(S),d=xD(M);z(i,l,s.opacity,null),i.setStyle(h),i.ensureState("emphasis").style=u,i.ensureState("blur").style=c,i.ensureState("select").style=d,Ul(i)}e.add(i)}(E,P),I.disableMorphing=!0,I&&ph(I)&&dh(I,!1),dh(E,!L),c.setItemGraphicEl(a.dataIndex,E),lh(E,R,A)}return E}}}function O(t){!t.invisible&&r.push(t)}function z(e,i,n,o){var r=d.getModel(o?mD:gD),s=Pr(d.get("name"),null),l=r.getShallow("show");Dh(e,kh(d,o?mD:gD),{defaultText:l?s:null,inheritColor:i,defaultOpacity:n,labelFetcher:t,labelDataIndex:a.dataIndex});var h=e.getTextContent();if(h){var c=h.style,p=vt(c.padding||0);o&&(e.setTextConfig({layoutRect:o}),h.disableLabelLayout=!0),h.beforeUpdate=function(){var t=Math.max((o?o.width:e.shape.width)-p[1]-p[3],0),i=Math.max((o?o.height:e.shape.height)-p[0]-p[2],0);c.width===t&&c.height===i||h.setStyle({width:t,height:i})},c.truncateMinChar=2,c.lineOverflow="truncate",N(c,o,u);var f=h.getState("emphasis");N(f?f.style:null,o,u)}}function N(e,i,n){var o=e?e.text:null;if(!i&&n.isLeafRoot&&null!=o){var r=t.get("drillDownIcon",!0);e.text=r?r+" "+o:o}}function B(t,r,s,l){var h=null!=y&&i[t][y],u=o[t];return h?(i[t][y]=null,function(t,e){var i=t[v]={};e instanceof pD?(i.oldX=e.x,i.oldY=e.y):i.oldShape=U({},e.shape)}(u,h)):m||((h=new r)instanceof La&&(h.z2=function(t,e){return t*vD+e}(s,l)),function(t,e){var i=t[v]={},r=a.parentNode,s=e instanceof qo;if(r&&(!n||"drillDown"===n.direction)){var l=0,h=0,u=o.background[r.getRawIndex()];!n&&u&&u.oldShape&&(l=u.oldShape.width,h=u.oldShape.height),s?(i.oldX=0,i.oldY=h):i.oldShape={x:l,y:h,width:0,height:0}}i.fadein=!s}(u,h)),e[t][v]=h}}(e,a,s,i,r,l,t,n,o,h)}!function t(e,i,n,o,r){function a(t){return t.getId()}function s(a,s){var l=null!=a?e[a]:null,u=null!=s?i[s]:null,c=h(l,u,n,r);c&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,r+1)}o?(i=e,q(e,(function(t,e){!t.isRemoved()&&s(e,e)}))):new _w(i,e,a,a).add(s).update(s).remove(et(s,null)).execute()}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&q(t,(function(t,i){var n=e[i];q(t,(function(t){t&&(n.push(t),_D(t).willDelete=!0)}))})),e}(s);return this._oldTree=n,this._storage=a,{lastsForAnimation:r,willDeleteEls:u,renderFinally:function(){q(u,(function(t){q(t,(function(t){t.parent&&t.parent.remove(t)}))})),q(l,(function(t){t.invisible=!0,t.dirty()}))}}},e.prototype._doAnimation=function(t,e,i,n){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),a=(nt(o)?0:o)||0,s=(nt(r)?null:r)||"cubicOut",l=new dD;q(e.willDeleteEls,(function(t,e){q(t,(function(t,i){if(!t.invisible){var o,r=t.parent,h=_D(r);if(n&&"drillDown"===n.direction)o=r===n.rootNodeGroup?{shape:{x:0,y:0,width:h.nodeWidth,height:h.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;h.willDelete||(u=h.nodeWidth/2,c=h.nodeHeight/2),o="nodeGroup"===e?{x:u,y:c,style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}o&&l.add(t,o,a,0,s)}}))})),q(this._storage,(function(t,i){q(t,(function(t,n){var o=e.lastsForAnimation[i][n],r={};o&&(t instanceof qo?null!=o.oldX&&(r.x=t.x,r.y=t.y,t.x=o.oldX,t.y=o.oldY):(o.oldShape&&(r.shape=U({},t.shape),t.setShape(o.oldShape)),o.fadein?(t.setStyle("opacity",0),r.style={opacity:1}):1!==t.style.opacity&&(r.style={opacity:1})),l.add(t,r,a,0,s))}))}),this),this._state="animating",l.finished(tt((function(){this._state="ready",e.renderFinally()}),this)).start()},e.prototype._resetController=function(t){var e=this._controller;e||((e=this._controller=new LT(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",tt(this._onPan,this)),e.on("zoom",tt(this._onZoom,this)));var i=new Ge(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var r=new Ge(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Ee(s,s,[-(e-=a.x),-(i-=a.y)]),De(s,s,[t.scale,t.scale]),Ee(s,s,[e,i]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var i=e.seriesModel.get("nodeClick",!0);if(i){var n=e.findTarget(t.offsetX,t.offsetY);if(n){var o=n.node;if(o.getLayout().isLeafRoot)e._rootToNode(n);else if("zoomToNode"===i)e._zoomToNode(n);else if("link"===i){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&Ku(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,i){var n=this;i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new cD(this.group))).render(t,e,i.node,(function(e){"animating"!==n._state&&($I(t.getViewRoot(),e)?n._rootToNode({node:e}):n._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var o=this._storage.background[n.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i},e.type="treemap",e}(gm);const SD=CD;var MD=q,TD=st,ED=-1,ID=function(){function t(e){var i=e.mappingMethod,n=e.type,o=this.option=H(e);this.type=n,this.mappingMethod=i,this._normalizeData=BD[i];var r=t.visualHandlers[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._normalizedToVisual=r._normalizedToVisual[i],"piecewise"===i?(DD(o),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,q(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(o)):"category"===i?o.categories?function(t){var e=t.categories,i=t.categoryMap={},n=t.visual;if(MD(e,(function(t,e){i[t]=e})),!it(n)){var o=[];st(n)?MD(n,(function(t,e){var n=i[e];o[null!=n?n:ED]=t})):o[ED]=n,n=ND(t,o)}for(var r=e.length-1;r>=0;r--)null==n[r]&&(delete i[e[r]],e.pop())}(o):DD(o,!0):(yt("linear"!==i||o.dataExtent),DD(o))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return tt(this._normalizeData,this)},t.listVisualTypes=function(){return Q(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,i){st(t)?q(t,e,i):e.call(i,t)},t.mapVisual=function(e,i,n){var o,r=it(e)?[]:st(e)?{}:(o=!0,null);return t.eachVisual(e,(function(t,e){var a=i.call(n,t,e);o?r=a:r[e]=a})),r},t.retrieveVisuals=function(e){var i,n={};return e&&MD(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(n[o]=e[o],i=!0)})),i?n:null},t.prepareVisualTypes=function(t){if(it(t))t=t.slice();else{if(!TD(t))return[];var e=[];MD(t,(function(t,i){e.push(i)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,i){for(var n,o=1/0,r=0,a=e.length;r<a;r++){var s=e[r].value;if(null!=s){if(s===t||ot(s)&&s===t+"")return r;i&&c(s,r)}}for(r=0,a=e.length;r<a;r++){var l=e[r],h=l.interval,u=l.close;if(h){if(h[0]===-1/0){if(FD(u[1],t,h[1]))return r}else if(h[1]===1/0){if(FD(u[0],h[0],t))return r}else if(FD(u[0],h[0],t)&&FD(u[1],t,h[1]))return r;i&&c(h[0],r),i&&c(h[1],r)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function c(e,i){var r=Math.abs(e-t);r<o&&(o=r,n=i)}},t.visualHandlers={color:{applyVisual:LD("color"),getColorMapper:function(){var t=this.option;return tt("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),RD.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizeData(e)),n=hn(e,t.parsedVisual,n),o?n:pn(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return pn(hn(t,this.option.parsedVisual),"rgba")},category:RD,piecewise:function(t,e){var i=zD.call(this,e);return null==i&&(i=pn(hn(t,this.option.parsedVisual),"rgba")),i},fixed:PD}},colorHue:kD((function(t,e){return cn(t,e)})),colorSaturation:kD((function(t,e){return cn(t,null,e)})),colorLightness:kD((function(t,e){return cn(t,null,null,e)})),colorAlpha:kD((function(t,e){return dn(t,e)})),decal:{applyVisual:LD("decal"),_normalizedToVisual:{linear:null,category:RD,piecewise:null,fixed:null}},opacity:{applyVisual:LD("opacity"),_normalizedToVisual:OD([0,1])},liftZ:{applyVisual:LD("liftZ"),_normalizedToVisual:{linear:PD,category:PD,piecewise:PD,fixed:PD}},symbol:{applyVisual:function(t,e,i){i("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:AD,category:RD,piecewise:function(t,e){var i=zD.call(this,e);return null==i&&(i=AD.call(this,t)),i},fixed:PD}},symbolSize:{applyVisual:LD("symbolSize"),_normalizedToVisual:OD([0,1])}},t}();function DD(t,e){var i=t.visual,n=[];st(i)?MD(i,(function(t){n.push(t)})):null!=i&&n.push(i),e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),ND(t,n)}function kD(t){return{applyVisual:function(e,i,n){var o=this.mapValueToVisual(e);n("color",t(i("color"),o))},_normalizedToVisual:OD([0,1])}}function AD(t){var e=this.option.visual;return e[Math.round(ir(t,[0,1],[0,e.length-1],!0))]||{}}function LD(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function RD(t){var e=this.option.visual;return e[this.option.loop&&t!==ED?t%e.length:t]}function PD(){return this.option.visual[0]}function OD(t){return{linear:function(e){return ir(e,t,this.option.visual,!0)},category:RD,piecewise:function(e,i){var n=zD.call(this,i);return null==n&&(n=ir(e,t,this.option.visual,!0)),n},fixed:PD}}function zD(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[ID.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function ND(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=K(e,(function(t){return an(t)||[0,0,0,1]}))),e}var BD={linear:function(t){return ir(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=ID.findPieceIndex(t,e,!0);if(null!=i)return ir(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?ED:e},fixed:At};function FD(t,e,i){return t?e<=i:e<i}const VD=ID;var HD=Br();const GD={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||WD(e,{},t.getViewRoot().getAncestors(),t)}};function WD(t,e,i,n){var o=t.getModel(),r=t.getLayout(),a=t.hostTree.data;if(r&&!r.invisible&&r.isInView){var s,l=o.getModel("itemStyle"),h=function(t,e,i){var n=U({},e),o=i.designatedVisualItemStyle;return q(["color","colorAlpha","colorSaturation"],(function(i){o[i]=e[i];var r=t.get(i);o[i]=null,null!=r&&(n[i]=r)})),n}(l,e,n),u=a.ensureUniqueItemVisual(t.dataIndex,"style"),c=l.get("borderColor"),d=l.get("borderColorSaturation");null!=d&&(c=function(t,e){return null!=e?cn(e,null,null,t):null}(d,s=UD(h))),u.stroke=c;var p=t.viewChildren;if(p&&p.length){var f=function(t,e,i,n,o,r){if(r&&r.length){var a=XD(e,"color")||null!=o.color&&"none"!==o.color&&(XD(e,"colorAlpha")||XD(e,"colorSaturation"));if(a){var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&s<h[0]&&(h[0]=s),null!=l&&l>h[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:a.name,dataExtent:h,visual:a.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new VD(c);return HD(d).drColorMappingBy=u,d}}}(0,o,r,0,h,p);q(p,(function(t,e){if(t.depth>=i.length||t===i[t.depth]){var r=function(t,e,i,n,o,r){var a=U({},e);if(o){var s=o.type,l="color"===s&&HD(o).drColorMappingBy,h="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(h)}return a}(o,h,t,e,f,n);WD(t,r,i,n)}}))}else s=UD(h),u.fill=s}}function UD(t){var e=jD(t,"color");if(e){var i=jD(t,"colorAlpha"),n=jD(t,"colorSaturation");return n&&(e=cn(e,null,null,n)),i&&(e=dn(e,i)),e}}function jD(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function XD(t,e){var i=t.get(e);return it(i)&&i.length?{name:e,range:i}:null}var YD=Math.max,ZD=Math.min,qD=pt,KD=q,$D=["itemStyle","borderWidth"],JD=["itemStyle","gapWidth"],QD=["upperLabel","show"],tk=["upperLabel","height"];const ek={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),r=i.getHeight(),a=t.option,s=ic(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=a.size||[],h=nr(qD(s.width,l[0]),o),u=nr(qD(s.height,l[1]),r),c=n&&n.type,d=qI(n,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===c||"treemapMove"===c?n.rootRect:null,f=t.getViewRoot(),g=KI(f);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var r,a=(e||{}).node,s=[n,o];if(!a||a===i)return s;for(var l=n*o,h=l*t.option.zoomToNodeRatio;r=a.parentNode;){for(var u=0,c=r.children,d=0,p=c.length;d<p;d++)u+=c[d].getValue();var f=a.getValue();if(0===f)return s;h*=u/f;var g=r.getModel(),m=g.get($D);(h+=4*m*m+(3*m+Math.max(m,ak(g)))*Math.pow(h,.5))>hr&&(h=hr),a=r}h<l&&(h=l);var v=Math.pow(h/l,.5);return[n*v,o*v]}(t,d,f,h,u):p?[p.width,p.height]:[h,u],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(b),ik(f,y,!1,0),b=f.getLayout(),KD(g,(function(t,e){var i=(g[e+1]||f).getValue();t.setLayout(U({dataExtent:[i,i],borderWidth:0,upperHeight:0},b))}))}var x=t.getData().tree.root;x.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,r=o.getLayout();if(!r)return n;for(var a=[r.width/2,r.height/2],s=o;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(s,p,d),!0),t.setLayoutInfo(s),rk(x,new Ge(-s.x,-s.y,o,r),g,f,0)}};function ik(t,e,i,n){var o,r;if(!t.isRemoved()){var a=t.getLayout();o=a.width,r=a.height;var s=t.getModel(),l=s.get($D),h=s.get(JD)/2,u=ak(s),c=Math.max(l,u),d=l-h,p=c-h;t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:u},!0);var f=(o=YD(o-2*d,0))*(r=YD(r-d-p,0)),g=function(t,e,i,n,o,r){var a=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=r;if(o&&!l)return t.viewChildren=[];a=J(a,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(a,s);var h=function(t,e,i){for(var n=0,o=0,r=e.length;o<r;o++)n+=e[o].getValue();var a,s=t.get("visualDimension");return e&&e.length?"value"===s&&i?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse()):(a=[1/0,-1/0],KD(e,(function(t){var e=t.getValue(s);e<a[0]&&(a[0]=e),e>a[1]&&(a[1]=e)}))):a=[NaN,NaN],{sum:n,dataExtent:a}}(e,a,s);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,o){if(!n)return i;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var h=o["asc"===n?a-l-1:l].getValue();h/i*e<r&&(s=l,i-=h)}return"asc"===n?o.splice(0,a-s):o.splice(s,a-s),i}(e,i,h.sum,s,a),0===h.sum)return t.viewChildren=[];for(var u=0,c=a.length;u<c;u++){var d=a[u].getValue()/h.sum*i;a[u].setLayout({area:d})}return l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:h.dataExtent},!0),a}(t,s,f,e,i,n);if(g.length){var m={x:d,y:p,width:o,height:r},v=ZD(o,r),y=1/0,b=[];b.area=0;for(var x=0,w=g.length;x<w;){var _=g[x];b.push(_),b.area+=_.getLayout().area;var C=nk(b,v,e.squareRatio);C<=y?(x++,y=C):(b.area-=b.pop().getLayout().area,ok(b,v,m,h,!1),v=ZD(m.width,m.height),b.length=b.area=0,y=1/0)}if(b.length&&ok(b,v,m,h,!0),!i){var S=s.get("childrenVisibleMin");null!=S&&f<S&&(i=!0)}for(x=0,w=g.length;x<w;x++)ik(g[x],e,i,n+1)}}}function nk(t,e,i){for(var n=0,o=1/0,r=0,a=void 0,s=t.length;r<s;r++)(a=t[r].getLayout().area)&&(a<o&&(o=a),a>n&&(n=a));var l=t.area*t.area,h=e*e*i;return l?YD(h*n/l,l/(h*o)):1/0}function ok(t,e,i,n,o){var r=e===i.width?0:1,a=1-r,s=["x","y"],l=["width","height"],h=i[s[r]],u=e?t.area/e:0;(o||u>i[l[a]])&&(u=i[l[a]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],f={},g=u?p.getLayout().area/u:0,m=f[l[a]]=YD(u-2*n,0),v=i[s[r]]+i[l[r]]-h,y=c===d-1||v<g?v:g,b=f[l[r]]=YD(y-2*n,0);f[s[a]]=i[s[a]]+ZD(n,m/2),f[s[r]]=h+ZD(n,b/2),h+=y,p.setLayout(f,!0)}i[s[a]]+=u,i[l[a]]-=u}function rk(t,e,i,n,o){var r=t.getLayout(),a=i[o],s=a&&a===t;if(!(a&&!s||o===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(r),isAboveViewRoot:s},!0);var l=new Ge(e.x-r.x,e.y-r.y,e.width,e.height);KD(t.viewChildren||[],(function(t){rk(t,l,i,n,o+1)}))}}function ak(t){return t.get(QD)?t.get(tk):0}function sk(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,o=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){at(i)&&(i=o[i]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(i))return!1}return!0}))}))}function lk(t){var e={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getData(),o={};i.each((function(n){var r=i.getName(n);o["ec-"+r]=n;var a=i.getItemModel(n),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),i.setItemVisual(n,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],h=0;h<l.length;h++){var u=a.getShallow(l[h],!0);null!=u&&i.setItemVisual(n,l[h],u)}})),i.count()&&n.each((function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){ot(e)&&(e=o["ec-"+e]);var r=i.getItemVisual(e,"style");U(n.ensureUniqueItemVisual(t,"style"),r);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)n.setItemVisual(t,a[s],i.getItemVisual(e,a[s]))}}))}))}function hk(t){return t instanceof Array||(t=[t,t]),t}function uk(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),i=t.getEdgeData(),n=hk(t.get("edgeSymbol")),o=hk(t.get("edgeSymbolSize"));i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",o&&o[0]),i.setVisual("toSymbolSize",o&&o[1]),i.setVisual("style",t.getModel("lineStyle").getLineStyle()),i.each((function(t){var n=i.getItemModel(t),o=e.getEdgeByIndex(t),r=hk(n.getShallow("symbol",!0)),a=hk(n.getShallow("symbolSize",!0)),s=n.getModel("lineStyle").getLineStyle(),l=i.ensureUniqueItemVisual(t,"style");switch(U(l,s),l.stroke){case"source":var h=o.node1.getVisual("style");l.stroke=h&&h.fill;break;case"target":h=o.node2.getVisual("style"),l.stroke=h&&h.fill}r[0]&&o.setVisual("fromSymbol",r[0]),r[1]&&o.setVisual("toSymbol",r[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])}))}))}var ck="--\x3e",dk=function(t){return t.get("autoCurveness")||null},pk=function(t,e){var i=dk(t),n=20,o=[];if(at(i))n=i;else if(it(i))return void(t.__curvenessList=i);e>n&&(n=e);var r=n%2?n+2:n+3;o=[];for(var a=0;a<r;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=o},fk=function(t,e,i){var n=[t.id,t.dataIndex].join("."),o=[e.id,e.dataIndex].join(".");return[i.uid,n,o].join(ck)},gk=function(t){var e=t.split(ck);return[e[0],e[2],e[1]].join(ck)},mk=function(t,e){var i=fk(t.node1,t.node2,e);return e.__edgeMap[i]},vk=function(t,e){return yk(fk(t.node1,t.node2,e),e)+yk(fk(t.node2,t.node1,e),e)},yk=function(t,e){var i=e.__edgeMap;return i[t]?i[t].length:0};function bk(t,e,i,n){var o=dk(e),r=it(o);if(!o)return null;var a=mk(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===i){s=l;break}var h=vk(t,e);pk(e,h),t.lineStyle=t.lineStyle||{};var u=fk(t.node1,t.node2,e),c=e.__curvenessList,d=r||h%2?0:1;if(a.isForward)return c[d+s];var p=gk(u),f=yk(p,e),g=c[s+f+d];return n?r?o&&0===o[0]?(f+d)%2?g:-g:((f%2?0:1)+d)%2?g:-g:(f+d)%2?g:-g:c[s+f+d]}function xk(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),wk(i,t)}}function wk(t,e){t.eachEdge((function(t,i){var n=gt(t.getModel().get(["lineStyle","curveness"]),-bk(t,e,i,!0),0),o=Ot(t.node1.getLayout()),r=Ot(t.node2.getLayout()),a=[o,r];+n&&a.push([(o[0]+r[0])/2-(o[1]-r[1])*n,(o[1]+r[1])/2-(r[0]-o[0])*n]),t.setLayout(a)}))}function _k(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];q(i.dimensions,(function(t){o=o.concat(n.mapDimensionsAll(t))}));for(var r=0;r<n.count();r++){for(var a=[],s=!1,l=0;l<o.length;l++){var h=n.get(o[l],r);isNaN(h)||(s=!0),a.push(h)}s?n.setItemLayout(r,i.dataToPoint(a)):n.setItemLayout(r,[NaN,NaN])}wk(n.graph,t)}else e&&"none"!==e||xk(t)}))}function Ck(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scaleX;return((e.getZoom()-1)*i+1)/n}function Sk(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Mk=Math.PI,Tk=[];function Ek(t,e,i,n){var o=t.coordinateSystem;if(!o||"view"===o.type){var r=o.getBoundingRect(),a=t.getData(),s=a.graph,l=r.width/2+r.x,h=r.height/2+r.y,u=Math.min(r.width,r.height)/2,c=a.count();if(a.setLayout({cx:l,cy:h}),c){if(i){var d=o.pointToData(n),p=d[0],f=d[1],g=[p-l,f-h];Gt(g,g),Ht(g,g,u),i.setLayout([l+g[0],h+g[1]],!0),Dk(i,t.get(["circular","rotateLabel"]),l,h)}Ik[e](t,s,a,u,l,h,c),s.eachEdge((function(e,i){var n,o=gt(e.getModel().get(["lineStyle","curveness"]),bk(e,t,i),0),r=Ot(e.node1.getLayout()),a=Ot(e.node2.getLayout()),s=(r[0]+a[0])/2,u=(r[1]+a[1])/2;+o&&(n=[l*(o*=3)+s*(1-o),h*o+u*(1-o)]),e.setLayout([r,a,n])}))}}}var Ik={value:function(t,e,i,n,o,r,a){var s=0,l=i.getSum("value"),h=2*Math.PI/(l||a);e.eachNode((function(t){var e=t.getValue("value"),i=h*(l?e:1)/2;s+=i,t.setLayout([n*Math.cos(s)+o,n*Math.sin(s)+r]),s+=i}))},symbolSize:function(t,e,i,n,o,r,a){var s=0;Tk.length=a;var l=Ck(t);e.eachNode((function(t){var e=Sk(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=l;var i=Math.asin(e/2/n);isNaN(i)&&(i=Mk/2),Tk[t.dataIndex]=i,s+=2*i}));var h=(2*Mk-s)/a/2,u=0;e.eachNode((function(t){var e=h+Tk[t.dataIndex];u+=e,(!t.getLayout()||!t.getLayout().fixed)&&t.setLayout([n*Math.cos(u)+o,n*Math.sin(u)+r]),u+=e}))}};function Dk(t,e,i,n){var o=t.getGraphicEl();if(o){var r=t.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(e){var s=t.getLayout(),l=Math.atan2(s[1]-n,s[0]-i);l<0&&(l=2*Math.PI+l);var h=s[0]<i;h&&(l-=Math.PI);var u=h?"left":"right";a.setTextConfig({rotation:-l,position:u,origin:"center"});var c=a.ensureState("emphasis");U(c.textConfig||(c.textConfig={}),{position:u})}else a.setTextConfig({rotation:r*=Math.PI/180})}}function kk(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&Ek(t,"symbolSize")}))}var Ak=Bt;function Lk(t){t.eachSeriesByType("graph",(function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),o=n.data,r=n.edgeData,a=t.getModel("force"),s=a.get("initLayout");t.preservedPoints?o.each((function(t){var e=o.getId(t);o.setItemLayout(t,i[e]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&Ek(t,"value"):xk(t);var l=o.getDataExtent("value"),h=r.getDataExtent("value"),u=a.get("repulsion"),c=a.get("edgeLength"),d=it(u)?u:[u,u],p=it(c)?c:[c,c];p=[p[1],p[0]];var f=o.mapArray("value",(function(t,e){var i=o.getItemLayout(e),n=ir(t,l,d);return isNaN(n)&&(n=(d[0]+d[1])/2),{w:n,rep:n,fixed:o.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),g=r.mapArray("value",(function(e,i){var o=n.getEdgeByIndex(i),r=ir(e,h,p);isNaN(r)&&(r=(p[0]+p[1])/2);var a=o.getModel(),s=gt(o.getModel().get(["lineStyle","curveness"]),-bk(o,t,i,!0),0);return{n1:f[o.node1.dataIndex],n2:f[o.node2.dataIndex],d:r,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}})),m=e.getBoundingRect(),v=function(t,e,i){for(var n=t,o=e,r=i.rect,a=r.width,s=r.height,l=[r.x+a/2,r.y+s/2],h=null==i.gravity?.1:i.gravity,u=0;u<n.length;u++){var c=n[u];c.p||(c.p=Rt(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=Ot(c.p),c.edges=null}var d,p,f=null==i.friction?.6:i.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(t){n[t].fixed=!0},setUnfixed:function(t){n[t].fixed=!1},beforeStep:function(t){d=t},afterStep:function(t){p=t},step:function(t){d&&d(n,o);for(var e=[],i=n.length,r=0;r<o.length;r++){var a=o[r];if(!a.ignoreForceLayout){var s=a.n1;Ft(e,(m=a.n2).p,s.p);var u=Vt(e)-a.d,c=m.w/(s.w+m.w);isNaN(c)&&(c=0),Gt(e,e),!s.fixed&&Ak(s.p,s.p,e,c*u*g),!m.fixed&&Ak(m.p,m.p,e,-(1-c)*u*g)}}for(r=0;r<i;r++)(b=n[r]).fixed||(Ft(e,l,b.p),Ak(b.p,b.p,e,h*g));for(r=0;r<i;r++){s=n[r];for(var f=r+1;f<i;f++){var m;Ft(e,(m=n[f]).p,s.p),0===(u=Vt(e))&&(zt(e,Math.random()-.5,Math.random()-.5),u=1);var v=(s.rep+m.rep)/u/u;!s.fixed&&Ak(s.pp,s.pp,e,v),!m.fixed&&Ak(m.pp,m.pp,e,-v)}}var y=[];for(r=0;r<i;r++){var b;(b=n[r]).fixed||(Ft(y,b.p,b.pp),Ak(b.p,b.p,y,g),Pt(b.pp,b.p))}var x=(g*=.992)<.01;p&&p(n,o,x),t&&t(x)}}}(f,g,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});v.beforeStep((function(t,e){for(var i=0,o=t.length;i<o;i++)t[i].fixed&&Pt(t[i].p,n.getNodeByIndex(i).getLayout())})),v.afterStep((function(t,e,r){for(var a=0,s=t.length;a<s;a++)t[a].fixed||n.getNodeByIndex(a).setLayout(t[a].p),i[o.getId(a)]=t[a].p;for(a=0,s=e.length;a<s;a++){var l=e[a],h=n.getEdgeByIndex(a),u=l.n1.p,c=l.n2.p,d=h.getLayout();(d=d?d.slice():[])[0]=d[0]||[],d[1]=d[1]||[],Pt(d[0],u),Pt(d[1],c),+l.curveness&&(d[2]=[(u[0]+c[0])/2-(u[1]-c[1])*l.curveness,(u[1]+c[1])/2-(c[0]-u[0])*l.curveness]),h.setLayout(d)}})),t.forceLayout=v,t.preservedPoints=i,v.step()}else t.forceLayout=null}))}function Rk(t,e){var i=[];return t.eachSeriesByType("graph",(function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),r=[],a=[];Ha(o.mapArray((function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]})),r,a),a[0]-r[0]==0&&(a[0]+=1,r[0]-=1),a[1]-r[1]==0&&(a[1]+=1,r[1]-=1);var s=(a[0]-r[0])/(a[1]-r[1]),l=function(t,e,i){return ic(U(t.getBoxLayoutParams(),{aspect:i}),{width:e.getWidth(),height:e.getHeight()})}(t,e,s);isNaN(s)&&(r=[l.x,l.y],a=[l.x+l.width,l.y+l.height]);var h=a[0]-r[0],u=a[1]-r[1],c=l.width,d=l.height,p=t.coordinateSystem=new eI;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],h,u),p.setViewRect(l.x,l.y,c,d),p.setCenter(t.get("center"),e),p.setZoom(t.get("zoom")),i.push(p)}})),i}var Pk,Ok=lg.prototype,zk=pg.prototype,Nk=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function Bk(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}m((function(){return null!==Pk&&Pk.apply(this,arguments)||this}),Pk=Nk);const Fk=function(t){function e(e){var i=t.call(this,e)||this;return i.type="ec-line",i}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nk},e.prototype.buildPath=function(t,e){Bk(e)?Ok.buildPath.call(this,t,e):zk.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return Bk(this.shape)?Ok.pointAt.call(this,t):zk.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,i=Bk(e)?[e.x2-e.x1,e.y2-e.y1]:zk.tangentAt.call(this,t);return Gt(i,i)},e}(Ps);var Vk=["fromSymbol","toSymbol"];function Hk(t){return"_"+t+"Type"}function Gk(t,e,i){var n=e.getItemVisual(i,t);if(!n||"none"===n)return n;var o=e.getItemVisual(i,t+"Size"),r=e.getItemVisual(i,t+"Rotate"),a=e.getItemVisual(i,t+"Offset"),s=e.getItemVisual(i,t+"KeepAspect"),l=Tv(o);return n+l+Ev(a||0,l)+(r||"")+(s||"")}function Wk(t,e,i){var n=e.getItemVisual(i,t);if(n&&"none"!==n){var o=e.getItemVisual(i,t+"Size"),r=e.getItemVisual(i,t+"Rotate"),a=e.getItemVisual(i,t+"Offset"),s=e.getItemVisual(i,t+"KeepAspect"),l=Tv(o),h=Ev(a||0,l),u=Mv(n,-l[0]/2+h[0],-l[1]/2+h[1],l[0],l[1],null,s);return u.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,u.name=t,u}}function Uk(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}var jk=function(t){function e(e,i,n){var o=t.call(this)||this;return o._createLine(e,i,n),o}return m(e,t),e.prototype._createLine=function(t,e,i){var n=t.hostModel,o=function(t){var e=new Fk({name:"line",subPixelOptimize:!0});return Uk(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,xh(o,{shape:{percent:1}},n,e),this.add(o),q(Vk,(function(i){var n=Wk(i,t,e);this.add(n),this[Hk(i)]=Gk(i,t,e)}),this),this._updateCommonStl(t,e,i)},e.prototype.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=t.getItemLayout(e),a={shape:{}};Uk(a.shape,r),bh(o,a,n,e),q(Vk,(function(i){var n=Gk(i,t,e),o=Hk(i);if(this[o]!==n){this.remove(this.childOfName(i));var r=Wk(i,t,e);this.add(r)}this[o]=n}),this),this._updateCommonStl(t,e,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),r=i&&i.emphasisLineStyle,a=i&&i.blurLineStyle,s=i&&i.selectLineStyle,l=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,u=i&&i.focus,c=i&&i.blurScope;if(!i||t.hasItemOption){var d=t.getItemModel(e),p=d.getModel("emphasis");r=p.getModel("lineStyle").getLineStyle(),a=d.getModel(["blur","lineStyle"]).getLineStyle(),s=d.getModel(["select","lineStyle"]).getLineStyle(),h=p.get("disabled"),u=p.get("focus"),c=p.get("blurScope"),l=kh(d)}var f=t.getItemVisual(e,"style"),g=f.stroke;o.useStyle(f),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=r,o.ensureState("blur").style=a,o.ensureState("select").style=s,q(Vk,(function(t){var e=this.childOfName(t);if(e){e.setColor(g),e.style.opacity=f.opacity;for(var i=0;i<wl.length;i++){var n=wl[i],r=o.getState(n);if(r){var a=r.style||{},s=e.ensureState(n),l=s.style||(s.style={});null!=a.stroke&&(l[e.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}e.markRedraw()}}),this);var m=n.getRawValue(e);Dh(this,l,{labelDataIndex:e,labelFetcher:{getFormattedLabel:function(e,i){return n.getFormattedLabel(e,i,t.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?t.getName(e):isFinite(m)?or(m):m)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var b=y.get("distance");it(b)||(b=[b,b]),v.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),sh(this,u,c,h)},e.prototype.highlight=function(){Yl(this)},e.prototype.downplay=function(){Zl(this)},e.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},e.prototype.setLinePoints=function(t){var e=this.childOfName("line");Uk(e.shape,t),e.dirty()},e.prototype.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(e||i||n&&!n.ignore){for(var o=1,r=this.parent;r;)r.scaleX&&(o/=r.scaleX),r=r.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),u=Ft([],h,l);if(Gt(u,u),e&&(e.setPosition(l),C(e,0),e.scaleX=e.scaleY=o*s,e.markRedraw()),i&&(i.setPosition(h),C(i,1),i.scaleX=i.scaleY=o*s,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var c=void 0,d=void 0,p=n.__labelDistance,f=p[0]*o,g=p[1]*o,m=s/2,v=a.tangentAt(m),y=[v[1],-v[0]],b=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var w=-Math.atan2(v[1],v[0]);h[0]<l[0]&&(w=Math.PI+w),n.rotation=w}var _=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":_=-g,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":_=g,d="top";break;default:_=0,d="middle"}switch(n.__position){case"end":n.x=u[0]*f+h[0],n.y=u[1]*g+h[1],c=u[0]>.8?"left":u[0]<-.8?"right":"center",d=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*f+l[0],n.y=-u[1]*g+l[1],c=u[0]>.8?"right":u[0]<-.8?"left":"center",d=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=f*x+l[0],n.y=l[1]+_,c=v[0]<0?"right":"left",n.originX=-f*x,n.originY=-_;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=b[0],n.y=b[1]+_,c="center",n.originY=-_;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-f*x+h[0],n.y=h[1]+_,c=v[0]>=0?"right":"left",n.originX=f*x,n.originY=-_}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||c})}}}function C(t,e){var i=t.__specifiedRotation;if(null==i){var n=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))}else t.attr("rotation",i)}},e}(qo);const Xk=jk;function Yk(t){var e=t.hostModel,i=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:i.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:i.get("disabled"),blurScope:i.get("blurScope"),focus:i.get("focus"),labelStatesModels:kh(e)}}function Zk(t){return isNaN(t[0])||isNaN(t[1])}function qk(t){return t&&!Zk(t[0])&&!Zk(t[1])}const Kk=function(){function t(t){this.group=new qo,this._LineCtor=t||Xk}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,o=i._lineData;i._lineData=t,o||n.removeAll();var r=Yk(t);t.diff(o).add((function(i){e._doAdd(t,i,r)})).update((function(i,n){e._doUpdate(o,t,n,i,r)})).remove((function(t){n.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Yk(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function i(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var n=t.start;n<t.end;n++)if(qk(e.getItemLayout(n))){var o=new this._LineCtor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o),this._progressiveEls.push(o)}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,e,i){if(qk(t.getItemLayout(e))){var n=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,n),this.group.add(n)}},t.prototype._doUpdate=function(t,e,i,n,o){var r=t.getItemGraphicEl(i);qk(e.getItemLayout(n))?(r?r.updateData(e,n,o):r=new this._LineCtor(e,n,o),e.setItemGraphicEl(n,r),this.group.add(r)):this.group.remove(r)},t}();var $k=[],Jk=[],Qk=[],tA=Pi,eA=jt,iA=Math.abs;function nA(t,e,i){for(var n,o=t[0],r=t[1],a=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1)$k[0]=tA(o[0],r[0],a[0],u),$k[1]=tA(o[1],r[1],a[1],u),(p=iA(eA($k,e)-l))<s&&(s=p,n=u);for(var c=0;c<32;c++){var d=n+h;Jk[0]=tA(o[0],r[0],a[0],n),Jk[1]=tA(o[1],r[1],a[1],n),Qk[0]=tA(o[0],r[0],a[0],d),Qk[1]=tA(o[1],r[1],a[1],d);var p=eA(Jk,e)-l;if(iA(p)<.01)break;var f=eA(Qk,e)-l;h/=2,p<0?f>=0?n+=h:n-=h:f>=0?n-=h:n+=h}return n}function oA(t,e){var i=[],n=Ni,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),h=t.getVisual("fromSymbol"),u=t.getVisual("toSymbol");l.__original||(l.__original=[Ot(l[0]),Ot(l[1])],l[2]&&l.__original.push(Ot(l[2])));var c=l.__original;if(null!=l[2]){if(Pt(o[0],c[0]),Pt(o[1],c[2]),Pt(o[2],c[1]),h&&"none"!==h){var d=Sk(t.node1),p=nA(o,c[0],d*e);n(o[0][0],o[1][0],o[2][0],p,i),o[0][0]=i[3],o[1][0]=i[4],n(o[0][1],o[1][1],o[2][1],p,i),o[0][1]=i[3],o[1][1]=i[4]}u&&"none"!==u&&(d=Sk(t.node2),p=nA(o,c[1],d*e),n(o[0][0],o[1][0],o[2][0],p,i),o[1][0]=i[1],o[2][0]=i[2],n(o[0][1],o[1][1],o[2][1],p,i),o[1][1]=i[1],o[2][1]=i[2]),Pt(l[0],o[0]),Pt(l[1],o[2]),Pt(l[2],o[1])}else Pt(r[0],c[0]),Pt(r[1],c[1]),Ft(a,r[1],r[0]),Gt(a,a),h&&"none"!==h&&(d=Sk(t.node1),Bt(r[0],r[0],a,d*e)),u&&"none"!==u&&(d=Sk(t.node2),Bt(r[1],r[1],a,-d*e)),Pt(l[0],r[0]),Pt(l[1],r[1])}))}function rA(t){return"view"===t.type}var aA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(t,e){var i=new d_,n=new Kk,o=this.group;this._controller=new LT(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,e,i){var n=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(rA(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):bh(s,l,t)}oA(t.getGraph(),Ck(t));var h=t.getData();r.updateData(h);var u=t.getEdgeData();a.updateData(u),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,d);var p=t.get("layout");h.graph.eachNode((function(e){var i=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var a=r.get("draggable");a&&o.on("drag",(function(r){switch(p){case"force":c.warmUp(),!n._layouting&&n._startForceLayoutIteration(c,d),c.setFixed(i),h.setItemLayout(i,[o.x,o.y]);break;case"circular":h.setItemLayout(i,[o.x,o.y]),e.setLayout({fixed:!0},!0),Ek(t,"symbolSize",e,[r.offsetX,r.offsetY]),n.updateLayout(t);break;default:h.setItemLayout(i,[o.x,o.y]),wk(t.getGraph(),t),n.updateLayout(t)}})).on("dragend",(function(){c&&c.setUnfixed(i)})),o.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(dl(o).focus=e.getAdjacentDataIndices())}})),h.graph.eachEdge((function(t){var e=t.getGraphicEl(),i=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===i&&(dl(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode((function(t){Dk(t,f,g,m)})),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},e.prototype._updateController=function(t,e,i){var n=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!NT(e,i,t)})),rA(t.coordinateSystem)?(o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){RT(r,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){PT(r,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),n._updateNodeAndLinkScale(),oA(t.getGraph(),Ck(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()}))):o.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),i=Ck(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(i)}))},e.prototype.updateLayout=function(t){oA(t.getGraph(),Ck(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(gm);const sA=aA;function lA(t){return"_EC_"+t}var hA=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[lA(t)]){var n=new uA(t,e);return n.hostGraph=this,this.nodes.push(n),i[lA(t)]=n,n}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[lA(t)]},t.prototype.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if(at(t)&&(t=this.nodes[t]),at(e)&&(e=this.nodes[e]),t instanceof uA||(t=n[lA(t)]),e instanceof uA||(e=n[lA(e)]),t&&e){var r=t.id+"-"+e.id,a=new cA(t,e,i);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),o[r]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof uA&&(t=t.id),e instanceof uA&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&t.call(e,i[o],o)},t.prototype.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)i[o].dataIndex>=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},t.prototype.breadthFirstTraverse=function(t,e,i,n){if(e instanceof uA||(e=this._nodesMap[lA(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(n,e,null))for(var a=[e];a.length;){var s=a.shift(),l=s[o];for(r=0;r<l.length;r++){var h=l[r],u=h.node1===s?h.node2:h.node1;if(!u.__visited){if(t.call(n,u,s))return;a.push(u),u.__visited=!0}}}}},t.prototype.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(o=0,r=t.count();o<r;o++)i[t.getRawIndex(o)].dataIndex=o;for(e.filterSelf((function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0})),o=0,r=n.length;o<r;o++)n[o].dataIndex=-1;for(o=0,r=e.count();o<r;o++)n[e.getRawIndex(o)].dataIndex=o},t.prototype.clone=function(){for(var e=new t(this._directed),i=this.nodes,n=this.edges,o=0;o<i.length;o++)e.addNode(i[o].id,i[o].dataIndex);for(o=0;o<n.length;o++){var r=n[o];e.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return e},t}(),uA=function(){function t(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var i=this.edges[e];i.dataIndex<0||(t.edge.push(i.dataIndex),t.node.push(i.node1.dataIndex,i.node2.dataIndex))}return t},t.prototype.getTrajectoryDataIndices=function(){for(var t=Tt(),e=Tt(),i=0;i<this.edges.length;i++){var n=this.edges[i];if(!(n.dataIndex<0)){t.set(n.dataIndex,!0);for(var o=[n.node1],r=[n.node2],a=0;a<o.length;){var s=o[a];a++,e.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)t.set(s.inEdges[l].dataIndex,!0),o.push(s.inEdges[l].node1)}for(a=0;a<r.length;){var h=r[a];for(a++,e.set(h.dataIndex,!0),l=0;l<h.outEdges.length;l++)t.set(h.outEdges[l].dataIndex,!0),r.push(h.outEdges[l].node2)}}}return{edge:t.keys(),node:e.keys()}},t}(),cA=function(){function t(t,e,i){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var t=Tt(),e=Tt();t.set(this.dataIndex,!0);for(var i=[this.node1],n=[this.node2],o=0;o<i.length;){var r=i[o];o++,e.set(r.dataIndex,!0);for(var a=0;a<r.inEdges.length;a++)t.set(r.inEdges[a].dataIndex,!0),i.push(r.inEdges[a].node1)}for(o=0;o<n.length;){var s=n[o];for(o++,e.set(s.dataIndex,!0),a=0;a<s.outEdges.length;a++)t.set(s.outEdges[a].dataIndex,!0),n.push(s.outEdges[a].node2)}return{edge:t.keys(),node:e.keys()}},t}();function dA(t,e){return{getValue:function(i){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i){return this[t][e].getItemVisual(this.dataIndex,i)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Y(uA,dA("hostGraph","data")),Y(cA,dA("hostGraph","edgeData"));const pA=hA;function fA(t,e,i,n,o){for(var r=new pA(n),a=0;a<t.length;a++)r.addNode(pt(t[a].id,t[a].name,a),a);var s=[],l=[],h=0;for(a=0;a<e.length;a++){var u=e[a],c=u.source,d=u.target;r.addEdge(c,d,h)&&(l.push(u),s.push(pt(Pr(u.id,null),c+" > "+d)),h++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=e_(t,i);else{var g=qc.get(f),m=g&&g.dimensions||[];X(m,"value")<0&&m.concat(["value"]);var v=Zw(t,{coordDimensions:m,encodeDefine:i.getEncode()}).dimensions;(p=new Yw(v,i)).initData(t)}var y=new Yw(["value"],i);return y.initData(l,s),o&&o(p,y),jI({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}var gA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new GC(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Er(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var i,n=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&n){dk(i=this)&&(i.__curvenessList=[],i.__edgeMap={},pk(i));var a=fA(o,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var i=eu.prototype.getModel;function n(t,e){var n=i.call(this,t,e);return n.resolveParentPath=o,n}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=n,t}))}));return q(a.edges,(function(t){!function(t,e,i,n){if(dk(i)){var o=fk(t,e,i),r=i.__edgeMap,a=r[gk(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(n)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),r=n.graph.getEdgeByIndex(t),a=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Rp("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return jp({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=K(this.option.categories||[],(function(t){return null!=t.value?t:U({value:0},t)})),e=new Yw(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(of);const mA=gA;var vA={type:"graphRoam",event:"graphRoam",update:"none"},yA=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},bA=function(t){function e(e){var i=t.call(this,e)||this;return i.type="pointer",i}return m(e,t),e.prototype.getDefaultShape=function(){return new yA},e.prototype.buildPath=function(t,e){var i=Math.cos,n=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-i(a)*r*(r>=o/3?1:2),l=e.y-n(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*r,e.y+n(a)*r),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(a)*r,e.y-n(a)*r),t.lineTo(s,l)},e}(Ps);const xA=bA;function wA(t,e){var i=null==t?"":t+"";return e&&(ot(e)?i=e.replace("{value}",i):nt(e)&&(i=e(t))),i}var _A=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),r=Math.min(n,o);return{cx:nr(i[0],e.getWidth()),cy:nr(i[1],e.getHeight()),r:nr(t.get("radius"),r/2)}}(t,i);this._renderMain(t,e,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,i,n,o){var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),u=h.get("roundCap")?rC:Zf,c=h.get("show"),d=h.getModel("lineStyle"),p=d.get("width"),f=[s,l];cs(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=[],y=0;c&&y<n.length;y++){var b=new u({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(n[y][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-p,r:o.r},silent:!0});b.setStyle({fill:n[y][1]}),b.setStyle(d.getLineStyle(["color","width"])),v.push(b),m=l}v.reverse(),q(v,(function(t){return r.add(t)}));var x=function(t){if(t<=0)return n[0][1];var e;for(e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};this._renderTicks(t,e,i,x,o,s,l,a,p),this._renderTitleAndDetail(t,e,i,x,o),this._renderAnchor(t,o),this._renderPointer(t,e,i,x,o,s,l,a,p)},e.prototype._renderTicks=function(t,e,i,n,o,r,a,s,l){for(var h,u,c=this.group,d=o.cx,p=o.cy,f=o.r,g=+t.get("min"),m=+t.get("max"),v=t.getModel("splitLine"),y=t.getModel("axisTick"),b=t.getModel("axisLabel"),x=t.get("splitNumber"),w=y.get("splitNumber"),_=nr(v.get("length"),f),C=nr(y.get("length"),f),S=r,M=(a-r)/x,T=M/w,E=v.getModel("lineStyle").getLineStyle(),I=y.getModel("lineStyle").getLineStyle(),D=v.get("distance"),k=0;k<=x;k++){if(h=Math.cos(S),u=Math.sin(S),v.get("show")){var A=new lg({shape:{x1:h*(f-(L=D?D+l:l))+d,y1:u*(f-L)+p,x2:h*(f-_-L)+d,y2:u*(f-_-L)+p},style:E,silent:!0});"auto"===E.stroke&&A.setStyle({stroke:n(k/x)}),c.add(A)}if(b.get("show")){var L=b.get("distance")+D,R=wA(or(k/x*(m-g)+g),b.get("formatter")),P=n(k/x),O=h*(f-_-L)+d,z=u*(f-_-L)+p,N=b.get("rotate"),B=0;"radial"===N?(B=-S+2*Math.PI)>Math.PI/2&&(B+=Math.PI):"tangential"===N?B=-S-Math.PI/2:at(N)&&(B=N*Math.PI/180),0===B?c.add(new cl({style:Ah(b,{text:R,x:O,y:z,verticalAlign:u<-.8?"top":u>.8?"bottom":"middle",align:h<-.4?"left":h>.4?"right":"center"},{inheritColor:P}),silent:!0})):c.add(new cl({style:Ah(b,{text:R,x:O,y:z,verticalAlign:"middle",align:"center"},{inheritColor:P}),silent:!0,originX:O,originY:z,rotation:B}))}if(y.get("show")&&k!==x){L=(L=y.get("distance"))?L+l:l;for(var F=0;F<=w;F++){h=Math.cos(S),u=Math.sin(S);var V=new lg({shape:{x1:h*(f-L)+d,y1:u*(f-L)+p,x2:h*(f-C-L)+d,y2:u*(f-C-L)+p},silent:!0,style:I});"auto"===I.stroke&&V.setStyle({stroke:n((k+F/w)/x)}),c.add(V),S+=T}S-=T}else S+=M}},e.prototype._renderPointer=function(t,e,i,n,o,r,a,s,l){var h=this.group,u=this._data,c=this._progressEls,d=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),m=t.getData(),v=m.mapDimension("value"),y=+t.get("min"),b=+t.get("max"),x=[y,b],w=[r,a];function _(e,i){var n,r=m.getItemModel(e).getModel("pointer"),a=nr(r.get("width"),o.r),s=nr(r.get("length"),o.r),l=t.get(["pointer","icon"]),h=r.get("offsetCenter"),u=nr(h[0],o.r),c=nr(h[1],o.r),d=r.get("keepAspect");return(n=l?Mv(l,u-a/2,c-s,a,s,null,d):new xA({shape:{angle:-Math.PI/2,width:a,r:s,x:u,y:c}})).rotation=-(i+Math.PI/2),n.x=o.cx,n.y=o.cy,n}function C(t,e){var i=f.get("roundCap")?rC:Zf,n=f.get("overlap"),a=n?f.get("width"):l/m.count(),h=n?o.r-a:o.r-(t+1)*a,u=n?o.r:o.r-t*a,c=new i({shape:{startAngle:r,endAngle:e,cx:o.cx,cy:o.cy,clockwise:s,r0:h,r:u}});return n&&(c.z2=b-m.get(v,t)%b),c}(g||p)&&(m.diff(u).add((function(e){var i=m.get(v,e);if(p){var n=_(e,r);xh(n,{rotation:-((isNaN(+i)?w[0]:ir(i,x,w,!0))+Math.PI/2)},t),h.add(n),m.setItemGraphicEl(e,n)}if(g){var o=C(e,r),a=f.get("clip");xh(o,{shape:{endAngle:ir(i,x,w,a)}},t),h.add(o),pl(t.seriesIndex,m.dataType,e,o),d[e]=o}})).update((function(e,i){var n=m.get(v,e);if(p){var o=u.getItemGraphicEl(i),a=o?o.rotation:r,s=_(e,a);s.rotation=a,bh(s,{rotation:-((isNaN(+n)?w[0]:ir(n,x,w,!0))+Math.PI/2)},t),h.add(s),m.setItemGraphicEl(e,s)}if(g){var l=c[i],y=C(e,l?l.shape.endAngle:r),b=f.get("clip");bh(y,{shape:{endAngle:ir(n,x,w,b)}},t),h.add(y),pl(t.seriesIndex,m.dataType,e,y),d[e]=y}})).execute(),m.each((function(t){var e=m.getItemModel(t),i=e.getModel("emphasis"),o=i.get("focus"),r=i.get("blurScope"),a=i.get("disabled");if(p){var s=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),h=l.fill;if(s instanceof Hs){var u=s.style;s.useStyle(U({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(h);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",n(ir(m.get(v,t),x,[0,1],!0))),s.z2EmphasisLift=0,ch(s,e),sh(s,o,r,a)}if(g){var c=d[t];c.useStyle(m.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,ch(c,e),sh(c,o,r,a)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var i=t.getModel("anchor");if(i.get("show")){var n=i.get("size"),o=i.get("icon"),r=i.get("offsetCenter"),a=i.get("keepAspect"),s=Mv(o,e.cx-n/2+nr(r[0],e.r),e.cy-n/2+nr(r[1],e.r),n,n,null,a);s.z2=i.get("showAbove")?1:0,s.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,i,n,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),h=+t.get("max"),u=new qo,c=[],d=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){c[t]=new cl({silent:!0}),d[t]=new cl({silent:!0})})).update((function(t,e){c[t]=r._titleEls[e],d[t]=r._detailEls[e]})).execute(),a.each((function(e){var i=a.getItemModel(e),r=a.get(s,e),g=new qo,m=n(ir(r,[l,h],[0,1],!0)),v=i.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=o.cx+nr(y[0],o.r),x=o.cy+nr(y[1],o.r);(I=c[e]).attr({z2:f?0:2,style:Ah(v,{x:b,y:x,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(I)}var w=i.getModel("detail");if(w.get("show")){var _=w.get("offsetCenter"),C=o.cx+nr(_[0],o.r),S=o.cy+nr(_[1],o.r),M=nr(w.get("width"),o.r),T=nr(w.get("height"),o.r),E=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:m,I=d[e],D=w.get("formatter");I.attr({z2:f?0:2,style:Ah(w,{x:C,y:S,text:wA(r,D),width:isNaN(M)?null:M,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:E})}),Fh(I,{normal:w},r,(function(t){return wA(t,D)})),p&&Vh(I,e,a,t,{getFormattedLabel:function(t,e,i,n,o,a){return wA(a?a.interpolatedValue:r,D)}}),g.add(I)}u.add(g)})),this.group.add(u),this._titleEls=c,this._detailEls=d},e.type="gauge",e}(gm);const CA=_A,SA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="itemStyle",i}return m(e,t),e.prototype.getInitialData=function(t,e){return VC(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(of);var MA=["itemStyle","opacity"],TA=function(t){function e(e,i){var n=t.call(this)||this,o=n,r=new og,a=new cl;return o.setTextContent(a),n.setTextGuideLine(r),n.updateData(e,i,!0),n}return m(e,t),e.prototype.updateData=function(t,e,i){var n=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(MA);l=null==l?1:l,i||Mh(n),n.useStyle(t.getItemVisual(e,"style")),n.style.lineJoin="round",i?(n.setShape({points:a.points}),n.style.opacity=0,xh(n,{style:{opacity:l}},o,e)):bh(n,{style:{opacity:l},shape:{points:a.points}},o,e),ch(n,r),this._updateLabel(t,e),sh(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),h=l.fill;Dh(o,kh(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),i.setTextConfig({local:!0,inside:!!s.inside,insideStroke:h,outsideFill:h});var u=s.linePoints;n.setShape({points:u}),i.textGuideLineConfig={anchor:u?new Le(u[0][0],u[0][1]):null},bh(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Pb(i,Ob(a),{stroke:h})},e}(eg);const EA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreLabelLineUpdate=!0,i}return m(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this._data,r=this.group;n.diff(o).add((function(t){var e=new TA(n,t);n.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),r.add(i),n.setItemGraphicEl(t,i)})).remove((function(e){Sh(o.getItemGraphicEl(e),t,e)})).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(gm);var IA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new GC(tt(this.getData,this),tt(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return VC(this,{coordDimensions:["value"],encodeDefaulter:et(Tc,this)})},e.prototype._defaultLabelLine=function(t){Er(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var i=this.getData(),n=t.prototype.getDataParams.call(this,e),o=i.mapDimension("value"),r=i.getSum(o);return n.percent=r?+(i.get(o,e)/r*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(of);const DA=IA;function kA(t,e){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),r=function(t,e){return ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,h=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return nt(e)?o.sort(e):"none"!==e&&o.sort((function(t,e){return r?n[t]-n[e]:n[e]-n[t]})),o}(i,o),u=r.x,c=r.y,d="horizontal"===a?[nr(t.get("minSize"),l),nr(t.get("maxSize"),l)]:[nr(t.get("minSize"),s),nr(t.get("maxSize"),s)],p=i.getDataExtent(n),f=t.get("min"),g=t.get("max");null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var m=t.get("funnelAlign"),v=t.get("gap"),y=(("horizontal"===a?s:l)-v*(i.count()-1))/i.count(),b=function(t,e){if("horizontal"===a){var o=ir(i.get(n,t)||0,[f,g],d,!0),r=void 0;switch(m){case"top":r=c;break;case"center":r=c+(l-o)/2;break;case"bottom":r=c+(l-o)}return[[e,r],[e,r+o]]}var h,p=ir(i.get(n,t)||0,[f,g],d,!0);switch(m){case"left":h=u;break;case"center":h=u+(s-p)/2;break;case"right":h=u+s-p}return[[h,e],[h+p,e]]};"ascending"===o&&(y=-y,v=-v,"horizontal"===a?u+=s:c+=l,h=h.reverse());for(var x=0;x<h.length;x++){var w=h[x],_=h[x+1],C=i.getItemModel(w);if("horizontal"===a){var S=C.get(["itemStyle","width"]);null==S?S=y:(S=nr(S,s),"ascending"===o&&(S=-S));var M=b(w,u),T=b(_,u+S);u+=S+v,i.setItemLayout(w,{points:M.concat(T.slice().reverse())})}else{var E=C.get(["itemStyle","height"]);null==E?E=y:(E=nr(E,l),"ascending"===o&&(E=-E)),M=b(w,c),T=b(_,c+E),c+=E+v,i.setItemLayout(w,{points:M.concat(T.slice().reverse())})}}!function(t){var e=t.hostModel.get("orient");t.each((function(i){var n,o,r,a,s=t.getItemModel(i),l=s.getModel("label").get("position"),h=s.getModel("labelLine"),u=t.getItemLayout(i),c=u.points,d="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(d)"insideLeft"===l?(o=(c[0][0]+c[3][0])/2+5,r=(c[0][1]+c[3][1])/2,n="left"):"insideRight"===l?(o=(c[1][0]+c[2][0])/2-5,r=(c[1][1]+c[2][1])/2,n="right"):(o=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,r=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,n="center"),a=[[o,r],[o,r]];else{var p=void 0,f=void 0,g=void 0,m=void 0,v=h.get("length");"left"===l?(p=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,o=(g=p-v)-5,n="right"):"right"===l?(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,o=(g=p+v)+5,n="left"):"top"===l?(p=(c[3][0]+c[0][0])/2,r=(m=(f=(c[3][1]+c[0][1])/2)-v)-5,n="center"):"bottom"===l?(p=(c[1][0]+c[2][0])/2,r=(m=(f=(c[1][1]+c[2][1])/2)+v)+5,n="center"):"rightTop"===l?(p="horizontal"===e?c[3][0]:c[1][0],f="horizontal"===e?c[3][1]:c[1][1],"horizontal"===e?(r=(m=f-v)-5,n="center"):(o=(g=p+v)+5,n="top")):"rightBottom"===l?(p=c[2][0],f=c[2][1],"horizontal"===e?(r=(m=f+v)+5,n="center"):(o=(g=p+v)+5,n="bottom")):"leftTop"===l?(p=c[0][0],f="horizontal"===e?c[0][1]:c[1][1],"horizontal"===e?(r=(m=f-v)-5,n="center"):(o=(g=p-v)-5,n="right")):"leftBottom"===l?(p="horizontal"===e?c[1][0]:c[3][0],f="horizontal"===e?c[1][1]:c[2][1],"horizontal"===e?(r=(m=f+v)+5,n="center"):(o=(g=p-v)-5,n="right")):(p=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,"horizontal"===e?(r=(m=f+v)+5,n="center"):(o=(g=p+v)+5,n="left")),"horizontal"===e?o=g=p:r=m=f,a=[[p,f],[g,m]]}u.label={linePoints:a,x:o,y:r,verticalAlign:"middle",textAlign:n,inside:d}}))}(i)}))}var AA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._dataGroup=new qo,i._initialized=!1,i}return m(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._dataGroup,r=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,h=PA(t);if(r.diff(a).add((function(t){OA(RA(r,o,t,l,s),r,t,h)})).update((function(e,i){var n=a.getItemGraphicEl(i),o=LA(r,e,l,s);r.setItemGraphicEl(e,n),bh(n,{shape:{points:o}},t,e),Mh(n),OA(n,r,e,h)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),!this._initialized){this._initialized=!0;var u=function(t,e,i){var n=t.model,r=t.getRect(),a=new qs({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),s="horizontal"===n.get("layout")?"width":"height";return a.setShape(s,0),xh(a,{shape:{width:r.width,height:r.height}},e,(function(){setTimeout((function(){o.removeClipPath()}))})),a}(s,t);o.setClipPath(u)}this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=PA(e),s=this._progressiveEls=[],l=t.start;l<t.end;l++){var h=RA(n,this._dataGroup,l,r,o);h.incremental=!0,OA(h,n,l,a),s.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(gm);function LA(t,e,i,n){for(var o,r=[],a=0;a<i.length;a++){var s=i[a],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||r.push(n.dataToPoint(l,s))}return r}function RA(t,e,i,n,o){var r=LA(t,i,n,o),a=new og({shape:{points:r},z2:10});return e.add(a),t.setItemGraphicEl(i,a),a}function PA(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),dt(e=yr(e))&&(e=0),{smooth:e}}function OA(t,e,i,n){t.useStyle(e.getItemVisual(i,"style")),t.style.fill=null,t.setShape("smooth",n.smooth);var o=e.getItemModel(i),r=o.getModel("emphasis");ch(t,o,"lineStyle"),sh(t,r.get("focus"),r.get("blurScope"),r.get("disabled"))}const zA=AA;function NA(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var i={};return q(e.dimensions,(function(t){var e=+t.replace("dim","");i[t]=e})),i}}const BA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return m(e,t),e.prototype.getInitialData=function(t,e){return e_(null,this,{useEncodeDefaulter:tt(NA,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,o){t===e&&n.push(i.getRawIndex(o))})),n},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(of);var FA=["lineStyle","opacity"];const VA={seriesType:"parallel",reset:function(t,e){var i=t.coordinateSystem,n={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){i.eachActiveState(e,(function(t,i){var o=n[t];if("normal"===t&&e.hasItemOption){var r=e.getItemModel(i).get(FA,!0);null!=r&&(o=r)}e.ensureUniqueItemVisual(i,"style").opacity=o}),t.start,t.end)}}}};function HA(t){!function(t){if(!t.parallel){var e=!1;q(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}}(t),function(t){q(Tr(t.parallelAxis),(function(e){if(st(e)){var i=e.parallelIndex||0,n=Tr(t.parallel)[i];n&&n.parallelAxisDefault&&G(e,n.parallelAxisDefault,!1)}}))}(t)}var GA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},q(WA,(function(t,e){i.getZr().on(e,this._handlers[e]=tt(t,this))}),this)),xm(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){wm(this,"_throttledDispatchExpand"),q(this._handlers,(function(t,i){e.getZr().off(i,t)})),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(U({type:"parallelAxisExpand"},t))},e.type="parallel",e}(af),WA={mousedown:function(t){UA(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(UA(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&UA(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:{duration:0}})}}};function UA(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}const jA=GA,XA=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&G(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){q(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];q(J(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(uc);var YA=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.type=o||"value",a.axisIndex=r,a}return m(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(bM);const ZA=YA;function qA(t,e,i,n,o,r){t=t||0;var a=i[1]-i[0];if(null!=o&&(o=$A(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===n){var s=Math.abs(e[1]-e[0]);s=$A(s,[0,a]),o=r=$A(s,[o,r]),n=0}e[0]=$A(e[0],i),e[1]=$A(e[1],i);var l=KA(e,n);e[n]+=t;var h,u=o||0,c=i.slice();return l.sign<0?c[0]+=u:c[1]-=u,e[n]=$A(e[n],c),h=KA(e,n),null!=o&&(h.sign!==l.sign||h.span<o)&&(e[1-n]=e[n]+l.sign*o),h=KA(e,n),null!=r&&h.span>r&&(e[1-n]=e[n]+h.sign*r),e}function KA(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function $A(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var JA=q,QA=Math.min,tL=Math.max,eL=Math.floor,iL=Math.ceil,nL=or,oL=Math.PI,rL=function(){function t(t,e,i){this.type="parallel",this._axesMap=Tt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return t.prototype._init=function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;JA(n,(function(t,i){var n=o[i],r=e.getComponent("parallelAxis",n),a=this._axesMap.set(t,new ZA(t,$S(r),[0,0],r.get("type"),n)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],a=t[o];return r>=i&&r<=i+e.axisLength&&a>=n&&a<=n+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();JA(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),KS(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=i[o[a]],l=[0,s],h=this.dimensions.length,u=aL(e.get("axisExpandWidth"),l),c=aL(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=aL(p[1]-p[0],l),p[1]=p[0]+t):(t=aL(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||eL(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[eL(nL(p[0]/u,1))+1,iL(nL(p[1]/u,1))-1],m=f/u*p[0];return{layout:r,pixelDimIndex:a,layoutBase:i[n[a]],layoutLength:s,axisBase:i[n[1-a]],axisLength:i[o[1-a]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),JA(i,(function(e,i){var r=(n.axisExpandable?lL:sL)(i,n),a={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},s={horizontal:oL/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],h=s[o],u=[1,0,0,1,0,0];Ie(u,u,h),Ee(u,u,l),this._axesLayout[e]={position:l,rotation:h,transform:u,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];q(r,(function(e){a.push(t.mapDimension(e)),s.push(o.get(e).model)}));for(var l=this.hasAxisBrushed(),h=i;h<n;h++){var u=void 0;if(l){u="active";for(var c=t.getValues(a,h),d=0,p=r.length;d<p;d++)if("inactive"===s[d].getActiveState(c[d])){u="inactive";break}}else u="normal";e(u,h)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},t.prototype.axisCoordToPoint=function(t,e){return Zg([t,0],this._axesLayout[e].transform)},t.prototype.getAxisLayout=function(t){return H(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var a,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",h=e.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),c=null!=u[0];if(h)c&&h&&s<o*u[0]?(l="jump",a=s-o*u[2]):c&&h&&s>o*(1-u[0])?(l="jump",a=s-o*(1-u[2])):(a=s-o*u[1])>=0&&(a=s-o*(1-u[1]))<=0&&(a=0),(a*=e.axisExpandWidth/h)?qA(a,n,r,"all"):l="none";else{var d=n[1]-n[0];(n=[tL(0,r[1]*s/d-d/2)])[1]=QA(r[1],n[0]+d),n[0]=n[1]-d}return{axisExpandWindow:n,behavior:l}},t}();function aL(t,e){return QA(tL(t,e[0]),e[1])}function sL(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function lL(t,e){var i,n,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],h=r,u=!0):(i=o-(a-1-t)*s,n=s),{position:i,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:n}}const hL=rL,uL={create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,o){var r=new hL(n,t,e);r.name="parallel_"+o,r.resize(n,e),n.coordinateSystem=r,r.model=n,i.push(r)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Gr).models[0];t.coordinateSystem=e.coordinateSystem}})),i}};var cL=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.activeIntervals=[],i}return m(e,t),e.prototype.getAreaSelectStyle=function(){return oa([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=H(t);if(e)for(var i=e.length-1;i>=0;i--)rr(e[i])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"},e}(uc);Y(cL,JC);const dL=cL;var pL=!0,fL=Math.min,gL=Math.max,mL=Math.pow,vL=1e4,yL=6,bL=6,xL="globalPan",wL={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_L={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},CL={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},SL=0,ML=function(t){function e(e){var i=t.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=e,i.group=new qo,i._uid="brushController_"+SL++,q(JL,(function(t,e){this._handlers[e]=tt(t,this)}),i),i}return m(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||function(t,e,i){ET(t)[e]=i}(e,xL,this._uid),q(this._handlers,(function(t,i){e.on(i,t)})),this._brushType=t.brushType,this._brushOption=G(H(CL),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;!function(t,e,i){var n=ET(t);n[e]===i&&(n[e]=null)}(t,xL,this._uid),q(this._handlers,(function(e,i){t.off(i,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};q(t,(function(t){e[t.panelId]=H(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=K(t,(function(t){return G(H(CL),t,!0)}));var e=this._covers,i=this._covers=[],n=this,o=this._creatingCover;return new _w(e,t,(function(t,e){return r(t.__brushOption,e)}),r).add(a).update(a).remove((function(t){e[t]!==o&&n.group.remove(e[t])})).execute(),this;function r(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function a(r,a){var s=t[r];if(null!=a&&e[a]===o)i[r]=e[a];else{var l=i[r]=null!=a?(e[a].__brushOption=s,e[a]):EL(n,TL(n,s));kL(n,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),PL(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(te);function TL(t,e){var i=tR[e.brushType].createCover(t,e);return i.__brushOption=e,DL(i,e),t.group.add(i),i}function EL(t,e){var i=AL(e);return i.endCreating&&(i.endCreating(t,e),DL(e,e.__brushOption)),e}function IL(t,e){var i=e.__brushOption;AL(e).updateCoverShape(t,e,i.range,i)}function DL(t,e){var i=e.z;null==i&&(i=vL),t.traverse((function(t){t.z=i,t.z2=i}))}function kL(t,e){AL(e).updateCommon(t,e),IL(t,e)}function AL(t){return tR[t.__brushOption.brushType]}function LL(t,e,i){var n,o=t._panels;if(!o)return pL;var r=t._transform;return q(o,(function(t){t.isTargetByCursor(e,i,r)&&(n=t)})),n}function RL(t,e){var i=t._panels;if(!i)return pL;var n=e.__brushOption.panelId;return null!=n?i[n]:pL}function PL(t){var e=t._covers,i=e.length;return q(e,(function(e){t.group.remove(e)}),t),e.length=0,!!i}function OL(t,e){var i=K(t._covers,(function(t){var e=t.__brushOption,i=H(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}}));t.trigger("brush",{areas:i,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function zL(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function NL(t,e,i,n){var o=new qo;return o.add(new qs({name:"main",style:HL(i),silent:!0,draggable:!0,cursor:"move",drift:et(UL,t,e,o,["n","s","w","e"]),ondragend:et(OL,e,{isEnd:!0})})),q(n,(function(i){o.add(new qs({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:et(UL,t,e,o,i),ondragend:et(OL,e,{isEnd:!0})}))})),o}function BL(t,e,i,n){var o=n.brushStyle.lineWidth||0,r=gL(o,bL),a=i[0][0],s=i[1][0],l=a-o/2,h=s-o/2,u=i[0][1],c=i[1][1],d=u-r+o/2,p=c-r+o/2,f=u-a,g=c-s,m=f+o,v=g+o;VL(t,e,"main",a,s,f,g),n.transformable&&(VL(t,e,"w",l,h,r,v),VL(t,e,"e",d,h,r,v),VL(t,e,"n",l,h,m,r),VL(t,e,"s",l,p,m,r),VL(t,e,"nw",l,h,r,r),VL(t,e,"ne",d,h,r,r),VL(t,e,"sw",l,p,r,r),VL(t,e,"se",d,p,r,r))}function FL(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(HL(i)),o.attr({silent:!n,cursor:n?"move":"default"}),q([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(i){var o=e.childOfName(i.join("")),r=1===i.length?WL(t,i[0]):function(t,e){var i=[WL(t,e[0]),WL(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?_L[r]+"-resize":null})}))}function VL(t,e,i,n,o,r,a){var s=e.childOfName(i);s&&s.setShape(function(t){var e=fL(t[0][0],t[1][0]),i=fL(t[0][1],t[1][1]);return{x:e,y:i,width:gL(t[0][0],t[1][0])-e,height:gL(t[0][1],t[1][1])-i}}(YL(t,e,[[n,o],[n+r,o+a]])))}function HL(t){return j({strokeNoScale:!0},t.brushStyle)}function GL(t,e,i,n){var o=[fL(t,i),fL(e,n)],r=[gL(t,i),gL(e,n)];return[[o[0],r[0]],[o[1],r[1]]]}function WL(t,e){var i=qg({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return Yg(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function UL(t,e,i,n,o,r){var a=i.__brushOption,s=t.toRectRange(a.range),l=XL(e,o,r);q(n,(function(t){var e=wL[t];s[e[0]][e[1]]+=l[e[0]]})),a.range=t.fromRectRange(GL(s[0][0],s[1][0],s[0][1],s[1][1])),kL(e,i),OL(e,{isEnd:!1})}function jL(t,e,i,n){var o=e.__brushOption.range,r=XL(t,i,n);q(o,(function(t){t[0]+=r[0],t[1]+=r[1]})),kL(t,e),OL(t,{isEnd:!1})}function XL(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),r=n.transformCoordToLocal(0,0);return[o[0]-r[0],o[1]-r[1]]}function YL(t,e,i){var n=RL(t,e);return n&&n!==pL?n.clipPath(i,t._transform):H(i)}function ZL(t){var e=t.event;e.preventDefault&&e.preventDefault()}function qL(t,e,i){return t.childOfName("main").contain(e,i)}function KL(t,e,i,n){var o,r=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],r=i[1]-n[1];return mL(o*o+r*r,.5)>yL}(t)||r){if(a&&!r){"single"===s.brushMode&&PL(t);var l=H(s);l.brushType=$L(l.brushType,a),l.panelId=a===pL?null:a.panelId,r=t._creatingCover=TL(t,l),t._covers.push(r)}if(r){var h=tR[$L(t._brushType,a)];r.__brushOption.range=h.getCreatingRange(YL(t,r,t._track)),n&&(EL(t,r),h.updateCommon(t,r)),IL(t,r),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&LL(t,e,i)&&PL(t)&&(o={isEnd:n,removeOnClick:!0});return o}function $L(t,e){return"auto"===t?e.defaultBrushType:t}var JL={mousedown:function(t){if(this._dragging)QL(this,t);else if(!t.target||!t.target.draggable){ZL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=LL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}(t,e.offsetX,e.offsetY)){var n=t._zr,o=t._covers,r=LL(t,e,i);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===pL||s.panelId===r.panelId)&&tR[s.brushType].contain(o[a],i[0],i[1]))return}r&&n.setCursorStyle("crosshair")}}(this,t,n),this._dragging){ZL(t);var o=KL(this,t,n,!1);o&&OL(this,o)}},mouseup:function(t){QL(this,t)}};function QL(t,e){if(t._dragging){ZL(e);var i=e.offsetX,n=e.offsetY,o=t.group.transformCoordToLocal(i,n),r=KL(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,r&&OL(t,r)}}var tR={lineX:eR(0),lineY:eR(1),rect:{createCover:function(t,e){function i(t){return t}return NL({toRectRange:i,fromRectRange:i},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=zL(t);return GL(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){BL(t,e,i,n)},updateCommon:FL,contain:qL},polygon:{createCover:function(t,e){var i=new qo;return i.add(new og({name:"main",style:HL(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new eg({name:"main",draggable:!0,drift:et(jL,t,e),ondragend:et(OL,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:YL(t,e,i)})},updateCommon:FL,contain:qL}};function eR(t){return{createCover:function(e,i){return NL({toRectRange:function(e){var i=[e,[0,100]];return t&&i.reverse(),i},fromRectRange:function(e){return e[t]}},e,i,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var i=zL(e);return[fL(i[0][t],i[1][t]),gL(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,o){var r,a=RL(e,i);if(a!==pL&&a.getLinearBrushOtherExtent)r=a.getLinearBrushOtherExtent(t);else{var s=e._zr;r=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,r];t&&l.reverse(),BL(e,i,l,o)},updateCommon:FL,contain:qL}}const iR=ML;function nR(t){return t=aR(t),function(e){return Jg(e,t)}}function oR(t,e){return t=aR(t),function(i){var n=null!=e?e:i,o=n?t.width:t.height,r=n?t.x:t.y;return[r,r+(o||0)]}}function rR(t,e,i){var n=aR(t);return function(t,o){return n.contain(o[0],o[1])&&!NT(t,e,i)}}function aR(t){return Ge.create(t)}var sR=["axisLine","axisTickLabel","axisName"],lR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(e,i){t.prototype.init.apply(this,arguments),(this._brushController=new iR(i.getZr())).on("brush",tt(this._onBrush,this))},e.prototype.render=function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new qo,this.group.add(this._axisGroup),t.get("show")){var r=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),a=r.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,h=t.axis.dim,u=U({strokeContainThreshold:l},a.getAxisLayout(h)),c=new FM(t,u);q(sR,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(u,s,t,r,l,i),$g(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,i,n,o,r){var a=i.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),h=Ge.create({x:a[0],y:-o/2,width:s,height:o});h.x-=l,h.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:nR(h),isTargetByCursor:rR(h,r,n),getLinearBrushOtherExtent:oR(h,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return K(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}(i))},e.prototype._onBrush=function(t){var e=t.areas,i=this.axisModel,n=i.axis,o=K(e,(function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(af);const hR=lR;var uR={type:"axisAreaSelect",event:"axisAreaSelected"},cR={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function dR(t){t.registerComponentView(jA),t.registerComponentModel(XA),t.registerCoordinateSystem("parallel",uL),t.registerPreprocessor(HA),t.registerComponentModel(dL),t.registerComponentView(hR),lS(t,"parallel",dL,cR),function(t){t.registerAction(uR,(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),t.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}))}(t)}var pR=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},fR=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new pR},e.prototype.buildPath=function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},e.prototype.highlight=function(){Yl(this)},e.prototype.downplay=function(){Zl(this)},e}(Ps),gR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._focusAdjacencyDisabled=!1,i}return m(e,t),e.prototype.render=function(t,e,i){var n=this,o=t.getGraph(),r=this.group,a=t.layoutInfo,s=a.width,l=a.height,h=t.getData(),u=t.getData("edge"),c=t.get("orient");this._model=t,r.removeAll(),r.x=a.x,r.y=a.y,o.eachEdge((function(e){var i=new fR,n=dl(i);n.dataIndex=e.dataIndex,n.seriesIndex=t.seriesIndex,n.dataType="edge";var o,a,h,d,p,f,g,m,v=e.getModel(),y=v.getModel("lineStyle"),b=y.get("curveness"),x=e.node1.getLayout(),w=e.node1.getModel(),_=w.get("localX"),C=w.get("localY"),S=e.node2.getLayout(),M=e.node2.getModel(),T=M.get("localX"),E=M.get("localY"),I=e.getLayout();i.shape.extent=Math.max(1,I.dy),i.shape.orient=c,"vertical"===c?(o=(null!=_?_*s:x.x)+I.sy,a=(null!=C?C*l:x.y)+x.dy,h=(null!=T?T*s:S.x)+I.ty,p=o,f=a*(1-b)+(d=null!=E?E*l:S.y)*b,g=h,m=a*b+d*(1-b)):(o=(null!=_?_*s:x.x)+x.dx,a=(null!=C?C*l:x.y)+I.sy,p=o*(1-b)+(h=null!=T?T*s:S.x)*b,f=a,g=o*b+h*(1-b),m=d=(null!=E?E*l:S.y)+I.ty),i.setShape({x1:o,y1:a,x2:h,y2:d,cpx1:p,cpy1:f,cpx2:g,cpy2:m}),i.useStyle(y.getItemStyle()),mR(i.style,c,e);var D=""+v.get("value"),k=kh(v,"edgeLabel");Dh(i,k,{labelFetcher:{getFormattedLabel:function(e,i,n,o,r,a){return t.getFormattedLabel(e,i,"edge",o,gt(r,k.normal&&k.normal.get("formatter"),D),a)}},labelDataIndex:e.dataIndex,defaultText:D}),i.setTextConfig({position:"inside"});var A=v.getModel("emphasis");ch(i,v,"lineStyle",(function(t){var i=t.getItemStyle();return mR(i,c,e),i})),r.add(i),u.setItemGraphicEl(e.dataIndex,i);var L=A.get("focus");sh(i,"adjacency"===L?e.getAdjacentDataIndices():"trajectory"===L?e.getTrajectoryDataIndices():L,A.get("blurScope"),A.get("disabled"))})),o.eachNode((function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),a=n.get("localY"),u=n.getModel("emphasis"),c=new qs({shape:{x:null!=o?o*s:i.x,y:null!=a?a*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle(),z2:10});Dh(c,kh(n),{labelFetcher:{getFormattedLabel:function(e,i){return t.getFormattedLabel(e,i,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),c.disableLabelAnimation=!0,c.setStyle("fill",e.getVisual("color")),c.setStyle("decal",e.getVisual("style").decal),ch(c,n),r.add(c),h.setItemGraphicEl(e.dataIndex,c),dl(c).dataType="node";var d=u.get("focus");sh(c,"adjacency"===d?e.getAdjacentDataIndices():"trajectory"===d?e.getTrajectoryDataIndices():d,u.get("blurScope"),u.get("disabled"))})),h.eachItemGraphicEl((function(e,o){h.getItemModel(o).get("draggable")&&(e.drift=function(e,r){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=r,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")})),!this._data&&t.isAnimationEnabled()&&r.setClipPath(function(t,e,i){var n=new qs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return xh(n,{shape:{width:t.width+20}},e,(function(){r.removeClipPath()})),n}(r.getBoundingRect(),t)),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(gm);function mR(t,e,i){switch(t.fill){case"source":t.fill=i.node1.getVisual("color"),t.decal=i.node1.getVisual("style").decal;break;case"target":t.fill=i.node2.getVisual("color"),t.decal=i.node2.getVisual("style").decal;break;case"gradient":var n=i.node1.getVisual("color"),o=i.node2.getVisual("color");ot(n)&&ot(o)&&(t.fill=new xg(0,0,+("horizontal"===e),+("vertical"===e),[{color:n,offset:0},{color:o,offset:1}]))}}const vR=gR;var yR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.getInitialData=function(t,e){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&o[a].depth>=0&&(r[o[a].depth]=new eu(o[a],this,e));if(n&&i){var s=fA(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getData().getItemLayout(e);if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t})),e.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout();if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var i=(this.option.data||this.option.nodes)[t];i.localX=e[0],i.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,i){function n(t){return isNaN(t)||null==t}if("edge"===i){var o=this.getDataParams(t,i),r=o.data,a=o.value;return Rp("nameValue",{name:r.source+" -- "+r.target,value:a,noValue:n(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,i).data.name;return Rp("nameValue",{name:null!=l?l+"":null,value:s,noValue:n(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,i){var n=t.prototype.getDataParams.call(this,e,i);if(null==n.value&&"node"===i){var o=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(of);const bR=yR;function xR(t,e){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=function(t,e){return ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,a=o.height,s=t.getGraph(),l=s.nodes,h=s.edges;!function(t){q(t,(function(t){var e=kR(t.outEdges,DR),i=kR(t.inEdges,DR),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)}))}(l),function(t,e,i,n,o,r,a,s,l){(function(t,e,i,n,o,r,a){for(var s=[],l=[],h=[],u=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&h.push(t[d]);for(var p=-1;h.length;){for(var f=0;f<h.length;f++){var g=h[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===r?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var b=g.outEdges[y];s[e.indexOf(b)]=0;var x=b.node2;0==--l[t.indexOf(x)]&&u.indexOf(x)<0&&u.push(x)}}++c,h=u,u=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>c-1?p:c-1;a&&"left"!==a&&function(t,e,i,n){if("right"===e){for(var o=[],r=t,a=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:a},!0);for(var h=0;h<l.inEdges.length;h++){var u=l.inEdges[h];o.indexOf(u.node1)<0&&o.push(u.node1)}}r=o,o=[],++a}q(t,(function(t){wR(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)}))}else"justify"===e&&function(t,e){q(t,(function(t){wR(t)||t.outEdges.length||t.setLayout({depth:e},!0)}))}(t,n)}(t,a,0,w),function(t,e,i){q(t,(function(t){var n=t.getLayout().depth*e;"vertical"===i?t.setLayout({y:n},!0):t.setLayout({x:n},!0)}))}(t,"vertical"===r?(o-i)/w:(n-i)/w,r)})(t,e,i,o,r,s,l),function(t,e,i,n,o,r,a){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=Xr(t,(function(t){return t.getLayout()[n]}));return o.keys.sort((function(t,e){return t-e})),q(o.keys,(function(t){i.push(o.buckets.get(t))})),i}(t,a);(function(t,e,i,n,o,r){var a=1/0;q(t,(function(t){var e=t.length,s=0;q(t,(function(t){s+=t.getLayout().value}));var l="vertical"===r?(n-(e-1)*o)/s:(i-(e-1)*o)/s;l<a&&(a=l)})),q(t,(function(t){q(t,(function(t,e){var i=t.getLayout().value*a;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))}))})),q(e,(function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)}))})(s,e,i,n,o,a),_R(s,o,i,n,a);for(var l=1;r>0;r--)CR(s,l*=.99,a),_R(s,o,i,n,a),AR(s,l,a),_R(s,o,i,n,a)}(t,e,r,o,n,a,s),function(t,e){var i="vertical"===e?"x":"y";q(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),q(t,(function(t){var e=0,i=0;q(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),q(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,s)}(l,h,i,n,r,a,0!==J(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function wR(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function _R(t,e,i,n,o){var r="vertical"===o?"x":"y";q(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[r]-e.getLayout()[r]}));for(var h=0,u=t.length,c="vertical"===o?"dx":"dy",d=0;d<u;d++)(l=h-(s=t[d]).getLayout()[r])>0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),h=s.getLayout()[r]+s.getLayout()[c]+e;if((l=h-e-("vertical"===o?n:i))>0)for(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),h=a,d=u-2;d>=0;--d)(l=(s=t[d]).getLayout()[r]+s.getLayout()[c]+e-h)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),h=s.getLayout()[r]}))}function CR(t,e,i){q(t.slice().reverse(),(function(t){q(t,(function(t){if(t.outEdges.length){var n=kR(t.outEdges,SR,i)/kR(t.outEdges,DR);if(isNaN(n)){var o=t.outEdges.length;n=o?kR(t.outEdges,MR,i)/o:0}if("vertical"===i){var r=t.getLayout().x+(n-IR(t,i))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(n-IR(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function SR(t,e){return IR(t.node2,e)*t.getValue()}function MR(t,e){return IR(t.node2,e)}function TR(t,e){return IR(t.node1,e)*t.getValue()}function ER(t,e){return IR(t.node1,e)}function IR(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function DR(t){return t.getValue()}function kR(t,e,i){for(var n=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],i);isNaN(a)||(n+=a)}return n}function AR(t,e,i){q(t,(function(t){q(t,(function(t){if(t.inEdges.length){var n=kR(t.inEdges,TR,i)/kR(t.inEdges,DR);if(isNaN(n)){var o=t.inEdges.length;n=o?kR(t.inEdges,ER,i)/o:0}if("vertical"===i){var r=t.getLayout().x+(n-IR(t,i))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(n-IR(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function LR(t){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph(),i=e.nodes,n=e.edges;if(i.length){var o=1/0,r=-1/0;q(i,(function(t){var e=t.getLayout().value;e<o&&(o=e),e>r&&(r=e)})),q(i,(function(e){var i=new VD({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),n=e.getModel().get(["itemStyle","color"]);null!=n?(e.setVisual("color",n),e.setVisual("style",{fill:n})):(e.setVisual("color",i),e.setVisual("style",{fill:i}))}))}n.length&&q(n,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var RR=function(){function t(){}return t.prototype.getInitialData=function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=r.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=[o,r],p=d[h].get("type"),f=d[1-h].get("type"),g=t.data;if(g&&n){var m=[];q(g,(function(t,e){var i;it(t)?(i=t.slice(),t.unshift(e)):it(t.value)?((i=U({},t)).value=i.value.slice(),t.value.unshift(e)):i=t,m.push(i)})),t.data=m}var v=this.defaultValueDimensions,y=[{name:u,type:Mw(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Mw(f),dimsDef:v.slice()}];return VC(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:et(Mc,y,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),PR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],i.visualDrawType="stroke",i}return m(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(of);Y(PR,RR,!0);const OR=PR;var zR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;n.diff(r).add((function(t){if(n.hasValue(t)){var e=FR(n.getItemLayout(t),n,t,a,!0);n.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?(Mh(i),VR(s,i,n,t)):i=FR(s,n,t,a),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=n},e.prototype.remove=function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(gm),NR=function(){},BR=function(t){function e(e){var i=t.call(this,e)||this;return i.type="boxplotBoxPath",i}return m(e,t),e.prototype.getDefaultShape=function(){return new NR},e.prototype.buildPath=function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e}(Ps);function FR(t,e,i,n,o){var r=t.ends,a=new BR({shape:{points:o?HR(r,n,t):r}});return VR(t,a,e,i,o),a}function VR(e,i,n,o,r){var a=n.hostModel;(0,t[r?"initProps":"updateProps"])(i,{shape:{points:e.ends}},a,o),i.useStyle(n.getItemVisual(o,"style")),i.style.strokeNoScale=!0,i.z2=100;var s=n.getItemModel(o),l=s.getModel("emphasis");ch(i,s),sh(i,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function HR(t,e,i){return K(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}const GR=zR;var WR=q;function UR(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),o=X(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)})),e}(t);WR(e,(function(t){var e=t.seriesModels;e.length&&(function(t){var e,i=t.axis,n=t.seriesModels,o=n.length,r=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];if("category"===i.type)e=i.getBandWidth();else{var l=0;WR(n,(function(t){l=Math.max(l,t.getData().count())}));var h=i.getExtent();e=Math.abs(h[1]-h[0])/l}WR(n,(function(t){var i=t.get("boxWidth");it(i)||(i=[i,i]),s.push([nr(i[0],e)||0,nr(i[1],e)||0])}));var u=.8*e-2,c=u/o*.3,d=(u-c*(o-1))/o,p=d/2-u/2;WR(n,(function(t,e){a.push(p),p+=c+d,r.push(Math.min(Math.max(d,s[e][0]),s[e][1]))}))}(t),WR(e,(function(e,i){!function(t,e,i){var n=t.coordinateSystem,o=t.getData(),r=i/2,a="horizontal"===t.get("layout")?0:1,s=1-a,l=["x","y"],h=o.mapDimension(l[a]),u=o.mapDimensionsAll(l[s]);if(!(null==h||u.length<5))for(var c=0;c<o.count();c++){var d=o.get(h,c),p=b(d,u[2],c),f=b(d,u[0],c),g=b(d,u[1],c),m=b(d,u[3],c),v=b(d,u[4],c),y=[];x(y,g,!1),x(y,m,!0),y.push(f,g,v,m),w(y,f),w(y,v),w(y,p),o.setItemLayout(c,{initBaseline:p[s],ends:y})}function b(t,i,r){var l,h=o.get(i,r),u=[];return u[a]=t,u[s]=h,isNaN(t)||isNaN(h)?l=[NaN,NaN]:(l=n.dataToPoint(u))[a]+=e,l}function x(t,e,i){var n=e.slice(),o=e.slice();n[a]+=r,o[a]-=r,i?t.push(n,o):t.push(o,n)}function w(t,e){var i=e.slice(),n=e.slice();i[a]-=r,n[a]+=r,t.push(i,n)}}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))}var jR={type:"echarts:boxplot",transform:function(t){var e=t.upstream;e.sourceFormat!==mc&&$d("");var i=function(t,e){for(var i=[],n=[],o=(e=e||{}).boundIQR,r="none"===o||0===o,a=0;a<t.length;a++){var s=rr(t[a].slice()),l=mr(s,.25),h=mr(s,.5),u=mr(s,.75),c=s[0],d=s[s.length-1],p=(null==o?1.5:o)*(u-l),f=r?c:Math.max(c,l-p),g=r?d:Math.min(d,u+p),m=e.itemNameFormatter,v=nt(m)?m({value:a}):ot(m)?m.replace("{value}",a+""):a+"";i.push([v,f,l,h,u,g]);for(var y=0;y<s.length;y++){var b=s[y];if(b<f||b>g){var x=[v,b];n.push(x)}}}return{boxData:i,outliers:n}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}},XR=["color","borderColor"],YR=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||n.removeAll(),e.diff(i).add((function(i){if(e.hasValue(i)){var a=e.getItemLayout(i);if(r&&$R(s,a))return;var l=KR(a,0,!0);xh(l,{shape:{points:a.ends}},t,i),JR(l,e,i,o),n.add(l),e.setItemGraphicEl(i,l)}})).update((function(a,l){var h=i.getItemGraphicEl(l);if(e.hasValue(a)){var u=e.getItemLayout(a);r&&$R(s,u)?n.remove(h):(h?(bh(h,{shape:{points:u.ends}},t,a),Mh(h)):h=KR(u),JR(h,e,a,o),n.add(h),e.setItemGraphicEl(a,h))}else n.remove(h)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),iP(t,this.group);var e=t.get("clip",!0)?I_(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var r=KR(n.getItemLayout(i));JR(r,n,i,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},e.prototype._incrementalRenderLarge=function(t,e){iP(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(gm),ZR=function(){},qR=function(t){function e(e){var i=t.call(this,e)||this;return i.type="normalCandlestickBox",i}return m(e,t),e.prototype.getDefaultShape=function(){return new ZR},e.prototype.buildPath=function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Ps);function KR(t,e,i){var n=t.ends;return new qR({shape:{points:i?QR(n,t):n},z2:100})}function $R(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function JR(t,e,i,n){var o=e.getItemModel(i);t.useStyle(e.getItemVisual(i,"style")),t.style.strokeNoScale=!0,t.__simpleBox=n,ch(t,o)}function QR(t,e){return K(t,(function(t){return(t=t.slice())[1]=e.initBaseline,t}))}var tP=function(){},eP=function(t){function e(e){var i=t.call(this,e)||this;return i.type="largeCandlestickBox",i}return m(e,t),e.prototype.getDefaultShape=function(){return new tP},e.prototype.buildPath=function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e}(Ps);function iP(t,e,i,n){var o=t.getData(),r=o.getLayout("largePoints"),a=new eP({shape:{points:r},__sign:1,ignoreCoarsePointer:!0});e.add(a);var s=new eP({shape:{points:r},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new eP({shape:{points:r},__sign:0,ignoreCoarsePointer:!0});e.add(l),nP(1,a,t),nP(-1,s,t),nP(0,l,t),n&&(a.incremental=!0,s.incremental=!0),i&&i.push(a,s)}function nP(t,e,i,n){var o=i.get(["itemStyle",t>0?"borderColor":"borderColor0"])||i.get(["itemStyle",t>0?"color":"color0"]);0===t&&(o=i.get(["itemStyle","borderColorDoji"]));var r=i.getModel("itemStyle").getItemStyle(XR);e.useStyle(r),e.style.fill=null,e.style.stroke=o}const oP=YR;var rP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],i}return m(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(of);Y(rP,RR,!0);const aP=rP;function sP(t){t&&it(t.series)&&q(t.series,(function(t){st(t)&&"k"===t.type&&(t.type="candlestick")}))}var lP=["itemStyle","borderColor"],hP=["itemStyle","borderColor0"],uP=["itemStyle","borderColorDoji"],cP=["itemStyle","color"],dP=["itemStyle","color0"];const pP={seriesType:"candlestick",plan:sf(),performRawSeries:!0,reset:function(t,e){function i(t,e){return e.get(t>0?cP:dP)}function n(t,e){return e.get(0===t?uP:t>0?lP:hP)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var o;null!=(o=t.next());){var r=e.getItemModel(o),a=e.getItemLayout(o).sign,s=r.getItemStyle();s.fill=i(a,r),s.stroke=n(a,r)||s.fill,U(e.ensureUniqueItemVisual(o,"style"),s)}}}}};var fP={seriesType:"candlestick",plan:sf(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),r=nr(ft(t.get("barMaxWidth"),o),o),a=nr(ft(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?nr(s,o):Math.max(Math.min(o/2,r),a)}(t,i),o=["x","y"],r=i.getDimensionIndex(i.mapDimension(o[0])),a=K(i.mapDimensionsAll(o[1]),i.getDimensionIndex,i),s=a[0],l=a[1],h=a[2],u=a[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(r<0||a.length<4))return{progress:t.pipelineContext.large?function(i,n){for(var o,a,c=v_(4*i.count),d=0,p=[],f=[],g=n.getStore(),m=!!t.get(["itemStyle","borderColorDoji"]);null!=(a=i.next());){var v=g.get(r,a),y=g.get(s,a),b=g.get(l,a),x=g.get(h,a),w=g.get(u,a);isNaN(v)||isNaN(x)||isNaN(w)?(c[d++]=NaN,d+=3):(c[d++]=gP(g,a,y,b,l,m),p[0]=v,p[1]=x,o=e.dataToPoint(p,null,f),c[d++]=o?o[0]:NaN,c[d++]=o?o[1]:NaN,p[1]=w,o=e.dataToPoint(p,null,f),c[d++]=o?o[1]:NaN)}n.setLayout("largePoints",c)}:function(t,i){for(var o,a=i.getStore();null!=(o=t.next());){var c=a.get(r,o),d=a.get(s,o),p=a.get(l,o),f=a.get(h,o),g=a.get(u,o),m=Math.min(d,p),v=Math.max(d,p),y=S(m,c),b=S(v,c),x=S(f,c),w=S(g,c),_=[];M(_,b,0),M(_,y,1),_.push(E(w),E(b),E(x),E(y));var C=!!i.getItemModel(o).get(["itemStyle","borderColorDoji"]);i.setItemLayout(o,{sign:gP(a,o,d,p,l,C),initBaseline:d>p?b[1]:y[1],ends:_,brushRect:T(f,g,c)})}function S(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function M(t,e,i){var o=e.slice(),r=e.slice();o[0]=Xg(o[0]+n/2,1,!1),r[0]=Xg(r[0]-n/2,1,!0),i?t.push(o,r):t.push(r,o)}function T(t,e,i){var o=S(t,i),r=S(e,i);return o[0]-=n/2,r[0]-=n/2,{x:o[0],y:o[1],width:n,height:r[1]-o[1]}}function E(t){return t[0]=Xg(t[0],1),t}}}}};function gP(t,e,i,n,o,r){return i>n?-1:i<n?1:r?0:e>0?t.get(o,e-1)<=n?1:-1:1}const mP=fP;function vP(t,e){var i=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})}))}var yP=function(t){function e(e,i){var n=t.call(this)||this,o=new s_(e,i),r=new qo;return n.add(o),n.add(r),n.updateData(e,i),n}return m(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),r=0;r<n;r++){var a=Mv(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-r/n*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),o.add(a)}vP(o,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var r=n[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}vP(i,t)},e.prototype.highlight=function(){Yl(this)},e.prototype.downplay=function(){Zl(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var i=this,n=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=Tv(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),h=l&&l.fill,u=r.getModel("emphasis");o.setScale(s),o.traverse((function(t){t.setStyle("fill",h)}));var c=Ev(t.getItemVisual(e,"symbolOffset"),s);c&&(o.x=c[0],o.y=c[1]);var d=t.getItemVisual(e,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=n.get("showEffectOn"),p.rippleScale=r.get(["rippleEffect","scale"]),p.brushType=r.get(["rippleEffect","brushType"]),p.period=1e3*r.get(["rippleEffect","period"]),p.effectOffset=e/t.count(),p.z=n.getShallow("z")||0,p.zlevel=n.getShallow("zlevel")||0,p.symbolType=a,p.color=h,p.rippleEffectColor=r.get(["rippleEffect","color"]),p.rippleNumber=r.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==p.showEffectOn&&i.startEffectAnimation(p):"normal"===t&&"render"!==p.showEffectOn&&i.stopEffectAnimation()}),this._effectCfg=p,sh(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(qo);const bP=yP,xP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(){this._symbolDraw=new d_(bP)},e.prototype.render=function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,e,i){var n=t.getData();this.group.dirty();var o=V_("").reset(t,e,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e,i=t.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=(Me(e=[1,0,0,1,0,0],i.getRoamTransform()),e),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(gm),wP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return m(e,t),e.prototype.getInitialData=function(t,e){return e_(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,i){return i.point(e.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(of);var _P=function(t){function e(e,i,n){var o=t.call(this)||this;return o.add(o.createLine(e,i,n)),o._updateEffectSymbol(e,i),o}return m(e,t),e.prototype.createLine=function(t,e,i){return new Xk(t,e,i)},e.prototype._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");it(n)||(n=[n,n]);var r=t.getItemVisual(e,"style"),a=i.get("color")||r&&r.stroke,s=this.childAt(1);this._symbolType!==o&&(this.remove(s),(s=Mv(o,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(i.getItemStyle(["color"])),s.scaleX=n[0],s.scaleY=n[1],s.setColor(a),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},e.prototype._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=t.getItemLayout(i),r=1e3*e.get("period"),a=e.get("loop"),s=e.get("roundTrip"),l=e.get("constantSpeed"),h=pt(e.get("delay"),(function(e){return e/t.count()*r/3}));if(n.ignore=!0,this._updateAnimationPoints(n,o),l>0&&(r=this._getLineLength(n)/l*1e3),r!==this._period||a!==this._loop||s!==this._roundTrip){n.stopAnimation();var u=void 0;u=nt(h)?h(i):h,n.__t>0&&(u=-r*n.__t),this._animateSymbol(n,r,u,a,s)}this._period=r,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,i,n,o){if(e>0){t.__t=0;var r=this,a=t.animate("",n).when(o?2*e:e,{__t:o?2:1}).delay(i).during((function(){r._updateSymbolPosition(t)}));n||a.done((function(){r.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Ut(t.__p1,t.__cp1)+Ut(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,r=[t.x,t.y],a=r.slice(),s=Pi,l=Oi;r[0]=s(e[0],n[0],i[0],o),r[1]=s(e[1],n[1],i[1],o);var h=t.__t<1?l(e[0],n[0],i[0],o):l(i[0],n[0],e[0],1-o),u=t.__t<1?l(e[1],n[1],i[1],o):l(i[1],n[1],e[1],1-o);t.rotation=-Math.atan2(u,h)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*Ut(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*Ut(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},e}(qo);const CP=_P;var SP=function(t){function e(e,i,n){var o=t.call(this)||this;return o._createPolyline(e,i,n),o}return m(e,t),e.prototype._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new og({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},e.prototype.updateData=function(t,e,i){var n=t.hostModel;bh(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},e.prototype._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),r=i&&i.emphasisLineStyle,a=i&&i.focus,s=i&&i.blurScope,l=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var h=o.getModel("emphasis");r=h.getModel("lineStyle").getLineStyle(),l=h.get("disabled"),a=h.get("focus"),s=h.get("blurScope")}n.useStyle(t.getItemVisual(e,"style")),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=r,sh(this,a,s,l)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}(qo);const MP=SP;var TP=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return m(e,t),e.prototype.createLine=function(t,e,i){return new MP(t,e,i)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];n+=Ut(r,a),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}else this._length=0},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e=t.__t<1?t.__t:2-t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var r,a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}var s=(e-n[r])/(n[r+1]-n[r]),l=i[r],h=i[r+1];t.x=l[0]*(1-s)+s*h[0],t.y=l[1]*(1-s)+s*h[1];var u=t.__t<1?h[0]-l[0]:l[0]-h[0],c=t.__t<1?h[1]-l[1]:l[1]-h[1];t.rotation=-Math.atan2(c,u)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},e}(CP);const EP=TP;var IP=function(){this.polyline=!1,this.curveness=0,this.segs=[]},DP=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return m(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new IP},e.prototype.buildPath=function(t,e){var i,n=e.segs,o=e.curveness;if(e.polyline)for(i=this._off;i<n.length;){var r=n[i++];if(r>0){t.moveTo(n[i++],n[i++]);for(var a=1;a<r;a++)t.lineTo(n[i++],n[i++])}}else for(i=this._off;i<n.length;){var s=n[i++],l=n[i++],h=n[i++],u=n[i++];if(t.moveTo(s,l),o>0){var c=(s+h)/2-(l-u)*o,d=(l+u)/2-(h-s)*o;t.quadraticCurveTo(c,d,h,u)}else t.lineTo(h,u)}this.incremental&&(this._off=i,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var i=this.shape,n=i.segs,o=i.curveness,r=this.style.lineWidth;if(i.polyline)for(var a=0,s=0;s<n.length;){var l=n[s++];if(l>0)for(var h=n[s++],u=n[s++],c=1;c<l;c++)if(fs(h,u,d=n[s++],p=n[s++],r,t,e))return a;a++}else for(a=0,s=0;s<n.length;){h=n[s++],u=n[s++];var d=n[s++],p=n[s++];if(o>0){if(ms(h,u,(h+d)/2-(u-p)*o,(u+p)/2-(d-h)*o,d,p,r,t,e))return a}else if(fs(h,u,d,p,r,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,i=1/0,n=1/0,o=-1/0,r=-1/0,a=0;a<e.length;){var s=e[a++],l=e[a++];i=Math.min(s,i),o=Math.max(s,o),n=Math.min(l,n),r=Math.max(l,r)}t=this._rect=new Ge(i,n,o,r)}return t},e}(Ps);const kP=function(){function t(){this.group=new qo}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var i=this._newAdded[0],n=e.getLayout("linesPoints"),o=i&&i.shape.segs;if(o&&o.length<2e4){var r=o.length,a=new Float32Array(r+n.length);a.set(o),a.set(n,r),i.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:n}),this._setCommon(s,e),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new DP({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=dl(t);r.seriesIndex=n.seriesIndex,t.on("mousemove",(function(e){r.dataIndex=null;var i=t.hoverDataIdx;i>0&&(r.dataIndex=i+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();var AP={seriesType:"lines",plan:sf(),reset:function(t){var e=t.coordinateSystem;if(e){var i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(n){var s=void 0,l=o.end-o.start;if(i){for(var h=0,u=o.start;u<o.end;u++)h+=t.getLineCoordsCount(u);s=new Float32Array(l+2*h)}else s=new Float32Array(4*l);var c=0,d=[];for(u=o.start;u<o.end;u++){var p=t.getLineCoords(u,a);i&&(s[c++]=p);for(var f=0;f<p;f++)d=e.dataToPoint(a[f],!1,d),s[c++]=d[0],s[c++]=d[1]}r.setLayout("linesPoints",s)}else for(u=o.start;u<o.end;u++){var g=r.getItemModel(u),m=(p=t.getLineCoords(u,a),[]);if(i)for(var v=0;v<p;v++)m.push(e.dataToPoint(a[v]));else{m[0]=e.dataToPoint(a[0]),m[1]=e.dataToPoint(a[1]);var y=g.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}r.setItemLayout(u,m)}}}}}};const LP=AP,RP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),r=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(n);var h=t.get("clip",!0)&&I_(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=LP.reset(t,e,i);r.progress&&r.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new kP:new Kk(o?n?EP:MP:n?CP:Xk),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=r),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(gm);var PP="undefined"==typeof Uint32Array?Array:Uint32Array,OP="undefined"==typeof Float64Array?Array:Float64Array;function zP(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=K(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),W([e,t[0],t[1]])})))}var NP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return m(e,t),e.prototype.init=function(e){e.data=e.data||[],zP(e);var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(zP(e),e.data){var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Et(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Et(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var r=this._getCoordsFromItemModel(t);for(o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),at(t[0])){for(var i=t.length,n=new PP(i),o=new OP(i),r=0,a=0,s=0,l=0;l<i;){s++;var h=t[l++];n[a++]=r+e,n[a++]=h;for(var u=0;u<h;u++){var c=t[l++],d=t[l++];o[r++]=c,o[r++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){var i=new Yw(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[o]:r:void 0})),i},e.prototype.formatTooltip=function(t,e,i){var n=this.getData().getItemModel(t),o=n.get("name");if(o)return o;var r=n.get("fromName"),a=n.get("toName"),s=[];return null!=r&&s.push(r),null!=a&&s.push(a),Rp("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(of);const BP=NP;function FP(t){return t instanceof Array||(t=[t,t]),t}const VP={seriesType:"lines",reset:function(t){var e=FP(t.get("symbol")),i=FP(t.get("symbolSize")),n=t.getData();return n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),{dataEach:n.hasItemOption?function(t,e){var i=t.getItemModel(e),n=FP(i.getShallow("symbol",!0)),o=FP(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var HP=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=T.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,i,n,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=i;for(var p=0;p<d;++p){var f=t[p],g=f[0],m=f[1],v=n(f[2]);c.globalAlpha=v,c.drawImage(a,g-h,m-h)}if(!u.width||!u.height)return u;for(var y=c.getImageData(0,0,u.width,u.height),b=y.data,x=0,w=b.length,_=this.minOpacity,C=this.maxOpacity-_;x<w;){v=b[x+3]/256;var S=4*Math.floor(255*v);if(v>0){var M=r(v)?s:l;v>0&&(v=v*C+_),b[x++]=M[S],b[x++]=M[S+1],b[x++]=M[S+2],b[x++]=M[S+3]*v*256}else x+=4}return c.putImageData(y,0,0),u},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=T.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},t.prototype._getGradient=function(t,e){for(var i=this._gradientPixels,n=i[e]||(i[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),n[r++]=o[0],n[r++]=o[1],n[r++]=o[2],n[r++]=o[3];return n},t}();const GP=HP;function WP(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var UP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):WP(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,i,n){var o=e.coordinateSystem;o&&(WP(o)?this.render(e,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,i,n,o){var r,a,s,l,h=t.coordinateSystem,u=D_(h,"cartesian2d");if(u){var c=h.getAxis("x"),d=h.getAxis("y");r=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),b=kh(t),x=t.getModel("emphasis"),w=x.get("focus"),_=x.get("blurScope"),C=x.get("disabled"),S=u?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=i;M<n;M++){var T=void 0,E=f.getItemVisual(M,"style");if(u){var I=f.get(S[0],M),D=f.get(S[1],M);if(isNaN(f.get(S[2],M))||isNaN(I)||isNaN(D)||I<s[0]||I>s[1]||D<l[0]||D>l[1])continue;var k=h.dataToPoint([I,D]);T=new qs({shape:{x:k[0]-r/2,y:k[1]-a/2,width:r,height:a},style:E})}else{if(isNaN(f.get(S[1],M)))continue;T=new qs({z2:1,shape:h.dataToRect([f.get(S[0],M)]).contentShape,style:E})}if(f.hasItemOption){var A=f.getItemModel(M),L=A.getModel("emphasis");g=L.getModel("itemStyle").getItemStyle(),m=A.getModel(["blur","itemStyle"]).getItemStyle(),v=A.getModel(["select","itemStyle"]).getItemStyle(),y=A.get(["itemStyle","borderRadius"]),w=L.get("focus"),_=L.get("blurScope"),C=L.get("disabled"),b=kh(A)}T.shape.r=y;var R=t.getRawValue(M),P="-";R&&null!=R[2]&&(P=R[2]+""),Dh(T,b,{labelFetcher:t,labelDataIndex:M,defaultOpacity:E.opacity,defaultText:P}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=m,T.ensureState("select").style=v,sh(T,w,_,C),T.incremental=o,o&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(M,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,i,n){var o=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new GP;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform();l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-u,g=p-c,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,(function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=u,o[1]-=c,o.push(n),o})),y=i.getExtent(),b="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(y,i.option.range):function(t,e,i){var n=t[1]-t[0],o=(e=K(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,r=0;return function(t){var n;for(n=r;n<o;n++)if((a=e[n].interval)[0]<=t&&t<=a[1]){r=n;break}if(n===o)for(n=r-1;n>=0;n--){var a;if((a=e[n].interval)[0]<=t&&t<=a[1]){r=n;break}}return n>=0&&n<o&&i[n]}}(y,i.getPieceList(),i.option.selected);s.update(v,f,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:r.color.getColorMapper()},b);var x=new Hs({style:{width:f,height:g,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(gm);const jP=UP,XP=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.getInitialData=function(t,e){return e_(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=qc.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(of);var YP=["itemStyle","borderWidth"],ZP=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],qP=new kf;function KP(t,e,i,n){var o=t.getItemLayout(e),r=i.get("symbolRepeat"),a=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,u=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:l,animationModel:u?i:null,hoverScale:u&&i.get(["emphasis","scale"]),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,o){var r,a=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(i[a.wh]<=0);if(it(s)){var c=[$P(l,s[0])-h,$P(l,s[1])-h];c[1]<c[0]&&c.reverse(),r=c[u]}else r=null!=s?$P(l,s)-h:e?n.coordSysExtent[a.index][u]-h:i[a.wh];o.boundingLength=r,e&&(o.repeatCutLength=i[a.wh]),o.pxSign=r>0?1:-1}(i,r,o,n,c),function(t,e,i,n,o,r,a,s,l,h){var u,c=l.valueDim,d=l.categoryDim,p=Math.abs(i[d.wh]),f=t.getItemVisual(e,"symbolSize");(u=it(f)?f.slice():null==f?["100%","100%"]:[f,f])[d.index]=nr(u[d.index],p),u[c.index]=nr(u[c.index],n?p:Math.abs(r)),h.symbolSize=u,(h.symbolScale=[u[0]/s,u[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,o,r,0,c.boundingLength,c.pxSign,h,n,c),function(t,e,i,n,o){var r=t.get(YP)||0;r&&(qP.attr({scaleX:e[0],scaleY:e[1],rotation:i}),qP.updateTransform(),r/=qP.getLineScale(),r*=e[n.valueDim.index]),o.valueLineWidth=r||0}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=Ev(i.get("symbolOffset"),d);return function(t,e,i,n,o,r,a,s,l,h,u,c){var d=u.categoryDim,p=u.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=pt(t.get("symbolMargin"),"15%")+"",b=!1;y.lastIndexOf("!")===y.length-1&&(b=!0,y=y.slice(0,y.length-1));var x=nr(y,e[p.index]),w=Math.max(g+2*x,0),_=b?0:2*x,C=br(n),S=C?n:dO((v+_)/w);w=g+2*(x=(v-S*g)/2/(b?S:Math.max(S-1,1))),_=b?0:2*x,C||"fixed"===n||(S=h?dO((Math.abs(h)+_)/w):0),m=S*w-_,c.repeatTimes=S,c.symbolMargin=x}var M=f*(m/2),T=c.pathPosition=[];T[d.index]=i[d.wh]/2,T[p.index]="start"===a?M:"end"===a?l-M:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var E=c.bundlePosition=[];E[d.index]=i[d.xy],E[p.index]=i[p.xy];var I=c.barRectShape=U({},i);I[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(T[p.index]+M)),I[d.wh]=i[d.wh];var D=c.clipShape={};D[d.xy]=-i[d.xy],D[d.wh]=u.ecSize[d.wh],D[p.xy]=0,D[p.wh]=i[p.wh]}(i,d,o,r,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function $P(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function JP(t){var e=t.symbolPatternSize,i=Mv(t.symbolType,-e/2,-e/2,e,e);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function QP(t,e,i,n){var o=t.__pictorialBundle,r=i.symbolSize,a=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,h=i.repeatTimes||0,u=0,c=r[e.valueDim.index]+a+2*i.symbolMargin;for(hO(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?uO(t,null,f(u),i,n):uO(t,null,{scaleX:0,scaleY:0},i,n,(function(){o.remove(t)})),u++}));u<h;u++){var d=JP(i);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,o.add(d);var p=f(u);uO(d,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},i,n)}function f(t){var e=s.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[l.index]=c*(o-h/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation}}}function tO(t,e,i,n){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?uO(r,null,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation},i,n):(r=t.__pictorialMainPath=JP(i),o.add(r),uO(r,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:0,scaleY:0,rotation:i.rotation},{scaleX:i.symbolScale[0],scaleY:i.symbolScale[1]},i,n))}function eO(t,e,i){var n=U({},e.barRectShape),o=t.__pictorialBarRect;o?uO(o,null,{shape:n},e,i):((o=t.__pictorialBarRect=new qs({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function iO(e,i,n,o){if(n.symbolClip){var r=e.__pictorialClipPath,a=U({},n.clipShape),s=i.valueDim,l=n.animationModel,h=n.dataIndex;if(r)bh(r,{shape:a},l,h);else{a[s.wh]=0,r=new qs({shape:a}),e.__pictorialBundle.setClipPath(r),e.__pictorialClipPath=r;var u={};u[s.wh]=n.clipShape[s.wh],t[o?"updateProps":"initProps"](r,{shape:u},l,h)}}}function nO(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=oO,i.isAnimationEnabled=rO,i}function oO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function rO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function aO(t,e,i,n){var o=new qo,r=new qo;return o.add(r),o.__pictorialBundle=r,r.x=i.bundlePosition[0],r.y=i.bundlePosition[1],i.symbolRepeat?QP(o,e,i):tO(o,0,i),eO(o,i,n),iO(o,e,i,n),o.__pictorialShapeStr=lO(t,i),o.__pictorialSymbolMeta=i,o}function sO(t,e,i,n){var o=n.__pictorialBarRect;o&&o.removeTextContent();var r=[];hO(n,(function(t){r.push(t)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),q(r,(function(t){_h(t,{scaleX:0,scaleY:0},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function lO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function hO(t,e,i){q(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function uO(e,i,n,o,r,a){i&&e.attr(i),o.symbolClip&&!r?n&&e.attr(n):n&&t[r?"updateProps":"initProps"](e,n,o.animationModel,o.dataIndex,a)}function cO(t,e,i){var n=i.dataIndex,o=i.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),h=o.getShallow("cursor"),u=r.get("focus"),c=r.get("blurScope"),d=r.get("scale");hO(t,(function(t){if(t instanceof Hs){var e=t.style;t.useStyle(U({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},i.style))}else t.useStyle(i.style);var n=t.ensureState("emphasis");n.style=a,d&&(n.scaleX=1.1*t.scaleX,n.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,h&&(t.cursor=h),t.z2=i.z2}));var p=e.valueDim.posDesc[+(i.boundingLength>0)];Dh(t.__pictorialBarRect,kh(o),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:n_(e.seriesModel.getData(),n),inheritColor:i.style.fill,defaultOpacity:i.style.opacity,defaultOutsidePosition:p}),sh(t,u,c,r.get("disabled"))}function dO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const pO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=this.group,o=t.getData(),r=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:ZP[+s],categoryDim:ZP[1-+s]};return o.diff(r).add((function(t){if(o.hasValue(t)){var e=nO(o,t),i=KP(o,t,e,h),r=aO(o,h,i);o.setItemGraphicEl(t,r),n.add(r),cO(r,h,i)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(o.hasValue(t)){var a=nO(o,t),s=KP(o,t,a,h),l=lO(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex;bh(t.__pictorialBundle,{x:i.bundlePosition[0],y:i.bundlePosition[1]},n,o),i.symbolRepeat?QP(t,e,i,!0):tO(t,0,i,!0),eO(t,i,!0),iO(t,e,i,!0)}(i,h,s):i=aO(o,h,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),cO(i,h,s)}else n.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&sO(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=o,this.group},e.prototype.remove=function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){sO(n,dl(e).dataIndex,t,e)})):i.removeAll()},e.type="pictorialBar",e}(gm),fO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i.defaultSymbol="roundRect",i}return m(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ou(eC.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(eC);var gO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._layers=[],i}return m(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=n.getLayout("layoutInfo"),l=s.rect,h=s.boundaryGap;function u(t){return t.name}r.x=0,r.y=l.y+h[0];var c=new _w(this._layersSeries||[],a,u,u),d=[];function p(e,i,s){var l=o._layers;if("remove"!==e){for(var h,u,c=[],p=[],f=a[i].indices,g=0;g<f.length;g++){var m=n.getItemLayout(f[g]),v=m.x,y=m.y0,b=m.y;c.push(v,y),p.push(v,y+b),h=n.getItemVisual(f[g],"style")}var x=n.getItemLayout(f[0]),w=t.getModel("label").get("margin"),_=t.getModel("emphasis");if("add"===e){var C=d[i]=new qo;u=new M_({shape:{points:c,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),C.add(u),r.add(C),t.isAnimationEnabled()&&u.setClipPath(function(t,e,i){var n=new qs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return xh(n,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,(function(){u.removeClipPath()})),n}(u.getBoundingRect(),t))}else C=l[s],u=C.childAt(0),r.add(C),d[i]=C,bh(u,{shape:{points:c,stackedOnPoints:p}},t),Mh(u);Dh(u,kh(t),{labelDataIndex:f[g-1],defaultText:n.getName(f[g-1]),inheritColor:h.fill},{normal:{verticalAlign:"middle"}}),u.setTextConfig({position:null,local:!0});var S=u.getTextContent();S&&(S.x=x.x-w,S.y=x.y0+x.y/2),u.useStyle(h),n.setItemGraphicEl(i,u),ch(u,t),sh(u,_.get("focus"),_.get("blurScope"),_.get("disabled"))}else r.remove(l[i])}c.add(tt(p,this,"add")).update(tt(p,this,"update")).remove(tt(p,this,"remove")).execute(),this._layersSeries=a,this._layers=d},e.type="themeRiver",e}(gm);const mO=gO;var vO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new GC(tt(this.getData,this),tt(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,i={},n=Xr(t,(function(t){return i.hasOwnProperty(t[0]+"")||(i[t[0]+""]=-1),t[2]})),o=[];n.buckets.each((function(t,e){o.push({name:e,dataList:t})}));for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var h=o[a].dataList[l][0]+"";i[h]=a}for(var h in i)i.hasOwnProperty(h)&&i[h]!==a&&(i[h]=a,t[e]=[h,0,s],e++)}return t},e.prototype.getInitialData=function(t,e){for(var i=this.getReferringComponents("singleAxis",Gr).models[0].get("type"),n=J(t.data,(function(t){return void 0!==t[2]})),o=this.fixData(n||[]),r=[],a=this.nameMap=Tt(),s=0,l=0;l<o.length;++l)r.push(o[l][2]),a.get(o[l][2])||(a.set(o[l][2],s),s++);var h=Zw(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Mw(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,u=new Yw(h,this);return u.initData(o),u},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;var o=t.mapDimension("single"),r=Xr(i,(function(e){return t.get("name",e)})),a=[];return r.buckets.each((function(e,i){e.sort((function(e,i){return t.get(o,e)-t.get(o,i)})),a.push({name:i,indices:e})})),a},e.prototype.getAxisTooltipData=function(t,e,i){it(t)||(t=t?[t]:[]);for(var n,o=this.getData(),r=this.getLayerSeries(),a=[],s=r.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-1,c=r[l].indices.length,d=0;d<c;++d){var p=o.get(t[0],r[l].indices[d]),f=Math.abs(p-e);f<=h&&(n=p,h=f,u=r[l].indices[d])}a.push(u)}return{dataIndices:a,nestestValue:n}},e.prototype.formatTooltip=function(t,e,i){var n=this.getData();return Rp("nameValue",{name:n.getName(t),value:n.get(n.mapDimension("value"),t)})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(of);const yO=vO;function bO(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var r=t.get("boundaryGap"),a=i.getAxis();n.boundaryGap=r,"horizontal"===a.orient?(r[0]=nr(r[0],o.height),r[1]=nr(r[1],o.height),xO(e,t,o.height-r[0]-r[1])):(r[0]=nr(r[0],o.width),r[1]=nr(r[1],o.width),xO(e,t,o.width-r[0]-r[1])),e.setLayout("layoutInfo",n)}))}function xO(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,r=e.getLayerSeries(),a=t.mapDimension("single"),s=t.mapDimension("value"),l=K(r,(function(e){return K(e.indices,(function(e){var i=o.dataToPoint(t.get(a,e));return i[1]=t.get(s,e),i}))})),h=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],r=0,a=0;a<i;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];s>r&&(r=s),n.push(s)}for(var h=0;h<i;++h)o[h]=(r-n[h])/2;r=0;for(var u=0;u<i;++u){var c=n[u]+o[u];c>r&&(r=c)}return{y0:o,max:r}}(l),u=h.y0,c=i/h.max,d=r.length,p=r[0].indices.length,f=0;f<p;++f){n=u[f]*c,t.setItemLayout(r[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:n,y:l[0][f][1]*c});for(var g=1;g<d;++g)n+=l[g-1][f][1]*c,t.setItemLayout(r[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:n,y:l[g][f][1]*c})}}var wO=function(t){function e(e,i,n,o){var r=t.call(this)||this;r.z2=2,r.textConfig={inside:!0},dl(r).seriesIndex=i.seriesIndex;var a=new cl({z2:4,silent:e.getModel().get(["label","silent"])});return r.setTextContent(a),r.updateData(!0,e,i,n,o),r}return m(e,t),e.prototype.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var r=this;dl(r).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),h=U({},l);h.label=null;var u=e.getVisual("style");u.lineJoin="bevel";var c=e.getVisual("decal");c&&(u.decal=iy(c,o));var d=lC(a.getModel("itemStyle"),h,!0);U(h,d),q(wl,(function(t){var e=r.ensureState(t),i=a.getModel([t,"itemStyle"]);e.style=i.getItemStyle();var n=lC(i,h);n&&(e.shape=n)})),t?(r.setShape(h),r.shape.r=l.r0,xh(r,{shape:{r:l.r}},i,e.dataIndex)):(bh(r,{shape:h},i),Mh(r)),r.useStyle(u),this._updateLabel(i);var p=a.getShallow("cursor");p&&r.attr("cursor",p),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var f=s.get("focus");sh(this,"ancestor"===f?e.getAncestorsIndices():"descendant"===f?e.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),r=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),h=this,u=h.getTextContent(),c=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,p=n.get("show")&&!(null!=d&&Math.abs(r)<d);function f(t,e){var i=t.get(e);return null==i?n.get(e):i}u.ignore=!p,q(_l,(function(n){var d="normal"===n?i.getModel("label"):i.getModel([n,"label"]),p="normal"===n,g=p?u:u.ensureState(n),m=t.getFormattedLabel(c,n);p&&(m=m||e.node.name),g.style=Ah(d,{},null,"normal"!==n,!0),m&&(g.style.text=m);var v=d.get("show");null==v||p||(g.ignore=!v);var y,b=f(d,"position"),x=p?h:h.states[n],w=x.style.fill;x.textConfig={outsideFill:"inherit"===d.get("color")?w:null,inside:"outside"!==b};var _=f(d,"distance")||0,C=f(d,"align");"outside"===b?(y=o.r+_,C=a>Math.PI/2?"right":"left"):C&&"center"!==C?"left"===C?(y=o.r0+_,a>Math.PI/2&&(C="right")):"right"===C&&(y=o.r-_,a>Math.PI/2&&(C="left")):(y=r===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,C="center"),g.style.align=C,g.style.verticalAlign=f(d,"verticalAlign")||"middle",g.x=y*s+o.cx,g.y=y*l+o.cy;var S=f(d,"rotate"),M=0;"radial"===S?(M=ys(-a))>Math.PI/2&&M<1.5*Math.PI&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-a)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):at(S)&&(M=S*Math.PI/180),g.rotation=ys(M)})),u.dirtyStyle()},e}(Zf);const _O=wO;var CO="sunburstRootToNode",SO="sunburstHighlight",MO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=e;var r=t.getData(),a=r.tree.root,s=t.getViewRoot(),l=this.group,h=t.get("renderLabelForZeroData"),u=[];s.eachNode((function(t){u.push(t)}));var c=this._oldChildren||[];!function(n,o){function s(t){return t.getId()}function u(s,u){!function(n,o){if(h||!n||n.getValue()||(n=null),n!==a&&o!==a)if(o&&o.piece)n?(o.piece.updateData(!1,n,t,e,i),r.setItemGraphicEl(n.dataIndex,o.piece)):(u=o)&&u.piece&&(l.remove(u.piece),u.piece=null);else if(n){var s=new _O(n,t,e,i);l.add(s),r.setItemGraphicEl(n.dataIndex,s)}var u}(null==s?null:n[s],null==u?null:o[u])}0===n.length&&0===o.length||new _w(o,n,s,s).add(u).update(u).remove(et(u,null)).execute()}(u,c),function(n,r){r.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,n,t,e,i):(o.virtualPiece=new _O(n,t,e,i),l.add(o.virtualPiece)),r.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(r.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=u},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var i=!1;t.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var r=n.getModel(),a=r.get("link");a&&Ku(a,r.get("target",!0)||"_blank")}i=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:CO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,r=Math.sqrt(n*n+o*o);return r<=i.r&&r>=i.r0}},e.type="sunburst",e}(gm);const TO=MO;function EO(t){var e=0;q(t.children,(function(t){EO(t);var i=t.value;it(i)&&(i=i[0]),e+=i}));var i=t.value;it(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),it(t.value)?t.value[0]=i:t.value=i}const IO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreStyleOnData=!0,i}return m(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};EO(i);var n=this._levelModels=K(t.levels||[],(function(t){return new eu(t,this,e)}),this),o=ZI.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e),r=n[i.depth];return r&&(t.parentModel=r),t}))}));return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treePathInfo=JI(n,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){rD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(of);var DO=Math.PI/180;function kO(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");it(n)||(n=[0,n]),it(e)||(e=[e,e]);var o=i.getWidth(),r=i.getHeight(),a=Math.min(o,r),s=nr(e[0],o),l=nr(e[1],r),h=nr(n[0],a/2),u=nr(n[1],a/2),c=-t.get("startAngle")*DO,d=t.get("minAngle")*DO,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,m=t.get("sort");null!=m&&AO(f,m);var v=0;q(f.children,(function(t){!isNaN(t.getValue())&&v++}));var y=f.getValue(),b=Math.PI/(y||v)*2,x=f.depth>0,w=f.height-(x?-1:1),_=(u-h)/(w||1),C=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=C?1:-1,T=function(e,i){if(e){var n=i;if(e!==p){var o=e.getValue(),r=0===y&&S?b:o*b;r<d&&(r=d),n=i+M*r;var u=e.depth-g-(x?-1:1),c=h+_*u,f=h+_*(u+1),m=t.getLevelModel(e);if(m){var v=m.get("r0",!0),w=m.get("r",!0),E=m.get("radius",!0);null!=E&&(v=E[0],w=E[1]),null!=v&&(c=nr(v,a/2)),null!=w&&(f=nr(w,a/2))}e.setLayout({angle:r,startAngle:i,endAngle:n,clockwise:C,cx:s,cy:l,r0:c,r:f})}if(e.children&&e.children.length){var I=0;q(e.children,(function(t){I+=T(t,i+I)}))}return n-i}};if(x){var E=h,I=h+_,D=2*Math.PI;p.setLayout({angle:D,startAngle:c,endAngle:c+D,clockwise:C,cx:s,cy:l,r0:E,r:I})}T(f,c)}))}function AO(t,e){var i=t.children||[];t.children=function(t,e){if(nt(e)){var i=K(t,(function(t,e){var i=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return i}},index:e}}));return i.sort((function(t,i){return e(t.params,i.params)})),K(i,(function(e){return t[e.index]}))}var n="asc"===e;return t.sort((function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0===i?(t.dataIndex-e.dataIndex)*(n?-1:1):i}))}(i,e),i.length&&q(t.children,(function(t){AO(t,e)}))}function LO(t){var e={};t.eachSeriesByType("sunburst",(function(t){var i=t.getData(),n=i.tree;n.eachNode((function(o){var r=o.getModel().getModel("itemStyle").getItemStyle();r.fill||(r.fill=function(t,i,n){for(var o=t;o&&o.depth>1;)o=o.parentNode;var r=i.getColorFromPalette(o.name||o.dataIndex+"",e);return t.depth>1&&ot(r)&&(r=ln(r,(t.depth-1)/(n-1)*.5)),r}(o,t,n.root.height)),U(i.ensureUniqueItemVisual(o.dataIndex,"style"),r)}))}))}var RO={color:"fill",borderColor:"stroke"},PO={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},OO=Br();const zO=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return e_(null,this)},e.prototype.getDataParams=function(e,i,n){var o=t.prototype.getDataParams.call(this,e,i);return n&&(o.info=OO(n).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(of);function NO(t,e){return e=e||[0,0],K(["x","y"],(function(i,n){var o=this.getAxis(i),r=e[n],a=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function BO(t,e){return e=e||[0,0],K([0,1],(function(i){var n=e[i],o=t[i]/2,r=[],a=[];return r[i]=n-o,a[i]=n+o,r[1-i]=a[1-i]=e[1-i],Math.abs(this.dataToPoint(r)[i]-this.dataToPoint(a)[i])}),this)}function FO(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function VO(t,e){return e=e||[0,0],K(["Radius","Angle"],(function(i,n){var o=this["get"+i+"Axis"](),r=e[n],a=t[n]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===i&&(s=s*Math.PI/180),s}),this)}function HO(t,e,i,n){return t&&(t.legacy||!1!==t.legacy&&!i&&!n&&"tspan"!==e&&("text"===e||kt(t,"text")))}function GO(t,e,i){var n,o,r,a=t;if("text"===e)r=a;else{r={},kt(a,"text")&&(r.text=a.text),kt(a,"rich")&&(r.rich=a.rich),kt(a,"textFill")&&(r.fill=a.textFill),kt(a,"textStroke")&&(r.stroke=a.textStroke),kt(a,"fontFamily")&&(r.fontFamily=a.fontFamily),kt(a,"fontSize")&&(r.fontSize=a.fontSize),kt(a,"fontStyle")&&(r.fontStyle=a.fontStyle),kt(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,silent:!0},n={};var s=kt(a,"textPosition");i?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),kt(a,"textPosition")&&(n.position=a.textPosition),kt(a,"textOffset")&&(n.offset=a.textOffset),kt(a,"textRotation")&&(n.rotation=a.textRotation),kt(a,"textDistance")&&(n.distance=a.textDistance)}return WO(r,t),q(r.rich,(function(t){WO(t,t)})),{textConfig:n,textContent:o}}function WO(t,e){e&&(e.font=e.textFont||e.font,kt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),kt(e,"textAlign")&&(t.align=e.textAlign),kt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),kt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),kt(e,"textWidth")&&(t.width=e.textWidth),kt(e,"textHeight")&&(t.height=e.textHeight),kt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),kt(e,"textPadding")&&(t.padding=e.textPadding),kt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),kt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),kt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),kt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),kt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),kt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),kt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function UO(t,e,i){var n=t;n.textPosition=n.textPosition||i.position||"inside",null!=i.offset&&(n.textOffset=i.offset),null!=i.rotation&&(n.textRotation=i.rotation),null!=i.distance&&(n.textDistance=i.distance);var o=n.textPosition.indexOf("inside")>=0,r=t.fill||"#000";jO(n,e);var a=null==n.textFill;return o?a&&(n.textFill=i.insideFill||"#fff",!n.textStroke&&i.insideStroke&&(n.textStroke=i.insideStroke),!n.textStroke&&(n.textStroke=r),null==n.textStrokeWidth&&(n.textStrokeWidth=2)):(a&&(n.textFill=t.fill||i.outsideFill||"#000"),!n.textStroke&&i.outsideStroke&&(n.textStroke=i.outsideStroke)),n.text=e.text,n.rich=e.rich,q(e.rich,(function(t){jO(t,t)})),n}function jO(t,e){e&&(kt(e,"fill")&&(t.textFill=e.fill),kt(e,"stroke")&&(t.textStroke=e.fill),kt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),kt(e,"font")&&(t.font=e.font),kt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),kt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),kt(e,"fontSize")&&(t.fontSize=e.fontSize),kt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),kt(e,"align")&&(t.textAlign=e.align),kt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),kt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),kt(e,"width")&&(t.textWidth=e.width),kt(e,"height")&&(t.textHeight=e.height),kt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),kt(e,"padding")&&(t.textPadding=e.padding),kt(e,"borderColor")&&(t.textBorderColor=e.borderColor),kt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),kt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),kt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),kt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),kt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),kt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),kt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),kt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),kt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),kt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var XO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},YO=Q(XO),ZO=($(Mo,(function(t,e){return t[e]=1,t}),{}),Mo.join(", "),["","style","shape","extra"]),qO=Br();function KO(t,e,i,n,o){var r=t+"Animation",a=vh(t,n,o)||{},s=qO(e).userDuring;return a.duration>0&&(a.during=s?tt(nz,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),U(a,i[r]),a}function $O(t,e,i,n){var o=(n=n||{}).dataIndex,r=n.isInit,a=n.clearStyle,s=i.isAnimationEnabled(),l=qO(t),h=e.style;l.userDuring=e.during;var u={},c={};if(function(t,e,i){for(var n=0;n<YO.length;n++){var o=YO[n],r=XO[o],a=e[o];a&&(i[r[0]]=a[0],i[r[1]]=a[1])}for(n=0;n<Mo.length;n++){var s=Mo[n];null!=e[s]&&(i[s]=e[s])}}(0,e,c),rz("shape",e,c),rz("extra",e,c),!r&&s&&(function(t,e,i){for(var n=e.transition,o=tz(n)?Mo:Tr(n||[]),r=0;r<o.length;r++){var a=o[r];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=t[a];i[a]=s}}}(t,e,u),oz("shape",t,e,u),oz("extra",t,e,u),function(t,e,i,n){if(i){var o,r=t.style;if(r){var a=i.transition,s=e.transition;if(a&&!tz(a)){var l=Tr(a);!o&&(o=n.style={});for(var h=0;h<l.length;h++){var u=r[f=l[h]];o[f]=u}}else if(t.getAnimationStyleProps&&(tz(s)||tz(a)||X(s,"style")>=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!o&&(o=n.style={});var p=Q(i);for(h=0;h<p.length;h++){var f;d[f=p[h]]&&(u=r[f],o[f]=u)}}}}}}(t,e,h,u)),c.style=h,function(t,e,i){var n=e.style;if(!t.isGroup&&n){if(i){t.useStyle({});for(var o=t.animators,r=0;r<o.length;r++){var a=o[r];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}(t,c,a),function(t,e){kt(e,"silent")&&(t.silent=e.silent),kt(e,"ignore")&&(t.ignore=e.ignore),t instanceof La&&kt(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ps&&kt(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}(t,e),s)if(r){var d={};q(ZO,(function(t){var i=t?e[t]:e;i&&i.enterFrom&&(t&&(d[t]=d[t]||{}),U(t?d[t]:d,i.enterFrom))}));var p=KO("enter",t,e,i,o);p.duration>0&&t.animateFrom(d,p)}else!function(t,e,i,n,o){if(o){var r=KO("update",t,e,n,i);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,i,u);JO(t,e),h?t.dirty():t.markRedraw()}function JO(t,e){for(var i=qO(t).leaveToProps,n=0;n<ZO.length;n++){var o=ZO[n],r=o?e[o]:e;r&&r.leaveTo&&(i||(i=qO(t).leaveToProps={}),o&&(i[o]=i[o]||{}),U(o?i[o]:i,r.leaveTo))}}function QO(t,e,i,n){if(t){var o=t.parent,r=qO(t).leaveToProps;if(r){var a=KO("update",t,e,i,0);a.done=function(){o.remove(t),n&&n()},t.animateTo(r,a)}else o.remove(t),n&&n()}}function tz(t){return"all"===t}var ez={},iz={setTransform:function(t,e){return ez.el[t]=e,this},getTransform:function(t){return ez.el[t]},setShape:function(t,e){var i=ez.el;return(i.shape||(i.shape={}))[t]=e,i.dirtyShape&&i.dirtyShape(),this},getShape:function(t){var e=ez.el.shape;if(e)return e[t]},setStyle:function(t,e){var i=ez.el,n=i.style;return n&&(n[t]=e,i.dirtyStyle&&i.dirtyStyle()),this},getStyle:function(t){var e=ez.el.style;if(e)return e[t]},setExtra:function(t,e){return(ez.el.extra||(ez.el.extra={}))[t]=e,this},getExtra:function(t){var e=ez.el.extra;if(e)return e[t]}};function nz(){var t=this,e=t.el;if(e){var i=qO(e).userDuring,n=t.userDuring;i===n?(ez.el=e,n(iz)):t.el=t.userDuring=null}}function oz(t,e,i,n){var o=i[t];if(o){var r,a=e[t];if(a){var s=i.transition,l=o.transition;if(l)if(!r&&(r=n[t]={}),tz(l))U(r,a);else for(var h=Tr(l),u=0;u<h.length;u++){var c=a[p=h[u]];r[p]=c}else if(tz(s)||X(s,t)>=0){!r&&(r=n[t]={});var d=Q(a);for(u=0;u<d.length;u++){var p;c=a[p=d[u]],az(o[p],c)&&(r[p]=c)}}}}}function rz(t,e,i){var n=e[t];if(n)for(var o=i[t]={},r=Q(n),a=0;a<r.length;a++){var s=r[a];o[s]=Fn(n[s])}}function az(t,e){return Z(t)?t!==e:null!=t&&isFinite(t)}var sz=Br(),lz=["percent","easing","shape","style","extra"];function hz(t){t.stopAnimation("keyframe"),t.attr(sz(t))}function uz(t,e,i){if(i.isAnimationEnabled()&&e)if(it(e))q(e,(function(e){uz(t,e,i)}));else{var n=e.keyframes,o=e.duration;if(i&&null==o){var r=vh("enter",i,0);o=r&&r.duration}if(n&&o){var a=sz(t);q(ZO,(function(i){var r;i&&!t[i]||(n.sort((function(t,e){return t.percent-e.percent})),q(n,(function(n){var s=t.animators,l=i?n[i]:n;if(l){var h=Q(l);if(i||(h=J(h,(function(t){return X(lz,t)<0}))),h.length){r||((r=t.animate(i,e.loop,!0)).scope="keyframe");for(var u=0;u<s.length;u++)s[u]!==r&&s[u].targetName===r.targetName&&s[u].stopTracks(h);i&&(a[i]=a[i]||{});var c=i?a[i]:a;q(h,(function(e){c[e]=((i?t[i]:t)||{})[e]})),r.whenWithKeys(o*n.percent,l,h,n.easing)}}})),r&&r.delay(e.delay||0).duration(o).start(e.easing))}))}}}var cz="emphasis",dz="normal",pz="blur",fz="select",gz=[dz,cz,pz,fz],mz={normal:["itemStyle"],emphasis:[cz,"itemStyle"],blur:[pz,"itemStyle"],select:[fz,"itemStyle"]},vz={normal:["label"],emphasis:[cz,"label"],blur:[pz,"label"],select:[fz,"label"]},yz=["x","y"],bz="e\0\0",xz={normal:{},emphasis:{},blur:{},select:{}},wz={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:tt(NO,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:tt(BO,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:tt(FO,t)}}},polar:function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(n){var o=e.dataToRadius(n[0]),r=i.dataToAngle(n[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:tt(VO,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};function _z(t){return t instanceof Ps}function Cz(t){return t instanceof La}const Sz=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=Dz(t,r,e,i);o||a.removeAll(),r.diff(o).add((function(e){Az(i,null,e,s(e,n),t,a,r)})).remove((function(e){var i=o.getItemGraphicEl(e);i&&QO(i,OO(i).option,t)})).update((function(e,l){var h=o.getItemGraphicEl(l);Az(i,h,e,s(e,n),t,a,r)})).execute();var l=t.get("clip",!0)?I_(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,i,n,o){var r=e.getData(),a=Dz(e,r,i,n),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var u=Az(null,null,h,a(h,o),e,this.group,r);u&&(u.traverse(l),s.push(u))}},e.prototype.eachRendered=function(t){am(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(gm);function Mz(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,r=Hz(n);e=Fg(r,null,o,n.layout||"center"),OO(e).customPathData=r}else if("image"===i)e=new Hs({}),OO(e).customImagePath=t.style.image;else if("text"===i)e=new cl({});else if("group"===i)e=new qo;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var a=Bg(i);a||$d(""),e=new a}return OO(e).customGraphicType=i,e.name=t.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function Tz(t,e,i,n,o,r,a){hz(e);var s=o&&o.normal.cfg;s&&e.setTextConfig(s),n&&null==n.transition&&(n.transition=yz);var l=n&&n.style;if(l){if("text"===e.type){var h=l;kt(h,"textFill")&&(h.fill=h.textFill),kt(h,"textStroke")&&(h.stroke=h.textStroke)}var u=void 0,c=_z(e)?l.decal:null;t&&c&&(c.dirty=!0,u=iy(c,t)),l.__decalPattern=u}Cz(e)&&l&&(u=l.__decalPattern)&&(l.decal=u),$O(e,n,r,{dataIndex:i,isInit:a,clearStyle:!0}),uz(e,n.keyframeAnimation,r)}function Ez(t,e,i,n,o){var r=e.isGroup?null:e,a=o&&o[t].cfg;if(r){var s=r.ensureState(t);if(!1===n){var l=r.getState(t);l&&(l.style=null)}else s.style=n||null;a&&(s.textConfig=a),Ul(r)}}function Iz(t,e,i){var n=i===dz,o=n?e:Oz(e,i),r=o?o.z2:null;null!=r&&((n?t:t.ensureState(i)).z2=r||0)}function Dz(t,e,i,n){var o=t.get("renderItem"),r=t.coordinateSystem,a={};r&&(a=r.prepareCustoms?r.prepareCustoms(r):wz[r.type](r));for(var s,l,h=j({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=s),e.getStore().get(e.getDimensionIndex(t||0),i)},style:function(i,n){null==n&&(n=s);var o=e.getItemVisual(n,"style"),r=o&&o.fill,a=o&&o.opacity,l=y(n,dz).getItemStyle();null!=r&&(l.fill=r),null!=a&&(l.opacity=a);var h={inheritColor:ot(r)?r:"#000"},u=b(n,dz),c=Ah(u,null,h,!1,!0);c.text=u.getShallow("show")?ft(t.getFormattedLabel(n,dz),n_(e,n)):null;var d=Lh(u,h,!1);return w(i,l),l=UO(l,c,d),i&&x(l,i),l.legacy=!0,l},ordinalRawValue:function(t,i){null==i&&(i=s),t=t||0;var n=e.getDimensionInfo(t);if(!n){var o=e.getDimensionIndex(t);return o>=0?e.getStore().get(o,i):void 0}var r=e.get(n.name,i),a=n&&n.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(i,n){null==n&&(n=s);var o=y(n,cz).getItemStyle(),r=b(n,cz),a=Ah(r,null,null,!0,!0);a.text=r.getShallow("show")?gt(t.getFormattedLabel(n,cz),t.getFormattedLabel(n,dz),n_(e,n)):null;var l=Lh(r,null,!0);return w(i,o),o=UO(o,a,l),i&&x(o,i),o.legacy=!0,o},visual:function(t,i){if(null==i&&(i=s),kt(RO,t)){var n=e.getItemVisual(i,"style");return n?n[RO[t]]:null}if(kt(PO,t))return e.getItemVisual(i,t)},barLayout:function(t){if("cartesian2d"===r.type)return function(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var o=i.getBandWidth(),r=0;r<t.count;r++)e.push(j({bandWidth:o,axisKey:n,stackId:U_+r},t));var a=q_(e),s=[];for(r=0;r<t.count;r++){var l=a[n][U_+r];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(j({axis:r.getBaseAxis()},t))},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return Nh(t,i)}},a.api||{}),u={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:kz(t.getData())},c={},d={},p={},f={},g=0;g<gz.length;g++){var m=gz[g];p[m]=t.getModel(mz[m]),f[m]=t.getModel(vz[m])}function v(t){return t===s?l||(l=e.getItemModel(t)):e.getItemModel(t)}function y(t,i){return e.hasItemOption?t===s?c[i]||(c[i]=v(t).getModel(mz[i])):v(t).getModel(mz[i]):p[i]}function b(t,i){return e.hasItemOption?t===s?d[i]||(d[i]=v(t).getModel(vz[i])):v(t).getModel(vz[i]):f[i]}return function(t,i){return s=t,l=null,c={},d={},o&&o(j({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},u),h)};function x(t,e){for(var i in e)kt(e,i)&&(t[i]=e[i])}function w(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function kz(t){var e={};return q(t.dimensions,(function(i){var n=t.getDimensionInfo(i);if(!n.isExtraCoord){var o=n.coordDim;(e[o]=e[o]||[])[n.coordDimIndex]=t.getDimensionIndex(i)}})),e}function Az(t,e,i,n,o,r,a){if(n){var s=Lz(t,e,i,n,o,r);return s&&a.setItemGraphicEl(i,s),s&&sh(s,n.focus,n.blurScope,n.emphasisDisabled),s}r.remove(e)}function Lz(t,e,i,n,o,r){var a=-1,s=e;e&&Rz(e,n,o)&&(a=X(r.childrenRef(),e),e=null);var l,h,u=!e,c=e;c?c.clearStates():(c=Mz(n),s&&(l=s,(h=c).copyTransform(l),Cz(h)&&Cz(l)&&(h.setStyle(l.style),h.z=l.z,h.z2=l.z2,h.zlevel=l.zlevel,h.invisible=l.invisible,h.ignore=l.ignore,_z(h)&&_z(l)&&h.setShape(l.shape)))),!1===n.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),xz.normal.cfg=xz.normal.conOpt=xz.emphasis.cfg=xz.emphasis.conOpt=xz.blur.cfg=xz.blur.conOpt=xz.select.cfg=xz.select.conOpt=null,xz.isLegacy=!1,function(t,e,i,n,o,r){if(!t.isGroup){Pz(i,null,r),Pz(i,cz,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,h=r.select.conOpt;if(null!=a||null!=s||null!=h||null!=l){var u=t.getTextContent();if(!1===a)u&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},u?u.clearStates():(u=Mz(a),t.setTextContent(u)),Tz(null,u,e,a,null,n,o);for(var c=a&&a.style,d=0;d<gz.length;d++){var p=gz[d];if(p!==dz)Ez(p,u,0,zz(a,r[p].conOpt,p),null)}c?u.dirty():u.markRedraw()}}}}(c,i,n,o,u,xz),function(t,e,i,n,o){var r=i.clipPath;if(!1===r)t&&t.getClipPath()&&t.removeClipPath();else if(r){var a=t.getClipPath();a&&Rz(a,r,n)&&(a=null),a||(a=Mz(r),t.setClipPath(a)),Tz(null,a,e,r,null,n,o)}}(c,i,n,o,u),Tz(t,c,i,n,xz,o,u),kt(n,"info")&&(OO(c).info=n.info);for(var d=0;d<gz.length;d++){var p=gz[d];if(p!==dz)Ez(p,c,0,zz(n,Oz(n,p),p),xz)}return function(t,e,i){if(!t.isGroup){var n=t,o=i.currentZ,r=i.currentZLevel;n.z=o,n.zlevel=r;var a=e.z2;null!=a&&(n.z2=a||0);for(var s=0;s<gz.length;s++)Iz(n,e,gz[s])}}(c,n,o),"group"===n.type&&function(t,e,i,n,o){var r=n.children,a=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,h=!1===s;if(a||l||h){if(l)return u={api:t,oldChildren:e.children()||[],newChildren:r||[],dataIndex:i,seriesModel:o,group:e},void new _w(u.oldChildren,u.newChildren,Bz,Bz,u).add(Fz).update(Fz).remove(Vz).execute();var u;h&&e.removeAll();for(var c=0;c<a;c++){var d=r[c],p=e.childAt(c);d?(null==d.ignore&&(d.ignore=!1),Lz(t,p,i,d,o,e)):p.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var g=e.childAt(f);Nz(e,g,o)}}}(t,c,i,n,o),a>=0?r.replaceAt(c,a):r.add(c),c}function Rz(t,e,i){var n,o=OO(t),r=e.type,a=e.shape,s=e.style;return i.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&(n=a)&&(kt(n,"pathData")||kt(n,"d"))&&Hz(a)!==o.customPathData||"image"===r&&kt(s,"image")&&s.image!==o.customImagePath}function Pz(t,e,i){var n=e?Oz(t,e):t,o=e?zz(t,n,cz):t.style,r=t.type,a=n?n.textConfig:null,s=t.textContent,l=s?e?Oz(s,e):s:null;if(o&&(i.isLegacy||HO(o,r,!!a,!!l))){i.isLegacy=!0;var h=GO(o,r,!e);!a&&h.textConfig&&(a=h.textConfig),!l&&h.textContent&&(l=h.textContent)}if(!e&&l){var u=l;!u.type&&(u.type="text")}var c=e?i[e]:i.normal;c.cfg=a,c.conOpt=l}function Oz(t,e){return e?t?t[e]:null:t}function zz(t,e,i){var n=e&&e.style;return null==n&&i===cz&&t&&(n=t.styleEmphasis),n}function Nz(t,e,i){e&&QO(e,OO(t).option,i)}function Bz(t,e){var i=t&&t.name;return null!=i?i:bz+e}function Fz(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,o=null!=e?i.oldChildren[e]:null;Lz(i.api,o,i.dataIndex,n,i.seriesModel,i.group)}function Vz(t){var e=this.context,i=e.oldChildren[t];i&&QO(i,OO(i).option,e.seriesModel)}function Hz(t){return t&&(t.pathData||t.d)}var Gz=Br(),Wz=H,Uz=tt,jz=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,e,i,n){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=et(Xz,e,u);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new qo,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);Kz(a,e,!0),this._renderHandle(o)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(o&&n.getBandWidth()>a)return!0;if(r){var s=HM(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===i},e.prototype.makeElOption=function(t,e,i,n,o){},e.prototype.createPointerEl=function(e,i,n,o){var r=i.pointer;if(r){var a=Gz(e).pointerEl=new t[r.type](Wz(i.pointer));e.add(a)}},e.prototype.createLabelEl=function(t,e,i,n){if(e.label){var o=Gz(t).labelEl=new cl(Wz(e.label));t.add(o),Zz(o,n)}},e.prototype.updatePointerEl=function(t,e,i){var n=Gz(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},e.prototype.updateLabelEl=function(t,e,i,n){var o=Gz(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{x:e.label.x,y:e.label.y}),Zz(o,n))},e.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,r=i.getModel("handle"),a=i.get("status");if(!r.get("show")||!a||"hide"===a)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=tm(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){be(t.event)},onmousedown:Uz(this._onHandleDragMove,this,0,0),drift:Uz(this._onHandleDragMove,this),ondragend:Uz(this._onHandleDragEnd,this)}),n.add(o)),Kz(o,i,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");it(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,xm(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},e.prototype._moveHandleToValue=function(t,e){Xz(this._axisPointerModel,!e&&this._moveAnimation,this._handle,qz(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(qz(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(qz(n)),Gz(i).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),wm(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},e}();function Xz(t,e,i,n){Yz(Gz(i).lastProp,n)||(Gz(i).lastProp=n,e?bh(i,n,t):(i.stopAnimation(),i.attr(n)))}function Yz(t,e){if(st(t)&&st(e)){var i=!0;return q(e,(function(e,n){i=i&&Yz(t[n],e)})),!!i}return t===e}function Zz(t,e){t[e.get(["label","show"])?"show":"hide"]()}function qz(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function Kz(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)}))}const $z=jz;function Jz(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function Qz(t,e,i,n,o){var r=tN(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),a=i.getModel("label"),s=Uu(a.get("padding")||0),l=a.getFont(),h=Ao(r,l),u=o.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],p=o.align;"right"===p&&(u[0]-=c),"center"===p&&(u[0]-=c/2);var f=o.verticalAlign;"bottom"===f&&(u[1]-=d),"middle"===f&&(u[1]-=d/2),function(t,e,i,n){var o=n.getWidth(),r=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,r)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Ah(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function tN(t,e,i,n,o){t=e.scale.parse(t);var r=e.scale.getLabel({value:t},{precision:o.precision}),a=o.formatter;if(a){var s={value:QS(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};q(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)})),ot(a)?r=a.replace("{value}",r):nt(a)&&(r=a(s))}return r}function eN(t,e,i){var n=[1,0,0,1,0,0];return Ie(n,n,i.rotation),Ee(n,n,i.position),Zg([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function iN(t,e,i,n,o,r){var a=FM.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get(["label","margin"]),Qz(e,n,o,r,{position:eN(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function nN(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function oN(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function rN(t,e,i,n,o,r){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:r,clockwise:!0}}var aN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis,a=r.grid,s=n.get("type"),l=sN(a,r).getOtherAxis(r).getGlobalExtent(),h=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var u=Jz(n),c=lN[s](r,h,l);c.style=u,t.graphicKey=c.type,t.pointer=c}iN(e,t,_M(a.model,i),i,n,o)},e.prototype.getHandleTransform=function(t,e,i){var n=_M(e.axis.grid.model,e,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=eN(e.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,i,n){var o=i.axis,r=o.grid,a=o.getGlobalExtent(!0),s=sN(r,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];return c[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}($z);function sN(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var lN={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:nN([e,i[0]],[e,i[1]],hN(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:oN([e-n/2,i[0]],[n,o],hN(t))}}};function hN(t){return"x"===t.dim?0:1}const uN=aN,cN=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(uc);var dN=Br(),pN=q;function fN(t,e,i){if(!b.node){var n=e.getZr();dN(n).records||(dN(n).records={}),function(t,e){function i(i,n){t.on(i,(function(i){var o=function(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);pN(dN(t).records,(function(t){t&&n(t,i,o.dispatchAction)})),function(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}(o.pendings,e)}))}dN(t).initialized||(dN(t).initialized=!0,i("click",et(mN,"click")),i("mousemove",et(mN,"mousemove")),i("globalout",gN))}(n,e),(dN(n).records[t]||(dN(n).records[t]={})).handler=i}}function gN(t,e,i){t.handler("leave",null,i)}function mN(t,e,i,n){e.handler(t,i,n)}function vN(t,e){if(!b.node){var i=e.getZr();(dN(i).records||{})[t]&&(dN(i).records[t]=null)}}var yN=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";fN("axisPointer",i,(function(t,e,i){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){vN("axisPointer",e)},e.prototype.dispose=function(t,e){vN("axisPointer",e)},e.type="axisPointer",e}(af);const bN=yN;function xN(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var r=i.getData(),a=Nr(r,t);if(null==a||a<0||it(a))return{point:[]};var s=r.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var h=l.getBaseAxis(),u=l.getOtherAxis(h).dim,c=h.dim,d="x"===u||"radius"===u?1:0,p=r.mapDimension(c),f=[];f[d]=r.get(p,a),f[1-d]=r.get(r.getCalculationInfo("stackResultDimension"),a),n=l.dataToPoint(f)||[]}else n=l.dataToPoint(r.getValues(K(l.dimensions,(function(t){return r.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),n=[g.x+g.width/2,g.y+g.height/2]}return{point:n,el:s}}var wN=Br();function _N(t,e,i){var n=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||tt(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){EN(o)&&(o=xN({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=EN(o),h=r.axesInfo,u=s.axesInfo,c="leave"===n||EN(o),d={},p={},f={list:[],map:{}},g={showPointer:et(SN,p),showTooltip:et(MN,f)};q(s.coordSysMap,(function(t,e){var i=l||t.containPoint(o);q(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(h,t);if(!c&&i&&(!h||r)){var a=r&&r.value;null!=a||l||(a=n.pointToData(o)),null!=a&&CN(t,a,g,!1,d)}}))}));var m={};return q(u,(function(t,e){var i=t.linkGroup;i&&!p[e]&&q(i.axesInfo,(function(e,n){var o=p[n];if(e!==t&&o){var r=o.value;i.mapper&&(r=t.axis.scale.parse(i.mapper(r,TN(e),TN(t)))),m[t.key]=r}}))})),q(m,(function(t,e){CN(u[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];q(e,(function(e,i){var o=e.axisPointerModel.option,r=t[i];r?(!e.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})}))}(p,u,d),function(t,e,i,n){if(!EN(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}(f,o,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",r=wN(n)[o]||{},a=wN(n)[o]={};q(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&t.triggerEmphasis&&q(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];q(r,(function(t,e){!a[e]&&l.push(t)})),q(a,(function(t,e){!r[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(u,0,i),d}}function CN(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var a=function(t,e){var i=e.axis,n=i.dim,o=t,r=[],a=Number.MAX_VALUE,s=-1;return q(e.seriesModels,(function(e,l){var h,u,c=e.getData().mapDimensionsAll(n);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);u=d.dataIndices,h=d.nestestValue}else{if(!(u=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;h=e.getData().get(c[0],u[0])}if(null!=h&&isFinite(h)){var p=t-h,f=Math.abs(p);f<=a&&((f<a||p>=0&&s<0)&&(a=f,s=p,o=h,r.length=0),q(u,(function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:r,snapToValue:o}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&U(o,s[0]),!n&&t.snap&&r.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s),i.showTooltip(t,a,l)}else i.showPointer(t,e)}function SN(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function MN(t,e,i,n){var o=i.payloadBatch,r=e.axis,a=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,h=WM(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function TN(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function EN(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function IN(t){XM.registerAxisPointerClass("CartesianAxisPointer",uN),t.registerComponentModel(cN),t.registerComponentView(bN),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!it(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),r=o.get("link",!0)||[],a=[];q(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=WM(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",n);if(q(i.getAxes(),et(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var u="axis"===h.get("trigger"),c="cross"===h.get(["axisPointer","type"]),d=i.getTooltipAxes(h.get(["axisPointer","axis"]));(u||c)&&q(d.baseAxes,et(p,!c||"cross",u)),c&&q(d.otherAxes,et(p,"cross",!1))}}function p(n,s,u){var c=u.model.getModel("axisPointer",o),d=c.get("show");if(d&&("auto"!==d||n||GM(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,o,r){var a=e.getModel("axisPointer"),s={};q(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=H(a.get(t))})),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var h=a.get(["label","show"]);if(l.show=null==h||h,!r){var u=s.lineStyle=a.get("crossStyle");u&&j(l,u.textStyle)}}return t.model.getModel("axisPointer",new eu(s,i,n))}(u,h,o,e,n,s):c;var p=c.get("snap"),f=c.get("triggerEmphasis"),g=WM(u.model),m=s||p||"category"===u.type,v=t.axesInfo[g]={key:g,axis:u,coordSys:i,axisPointerModel:c,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:GM(c),seriesModels:[],linkGroup:null};l[g]=v,t.seriesInvolved=t.seriesInvolved||m;var y=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(VM(r[n+"AxisId"],i.id)||VM(r[n+"AxisIndex"],i.componentIndex)||VM(r[n+"AxisName"],i.name))return o}}(r,u);if(null!=y){var b=a[y]||(a[y]={axesInfo:{}});b.axesInfo[g]=v,b.mapper=r[y].mapper,v.linkGroup=b}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),o=e.get(["tooltip","show"],!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==o&&!1!==e.get(["axisPointer","show"],!0)&&q(t.coordSysAxesInfo[WM(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}))}(i,t),i}(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},_N)}var DN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),h=n.get("type");if(h&&"none"!==h){var u=Jz(n),c=kN[h](r,a,l,s);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,i,n,o){var r=e.axis,a=r.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,h,u,c=n.getRadiusAxis().getExtent();if("radius"===r.dim){var d=[1,0,0,1,0,0];Ie(d,d,s),Ee(d,d,[n.cx,n.cy]),l=Zg([a,-o],d);var p=e.getModel("axisLabel").get("rotate")||0,f=FM.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,u=f.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,a]);var m=n.cx,v=n.cy;h=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,a,n.get(["label","margin"]));Qz(t,i,n,o,d)},e}($z),kN={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:nN(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:rN(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:rN(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}};const AN=DN,LN=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(uc);var RN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Gr).models[0]},e.type="polarAxis",e}(uc);Y(RN,JC);var PN=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="angleAxis",e}(RN),ON=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="radiusAxis",e}(RN),zN=function(t){function e(e,i){return t.call(this,"radius",e,i)||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(bM);zN.prototype.dataToRadius=bM.prototype.dataToCoord,zN.prototype.radiusToData=bM.prototype.coordToData;const NN=zN;var BN=Br(),FN=function(t){function e(e,i){return t.call(this,"angle",e,i||[0,360])||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var r=n[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=Ao(null==r?"":r+"",e.getFont(),"center","top"),h=Math.max(l.height,7)/s;isNaN(h)&&(h=1/0);var u=Math.max(0,Math.floor(h)),c=BN(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-u)<=1&&Math.abs(p-o)<=1&&d>u?u=d:(c.lastTickCount=o,c.lastAutoInterval=u),u},e}(bM);FN.prototype.dataToAngle=bM.prototype.dataToCoord,FN.prototype.angleToData=bM.prototype.coordToData;const VN=FN;var HN=["radius","angle"],GN=function(){function t(t){this.dimensions=HN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new NN,this._angleAxis=new VN,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);n.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=l<r?1:-1;l<r||l>a;)l+=360*h;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},t.prototype.convertToPixel=function(t,e,i){return WN(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return WN(e)===this?this.pointToData(i):null},t}();function WN(t){var e=t.seriesModel,i=t.polarModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}const UN=GN;function jN(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();q(nM(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),q(nM(e,"angle"),(function(t){n.scale.unionExtentFromData(e,t)}))}})),KS(n.scale,n.model),KS(o.scale,o.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),a=360/n.scale.count();n.inverse?r[1]+=a:r[1]-=a,n.setExtent(r[0],r[1])}}function XN(t,e){if(t.type=e.get("type"),t.scale=$S(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}const YN={dimensions:HN,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var o=new UN(n+"");o.update=jN;var r=o.getRadiusAxis(),a=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");XN(r,s),XN(a,l),function(t,e,i){var n=e.get("center"),o=i.getWidth(),r=i.getHeight();t.cx=nr(n[0],o),t.cy=nr(n[1],r);var a=t.getRadiusAxis(),s=Math.min(o,r)/2,l=e.get("radius");null==l?l=[0,"100%"]:it(l)||(l=[0,l]);var h=[nr(l[0],s),nr(l[1],s)];a.inverse?a.setExtent(h[1],h[0]):a.setExtent(h[0],h[1])}(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Gr).models[0];t.coordinateSystem=e.coordinateSystem}})),i}};var ZN=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function qN(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function KN(t){return t.getRadiusAxis().inverse?0:1}function $N(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}var JN=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="PolarAxisPointer",i}return m(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),r=i.getTicksCoords(),a=i.getMinorTicksCoords(),s=K(i.getViewLabels(),(function(t){t=H(t);var e=i.scale,n="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=i.dataToCoord(n),t}));$N(s),$N(r),q(ZN,(function(e){!t.get([e,"show"])||i.scale.isBlank()&&"axisLine"!==e||QN[e](this.group,t,n,r,a,o,s)}),this)}},e.type="angleAxis",e}(XM),QN={axisLine:function(t,e,i,n,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=KN(i),h=l?0:1;(a=0===r[h]?new kf({shape:{cx:i.cx,cy:i.cy,r:r[l]},style:s.getLineStyle(),z2:1,silent:!0}):new $f({shape:{cx:i.cx,cy:i.cy,r:r[l],r0:r[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,i,n,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[KN(i)],h=K(n,(function(t){return new lg({shape:qN(i,[l,l+s],t.coord)})}));t.add(Gg(h,{style:j(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,i,n,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),h=r[KN(i)],u=[],c=0;c<o.length;c++)for(var d=0;d<o[c].length;d++)u.push(new lg({shape:qN(i,[h,h+l],o[c][d].coord)}));t.add(Gg(u,{style:j(s.getModel("lineStyle").getLineStyle(),j(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,i,n,o,r,a){var s=e.getCategories(!0),l=e.getModel("axisLabel"),h=l.get("margin"),u=e.get("triggerEvent");q(a,(function(n,o){var a=l,c=n.tickValue,d=r[KN(i)],p=i.coordToPoint([d+h,n.coord]),f=i.cx,g=i.cy,m=Math.abs(p[0]-f)/d<.3?"center":p[0]>f?"left":"right",v=Math.abs(p[1]-g)/d<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[c]){var y=s[c];st(y)&&y.textStyle&&(a=new eu(y.textStyle,l,l.ecModel))}var b=new cl({silent:FM.isLabelSilent(e),style:Ah(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:n.formattedLabel,align:m,verticalAlign:v})});if(t.add(b),u){var x=FM.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=n.rawLabel,dl(b).eventData=x}}),this)},splitLine:function(t,e,i,n,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=0;u<n.length;u++){var c=l++%s.length;h[c]=h[c]||[],h[c].push(new lg({shape:qN(i,r,n[u].coord)}))}for(u=0;u<h.length;u++)t.add(Gg(h[u],{style:j({stroke:s[u%s.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,i,n,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var h=0;h<o[l].length;h++)s.push(new lg({shape:qN(i,r,o[l][h].coord)}));t.add(Gg(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,i,n,o,r){if(n.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=Math.PI/180,c=-n[0].coord*u,d=Math.min(r[0],r[1]),p=Math.max(r[0],r[1]),f=e.get("clockwise"),g=1,m=n.length;g<=m;g++){var v=g===m?n[0].coord:n[g].coord,y=l++%s.length;h[y]=h[y]||[],h[y].push(new Zf({shape:{cx:i.cx,cy:i.cy,r0:d,r:p,startAngle:c,endAngle:-v*u,clockwise:f},silent:!0})),c=-v*u}for(g=0;g<h.length;g++)t.add(Gg(h[g],{style:j({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}};const tB=JN;var eB=["axisLine","axisTickLabel","axisName"],iB=["splitLine","splitArea","minorSplitLine"],nB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="PolarAxisPointer",i}return m(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=this._axisGroup,n=this._axisGroup=new qo;this.group.add(n);var o=t.axis,r=o.polar,a=r.getAngleAxis(),s=o.getTicksCoords(),l=o.getMinorTicksCoords(),h=a.getExtent()[0],u=o.getExtent(),c=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(r,t,h),d=new FM(t,c);q(eB,d.add,d),n.add(d.getGroup()),$g(i,n,t),q(iB,(function(e){t.get([e,"show"])&&!o.scale.isBlank()&&oB[e](this.group,t,r,h,u,s,l)}),this)}},e.type="radiusAxis",e}(XM),oB={splitLine:function(t,e,i,n,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=0;u<r.length;u++){var c=l++%s.length;h[c]=h[c]||[],h[c].push(new kf({shape:{cx:i.cx,cy:i.cy,r:Math.max(r[u].coord,0)}}))}for(u=0;u<h.length;u++)t.add(Gg(h[u],{style:j({stroke:s[u%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,i,n,o,r,a){if(a.length){for(var s=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],h=0;h<a.length;h++)for(var u=0;u<a[h].length;u++)l.push(new kf({shape:{cx:i.cx,cy:i.cy,r:a[h][u].coord}}));t.add(Gg(l,{style:j({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,e,i,n,o,r){if(r.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var h=[],u=r[0].coord,c=1;c<r.length;c++){var d=l++%s.length;h[d]=h[d]||[],h[d].push(new Zf({shape:{cx:i.cx,cy:i.cy,r0:u,r:r[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=r[c].coord}for(c=0;c<h.length;c++)t.add(Gg(h[c],{style:j({fill:s[c%s.length]},a.getAreaStyle()),silent:!0}))}}};const rB=nB;function aB(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function sB(t,e){return e.dim+t.model.componentIndex}const lB=function(t,e,i){var n={},o=function(t){var e={};q(t,(function(t,i){var n=t.getData(),o=t.coordinateSystem,r=o.getBaseAxis(),a=sB(o,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/n.count(),h=e[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=h.stacks;e[a]=h;var c=aB(t);u[c]||h.autoWidthCount++,u[c]=u[c]||{width:0,maxWidth:0};var d=nr(t.get("barWidth"),l),p=nr(t.get("barMaxWidth"),l),f=t.get("barGap"),g=t.get("barCategoryGap");d&&!u[c].width&&(d=Math.min(h.remainedWidth,d),u[c].width=d,h.remainedWidth-=d),p&&(u[c].maxWidth=p),null!=f&&(h.gap=f),null!=g&&(h.categoryGap=g)}));var i={};return q(e,(function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,r=nr(t.categoryGap,o),a=nr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-r)/(l+(l-1)*a);h=Math.max(h,0),q(n,(function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),h=(s-r)/(l+(l-1)*a),h=Math.max(h,0);var u,c=0;q(n,(function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+a)})),u&&(c-=u.width*a);var d=-c/2;q(n,(function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+a)}))})),i}(J(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),a=sB(i,r),s=aB(t),l=o[a][s],h=l.offset,u=l.width,c=i.getOtherAxis(r),d=t.coordinateSystem.cx,p=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;n[s]=n[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(r.dim),y=Qw(e,m),b="radius"!==r.dim||!t.get("roundCap",!0),x=c.dataToCoord(0),w=0,_=e.count();w<_;w++){var C=e.get(m,w),S=e.get(v,w),M=C>=0?"p":"n",T=x;y&&(n[s][S]||(n[s][S]={p:x,n:x}),T=n[s][S][M]);var E=void 0,I=void 0,D=void 0,k=void 0;if("radius"===c.dim){var A=c.dataToCoord(C)-x,L=r.dataToCoord(S);Math.abs(A)<f&&(A=(A<0?-1:1)*f),E=T,I=T+A,k=(D=L-h)-u,y&&(n[s][S][M]=I)}else{var R=c.dataToCoord(C,b)-x,P=r.dataToCoord(S);Math.abs(R)<g&&(R=(R<0?-1:1)*g),I=(E=P+h)+u,D=T,k=T+R,y&&(n[s][S][M]=k)}e.setItemLayout(w,{cx:d,cy:p,r0:E,r:I,startAngle:-D*Math.PI/180,endAngle:-k*Math.PI/180,clockwise:D>=k})}}}))};var hB={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},uB={splitNumber:5},cB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="polar",e}(af);function dB(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},r=n.position,a=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?h.vertical[r]:l[0],"horizontal"===a?h.horizontal[r]:l[3]],o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a],o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),pt(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var u=e.rotate;return null==u&&(u=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-u:u,o.z2=1,o}var pB=["axisLine","axisTickLabel","axisName"],fB=["splitArea","splitLine"],gB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="SingleAxisPointer",i}return m(e,t),e.prototype.render=function(e,i,n,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new qo;var s=dB(e),l=new FM(e,s);q(pB,l.add,l),r.add(this._axisGroup),r.add(l.getGroup()),q(fB,(function(t){e.get([t,"show"])&&mB[t](this,this.group,this._axisGroup,e)}),this),$g(a,this._axisGroup,e),t.prototype.render.call(this,e,i,n,o)},e.prototype.remove=function(){qM(this)},e.type="singleAxis",e}(XM),mB={splitLine:function(t,e,i,n){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),h=n.coordinateSystem.getRect(),u=o.isHorizontal(),c=[],d=0,p=o.getTicksCoords({tickModel:r}),f=[],g=[],m=0;m<p.length;++m){var v=o.toGlobalCoord(p[m].coord);u?(f[0]=v,f[1]=h.y,g[0]=v,g[1]=h.y+h.height):(f[0]=h.x,f[1]=v,g[0]=h.x+h.width,g[1]=v);var y=new lg({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});Ug(y.shape,l);var b=d++%s.length;c[b]=c[b]||[],c[b].push(y)}var x=a.getLineStyle(["color"]);for(m=0;m<c.length;++m)e.add(Gg(c[m],{style:j({stroke:s[m%s.length]},x),silent:!0}))}},splitArea:function(t,e,i,n){ZM(t,i,n,n)}};const vB=gB;var yB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(uc);Y(yB,JC.prototype);const bB=yB;var xB=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.type=o||"value",a.position=r||"bottom",a}return m(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(bM);const wB=xB;var _B=["single"],CB=function(){function t(t,e,i){this.type="single",this.dimension="single",this.dimensions=_B,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,i)}return t.prototype._init=function(t,e,i){var n=this.dimension,o=new wB(n,$S(t),[0,0],t.get("type"),t.get("position")),r="category"===o.type;o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},t.prototype.update=function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();q(e.mapDimensionsAll(this.dimension),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),KS(this._axis.scale,this._axis.model)}}),this)},t.prototype.resize=function(t,e){this._rect=ic({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n},t.prototype.convertToPixel=function(t,e,i){return SB(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return SB(e)===this?this.pointToData(i):null},t}();function SB(t){var e=t.seriesModel,i=t.singleAxisModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}const MB=CB,TB={create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,o){var r=new MB(n,t,e);r.name="single_"+o,r.resize(n,e),n.coordinateSystem=r,i.push(r)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Gr).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),i},dimensions:_B};var EB=["x","y"],IB=["width","height"],DB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis,a=r.coordinateSystem,s=LB(a,1-AB(r)),l=a.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=Jz(n),c=kB[h](r,l,s);c.style=u,t.graphicKey=c.type,t.pointer=c}iN(e,t,dB(i),i,n,o)},e.prototype.getHandleTransform=function(t,e,i){var n=dB(e,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=eN(e.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,i,n){var o=i.axis,r=o.coordinateSystem,a=AB(o),s=LB(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var h=LB(r,1-a),u=(h[1]+h[0])/2,c=[u,u];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}($z),kB={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:nN([e,i[0]],[e,i[1]],AB(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:oN([e-n/2,i[0]],[n,o],AB(t))}}};function AB(t){return t.isHorizontal()?0:1}function LB(t,e){var i=t.getRect();return[i[EB[e]],i[EB[e]]+i[IB[e]]]}const RB=DB;var PB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="single",e}(af);function OB(t,e){var i,n=t.cellSize;1===(i=it(n)?n:t.cellSize=[n,n]).length&&(i[1]=i[0]);var o=K([0,1],(function(t){return function(t,e){return null!=t[Qu[e][0]]||null!=t[Qu[e][1]]&&null!=t[Qu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));rc(t,e,{type:"box",ignoreSize:o})}const zB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(e,i,n){var o=ac(e);t.prototype.init.apply(this,arguments),OB(e,o)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),OB(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(uc);var NB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,n),this._renderLines(t,r,a,n),this._renderYearText(t,r,a,n),this._renderMonthText(t,s,a,n),this._renderWeekText(t,s,r,a,n)},e.prototype._renderDayRect=function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=n.getCellWidth(),a=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new qs({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(t,e,i,n){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=r.getDateInfo(c)}function d(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,n)}d(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,i),a,n),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,i),a,n)},e.prototype._getEdgesPoints=function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},e.prototype._drawSplitline=function(t,e,i){var n=new og({z2:20,shape:{points:t},style:e});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,e,i){for(var n=t.coordinateSystem,o=n.getDateInfo(e),r=[],a=0;a<7;a++){var s=n.getNextNDay(o.time,a),l=n.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===i?"bl":"tr"]}return r},e.prototype._formatterLabel=function(t,e){return ot(t)&&t?(i=t,q(e,(function(t,e){i=i.replace("{"+e+"}",t)})),i):nt(t)?t(e):e.nameMap;var i},e.prototype._yearTextPositionControl=function(t,e,i,n,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===n?(a+=o,s=["center","top"]):"left"===n?r-=o:"right"===n?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==n&&"right"!==n||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=o.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new cl({z2:30,style:Ah(o,{text:g})});m.attr(this._yearTextPositionControl(m,c[a],i,a,r)),n.add(m)}},e.prototype._monthTextPositionControl=function(t,e,i,n,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(r="center"),"start"===n&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===n&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),h=[this._tlpoints,this._blpoints];r&&!ot(r)||(r&&(e=du(r)||e),r=e.get(["time","monthAbbr"])||[]);var u="start"===s?0:1,c="horizontal"===i?0:1;a="start"===s?-a:a;for(var d="center"===l,p=0;p<h[u].length-1;p++){var f=h[u][p].slice(),g=this._firstDayOfMonth[p];if(d){var m=this._firstDayPoints[p];f[c]=(m[c]+h[0][p+1][c])/2}var v=o.get("formatter"),y=r[+g.m-1],b={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},x=this._formatterLabel(v,b),w=new cl({z2:30,style:U(Ah(o,{text:x}),this._monthTextPositionControl(f,d,i,s,a))});n.add(w)}}},e.prototype._weekTextPositionControl=function(t,e,i,n,o){var r="center",a="middle",s=t[0],l=t[1],h="start"===i;return"horizontal"===e?(s=s+n+(h?1:-1)*o[0]/2,r=h?"right":"left"):(l=l+n+(h?1:-1)*o[1]/2,a=h?"bottom":"top"),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderWeekText=function(t,e,i,n,o){var r=t.getModel("dayLabel");if(r.get("show")){var a=t.coordinateSystem,s=r.get("position"),l=r.get("nameMap"),h=r.get("margin"),u=a.getFirstDayOfWeek();l&&!ot(l)||(l&&(e=du(l)||e),l=e.get(["time","dayOfWeekShort"])||K(e.get(["time","dayOfWeekAbbr"]),(function(t){return t[0]})));var c=a.getNextNDay(i.end.time,7-i.lweek).time,d=[a.getCellWidth(),a.getCellHeight()];h=nr(h,Math.min(d[1],d[0])),"start"===s&&(c=a.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var p=0;p<7;p++){var f,g=a.getNextNDay(c,p),m=a.dataToRect([g.time],!1).center;f=Math.abs((p+u)%7);var v=new cl({z2:30,style:U(Ah(r,{text:l[f]}),this._weekTextPositionControl(m,n,s,h,d))});o.add(v)}}},e.type="calendar",e}(af);const BB=NB;var FB=864e5,VB=function(){function t(e,i,n){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=pr(t)).getFullYear(),i=t.getMonth()+1,n=i<10?"0"+i:""+i,o=t.getDate(),r=o<10?"0"+o:""+o,a=t.getDay();return{y:e+"",m:n,d:r,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+r,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[i,7]:[7,i];q([0,1],(function(t){h(o,t)&&(r[n[t]]=o[t]*a[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=ic(r,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}q([0,1],(function(t){h(o,t)||(o[t]=l[n[t]]/a[t])})),this._sw=o[0],this._sh=o[1]},t.prototype.dataToPoint=function(t,e){it(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+FB))return[NaN,NaN];var r=i.day,a=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToRect=function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},t.prototype.convertToPixel=function(t,e,i){var n=HB(e);return n===this?n.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){var n=HB(e);return n===this?n.pointToData(i):null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(it(e)&&1===e.length&&(e=e[0]),it(e))t=e;else{var i=e.toString();if(/^\d{4}$/.test(i)&&(t=[i+"-01-01",i+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(i)){var n=this.getDateInfo(i),o=n.date;o.setMonth(o.getMonth()+1);var r=this.getNextNDay(o,-1);t=[n.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(i)&&(t=[i,i])}if(!t)return e;var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,i=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];i[0].time>i[1].time&&(e=!0,i.reverse());var n=Math.floor(i[1].time/FB)-Math.floor(i[0].time/FB)+1,o=new Date(i[0].time),r=o.getDate(),a=i[1].date.getDate();o.setDate(r+n-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-i[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-i[1].time)*l>0;)n-=l,o.setDate(s-l);var h=Math.floor((n+i[0].day+6)/7),u=e?1-h:h-1;return e&&i.reverse(),{range:[i[0].formatedDate,i[1].formatedDate],start:i[0],end:i[1],allDay:n,weeks:h,nthWeek:u,fweek:i[0].day,lweek:i[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return null;var o=7*(t-1)-n.fweek+e,r=new Date(n.start.time);return r.setDate(+n.start.d+o),this.getDateInfo(r)},t.create=function(e,i){var n=[];return e.eachComponent("calendar",(function(o){var r=new t(o,e,i);n.push(r),o.coordinateSystem=r})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])})),n},t.dimensions=["time","value"],t}();function HB(t){var e=t.calendarModel,i=t.seriesModel;return e?e.coordinateSystem:i?i.coordinateSystem:null}const GB=VB;function WB(t,e){var i;return q(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}var UB=["transition","enterFrom","leaveTo"],jB=UB.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function XB(t,e,i){if(i&&(!t[i]&&e[i]&&(t[i]={}),t=t[i],e=e[i]),t&&e)for(var n=i?UB:jB,o=0;o<n.length;o++){var r=n[o];null==t[r]&&null!=e[r]&&(t[r]=e[r])}}var YB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.preventAutoZ=!0,i}return m(e,t),e.prototype.mergeOption=function(e,i){var n=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,i),this.option.elements=n},e.prototype.optionUpdated=function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,r=[];this._flatten(n,r,null);var a=Ar(o,r,"normalMerge"),s=this._elOptionsToUpdate=[];q(a,(function(t,e){var i=t.newOption;i&&(s.push(i),function(t,e){var i=t.existing;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=U({},i),o=t[e],r=i.$action||"merge";"merge"===r?o?(G(o,n,!0),rc(o,n,{ignoreSize:!0}),sc(i,o),XB(i,o),XB(i,o,"shape"),XB(i,o,"style"),XB(i,o,"extra"),i.clipPath=o.clipPath):t[e]=n:"replace"===r?t[e]=n:"remove"===r&&o&&(t[e]=null)}(o,e,i),function(t,e){if(t&&(t.hv=e.hv=[WB(e,["left","right"]),WB(e,["top","bottom"])],"group"===t.type)){var i=t,n=e;null==i.width&&(i.width=n.width=0),null==i.height&&(i.height=n.height=0)}}(o[e],i))}),this),i.elements=J(o,(function(t){return t&&delete t.$action,null!=t}))},e.prototype._flatten=function(t,e,i){q(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;n&&n.length&&this._flatten(n,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(uc),ZB={path:null,compoundPath:null,group:qo,image:Hs,text:cl},qB=Br(),KB=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(){this._elMap=Tt()},e.prototype.render=function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group,o=t.get("z"),r=t.get("zlevel");q(e,(function(e){var a=Pr(e.id,null),s=null!=a?i.get(a):null,l=Pr(e.parentId,null),h=null!=l?i.get(l):n,u=e.type,c=e.style;"text"===u&&c&&e.hv&&e.hv[1]&&(c.textVerticalAlign=c.textBaseline=c.verticalAlign=c.align=null);var d=e.textContent,p=e.textConfig;if(c&&HO(c,u,!!p,!!d)){var f=GO(c,u,!0);!p&&f.textConfig&&(p=e.textConfig=f.textConfig),!d&&f.textContent&&(d=f.textContent)}var g=function(t){return t=U({},t),q(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Ju),(function(e){delete t[e]})),t}(e),m=e.$action||"merge",v="merge"===m,y="replace"===m;if(v){var b=s;(T=!s)?b=JB(a,h,e.type,i):(b&&(qB(b).isNew=!1),hz(b)),b&&($O(b,g,t,{isInit:T}),tF(b,e,o,r))}else if(y){QB(s,e,i,t);var x=JB(a,h,e.type,i);x&&($O(x,g,t,{isInit:!0}),tF(x,e,o,r))}else"remove"===m&&(JO(s,e),QB(s,e,i,t));var w=i.get(a);if(w&&d)if(v){var _=w.getTextContent();_?_.attr(d):w.setTextContent(new cl(d))}else y&&w.setTextContent(new cl(d));if(w){var C=e.clipPath;if(C){var S=C.type,M=void 0,T=!1;if(v){var E=w.getClipPath();M=(T=!E||qB(E).type!==S)?$B(S):E}else y&&(T=!0,M=$B(S));w.setClipPath(M),$O(M,C,t,{isInit:T}),uz(M,C.keyframeAnimation,t)}var I=qB(w);w.setTextConfig(p),I.option=e,function(t,e,i){var n=dl(t).eventData;t.silent||t.ignore||n||(n=dl(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=i.info)}(w,t,e),om({el:w,componentModel:t,itemName:w.name,itemTooltipOption:e.tooltip}),uz(w,e.keyframeAnimation,t)}}))}},e.prototype._relocate=function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,r=e.getWidth(),a=e.getHeight(),s=["x","y"],l=0;l<i.length;l++)if((f=null!=(p=Pr((d=i[l]).id,null))?o.get(p):null)&&f.isGroup){var h=(g=f.parent)===n,u=qB(f),c=qB(g);u.width=nr(u.option.width,h?r:c.width)||0,u.height=nr(u.option.height,h?a:c.height)||0}for(l=i.length-1;l>=0;l--){var d,p,f;if(f=null!=(p=Pr((d=i[l]).id,null))?o.get(p):null){var g=f.parent,m=(c=qB(g),{}),v=nc(f,d,g===n?{width:r,height:a}:{width:c.width,height:c.height},null,{hv:d.hv,boundingMode:d.bounding},m);if(!qB(f).isNew&&v){for(var y=d.transition,b={},x=0;x<s.length;x++){var w=s[x],_=m[w];y&&(tz(y)||X(y,w)>=0)?b[w]=_:f[w]=_}bh(f,b,t,0)}else f.attr(m)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(i){QB(i,qB(i).option,e,t._lastGraphicModel)})),this._elMap=Tt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(af);function $B(t){var e=new(kt(ZB,t)?ZB[t]:Bg(t))({});return qB(e).type=t,e}function JB(t,e,i,n){var o=$B(i);return e.add(o),n.set(t,o),qB(o).id=t,qB(o).isNew=!0,o}function QB(t,e,i,n){t&&t.parent&&("group"===t.type&&t.traverse((function(t){QB(t,e,i,n)})),QO(t,e,n),i.removeKey(qB(t).id))}function tF(t,e,i,n){t.isGroup||q([["cursor",La.prototype.cursor],["zlevel",n||0],["z",i||0],["z2",0]],(function(i){var n=i[0];kt(e,n)?t[n]=ft(e[n],i[1]):null==t[n]&&(t[n]=i[1])})),q(Q(e),(function(i){if(0===i.indexOf("on")){var n=e[i];t[i]=nt(n)?n:null}})),kt(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var eF=["x","y","radius","angle","single"],iF=["cartesian2d","polar","singleAxis"];function nF(t){return t+"Axis"}function oF(t){var e=t.ecModel,i={infoList:[],infoMap:Tt()};return t.eachTargetAxis((function(t,n){var o=e.getComponent(nF(t),n);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=i.infoMap.get(a);s||(s={model:r,axisModels:[]},i.infoList.push(s),i.infoMap.set(a,s)),s.axisModels.push(o)}}})),i}var rF=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),aF=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._autoThrottle=!0,i._noTarget=!0,i._rangePropMode=["percent","percent"],i}return m(e,t),e.prototype.init=function(t,e,i){var n=sF(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var e=sF(t);G(this.option,t,!0),G(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;q([["start","startValue"],["end","endValue"]],(function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=Tt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return q(eF,(function(i){var n=this.getReferringComponents(nF(i),Wr);if(n.specified){e=!0;var o=new rF;q(n.models,(function(t){o.add(t.componentIndex)})),t.set(i,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var i=this.ecModel,n=!0;if(n){var o="vertical"===e?"y":"x";r(i.findComponents({mainType:o+"Axis"}),o)}function r(e,i){var o=e[0];if(o){var r=new rF;if(r.add(o.componentIndex),t.set(i,r),n=!1,"x"===i||"y"===i){var a=o.getReferringComponents("grid",Gr).models[0];a&&q(e,(function(t){o.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Gr).models[0]&&r.add(t.componentIndex)}))}}}n&&r(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),n&&q(eF,(function(e){if(n){var o=i.findComponents({mainType:nF(e),filter:function(t){return"category"===t.get("type",!0)}});if(o[0]){var r=new rF;r.add(o[0].componentIndex),t.set(e,r),n=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,i=this.get("rangeMode");q([["start","startValue"],["end","endValue"]],(function(n,o){var r=null!=t[n[0]],a=null!=t[n[1]];r&&!a?e[o]="percent":!r&&a?e[o]="value":i?e[o]=i[o]:r&&(e[o]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,i){null==t&&(t=this.ecModel.getComponent(nF(e),i))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(i,n){q(i.indexList,(function(i){t.call(e,n,i)}))}))},e.prototype.getAxisProxy=function(t,e){var i=this.getAxisModel(t,e);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[e])return this.ecModel.getComponent(nF(t),e)},e.prototype.setRawRange=function(t){var e=this.option,i=this.settledOption;q([["start","startValue"],["end","endValue"]],(function(n){null==t[n[0]]&&null==t[n[1]]||(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;q(["start","startValue","end","endValue"],(function(i){e[i]=t[i]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,i=this._targetAxisInfoMap.keys(),n=0;n<i.length;n++)for(var o=i[n],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(uc);function sF(t){var e={};return q(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}const lF=aF,hF=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="dataZoom.select",e}(lF),uF=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},e.type="dataZoom",e}(af),cF=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="dataZoom.select",e}(uF);var dF=q,pF=rr,fF=function(){function t(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return X(iF,e)>=0}(e)){var i=nF(this._dimName),n=e.getReferringComponents(i,Gr).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return H(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,i=this._dataExtent,n=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];dF(["start","end"],(function(l,h){var u=t[l],c=t[l+"Value"];"percent"===o[h]?(null==u&&(u=r[h]),c=n.parse(ir(u,r,i))):(e=!0,u=ir(c=null==c?i[h]:n.parse(c),i,r)),s[h]=null==c||isNaN(c)?i[h]:c,a[h]=null==u||isNaN(u)?r[h]:u})),pF(s),pF(a);var l=this._minMaxSpan;function h(t,e,i,o,r){var a=r?"Span":"ValueSpan";qA(0,t,i,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ir(t[s],i,o,!0),r&&(e[s]=n.parse(e[s]))}return e?h(s,a,i,r,!1):h(a,s,r,i,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];dF(i,(function(t){!function(t,e,i){e&&q(nM(e,i),(function(i){var n=e.getApproximateExtent(i);n[0]<t[0]&&(t[0]=n[0]),n[1]>t[1]&&(t[1]=n[1])}))}(n,t.getData(),e)}));var o=t.getAxisModel(),r=YS(o.axis.scale,o,n).calculate();return[r.min,r.max]}(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),r=this._valueWindow;"none"!==o&&dF(n,(function(t){var e=t.getData(),n=e.mapDimensionsAll(i);if(n.length){if("weakFilter"===o){var a=e.getStore(),s=K(n,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,i,o,l=0;l<n.length;l++){var h=a.get(s[l],t),u=!isNaN(h),c=h<r[0],d=h>r[1];if(u&&!c&&!d)return!0;u&&(o=!0),c&&(e=!0),d&&(i=!0)}return o&&e&&i}))}else dF(n,(function(i){if("empty"===o)t.setData(e=e.map(i,(function(t){return function(t){return t>=r[0]&&t<=r[1]}(t)?t:NaN})));else{var n={};n[i]=r,e.selectRange(n)}}));dF(n,(function(t){e.setApproximateExtent(r,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;dF(["min","max"],(function(n){var o=e.get(n+"Span"),r=e.get(n+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=ir(i[0]+r,i,[0,100],!0):null!=o&&(r=ir(o,[0,100],i,!0)-i[0]),t[n+"Span"]=o,t[n+"ValueSpan"]=r}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=sr(i,[0,500]);n=Math.min(n,20);var o=t.axis.scale.rawExtentInfo;0!==e[0]&&o.setDeterminedMinMax("min",+i[0].toFixed(n)),100!==e[1]&&o.setDeterminedMinMax("max",+i[1].toFixed(n)),o.freeze()}},t}();const gF=fF,mF={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(i){i.eachTargetAxis((function(n,o){var r=t.getComponent(nF(n),o);e(n,o,r,i)}))}))}e((function(t,e,i,n){i.__dzAxisProxy=null}));var i=[];e((function(e,n,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new gF(e,n,r,t),i.push(o.__dzAxisProxy))}));var n=Tt();return q(i,(function(t){q(t.getTargetSeriesModels(),(function(t){n.set(t.uid,t)}))})),n},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,i){t.getAxisProxy(e,i).reset(t)})),t.eachTargetAxis((function(i,n){t.getAxisProxy(i,n).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}}))}};var vF=!1;function yF(t){vF||(vF=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,mF),function(t){t.registerAction("dataZoom",(function(t,e){q(function(t,e){var i,n=Tt(),o=[],r=Tt();t.eachComponent({mainType:"dataZoom",query:e},(function(t){r.get(t.uid)||s(t)}));do{i=!1,t.eachComponent("dataZoom",a)}while(i);function a(t){!r.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,i){var o=n.get(t);o&&o[i]&&(e=!0)})),e}(t)&&(s(t),i=!0)}function s(t){r.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(n.get(t)||n.set(t,[]))[e]=!0}))}return o}(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function bF(t){t.registerComponentModel(hF),t.registerComponentView(cF),yF(t)}var xF=function(){},wF={};function _F(t,e){wF[t]=e}function CF(t){return wF[t]}const SF=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;q(this.option.feature,(function(t,i){var n=CF(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(e)),G(t,n.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(uc);function MF(t,e){var i=Uu(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),new qs({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}var TF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,i,n){var o=this.group;if(o.removeAll(),t.get("show")){var r=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),h=[];q(s,(function(t,e){h.push(e)})),new _w(this._featureNames||[],h).add(u).update(u).remove(et(u,null)).execute(),this._featureNames=h,function(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),r={width:i.getWidth(),height:i.getHeight()},a=ic(n,r,o);ec(e.get("orient"),t,e.get("itemGap"),a.width,a.height),nc(t,n,r,o)}(o,t,i),o.add(MF(o.getBoundingRect(),t)),a||o.eachChild((function(t){var e=t.__title,n=t.ensureState("emphasis"),a=n.textConfig||(n.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!nt(l)&&e){var h=l.style||(l.style={}),u=Ao(e,cl.makeFont(h)),c=t.x+o.x,d=!1;t.y+o.y+r+u.height>i.getHeight()&&(a.position="top",d=!0);var p=d?-5-u.height:r+10;c+u.width/2>i.getWidth()?(a.position=["100%",p],h.align="right"):c-u.width/2<0&&(a.position=[0,p],h.align="left")}}))}function u(u,c){var d,p=h[u],f=h[c],g=s[p],m=new eu(g,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===p&&(g.title=n.newTitle),p&&!f){if(function(t){return 0===t.indexOf("my")}(p))d={onclick:m.option.onclick,featureName:p};else{var v=CF(p);if(!v)return;d=new v}l[p]=d}else if(!(d=l[f]))return;d.uid=nu("toolbox-feature"),d.model=m,d.ecModel=e,d.api=i;var y=d instanceof xF;p||!f?!m.get("show")||y&&d.unusable?y&&d.remove&&d.remove(e,i):(function(n,s,l){var h,u,c=n.getModel("iconStyle"),d=n.getModel(["emphasis","iconStyle"]),p=s instanceof xF&&s.getIcons?s.getIcons():n.get("icon"),f=n.get("title")||{};ot(p)?(h={})[l]=p:h=p,ot(f)?(u={})[l]=f:u=f;var g=n.iconPaths={};q(h,(function(l,h){var p=tm(l,{},{x:-r/2,y:-r/2,width:r,height:r});p.setStyle(c.getItemStyle()),p.ensureState("emphasis").style=d.getItemStyle();var f=new cl({style:{text:u[h],align:d.get("textAlign"),borderRadius:d.get("textBorderRadius"),padding:d.get("textPadding"),fill:null},ignore:!0});p.setTextContent(f),om({el:p,componentModel:t,itemName:h,formatterParamsExtra:{title:u[h]}}),p.__title=u[h],p.on("mouseover",(function(){var e=d.getItemStyle(),n=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:d.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:d.get("textBackgroundColor")}),p.setTextConfig({position:d.get("textPosition")||n}),f.ignore=!t.get("showTitle"),i.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==n.get(["iconStatus",h])&&i.leaveEmphasis(this),f.hide()})),("emphasis"===n.get(["iconStatus",h])?Yl:Zl)(p),o.add(p),p.on("click",tt(s.onclick,s,e,i,h)),g[h]=p}))}(m,d,p),m.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&("emphasis"===e?Yl:Zl)(n[t])},d instanceof xF&&d.render&&d.render(m,e,i,n)):y&&d.dispose&&d.dispose(e,i)}},e.prototype.updateView=function(t,e,i,n){q(this._features,(function(t){t instanceof xF&&t.updateView&&t.updateView(t.model,e,i,n)}))},e.prototype.remove=function(t,e){q(this._features,(function(i){i instanceof xF&&i.remove&&i.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){q(this._features,(function(i){i instanceof xF&&i.dispose&&i.dispose(t,e)}))},e.type="toolbox",e}(af);const EF=TF;var IF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":i.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),s=b.browser;if(nt(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=n+"."+r,l.target="_blank",l.href=a;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var u=a.split(","),c=u[0].indexOf("base64")>-1,d=o?decodeURIComponent(u[1]):u[1];c&&(d=window.atob(d));var p=n+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var f=d.length,g=new Uint8Array(f);f--;)g[f]=d.charCodeAt(f);var m=new Blob([g]);window.navigator.msSaveOrOpenBlob(m,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,x=y.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),y.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var w=i.get("lang"),_='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(w&&w[0]||"")+'" /></body>',C=window.open();C.document.write(_),C.document.title=n}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(xF);const DF=IF;var kF="__ec_magicType_stack__",AF=[["line","bar"],["stack"]],LF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return q(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,i){var n=this.model,o=n.get(["seriesIndex",i]);if(RF[i]){var r,a={series:[]};q(AF,(function(t){X(t,i)>=0&&q(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,r=RF[i](e,o,t,n);r&&(j(r,t.option),a.series.push(r));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===i||"bar"===i)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",u=t.getReferringComponents(h,Gr).models[0].componentIndex;a[h]=a[h]||[];for(var c=0;c<=u;c++)a[h][u]=a[h][u]||{};a[h][u].boundaryGap="bar"===i}}}));var s=i;"stack"===i&&(r=G({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),"emphasis"!==n.get(["iconStatus",i])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:r,featureName:"magicType"})}},e}(xF),RF={line:function(t,e,i,n){if("bar"===t)return G({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,i,n){if("line"===t)return G({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===kF;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),G({id:e,stack:o?"":kF},n.get(["option","stack"])||{},!0)}};ob({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const PF=LF;var OF=new Array(60).join("-"),zF="\t";function NF(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var BF=new RegExp("[\t]+","g");var FF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){setTimeout((function(){e.dispatchAction({type:"hideTip"})}));var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var r=document.createElement("h4"),a=n.get("lang")||[];r.innerHTML=a[0]||n.get("title"),r.style.cssText="margin:10px 20px",r.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var h=n.get("optionToContent"),u=n.get("contentToOption"),c=function(t){var e,i,n,o=function(t){var e={},i=[],n=[];return t.eachRawSeries((function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var r=o.getBaseAxis();if("category"===r.type){var a=r.dim+"_"+r.index;e[a]||(e[a]={categoryAxis:r,valueAxis:o.getOtherAxis(r),series:[]},n.push({axisDim:r.dim,axisIndex:r.index})),e[a].series.push(t)}else i.push(t)}})),{seriesGroupByCategoryAxis:e,other:i,meta:n}}(t);return{value:J([(i=o.seriesGroupByCategoryAxis,n=[],q(i,(function(t,e){var i=t.categoryAxis,o=t.valueAxis.dim,r=[" "].concat(K(t.series,(function(t){return t.name}))),a=[i.model.getCategories()];q(t.series,(function(t){var e=t.getRawData();a.push(t.getRawData().mapArray(e.mapDimension(o),(function(t){return t})))}));for(var s=[r.join(zF)],l=0;l<a[0].length;l++){for(var h=[],u=0;u<a.length;u++)h.push(a[u][l]);s.push(h.join(zF))}n.push(s.join("\n"))})),n.join("\n\n"+OF+"\n\n")),(e=o.other,K(e,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,o=arguments[t-1],r=e.getName(o),a=0;a<t-1;a++)n[a]=arguments[a];i.push((r?r+zF:"")+n.join(zF))})),i.join("\n")})).join("\n\n"+OF+"\n\n"))],(function(t){return!!t.replace(/[\n\t\s]/g,"")})).join("\n\n"+OF+"\n\n"),meta:o.meta}}(t);if(nt(h)){var d=h(e.getOption());ot(d)?s.innerHTML=d:ut(d)&&s.appendChild(d)}else{l.readOnly=n.get("readOnly");var p=l.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=n.get("textColor"),p.borderColor=n.get("textareaBorderColor"),p.backgroundColor=n.get("textareaColor"),l.value=c.value,s.appendChild(l)}var f=c.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+n.get("buttonColor"),m+=";color:"+n.get("buttonTextColor");var b=this;function x(){i.removeChild(o),b._dom=null}ye(v,"click",x),ye(y,"click",(function(){if(null==u&&null!=h||null!=u&&null==h)x();else{var t;try{t=nt(u)?u(s,e.getOption()):function(t,e){var i=t.split(new RegExp("\n*"+OF+"\n*","g")),n={series:[]};return q(i,(function(t,i){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(zF)>=0)return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),i=[],n=K(NF(e.shift()).split(BF),(function(t){return{name:t,data:[]}})),o=0;o<e.length;o++){var r=NF(e[o]).split(BF);i.push(r.shift());for(var a=0;a<r.length;a++)n[a]&&(n[a].data[o]=r[a])}return{series:n,categories:i}}(t),r=e[i],a=r.axisDim+"Axis";r&&(n[a]=n[a]||[],n[a][r.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else o=function(t){for(var e=t.split(/\n+/g),i=NF(e.shift()),n=[],o=0;o<e.length;o++){var r=NF(e[o]);if(r){var a=r.split(BF),s="",l=void 0,h=!1;isNaN(a[0])?(h=!0,s=a[0],a=a.slice(1),n[o]={name:s,value:[]},l=n[o].value):l=n[o]=[];for(var u=0;u<a.length;u++)l.push(+a[u]);1===l.length&&(h?n[o].value=l[0]:n[o]=l[0])}}return{name:i,data:n}}(t),n.series.push(o)})),n}(l.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}})),v.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=v.style.cssText=m,!n.get("readOnly")&&g.appendChild(y),g.appendChild(v),o.appendChild(r),o.appendChild(s),o.appendChild(g),s.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},e}(xF);function VF(t,e){return K(t,(function(t,i){var n=e&&e[i];if(st(n)&&!it(n)){st(t)&&!it(t)||(t={value:t});var o=null!=n.name&&null==t.name;return t=j(t,n),o&&delete t.name,t}return t}))}ob({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var i=[];q(t.newOption.series,(function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:VF(t.data,o)})}else i.push(U({type:"scatter"},t))})),e.mergeOption(j({series:i},t.newOption))}));const HF=FF;var GF=q,WF=Br();function UF(t){var e=WF(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var jF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){!function(t){WF(t).snapshots=null}(t),e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},e}(xF);ob({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));const XF=jF;var YF=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],ZF=function(){function t(t,e,i){var n=this;this._targetInfoList=[];var o=KF(e,t);q($F,(function(t,e){(!i||!i.include||X(i.include,e)>=0)&&t(o,n._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=tV[t.brushType](0,i,e);t.__rangeOffset={offset:iV[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,i){q(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&q(n.coordSyses,(function(n){var o=tV[t.brushType](1,n,t.range,!0);i(t,o.values,n,e)}))}),this)},t.prototype.setInputRanges=function(t,e){q(t,(function(t){var i,n,o,r,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=tV[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?iV[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,o=oV(i),r=oV(n),a=[o[0]/r[0],o[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return K(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:nR(n),isTargetByCursor:rR(n,t,i.coordSysModel),getLinearBrushOtherExtent:oR(n)}}))},t.prototype.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&X(n.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=KF(e,t),o=0;o<i.length;o++){var r=i[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<JF.length;s++)if(JF[s](n,r))return r}return!0},t}();function qF(t){return t[0]>t[1]&&t.reverse(),t}function KF(t,e){return Vr(t,e,{includeMainTypes:YF})}var $F={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,o=t.gridModels,r=Tt(),a={},s={};(i||n||o)&&(q(i,(function(t){var e=t.axis.grid.model;r.set(e.id,e),a[e.id]=!0})),q(n,(function(t){var e=t.axis.grid.model;r.set(e.id,e),s[e.id]=!0})),q(o,(function(t){r.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),r.each((function(t){var o=t.coordinateSystem,r=[];q(o.getCartesians(),(function(t,e){(X(i,t.getAxis("x").model)>=0||X(n,t.getAxis("y").model)>=0)&&r.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:QF.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){q(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:QF.geo})}))}},JF=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],QF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Yg(t)),e}},tV={lineX:et(eV,0),lineY:et(eV,1),rect:function(t,e,i,n){var o=t?e.pointToData([i[0][0],i[1][0]],n):e.dataToPoint([i[0][0],i[1][0]],n),r=t?e.pointToData([i[0][1],i[1][1]],n):e.dataToPoint([i[0][1],i[1][1]],n),a=[qF([o[0],r[0]]),qF([o[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i,n){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:K(i,(function(i){var r=t?e.pointToData(i,n):e.dataToPoint(i,n);return o[0][0]=Math.min(o[0][0],r[0]),o[1][0]=Math.min(o[1][0],r[1]),o[0][1]=Math.max(o[0][1],r[0]),o[1][1]=Math.max(o[1][1],r[1]),r})),xyMinMax:o}}};function eV(t,e,i,n){var o=i.getAxis(["x","y"][t]),r=qF(K([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(n[t]),!0):o.toGlobalCoord(o.dataToCoord(n[t]))}))),a=[];return a[t]=r,a[1-t]=[NaN,NaN],{values:r,xyMinMax:a}}var iV={lineX:et(nV,0),lineY:et(nV,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return K(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function nV(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function oV(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const rV=ZF;var aV,sV,lV=q,hV=Mr+"toolbox-dataZoom_",uV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,i,n){this._brushController||(this._brushController=new iR(i.getZr()),this._brushController.on("brush",tt(this._onBrush,this)).mount()),function(t,e,i,n,o){var r=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(r="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var a=new rV(dV(t),e,{include:["grid"]}).makePanelOpts(o,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));i._brushController.setPanels(a).enableBrush(!(!r||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",function(t){return UF(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,i){cV[i].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new rV(dV(this.model),n,{include:["grid"]}).matchOutputRanges(e,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}})),function(t,e){var i=UF(t);GF(e,(function(e,n){for(var o=i.length-1;o>=0&&!i[o][n];o--);if(o<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var a=r.getPercentRange();i[0][n]={dataZoomId:n,start:a[0],end:a[1]}}}})),i.push(e)}(n,i),this._dispatchZoomAction(i)}function o(t,e,o){var r=e.getAxis(t),a=r.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,a,n),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=qA(0,o.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];lV(t,(function(t,i){e.push(H(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(xF),cV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=UF(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return GF(i,(function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}})),n}(this.ecModel))}};function dV(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}aV="dataZoom",sV=function(t){var e=t.getComponent("toolbox",0),i=["feature","dataZoom"];if(e&&null!=e.get(i)){var n=e.getModel(i),o=[],r=Vr(t,dV(n));return lV(r.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),lV(r.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),o}function a(t,e,i){var r=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:hV+e+r};a[i]=r,o.push(a)}},yt(null==Rc.get(aV)&&sV),Rc.set(aV,sV);const pV=uV,fV=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(uc);function gV(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function mV(t){if(b.domSupported)for(var e=document.documentElement.style,i=0,n=t.length;i<n;i++)if(t[i]in e)return t[i]}var vV=mV(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function yV(t,e){if(!t)return e;e=Wu(e,!0);var i=t.indexOf(e);return(t=-1===i?e:"-"+t.slice(0,i)+"-"+e).toLowerCase()}var bV=yV(mV(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),xV=yV(vV,"transform"),wV="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(b.transform3dSupported?"will-change:transform;":"");function _V(t,e,i){var n=t.toFixed(0)+"px",o=e.toFixed(0)+"px";if(!b.transformSupported)return i?"top:"+o+";left:"+n+";":[["top",o],["left",n]];var r=b.transform3dSupported,a="translate"+(r?"3d":"")+"("+n+","+o+(r?",0":"")+")";return i?"top:0;left:0;"+xV+":"+a+";":[["top",0],["left",0],[vV,a]]}function CV(t,e,i,n,o){var r=e&&e.painter;if(i){var a=r&&r.getViewportRoot();a&&function(t,e,i,n,o){ae(re,e,n,o,!0)&&ae(t,i,re[0],re[1])}(t,a,document.body,n,o)}else{t[0]=n,t[1]=o;var s=r&&r.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var SV=function(){function t(t,e,i){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,b.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),r=this._appendToBody=i&&i.appendToBody;CV(this._styleCoord,o,r,e.getWidth()/2,e.getHeight()/2),r?document.body.appendChild(n):t.appendChild(n),this._container=t;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=o.handler;ve(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){var e,i,n,o=this._container,r=(i="position",(n=(e=o).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e))?i?n[i]:n:null),a=o.style;"absolute"!==a.position&&"absolute"!==r&&(a.position="relative");var s=t.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,o=this._styleCoord;i.innerHTML?n.cssText=wV+function(t,e,i){var n=[],o=t.get("transitionDuration"),r=t.get("backgroundColor"),a=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),u=t.getModel("textStyle"),c=Wp(t,"html"),d=l+"px "+h+"px "+a+"px "+s;return n.push("box-shadow:"+d),e&&o&&n.push(function(t,e){var i="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+i,o="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+i,o+=b.transformSupported?","+xV+n:",left"+n+",top"+n),bV+":"+o}(o,i)),r&&n.push("background-color:"+r),q(["width","color","radius"],(function(e){var i="border-"+e,o=Wu(i),r=t.get(o);null!=r&&n.push(i+":"+r+("color"===e?"":"px"))})),n.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px");var o=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return o&&r&&e.push("text-shadow:"+a+"px "+s+"px "+r+"px "+o),q(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(u)),null!=c&&n.push("padding:"+Uu(c).join("px ")+"px"),n.join(";")+";"}(t,!this._firstShow,this._longHide)+_V(o[0],o[1],!0)+"border-color:"+qu(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,i,n,o){var r=this.el;if(null!=t){var a="";if(ot(o)&&"item"===i.get("trigger")&&!gV(i)&&(a=function(t,e,i){if(!ot(i)||"inside"===i)return"";var n=t.get("backgroundColor"),o=t.get("borderWidth");e=qu(e);var r,a,s="left"===(r=i)?"right":"right"===r?"left":"top"===r?"bottom":"top",l=Math.max(1.5*Math.round(o),6),h="",u=xV+":";X(["left","right"],s)>-1?(h+="top:50%",u+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(h+="left:50%",u+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,d=l+o,p=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),f=e+" solid "+o+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(h+=";"+s+":-"+Math.round(100*((p-Math.SQRT2*o)/2+Math.SQRT2*o-(p-d)/2))/100+"px")+";"+u+";","border-bottom:"+f,"border-right:"+f,"background-color:"+n+";"].join("")+'"></div>'}(i,n,o)),ot(t))r.innerHTML=t+a;else if(t){r.innerHTML="",it(t)||(t=[t]);for(var s=0;s<t.length;s++)ut(t[s])&&t[s].parentNode!==r&&r.appendChild(t[s]);if(a&&r.childNodes.length){var l=document.createElement("div");l.innerHTML=a,r.appendChild(l)}}}else r.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},t.prototype.moveTo=function(t,e){var i=this._styleCoord;if(CV(i,this._zr,this._appendToBody,t,e),null!=i[0]&&null!=i[1]){var n=this.el.style;q(_V(i[0],i[1]),(function(t){n[t[0]]=t[1]}))}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",b.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tt(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},t}();const MV=SV;function TV(t){return Math.max(0,t)}function EV(t){var e=TV(t.shadowBlur||0),i=TV(t.shadowOffsetX||0),n=TV(t.shadowOffsetY||0);return{left:TV(e-i),right:TV(e+i),top:TV(e-n),bottom:TV(e+n)}}function IV(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const DV=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),IV(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,i,n,o){var r=this;st(t)&&$d(""),this.el&&this._zr.remove(this.el);var a=i.getModel("textStyle");this.el=new cl({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:a.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:Wp(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),q(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){r.el.style[t]=i.get(t)})),q(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){r.el.style[t]=a.get(t)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=EV(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},t.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;IV(n,this._zr,t,e),t=n[0],e=n[1];var o=i.style,r=TV(o.borderWidth||0),a=EV(o);i.x=t+r+a.left,i.y=e+r+a.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tt(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();var kV=new qs({shape:{x:-1,y:-1,width:2,height:2}}),AV=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(t,e){if(!b.node&&e.getDom()){var i,n=t.getComponent("tooltip"),o=this._renderMode="auto"===(i=n.get("renderMode"))?b.domSupported?"html":"richText":i||"html";this._tooltipContent="richText"===o?new DV(e):new MV(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,i){if(!b.node&&i.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i;var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?xm(this,"_updatePosition",50,"fixRate"):wm(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");fN("itemTooltip",this._api,tt((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,i=this._api,n=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==n&&"click"!==n){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&o.manuallyShowTip(t,e,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,i,n){if(n.from!==this.uid&&!b.node&&i.getDom()){var o=RV(n,i);this._ticket="";var r=n.dataByCoordSys,a=function(t,e,i){var n=Hr(t).queryOptionMap,o=n.keys()[0];if(o&&"series"!==o){var r,a=Ur(e,o,n.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return i.getViewOfComponentModel(a).group.traverse((function(e){var i=dl(e).tooltipConfig;if(i&&i.name===t.name)return r=e,!0})),r?{componentMainType:o,componentIndex:a.componentIndex,el:r}:void 0}}(n,e,i);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&null!=n.x&&null!=n.y){var l=kV;l.x=n.x,l.y=n.y,l.update(),dl(l).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:l},o)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:r,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var h=xN(n,e),u=h.point[0],c=h.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,target:h.el,position:n.position,positionDefault:"bottom"},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(RV(n,i))},e.prototype._manuallyAxisShowTip=function(t,e,i,n){var o=n.seriesIndex,r=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=e.getSeriesByIndex(o);if(s&&"axis"===LV([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:n.position}),!0}},e.prototype._tryShow=function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;if(n&&n.length)this._showAxisTooltip(n,t);else if(i){var o,r;this._lastDataByCoordSys=null,dv(i,(function(t){return null!=dl(t).dataIndex?(o=t,!0):null!=dl(t).tooltipConfig?(r=t,!0):void 0}),!0),o?this._showSeriesItemTooltip(t,o,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var i=t.get("showDelay");e=tt(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},e.prototype._showAxisTooltip=function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],r=LV([e.tooltipOption],n),a=this._renderMode,s=[],l=Rp("section",{blocks:[],noHeader:!0}),h=[],u=new Up;q(t,(function(t){q(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value;if(e&&null!=o){var r=tN(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt),c=Rp("section",{header:r,noHeader:!bt(r),sortBlocks:!0,blocks:[]});l.blocks.push(c),q(t.seriesDataIndices,(function(l){var d=i.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=QS(e.axis,{value:o}),f.axisValueLabel=r,f.marker=u.makeTooltipMarker("item",qu(f.color),a);var g=Yd(d.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=LV([d],n).get("valueFormatter");c.blocks.push(v?U({valueFormatter:v},m):m)}g.text&&h.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),h.reverse();var c=e.position,d=r.get("order"),p=Fp(l,u,a,d,i.get("useUTC"),r.get("textStyle"));p&&h.unshift(p);var f="richText"===a?"\n\n":"<br/>",g=h.join(f);this._showOrMove(r,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(r,c,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(r,g,s,Math.random()+"",o[0],o[1],c,null,u)}))},e.prototype._showSeriesItemTooltip=function(t,e,i){var n=this._ecModel,o=dl(e),r=o.seriesIndex,a=n.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,h=o.dataType,u=s.getData(h),c=this._renderMode,d=t.positionDefault,p=LV([u.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,h),m=new Up;g.marker=m.makeTooltipMarker("item",qu(g.color),c);var v=Yd(s.formatTooltip(l,!1,h)),y=p.get("order"),b=p.get("valueFormatter"),x=v.frag,w=x?Fp(b?U({valueFormatter:b},x):x,m,c,y,n.get("useUTC"),p.get("textStyle")):v.text,_="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,w,g,_,t.offsetX,t.offsetY,t.position,t.target,m)})),i({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:r,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,i){var n=dl(e),o=n.tooltipConfig.option||{};ot(o)&&(o={content:o,formatter:o});var r=[o],a=this._ecModel.getComponent(n.componentMainType,n.componentIndex);a&&r.push(a),r.push({formatter:o.content});var s=t.positionDefault,l=LV(r,this._tooltipModel,s?{position:s}:null),h=l.get("content"),u=Math.random()+"",c=new Up;this._showOrMove(l,(function(){var i=H(l.get("formatterParams")||{});this._showTooltipContent(l,h,i,u,t.offsetX,t.offsetY,t.position,e,c)})),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,i,n,o,r,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var u=t.get("formatter");a=a||t.get("position");var c=e,d=this._getNearestPoint([o,r],i,t.get("trigger"),t.get("borderColor")).color;if(u)if(ot(u)){var p=t.ecModel.get("useUTC"),f=it(i)?i[0]:i;c=u,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Mu(f.axisValue,c,p)),c=Zu(c,i,!0)}else if(nt(u)){var g=tt((function(e,n){e===this._ticket&&(h.setContent(n,l,t,d,a),this._updatePosition(t,a,o,r,h,i,s))}),this);this._ticket=n,c=u(i,n,g)}else c=u;h.setContent(c,l,t,d,a),h.show(t,d),this._updatePosition(t,a,o,r,h,i,s)}},e.prototype._getNearestPoint=function(t,e,i,n){return"axis"===i||it(e)?{color:n||("html"===this._renderMode?"#fff":"none")}:it(e)?void 0:{color:n||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,i,n,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=o.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),nt(e)&&(e=e([i,n],r,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),it(e))i=nr(e[0],s),n=nr(e[1],l);else if(st(e)){var p=e;p.width=h[0],p.height=h[1];var f=ic(p,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if(ot(e)&&a){var g=function(t,e,i,n){var o=i[0],r=i[1],a=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,h=e.width,u=e.height;switch(t){case"inside":s=e.x+h/2-o/2,l=e.y+u/2-r/2;break;case"top":s=e.x+h/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+h/2-o/2,l=e.y+u+a;break;case"left":s=e.x-o-a,l=e.y+u/2-r/2;break;case"right":s=e.x+h+a,l=e.y+u/2-r/2}return[s,l]}(e,d,h,t.get("borderWidth"));i=g[0],n=g[1]}else g=function(t,e,i,n,o,r,a){var s=i.getSize(),l=s[0],h=s[1];return null!=r&&(t+l+r+2>n?t-=l+r:t+=r),null!=a&&(e+h+a>o?e-=h+a:e+=a),[t,e]}(i,n,o,s,l,u?null:20,c?null:20),i=g[0],n=g[1];u&&(i-=PV(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=PV(c)?h[1]/2:"bottom"===c?h[1]:0),gV(t)&&(g=function(t,e,i,n,o){var r=i.getSize(),a=r[0],s=r[1];return t=Math.min(t+a,n)-a,e=Math.min(e+s,o)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(i,n,o,s,l),i=g[0],n=g[1]),o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&q(i,(function(i,r){var a=i.dataByAxis||[],s=(t[r]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&q(a,(function(t,i){var r=s[i]||{},a=t.seriesDataIndices||[],l=r.seriesDataIndices||[];(o=o&&t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&a.length===l.length)&&q(a,(function(t,e){var i=l[e];o=o&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})),n&&q(t.seriesDataIndices,(function(t){var i=t.seriesIndex,r=e[i],a=n[i];r&&a&&a.data!==r.data&&(o=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!b.node&&e.getDom()&&(wm(this,"_updatePosition"),this._tooltipContent.dispose(),vN("itemTooltip",e))},e.type="tooltip",e}(af);function LV(t,e,i){var n,o=e.ecModel;i?(n=new eu(i,o,o),n=new eu(e.option,n,o)):n=e;for(var r=t.length-1;r>=0;r--){var a=t[r];a&&(a instanceof eu&&(a=a.get("tooltip",!0)),ot(a)&&(a={formatter:a}),a&&(n=new eu(a,n,o)))}return n}function RV(t,e){return t.dispatchAction||tt(e.dispatchAction,e)}function PV(t){return"center"===t||"middle"===t}const OV=AV;var zV=["rect","polygon","keep","clear"];function NV(t,e){var i=Tr(t?t.brush:[]);if(i.length){var n=[];q(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var o=t&&t.toolbox;it(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var r=o.feature||(o.feature={}),a=r.brush||(r.brush={}),s=a.type||(a.type=[]);s.push.apply(s,n),function(t){var e={};q(t,(function(t){e[t]=1})),t.length=0,q(e,(function(e,i){t.push(i)}))}(s),e&&!s.length&&s.push.apply(s,zV)}}var BV=q;function FV(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function VV(t,e,i){var n={};return BV(e,(function(e){var o,r=n[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);BV(t[e],(function(t,n){if(VD.isValidType(n)){var o={type:n,visual:t};i&&i(o,e),r[n]=new VD(o),"opacity"===n&&((o=H(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new VD(o))}}))})),n}function HV(t,e,i){var n;q(i,(function(t){e.hasOwnProperty(t)&&FV(e[t])&&(n=!0)})),n&&q(i,(function(i){e.hasOwnProperty(i)&&FV(e[i])?t[i]=H(e[i]):delete t[i]}))}var GV={lineX:WV(0),lineY:WV(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&sE(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=n[0];return!!(sE(n,o,r)||sE(n,o+a,r)||sE(n,o,r+s)||sE(n,o+a,r+s)||Ge.create(t).contain(l[0],l[1])||em(o,r,o+a,r,n)||em(o,r,o,r+s,n)||em(o+a,r,o+a,r+s,n)||em(o,r+s,o+a,r+s,n))||void 0}}};function WV(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range;return UV(e[t],o)}},rect:function(n,o,r){if(n){var a=r.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),UV(s[0],a)||UV(s[1],a)||UV(a[0],s)||UV(a[1],s)}}}}function UV(t,e){return e[0]<=t&&t<=e[1]}var jV=["inBrush","outOfBrush"],XV="__ecBrushSelect",YV="__ecInBrushSelectEvent";function ZV(t){t.eachComponent({mainType:"brush"},(function(e){(e.brushTargetManager=new rV(e.option,t)).setInputRanges(e.areas,t)}))}function qV(t,e,i){var n,o,r=[];t.eachComponent({mainType:"brush"},(function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),ZV(t),t.eachComponent({mainType:"brush"},(function(e,i){var a={brushId:e.id,brushIndex:i,brushName:e.name,areas:H(e.areas),selected:[]};r.push(a);var s=e.option,l=s.brushLink,h=[],u=[],c=[],d=!1;i||(n=s.throttleType,o=s.throttleDelay);var p=K(e.areas,(function(t){var e=JV[t.brushType],i=j({boundingRect:e?e(t):void 0},t);return i.selectors=function(t){var e=t.brushType,i={point:function(n){return GV[e].point(n,i,t)},rect:function(n){return GV[e].rect(n,i,t)}};return i}(i),i})),f=VV(e.option,jV,(function(t){t.mappingMethod="fixed"}));function g(t){return"all"===l||!!h[t]}function m(t){return!!t.length}it(l)&&q(l,(function(t){h[t]=1})),t.eachSeries((function(i,n){var o=c[n]=[];"parallel"===i.subType?function(t,e){var i=t.coordinateSystem;d=d||i.hasAxisBrushed(),g(e)&&i.eachActiveState(t.getData(),(function(t,e){"active"===t&&(u[e]=1)}))}(i,n):function(i,n,o){if(i.brushSelector&&!function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(it(i)?X(i,e)<0:e!==i)}(e,n)&&(q(p,(function(n){e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),d=d||m(o)})),g(n)&&m(o))){var r=i.getData();r.each((function(t){$V(i,o,r,t)&&(u[t]=1)}))}}(i,n,o)})),t.eachSeries((function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};a.selected.push(i);var n=c[e],o=t.getData(),r=g(e)?function(t){return u[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(e){return $V(t,n,o,e)?(i.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(e)?d:m(n))&&function(t,e,i,n,o,r){var a,s={};function l(t){return sv(i,a,t)}function h(t,e){hv(i,a,t,e)}function u(t,o){a=t;var r=i.getRawDataItem(a);if(!r||!1!==r.visualMap)for(var u=n.call(undefined,t),c=e[u],d=s[u],p=0,f=d.length;p<f;p++){var g=d[p];c[g]&&c[g].applyVisual(t,l,h)}}q(t,(function(t){var i=VD.prepareVisualTypes(e[t]);s[t]=i})),i.each(u)}(jV,f,o,r)}))})),function(t,e,i,n,o){if(o){var r=t.getZr();if(!r[YV])r[XV]||(r[XV]=KV),xm(r,XV,i,e)(t,n)}}(e,n,o,r,i)}function KV(t,e){if(!t.isDisposed()){var i=t.getZr();i[YV]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[YV]=!1}}function $V(t,e,i,n){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(n,i,a.selectors,a))return!0}}var JV={rect:function(t){return QV(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var r=i[n];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&QV(e)}};function QV(t){return new Ge(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const tH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new iR(e.getZr())).on("brush",tt(this._onBrush,this)).mount()},e.prototype.render=function(t,e,i,n){this.model=t,this._updateController(t,e,i,n)},e.prototype.updateTransform=function(t,e,i,n){ZV(e),this._updateController(t,e,i,n)},e.prototype.updateVisual=function(t,e,i,n){this.updateTransform(t,e,i,n)},e.prototype.updateView=function(t,e,i,n){this._updateController(t,e,i,n)},e.prototype._updateController=function(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:H(i),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:H(i),$from:e})},e.type="brush",e}(af);function eH(t,e){return G({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new eu(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const iH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.areas=[],i.brushOption={},i}return m(e,t),e.prototype.optionUpdated=function(t,e){var i=this.option;!e&&HV(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:"#ddd"},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=K(t,(function(t){return eH(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=eH(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(uc);var nH=["rect","polygon","lineX","lineY","keep","clear"];const oH=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,i){var n,o,r;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length})),this._brushType=n,this._brushMode=o,q(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===n)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,i){this.render(t,e,i)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return q(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},e.prototype.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:nH.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(xF);var rH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode={type:"box",ignoreSize:!0},i}return m(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(uc),aH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.render=function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),r=t.getModel("subtextStyle"),a=t.get("textAlign"),s=ft(t.get("textBaseline"),t.get("textVerticalAlign")),l=new cl({style:Ah(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new cl({style:Ah(r,{text:u,fill:r.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!d&&!f,c.silent=!p&&!f,d&&l.on("click",(function(){Ku(d,"_"+t.get("target"))})),p&&c.on("click",(function(){Ku(p,"_"+t.get("subtarget"))})),dl(l).eventData=dl(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),u&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ic(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.x=v.x,n.y=v.y,n.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var b=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new qs({shape:{x:g.x-b[3],y:g.y-b[0],width:g.width+b[1]+b[3],height:g.height+b[0]+b[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});n.add(w)}},e.type="title",e}(af),sH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode="box",i}return m(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,i=e.data||[],n=e.axisType,o=this._names=[];"category"===n?(t=[],q(i,(function(e,i){var n,r=Pr(Dr(e),"");st(e)?(n=H(e)).value=i:n=i,t.push(n),o.push(r)}))):t=i;var r={category:"ordinal",time:"time",value:"number"}[n]||"number";(this._data=new Yw([{name:"value",type:r}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(uc);const lH=sH;var hH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="timeline.slider",e.defaultOption=ou(lH.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(lH);Y(hH,Xd.prototype);const uH=hH,cH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="timeline",e}(af);var dH=function(t){function e(e,i,n,o){var r=t.call(this,e,i,n)||this;return r.type=o||"value",r}return m(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(bM);const pH=dH;var fH=Math.PI,gH=Br(),mH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Rp("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},q(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](n,o,a,t)}),this),this._renderAxisLabel(n,r,a,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var i,n,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return ic(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),h={horizontal:"center",vertical:(i=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<e.getHeight()/2?"-":"+":l.x+l.width/2<e.getWidth()/2?"+":"-":ot(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===i?"left":"right"},u={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:fH/2},d="vertical"===s?l.height:l.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=t.get(["label","rotate"])||0;y=y*fH/180;var b=p.get("position",!0),x=f&&p.get("showPlayBtn",!0),w=f&&p.get("showPrevBtn",!0),_=f&&p.get("showNextBtn",!0),C=0,S=d;"left"===b||"bottom"===b?(x&&(n=[0,0],C+=v),w&&(o=[C,0],C+=v),_&&(r=[S-g,0],S-=v)):(x&&(n=[S-g,0],S-=v),w&&(o=[0,0],C+=v),_&&(r=[S-g,0],S-=v));var M=[C,S];return t.get("inverse")&&M.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:y,labelPosOpt:i,labelAlign:t.get(["label","align"])||h[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[s],playPosition:n,prevBtnPosition:o,nextBtnPosition:r,axisExtent:M,controlSize:g,controlGap:m}},e.prototype._position=function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var r=[1,0,0,1,0,0],a=o.x,s=o.y+o.height;Ee(r,r,[-a,-s]),Ie(r,r,-fH/2),Ee(r,r,[a,s]),(o=o.clone()).applyTransform(r)}var l=m(o),h=m(i.getBoundingRect()),u=m(n.getBoundingRect()),c=[i.x,i.y],d=[n.x,n.y];d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}null==f||ot(f)?(v(c,h,l,1,p="+"===f?0:1),v(d,u,l,1,1-p)):(v(c,h,l,1,p=f>=0?0:1),d[1]=c[1]+f),i.setPosition(c),n.setPosition(d),i.rotation=n.rotation=t.rotation,g(i),g(n)},e.prototype._createAxis=function(t,e){var i=e.getData(),n=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new xS({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new LS({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new CS}}(e,n);o.getTicks=function(){return i.mapArray(["value"],(function(t){return{value:t}}))};var r=i.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new pH("value",o,t.axisExtent,n);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new qo;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var r=new lg({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:U({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new lg({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:j({lineCap:"round",lineWidth:r.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,i,n){var o=this,r=n.getData(),a=i.scale.getTicks();this._tickSymbols=[],q(a,(function(t){var a=i.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),h=s.getModel(["emphasis","itemStyle"]),u=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:tt(o._changeTimeline,o,t.value)},d=vH(s,l,e,c);d.ensureState("emphasis").style=h.getItemStyle(),d.ensureState("progress").style=u.getItemStyle(),ah(d);var p=dl(d);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=n):p.dataIndex=p.dataModel=null,o._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,i,n){var o=this;if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();this._tickLabels=[],q(a,(function(n){var a=n.tickValue,s=r.getItemModel(a),l=s.getModel("label"),h=s.getModel(["emphasis","label"]),u=s.getModel(["progress","label"]),c=i.dataToCoord(n.tickValue),d=new cl({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:tt(o._changeTimeline,o,a),silent:!1,style:Ah(l,{text:n.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=Ah(h),d.ensureState("progress").style=Ah(u),e.add(d),ah(d),gH(d).dataIndex=a,o._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,i,n){var o=t.controlSize,r=t.rotation,a=n.getModel("controlStyle").getItemStyle(),s=n.getModel(["emphasis","controlStyle"]).getItemStyle(),l=n.getPlayState(),h=n.get("inverse",!0);function u(t,i,l,h){if(t){var u=Oo(ft(n.get(["controlStyle",i+"BtnSize"]),o),o),c=function(t,e,i,n){var o=n.style,r=tm(t.get(["controlStyle",e]),n||{},new Ge(i[0],i[1],i[2],i[3]));return o&&r.setStyle(o),r}(n,i+"Icon",[0,-u/2,u,u],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:h?-r:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),ah(c)}}u(t.nextBtnPosition,"next",tt(this._changeTimeline,this,h?"-":"+")),u(t.prevBtnPosition,"prev",tt(this._changeTimeline,this,h?"+":"-")),u(t.playPosition,l?"stop":"play",tt(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,i,n){var o=n.getData(),r=n.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=tt(s._handlePointerDrag,s),t.ondragend=tt(s._handlePointerDragend,s),yH(t,s._progressLine,r,i,n,!0)},onUpdate:function(t){yH(t,s._progressLine,r,i,n)}};this._currentPointer=vH(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var i=this._toAxisCoord(t)[0],n=rr(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=i,o.dirty());var r=this._findNearestTick(i),a=this.model;(e||r!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(r)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){return Zg(t,this._mainGroup.getLocalTransform(),!0)},e.prototype._findNearestTick=function(t){var e,i=this.model.getData(),n=1/0,o=this._axis;return i.each(["value"],(function(i,r){var a=o.dataToCoord(i),s=Math.abs(a-t);s<n&&(n=s,e=r)})),e},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,i=this._tickLabels;if(e)for(var n=0;n<e.length;n++)e&&e[n]&&e[n].toggleState("progress",n<t);if(i)for(n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",gH(i[n]).dataIndex<=t)},e.type="timeline.slider",e}(cH);function vH(t,e,i,n,o,r){var a=e.get("color");o?(o.setColor(a),i.add(o),r&&r.onUpdate(o)):((o=Mv(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),i.add(o),r&&r.onCreate(o));var s=e.getItemStyle(["color"]);o.setStyle(s),n=G({rectHover:!0,z2:100},n,!0);var l=Tv(t.get("symbolSize"));n.scaleX=l[0]/2,n.scaleY=l[1]/2;var h=Ev(t.get("symbolOffset"),l);h&&(n.x=(n.x||0)+h[0],n.y=(n.y||0)+h[1]);var u=t.get("symbolRotate");return n.rotation=(u||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function yH(t,e,i,n,o,r){if(!t.dragging){var a=o.getModel("checkpointStyle"),s=n.dataToCoord(o.getData().get("value",i));if(r||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const bH=mH;function xH(t){var e=t&&t.timeline;it(e)||(e=e?[e]:[]),q(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),wH(t),_H(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});_H(n,"position")||(n.position=t.controlPosition),"none"!==n.position||_H(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}q(t.data||[],(function(t){st(t)&&!it(t)&&(!_H(t,"value")&&_H(t,"name")&&(t.value=t.name),wH(t))}))}(t)}))}function wH(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),r={normal:1,emphasis:1};q(n,(function(t,e){r[e]||_H(o,e)||(o[e]=t)})),i.label&&!_H(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function _H(t,e){return t.hasOwnProperty(e)}function CH(t,e){if(!t)return!1;for(var i=it(t)?t:[t],n=0;n<i.length;n++)if(i[n]&&i[n][e])return!0;return!1}function SH(t){Er(t,"label",["show"])}var MH=Br(),TH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.createdBySelf=!1,i}return m(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(b.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,i,n){var o=this.mainType;i||e.eachSeries((function(t){var i=t.get(this.mainType,!0),r=MH(t)[o];i&&i.data?(r?r._mergeOption(i,e,!0):(n&&SH(i),q(i.data,(function(t){t instanceof Array?(SH(t[0]),SH(t[1])):SH(t)})),U(r=this.createMarkerModelFromSeries(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),MH(t)[o]=r):MH(t)[o]=null}),this)},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.getRawValue(t),r=n.getName(t);return Rp("section",{header:this.name,blocks:[Rp("nameValue",{name:r,value:o,noName:!r,noValue:null==o})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,e){return MH(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(uc);Y(TH,Xd.prototype);const EH=TH,IH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(EH);function DH(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function kH(t,e,i,n,o,r){var a=[],s=Qw(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=zH(e,s,t),h=e.indicesOfNearest(s,l)[0];a[o]=e.get(i,h),a[r]=e.get(s,h);var u=e.get(n,h),c=ar(e.get(n,h));return(c=Math.min(c,20))>=0&&(a[r]=+a[r].toFixed(c)),[a,u]}var AH={min:et(kH,"min"),max:et(kH,"max"),average:et(kH,"average"),median:et(kH,"median")};function LH(t,e){if(e){var i=t.getData(),n=t.coordinateSystem,o=n&&n.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!it(e.coord)&&it(o)){var r=RH(e,i,n,t);if((e=H(e)).type&&AH[e.type]&&r.baseAxis&&r.valueAxis){var a=X(o,r.baseAxis.dim),s=X(o,r.valueAxis.dim),l=AH[e.type](i,r.baseDataDim,r.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&it(o))for(var h=e.coord,u=0;u<2;u++)AH[h[u]]&&(h[u]=zH(i,i.mapDimension(o[u]),h[u]));else e.coord=[];return e}}function RH(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData().getDimensionInfo(e);return i&&i.coordDim}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function PH(t,e){return!(t&&t.containData&&e.coord&&!DH(e))||t.containData(e.coord)}function OH(t,e){return t?function(t,i,n,o){return Jd(o<2?t.coord&&t.coord[o]:t.value,e[o])}:function(t,i,n,o){return Jd(t.value,e[o])}}function zH(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,o++)})),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e)["max"===i?1:0]}var NH=Br();const BH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.init=function(){this.markerGroupMap=Tt()},e.prototype.render=function(t,e,i){var n=this,o=this.markerGroupMap;o.each((function(t){NH(t).keep=!1})),e.eachSeries((function(t){var o=EH.getMarkerModelFromSeries(t,n.type);o&&n.renderSeries(t,o,e,i)})),o.each((function(t){!NH(t).keep&&n.group.remove(t.group)}))},e.prototype.markKeep=function(t){NH(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var i=this;q(t,(function(t){var n=EH.getMarkerModelFromSeries(t,i.type);n&&n.getData().eachItemGraphicEl((function(t){t&&(e?ql(t):Kl(t))}))}))},e.type="marker",e}(af);function FH(t,e,i){var n=e.coordinateSystem;t.each((function(o){var r,a=t.getItemModel(o),s=nr(a.get("x"),i.getWidth()),l=nr(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var h=t.get(n.dimensions[0],o),u=t.get(n.dimensions[1],o);r=n.dataToPoint([h,u])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)}))}var VH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=EH.getMarkerModelFromSeries(t,"markPoint");e&&(FH(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new d_),h=function(t,e,i){var n;n=t?K(t&&t.dimensions,(function(t){return U(U({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Yw(n,i),r=K(i.get("data"),et(LH,e));t&&(r=J(r,et(PH,t)));var a=OH(!!t,n);return o.initData(r,null,a),o}(o,t,e);e.setData(h),FH(e.getData(),t,n),h.each((function(t){var i=h.getItemModel(t),n=i.getShallow("symbol"),o=i.getShallow("symbolSize"),r=i.getShallow("symbolRotate"),s=i.getShallow("symbolOffset"),l=i.getShallow("symbolKeepAspect");if(nt(n)||nt(o)||nt(r)||nt(s)){var u=e.getRawValue(t),c=e.getDataParams(t);nt(n)&&(n=n(u,c)),nt(o)&&(o=o(u,c)),nt(r)&&(r=r(u,c)),nt(s)&&(s=s(u,c))}var d=i.getModel("itemStyle").getItemStyle(),p=lv(a,"color");d.fill||(d.fill=p),h.setItemVisual(t,{symbol:n,symbolSize:o,symbolRotate:r,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl((function(t){t.traverse((function(t){dl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(BH);const HH=VH,GH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(EH);var WH=Br(),UH=function(t,e,i,n){var o,r=t.getData();if(it(n))o=n;else{var a=n.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis){var s=void 0,l=void 0;if(null!=n.yAxis||null!=n.xAxis)s=e.getAxis(null!=n.yAxis?"y":"x"),l=pt(n.yAxis,n.xAxis);else{var h=RH(n,r,e,t);s=h.valueAxis,l=zH(r,t_(r,h.valueDataDim),a)}var u="x"===s.dim?0:1,c=1-u,d=H(n),p={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,p.coord[c]=1/0;var f=i.get("precision");f>=0&&at(l)&&(l=+l.toFixed(Math.min(f,20))),d.coord[u]=p.coord[u]=l,o=[d,p,{type:a,valueIndex:n.valueIndex,value:l}]}else o=[]}var g=[LH(t,o[0]),LH(t,o[1]),U({},o[2])];return g[2].type=g[2].type||null,G(g[2],g[0]),G(g[2],g[1]),g};function jH(t){return!isNaN(t)&&!isFinite(t)}function XH(t,e,i,n){var o=1-t,r=n.dimensions[t];return jH(e[o])&&jH(i[o])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function YH(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(XH(1,i,n,t)||XH(0,i,n,t)))return!0}return PH(t,e[0])&&PH(t,e[1])}function ZH(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=nr(s.get("x"),o.getWidth()),h=nr(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);r=a.dataToPoint([c,d])}if(D_(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");u=a.dimensions,jH(t.get(u[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):jH(t.get(u[1],e))&&(r[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];t.setItemLayout(e,r)}const qH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=EH.getMarkerModelFromSeries(t,"markLine");if(e){var n=e.getData(),o=WH(e).from,r=WH(e).to;o.each((function(e){ZH(o,e,!0,t,i),ZH(r,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new Kk);this.group.add(l.group);var h=function(t,e,i){var n;n=t?K(t&&t.dimensions,(function(t){return U(U({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Yw(n,i),r=new Yw(n,i),a=new Yw([],i),s=K(i.get("data"),et(UH,e,t,i));t&&(s=J(s,et(YH,t)));var l=OH(!!t,n);return o.initData(K(s,(function(t){return t[0]})),null,l),r.initData(K(s,(function(t){return t[1]})),null,l),a.initData(K(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:o,to:r,line:a}}(o,t,e),u=h.from,c=h.to,d=h.line;WH(e).from=u,WH(e).to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),m=e.get("symbolOffset");function v(e,i,o){var r=e.getItemModel(i);ZH(e,i,o,t,n);var s=r.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=lv(a,"color")),e.setItemVisual(i,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:ft(r.get("symbolOffset",!0),m[o?0:1]),symbolRotate:ft(r.get("symbolRotate",!0),g[o?0:1]),symbolSize:ft(r.get("symbolSize"),f[o?0:1]),symbol:ft(r.get("symbol",!0),p[o?0:1]),style:s})}it(p)||(p=[p,p]),it(f)||(f=[f,f]),it(g)||(g=[g,g]),it(m)||(m=[m,m]),h.from.each((function(t){v(u,t,!0),v(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[u.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=u.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:u.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:u.getItemVisual(t,"symbolOffset"),fromSymbolRotate:u.getItemVisual(t,"symbolRotate"),fromSymbolSize:u.getItemVisual(t,"symbolSize"),fromSymbol:u.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),h.line.eachItemGraphicEl((function(t){dl(t).dataModel=e,t.traverse((function(t){dl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(BH),KH=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(EH);var $H=Br(),JH=function(t,e,i,n){var o=n[0],r=n[1];if(o&&r){var a=LH(t,o),s=LH(t,r),l=a.coord,h=s.coord;l[0]=pt(l[0],-1/0),l[1]=pt(l[1],-1/0),h[0]=pt(h[0],1/0),h[1]=pt(h[1],1/0);var u=W([{},a,s]);return u.coord=[a.coord,s.coord],u.x0=a.x,u.y0=a.y,u.x1=s.x,u.y1=s.y,u}};function QH(t){return!isNaN(t)&&!isFinite(t)}function tG(t,e,i,n){var o=1-t;return QH(e[o])&&QH(i[o])}function eG(t,e){var i=e.coord[0],n=e.coord[1],o={coord:i,x:e.x0,y:e.y0},r={coord:n,x:e.x1,y:e.y1};return D_(t,"cartesian2d")?!(!i||!n||!tG(1,i,n)&&!tG(0,i,n))||function(t,e,i){return!(t&&t.containZone&&e.coord&&i.coord&&!DH(e)&&!DH(i))||t.containZone(e.coord,i.coord)}(t,o,r):PH(t,o)||PH(t,r)}function iG(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=nr(s.get(i[0]),o.getWidth()),h=nr(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition){var u=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),d=a.clampData(u),p=a.clampData(c),f=[];"x0"===i[0]?f[0]=d[0]>p[0]?c[0]:u[0]:f[0]=d[0]>p[0]?u[0]:c[0],"y0"===i[1]?f[1]=d[1]>p[1]?c[1]:u[1]:f[1]=d[1]>p[1]?u[1]:c[1],r=n.getMarkerPosition(f,i,!0)}else{var g=[y=t.get(i[0],e),b=t.get(i[1],e)];a.clampData&&a.clampData(g,g),r=a.dataToPoint(g,!0)}if(D_(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=t.get(i[0],e),b=t.get(i[1],e);QH(y)?r[0]=m.toGlobalCoord(m.getExtent()["x0"===i[0]?0:1]):QH(b)&&(r[1]=v.toGlobalCoord(v.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];return r}var nG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=EH.getMarkerModelFromSeries(t,"markArea");if(e){var n=e.getData();n.each((function(e){var o=K(nG,(function(o){return iG(n,e,o,t,i)}));n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)}))}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new qo});this.group.add(l.group),this.markKeep(l);var h=function(t,e,i){var n,o;if(t){var r=K(t&&t.dimensions,(function(t){var i=e.getData();return U(U({},i.getDimensionInfo(i.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));o=K(["x0","y0","x1","y1"],(function(t,e){return{name:t,type:r[e%2].type}})),n=new Yw(o,i)}else n=new Yw(o=[{name:"value",type:"float"}],i);var a=K(i.get("data"),et(JH,e,t,i));t&&(a=J(a,et(eG,t)));var s=t?function(t,e,i,n){return Jd(t.coord[Math.floor(n/2)][n%2],o[n])}:function(t,e,i,n){return Jd(t.value,o[n])};return n.initData(a,null,s),n.hasItemOption=!0,n}(o,t,e);e.setData(h),h.each((function(e){var i=K(nG,(function(i){return iG(h,e,i,t,n)})),r=o.getAxis("x").scale,s=o.getAxis("y").scale,l=r.getExtent(),u=s.getExtent(),c=[r.parse(h.get("x0",e)),r.parse(h.get("x1",e))],d=[s.parse(h.get("y0",e)),s.parse(h.get("y1",e))];rr(c),rr(d);var p=!!(l[0]>c[1]||l[1]<c[0]||u[0]>d[1]||u[1]<d[0]);h.setItemLayout(e,{points:i,allClipped:p});var f=h.getItemModel(e).getModel("itemStyle").getItemStyle(),g=lv(a,"color");f.fill||(f.fill=g,ot(f.fill)&&(f.fill=dn(f.fill,.4))),f.stroke||(f.stroke=g),h.setItemVisual(e,"style",f)})),h.diff($H(l).data).add((function(t){var e=h.getItemLayout(t);if(!e.allClipped){var i=new eg({shape:{points:e.points}});h.setItemGraphicEl(t,i),l.group.add(i)}})).update((function(t,i){var n=$H(l).data.getItemGraphicEl(i),o=h.getItemLayout(t);o.allClipped?n&&l.group.remove(n):(n?bh(n,{shape:{points:o.points}},e,t):n=new eg({shape:{points:o.points}}),h.setItemGraphicEl(t,n),l.group.add(n))})).remove((function(t){var e=$H(l).data.getItemGraphicEl(t);l.group.remove(e)})).execute(),h.eachItemGraphicEl((function(t,i){var n=h.getItemModel(i),o=h.getItemVisual(i,"style");t.useStyle(h.getItemVisual(i,"style")),Dh(t,kh(n),{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",inheritColor:ot(o.fill)?dn(o.fill,1):"#000"}),ch(t,n),sh(t,null,null,n.get(["emphasis","disabled"])),dl(t).dataModel=e})),$H(l).data=h,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(BH);const rG=oG;var aG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode={type:"box",ignoreSize:!0},i}return m(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,i){t.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,i=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),it(e)&&q(e,(function(t,n){ot(t)&&(t={type:t}),e[n]=G(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(i,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],i=[];t.eachRawSeries((function(n){var o,r=n.name;if(i.push(r),n.legendVisualProvider){var a=n.legendVisualProvider.getAllNames();t.isSeriesFiltered(n)||(i=i.concat(a)),a.length?e=e.concat(a):o=!0}else o=!0;o&&Or(n)&&e.push(n.name)})),this._availableNames=i;var n=this.get("data")||e,o=Tt(),r=K(n,(function(t){return(ot(t)||at(t))&&(t={name:t}),o.get(t.name)?null:(o.set(t.name,!0),new eu(t,this,this.ecModel))}),this);this._data=J(r,(function(t){return!!t}))},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&q(this._data,(function(t){e[t.get("name")]=!1})),e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;q(t,(function(t){e[t.get("name",!0)]=!0}))},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;q(t,(function(t){var i=t.get("name",!0);e.hasOwnProperty(i)||(e[i]=!0),e[i]=!e[i]}))},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&X(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(uc);const sG=aG;var lG=et,hG=q,uG=qo,cG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.newlineDisabled=!1,i}return m(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new uG),this.group.add(this._selectorGroup=new uG),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),r=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===r?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(o,t,e,i,a,r,s);var l=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},u=t.get("padding"),c=ic(l,h,u),d=this.layoutInner(t,o,c,n,a,s),p=ic(j({width:d.width,height:d.height},l),h,u);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=MF(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,i,n,o,r,a){var s=this.getContentGroup(),l=Tt(),h=e.get("selectedMode"),u=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&u.push(t.id)})),hG(e.getData(),(function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new uG;return c.newline=!0,void s.add(c)}var d=i.getSeriesByName(a)[0];if(!l.get(a))if(d){var p=d.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style");this._createItem(d,a,r,o,e,t,f,m,g,h,n).on("click",lG(dG,a,null,n,u)).on("mouseover",lG(fG,d.name,null,n,u)).on("mouseout",lG(gG,d.name,null,n,u)),l.set(a,!0)}else i.eachRawSeries((function(i){if(!l.get(a)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),d=s.getItemVisual(c,"style"),p=s.getItemVisual(c,"legendIcon"),f=an(d.fill);f&&0===f[3]&&(f[3]=.2,d=U(U({},d),{fill:pn(f,"rgba")})),this._createItem(i,a,r,o,e,t,{},d,p,h,n).on("click",lG(dG,null,a,n,u)).on("mouseover",lG(fG,null,a,n,u)).on("mouseout",lG(gG,null,a,n,u)),l.set(a,!0)}}),this)}),this),o&&this._createSelector(o,e,n,r,a)},e.prototype._createSelector=function(t,e,i,n,o){var r=this.getSelectorGroup();hG(t,(function(t){var n=t.type,o=new cl({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});r.add(o),Dh(o,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),ah(o)}))},e.prototype._createItem=function(t,e,i,n,o,r,a,s,l,h,u){var c,d,p,f=t.visualDrawType,g=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(e),y=n.get("symbolRotate"),b=n.get("symbolKeepAspect"),x=n.get("icon"),w=function(t,e,i,n,o,r,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),hG(t,(function(i,n){"inherit"===t[n]&&(t[n]=e[n])}))}var l=e.getModel("itemStyle"),h=l.getItemStyle(),u=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");h.decal=c&&"inherit"!==c?iy(c,a):n.decal,"inherit"===h.fill&&(h.fill=n[o]),"inherit"===h.stroke&&(h.stroke=n[u]),"inherit"===h.opacity&&(h.opacity=("fill"===o?n:i).opacity),s(h,n);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,i),"auto"===h.fill&&(h.fill=n.fill),"auto"===h.stroke&&(h.stroke=n.fill),"auto"===p.stroke&&(p.stroke=n.fill),!r){var f=e.get("inactiveBorderWidth"),g=h[u];h.lineWidth="auto"===f?n.lineWidth>0&&g?2:0:h.lineWidth,h.fill=e.get("inactiveColor"),h.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:h,lineStyle:p}}(l=x||l||"roundRect",n,a,s,f,v,u),_=new uG,C=n.getModel("textStyle");if(!nt(t.getLegendIcon)||x&&"inherit"!==x){var S="inherit"===x&&t.getData().getVisual("symbol")?"inherit"===y?t.getData().getVisual("symbolRotate"):y:0;_.add((c={itemWidth:g,itemHeight:m,icon:l,iconRotate:S,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:b},(p=Mv(d=c.icon||"roundRect",0,0,c.itemWidth,c.itemHeight,c.itemStyle.fill,c.symbolKeepAspect)).setStyle(c.itemStyle),p.rotation=(c.iconRotate||0)*Math.PI/180,p.setOrigin([c.itemWidth/2,c.itemHeight/2]),d.indexOf("empty")>-1&&(p.style.stroke=p.style.fill,p.style.fill="#fff",p.style.lineWidth=2),p))}else _.add(t.getLegendIcon({itemWidth:g,itemHeight:m,icon:l,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:b}));var M="left"===r?g+5:-5,T=r,E=o.get("formatter"),I=e;ot(E)&&E?I=E.replace("{name}",null!=e?e:""):nt(E)&&(I=E(e));var D=v?C.getTextColor():n.get("inactiveColor");_.add(new cl({style:Ah(C,{text:I,x:M,y:m/2,fill:D,align:T,verticalAlign:"middle"},{inheritColor:D})}));var k=new qs({shape:_.getBoundingRect(),invisible:!0}),A=n.getModel("tooltip");return A.get("show")&&om({el:k,componentModel:o,itemName:e,itemTooltipOption:A.option}),_.add(k),_.eachChild((function(t){t.silent=!0})),k.silent=!h,this.getContentGroup().add(_),ah(_),_.__legendDataIndex=i,_},e.prototype.layoutInner=function(t,e,i,n,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();ec(t.get("orient"),a,t.get("itemGap"),i.width,i.height);var l=a.getBoundingRect(),h=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){ec("horizontal",s,t.get("selectorItemGap",!0));var u=s.getBoundingRect(),c=[-u.x,-u.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===r?c[p]+=l[f]+d:h[p]+=u[f]+d,c[1-p]+=l[g]/2-u[g]/2,s.x=c[0],s.y=c[1],a.x=h[0],a.y=h[1];var v={x:0,y:0};return v[f]=l[f]+d+u[f],v[g]=Math.max(l[g],u[g]),v[m]=Math.min(0,u[m]+c[1-p]),v}return a.x=h[0],a.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(af);function dG(t,e,i,n){gG(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),fG(t,e,i,n)}function pG(t){for(var e,i=t.getZr().storage.getDisplayList(),n=0,o=i.length;n<o&&!(e=i[n].states.emphasis);)n++;return e&&e.hoverLayer}function fG(t,e,i,n){pG(i)||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function gG(t,e,i,n){pG(i)||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}const mG=cG;function vG(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0}))}function yG(t,e,i){var n,o={},r="toggleSelected"===t;return i.eachComponent("legend",(function(i){r&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name)),q(i.getData(),(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o.hasOwnProperty(e)?o[e]=o[e]&&n:o[e]=n}}))})),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function bG(t){t.registerComponentModel(sG),t.registerComponentView(mG),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,vG),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(t){t.registerAction("legendToggleSelect","legendselectchanged",et(yG,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",et(yG,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",et(yG,"inverseSelect")),t.registerAction("legendSelect","legendselected",et(yG,"select")),t.registerAction("legendUnSelect","legendunselected",et(yG,"unSelect"))}(t)}function xG(t,e,i){var n=[1,1];n[t.getOrient().index]=0,rc(e,i,{type:"box",ignoreSize:!!n})}const wG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(e,i,n){var o=ac(e);t.prototype.init.call(this,e,i,n),xG(this,e,o)},e.prototype.mergeOption=function(e,i){t.prototype.mergeOption.call(this,e,i),xG(this,this.option,e)},e.type="legend.scroll",e.defaultOption=ou(sG.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(sG);var _G=qo,CG=["width","height"],SG=["x","y"],MG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.newlineDisabled=!0,i._currentIndex=0,i}return m(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new _G),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new _G)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(e,i,n,o,r,a,s){var l=this;t.prototype.renderInner.call(this,e,i,n,o,r,a,s);var h=this._controllerGroup,u=i.get("pageIconSize",!0),c=it(u)?u:[u,u];p("pagePrev",0);var d=i.getModel("pageTextStyle");function p(t,e){var n=t+"DataIndex",r=tm(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:tt(l._pageGo,l,n,i,o)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});r.name=t,h.add(r)}h.add(new cl({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},e.prototype.layoutInner=function(t,e,i,n,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=CG[s],h=SG[s],u=CG[1-s],c=SG[1-s];o&&ec("horizontal",a,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=H(i);o&&(g[l]=i[l]-p[l]-d);var m=this._layoutContentAndController(t,n,g,s,l,u,c,h);if(o){if("end"===r)f[s]+=m[l]+d;else{var v=p[l]+d;f[s]-=v,m[h]-=v}m[l]+=p[l]+d,f[1-s]+=m[c]+m[u]/2-p[u]/2,m[u]=Math.max(m[u],p[u]),m[c]=Math.min(m[c],p[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,e,i,n,o,r,a,s){var l=this.getContentGroup(),h=this._containerGroup,u=this._controllerGroup;ec(t.get("orient"),l,t.get("itemGap"),n?i.width:null,n?null:i.height),ec("horizontal",u,t.get("pageButtonItemGap",!0));var c=l.getBoundingRect(),d=u.getBoundingRect(),p=this._showController=c[o]>i[o],f=[-c.x,-c.y];e||(f[n]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=ft(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?m[n]+=i[o]-d[o]:g[n]+=d[o]+v),m[1-n]+=c[r]/2-d[r]/2,l.setPosition(f),h.setPosition(g),u.setPosition(m);var y={x:0,y:0};if(y[o]=p?i[o]:c[o],y[r]=Math.max(c[r],d[r]),y[a]=Math.min(0,d[a]+m[1-n]),h.__rectSize=i[o],p){var b={x:0,y:0};b[o]=Math.max(i[o]-d[o]-v,0),b[r]=y[r],h.setClipPath(new qs({shape:b})),h.__rectSize=b[o]}else u.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&bh(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?t:null),this._updatePageInfoView(t,x),y},e.prototype._pageGo=function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var i=this._controllerGroup;q(["pagePrev","pageNext"],(function(n){var o=null!=e[n+"DataIndex"],r=i.childOfName(n);r&&(r.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")}));var n=i.childOfName("pageText"),o=t.get("pageFormatter"),r=e.pageIndex,a=null!=r?r+1:0,s=e.pageCount;n&&o&&n.setStyle("text",ot(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,r=CG[o],a=SG[o],s=this._findTargetItemIndex(e),l=i.children(),h=l[s],u=l.length,c=u?1:0,d={contentPosition:[i.x,i.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=y(h);d.contentPosition[o]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=u;++f)(!(v=y(l[f]))&&m.e>g.s+n||v&&!b(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&b(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[a]+t[a];return{s:i,e:i+e[r],i:t.__legendDataIndex}}}function b(t,e){return t.e>=e&&t.s<=e+n}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(n,o){var r=n.__legendDataIndex;null==i&&null!=r&&(i=o),r===t&&(e=o)})),null!=e?e:i):0;var e,i},e.type="legend.scroll",e}(mG);const TG=MG;function EG(t){cb(bG),t.registerComponentModel(wG),t.registerComponentView(TG),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))}(t)}const IG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="dataZoom.inside",e.defaultOption=ou(lF.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(lF);var DG=Br();function kG(t,e){if(e){t.removeKey(e.model.uid);var i=e.controller;i&&i.dispose()}}function AG(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function LG(t,e,i,n){return t.coordinateSystem.containPoint([i,n])}var RG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return m(e,t),e.prototype.render=function(e,i,n){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,i){DG(t).coordSysRecordMap.each((function(t){var n=t.dataZoomInfoMap.get(e.uid);n&&(n.getRange=i)}))}(n,e,{pan:tt(PG.pan,this),zoom:tt(PG.zoom,this),scrollMove:tt(PG.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var i=DG(t).coordSysRecordMap,n=i.keys(),o=0;o<n.length;o++){var r=n[o],a=i.get(r),s=a.dataZoomInfoMap;if(s){var l=e.uid;s.get(l)&&(s.removeKey(l),s.keys().length||kG(i,a))}}}(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(uF),PG={zoom:function(t,e,i,n){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a){var s=zG[e](null,[n.originX,n.originY],a,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],h=Math.max(1/n.scale,0);r[0]=(r[0]-l)*h+l,r[1]=(r[1]-l)*h+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return qA(0,r,[0,100],0,u.minSpan,u.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:OG((function(t,e,i,n,o,r){var a=zG[n]([r.oldX,r.oldY],[r.newX,r.newY],e,o,i);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:OG((function(t,e,i,n,o,r){return zG[n]([0,0],[r.scrollDelta,r.scrollDelta],e,o,i).signal*(t[1]-t[0])*r.scrollDelta}))};function OG(t){return function(e,i,n,o){var r=this.range,a=r.slice(),s=e.axisModels[0];if(s)return qA(t(a,s,e,i,n,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var zG={grid:function(t,e,i,n,o){var r=i.axis,a={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,i,n,o){var r=i.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,i,n,o){var r=i.axis,a=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}};const NG=RG;function BG(t){yF(t),t.registerComponentModel(IG),t.registerComponentView(NG),function(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var i=DG(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=Tt());n.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){q(oF(t).infoList,(function(i){var o=i.model.uid,r=n.get(o)||n.set(o,function(t,e){var i={model:e,containsPoint:et(LG,e),dispatchAction:et(AG,t),dataZoomInfoMap:null,controller:null},n=i.controller=new LT(t.getZr());return q(["pan","zoom","scrollMove"],(function(t){n.on(t,(function(e){var n=[];i.dataZoomInfoMap.each((function(o){if(e.isAvailableBehavior(o.model.option)){var r=(o.getRange||{})[t],a=r&&r(o.dzReferCoordSysInfo,i.model.mainType,i.controller,e);!o.model.get("disabled",!0)&&a&&n.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),n.length&&i.dispatchAction(n)}))})),i}(e,i.model));(r.dataZoomInfoMap||(r.dataZoomInfoMap=Tt())).set(t.uid,{dzReferCoordSysInfo:i,model:t,getRange:null})}))})),n.each((function(t){var e,i=t.controller,o=t.dataZoomInfoMap;if(o){var r=o.keys()[0];null!=r&&(e=o.get(r))}if(e){var a=function(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each((function(t){var r=t.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");n[i+a]>n[i+e]&&(e=a),o=o&&r.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);i.enable(a.controlType,a.opt),i.setPointerChecker(t.containsPoint),xm(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else kG(n,t)}))}))}(t)}const FG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ou(lF.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(lF);var VG=qs,HG="horizontal",GG="vertical",WG=["line","bar","candlestick","scatter"],UG={easing:"cubicOut",duration:100,delay:0},jG=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._displayables={},i}return m(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=tt(this._onBrush,this),this._onBrushEnd=tt(this._onBrushEnd,this)},e.prototype.render=function(e,i,n,o){if(t.prototype.render.apply(this,arguments),xm(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){wm(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new qo;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,i=t.get("brushSelect")?7:0,n=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},r=this._orient===HG?{right:o.width-n.x-n.width,top:o.height-30-7-i,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},a=ac(t.option);q(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=r[t])}));var s=ic(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===GG&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(i!==HG||o?i===HG&&o?{scaleY:a?1:-1,scaleX:-1}:i!==GG||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([r]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new VG({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new VG({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:tt(this._onClickPanel,this)}),r=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),r=n.getShadowDim&&n.getShadowDim(),a=r&&o.getDimensionInfo(r)?n.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||e[0]!==i[0]||e[1]!==i[1]){var h=o.getDataExtent(a),u=.3*(h[1]-h[0]);h=[h[0]-u,h[1]+u];var c,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),v=0,y=Math.round(o.count()/e[0]);o.each([a],(function(t,e){if(y>0&&e%y)v+=m;else{var i=null==t||isNaN(t)||""===t,n=i?0:ir(t,h,d,!0);i&&!c&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!i&&c&&(f.push([v,0]),g.push([v,0])),f.push([v,n]),g.push([v,n]),v+=m,c=i}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var b=this.dataZoomModel,x=0;x<3;x++){var w=_(1===x);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function _(t){var e=b.getModel(t?"selectedDataBackground":"dataBackground"),i=new qo,n=new eg({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new og({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return i.add(n),i.add(o),i}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis((function(o,r){q(t.getAxisProxy(o,r).getTargetSeriesModels(),(function(t){if(!(i||!0!==e&&X(WG,t.get("type"))<0)){var a,s=n.getComponent(nF(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(a=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),i}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,i=e.handles=[null,null],n=e.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,h=a.get("brushSelect"),u=e.filler=new VG({silent:h,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(u),o.add(new VG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),q([0,1],(function(e){var r=a.get("handleIcon");!_v[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r);var s=Mv(r,-1,0,2,2,null,!0);s.attr({cursor:XG(this._orient),draggable:!0,drift:tt(this._onDragMove,this,e),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),h=a.get("handleSize");this._handleHeight=nr(h,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),ah(s);var u=a.get("handleColor");null!=u&&(s.style.fill=u),o.add(i[e]=s);var c=a.getModel("textStyle");t.add(n[e]=new cl({silent:!0,invisible:!0,style:Ah(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=u;if(h){var d=nr(a.get("moveHandleSize"),r[1]),p=e.moveHandle=new qs({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:d}}),f=.8*d,g=e.moveHandleIcon=Mv(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=r[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(r[1]/2,Math.max(d,10));(c=e.moveZone=new qs({invisible:!0,shape:{y:r[1]-m,height:d+m}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),o.add(p),o.add(g),o.add(c)}c.attr({draggable:!0,cursor:XG(this._orient),drift:tt(this._onDragMove,this,"all"),ondragstart:tt(this._showDataInfo,this,!0),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[ir(t[0],[0,100],e,!0),ir(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),r=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];qA(e,n,o,i.get("zoomLock")?"all":t,null!=r.minSpan?ir(r.minSpan,a,o,!0):null,null!=r.maxSpan?ir(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=rr([ir(n[0],o,a,!0),ir(n[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,i=this._handleEnds,n=rr(i.slice()),o=this._size;q([0,1],(function(t){var n=e.handles[t],r=this._handleHeight;n.attr({scaleX:r/2,scaleY:r/2,x:i[t]+(t?-1:1),y:o[1]/2-r/2})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var r={x:n[0],width:n[1]-n[0]};e.moveHandle&&(e.moveHandle.setShape(r),e.moveZone.setShape(r),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=e.dataShadowSegs,s=[0,n[0],n[1],o[0]],l=0;l<a.length;l++){var h=a[l],u=h.getClipPath();u||(u=new qs,h.setClipPath(u)),u.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,r=["",""];if(e.get("showDetail")){var a=e.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,h=t?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=rr(this._handleEnds.slice());function c(t){var e=Yg(i.handles[t].parent,this.group),a=qg(0===t?"right":"left",e),s=this._handleWidth/2+5,l=Zg([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],verticalAlign:o===HG?"middle":a,align:o===HG?a:"center",text:r[t]})}c.call(this,0),c.call(this,1)},e.prototype._formatLabel=function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var r=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return nt(n)?n(t,r):ot(n)?n.replace("{value}",r):r},e.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,i=e.handleLabels;i[0].attr("invisible",!t),i[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},e.prototype._onDragMove=function(t,e,i,n){this._dragging=!0,be(n.event);var o=Zg([e,i],this._displayables.sliderGroup.getLocalTransform(),!0),r=this._updateInterval(t,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var e=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,r=this._updateInterval("all",i[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,i=t.offsetY;this._brushStart=new Le(e,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var i=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(i.width)<5)){var n=this._getViewExtent(),o=[0,100];this._range=rr([ir(i.x,n,o,!0),ir(i.x+i.width,n,o,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(be(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new VG({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(r.x,r.y),h=this._size;s[0]=Math.max(Math.min(h[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?UG:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=oF(this.dataZoomModel).infoList;if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:.2*n,y:.2*o,width:.6*n,height:.6*o}}return t},e.type="dataZoom.slider",e}(uF);function XG(t){return"vertical"===t?"ns-resize":"ew-resize"}const YG=jG;function ZG(t){t.registerComponentModel(FG),t.registerComponentView(YG),yF(t)}var qG={get:function(t,e,i){var n=H((KG[t]||{})[e]);return i&&it(n)?n[n.length-1]:n}},KG={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const $G=qG;var JG=VD.mapVisual,QG=VD.eachVisual,tW=it,eW=q,iW=rr,nW=ir,oW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.stateList=["inRange","outOfRange"],i.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],i.layoutMode={type:"box",ignoreSize:!0},i.dataBound=[-1/0,1/0],i.targetVisuals={},i.controllerVisuals={},i}return m(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,e){var i=this.option;!e&&HV(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=tt(t,this),this.controllerVisuals=VV(this.option.controller,e,t),this.targetVisuals=VV(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,i){e.push(i)})):e=Tr(t),e},e.prototype.eachTargetSeries=function(t,e){q(this.getTargetSeriesIndices(),(function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(e,n)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(i){i===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,i){var n,o=this.option,r=o.precision,a=this.dataBound,s=o.formatter;i=i||["<",">"],it(t)&&(t=t.slice(),n=!0);var l=e?t:n?[h(t[0]),h(t[1])]:h(t);return ot(s)?s.replace("{value}",n?l[0]:l).replace("{value2}",n?l[1]:l):nt(s)?n?s(t[0],t[1]):s(t):n?t[0]===a[0]?i[0]+" "+l[1]:t[1]===a[1]?i[1]+" "+l[0]:l[0]+" - "+l[1]:l;function h(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},e.prototype.resetExtent=function(){var t=this.option,e=iW([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});G(n,i),G(o,i);var r=this.isCategory();function a(i){tW(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")}}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},eW(n,(function(t,e){if(VD.isValidType(e)){var i=$G.get(e,"inactive",r);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";eW(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?n:[n]}),null==l.symbol&&(l.symbol=e&&H(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=i&&H(i)||(r?s[0]:[s[0],s[0]])),l.symbol=JG(l.symbol,(function(t){return"none"===t?o:t}));var h=l.symbolSize;if(null!=h){var u=-1/0;QG(h,(function(t){t>u&&(u=t)})),l.symbolSize=JG(h,(function(t){return nW(t,[0,u],[0,s[0]],!0)}))}}),this)}.call(this,o)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(uc);const rW=oW;var aW=[20,140],sW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=aW[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=aW[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):it(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),q(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=rr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},e.prototype.getValueState=function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},e.prototype.getVisualMeta=function(t){var e=lW(0,0,this.getExtent()),i=lW(0,0,this.option.range.slice()),n=[];function o(e,i){n.push({value:e,color:t(e,i)})}for(var r=0,a=0,s=i.length,l=e.length;a<l&&(!i.length||e[a]<=i[0]);a++)e[a]<i[r]&&o(e[a],"outOfRange");for(var h=1;r<s;r++,h=0)h&&n.length&&o(i[r],"outOfRange"),o(i[r],"inRange");for(h=1;a<l;a++)(!i.length||i[i.length-1]<e[a])&&(h&&(n.length&&o(n[n.length-1].value,"outOfRange"),h=0),o(e[a],"outOfRange"));var u=n.length;return{stops:n,outerColors:[u?n[0].color:"transparent",u?n[u-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ou(rW.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(rW);function lW(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],r=[],a=0;a<=200&&o<i[1];a++)r.push(o),o+=n;return r.push(i[1]),r}const hW=sW,uW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.autoPositionValues={left:1,right:1,top:1,bottom:1},i}return m(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e},e.prototype.render=function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender(t,e,i,n):this.group.removeAll()},e.prototype.renderBackground=function(t){var e=this.visualMapModel,i=Uu(e.get("padding")||0),n=t.getBoundingRect();t.add(new qs({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,e,i){var n=(i=i||{}).forceState,o=this.visualMapModel,r={};if("color"===e){var a=o.get("contentColor");r.color=a}function s(t){return r[t]}function l(t,e){r[t]=e}var h=o.controllerVisuals[n||o.getValueState(t)];return q(VD.prepareVisualTypes(h),(function(n){var o=h[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",o=h.__alphaForOpacity),VD.dependsOn(n,e)&&o&&o.applyVisual(t,s,l)})),r[e]},e.prototype.positionGroup=function(t){var e=this.visualMapModel,i=this.api;nc(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,e,i,n){},e.type="visualMap",e}(af);var cW=[["left","right","width"],["top","bottom","height"]];function dW(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===n.orient?1:0,s=cW[a],l=[0,null,10],h={},u=0;u<3;u++)h[cW[1-a][u]]=l[u],h[s[u]]=2===u?i[0]:n[s[u]];var c=[["x","width",3],["y","height",0]][a],d=ic(h,r,n.padding);return s[(d.margin[c[2]]||0)+d[c[0]]+.5*d[c[1]]<.5*r[c[1]]?0:1]}function pW(t,e){return q(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")})),t}var fW=ir,gW=q,mW=Math.min,vW=Math.max,yW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._shapes={},i._dataInterval=[],i._handleEnds=[],i._hoverLinkDataIndices=[],i}return m(e,t),e.prototype.doRender=function(t,e,i,n){this._api=i,n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},e.prototype._renderEndsText=function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,r=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===i?-r:a[1]+r],s),h=this._applyTransform(0===i?"bottom":"top",s),u=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new cl({style:Ah(c,{x:l[0],y:l[1],verticalAlign:"horizontal"===u?"middle":h,align:"horizontal"===u?h:"center",text:n})}))}},e.prototype._renderBar=function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,r=this._useHandle,a=dW(e,this.api,n),s=i.mainGroup=this._createBarGroup(a),l=new qo;s.add(l),l.add(i.outOfRange=bW()),l.add(i.inRange=bW(null,r?wW(this._orient):null,tt(this._dragHandle,this,"all",!1),tt(this._dragHandle,this,"all",!0))),l.setClipPath(new qs({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var h=e.textStyleModel.getTextRect("国"),u=vW(h.width,h.height);r&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(e,s,0,n,u,o),this._createHandle(e,s,1,n,u,o)),this._createIndicator(e,s,n,u,o),t.add(s)},e.prototype._createHandle=function(t,e,i,n,o,r){var a=tt(this._dragHandle,this,i,!1),s=tt(this._dragHandle,this,i,!0),l=Oo(t.get("handleSize"),n[0]),h=Mv(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),u=wW(this._orient);h.attr({cursor:u,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){be(t.event)}}),h.x=n[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),dh(h,!0),e.add(h);var c=this.visualMapModel.textStyleModel,d=new cl({cursor:u,draggable:!0,drift:a,onmousemove:function(t){be(t.event)},ondragend:s,style:Ah(c,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[l,0],f=this._shapes;f.handleThumbs[i]=h,f.handleLabelPoints[i]=p,f.handleLabels[i]=d},e.prototype._createIndicator=function(t,e,i,n,o){var r=Oo(t.get("indicatorSize"),i[0]),a=Mv(t.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var s=t.getModel("indicatorStyle").getItemStyle();if(a instanceof Hs){var l=a.style;a.useStyle(U({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);e.add(a);var h=this.visualMapModel.textStyleModel,u=new cl({silent:!0,invisible:!0,style:Ah(h,{x:0,y:0,text:""})});this.group.add(u);var c=[("horizontal"===o?n/2:6)+i[0]/2,0],d=this._shapes;d.indicator=a,d.indicatorLabel=u,d.indicatorLabelPoint=c,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():xW(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[fW(e[0],i,n,!0),fW(e[1],i,n,!0)]},e.prototype._updateInterval=function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];qA(e,n,o,t,0);var r=i.getExtent();this._dataInterval=[fW(n[0],o,r,!0),fW(n[1],o,r,!0)]},e.prototype._updateView=function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],r=t?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,r,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),n.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(r,a)},e.prototype._createBarVisual=function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,o),a=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,a);return{barColor:new xg(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},e.prototype._makeColorGradient=function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+n*o;if(r>t[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},e.prototype._createBarPoints=function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new qo("horizontal"!==e||i?"horizontal"===e&&i?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||i?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,r=i.handleLabels,a=n.itemSize,s=n.getExtent();gW([0,1],(function(l){var h=o[l];h.setStyle("fill",e.handlesColor[l]),h.y=t[l];var u=fW(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(u,"symbolSize");h.scaleX=h.scaleY=c/a[0],h.x=a[0]-c/2;var d=Zg(i.handleLabelPoints[l],Yg(h,this.group));r[l].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",i.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,i,n){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,h=l.indicator;if(h){h.attr("invisible",!1);var u=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=fW(t,r,s,!0),p=a[0]-c/2,f={x:h.x,y:h.y};h.y=d,h.x=p;var g=Zg(l.indicatorLabelPoint,Yg(h,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(i||"")+o.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var b={x:p,y:d,style:{fill:u}},x={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};h.x=f.x,h.y=f.y,h.animateTo(b,w),m.animateTo(x,w)}else h.attr(b),m.attr(x);this._firstShowIndicator=!1;var _=this._shapes.handleLabels;if(_)for(var C=0;C<_.length;C++)this._api.enterBlur(_[C])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.mainGroup,!0,!0);n[1]=mW(vW(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],r=i.getExtent();t=mW(vW(o[0],t),o[1]);var a=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");return o&&(n=fW(o,e,i,!0)/2),n}(i,r,o),s=[t-a,t+a],l=fW(t,o,r,!0),h=[fW(s[0],o,r,!0),fW(s[1],o,r,!0)];s[0]<o[0]&&(h[0]=-1/0),s[1]>o[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",a):h[1]===1/0?this._showIndicator(l,h[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var u=this._hoverLinkDataIndices,c=[];(e||xW(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[r(i),r(n)];function o(t,e,i){for(var n=0,o=t.length;n<o;n++){var r=Pr(t[n].seriesId,null);if(null==r)return;for(var a=Tr(t[n].dataIndex),s=i&&i[r],l=0,h=a.length;l<h;l++){var u=a[l];s&&s[u]?s[u]=null:(e[r]||(e[r]={}))[u]=1}}}function r(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=r(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}}(u,c);this._dispatchHighDown("downplay",pW(d[0],i)),this._dispatchHighDown("highlight",pW(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e;if(dv(t.target,(function(t){var i=dl(t);if(null!=i.dataIndex)return e=i,!0}),!0),e){var i=this.ecModel.getSeriesByIndex(e.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(e.dataType),r=o.getStore().get(n.getDataDimensionIndex(o),e.dataIndex);isNaN(r)||this._showIndicator(r,r)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var i=0;i<e.length;i++)this._api.leaveBlur(e[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",pW(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,e,i,n){var o=Yg(e,n?null:this.group);return it(t)?Zg(t,o,i):qg(t,o,i)},e.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(uW);function bW(t,e,i,n){return new eg({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){be(t.event)},ondragend:n})}function xW(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function wW(t){return"vertical"===t?"ns-resize":"ew-resize"}const _W=yW;var CW={type:"selectDataRange",event:"dataRangeSelected",update:"update"},SW=function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))},MW=[{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",(function(e){var n,o,r,a,s,l=t.pipelineContext;!e.isTargetSeries(t)||l&&l.large||i.push((n=e.stateList,o=e.targetVisuals,r=tt(e.getValueState,e),a=e.getDataDimensionIndex(t.getData()),s={},q(n,(function(t){var e=VD.prepareVisualTypes(o[t]);s[t]=e})),{progress:function(t,e){var i,n;function l(t){return sv(e,n,t)}function h(t,i){hv(e,n,t,i)}null!=a&&(i=e.getDimensionIndex(a));for(var u=e.getStore();null!=(n=t.next());){var c=e.getRawDataItem(n);if(!c||!1!==c.visualMap)for(var d=null!=a?u.get(i,n):n,p=r(d),f=o[p],g=s[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(d,l,h)}}}}))})),i}},{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",(function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(tt(TW,null,t,e))||{stops:[],outerColors:[]},r=e.getDataDimensionIndex(i);r>=0&&(o.dimension=r,n.push(o))}})),t.getData().setVisual("visualMeta",n)}}];function TW(t,e,i,n){for(var o=e.targetVisuals[n],r=VD.prepareVisualTypes(o),a={color:lv(t.getData(),"color")},s=0,l=r.length;s<l;s++){var h=r[s],u=o["opacity"===h?"__alphaForOpacity":h];u&&u.applyVisual(i,c,d)}return a.color;function c(t){return a[t]}function d(t,e){a[t]=e}}var EW=q;function IW(t){var e=t&&t.visualMap;it(e)||(e=e?[e]:[]),EW(e,(function(t){if(t){DW(t,"splitList")&&!DW(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&it(e)&&EW(e,(function(t){st(t)&&(DW(t,"start")&&!DW(t,"min")&&(t.min=t.start),DW(t,"end")&&!DW(t,"max")&&(t.max=t.end))}))}}))}function DW(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var kW=!1;function AW(t){kW||(kW=!0,t.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(CW,SW),q(MW,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(IW))}function LW(t){t.registerComponentModel(hW),t.registerComponentView(_W),AW(t)}var RW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._pieceList=[],i}return m(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],PW[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var o=this.option.categories;this.resetVisual((function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=H(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=K(this._pieceList,(function(t){return t=H(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,i={},n=VD.listVisualTypes(),o=this.isCategory();function r(t,e,i){return t&&t[e]&&t[e].hasOwnProperty(i)}q(e.pieces,(function(t){q(n,(function(e){t.hasOwnProperty(e)&&(i[e]=1)}))})),q(i,(function(t,i){var n=!1;q(this.stateList,(function(t){n=n||r(e,t,i)||r(e.target,t,i)}),this),!n&&q(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=$G.get(i,"inRange"===t?"active":"inactive",o)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,q(n,(function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)}),this),"single"===i.selectedMode){var r=!1;q(n,(function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(r?o[i]=!1:r=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=H(t)},e.prototype.getValueState=function(t){var e=VD.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],i=this._pieceList;return this.eachTargetSeries((function(n){var o=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){VD.findPieceIndex(e,i)===t&&o.push(n)}),this),e.push({seriesId:n.id,dataIndex:o})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],i=["",""],n=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return q(o,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:i}}function s(o,r){var a=n.getRepresentValue({interval:o});r||(r=n.getValueState(a));var s=t(a,r);o[0]===-1/0?i[0]=s:o[1]===1/0?i[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=ou(rW.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(rW),PW={splitNumber:function(t){var e=this.option,i=Math.min(e.precision,20),n=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(n[1]-n[0])/o;+r.toFixed(i)!==r&&i<5;)i++;e.precision=i,r=+r.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var a=0,s=n[0];a<o;s+=r,a++){var l=a===o-1?n[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),vr(t),q(t,(function(t,e){t.index=e,t.text=this.formatValueText(t.interval)}),this)},categories:function(t){var e=this.option;q(e.categories,(function(e){t.push({text:this.formatValueText(e,!0),value:e})}),this),OW(e,t)},pieces:function(t){var e=this.option;q(e.pieces,(function(e,i){st(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var o=n.value=e.value;n.interval=[o,o],n.close=[1,1]}else{for(var r=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;u<2;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==r[u];d++)r[u]=e[c[d]],a[u]=s[d],h[u]=2===d;null==r[u]&&(r[u]=l[u])}h[0]&&r[1]===1/0&&(a[0]=0),h[1]&&r[0]===-1/0&&(a[1]=0),r[0]===r[1]&&a[0]&&a[1]&&(n.value=r[0])}n.visual=VD.retrieveVisuals(e),t.push(n)}),this),OW(e,t),vr(t),q(t,(function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function OW(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}const zW=RW,NW=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return m(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),r=n.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=pt(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,a),q(l.viewPieceList,(function(n){var l=n.piece,h=new qo;h.onclick=tt(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new cl({style:{x:"right"===a?-i:s[0]+i,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===d?.5:1}}))}t.add(h)}),this),h&&this._renderEndsText(t,h[1],s,u,a),ec(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var i=this;t.on("mouseover",(function(){return n("highlight")})).on("mouseout",(function(){return n("downplay")}));var n=function(t){var n=i.visualMapModel;n.option.hoverLink&&i.api.dispatchAction({type:t,batch:pW(n.findTargetDataIndices(e),n)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return dW(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},e.prototype._renderEndsText=function(t,e,i,n,o){if(e){var r=new qo,a=this.visualMapModel.textStyleModel;r.add(new cl({style:Ah(a,{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:e})})),t.add(r)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=K(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},e.prototype._createItemSymbol=function(t,e,i){t.add(Mv(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,i=e.option,n=i.selectedMode;if(n){var o=H(i.selected),r=e.getSelectedMapKey(t);"single"===n||!0===n?(o[r]=!0,q(o,(function(t,e){o[e]=e===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(uW);function BW(t){t.registerComponentModel(zW),t.registerComponentView(NW),AW(t)}var FW={label:{enabled:!0},decal:{show:!1}},VW=Br(),HW={};function GW(t,e){var i=t.getModel("aria");if(i.get("enabled")){var n=H(FW);G(n.label,t.getLocaleModel().get("aria"),!1),G(i.option,n,!1),function(){if(i.getModel("decal").get("show")){var e=Tt();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=e.get(t.type);i||(i={},e.set(t.type,i)),VW(t).scope=i}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(nt(e.enableAriaDecal))e.enableAriaDecal();else{var i=e.getData();if(e.isColorBySeries()){var n=Nc(e.ecModel,e.name,HW,t.getSeriesCount()),o=i.getVisual("decal");i.setVisual("decal",h(o,n))}else{var r=e.getRawData(),a={},s=VW(e).scope;i.each((function(t){var e=i.getRawIndex(t);a[e]=t}));var l=r.count();r.each((function(t){var n=a[t],o=r.getName(t)||t+"",u=Nc(e.ecModel,o,s,l),c=i.getItemVisual(n,"decal");i.setItemVisual(n,"decal",h(c,u))}))}}function h(t,e){var i=t?U(U({},e),t):e;return i.dirty=!0,i}}))}}(),function(){var n=t.getLocaleModel().get("aria"),r=i.getModel("label");if(r.option=j(r.option,n),r.get("enabled")){var a=e.getZr().dom;if(r.get("description"))a.setAttribute("aria-label",r.get("description"));else{var s,l=t.getSeriesCount(),h=r.get(["data","maxCount"])||10,u=r.get(["series","maxCount"])||10,c=Math.min(l,u);if(!(l<1)){var d=function(){var e=t.get("title");return e&&e.length&&(e=e[0]),e&&e.text}();s=d?o(r.get(["general","withTitle"]),{title:d}):r.get(["general","withoutTitle"]);var p=[];s+=o(l>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,i){if(i<c){var n=void 0,a=e.get("name")?"withName":"withoutName";n=o(n=l>1?r.get(["series","multiple",a]):r.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(b=e.subType,t.getLocaleModel().get(["series","typeNames"])[b]||"自定义图")});var s=e.getData();s.count()>h?n+=o(r.get(["data","partialData"]),{displayCnt:h}):n+=r.get(["data","allData"]);for(var u=r.get(["data","separator","middle"]),d=r.get(["data","separator","end"]),f=[],g=0;g<s.count();g++)if(g<h){var m=s.getName(g),v=s.getValues(g),y=r.get(["data",m?"withName":"withoutName"]);f.push(o(y,{name:m,value:v.join(u)}))}n+=f.join(u)+d,p.push(n)}var b}));var f=r.getModel(["series","multiple","separator"]),g=f.get("middle"),m=f.get("end");s+=p.join(g)+m,a.setAttribute("aria-label",s)}}}}()}function o(t,e){if(!ot(t))return t;var i=t;return q(e,(function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),i}}function WW(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},q(["description","general","series","data"],(function(t){null!=e[t]&&(e.label[t]=e[t])}))}}var UW={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jW=function(){function t(t){var e;null==(this._condVal=ot(t)?new RegExp(t):(e=t,"[object RegExp]"===D.call(e)?t:null))&&$d("")}return t.prototype.evaluate=function(t){var e=typeof t;return ot(e)?this._condVal.test(t):!!at(e)&&this._condVal.test(t+"")},t}(),XW=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),YW=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},t}(),ZW=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},t}(),qW=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),KW=function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),i=t?this.valueParser(e):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(t?i:e))return!1;return!0},t}();function $W(t,e){if(!0===t||!1===t){var i=new XW;return i.value=t,i}return QW(t)||$d(""),t.and?JW("and",t,e):t.or?JW("or",t,e):t.not?function(t,e){var i=t.not;QW(i)||$d("");var n=new qW;return n.child=$W(i,e),n.child||$d(""),n}(t,e):function(t,e){for(var i=e.prepareGetValue(t),n=[],o=Q(t),r=t.parser,a=r?tp(r):null,s=0;s<o.length;s++){var l=o[s];if("parser"!==l&&!e.valueGetterAttrMap.get(l)){var h=kt(UW,l)?UW[l]:l,u=t[l],c=a?a(u):u,d=rp(h,c)||"reg"===h&&new jW(c);d||$d(""),n.push(d)}}n.length||$d("");var p=new KW;return p.valueGetterParam=i,p.valueParser=a,p.getValue=e.getValue,p.subCondList=n,p}(t,e)}function JW(t,e,i){var n=e[t];it(n)||$d(""),n.length||$d("");var o="and"===t?new YW:new ZW;return o.children=K(n,(function(t){return $W(t,i)})),o.children.length||$d(""),o}function QW(t){return st(t)&&!Z(t)}var tU=function(){function t(t,e){this._cond=$W(t,e)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}(),eU={type:"echarts:filter",transform:function(t){for(var e,i,n,o=t.upstream,r=(i=t.config,n={valueGetterAttrMap:Tt({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;kt(t,"dimension")||$d("");var i=o.getDimensionInfo(e);return i||$d(""),{dimIdx:i.index}},getValue:function(t){return o.retrieveValueFromItem(e,t.dimIdx)}},new tU(i,n)),a=[],s=0,l=o.count();s<l;s++)e=o.getRawDataItem(s),r.evaluate()&&a.push(e);return{data:a}}},iU={type:"echarts:sort",transform:function(t){var e=t.upstream,i=t.config,n="",o=Tr(i);o.length||$d(n);var r=[];q(o,(function(t){var i=t.dimension,o=t.order,a=t.parser,s=t.incomparable;null==i&&$d(n),"asc"!==o&&"desc"!==o&&$d(n),s&&"min"!==s&&"max"!==s&&$d(""),"asc"!==o&&"desc"!==o&&$d("");var l=e.getDimensionInfo(i);l||$d(n);var h=a?tp(a):null;a&&!h&&$d(n),r.push({dimIdx:l.index,parser:h,comparator:new np(o,s)})}));var a=e.sourceFormat;a!==mc&&a!==vc&&$d(n);for(var s=[],l=0,h=e.count();l<h;l++)s.push(e.getRawDataItem(l));return s.sort((function(t,i){for(var n=0;n<r.length;n++){var o=r[n],a=e.retrieveValueFromItem(t,o.dimIdx),s=e.retrieveValueFromItem(i,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0})),{data:s}}},nU=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return m(e,t),e.prototype.init=function(e,i,n){t.prototype.init.call(this,e,i,n),this._sourceManager=new Mp(this),Tp(this)},e.prototype.mergeOption=function(e,i){t.prototype.mergeOption.call(this,e,i),Tp(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:wc},e}(uc),oU=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return m(e,t),e.type="dataset",e}(af),rU=ps.CMD;function aU(t,e){return Math.abs(t-e)<1e-5}function sU(t){var e,i,n,o,r,a=t.data,s=t.len(),l=[],h=0,u=0,c=0,d=0;function p(t,i){e&&e.length>2&&l.push(e),e=[t,i]}function f(t,i,n,o){aU(t,n)&&aU(i,o)||e.push(t,i,n,o,n,o)}function g(t,i,n,o,r,a){var s=Math.abs(i-t),l=4*Math.tan(s/4)/3,h=i<t?-1:1,u=Math.cos(t),c=Math.sin(t),d=Math.cos(i),p=Math.sin(i),f=u*r+n,g=c*a+o,m=d*r+n,v=p*a+o,y=r*l*h,b=a*l*h;e.push(f-y*c,g+b*u,m+y*p,v-b*d,m,v)}for(var m=0;m<s;){var v=a[m++],y=1===m;switch(y&&(c=h=a[m],d=u=a[m+1],v!==rU.L&&v!==rU.C&&v!==rU.Q||(e=[c,d])),v){case rU.M:h=c=a[m++],u=d=a[m++],p(c,d);break;case rU.L:f(h,u,i=a[m++],n=a[m++]),h=i,u=n;break;case rU.C:e.push(a[m++],a[m++],a[m++],a[m++],h=a[m++],u=a[m++]);break;case rU.Q:i=a[m++],n=a[m++],o=a[m++],r=a[m++],e.push(h+2/3*(i-h),u+2/3*(n-u),o+2/3*(i-o),r+2/3*(n-r),o,r),h=o,u=r;break;case rU.A:var b=a[m++],x=a[m++],w=a[m++],_=a[m++],C=a[m++],S=a[m++]+C;m+=1;var M=!a[m++];i=Math.cos(C)*w+b,n=Math.sin(C)*_+x,y?p(c=i,d=n):f(h,u,i,n),h=Math.cos(S)*w+b,u=Math.sin(S)*_+x;for(var T=(M?-1:1)*Math.PI/2,E=C;M?E>S:E<S;E+=T)g(E,M?Math.max(E+T,S):Math.min(E+T,S),b,x,w,_);break;case rU.R:c=h=a[m++],d=u=a[m++],i=c+a[m++],n=d+a[m++],p(i,d),f(i,d,i,n),f(i,n,c,n),f(c,n,c,d),f(c,d,i,d);break;case rU.Z:e&&f(h,u,c,d),h=c,u=d}}return e&&e.length>2&&l.push(e),l}function lU(t,e,i,n,o,r,a,s,l,h){if(aU(t,i)&&aU(e,n)&&aU(o,a)&&aU(r,s))l.push(a,s);else{var u=2/h,c=u*u,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=i-t,m=n-e,v=o-a,y=r-s,b=g*g+m*m,x=v*v+y*y;if(b<c&&x<c)l.push(a,s);else{var w=d*g+p*m,_=-d*v-p*y;if(b-w*w<c&&w>=0&&x-_*_<c&&_>=0)l.push(a,s);else{var C=[],S=[];Ai(t,i,o,a,.5,C),Ai(e,n,r,s,.5,S),lU(C[0],S[0],C[1],S[1],C[2],S[2],C[3],S[3],l,h),lU(C[4],S[4],C[5],S[5],C[6],S[6],C[7],S[7],l,h)}}}}function hU(t,e,i){var n=t[e],o=t[1-e],r=Math.abs(n/o),a=Math.ceil(Math.sqrt(r*i)),s=Math.floor(i/a);0===s&&(s=1,a=i);for(var l=[],h=0;h<a;h++)l.push(s);var u=i-a*s;if(u>0)for(h=0;h<u;h++)l[h%a]+=1;return l}function uU(t,e,i){for(var n=t.r0,o=t.r,r=t.startAngle,a=t.endAngle,s=Math.abs(a-r),l=s*o,h=o-n,u=l>Math.abs(h),c=hU([l,h],u?0:1,e),d=(u?s:h)/c.length,p=0;p<c.length;p++)for(var f=(u?h:s)/c[p],g=0;g<c[p];g++){var m={};u?(m.startAngle=r+d*p,m.endAngle=r+d*(p+1),m.r0=n+f*g,m.r=n+f*(g+1)):(m.startAngle=r+f*g,m.endAngle=r+f*(g+1),m.r0=n+d*p,m.r=n+d*(p+1)),m.clockwise=t.clockwise,m.cx=t.cx,m.cy=t.cy,i.push(m)}}function cU(t,e,i,n){return t*n-i*e}function dU(t,e,i,n,o,r,a,s){var l=i-t,h=n-e,u=a-o,c=s-r,d=cU(u,c,l,h);if(Math.abs(d)<1e-6)return null;var p=cU(t-o,e-r,u,c)/d;return p<0||p>1?null:new Le(p*l+t,p*h+e)}function pU(t,e,i){var n=new Le;Le.sub(n,i,e),n.normalize();var o=new Le;return Le.sub(o,t,e),o.dot(n)}function fU(t,e){var i=t[t.length-1];i&&i[0]===e[0]&&i[1]===e[1]||t.push(e)}function gU(t){var e=t.points,i=[],n=[];Ha(e,i,n);var o=new Ge(i[0],i[1],n[0]-i[0],n[1]-i[1]),r=o.width,a=o.height,s=o.x,l=o.y,h=new Le,u=new Le;return r>a?(h.x=u.x=s+r/2,h.y=l,u.y=l+a):(h.y=u.y=l+a/2,h.x=s,u.x=s+r),function(t,e,i){for(var n=t.length,o=[],r=0;r<n;r++){var a=t[r],s=t[(r+1)%n],l=dU(a[0],a[1],s[0],s[1],e.x,e.y,i.x,i.y);l&&o.push({projPt:pU(l,e,i),pt:l,idx:r})}if(o.length<2)return[{points:t},{points:t}];o.sort((function(t,e){return t.projPt-e.projPt}));var h=o[0],u=o[o.length-1];if(u.idx<h.idx){var c=h;h=u,u=c}var d=[h.pt.x,h.pt.y],p=[u.pt.x,u.pt.y],f=[d],g=[p];for(r=h.idx+1;r<=u.idx;r++)fU(f,t[r].slice());for(fU(f,p),fU(f,d),r=u.idx+1;r<=h.idx+n;r++)fU(g,t[r%n].slice());return fU(g,d),fU(g,p),[{points:f},{points:g}]}(e,h,u)}function mU(t,e,i,n){if(1===i)n.push(e);else{var o=Math.floor(i/2),r=t(e);mU(t,r[0],o,n),mU(t,r[1],i-o,n)}return n}function vU(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function yU(t,e){var i=t.length,n=e.length;if(i===n)return[t,e];for(var o=[],r=[],a=i<n?t:e,s=Math.min(i,n),l=Math.abs(n-i)/6,h=(s-2)/6,u=Math.ceil(l/h)+1,c=[a[0],a[1]],d=l,p=2;p<s;){var f=a[p-2],g=a[p-1],m=a[p++],v=a[p++],y=a[p++],b=a[p++],x=a[p++],w=a[p++];if(d<=0)c.push(m,v,y,b,x,w);else{for(var _=Math.min(d,u-1)+1,C=1;C<=_;C++){var S=C/_;Ai(f,m,y,x,S,o),Ai(g,v,b,w,S,r),f=o[3],g=r[3],c.push(o[1],r[1],o[2],r[2],f,g),m=o[5],v=r[5],y=o[6],b=r[6]}d-=_-1}}return a===t?[c,e]:[t,c]}function bU(t,e){for(var i=t.length,n=t[i-2],o=t[i-1],r=[],a=0;a<e.length;)r[a++]=n,r[a++]=o;return r}function xU(t){for(var e=0,i=0,n=0,o=t.length,r=0,a=o-2;r<o;a=r,r+=2){var s=t[a],l=t[a+1],h=t[r],u=t[r+1],c=s*u-h*l;e+=c,i+=(s+h)*c,n+=(l+u)*c}return 0===e?[t[0]||0,t[1]||0]:[i/e/3,n/e/3,e]}function wU(t,e,i,n){for(var o=(t.length-2)/6,r=1/0,a=0,s=t.length,l=s-2,h=0;h<o;h++){for(var u=6*h,c=0,d=0;d<s;d+=2){var p=0===d?u:(u+d-2)%l+2,f=t[p]-i[0],g=t[p+1]-i[1],m=e[d]-n[0]-f,v=e[d+1]-n[1]-g;c+=m*m+v*v}c<r&&(r=c,a=h)}return a}function _U(t){for(var e=[],i=t.length,n=0;n<i;n+=2)e[n]=t[i-n-2],e[n+1]=t[i-n-1];return e}function CU(t){return t.__isCombineMorphing}var SU="__mOriginal_";function MU(t,e,i){var n=SU+e,o=t[n]||t[e];t[n]||(t[n]=t[e]);var r=i.replace,a=i.after,s=i.before;t[e]=function(){var t,e=arguments;return s&&s.apply(this,e),t=r?r.apply(this,e):o.apply(this,e),a&&a.apply(this,e),t}}function TU(t,e){var i=SU+e;t[i]&&(t[e]=t[i],t[i]=null)}function EU(t,e){for(var i=0;i<t.length;i++)for(var n=t[i],o=0;o<n.length;){var r=n[o],a=n[o+1];n[o++]=e[0]*r+e[2]*a+e[4],n[o++]=e[1]*r+e[3]*a+e[5]}}function IU(t,e){var i=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),o=function(t,e){for(var i,n,o,r=[],a=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],h=e[s],u=void 0,c=void 0;l?h?(n=u=(i=yU(l,h))[0],o=c=i[1]):(c=bU(o||l,l),u=l):(u=bU(n||h,h),c=h),r.push(u),a.push(c)}return[r,a]}(sU(i),sU(n)),r=o[0],a=o[1],s=t.getComputedTransform(),l=e.getComputedTransform();s&&EU(r,s),l&&EU(a,l),MU(e,"updateTransform",{replace:function(){this.transform=null}}),e.transform=null;var h=function(t,e,i,n){for(var o,r=[],a=0;a<t.length;a++){var s=t[a],l=e[a],h=xU(s),u=xU(l);null==o&&(o=h[2]<0!=u[2]<0);var c=[],d=[],p=0,f=1/0,g=[],m=s.length;o&&(s=_U(s));for(var v=6*wU(s,l,h,u),y=m-2,b=0;b<y;b+=2){var x=(v+b)%y+2;c[b+2]=s[x]-h[0],c[b+3]=s[x+1]-h[1]}c[0]=s[v]-h[0],c[1]=s[v+1]-h[1];for(var w=n/10,_=-n/2;_<=n/2;_+=w){var C=Math.sin(_),S=Math.cos(_),M=0;for(b=0;b<s.length;b+=2){var T=c[b],E=c[b+1],I=l[b]-u[0],D=l[b+1]-u[1],k=I*S-D*C,A=I*C+D*S;g[b]=k,g[b+1]=A;var L=k-T,R=A-E;M+=L*L+R*R}if(M<f){f=M,p=_;for(var P=0;P<g.length;P++)d[P]=g[P]}}r.push({from:c,to:d,fromCp:h,toCp:u,rotation:-p})}return r}(r,a,0,Math.PI),u=[];MU(e,"buildPath",{replace:function(t){for(var i=e.__morphT,n=1-i,o=[],r=0;r<h.length;r++){var a=h[r],s=a.from,l=a.to,c=a.rotation*i,d=a.fromCp,p=a.toCp,f=Math.sin(c),g=Math.cos(c);Xt(o,d,p,i);for(var m=0;m<s.length;m+=2){var v=s[m],y=s[m+1],b=v*n+(C=l[m])*i,x=y*n+(S=l[m+1])*i;u[m]=b*g-x*f+o[0],u[m+1]=b*f+x*g+o[1]}var w=u[0],_=u[1];for(t.moveTo(w,_),m=2;m<s.length;){var C=u[m++],S=u[m++],M=u[m++],T=u[m++],E=u[m++],I=u[m++];w===C&&_===S&&M===E&&T===I?t.lineTo(E,I):t.bezierCurveTo(C,S,M,T,E,I),w=E,_=I}}}})}function DU(t,e,i){if(!t||!e)return e;var n=i.done,o=i.during;return IU(t,e),e.__morphT=0,e.animateTo({__morphT:1},j({during:function(t){e.dirtyShape(),o&&o(t)},done:function(){TU(e,"buildPath"),TU(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),n&&n()}},i)),e}function kU(t,e,i,n,o,r){t=o===i?0:Math.round(32767*(t-i)/(o-i)),e=r===n?0:Math.round(32767*(e-n)/(r-n));for(var a,s=0,l=32768;l>0;l/=2){var h=0,u=0;(t&l)>0&&(h=1),(e&l)>0&&(u=1),s+=l*l*(3*h^u),0===u&&(1===h&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function AU(t){var e=1/0,i=1/0,n=-1/0,o=-1/0,r=K(t,(function(t){var r=t.getBoundingRect(),a=t.getComputedTransform(),s=r.x+r.width/2+(a?a[4]:0),l=r.y+r.height/2+(a?a[5]:0);return e=Math.min(s,e),i=Math.min(l,i),n=Math.max(s,n),o=Math.max(l,o),[s,l]}));return K(r,(function(r,a){return{cp:r,z:kU(r[0],r[1],e,i,n,o),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function LU(t){return function(t,e){var i,n=[],o=t.shape;switch(t.type){case"rect":!function(t,e,i){for(var n=t.width,o=t.height,r=n>o,a=hU([n,o],r?0:1,e),s=r?"width":"height",l=r?"height":"width",h=r?"x":"y",u=r?"y":"x",c=t[s]/a.length,d=0;d<a.length;d++)for(var p=t[l]/a[d],f=0;f<a[d];f++){var g={};g[h]=d*c,g[u]=f*p,g[s]=c,g[l]=p,g.x+=t.x,g.y+=t.y,i.push(g)}}(o,e,n),i=qs;break;case"sector":uU(o,e,n),i=Zf;break;case"circle":uU({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},e,n),i=Zf;break;default:var r=t.getComputedTransform(),a=r?Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3])):1,s=K(function(t,e){var i=sU(t),n=[];e=e||1;for(var o=0;o<i.length;o++){var r=i[o],a=[],s=r[0],l=r[1];a.push(s,l);for(var h=2;h<r.length;){var u=r[h++],c=r[h++],d=r[h++],p=r[h++],f=r[h++],g=r[h++];lU(s,l,u,c,d,p,f,g,a,e),s=f,l=g}n.push(a)}return n}(t.getUpdatedPathProxy(),a),(function(t){return function(t){for(var e=[],i=0;i<t.length;)e.push([t[i++],t[i++]]);return e}(t)})),l=s.length;if(0===l)mU(gU,{points:s[0]},e,n);else if(l===e)for(var h=0;h<l;h++)n.push({points:s[h]});else{var u=0,c=K(s,(function(t){var e=[],i=[];Ha(t,e,i);var n=(i[1]-e[1])*(i[0]-e[0]);return u+=n,{poly:t,area:n}}));c.sort((function(t,e){return e.area-t.area}));var d=e;for(h=0;h<l;h++){var p=c[h];if(d<=0)break;var f=h===l-1?d:Math.ceil(p.area/u*e);f<0||(mU(gU,{points:p.poly},f,n),d-=f)}}i=eg}if(!i)return function(t,e){for(var i=[],n=0;n<e;n++)i.push(Ef(t));return i}(t,e);var g=[];for(h=0;h<n.length;h++){var m=new i;m.setShape(n[h]),vU(t,m),g.push(m)}return g}(t.path,t.count)}function RU(t){return it(t[0])}function PU(t,e){for(var i=[],n=t.length,o=0;o<n;o++)i.push({one:t[o],many:[]});for(o=0;o<e.length;o++){var r=e[o].length,a=void 0;for(a=0;a<r;a++)i[a%n].many.push(e[o][a])}var s=0;for(o=n-1;o>=0;o--)if(!i[o].many.length){var l=i[s].many;if(l.length<=1){if(!s)return i;s=0}r=l.length;var h=Math.ceil(r/2);i[o].many=l.slice(h,r),i[s].many=l.slice(0,h),s++}return i}var OU={clone:function(t){for(var e=[],i=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var o=Ef(t.path);o.setStyle("opacity",i),e.push(o)}return e},split:null};function zU(t,e,i,n,o,r){if(t.length&&e.length){var a=vh("update",n,o);if(a&&a.duration>0){var s,l,h=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},a);RU(t)&&(s=t,l=e),RU(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?PU(l,s):PU(c?e:t,[c?t:e]),p=0,f=0;f<d.length;f++)p+=d[f].many.length;var g=0;for(f=0;f<d.length;f++)m(d[f],c,g,p),g+=d[f].many.length}}function m(t,e,n,o,a){var s=t.many,l=t.one;if(1!==s.length||a)for(var c=j({dividePath:OU[i],individualDelay:h&&function(t,e,i,r){return h(t+n,o)}},u),d=e?function(t,e,i){var n=[];!function t(e){for(var i=0;i<e.length;i++){var o=e[i];CU(o)?t(o.childrenRef()):o instanceof Ps&&n.push(o)}}(t);var o=n.length;if(!o)return{fromIndividuals:[],toIndividuals:[],count:0};var r=(i.dividePath||LU)({path:e,count:o});if(r.length!==o)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0};n=AU(n),r=AU(r);for(var a=i.done,s=i.during,l=i.individualDelay,h=new Eo,u=0;u<o;u++){var c=n[u],d=r[u];d.parent=e,d.copyTransform(h),l||IU(c,d)}function p(t){for(var e=0;e<r.length;e++)r[e].addSelfToZr(t)}function f(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,TU(e,"addSelfToZr"),TU(e,"removeSelfFromZr")}e.__isCombineMorphing=!0,e.childrenRef=function(){return r},MU(e,"addSelfToZr",{after:function(t){p(t)}}),MU(e,"removeSelfFromZr",{after:function(t){for(var e=0;e<r.length;e++)r[e].removeSelfFromZr(t)}});var g=r.length;if(l){var m=g,v=function(){0==--m&&(f(),a&&a())};for(u=0;u<g;u++){var y=l?j({delay:(i.delay||0)+l(u,g,n[u],r[u]),done:v},i):i;DU(n[u],r[u],y)}}else e.__morphT=0,e.animateTo({__morphT:1},j({during:function(t){for(var i=0;i<g;i++){var n=r[i];n.__morphT=e.__morphT,n.dirtyShape()}s&&s(t)},done:function(){f();for(var e=0;e<t.length;e++)TU(t[e],"updateTransform");a&&a()}},i));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:r,count:g}}(s,l,c):function(t,e,i){var n=e.length,o=[],r=i.dividePath||LU;if(CU(t)){!function t(e){for(var i=0;i<e.length;i++){var n=e[i];CU(n)?t(n.childrenRef()):n instanceof Ps&&o.push(n)}}(t.childrenRef());var a=o.length;if(a<n)for(var s=0,l=a;l<n;l++)o.push(Ef(o[s++%a]));o.length=n}else{o=r({path:t,count:n});var h=t.getComputedTransform();for(l=0;l<o.length;l++)o[l].setLocalTransform(h);if(o.length!==n)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0}}o=AU(o),e=AU(e);var u=i.individualDelay;for(l=0;l<n;l++){var c=u?j({delay:(i.delay||0)+u(l,n,o[l],e[l])},i):i;DU(o[l],e[l],c)}return{fromIndividuals:o,toIndividuals:e,count:e.length}}(l,s,c),p=d.fromIndividuals,f=d.toIndividuals,g=p.length,v=0;v<g;v++)y=h?j({delay:h(v,g)},u):u,r(p[v],f[v],e?s[v]:t.one,e?t.one:s[v],y);else{var y,b=e?s[0]:l,x=e?l:s[0];CU(b)?m({many:[b],one:x},!0,n,o,!0):(DU(b,x,y=h?j({delay:h(n,o)},u):u),r(b,x,b,x,y))}}}function NU(t){if(!t)return[];if(it(t)){for(var e=[],i=0;i<t.length;i++)e.push(NU(t[i]));return e}var n=[];return t.traverse((function(t){t instanceof Ps&&!t.disableMorphing&&!t.invisible&&!t.ignore&&n.push(t)})),n}var BU=1e4,FU=Br();function VU(t){var e=[];return q(t,(function(t){var i=t.data;if(!(i.count()>BU))for(var n=i.getIndices(),o=function(t){for(var e=t.dimensions,i=0;i<e.length;i++){var n=t.getDimensionInfo(e[i]);if(n&&0===n.otherDims.itemGroupId)return e[i]}}(i),r=0;r<n.length;r++)e.push({dataGroupId:t.dataGroupId,data:i,dim:t.dim||o,divide:t.divide,dataIndex:r})})),e}function HU(t,e,i){t.traverse((function(t){t instanceof Ps&&xh(t,{style:{opacity:0}},e,{dataIndex:i,isFrom:!0})}))}function GU(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function WU(t){t.stopAnimation(),t.isGroup&&t.traverse((function(t){t.stopAnimation()}))}function UU(t,e,i){var n=VU(t),o=VU(e);function r(t,e,i,n,o){(i||t)&&e.animateFrom({style:i&&i!==t?U(U({},i.style),t.style):t.style},o)}function a(t){for(var e=0;e<t.length;e++)if(t[e].dim)return t[e].dim}var s=a(n),l=a(o),h=!1;function u(t,e){return function(i){var n=i.data,o=i.dataIndex;if(e)return n.getId(o);var r=i.dataGroupId,a=t?s||l:l||s,h=a&&n.getDimensionInfo(a),u=h&&h.ordinalMeta;if(h){var c=n.get(h.name,o);return u&&u.categories[c]||c+""}var d=n.getRawDataItem(o);return d&&d.groupId?d.groupId+"":r||n.getId(o)}}var c=function(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++){var o=t[n],r=e[n];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(n,o),d={};if(!c)for(var p=0;p<o.length;p++){var f=o[p],g=f.data.getItemGraphicEl(f.dataIndex);g&&(d[g.id]=!0)}function m(t,e){var i=n[e],a=o[t],s=a.data.hostModel,l=i.data.getItemGraphicEl(i.dataIndex),u=a.data.getItemGraphicEl(a.dataIndex);l!==u?l&&d[l.id]||u&&(WU(u),l?(WU(l),GU(l),h=!0,zU(NU(l),NU(u),a.divide,s,t,r)):HU(u,s,t)):u&&function(t,e,i){var n=vh("update",i,e);n&&t.traverse((function(t){if(t instanceof La){var e=function(t){return mh(t).oldStyle}(t);e&&t.animateFrom({style:e},n)}}))}(u,a.dataIndex,s)}new _w(n,o,u(!0,c),u(!1,c),null,"multiple").update(m).updateManyToOne((function(t,e){var i=o[t],a=i.data,s=a.hostModel,l=a.getItemGraphicEl(i.dataIndex),u=J(K(e,(function(t){return n[t].data.getItemGraphicEl(n[t].dataIndex)})),(function(t){return t&&t!==l&&!d[t.id]}));l&&(WU(l),u.length?(q(u,(function(t){WU(t),GU(t)})),h=!0,zU(NU(u),NU(l),i.divide,s,t,r)):HU(l,s,i.dataIndex))})).updateOneToMany((function(t,e){var i=n[e],a=i.data.getItemGraphicEl(i.dataIndex);if(!a||!d[a.id]){var s=J(K(t,(function(t){return o[t].data.getItemGraphicEl(o[t].dataIndex)})),(function(t){return t&&t!==a})),l=o[t[0]].data.hostModel;s.length&&(q(s,(function(t){return WU(t)})),a?(WU(a),GU(a),h=!0,zU(NU(a),NU(s),i.divide,l,t[0],r)):q(s,(function(e){return HU(e,l,t[0])})))}})).updateManyToMany((function(t,e){new _w(e,t,(function(t){return n[t].data.getId(n[t].dataIndex)}),(function(t){return o[t].data.getId(o[t].dataIndex)})).update((function(i,n){m(t[i],e[n])})).execute()})).execute(),h&&q(e,(function(t){var e=t.data.hostModel,n=e&&i.getViewOfSeriesModel(e),o=vh("update",e,0);n&&e.isAnimationEnabled()&&o&&o.duration>0&&n.group.traverse((function(t){t instanceof Ps&&!t.animators.length&&t.animateFrom({style:{opacity:0}},o)}))}))}function jU(t){return t.getModel("universalTransition").get("seriesKey")||t.id}function XU(t){return it(t)?t.sort().join(","):t}function YU(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function ZU(t,e){for(var i=0;i<t.length;i++)if(null!=e.seriesIndex&&e.seriesIndex===t[i].seriesIndex||null!=e.seriesId&&e.seriesId===t[i].id)return i}cb([function(t){t.registerPainter("canvas",rx)}]),cb([function(t){t.registerPainter("svg",yw)}]),cb([function(t){t.registerChartView(F_),t.registerSeriesModel(i_),t.registerLayout(V_("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,W_("line"))},function(t){t.registerChartView(EC),t.registerSeriesModel(iC),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,et(K_,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$_("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,W_("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))}))},function(t){t.registerChartView(FC),t.registerSeriesModel(UC),uv("pie",t.registerAction),t.registerLayout(et(LC,"pie")),t.registerProcessor(RC("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i=t.getData();i.filterSelf((function(t){var e=i.mapDimension("value"),n=i.get(e,t);return!(at(n)&&!isNaN(n)&&n<0)}))}})},function(t){cb(oT),t.registerSeriesModel(jC),t.registerChartView(KC),t.registerLayout(V_("scatter"))},function(t){cb(ST),t.registerChartView(uT),t.registerSeriesModel(dT),t.registerLayout(rT),t.registerProcessor(RC("radar")),t.registerPreprocessor(lT)},function(t){cb(vI),t.registerChartView(YE),t.registerSeriesModel(qE),t.registerLayout($E),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,KE),uv("map",t.registerAction)},function(t){t.registerChartView(zI),t.registerSeriesModel(tD),t.registerLayout(iD),t.registerVisual(nD),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))})),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e,i){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=pI(e.coordinateSystem,t,void 0,i);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))}(t)},function(t){t.registerSeriesModel(sD),t.registerChartView(SD),t.registerVisual(GD),t.registerLayout(ek),function(t){for(var e=0;e<oD.length;e++)t.registerAction({type:oD[e],update:"updateView"},At);t.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,i){var n=qI(t,["treemapZoomToNode","treemapRootToNode"],e);if(n){var o=e.getViewRoot();o&&(t.direction=$I(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}))}(t)},function(t){t.registerChartView(sA),t.registerSeriesModel(mA),t.registerProcessor(sk),t.registerVisual(lk),t.registerVisual(uk),t.registerLayout(_k),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,kk),t.registerLayout(Lk),t.registerCoordinateSystem("graphView",{dimensions:eI.dimensions,create:Rk}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},At),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},At),t.registerAction(vA,(function(t,e,i){e.eachComponent({mainType:"series",query:t},(function(e){var n=pI(e.coordinateSystem,t,void 0,i);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))}))},function(t){t.registerChartView(CA),t.registerSeriesModel(SA)},function(t){t.registerChartView(EA),t.registerSeriesModel(DA),t.registerLayout(kA),t.registerProcessor(RC("funnel"))},function(t){cb(dR),t.registerChartView(zA),t.registerSeriesModel(BA),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,VA)},function(t){t.registerChartView(vR),t.registerSeriesModel(bR),t.registerLayout(xR),t.registerVisual(LR),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t){t.registerSeriesModel(OR),t.registerChartView(GR),t.registerLayout(UR),t.registerTransform(jR)},function(t){t.registerChartView(oP),t.registerSeriesModel(aP),t.registerPreprocessor(sP),t.registerVisual(pP),t.registerLayout(mP)},function(t){t.registerChartView(xP),t.registerSeriesModel(wP),t.registerLayout(V_("effectScatter"))},function(t){t.registerChartView(RP),t.registerSeriesModel(BP),t.registerLayout(LP),t.registerVisual(VP)},function(t){t.registerChartView(jP),t.registerSeriesModel(XP)},function(t){t.registerChartView(pO),t.registerSeriesModel(fO),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,et(K_,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$_("pictorialBar"))},function(t){t.registerChartView(mO),t.registerSeriesModel(yO),t.registerLayout(bO),t.registerProcessor(RC("themeRiver"))},function(t){t.registerChartView(TO),t.registerSeriesModel(IO),t.registerLayout(et(kO,"sunburst")),t.registerProcessor(et(RC,"sunburst")),t.registerVisual(LO),function(t){t.registerAction({type:CO,update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,i){var n=qI(t,[CO],e);if(n){var o=e.getViewRoot();o&&(t.direction=$I(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))})),t.registerAction({type:SO,update:"none"},(function(t,e,i){t=U({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e){var i=qI(t,[SO],e);i&&(t.dataIndex=i.node.dataIndex)})),i.dispatchAction(U(t,{type:"highlight"}))})),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,e,i){t=U({},t),i.dispatchAction(U(t,{type:"downplay"}))}))}(t)},function(t){t.registerChartView(Sz),t.registerSeriesModel(zO)}]),cb((function(t){cb(oT),cb(IN)})),cb((function(t){cb(IN),XM.registerAxisPointerClass("PolarAxisPointer",AN),t.registerCoordinateSystem("polar",YN),t.registerComponentModel(LN),t.registerComponentView(cB),lS(t,"angle",PN,hB),lS(t,"radius",ON,uB),t.registerComponentView(tB),t.registerComponentView(rB),t.registerLayout(et(lB,"bar"))})),cb(vI),cb((function(t){cb(IN),XM.registerAxisPointerClass("SingleAxisPointer",RB),t.registerComponentView(PB),t.registerComponentView(vB),t.registerComponentModel(bB),lS(t,"single",bB,bB.defaultOption),t.registerCoordinateSystem("single",TB)})),cb(dR),cb((function(t){t.registerComponentModel(zB),t.registerComponentView(BB),t.registerCoordinateSystem("calendar",GB)})),cb((function(t){t.registerComponentModel(YB),t.registerComponentView(KB),t.registerPreprocessor((function(t){var e=t.graphic;it(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}))})),cb((function(t){t.registerComponentModel(SF),t.registerComponentView(EF),_F("saveAsImage",DF),_F("magicType",PF),_F("dataView",HF),_F("dataZoom",pV),_F("restore",XF),cb(bF)})),cb((function(t){cb(IN),t.registerComponentModel(fV),t.registerComponentView(OV),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},At),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},At)})),cb(IN),cb((function(t){t.registerComponentView(tH),t.registerComponentModel(iH),t.registerPreprocessor(NV),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,qV),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},At),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},At),_F("brush",oH)})),cb((function(t){t.registerComponentModel(rH),t.registerComponentView(aH)})),cb((function(t){t.registerComponentModel(uH),t.registerComponentView(bH),t.registerSubTypeDefaulter("timeline",(function(){return"slider"})),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,e,i){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),j({currentIndex:n.option.currentIndex},t)})),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}))}(t),t.registerPreprocessor(xH)})),cb((function(t){t.registerComponentModel(IH),t.registerComponentView(HH),t.registerPreprocessor((function(t){CH(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})}))})),cb((function(t){t.registerComponentModel(GH),t.registerComponentView(qH),t.registerPreprocessor((function(t){CH(t.series,"markLine")&&(t.markLine=t.markLine||{})}))})),cb((function(t){t.registerComponentModel(KH),t.registerComponentView(rG),t.registerPreprocessor((function(t){CH(t.series,"markArea")&&(t.markArea=t.markArea||{})}))})),cb((function(t){cb(bG),cb(EG)})),cb((function(t){cb(BG),cb(ZG)})),cb(BG),cb(ZG),cb((function(t){cb(LW),cb(BW)})),cb(LW),cb(BW),cb((function(t){t.registerPreprocessor(WW),t.registerVisual(t.PRIORITY.VISUAL.ARIA,GW)})),cb((function(t){t.registerTransform(eU),t.registerTransform(iU)})),cb((function(t){t.registerComponentModel(nU),t.registerComponentView(oU)})),cb((function(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,i){q(Tr(i.seriesTransition),(function(t){q(Tr(t.to),(function(t){for(var e=i.updatedSeries,n=0;n<e.length;n++)(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)&&(e[n][Zp]=!0)}))}))})),t.registerUpdateLifecycle("series:transition",(function(t,e,i){var n=FU(e);if(n.oldSeries&&i.updatedSeries&&i.optionChanged){var o=i.seriesTransition;if(o)q(Tr(o),(function(t){!function(t,e,i,n){var o=[],r=[];q(Tr(t.from),(function(t){var i=ZU(e.oldSeries,t);i>=0&&o.push({dataGroupId:e.oldDataGroupIds[i],data:e.oldData[i],divide:YU(e.oldData[i]),dim:t.dimension})})),q(Tr(t.to),(function(t){var n=ZU(i.updatedSeries,t);if(n>=0){var o=i.updatedSeries[n].getData();r.push({dataGroupId:e.oldDataGroupIds[n],data:o,divide:YU(o),dim:t.dimension})}})),o.length>0&&r.length>0&&UU(o,r,n)}(t,n,i,e)}));else{var r=function(t,e){var i=Tt(),n=Tt(),o=Tt();return q(t.oldSeries,(function(e,i){var r=t.oldDataGroupIds[i],a=t.oldData[i],s=jU(e),l=XU(s);n.set(l,{dataGroupId:r,data:a}),it(s)&&q(s,(function(t){o.set(t,{key:l,dataGroupId:r,data:a})}))})),q(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),r=t.getData(),a=jU(t),s=XU(a),l=n.get(s);if(l)i.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:YU(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:YU(r),data:r}]});else if(it(a)){var h=[];q(a,(function(t){var e=n.get(t);e.data&&h.push({dataGroupId:e.dataGroupId,divide:YU(e.data),data:e.data})})),h.length&&i.set(s,{oldSeries:h,newSeries:[{dataGroupId:e,data:r,divide:YU(r)}]})}else{var u=o.get(a);if(u){var c=i.get(u.key);c||(c={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:YU(u.data)}],newSeries:[]},i.set(u.key,c)),c.newSeries.push({dataGroupId:e,data:r,divide:YU(r)})}}}})),i}(n,i);q(r.keys(),(function(t){var i=r.get(t);UU(i.oldSeries,i.newSeries,e)}))}q(i.updatedSeries,(function(t){t[Zp]&&(t[Zp]=!1)}))}for(var a=t.getSeries(),s=n.oldSeries=[],l=n.oldDataGroupIds=[],h=n.oldData=[],u=0;u<a.length;u++){var c=a[u].getData();c.count()<BU&&(s.push(a[u]),l.push(a[u].get("dataGroupId")),h.push(c))}}))})),cb($b);const qU=33;function KU(t,e){const i=document.getElementById(t);if(!i)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const n=function(t,e,i){var n=function(t){return Ky[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,Qy)]}(t);if(n)return n;var o=new Fy(t,void 0,i);return o.id="ec_"+Jy++,Ky[o.id]=o,jr(t,Qy,o.id),Py(o),ay.trigger("afterinit",o),o}(i);return n.setOption(e,!0),window.addEventListener("resize",(()=>{null!=n&&void 0!==n&&n.resize()})),n}function $U(t,e){const i=t?document.querySelector(t):null,n=e?document.querySelector(e):null;i&&(i.hidden=!0),n&&(n.style.background="url('./build/images/nodata1.png') no-repeat top center",n.hidden=!1)}function JU(t,e){const i=t?document.querySelector(t):null,n=e?document.querySelector(e):null;i&&(i.hidden=!0),n&&(n.style.background="#ffffff",n.hidden=!1)}function QU(t,e=!1,i=!0){let n=`<p>${t[0].name}</p>`;return t.forEach((t=>{const o=e?Math.round(t.data):t.data,r=i?`<div>${a=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${a}"></span>`} ${t.seriesName}: \n <strong style="float: right; margin-left:20px">\n ${t.data?d(o):"-"}\n </strong>\n </div>`:`<div>\n <strong>${t.data?d(o):"-"}\n </strong>\n </div>`;var a;n+=r})),n}function tj(t,e=!1){const i=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,n=e?`${t.percent}%`:d(t.value);return`<div> ${i} ${t.name} <strong style="float: right; margin-left:20px"> ${n} </strong></div>`}function ej(t){return 100*(t-120)/t}function ij(t,e){const i=Math.max(...t);return i+(e-i%e)}function nj(t,e=29){if(t.length>=e){const i=t.split(" ");let n="",o="";return i.forEach((t=>{`${n} ${t}`.length<=e?n+=(n?" ":"")+t:(o+=`${n}\n`,n=t)})),o+=n,o}return t}function oj(t,e=!0,i="",n=12){let o=(0,t.reduce(((t,e)=>{const i=e[0];return t[i]||(t[i]=[]),t[i].push(e),t}),{}));const r=new Set(t.map((t=>t[1]))),a=Object.keys(o);r.forEach((t=>{a.forEach((e=>{void 0===o[e].find((e=>e[1]===t))&&(o[e].push([o[e][0][0],t,void 0]),o[e].sort())}))}));const s=Object.entries(o).sort(((t,e)=>t[0].localeCompare(e[0])));o=Object.fromEntries(s);const l=[];let u;return Object.keys(o).forEach((t=>{u=e?h(t):t;const r=""!==i?{borderWidth:2,borderColor:i.shift()}:void 0;l.push({name:u,type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:n,formatter:t=>d(Math.round(t.value))},itemStyle:r,emphasis:{focus:"series"},data:o[t].map((t=>t[2]))})})),[Array.from(r),l]}function rj(t,e,i,n,o=30,r=15,a=30,s=-70,l=70){const h=p(e,i.data,1.1),u=l,c=n.slice(),f=[];let g=r,m=a,v=s;for(let t=0;t<e.length;t+=1)f.push({value:e[t][i.data],name:nj(e[t][i.type]),color:c.shift(),title:{offsetCenter:[`${String(v)}%`,`${String(g)}%`],fontFamily:"Montserrat",fontSize:o},detail:{offsetCenter:[`${String(v)}%`,`${String(m)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>d(Math.round(t))}}),v+=u,(t+1)%3==0&&(m+=a,g+=2*r,v=s);return[h,f]}function aj(t,e,i,n=0){return[p(e,i.data,1.1),t=>function(t,e,i){const n=d(Math.round(e)),o=h(t[i][0]),r=t[i][1],a=`\n${o} ${r} : ${n}`,s=`${n}\n${o} ${r}`;return window.innerWidth<=1710?a:s}(e,t,n),[{value:e[n][i.data]}]]}function sj(t,e,i=!1){const{resultset:n}={resultset:t},o=new Set,r=new Set,a=e,s=n.map((([t,e,n])=>{const a=i?Math.round(n):n;return o.add(t),r.add(e),{day:e,type:t,value:a}})),l=Array.from(r.values()),h=Array.from(o.values());return h.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[h.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:i})=>[e,t,i])),i=l.map((t=>{const i=e.find((([e])=>e===t));return i?i[2]:null}));return{name:t,type:"line",symbol:"circle",color:a.shift(),symbolSize:6,smooth:!1,data:i}})),r,h]}function lj(t,e){const i=function(t){return Math.round(document.getElementById(t).offsetWidth/qU)}(t);return[t,e.map((([t,e])=>({value:t,name:e}))),i]}class hj{constructor(t){this.table=t}reloadData(t,e,i){return this.table.dataLoader.load(t,void 0,void 0,void 0,e,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(t){return this.table.modules.layout.layout(t)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(t){return this.table.eventBus.subscribed(t)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(t){return this.table.externalEvents.subscribed(t)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(t){return this.table.options[t]}setOption(t,e){return void 0!==e&&(this.table.options[t]=e),this.table.options[t]}deprecationCheck(t,e){return this.table.deprecationAdvisor.check(t,e)}deprecationCheckMsg(t,e){return this.table.deprecationAdvisor.checkMsg(t,e)}deprecationMsg(t){return this.table.deprecationAdvisor.msg(t)}module(t){return this.table.module(t)}}class uj{static elVisible(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)}static elOffset(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}}static deepClone(t,e,i=[]){var n={}.__proto__,o=[].__proto__;for(var r in e||(e=Object.assign(Array.isArray(t)?[]:{},t)),t){let a,s,l=t[r];null==l||"object"!=typeof l||l.__proto__!==n&&l.__proto__!==o||(a=i.findIndex((t=>t.subject===l)),a>-1?e[r]=i[a].copy:(s=Object.assign(Array.isArray(l)?[]:{},l),i.unshift({subject:l,copy:s}),e[r]=this.deepClone(l,s,i)))}return e}}class cj extends hj{constructor(t,e,i){super(t),this.element=e,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var t=this.table.options.popupContainer;return"string"==typeof t?(t=document.querySelector(t))||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)"):!0===t&&(t=this.table.element),t&&!this._checkContainerIsParent(t)&&(t=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),t||(t=document.body),t}_checkContainerIsParent(t,e=this.table.element){return t===e||!!e.parentNode&&this._checkContainerIsParent(t,e.parentNode)}renderCallback(t){this.renderedCallback=t}containerEventCoords(t){var e=!(t instanceof MouseEvent),i=e?t.touches[0].pageX:t.pageX,n=e?t.touches[0].pageY:t.pageY;if(this.container!==document.body){let t=uj.elOffset(this.container);i-=t.left,n-=t.top}return{x:i,y:n}}elementPositionCoords(t,e="right"){var i,n,o,r=uj.elOffset(t);switch(this.container!==document.body&&(i=uj.elOffset(this.container),r.left-=i.left,r.top-=i.top),e){case"right":n=r.left+t.offsetWidth,o=r.top-1;break;case"bottom":n=r.left,o=r.top+t.offsetHeight;break;case"left":n=r.left,o=r.top-1;break;case"top":n=r.left,o=r.top;break;case"center":n=r.left+t.offsetWidth/2,o=r.top+t.offsetHeight/2}return{x:n,y:o,offset:r}}show(t,e){var i,n,o,r,a;return this.destroyed||this.table.destroyed||(t instanceof HTMLElement?(o=t,r=(a=this.elementPositionCoords(t,e)).offset,i=a.x,n=a.y):"number"==typeof t?(r={top:0,left:0},i=t,n=e):(i=(a=this.containerEventCoords(t)).x,n=a.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),"function"==typeof this.renderedCallback&&this.renderedCallback(),this._fitToScreen(i,n,o,r,e),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",(t=>{t.stopPropagation()}))),this}_fitToScreen(t,e,i,n,o){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(t+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=i?this.container.offsetWidth-n.left+"px":this.container.offsetWidth-t+"px",this.reversedX=!0),e+this.element.offsetHeight>Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0)&&(this.element.style.top=i?"bottom"===o?parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px":parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px":parseInt(this.element.style.top)-this.element.offsetHeight+"px")}isVisible(){return this.visible}hideOnBlur(t){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=t),this}_escapeCheck(t){27==t.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(t=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!t&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(t){return this.childPopup&&this.childPopup.hide(),this.childPopup=new cj(this.table,t,this),this.childPopup}}class dj extends hj{constructor(t,e){super(t),this._handler=null}initialize(){}registerTableOption(t,e){this.table.optionsList.register(t,e)}registerColumnOption(t,e){this.table.columnManager.optionsList.register(t,e)}registerTableFunction(t,e){void 0===this.table[t]?this.table[t]=(...i)=>(this.table.initGuard(t),e(...i)):console.warn("Unable to bind table function, name already in use",t)}registerComponentFunction(t,e,i){return this.table.componentFunctionBinder.bind(t,e,i)}registerDataHandler(t,e){this.table.rowManager.registerDataPipelineHandler(t,e),this._handler=t}registerDisplayHandler(t,e){this.table.rowManager.registerDisplayPipelineHandler(t,e),this._handler=t}displayRows(t){var e,i=this.table.rowManager.displayRows.length-1;if(this._handler&&(e=this.table.rowManager.displayPipeline.findIndex((t=>t.handler===this._handler)))>-1&&(i=e),t&&(i+=t),this._handler)return i>-1?this.table.rowManager.getDisplayRows(i):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(t,e){e||(e=this._handler),e&&this.table.rowManager.refreshActiveData(e,!1,t)}footerAppend(t){return this.table.footerManager.append(t)}footerPrepend(t){return this.table.footerManager.prepend(t)}footerRemove(t){return this.table.footerManager.remove(t)}popup(t,e){return new cj(this.table,t,e)}alert(t,e){return this.table.alertManager.alert(t,e)}clearAlert(){return this.table.alertManager.clear()}}class pj extends dj{constructor(t){super(t),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(t){var e=!1,i={};this.allowedTypes.forEach((n=>{var o,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(o=this.lookupAccessor(t.definition[r]))&&(e=!0,i[r]={accessor:o,params:t.definition[r+"Params"]||{}})})),e&&(t.modules.accessor=i)}lookupAccessor(t){var e=!1;switch(typeof t){case"string":pj.accessors[t]?e=pj.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e}transformRow(t,e){var i="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),n=t.getComponent(),o=uj.deepClone(t.data||{});return this.table.columnManager.traverse((function(t){var r,a,s,l;t.modules.accessor&&(a=t.modules.accessor[i]||t.modules.accessor.accessor||!1)&&"undefined"!=(r=t.getFieldValue(o))&&(l=t.getComponent(),s="function"==typeof a.params?a.params(r,o,e,l,n):a.params,t.setFieldValue(o,a.accessor(r,o,e,s,l,n)))})),o}}function fj(t,e){var i=[];if(e=e||"",Array.isArray(t))t.forEach(((t,n)=>{i=i.concat(fj(t,e?e+"["+n+"]":n))}));else if("object"==typeof t)for(var n in t)i=i.concat(fj(t[n],e?e+"["+n+"]":n));else i.push({key:e,value:t});return i}function gj(t){var e=fj(t),i=[];return e.forEach((function(t){i.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))})),i.join("&")}function mj(t,e,i){return t&&i&&Object.keys(i).length&&(e.method&&"get"!=e.method.toLowerCase()||(e.method="get",t+=(t.includes("?")?"&":"?")+gj(i))),t}function vj(t,e){var i=[];if(e=e||"",Array.isArray(t))t.forEach(((t,n)=>{i=i.concat(vj(t,e?e+"["+n+"]":n))}));else if("object"==typeof t)for(var n in t)i=i.concat(vj(t[n],e?e+"["+n+"]":n));else i.push({key:e,value:t});return i}pj.moduleName="accessor",pj.accessors={};var yj={json:{headers:{"Content-Type":"application/json"},body:function(t,e,i){return JSON.stringify(i)}},form:{headers:{},body:function(t,e,i){var n=vj(i),o=new FormData;return n.forEach((function(t){o.append(t.key,t.value)})),o}}};class bj extends dj{constructor(t){super(t),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",(function(){})),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=bj.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||bj.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||bj.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(t,e,i,n){var o=this.table.options.ajaxParams;return o&&("function"==typeof o&&(o=o.call(this.table)),n=Object.assign(n,o)),n}requestDataCheck(t,e,i,n){return!((t||!this.url)&&"string"!=typeof t)}requestData(t,e,i,n,o){var r;return!o&&this.requestDataCheck(t)?(t&&this.setUrl(t),r=this.generateConfig(i),this.sendRequest(this.url,e,r)):o}setDefaultConfig(t={}){this.config=Object.assign({},bj.defaultConfig),"string"==typeof t?this.config.method=t:Object.assign(this.config,t)}generateConfig(t={}){var e=Object.assign({},this.config);return"string"==typeof t?e.method=t:Object.assign(e,t),e}setUrl(t){this.url=t}getUrl(){return this.url}sendRequest(t,e,i){return!1!==this.table.options.ajaxRequesting.call(this.table,t,e)?this.loaderPromise(t,i,e).then((i=>(this.table.options.ajaxResponse&&(i=this.table.options.ajaxResponse.call(this.table,t,e,i)),i))):Promise.reject()}}bj.moduleName="ajax",bj.defaultConfig={method:"GET"},bj.defaultURLGenerator=mj,bj.defaultLoaderPromise=function(t,e,i){var n;return new Promise(((o,r)=>{if(t=this.urlGenerator.call(this.table,t,e,i),"GET"!=e.method.toUpperCase())if(n="object"==typeof this.table.options.ajaxContentType?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType]){for(var a in n.headers)e.headers||(e.headers={}),void 0===e.headers[a]&&(e.headers[a]=n.headers[a]);e.body=n.body.call(this,t,e,i)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);t?(void 0===e.headers&&(e.headers={}),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),void 0===e.headers["X-Requested-With"]&&(e.headers["X-Requested-With"]="XMLHttpRequest"),void 0===e.mode&&(e.mode="cors"),"cors"==e.mode?(void 0===e.headers.Origin&&(e.headers.Origin=window.location.origin),void 0===e.credentials&&(e.credentials="same-origin")):void 0===e.credentials&&(e.credentials="include"),fetch(t,e).then((t=>{t.ok?t.json().then((t=>{o(t)})).catch((t=>{r(t),console.warn("Ajax Load Error - Invalid JSON returned",t)})):(console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText),r(t))})).catch((t=>{console.error("Ajax Load Error - Connection Error: ",t),r(t)}))):(console.warn("Ajax Load Error - No URL Set"),o([]))}))},bj.contentTypeFormatters=yj;class xj extends dj{constructor(t){super(t),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(t=>{var e,i,n;this.blocked||(t.preventDefault(),this.customSelection?(e=this.customSelection,this.table.options.clipboardCopyFormatter&&(e=this.table.options.clipboardCopyFormatter("plain",e))):(n=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),e=(i=this.table.modules.export.generateHTMLTable(n))?this.generatePlainContent(n):"",this.table.options.clipboardCopyFormatter&&(e=this.table.options.clipboardCopyFormatter("plain",e),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",e):t.clipboardData&&t.clipboardData.setData?(t.clipboardData.setData("text/plain",e),i&&t.clipboardData.setData("text/html",i)):t.originalEvent&&t.originalEvent.clipboardData.setData&&(t.originalEvent.clipboardData.setData("text/plain",e),i&&t.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",e,i),this.reset())})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(t=>{this.paste(t)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(t){var e=[];return t.forEach((t=>{var i=[];t.columns.forEach((e=>{var n="";if(e)if("group"===t.type&&(e.value=e.component.getKey()),null===e.value)n="";else switch(typeof e.value){case"object":n=JSON.stringify(e.value);break;case"undefined":n="";break;default:n=e.value}i.push(n)})),e.push(i.join("\t"))})),e.join("\n")}copy(t,e){var i,n;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=t||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((t=document.createRange()).selectNodeContents(this.table.element),(i=window.getSelection()).toString()&&e&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(t)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((n=document.body.createTextRange()).moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(t){switch(typeof t){case"string":this.pasteAction=xj.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}}setPasteParser(t){switch(typeof t){case"string":this.pasteParser=xj.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}}paste(t){var e,i,n;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),(i=this.pasteParser.call(this,e))?(t.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",e,i,n)):this.dispatchExternal("clipboardPasteError",e))}mutateData(t){var e=[];return Array.isArray(t)?t.forEach((t=>{e.push(this.table.modules.mutator.transformRow(t,"clipboard"))})):e=t,e}checkPaseOrigin(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e}getPasteData(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e}}xj.moduleName="clipboard",xj.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},xj.pasteParsers={table:function(t){var e=[],i=!0,n=this.table.columnManager.columns,o=[],r=[];return(t=t.split("\n")).forEach((function(t){e.push(t.split("\t"))})),!(!e.length||1===e.length&&e[0].length<2)&&(e[0].forEach((function(t){var e=n.find((function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()}));e?o.push(e):i=!1})),i||(i=!0,o=[],e[0].forEach((function(t){var e=n.find((function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()}));e?o.push(e):i=!1})),i||(o=this.table.columnManager.columnsByIndex)),i&&e.shift(),e.forEach((function(t){var e={};t.forEach((function(t,i){o[i]&&(e[o[i].field]=t)})),r.push(e)})),r)}};class wj{constructor(t){return this._row=t,new Proxy(this,{get:function(t,e,i){return void 0!==t[e]?t[e]:t._row.table.componentFunctionBinder.handle("row",t._row,e)}})}getData(t){return this._row.getData(t)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t}getCell(t){var e=this._row.getCell(t);return!!e&&e.getComponent()}_getSelf(){return this._row}}class _j{constructor(t){return this._cell=t,new Proxy(this,{get:function(t,e,i){return void 0!==t[e]?t[e]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,e)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(t){return this._cell.row.getData(t)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class Cj extends hj{constructor(t,e){super(t.table),this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell")}_configureCell(){var t=this.element,e=this.column.getField();t.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(t.style.display="inline-flex",t.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(t.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),e&&t.setAttribute("tabulator-field",e),this.column.definition.cssClass&&this.column.definition.cssClass.split(" ").forEach((e=>{t.classList.add(e)})),this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var t;switch(typeof(t=this.chain("cell-format",this,null,(()=>this.element.innerHTML=this.value)))){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=t}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(t){return this.loaded||(this.loaded=!0,t||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(t,e,i){this.setValueProcessData(t,e,i)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(t,e,i){var n=!1;return(this.value!==t||i)&&(n=!0,e&&(t=this.chain("cell-value-changing",[this,t],null,t))),this.setValueActual(t),n&&this.dispatch("cell-value-changed",this),n}setValueActual(t){this.oldValue=this.value,this.value=t,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,t),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new _j(this)),this.component}}class Sj{constructor(t){return this._column=t,this.type="ColumnComponent",new Proxy(this,{get:function(t,e,i){return void 0!==t[e]?t[e]:t._column.table.componentFunctionBinder.handle("column",t._column,e)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var t=[];return this._column.cells.forEach((function(e){t.push(e.getComponent())})),t}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach((function(t){t.show()})):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach((function(t){t.hide()})):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var t=[];return this._column.columns.length&&this._column.columns.forEach((function(e){t.push(e.getComponent())})),t}getParentColumn(){return this._column.parent instanceof Tj&&this._column.parent.getComponent()}_getSelf(){return this._column}scrollTo(t,e){return this._column.table.columnManager.scrollToColumn(this._column,t,e)}getTable(){return this._column.table}move(t,e){var i=this._column.table.columnManager.findColumn(t);i?this._column.table.columnManager.moveColumn(this._column,i,e):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var t=this._column.nextColumn();return!!t&&t.getComponent()}getPrevColumn(){var t=this._column.prevColumn();return!!t&&t.getComponent()}updateDefinition(t){return this._column.updateDefinition(t)}getWidth(){return this._column.getWidth()}setWidth(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.columnManager.rerenderColumns(!0),e}}var Mj={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class Tj extends hj{constructor(t,e){super(e.table),this.definition=t,this.parent=e,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach(((t,e)=>{var i=new Tj(t,this);this.attachColumn(i)})),this.checkColumnVisibility()):e.registerColumnField(this),this._initialize()}createElement(){var t=document.createElement("div");switch(t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),this.table.options.columnHeaderVertAlign){case"middle":t.style.justifyContent="center";break;case"bottom":t.style.justifyContent="flex-end"}return t}createGroupElement(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t}mapDefinitions(){var t=this.table.options.columnDefaults;if(t)for(let e in t)void 0===this.definition[e]&&(this.definition[e]=t[e]);this.definition=this.table.columnManager.optionsList.generate(Tj.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((t=>{-1===Tj.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",t)}))}setField(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(t){this.parent.registerColumnPosition(t)}registerColumnField(t){this.parent.registerColumnField(t)}reRegisterPosition(){this.isGroup?this.columns.forEach((function(t){t.reRegisterPosition()})):this.registerColumnPosition(this)}_initialize(){for(var t=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);t.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var t=this.definition;this.dispatch("column-layout",this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass&&t.cssClass.split(" ").forEach((t=>{this.element.classList.add(t)})),t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(parseInt(t.minWidth)),t.maxInitialWidth&&(this.maxInitialWidth=parseInt(t.maxInitialWidth)),t.maxWidth&&this.setMaxWidth(parseInt(t.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var t=document.createElement("div");return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t}_buildColumnHeaderTitle(){var t=this.definition,e=document.createElement("div");if(e.classList.add("tabulator-col-title"),t.headerWordWrap&&e.classList.add("tabulator-col-title-wrap"),t.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",(t=>{t.stopPropagation(),i.focus()})),i.addEventListener("change",(()=>{t.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())})),e.appendChild(i),t.field?this.langBind("columns|"+t.field,(e=>{i.value=e||t.title||" "})):i.value=t.title||" "}else t.field?this.langBind("columns|"+t.field,(i=>{this._formatColumnHeaderTitle(e,i||t.title||" ")})):this._formatColumnHeaderTitle(e,t.title||" ");return e}_formatColumnHeaderTitle(t,e){var i=this.chain("column-format",[this,e,t],null,(()=>e));switch(typeof i){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":t.innerHTML="";break;default:t.innerHTML=i}}_buildGroupHeader(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass&&this.definition.cssClass.split(" ").forEach((t=>{this.element.classList.add(t)})),this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(t){return t[this.field]}_getNestedData(t){var e,i=t,n=this.fieldStructure,o=n.length;for(let t=0;t<o&&(e=i=i[n[t]],i);t++);return e}_setFlatData(t,e){this.field&&(t[this.field]=e)}_setNestedData(t,e){var i=t,n=this.fieldStructure,o=n.length;for(let t=0;t<o;t++)if(t==o-1)i[n[t]]=e;else{if(!i[n[t]]){if(void 0===e)break;i[n[t]]={}}i=i[n[t]]}}attachColumn(t){this.groupElement?(this.columns.push(t),this.groupElement.appendChild(t.getElement()),t.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(t,e){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach((function(e){e.verticalAlign(t)}))}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach((function(t){t.clearVerticalAlign()})),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this}getLastColumn(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this}getColumns(t){var e=[];return t?this.columns.forEach((t=>{e.push(t),e=e.concat(t.getColumns(!0))})):e=this.columns,e}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(t){var e=[];return this.isGroup&&t&&(this.columns.forEach((function(t){e.push(t.getDefinition(!0))})),this.definition.columns=e),this.definition}checkColumnVisibility(){var t=!1;this.columns.forEach((function(e){e.visible&&(t=!0)})),t?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,e),t||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.hide()})),this.dispatch("column-hide",this,e),t||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})),this.contentElement.style.maxWidth=t-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(t){var e=this.columns.indexOf(t);e>-1&&this.columns.splice(e,1),this.columns.length||this.delete()}setWidth(t){this.widthFixed=!0,this.setWidthActual(t)}setWidthActual(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(t){t.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this)}checkCellHeights(){var t=[];this.cells.forEach((function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)})),t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()}))}getWidth(){var t=0;return this.isGroup?this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})):t=this.width,t}getLeftOffset(){var t=this.element.offsetLeft;return this.parent.isGroup&&(t+=this.parent.getLeftOffset()),t}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(t){this.maxWidth&&t>this.maxWidth&&(t=this.maxWidth,console.warn("the minWidth ("+t+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(t){t.setMinWidth()}))}setMaxWidth(t){this.minWidth&&t<this.minWidth&&(t=this.minWidth,console.warn("the maxWidth ("+t+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(t){t.setMaxWidth()}))}delete(){return new Promise(((t,e)=>{this.isGroup&&this.columns.forEach((function(t){t.delete()})),this.dispatch("column-delete",this);var i=this.cells.length;for(let t=0;t<i;t++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),t()}))}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(t){var e=new Cj(this,t);return this.cells.push(e),e}nextColumn(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._nextVisibleColumn(t+1)}_nextVisibleColumn(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)}prevColumn(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)}_prevVisibleColumn(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)}reinitializeWidth(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(t),this.dispatch("column-width-fit-after",this)}fitToData(t){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((t=>{t.clearWidth()})));var e=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((t=>{var i=t.getWidth();i>e&&(e=i)})),e)){var i=e+1;this.maxInitialWidth&&!t&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(t){var e;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(e=Object.assign({},this.getDefinition()),e=Object.assign(e,t),this.table.columnManager.addColumn(e,!1,this).then((t=>(e.field==this.field&&(this.field=!1),this.delete().then((()=>t.getComponent()))))))}deleteCell(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)}getComponent(){return this.component||(this.component=new Sj(this)),this.component}}Tj.defaultOptionList=Mj;class Ej{constructor(t){return this._row=t,new Proxy(this,{get:function(t,e,i){return void 0!==t[e]?t[e]:t._row.table.componentFunctionBinder.handle("row",t._row,e)}})}getData(t){return this._row.getData(t)}getElement(){return this._row.getElement()}getCells(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t}getCell(t){var e=this._row.getCell(t);return!!e&&e.getComponent()}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(t){return this._row.watchPosition(t)}delete(){return this._row.delete()}scrollTo(t,e){return this._row.table.rowManager.scrollToRow(this._row,t,e)}move(t,e){this._row.moveToRow(t,e)}update(t){return this._row.updateData(t)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var t=this._row.nextRow();return t?t.getComponent():t}getPrevRow(){var t=this._row.prevRow();return t?t.getComponent():t}}class Ij extends hj{constructor(t,e,i="row"){super(e.table),this.parent=e,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(t)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(t,e){if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,e),t&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,e)}rendered(){this.cells.forEach((t=>{t.cellRendered()}))}reinitializeHeight(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(t){var e,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(e=this.table.options.resizableRows?this.element.clientHeight:0,this.cells.forEach((function(t){var e=t.getHeight();e>i&&(i=e)})),this.height=t?Math.max(i,e):this.manualHeight?this.height:Math.max(i,e)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}setCellHeight(){this.cells.forEach((function(t){t.setHeight()})),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach((function(t){t.clearHeight()}))}normalizeHeight(t){t&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()}setHeight(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)}setData(t){this.data=this.chain("row-data-init-before",[this,t],void 0,t),this.dispatch("row-data-init-after",this)}updateData(t){var e,i=this.element&&uj.elVisible(this.element),n={};return new Promise(((o,r)=>{"string"==typeof t&&(t=JSON.parse(t)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(n=Object.assign(n,this.data),n=Object.assign(n,t)),e=this.chain("row-data-changing",[this,n,t],null,t);for(let t in e)this.data[t]=e[t];this.dispatch("row-data-save-after",this);for(let n in t)this.table.columnManager.getColumnsByFieldRoot(n).forEach((t=>{let n=this.getCell(t.getField());if(n){let o=t.getFieldValue(e);n.getValue()!==o&&(n.setValueProcessData(o),i&&n.cellRendered())}}));i?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,i,t),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),o()}))}getData(t){return t?this.chain("row-data-retrieve",[this,t],null,this.data):this.data}getCell(t){return t=this.table.columnManager.findColumn(t),this.initialized||0!==this.cells.length||this.generateCells(),this.cells.find((function(e){return e.column===t}))}getCellIndex(t){return this.cells.findIndex((function(e){return e===t}))}findCell(t){return this.cells.find((e=>e.element===t))}getCells(){return this.initialized||0!==this.cells.length||this.generateCells(),this.cells}nextRow(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}prevRow(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}moveToRow(t,e){var i=this.table.rowManager.findRow(t);i?(this.table.rowManager.moveRowActual(this,i,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(t){this.detachModules(),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var t=this.cells.length;for(let e=0;e<t;e++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return!!this.isDisplayed()&&this.position}setPosition(t){t!=this.position&&(this.position=t,this.positionWatchers.forEach((t=>{t(this.position)})))}watchPosition(t){this.positionWatchers.push(t),t(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Ej(this)),this.component}}var Dj={avg:function(t,e,i){var n=0,o=void 0!==i.precision?i.precision:2;return t.length&&(n=t.reduce((function(t,e){return Number(t)+Number(e)})),n/=t.length,n=!1!==o?n.toFixed(o):n),parseFloat(n).toString()},max:function(t,e,i){var n=null,o=void 0!==i.precision&&i.precision;return t.forEach((function(t){((t=Number(t))>n||null===n)&&(n=t)})),null!==n?!1!==o?n.toFixed(o):n:""},min:function(t,e,i){var n=null,o=void 0!==i.precision&&i.precision;return t.forEach((function(t){((t=Number(t))<n||null===n)&&(n=t)})),null!==n?!1!==o?n.toFixed(o):n:""},sum:function(t,e,i){var n=0,o=void 0!==i.precision&&i.precision;return t.length&&t.forEach((function(t){t=Number(t),n+=isNaN(t)?0:Number(t)})),!1!==o?n.toFixed(o):n},concat:function(t,e,i){var n=0;return t.length&&(n=t.reduce((function(t,e){return String(t)+String(e)}))),n},count:function(t,e,i){var n=0;return t.length&&t.forEach((function(t){t&&n++})),n},unique:function(t,e,i){return t.filter(((e,i)=>(t||0===e)&&t.indexOf(e)===i)).length}};class kj extends dj{constructor(t){super(t),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t}initialize(){this.genColumn=new Tj({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(t){this.recalc(this.table.rowManager.activeRows),t&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(t,e){return this.topRow&&e.unshift(this.topRow),this.botRow&&e.push(this.botRow),e}rowsUpdated(t){this.table.options.groupBy?this.recalcRowGroup(t):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(t){(t.column.definition.topCalc||t.column.definition.bottomCalc)&&(this.table.options.groupBy?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.recalcActiveRows(),"table"!=this.table.options.columnCalcs&&this.recalcRowGroup(t.row)):this.recalcActiveRows())}initializeColumnCheck(t){(t.definition.topCalc||t.definition.bottomCalc)&&this.initializeColumn(t)}initializeColumn(t){var e=t.definition,i={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(typeof e.topCalc){case"string":kj.calculations[e.topCalc]?i.topCalc=kj.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":i.topCalc=e.topCalc}i.topCalc&&(t.modules.columnCalcs=i,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(e.bottomCalc){switch(typeof e.bottomCalc){case"string":kj.calculations[e.bottomCalc]?i.botCalc=kj.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":i.botCalc=e.bottomCalc}i.botCalc&&(t.modules.columnCalcs=i,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){this.topInitialized||(this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(t){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=t)}recalc(t){var e,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(e=this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",e),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",e),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))}recalcAll(){(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalcActiveRows(),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&this.table.modules.groupRows.getChildGroups().forEach((t=>{this.recalcGroup(t)})))}recalcGroup(t){var e,i;this.blockCheck()||t&&t.calcs&&(t.calcs.bottom&&(e=this.rowsToData(t.rows),i=this.generateRowData("bottom",e),t.calcs.bottom.updateData(i),t.calcs.bottom.reinitialize()),t.calcs.top&&(e=this.rowsToData(t.rows),i=this.generateRowData("top",e),t.calcs.top.updateData(i),t.calcs.top.reinitialize()))}generateTopRow(t){return this.generateRow("top",this.rowsToData(t))}generateBottomRow(t){return this.generateRow("bottom",this.rowsToData(t))}rowsToData(t){var e=[];return t.forEach((t=>{if(e.push(t.getData()),this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree&&t.modules.dataTree.open){var i=this.rowsToData(this.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(i)}})),e}generateRow(t,e){var i,n=this.generateRowData(t,e);return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),i=new Ij(n,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),i.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),i.component=!1,i.getComponent=()=>(i.component||(i.component=new wj(i)),i.component),i.generateCells=()=>{var e=[];this.table.columnManager.columnsByIndex.forEach((n=>{this.genColumn.setField(n.getField()),this.genColumn.hozAlign=n.hozAlign,n.definition[t+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(n.definition[t+"CalcFormatter"]),params:n.definition[t+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=n.definition.cssClass;var o=new Cj(this.genColumn,i);o.getElement(),o.column=n,o.setWidth(),n.cells.push(o),e.push(o),n.visible||o.hide()})),i.cells=e},i}generateRowData(t,e){var i,n,o={},r="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return r.forEach((function(t){var r=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(e.forEach((function(e){r.push(t.getFieldValue(e))})),n=a+"Params",i="function"==typeof t.modules.columnCalcs[n]?t.modules.columnCalcs[n](r,e):t.modules.columnCalcs[n],t.setFieldValue(o,t.modules.columnCalcs[a](r,e,i)))})),o}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var t={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((e=>{t[e.getKey()]=this.getGroupResults(e)})):t={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},t}getGroupResults(t){var e=t._getSelf(),i=t.getSubGroups(),n={};return i.forEach((t=>{n[t.getKey()]=this.getGroupResults(t)})),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:n}}adjustForScrollbar(t){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=t+"px":this.botElement.style.paddingRight=t+"px")}}kj.moduleName="columnCalcs",kj.calculations=Dj;class Aj extends dj{constructor(t){super(t),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var t=null,e=this.table.options;switch(this.field=e.dataTreeChildField,this.indent=e.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),e.dataTreeBranchElement?!0===e.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof e.dataTreeBranchElement?((t=document.createElement("div")).innerHTML=e.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=e.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),e.dataTreeCollapseElement?"string"==typeof e.dataTreeCollapseElement?((t=document.createElement("div")).innerHTML=e.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=e.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),e.dataTreeExpandElement?"string"==typeof e.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=e.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=e.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof e.dataTreeStartExpanded){case"boolean":this.startOpen=function(t,i){return e.dataTreeStartExpanded};break;case"function":this.startOpen=e.dataTreeStartExpanded;break;default:this.startOpen=function(t,i){return e.dataTreeStartExpanded[i]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(t){t&&this.table.rowManager.getRows().forEach((t=>{this.reinitializeRowChildren(t)}))}initializeElementField(){var t=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!t&&t.field}getRowChildren(t){return this.getTreeChildren(t,!0)}columnMoving(){var t=[];return this.table.rowManager.rows.forEach((e=>{t=t.concat(this.getTreeChildren(e,!1,!0))})),t}rowDataChanged(t,e,i){this.redrawNeeded(i)&&(this.initializeRow(t),e&&(this.layoutRow(t),this.refreshData(!0)))}cellValueChanged(t){t.column.getField()===this.elementField&&this.layoutRow(t.row)}initializeRow(t){var e=t.getData()[this.field],i=Array.isArray(e),n=i||!i&&"object"==typeof e&&null!==e;!n&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!n&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!n&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!n)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!n)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:n}}reinitializeRowChildren(t){this.getTreeChildren(t,!1,!0).forEach((function(t){t.reinitialize(!0)}))}layoutRow(t){var e=(this.elementField?t.getCell(this.elementField):t.getCells()[0]).getElement(),i=t.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(t,e),t.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),e.insertBefore(i.branchEl,e.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")}generateControlElement(t,e){var i=t.modules.dataTree,n=i.controlEl;e=e||t.getCells()[0].getElement(),!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(e=>{e.stopPropagation(),this.collapseRow(t)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(e=>{e.stopPropagation(),this.expandRow(t)}))),i.controlEl.addEventListener("mousedown",(t=>{t.stopPropagation()})),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))}getRows(t){var e=[];return t.forEach(((t,i)=>{var n;e.push(t),t instanceof Ij&&(t.create(),(n=t.modules.dataTree).index||!1===n.children||this.getChildren(t).forEach((t=>{t.create(),e.push(t)})))})),e}getChildren(t,e){var i=t.modules.dataTree,n=[],o=[];return!1!==i.children&&(i.open||e)&&(Array.isArray(i.children)||(i.children=this.generateChildren(t)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach((t=>{o.push(t),this.getChildren(t).forEach((t=>{o.push(t)}))}))),o}generateChildren(t){var e=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((i=>{var n=new Ij(i||{},this.table.rowManager);n.create(),n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.children&&(n.modules.dataTree.open=this.startOpen(n.getComponent(),n.modules.dataTree.index)),e.push(n)})),e}expandRow(t,e){var i=t.modules.dataTree;!1!==i.children&&(i.open=!0,t.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",t.getComponent(),t.modules.dataTree.index))}collapseRow(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",t.getComponent(),t.modules.dataTree.index))}toggleRow(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))}isRowExpanded(t){return t.modules.dataTree.open}getTreeParent(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()}getTreeParentRoot(t){return t.modules.dataTree&&t.modules.dataTree.parent?this.getTreeParentRoot(t.modules.dataTree.parent):t}getFilteredTreeChildren(t){var e=t.modules.dataTree,i=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(e.children):e.children).forEach((t=>{t instanceof Ij&&i.push(t)}))),i}rowDelete(t){var e,i=t.modules.dataTree.parent;i&&(!1!==(e=this.findChildIndex(t,i))&&i.data[this.field].splice(e,1),i.data[this.field].length||delete i.data[this.field],this.initializeRow(i),this.layoutRow(i)),this.refreshData(!0)}addTreeChildRow(t,e,i,n){var o=!1;"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(t.data[this.field])||(t.data[this.field]=[],t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)),void 0!==n&&!1!==(o=this.findChildIndex(n,t))&&t.data[this.field].splice(i?o:o+1,0,e),!1===o&&(i?t.data[this.field].unshift(e):t.data[this.field].push(e)),this.initializeRow(t),this.layoutRow(t),this.refreshData(!0)}findChildIndex(t,e){var i=!1;return"object"==typeof t?t instanceof Ij?i=t.data:t instanceof Ej?i=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?e.modules.dataTree&&(i=e.modules.dataTree.children.find((e=>e instanceof Ij&&e.element===t)))&&(i=i.data):null===t&&(i=!1):i=void 0!==t&&e.data[this.field].find((e=>e.data[this.table.options.index]==t)),i&&(Array.isArray(e.data[this.field])&&(i=e.data[this.field].indexOf(i)),-1==i&&(i=!1)),i}getTreeChildren(t,e,i){var n=t.modules.dataTree,o=[];return n&&n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(t)),n.children.forEach((t=>{t instanceof Ij&&(o.push(e?t.getComponent():t),i&&(o=o.concat(this.getTreeChildren(t,e,i))))}))),o}getChildField(){return this.field}redrawNeeded(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]}}Aj.moduleName="dataTree";var Lj={csv:function(t,e={},i){var n=e.delimiter?e.delimiter:",",o=[],r=[];t.forEach((t=>{var e=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach(((t,e)=>{t&&1===t.depth&&(r[e]=void 0===t.value||null===t.value?"":'"'+String(t.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((t=>{if(t){switch(typeof t.value){case"object":t.value=null!==t.value?JSON.stringify(t.value):"";break;case"undefined":t.value=""}e.push('"'+String(t.value).split('"').join('""')+'"')}})),o.push(e.join(n))}})),r.length&&o.unshift(r.join(n)),o=o.join("\n"),e.bom&&(o="\ufeff"+o),i(o,"text/csv")},json:function(t,e,i){var n=[];t.forEach((t=>{var e={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((t=>{t&&(e[t.component.getTitleDownload()||t.component.getField()]=t.value)})),n.push(e)}})),i(n=JSON.stringify(n,null,"\t"),"application/json")},jsonLines:function(t,e,i){const n=[];t.forEach((t=>{const e={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((t=>{t&&(e[t.component.getTitleDownload()||t.component.getField()]=t.value)})),n.push(JSON.stringify(e))}})),i(n.join("\n"),"application/x-ndjson")},pdf:function(t,e={},i){var n=[],o=[],r={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},s=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},h=e.title?e.title:"";function u(t,e){var i=[];return t.columns.forEach((t=>{var n;if(t){switch(typeof t.value){case"object":t.value=null!==t.value?JSON.stringify(t.value):"";break;case"undefined":t.value=""}n={content:t.value,colSpan:t.width,rowSpan:t.height},e&&(n.styles=e),i.push(n)}})),i}l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),t.forEach((t=>{switch(t.type){case"header":n.push(u(t));break;case"group":o.push(u(t,a));break;case"calc":o.push(u(t,s));break;case"row":o.push(u(t))}}));var c=new jspdf.jsPDF(l);e.autoTable&&(r="function"==typeof e.autoTable?e.autoTable(c)||{}:e.autoTable),h&&(r.didDrawPage=function(t){c.text(h,40,30)}),r.head=n,r.body=o,c.autoTable(r),e.documentProcessing&&e.documentProcessing(c),i(c.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,i){var n=e.sheetName||"Sheet1",o=XLSX.utils.book_new(),r=new hj(this),a=!("compress"in e)||e.compress,s=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:a};function l(){var e=[],i=[],n={},o={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce(((t,e)=>t+(e&&e.width?e.width:1)),0):0,r:t.length}};return t.forEach(((t,n)=>{var o=[];t.columns.forEach((function(t,e){t?(o.push(t.value instanceof Date||"object"!=typeof t.value?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&(t.height>1||t.width>1)&&i.push({s:{r:n,c:e},e:{r:n+t.height-1,c:e+t.width-1}})):o.push("")})),e.push(o)})),XLSX.utils.sheet_add_aoa(n,e),n["!ref"]=XLSX.utils.encode_range(o),i.length&&(n["!merges"]=i),n}if(s.type="binary",o.SheetNames=[],o.Sheets={},e.sheetOnly)i(l());else{if(e.sheets)for(var h in e.sheets)!0===e.sheets[h]?(o.SheetNames.push(h),o.Sheets[h]=l()):(o.SheetNames.push(h),r.commsSend(e.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(t){o.Sheets[h]=t}}));else o.SheetNames.push(n),o.Sheets[n]=l();e.documentProcessing&&(o=e.documentProcessing(o)),i(function(t){for(var e=new ArrayBuffer(t.length),i=new Uint8Array(e),n=0;n!=t.length;++n)i[n]=255&t.charCodeAt(n);return e}(XLSX.write(o,s)),"application/octet-stream")}},html:function(t,e,i){this.modExists("export",!0)&&i(this.modules.export.generateHTMLTable(t),"text/html")}};class Rj extends dj{constructor(t){super(t),this.registerTableOption("downloadEncoder",(function(t,e){return new Blob([t],{type:e})})),this.registerTableOption("downloadReady",void 0),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("downloadReady","downloadEncoder")}downloadToTab(t,e,i,n){this.download(t,e,i,n,!0)}download(t,e,i,n,o){var r=!1;if("function"==typeof t?r=t:Rj.downloaders[t]?r=Rj.downloaders[t]:console.warn("Download Error - No such download type found: ",t),r){var a=this.generateExportList(n);r.call(this.table,a,i||{},function(i,n){o?!0===o?this.triggerDownload(i,n,t,e,!0):o(i):this.triggerDownload(i,n,t,e)}.bind(this))}}generateExportList(t){var e=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,t||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),e.forEach((t=>{var e;"group"===t.type&&(e=t.columns[0],i&&i[t.indent]&&(e.value=i[t.indent](e.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)))})),e}triggerDownload(t,e,i,n,o){var r=document.createElement("a"),a=this.table.options.downloadEncoder(t,e);a&&(o?window.open(window.URL.createObjectURL(a)):(n=n||"Tabulator."+("function"==typeof i?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,n):(r.setAttribute("href",window.URL.createObjectURL(a)),r.setAttribute("download",n),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r))),this.dispatchExternal("downloadComplete"))}commsReceived(t,e,i){"intercept"===e&&this.download(i.type,"",i.options,i.active,i.intercept)}}function Pj(t,e){var i=e.mask,n=void 0!==e.maskLetterChar?e.maskLetterChar:"A",o=void 0!==e.maskNumberChar?e.maskNumberChar:"9",r=void 0!==e.maskWildcardChar?e.maskWildcardChar:"*";function a(e){var s=i[e];void 0!==s&&s!==r&&s!==n&&s!==o&&(t.value=t.value+""+s,a(e+1))}t.addEventListener("keydown",(e=>{var a=t.value.length,s=e.key;if(e.keyCode>46&&!e.ctrlKey&&!e.metaKey){if(a>=i.length)return e.preventDefault(),e.stopPropagation(),!1;switch(i[a]){case n:if(s.toUpperCase()==s.toLowerCase())return e.preventDefault(),e.stopPropagation(),!1;break;case o:if(isNaN(s))return e.preventDefault(),e.stopPropagation(),!1;break;case r:break;default:if(s!==i[a])return e.preventDefault(),e.stopPropagation(),!1}}})),t.addEventListener("keyup",(i=>{i.keyCode>46&&e.maskAutoFill&&a(t.value.length)})),t.placeholder||(t.placeholder=i),e.maskAutoFill&&a(t.value.length)}Rj.moduleName="download",Rj.downloaders=Lj;class Oj{constructor(t,e,i,n,o,r){this.edit=t,this.table=t.table,this.cell=e,this.params=this._initializeParams(r),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter="header"===e.getType(),this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:n,cancel:o},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){this.params.listItemFormatter&&this.cell.getTable().deprecationAdvisor.msg("The listItemFormatter editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.sortValuesList&&this.cell.getTable().deprecationAdvisor.msg("The sortValuesList editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchFunc&&this.cell.getTable().deprecationAdvisor.msg("The searchFunc editor param has been deprecated, please see the latest editor documentation for updated options"),this.params.searchingPlaceholder&&this.cell.getTable().deprecationAdvisor.msg("The searchingPlaceholder editor param has been deprecated, please see the latest editor documentation for updated options")}_initializeValue(){var t=this.cell.getValue();void 0===t&&void 0!==this.params.defaultValue&&(t=this.params.defaultValue),this.initialValues=this.params.multiselect?t:[t],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var t=this.cell.getElement();function e(t){t.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),t.addEventListener("click",e),setTimeout((()=>{t.removeEventListener("click",e)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var t=document.createElement("div");return t.classList.add("tabulator-edit-list"),t.addEventListener("mousedown",this._preventBlur.bind(this)),t.addEventListener("keydown",this._inputKeyDown.bind(this)),t}_setListWidth(){var t=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=t.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=t.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var t=this.params.elementAttributes,e=document.createElement("input");if(e.setAttribute("type",this.params.clearable?"search":"text"),e.style.padding="4px",e.style.width="100%",e.style.boxSizing="border-box",this.params.autocomplete||(e.style.cursor="default",e.style.caretColor="transparent"),t&&"object"==typeof t)for(let i in t)"+"==i.charAt(0)?(i=i.slice(1),e.setAttribute(i,e.getAttribute(i)+t["+"+i])):e.setAttribute(i,t[i]);return this.params.mask&&Pj(e,this.params),this._bindInputEvents(e),e}_initializeParams(t){var e,i=["values","valuesURL","valuesLookup"];return(t=Object.assign({},t)).verticalNavigation=t.verticalNavigation||"editor",t.placeholderLoading=void 0===t.placeholderLoading?"Searching ...":t.placeholderLoading,t.placeholderEmpty=void 0===t.placeholderEmpty?"No Results Found":t.placeholderEmpty,t.filterDelay=void 0===t.filterDelay?300:t.filterDelay,t.emptyValue=Object.keys(t).includes("emptyValue")?t.emptyValue:"",(e=Object.keys(t).filter((t=>i.includes(t))).length)?e>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),t.autocomplete?t.multiselect&&(t.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(t.freetext&&(t.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),t.filterFunc&&(t.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),t.filterRemote&&(t.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),t.mask&&(t.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),t.allowEmpty&&(t.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),t.listOnEmpty&&(t.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),t.filterRemote&&"function"!=typeof t.valuesLookup&&!t.valuesURL&&(t.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),t}_bindInputEvents(t){t.addEventListener("focus",this._inputFocus.bind(this)),t.addEventListener("click",this._inputClick.bind(this)),t.addEventListener("blur",this._inputBlur.bind(this)),t.addEventListener("keydown",this._inputKeyDown.bind(this)),t.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&t.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(t){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(t){t.stopPropagation()}_inputBlur(t){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(t){switch(t.keyCode){case 38:this._keyUp(t);break;case 40:this._keyDown(t);break;case 37:case 39:this._keySide(t);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(t);break;case 9:this._keyTab(t);break;default:this._keySelectLetter(t)}}_inputKeyUp(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(t)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyTab(t){this.params.autocomplete&&"typing"===this.lastAction?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(t){var e=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e>0&&this._focusItem(this.displayItems[e-1]))}_keyDown(t){var e=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&e<this.displayItems.length-1)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e<this.displayItems.length-1&&(-1==e?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[e+1])))}_keySide(t){this.params.autocomplete||(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}_keyEnter(t){this.params.autocomplete&&"typing"===this.lastAction?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(t){this._cancel()}_keyHomeEnd(t){this.params.autocomplete&&t.stopImmediatePropagation()}_keySelectLetter(t){this.params.autocomplete||(t.preventDefault(),t.keyCode>=38&&t.keyCode<=90&&this._scrollToValue(t.keyCode))}_keyAutoCompLetter(t){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(t){clearTimeout(this.filterTimeout);var e=String.fromCharCode(t).toLowerCase();this.filterTerm+=e.toLowerCase();var i=this.displayItems.find((t=>void 0!==t.label&&t.label.toLowerCase().startsWith(this.filterTerm)));i&&this._focusItem(i),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(t){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=t,t&&t.element&&(t.element.classList.add("focused"),t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((t=>{Number.isInteger(t)||console.error("List generation error",t)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(t){var e=[],i=++this.listIteration;return this.filtered=!1,this.params.values?e=this.params.values:this.params.valuesURL?e=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?e=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(e=this._uniqueColumnValues(this.params.valuesLookupField)),e instanceof Promise?(t||this._addPlaceholder(this.params.placeholderLoading),e.then().then((t=>this.listIteration===i?this._parseList(t):Promise.reject(i)))):Promise.resolve(this._parseList(e))}_addPlaceholder(t){var e=document.createElement("div");"function"==typeof t&&(t=t(this.cell.getComponent(),this.listEl)),t&&(this._clearList(),t instanceof HTMLElement?e=t:(e.classList.add("tabulator-edit-list-placeholder"),e.innerHTML=t),this.listEl.appendChild(e),this._showList())}_ajaxRequest(t,e){return t=mj(t,{},this.params.filterRemote?{term:e}:{}),fetch(t).then((t=>t.ok?t.json().catch((t=>(console.warn("List Ajax Load Error - Invalid JSON returned",t),Promise.reject(t)))):(console.error("List Ajax Load Error - Connection Error: "+t.status,t.statusText),Promise.reject(t)))).catch((t=>(console.error("List Ajax Load Error - Connection Error: ",t),Promise.reject(t))))}_uniqueColumnValues(t){var e,i={},n=this.table.getData(this.params.valuesLookup);return(e=t?this.table.columnManager.getColumnByField(t):this.cell.getColumn()._getSelf())?n.forEach((t=>{var n=e.getFieldValue(t);null!=n&&""!==n&&(i[n]=!0)})):(console.warn("unable to find matching column to create select lookup list:",t),i=[]),Object.keys(i)}_parseList(t){var e=[];return Array.isArray(t)||(t=Object.entries(t).map((([t,e])=>({label:e,value:t})))),t.forEach((t=>{"object"!=typeof t&&(t={label:t,value:t}),this._parseListItem(t,e,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=e,e}_parseListItem(t,e,i){var n={};t.options?n=this._parseListGroup(t,i+1):(n={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:t},this.initialValues&&this.initialValues.indexOf(t.value)>-1&&this._chooseItem(n,!0)),e.push(n)}_parseListGroup(t,e){var i={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1,visible:!0,level:e,options:[],original:t};return t.options.forEach((t=>{this._parseListItem(t,i.options,e)})),i}_sortOptions(t){var e;return this.params.sort&&(e="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(e,t)),t}_sortGroup(t,e){e.sort(((e,i)=>t(e.label,i.label,e.value,i.value,e.original,i.original))),e.forEach((e=>{e.group&&this._sortGroup(t,e.options)}))}_defaultSortFunction(t,e){var i,n,o,r,a,s=0,l=/(\d+)|(\D+)/g,h=/\d/,u=0;if("desc"===this.params.sort&&([t,e]=[e,t]),t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((i=String(t).toLowerCase())===(n=String(e).toLowerCase()))return 0;if(!h.test(i)||!h.test(n))return i>n?1:-1;for(i=i.match(l),n=n.match(l),a=i.length>n.length?n.length:i.length;s<a;)if((o=i[s])!==(r=n[s++]))return isFinite(o)&&isFinite(r)?("0"===o.charAt(0)&&(o="."+o),"0"===r.charAt(0)&&(r="."+r),o-r):o>r?1:-1;return i.length>n.length}u=1}else u=e||0===e?-1:0;return u}_filterOptions(){var t=this.params.filterFunc||this._defaultFilterFunc,e=this.input.value;return e?(this.filtered=!0,this.data.forEach((i=>{this._filterItem(t,e,i)}))):this.filtered=!1,this.data}_filterItem(t,e,i){var n=!1;return i.group?(i.options.forEach((i=>{this._filterItem(t,e,i)&&(n=!0)})),i.visible=n):i.visible=t(e,i.label,i.value,i.original),i.visible}_defaultFilterFunc(t,e,i,n){return t=String(t).toLowerCase(),null!=e&&(String(e).toLowerCase().indexOf(t)>-1||String(i).toLowerCase().indexOf(t)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(t){this._clearList(),t.forEach((t=>{this._buildItem(t)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(t){var e,i=t.element;if(!this.filtered||t.visible){if(!i){if((i=document.createElement("div")).tabIndex=0,(e=this.params.itemFormatter?this.params.itemFormatter(t.label,t.value,t.original,i):t.label)instanceof HTMLElement?i.appendChild(e):i.innerHTML=e,t.group?i.classList.add("tabulator-edit-list-group"):i.classList.add("tabulator-edit-list-item"),i.classList.add("tabulator-edit-list-group-level-"+t.level),t.elementAttributes&&"object"==typeof t.elementAttributes)for(let e in t.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),i.setAttribute(e,this.input.getAttribute(e)+t.elementAttributes["+"+e])):i.setAttribute(e,t.elementAttributes[e]);t.group?i.addEventListener("click",this._groupClick.bind(this,t)):i.addEventListener("click",this._itemClick.bind(this,t)),i.addEventListener("mousedown",this._preventBlur.bind(this)),t.element=i}this._styleItem(t),this.listEl.appendChild(i),t.group?t.options.forEach((t=>{this._buildItem(t)})):this.displayItems.push(t)}}_showList(){var t=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),t||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(t){t&&t.element&&(t.selected?t.element.classList.add("active"):t.element.classList.remove("active"))}_itemClick(t,e){e.stopPropagation(),this._chooseItem(t)}_groupClick(t,e){e.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((t=>{t.selected=!1,this._styleItem(t)})),this.currentItems=[],this.focusedItem=null}_chooseItem(t,e){var i;this.typing=!1,this.params.multiselect?((i=this.currentItems.indexOf(t))>-1?(this.currentItems.splice(i,1),t.selected=!1):(this.currentItems.push(t),t.selected=!0),this.input.value=this.currentItems.map((t=>t.label)).join(","),this._styleItem(t)):(this.currentItems=[t],t.selected=!0,this.input.value=t.label,this._styleItem(t),e||this._resolveValue()),this._focusItem(t)}_resolveValue(t){var e,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)e=this.currentItems.map((t=>t.value));else if(t&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();e=this.input.value}else e=this.currentItems[0]?this.currentItems[0].value:null==(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues)||""===i?i:this.params.emptyValue;""===e&&(e=this.params.emptyValue),this.actions.success(e),this.isFilter&&(this.initialValues=e&&!Array.isArray(e)?[e]:e,this.currentItems=[])}}var zj={input:function(t,e,i,n,o){var r=t.getValue(),a=document.createElement("input");if(a.setAttribute("type",o.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),a.setAttribute(t,a.getAttribute(t)+o.elementAttributes["+"+t])):a.setAttribute(t,o.elementAttributes[t]);function s(t){null==r&&""!==a.value||a.value!==r?i(a.value)&&(r=a.value):n()}return a.value=void 0!==r?r:"",e((function(){"cell"===t.getType()&&(a.focus({preventScroll:!0}),a.style.height="100%",o.selectContents&&a.select())})),a.addEventListener("change",s),a.addEventListener("blur",s),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:s();break;case 27:n();break;case 35:case 36:t.stopPropagation()}})),o.mask&&Pj(a,o),a},textarea:function(t,e,i,n,o){var r=t.getValue(),a=o.verticalNavigation||"hybrid",s=String(null!=r?r:""),l=document.createElement("textarea"),h=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),l.setAttribute(t,l.getAttribute(t)+o.elementAttributes["+"+t])):l.setAttribute(t,o.elementAttributes[t]);function u(e){null==r&&""!==l.value||l.value!==r?(i(l.value)&&(r=l.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):n()}return l.value=s,e((function(){"cell"===t.getType()&&(l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",t.getRow().normalizeHeight(),o.selectContents&&l.select())})),l.addEventListener("change",u),l.addEventListener("blur",u),l.addEventListener("keyup",(function(){l.style.height="";var e=l.scrollHeight;l.style.height=e+"px",e!=h&&(h=e,t.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:t.shiftKey&&o.shiftEnterSubmit&&u();break;case 27:n();break;case 38:("editor"==a||"hybrid"==a&&l.selectionStart)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 40:("editor"==a||"hybrid"==a&&l.selectionStart!==l.value.length)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),o.mask&&Pj(l,o),l},number:function(t,e,i,n,o){var r=t.getValue(),a=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),s.setAttribute(t,s.getAttribute(t)+o.elementAttributes["+"+t])):s.setAttribute(t,o.elementAttributes[t]);s.value=r;var l=function(t){h()};function h(){var t=s.value;isNaN(t)||""===t||(t=Number(t)),t!==r?i(t)&&(r=t):n()}return e((function(){"cell"===t.getType()&&(s.removeEventListener("blur",l),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",l),o.selectContents&&s.select())})),s.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:h();break;case 27:n();break;case 38:case 40:"editor"==a&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),o.mask&&Pj(s,o),s},range:function(t,e,i,n,o){var r=t.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),void 0!==o.max&&a.setAttribute("max",o.max),void 0!==o.min&&a.setAttribute("min",o.min),void 0!==o.step&&a.setAttribute("step",o.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),a.setAttribute(t,a.getAttribute(t)+o.elementAttributes["+"+t])):a.setAttribute(t,o.elementAttributes[t]);function s(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=r?i(t)&&(r=t):n()}return a.value=r,e((function(){"cell"===t.getType()&&(a.focus({preventScroll:!0}),a.style.height="100%")})),a.addEventListener("blur",(function(t){s()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:s();break;case 27:n()}})),a},date:function(t,e,i,n,o){var r=o.format,a=o.verticalNavigation||"editor",s=r?window.DateTime||luxon.DateTime:null,l=t.getValue(),h=document.createElement("input");function u(t){return(s.isDateTime(t)?t:"iso"===r?s.fromISO(String(t)):s.fromFormat(String(t),r)).toFormat("yyyy-MM-dd")}if(h.type="date",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",o.max&&h.setAttribute("max",r?u(o.max):o.max),o.min&&h.setAttribute("min",r?u(o.min):o.min),o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),h.setAttribute(t,h.getAttribute(t)+o.elementAttributes["+"+t])):h.setAttribute(t,o.elementAttributes[t]);function c(){var t,e=h.value;if(null==l&&""!==e||e!==l){if(e&&r)switch(t=s.fromFormat(String(e),"yyyy-MM-dd"),r){case!0:e=t;break;case"iso":e=t.toISO();break;default:e=t.toFormat(r)}i(e)&&(l=h.value)}else n()}return l=void 0!==l?l:"",r&&(s?l=u(l):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=l,e((function(){"cell"===t.getType()&&(h.focus({preventScroll:!0}),h.style.height="100%",o.selectContents&&h.select())})),h.addEventListener("blur",(function(t){(t.relatedTarget||t.rangeParent||t.explicitOriginalTarget!==h)&&c()})),h.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:n();break;case 35:case 36:t.stopPropagation();break;case 38:case 40:"editor"==a&&(t.stopImmediatePropagation(),t.stopPropagation())}})),h},time:function(t,e,i,n,o){var r,a=o.format,s=o.verticalNavigation||"editor",l=a?window.DateTime||luxon.DateTime:null,h=t.getValue(),u=document.createElement("input");if(u.type="time",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),u.setAttribute(t,u.getAttribute(t)+o.elementAttributes["+"+t])):u.setAttribute(t,o.elementAttributes[t]);function c(){var t,e=u.value;if(null==h&&""!==e||e!==h){if(e&&a)switch(t=l.fromFormat(String(e),"hh:mm"),a){case!0:e=t;break;case"iso":e=t.toISO();break;default:e=t.toFormat(a)}i(e)&&(h=u.value)}else n()}return h=void 0!==h?h:"",a&&(l?(r=l.isDateTime(h)?h:"iso"===a?l.fromISO(String(h)):l.fromFormat(String(h),a),h=r.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=h,e((function(){"cell"==t.getType()&&(u.focus({preventScroll:!0}),u.style.height="100%",o.selectContents&&u.select())})),u.addEventListener("blur",(function(t){(t.relatedTarget||t.rangeParent||t.explicitOriginalTarget!==u)&&c()})),u.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:n();break;case 35:case 36:t.stopPropagation();break;case 38:case 40:"editor"==s&&(t.stopImmediatePropagation(),t.stopPropagation())}})),u},datetime:function(t,e,i,n,o){var r,a=o.format,s=o.verticalNavigation||"editor",l=a?window.DateTime||luxon.DateTime:null,h=t.getValue(),u=document.createElement("input");if(u.type="datetime-local",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),u.setAttribute(t,u.getAttribute(t)+o.elementAttributes["+"+t])):u.setAttribute(t,o.elementAttributes[t]);function c(){var t,e=u.value;if(null==h&&""!==e||e!==h){if(e&&a)switch(t=l.fromISO(String(e)),a){case!0:e=t;break;case"iso":e=t.toISO();break;default:e=t.toFormat(a)}i(e)&&(h=u.value)}else n()}return h=void 0!==h?h:"",a&&(l?(r=l.isDateTime(h)?h:"iso"===a?l.fromISO(String(h)):l.fromFormat(String(h),a),h=r.toFormat("yyyy-MM-dd")+"T"+r.toFormat("hh:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=h,e((function(){"cell"===t.getType()&&(u.focus({preventScroll:!0}),u.style.height="100%",o.selectContents&&u.select())})),u.addEventListener("blur",(function(t){(t.relatedTarget||t.rangeParent||t.explicitOriginalTarget!==u)&&c()})),u.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:n();break;case 35:case 36:t.stopPropagation();break;case 38:case 40:"editor"==s&&(t.stopImmediatePropagation(),t.stopPropagation())}})),u},select:function(t,e,i,n,o){return this.deprecationMsg("The select editor has been deprecated, please use the new list editor"),new Oj(this,t,e,i,n,o).input},list:function(t,e,i,n,o){return new Oj(this,t,e,i,n,o).input},autocomplete:function(t,e,i,n,o){return this.deprecationMsg("The autocomplete editor has been deprecated, please use the new list editor with the 'autocomplete' editorParam"),o.autocomplete=!0,new Oj(this,t,e,i,n,o).input},star:function(t,e,i,n,o){var r=this,a=t.getElement(),s=t.getValue(),l=a.getElementsByTagName("svg").length||5,h=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,u=[],c=document.createElement("div"),d=document.createElementNS("http://www.w3.org/2000/svg","svg");function p(t){u.forEach((function(e,i){i<t?("ie"==r.table.browser?e.setAttribute("class","tabulator-star-active"):e.classList.replace("tabulator-star-inactive","tabulator-star-active"),e.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==r.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')}))}function f(t){var e=document.createElement("span"),n=d.cloneNode(!0);u.push(n),e.addEventListener("mouseenter",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),p(t)})),e.addEventListener("mousemove",(function(t){t.stopPropagation(),t.stopImmediatePropagation()})),e.addEventListener("click",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),i(t),a.blur()})),e.appendChild(n),c.appendChild(e)}function g(t){s=t,p(t)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",c.style.verticalAlign="middle",c.style.display="inline-block",c.style.padding="4px",d.setAttribute("width",h),d.setAttribute("height",h),d.setAttribute("viewBox","0 0 512 512"),d.setAttribute("xml:space","preserve"),d.style.padding="0 1px",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),c.setAttribute(t,c.getAttribute(t)+o.elementAttributes["+"+t])):c.setAttribute(t,o.elementAttributes[t]);for(var m=1;m<=l;m++)f(m);return p(s=Math.min(parseInt(s),l)),c.addEventListener("mousemove",(function(t){p(0)})),c.addEventListener("click",(function(t){i(0)})),a.addEventListener("blur",(function(t){n()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:g(s+1);break;case 37:g(s-1);break;case 13:i(s);break;case 27:n()}})),c},progress:function(t,e,i,n,o){var r,a,s=t.getElement(),l=void 0===o.max?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,h=void 0===o.min?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,u=(l-h)/100,c=t.getValue()||0,d=document.createElement("div"),p=document.createElement("div");function f(){var t=window.getComputedStyle(s,null),e=u*Math.round(p.offsetWidth/((s.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+h;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",c)}if(d.style.position="absolute",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.width="5px",d.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),p.setAttribute(t,p.getAttribute(t)+o.elementAttributes["+"+t])):p.setAttribute(t,o.elementAttributes[t]);return s.style.padding="4px 4px",c=Math.min(parseFloat(c),l),c=Math.max(parseFloat(c),h),c=Math.round((c-h)/u),p.style.width=c+"%",s.setAttribute("aria-valuemin",h),s.setAttribute("aria-valuemax",l),p.appendChild(d),d.addEventListener("mousedown",(function(t){r=t.screenX,a=p.offsetWidth})),d.addEventListener("mouseover",(function(){d.style.cursor="ew-resize"})),s.addEventListener("mousemove",(function(t){r&&(p.style.width=a+t.screenX-r+"px")})),s.addEventListener("mouseup",(function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,f())})),s.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:t.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:f();break;case 27:n()}})),s.addEventListener("blur",(function(){n()})),p},tickCross:function(t,e,i,n,o){var r=t.getValue(),a=document.createElement("input"),s=o.tristate,l=void 0===o.indeterminateValue?null:o.indeterminateValue,h=!1,u=Object.keys(o).includes("trueValue"),c=Object.keys(o).includes("falseValue");if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",o.elementAttributes&&"object"==typeof o.elementAttributes)for(let t in o.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),a.setAttribute(t,a.getAttribute(t)+o.elementAttributes["+"+t])):a.setAttribute(t,o.elementAttributes[t]);function d(t){var e=a.checked;return u&&e?e=o.trueValue:c&&!e&&(e=o.falseValue),s?t?h?l:e:a.checked&&!h?(a.checked=!1,a.indeterminate=!0,h=!0,l):(h=!1,e):e}return a.value=r,!s||void 0!==r&&r!==l&&""!==r||(h=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&"safari"!=this.table.browser&&e((function(){"cell"===t.getType()&&a.focus({preventScroll:!0})})),a.checked=u?r===o.trueValue:!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",(function(t){i(d())})),a.addEventListener("blur",(function(t){i(d(!0))})),a.addEventListener("keydown",(function(t){13==t.keyCode&&i(d()),27==t.keyCode&&n()})),a}};class Nj extends dj{constructor(t){super(t),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.editors=Nj.editors,this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-left",this.navigateLeft.bind(this,void 0)),this.subscribe("keybinding-nav-right",this.navigateRight.bind(this,void 0)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0))}keybindingNavigateNext(t){var e=this.currentCell,i=this.options("tabEndNewRow");e&&(this.navigateNext(e,t)||i&&(e.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(e.row.getComponent())):this.table.addRow(Object.assign({},i))).then((()=>{setTimeout((()=>{e.getComponent().navigateNext()}))}))))}cellIsEdited(t){return!!t.modules.edit&&t.modules.edit.edited}cellCancelEdit(t){t===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(t){this.allowEdit(t)?t.getElement().classList.add("tabulator-editable"):t.getElement().classList.remove("tabulator-editable")}clearCellEdited(t){t||(t=this.table.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach((t=>{this.table.modules.edit.clearEdited(t._getSelf())}))}navigatePrev(t=this.currentCell,e){var i,n;if(t){if(e&&e.preventDefault(),i=this.navigateLeft())return!0;if((n=this.table.rowManager.prevDisplayRow(t.row,!0))&&(i=this.findPrevEditableCell(n,n.cells.length)))return i.getComponent().edit(),!0}return!1}navigateNext(t=this.currentCell,e){var i,n;if(t){if(e&&e.preventDefault(),i=this.navigateRight())return!0;if((n=this.table.rowManager.nextDisplayRow(t.row,!0))&&(i=this.findNextEditableCell(n,-1)))return i.getComponent().edit(),!0}return!1}navigateLeft(t=this.currentCell,e){var i,n;return!!(t&&(e&&e.preventDefault(),i=t.getIndex(),n=this.findPrevEditableCell(t.row,i)))&&(n.getComponent().edit(),!0)}navigateRight(t=this.currentCell,e){var i,n;return!!(t&&(e&&e.preventDefault(),i=t.getIndex(),n=this.findNextEditableCell(t.row,i)))&&(n.getComponent().edit(),!0)}navigateUp(t=this.currentCell,e){var i,n;return!!(t&&(e&&e.preventDefault(),i=t.getIndex(),n=this.table.rowManager.prevDisplayRow(t.row,!0)))&&(n.cells[i].getComponent().edit(),!0)}navigateDown(t=this.currentCell,e){var i,n;return!!(t&&(e&&e.preventDefault(),i=t.getIndex(),n=this.table.rowManager.nextDisplayRow(t.row,!0)))&&(n.cells[i].getComponent().edit(),!0)}findNextEditableCell(t,e){var i=!1;if(e<t.cells.length-1)for(var n=e+1;n<t.cells.length;n++){let e=t.cells[n];if(e.column.modules.edit&&uj.elVisible(e.getElement())&&this.allowEdit(e)){i=e;break}}return i}findPrevEditableCell(t,e){var i=!1;if(e>0)for(var n=e-1;n>=0;n--){let e=t.cells[n];if(e.column.modules.edit&&uj.elVisible(e.getElement())&&this.allowEdit(e)){i=e;break}}return i}initializeColumnCheck(t){void 0!==t.definition.editor&&this.initializeColumn(t)}columnDeleteCheck(t){this.currentCell&&this.currentCell.column===t&&this.cancelEdit()}rowDeleteCheck(t){this.currentCell&&this.currentCell.row===t&&this.cancelEdit()}rowEditableCheck(t){t.getCells().forEach((t=>{t.column.modules.edit&&"function"==typeof t.column.modules.edit.check&&this.updateCellClass(t)}))}initializeColumn(t){var e={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(typeof t.definition.editor){case"string":this.editors[t.definition.editor]?e.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":e.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?this.editors[t.definition.formatter]?e.editor=this.editors[t.definition.formatter]:e.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}e.editor&&(t.modules.edit=e)}getCurrentCell(){return!!this.currentCell&&this.currentCell.getComponent()}clearEditor(t){var e,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,e=i.getElement(),this.dispatch("edit-editor-clear",i,t),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);i.row.getElement().classList.remove("tabulator-editing"),i.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var t=this.currentCell,e=this.currentCell.getComponent();this.clearEditor(!0),t.setValueActual(t.getValue()),t.cellRendered(),("textarea"==t.column.definition.editor||t.column.definition.variableHeight)&&t.row.normalizeHeight(!0),t.column.definition.cellEditCancelled&&t.column.definition.cellEditCancelled.call(this.table,e),this.dispatch("edit-cancelled",t),this.dispatchExternal("cellEditCancelled",e)}}bindEditor(t){if(t.column.modules.edit){var e=this,i=t.getElement(!0);this.updateCellClass(t),i.setAttribute("tabindex",0),i.addEventListener("click",(function(t){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})})),i.addEventListener("mousedown",(function(t){2===t.button?t.preventDefault():e.mouseClick=!0})),i.addEventListener("focus",(function(i){e.recursionBlock||e.edit(t,i,!1)}))}}focusCellNoEvent(t,e){this.recursionBlock=!0,e&&"ie"===this.table.browser||t.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(t,e){this.focusCellNoEvent(t),this.edit(t,!1,e)}focusScrollAdjust(t){if("virtual"==this.table.rowManager.getRenderMode()){var e=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=t.row.getElement();n.offsetTop<e?this.table.rowManager.element.scrollTop-=e-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,r=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=t.getElement();this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin||0),r-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),"virtual"===this.table.options.renderHorizontal&&(o-=parseInt(this.table.columnManager.renderer.vDomPadLeft),r-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),a.offsetLeft<o?this.table.rowManager.element.scrollLeft-=o-a.offsetLeft:a.offsetLeft+a.offsetWidth>r&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-r)}}allowEdit(t){var e=!!t.column.modules.edit;if(t.column.modules.edit)switch(typeof t.column.modules.edit.check){case"function":t.row.initialized&&(e=t.column.modules.edit.check(t.getComponent()));break;case"string":e=!!t.row.data[t.column.modules.edit.check];break;case"boolean":e=t.column.modules.edit.check}return e}edit(t,e,i){var n,o,r,a=this,s=function(){},l=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,l.blur(),!1;if(e&&e.stopPropagation(),this.allowEdit(t)||i){if(a.cancelEdit(),a.currentCell=t,this.focusScrollAdjust(t),o=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.definition.cellClick&&t.column.definition.cellClick.call(this.table,e,o)),t.column.definition.cellEditing&&t.column.definition.cellEditing.call(this.table,o),this.dispatch("cell-editing",t),this.dispatchExternal("cellEditing",o),r="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(o):t.column.modules.edit.params,n=t.column.modules.edit.editor.call(a,o,(function(t){s=t}),(function(e){if(a.currentCell===t){var i=a.chain("edit-success",[t,e],!0,!0);return!0===i||"highlight"===a.table.options.validationMode?(a.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==a.editedCells.indexOf(t)&&a.editedCells.push(t),t.setValue(e,!0),!0===i):(a.invalidEdit=!0,a.focusCellNoEvent(t,!0),s(),!1)}}),(function(){a.currentCell===t&&a.cancelEdit()}),r),!this.currentCell||!1===n)return l.blur(),!1;if(!(n instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",n),l.blur(),!1;for(l.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-editing"),t.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(n),s();for(var h=l.children,u=0;u<h.length;u++)h[u].addEventListener("click",(function(t){t.stopPropagation()}));return!0}return this.mouseClick=!1,l.blur(),!1}this.invalidEdit||this.currentCell===t||this.cancelEdit()}getEditedCells(){var t=[];return this.editedCells.forEach((e=>{t.push(e.getComponent())})),t}clearEdited(t){var e;t.modules.edit&&t.modules.edit.edited&&(t.modules.edit.edited=!1,this.dispatch("edit-edited-clear",t)),(e=this.editedCells.indexOf(t))>-1&&this.editedCells.splice(e,1)}}Nj.moduleName="edit",Nj.editors=zj;class Bj{constructor(t,e,i,n){this.type=t,this.columns=e,this.component=i||!1,this.indent=n||0}}class Fj{constructor(t,e,i,n,o){this.value=t,this.component=e||!1,this.width=i,this.height=n,this.depth=o}}class Vj extends dj{constructor(t){super(t),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(t,e,i,n){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=n;var o=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],r=this.bodyToExportRows(this.rowLookup(i));return o.concat(r)}generateTable(t,e,i,n){var o=this.generateExportList(t,e,i,n);return this.generateTableElement(o)}rowLookup(t){var e=[];if("function"==typeof t)t.call(this.table).forEach((t=>{(t=this.table.rowManager.findRow(t))&&e.push(t)}));else switch(t){case!0:case"visible":e=this.table.rowManager.getVisibleRows(!1,!0);break;case"all":e=this.table.rowManager.rows;break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],e)}generateColumnGroupHeaders(){var t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((e=>{var i=this.processColumnGroup(e);i&&t.push(i)})),t}processColumnGroup(t){var e=t.columns,i=0,n={title:t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,column:t,depth:1};if(e.length){if(n.subGroups=[],n.width=0,e.forEach((t=>{var e=this.processColumnGroup(t);e&&(n.width+=e.width,n.subGroups.push(e),e.depth>i&&(i=e.depth))})),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n}columnVisCheck(t){var e=t.definition[this.colVisProp];return"function"==typeof e&&(e=e.call(this.table,t.getComponent())),!1!==e&&(t.visible||!t.visible&&e)}headersToExportRows(t){var e=[],i=0,n=[];function o(t,n){var r=i-n;if(void 0===e[n]&&(e[n]=[]),t.height=t.subGroups?1:r-t.depth+1,e[n].push(t),t.height>1)for(let i=1;i<t.height;i++)void 0===e[n+i]&&(e[n+i]=[]),e[n+i].push(!1);if(t.width>1)for(let i=1;i<t.width;i++)e[n].push(!1);t.subGroups&&t.subGroups.forEach((function(t){o(t,n+1)}))}return t.forEach((function(t){t.depth>i&&(i=t.depth)})),t.forEach((function(t){o(t,0)})),e.forEach((t=>{var e=[];t.forEach((t=>{if(t){let i=void 0===t.title?"":t.title;e.push(new Fj(i,t.column.getComponent(),t.width,t.height,t.depth))}else e.push(null)})),n.push(new Bj("header",e))})),n}bodyToExportRows(t){var e=[],i=[];return this.table.columnManager.columnsByIndex.forEach((t=>{this.columnVisCheck(t)&&e.push(t.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),(t=t.filter((t=>{switch(t.type){case"group":return!1!==this.config.rowGroups;case"calc":return!1!==this.config.columnCalcs;case"row":return!(this.table.options.dataTree&&!1===this.config.dataTree&&t.modules.dataTree.parent)}return!0}))).forEach(((t,n)=>{var o=t.getData(this.colVisProp),r=[],a=0;switch(t.type){case"group":a=t.level,r.push(new Fj(t.key,t.getComponent(),e.length,1));break;case"calc":case"row":e.forEach((t=>{r.push(new Fj(t._column.getFieldValue(o),t,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(a=t.modules.dataTree.index)}i.push(new Bj(t.type,r,t.getComponent(),a))})),i}generateTableElement(t){var e=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),o=this.lookupTableStyles(),r=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a={};return a.rowFormatter=null!==r?r:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(a.treeElementField=this.table.modules.dataTree.elementField),a.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a.groupHeader&&!Array.isArray(a.groupHeader)&&(a.groupHeader=[a.groupHeader]),e.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach(((t,e)=>{let r;switch(t.type){case"header":i.appendChild(this.generateHeaderElement(t,a,o));break;case"group":n.appendChild(this.generateGroupElement(t,a,o));break;case"calc":n.appendChild(this.generateCalcElement(t,a,o));break;case"row":r=this.generateRowElement(t,a,o),this.mapElementStyles(e%2&&o.evenRow?o.evenRow:o.oddRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(r)}})),i.innerHTML&&e.appendChild(i),e.appendChild(n),this.mapElementStyles(this.table.element,e,["border-top","border-left","border-right","border-bottom"]),e}lookupTableStyles(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t}generateHeaderElement(t,e,i){var n=document.createElement("tr");return t.columns.forEach((t=>{if(t){var e=document.createElement("th"),i=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,this.cloneTableStyle&&(e.style.boxSizing="border-box"),i.forEach((function(t){e.classList.add(t)})),this.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?this.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&this.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),n.appendChild(e)}})),n}generateGroupElement(t,e,i){var n=document.createElement("tr"),o=document.createElement("td"),r=t.columns[0];return n.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?r.value=e.groupHeader[t.indent](r.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1!==e.groupHeader&&(r.value=t.component._group.generator(r.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)),o.colSpan=r.width,o.innerHTML=r.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+t.indent),r.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,o,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(o),n}generateCalcElement(t,e,i){var n=this.generateRowElement(t,e,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}generateRowElement(t,e,i){var n=document.createElement("tr");return n.classList.add("tabulator-print-table-row"),t.columns.forEach(((o,r)=>{if(o){var a,s=document.createElement("td"),l=o.component._column,h=this.table.columnManager.findColumnIndex(l),u=o.value,c={modules:{},getValue:function(){return u},getField:function(){return l.definition.field},getElement:function(){return s},getType:function(){return"cell"},getColumn:function(){return l.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(t){s.classList.add(t)})),this.table.modExists("format")&&!1!==this.config.formatCells)u=this.table.modules.format.formatExportValue(c,this.colVisProp);else switch(typeof u){case"object":u=null!==u?JSON.stringify(u):"";break;case"undefined":u=""}u instanceof Node?s.appendChild(u):s.innerHTML=u,(a=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell)&&(this.mapElementStyles(a,s,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),l.definition.align&&(s.style.textAlign=l.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(e.treeElementField&&e.treeElementField==l.field||!e.treeElementField&&0==r)&&(t.component._row.modules.dataTree.controlEl&&s.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),s.firstChild),t.component._row.modules.dataTree.branchEl&&s.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),s.firstChild)),n.appendChild(s),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback()}})),e.rowFormatter&&"row"===t.type&&!1!==this.config.formatCells&&(Object.assign(t.component).getElement=function(){return n},e.rowFormatter(t.component)),n}generateHTMLTable(t){var e=document.createElement("div");return e.appendChild(this.generateTableElement(t)),e.innerHTML}getHtml(t,e,i,n){var o=this.generateExportList(i||this.table.options.htmlOutputConfig,e,t,n||"htmlOutput");return this.generateHTMLTable(o)}mapElementStyles(t,e,i){if(this.cloneTableStyle&&t&&e){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var o=window.getComputedStyle(t);i.forEach((function(t){e.style[n[t]]||(e.style[n[t]]=o.getPropertyValue(t))}))}}}}Vj.moduleName="export";var Hj={"=":function(t,e,i,n){return e==t},"<":function(t,e,i,n){return e<t},"<=":function(t,e,i,n){return e<=t},">":function(t,e,i,n){return e>t},">=":function(t,e,i,n){return e>=t},"!=":function(t,e,i,n){return e!=t},regex:function(t,e,i,n){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,i,n){return null==t?e===t:null!=e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},keywords:function(t,e,i,n){var o=t.toLowerCase().split(void 0===n.separator?" ":n.separator),r=String(null==e?"":e).toLowerCase(),a=[];return o.forEach((t=>{r.includes(t)&&a.push(!0)})),n.matchAll?a.length===o.length:!!a.length},starts:function(t,e,i,n){return null==t?e===t:null!=e&&String(e).toLowerCase().startsWith(t.toLowerCase())},ends:function(t,e,i,n){return null==t?e===t:null!=e&&String(e).toLowerCase().endsWith(t.toLowerCase())},in:function(t,e,i,n){return Array.isArray(t)?!t.length||t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}};class Gj extends dj{constructor(t){super(t),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((t=>{var e=this.table.columnManager.findColumn(t.field);if(!e)return console.warn("Column Filter Error - No matching column found:",t.field),!1;this.setHeaderFilterValue(e,t.value)})),this.tableInitialized=!0}remoteFilterParams(t,e,i,n){return n.filter=this.getFilters(!0,!0),n}generatePlaceholder(t){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(t,e,i,n){this.setFilter(t,e,i,n),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(t,e,i,n){this.addFilter(t,e,i,n),this.refreshFilter()}userSetHeaderFilterFocus(t){var e=this.table.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.setHeaderFilterFocus(e)}userGetHeaderFilterValue(t){var e=this.table.columnManager.findColumn(t);if(e)return this.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}userSetHeaderFilterValue(t,e){var i=this.table.columnManager.findColumn(t);if(!i)return console.warn("Column Filter Error - No matching column found:",t),!1;this.setHeaderFilterValue(i,e)}userRemoveFilter(t,e,i){this.removeFilter(t,e,i),this.refreshFilter()}userClearFilter(t){this.clearFilter(t),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(t,e,i){return this.search("rows",t,e,i)}searchData(t,e,i){return this.search("data",t,e,i)}initializeColumnHeaderFilter(t){t.definition.headerFilter&&this.initializeColumn(t)}initializeColumn(t,e){var i=this,n=t.getField();t.modules.filter={success:function(e){var o,r="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==e){if(t.modules.filter.prevSuccess=e,t.modules.filter.emptyFunc(e))delete i.headerFilters[n];else{switch(t.modules.filter.value=e,typeof t.definition.headerFilterFunc){case"string":Gj.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,o=function(i){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(i);return n="function"==typeof n?n(e,o,i):n,Gj.filters[t.definition.headerFilterFunc](e,o,i,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":a=o=function(i){var n=t.definition.headerFilterFuncParams||{},o=t.getFieldValue(i);return n="function"==typeof n?n(e,o,i):n,t.definition.headerFilterFunc(e,o,i,n)}}o||("partial"===r?(o=function(i){var n=t.getFieldValue(i);return null!=n&&String(n).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like"):(o=function(i){return t.getFieldValue(i)==e},a="=")),i.headerFilters[n]={value:e,func:o,type:a}}t.modules.filter.value=e,s=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==s&&(i.prevHeaderFilterChangeCheck=s,i.trackChanges(),i.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)}generateHeaderFilterElement(t,e,i){var n,o,r,a,s,l,h,u,c=this,d=t.modules.filter.success,p=t.getField();if(t.modules.filter.value=e,t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&0!==t},(n=document.createElement("div")).classList.add("tabulator-header-filter"),typeof t.definition.headerFilter){case"string":c.table.modules.edit.editors[t.definition.headerFilter]?(o=c.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":o=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?o=t.modules.edit.editor:t.definition.formatter&&c.table.modules.edit.editors[t.definition.formatter]?(o=c.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):o=c.table.modules.edit.editors.input}if(o){if(a={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return n},getColumn:function(){return t.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},h="function"==typeof(h=t.definition.headerFilterParams||{})?h.call(c.table,a):h,!(r=o.call(this.table.modules.edit,a,(function(t){u=t}),d,(function(){}),h)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",r);c.langBind("headerFilters|columns|"+t.definition.field,(function(e){r.setAttribute("placeholder",void 0!==e&&e?e:t.definition.headerFilterPlaceholder||c.langText("headerFilters|default"))})),r.addEventListener("click",(function(t){t.stopPropagation(),r.focus()})),r.addEventListener("focus",(t=>{var e=this.table.columnManager.contentsElement.scrollLeft;e!==this.table.rowManager.element.scrollLeft&&(this.table.rowManager.scrollHorizontal(e),this.table.columnManager.scrollHorizontal(e))})),s=!1,l=function(t){s&&clearTimeout(s),s=setTimeout((function(){d(r.value)}),c.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=r,t.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=r.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(r.addEventListener("keyup",l),r.addEventListener("search",l),"number"==t.modules.filter.attrType&&r.addEventListener("change",(function(t){d(r.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||r.addEventListener("mousedown",(function(t){t.stopPropagation()}))),n.appendChild(r),t.contentElement.appendChild(n),i||c.headerFilterColumns.push(t),u&&u()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="none")}))}showHeaderFilterElements(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="")}))}setHeaderFilterFocus(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())}getHeaderFilterValue(t){if(t.modules.filter&&t.modules.filter.headerElement)return t.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",t.getField())}setHeaderFilterValue(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e,!0),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))}reloadHeaderFilter(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",t.getField()))}refreshFilter(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var t=this.changed;return this.changed=!1,t}setFilter(t,e,i,n){this.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:i,params:n}]),this.addFilter(t)}addFilter(t,e,i,n){var o=!1;Array.isArray(t)||(t=[{field:t,type:e,value:i,params:n}]),t.forEach((t=>{(t=this.findFilter(t))&&(this.filterList.push(t),o=!0)})),o&&this.trackChanges()}findFilter(t){var e;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:Gj.filters[t.type]?i=(e=this.table.columnManager.getColumnByField(t.field))?function(i){return Gj.filters[t.type](t.value,e.getFieldValue(i),i,t.params||{})}:function(e){return Gj.filters[t.type](t.value,e[t.field],e,t.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t}findSubFilters(t){var e=[];return t.forEach((t=>{(t=this.findFilter(t))&&e.push(t)})),!!e.length&&e}getFilters(t,e){var i=[];return t&&(i=this.getHeaderFilters()),e&&i.forEach((function(t){"function"==typeof t.type&&(t.type="function")})),i.concat(this.filtersToArray(this.filterList,e))}filtersToArray(t,e){var i=[];return t.forEach((t=>{var n;Array.isArray(t)?i.push(this.filtersToArray(t,e)):(n={field:t.field,type:t.type,value:t.value},e&&"function"==typeof n.type&&(n.type="function"),i.push(n))})),i}getHeaderFilters(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t}removeFilter(t,e,i){Array.isArray(t)||(t=[{field:t,type:e,value:i}]),t.forEach((t=>{var e;(e="object"==typeof t.field?this.filterList.findIndex((e=>t===e)):this.filterList.findIndex((e=>t.field===e.field&&t.type===e.type&&t.value===e.value)))>-1?this.filterList.splice(e,1):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.trackChanges()}clearFilter(t){this.filterList=[],t&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((t=>{void 0!==t.modules.filter.value&&delete t.modules.filter.value,t.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(t)})),this.trackChanges()}search(t,e,i,n){var o=[],r=[];return Array.isArray(e)||(e=[{field:e,type:i,value:n}]),e.forEach((t=>{(t=this.findFilter(t))&&r.push(t)})),this.table.rowManager.rows.forEach((e=>{var i=!0;r.forEach((t=>{this.filterRecurse(t,e.getData())||(i=!1)})),i&&o.push("data"===t?e.getData("data"):e.getComponent())})),o}filter(t,e){var i=[],n=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?t.forEach((t=>{this.filterRow(t)&&i.push(t)})):i=t.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach((t=>{n.push(t.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(!0),n)),i}filterRow(t,e){var i=!0,n=t.getData();for(var o in this.filterList.forEach((t=>{this.filterRecurse(t,n)||(i=!1)})),this.headerFilters)this.headerFilters[o].func(n)||(i=!1);return i}filterRecurse(t,e){var i=!1;return Array.isArray(t)?t.forEach((t=>{this.filterRecurse(t,e)&&(i=!0)})):i=t.func(e),i}}Gj.moduleName="filter",Gj.filters=Hj;var Wj={plaintext:function(t,e,i){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,i){return t.getValue()},textarea:function(t,e,i){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,i){var n,o,r,a,s,l=parseFloat(t.getValue()),h="",u=e.decimal||".",c=e.thousand||",",d=e.negativeSign||"-",p=e.symbol||"",f=!!e.symbolAfter,g=void 0!==e.precision?e.precision:2;if(isNaN(l))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));if(l<0&&(l=Math.abs(l),h=d),n=!1!==g?l.toFixed(g):l,o=(n=String(n).split("."))[0],r=n.length>1?u+n[1]:"",!1!==e.thousand)for(a=/(\d+)(\d{3})/;a.test(o);)o=o.replace(a,"$1"+c+"$2");return s=o+r,!0===h?(s="("+s+")",f?s+p:p+s):f?h+s+p:h+p+s},link:function(t,e,i){var n,o=t.getValue(),r=e.urlPrefix||"",a=e.download,s=o,l=document.createElement("a");if(e.labelField&&(n=t.getData(),s=function t(e,i){var n=i[e.shift()];return e.length&&"object"==typeof n?t(e,n):n}(e.labelField.split(this.table.options.nestedFieldSeparator),n)),e.label)switch(typeof e.label){case"string":s=e.label;break;case"function":s=e.label(t)}if(s){if(e.urlField&&(o=(n=t.getData())[e.urlField]),e.url)switch(typeof e.url){case"string":o=e.url;break;case"function":o=e.url(t)}return l.setAttribute("href",r+o),e.target&&l.setAttribute("target",e.target),e.download&&(a="function"==typeof a?a(t):!0===a?"":a,l.setAttribute("download",a)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(s)),l}return" "},image:function(t,e,i){var n=document.createElement("img"),o=t.getValue();switch(e.urlPrefix&&(o=e.urlPrefix+t.getValue()),e.urlSuffix&&(o+=e.urlSuffix),n.setAttribute("src",o),typeof e.height){case"number":n.style.height=e.height+"px";break;case"string":n.style.height=e.height}switch(typeof e.width){case"number":n.style.width=e.width+"px";break;case"string":n.style.width=e.width}return n.addEventListener("load",(function(){t.getRow().normalizeHeight()})),n},tickCross:function(t,e,i){var n=t.getValue(),o=t.getElement(),r=e.allowEmpty,a=e.allowTruthy,s=Object.keys(e).includes("trueValue"),l=void 0!==e.tickElement?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',h=void 0!==e.crossElement?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return s&&n===e.trueValue||!s&&(a&&n||!0===n||"true"===n||"True"===n||1===n||"1"===n)?(o.setAttribute("aria-checked",!0),l||""):!r||"null"!==n&&""!==n&&null!=n?(o.setAttribute("aria-checked",!1),h||""):(o.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,i){var n,o=window.DateTime||luxon.DateTime,r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",a=e.outputFormat||"dd/MM/yyyy HH:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",l=t.getValue();if(void 0!==o)return(n=o.isDateTime(l)?l:"iso"===r?o.fromISO(String(l)):o.fromFormat(String(l),r)).isValid?(e.timezone&&(n=n.setZone(e.timezone)),n.toFormat(a)):!0!==s&&l?"function"==typeof s?s(l):s:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(t,e,i){var n,o=window.DateTime||luxon.DateTime,r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",a=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,l=void 0!==e.unit?e.unit:"days",h=void 0!==e.humanize&&e.humanize,u=void 0!==e.date?e.date:o.now(),c=t.getValue();if(void 0!==o)return(n=o.isDateTime(c)?c:"iso"===r?o.fromISO(String(c)):o.fromFormat(String(c),r)).isValid?h?n.diff(u,l).toHuman()+(s?" "+s:""):parseInt(n.diff(u,l)[l])+(s?" "+s:""):!0===a?c:"function"==typeof a?a(c):a;console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(t,e,i){var n=t.getValue();return void 0===e[n]?(console.warn("Missing display value for "+n),n):e[n]},star:function(t,e,i){var n=t.getValue(),o=t.getElement(),r=e&&e.stars?e.stars:5,a=document.createElement("span"),s=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",s.setAttribute("width","14"),s.setAttribute("height","14"),s.setAttribute("viewBox","0 0 512 512"),s.setAttribute("xml:space","preserve"),s.style.padding="0 1px",n=n&&!isNaN(n)?parseInt(n):0,n=Math.max(0,Math.min(n,r));for(var l=1;l<=r;l++){var h=s.cloneNode(!0);h.innerHTML=l<=n?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(h)}return o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.setAttribute("aria-label",n),a},traffic:function(t,e,i){var n,o,r=this.sanitizeHTML(t.getValue())||0,a=document.createElement("span"),s=e&&e.max?e.max:100,l=e&&e.min?e.min:0,h=e&&void 0!==e.color?e.color:["red","orange","green"],u="#666666";if(!isNaN(r)&&void 0!==t.getValue()){switch(a.classList.add("tabulator-traffic-light"),o=parseFloat(r)<=s?parseFloat(r):s,o=parseFloat(o)>=l?parseFloat(o):l,n=(s-l)/100,o=Math.round((o-l)/n),typeof h){case"string":u=h;break;case"function":u=h(r);break;case"object":if(Array.isArray(h)){var c=100/h.length,d=Math.floor(o/c);d=Math.min(d,h.length-1),u=h[d=Math.max(d,0)];break}}return a.style.backgroundColor=u,a}},progress:function(t,e={},i){var n,o,r,a,s,l=this.sanitizeHTML(t.getValue())||0,h=t.getElement(),u=e.max?e.max:100,c=e.min?e.min:0,d=e.legendAlign?e.legendAlign:"center";switch(o=parseFloat(l)<=u?parseFloat(l):u,o=parseFloat(o)>=c?parseFloat(o):c,n=(u-c)/100,o=Math.round((o-c)/n),typeof e.color){case"string":r=e.color;break;case"function":r=e.color(l);break;case"object":if(Array.isArray(e.color)){let t=100/e.color.length,i=Math.floor(o/t);i=Math.min(i,e.color.length-1),i=Math.max(i,0),r=e.color[i];break}default:r="#2DC214"}switch(typeof e.legend){case"string":a=e.legend;break;case"function":a=e.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(typeof e.legendColor){case"string":s=e.legendColor;break;case"function":s=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){let t=100/e.legendColor.length,i=Math.floor(o/t);i=Math.min(i,e.legendColor.length-1),i=Math.max(i,0),s=e.legendColor[i]}break;default:s="#000"}h.style.minWidth="30px",h.style.position="relative",h.setAttribute("aria-label",o);var p=document.createElement("div");p.style.display="inline-block",p.style.width=o+"%",p.style.backgroundColor=r,p.style.height="100%",p.setAttribute("data-max",u),p.setAttribute("data-min",c);var f=document.createElement("div");if(f.style.position="relative",f.style.width="100%",f.style.height="100%",a){var g=document.createElement("div");g.style.position="absolute",g.style.top=0,g.style.left=0,g.style.textAlign=d,g.style.width="100%",g.style.color=s,g.innerHTML=a}return i((function(){if(!(t instanceof _j)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",h.appendChild(e),h=e}h.appendChild(f),f.appendChild(p),a&&f.appendChild(g)})),""},color:function(t,e,i){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,i){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(t,e,i){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(t,e,i){var n=document.createElement("span");return t.getRow().watchPosition((t=>{n.innerText=t})),n},handle:function(t,e,i){return t.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(t,e,i){var n=document.createElement("div"),o=t.getRow()._row.modules.responsiveLayout;function r(t){var e=o.element;o.open=t,e&&(o.open?(n.classList.add("open"),e.style.display=""):(n.classList.remove("open"),e.style.display="none"))}return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML='<svg class=\'tabulator-responsive-collapse-toggle-open\' viewbox="0 0 24 24">\n <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n <line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n</svg>\n\n<svg class=\'tabulator-responsive-collapse-toggle-close\' viewbox="0 0 24 24">\n <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n</svg>',t.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",(function(e){e.stopImmediatePropagation(),r(!o.open),t.getTable().rowManager.adjustTableSize()})),r(o.open),n},rowSelection:function(t,e,i){var n=document.createElement("input"),o=!1;if(n.type="checkbox",n.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(n.addEventListener("click",(t=>{t.stopPropagation()})),"function"==typeof t.getRow){var r=t.getRow();r instanceof Ej?(n.addEventListener("change",(t=>{"click"===this.table.options.selectableRangeMode&&o?o=!1:r.toggleSelect()})),"click"===this.table.options.selectableRangeMode&&n.addEventListener("click",(t=>{o=!0,this.table.modules.selectRow.handleComplexRowClick(r._row,t)})),n.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,n)):n=""}else n.addEventListener("change",(t=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}};class Uj extends dj{constructor(t){super(t),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(t){t.modules.format=this.lookupFormatter(t,""),void 0!==t.definition.formatterPrint&&(t.modules.format.print=this.lookupFormatter(t,"Print")),void 0!==t.definition.formatterClipboard&&(t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")),void 0!==t.definition.formatterHtmlOutput&&(t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput"))}lookupFormatter(t,e){var i={params:t.definition["formatter"+e+"Params"]||{}},n=t.definition["formatter"+e];switch(typeof n){case"string":Uj.formatters[n]?i.formatter=Uj.formatters[n]:(console.warn("Formatter Error - No such formatter found: ",n),i.formatter=Uj.formatters.plaintext);break;case"function":i.formatter=n;break;default:i.formatter=Uj.formatters.plaintext}return i}cellRendered(t){t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered&&(t.modules.format.renderedCallback(),t.modules.format.rendered=!0)}formatHeader(t,e,i){var n,o,r,a;return t.definition.titleFormatter?(n=this.getFormatter(t.definition.titleFormatter),r=e=>{t.titleFormatterRendered=e},a={getValue:function(){return e},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return t.getComponent()},getTable:()=>this.table},o="function"==typeof(o=t.definition.titleFormatterParams||{})?o():o,n.call(this,a,o,r)):e}formatValue(t){var e=t.getComponent(),i="function"==typeof t.column.modules.format.params?t.column.modules.format.params(e):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,e,i,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))}formatExportValue(t,e){var i,n=t.column.modules.format[e];if(n){function o(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}return i="function"==typeof n.params?n.params(t.getComponent()):n.params,n.formatter.call(this,t.getComponent(),i,o)}return this.formatValue(t)}sanitizeHTML(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=/]/g,(function(t){return e[t]}))}return t}emptyToSpace(t){return null==t||""===t?" ":t}getFormatter(t){switch(typeof t){case"string":Uj.formatters[t]?t=Uj.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=Uj.formatters.plaintext);break;case"function":break;default:t=Uj.formatters.plaintext}return t}}Uj.moduleName="format",Uj.formatters=Wj;class jj extends dj{constructor(t){super(t),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-delete",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(t){this.layoutElement(t.element,t.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((t=>{this.initializeColumn(t)}))}initializeColumn(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")}frozenCheck(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(t){t.forEach((t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)}))}layoutColumnPosition(t){var e=[],i=0,n=0;this.leftColumns.forEach(((n,o)=>{if(n.modules.frozen.marginValue=i,n.modules.frozen.margin=n.modules.frozen.marginValue+"px",n.visible&&(i+=n.getWidth()),o==this.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var r=this.getColGroupParentElement(n);e.includes(r)||(this.layoutElement(r,n),e.push(r)),n.modules.frozen.edge&&r.classList.add("tabulator-frozen-"+n.modules.frozen.position)}else this.layoutElement(n.getElement(),n);t&&n.cells.forEach((t=>{this.layoutElement(t.getElement(!0),n)}))})),this.rightColumns.forEach(((e,i)=>{e.modules.frozen.marginValue=n,e.modules.frozen.margin=e.modules.frozen.marginValue+"px",e.visible&&(n+=e.getWidth()),i==this.rightColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,e.parent.isGroup?this.layoutElement(this.getColGroupParentElement(e),e):this.layoutElement(e.getElement(),e),t&&e.cells.forEach((t=>{this.layoutElement(t.getElement(!0),e)}))}))}getColGroupParentElement(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var t=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((e=>!t.includes(e))).forEach((t=>{t.deinitialize()})),t.forEach((t=>{"row"===t.type&&this.layoutRow(t)}))}layoutRow(t){"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((e=>{var i=t.getCell(e);i&&this.layoutElement(i.getElement(!0),e)})),this.rightColumns.forEach((e=>{var i=t.getCell(e);i&&this.layoutElement(i.getElement(!0),e)}))}layoutElement(t,e){var i;e.modules.frozen&&t&&(t.style.position="sticky",i=this.table.rtl?"left"===e.modules.frozen.position?"right":"left":e.modules.frozen.position,t.style[i]=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))}adjustForScrollbar(t){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+t+"px)")}_calcSpace(t,e){var i=0;for(let n=0;n<e;n++)t[n].visible&&(i+=t[n].getWidth());return i}}jj.moduleName="frozenColumns";class Xj extends dj{constructor(t){super(t),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getContentsElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach((t=>{this.initializeRow(t)}))}initializeRow(t){var e=this.table.options.frozenRows,i=typeof e;"number"===i?t.getPosition()&&t.getPosition()+this.rows.length<=e&&this.freezeRow(t):"function"===i?e.call(this.table,t.getComponent())&&this.freezeRow(t):Array.isArray(e)&&e.includes(t.data[this.options("frozenRowsField")])&&this.freezeRow(t)}isRowFrozen(t){return this.rows.indexOf(t)>-1}isFrozen(){return!!this.rows.length}visibleRows(t,e){return this.rows.forEach((t=>{e.push(t)})),e}getRows(t){var e=t.slice(0);return this.rows.forEach((function(t){var i=e.indexOf(t);i>-1&&e.splice(i,1)})),e}freezeRow(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.rows.push(t),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(t){t.modules.frozen?(t.modules.frozen=!1,this.detachRow(t),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(t){var e=this.rows.indexOf(t);if(e>-1){var i=t.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(e,1)}}styleRows(t){this.rows.forEach(((t,e)=>{this.table.rowManager.styleRow(t,e)}))}}Xj.moduleName="frozenRows";class Yj{constructor(t){return this._group=t,this.type="GroupComponent",new Proxy(this,{get:function(t,e,i){return void 0!==t[e]?t[e]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,e)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return!!this._group.parent&&this._group.parent.getComponent()}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(t,e){return this._group.groupManager.table.rowManager.scrollToRow(this._group,t,e)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Zj{constructor(t,e,i,n,o,r,a){this.groupManager=t,this.parent=e,this.key=n,this.level=i,this.field=o,this.hasSubGroups=i<t.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=r,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==t.startOpen[i]?t.startOpen[i]:t.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(t){t||(this.groupList.length?this.groupList.forEach((function(t){t.wipe()})):this.rows.forEach((t=>{t.modules&&delete t.modules.group}))),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var t=document.createElement("div");t.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(t),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var t=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]&&this.groupManager.allowedValues[t].forEach((e=>{this._createGroup(e,t)}))}addBindings(){this.groupManager.table.options.groupToggleElement&&("arrow"==this.groupManager.table.options.groupToggleElement?this.arrowElement:this.element).addEventListener("click",(t=>{"arrow"===this.groupManager.table.options.groupToggleElement&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout((()=>{this.toggleVisibility()}))}))}_createGroup(t,e){var i=e+"_"+t,n=new Zj(this.groupManager,this,e,t,this.groupManager.groupIDLookups[e].field,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[i]);this.groups[i]=n,this.groupList.push(n)}_addRowToGroup(t){var e=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[e].func(t.getData()),n=e+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]?this.groups[n]&&this.groups[n].addRow(t):(this.groups[n]||this._createGroup(i,e),this.groups[n].addRow(t))}}_addRow(t){this.rows.push(t),t.modules.group=this}insertRow(t,e,i){var n=this.conformRowData({});t.updateData(n);var o=this.rows.indexOf(e);o>-1?i?this.rows.splice(o+1,0,t):this.rows.splice(o,0,t):i?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(t){this.arrowElement&&(this.arrowElement.style.marginLeft=t,this.groupList.forEach((function(e){e.scrollHeader(t)})))}getRowIndex(t){}conformRowData(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t}removeRow(t){var e=this.rows.indexOf(t),i=t.getElement();e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this))):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}removeGroup(t){var e,i=t.level+"_"+t.key;this.groups[i]&&(delete this.groups[i],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var t=[];return t.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(e){t=t.concat(e.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t}getData(t,e){var i=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach((t=>{i.push(t.getData(e||"data"))})),i}getRowCount(){var t=0;return this.groupList.length?this.groupList.forEach((e=>{t+=e.getRowCount()})):t=this.rows.length,t}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((t=>{t.getHeadersAndRows().forEach((t=>{t.detachElement()}))})):this.rows.forEach((t=>{var e=t.getElement();e.parentNode.removeChild(e)}))),this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=this.generateElement();this.groupList.length?this.groupList.forEach((e=>{e.getHeadersAndRows().forEach((e=>{var i=e.getElement();t.parentNode.insertBefore(i,t.nextSibling),e.initialize(),t=i}))})):this.rows.forEach((e=>{var i=e.getElement();t.parentNode.insertBefore(i,t.nextSibling),e.initialize(),t=i})),this.groupManager.updateGroupRows(!0)}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var t=[];"function"==typeof this.visible&&(this.rows.forEach((function(e){t.push(e.getData())})),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))}getRowGroup(t){var e=!1;return this.groupList.length?this.groupList.forEach((function(i){var n=i.getRowGroup(t);n&&(e=n)})):this.rows.find((function(e){return e===t}))&&(e=this),e}getSubGroups(t){var e=[];return this.groupList.forEach((function(i){e.push(t?i.getComponent():i)})),e}getRows(t,e){var i=[];return e&&this.groupList.length?this.groupList.forEach((n=>{i=i.concat(n.getRows(t,e))})):this.rows.forEach((function(e){i.push(t?e.getComponent():e)})),i}generateGroupHeaderContents(){var t=[];for(this.getRows(!1,!0).forEach((function(e){t.push(e.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(t=[]){return t.unshift(this.key),this.parent&&this.parent.getPath(t),t}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;t<this.element.childNodes.length;++t)this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,uj.elVisible(this.element)&&this.initialize(!0)}setHeight(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new Yj(this)),this.component}}class qj extends dj{constructor(t){super(t),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var t=this.table.options.groupBy,e=this.table.options.groupStartOpen,i=this.table.options.groupHeader;this.allowedValues=this.table.options.groupValues,Array.isArray(t)&&Array.isArray(i)&&t.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",((t,e)=>{this.headerGenerator[0]=(i,n,o)=>(void 0===i?"":i)+"<span>("+n+" "+(1===n?t:e.groups.items)+")</span>"})),this.groupIDLookups=[],t?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((t=>{t.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})),Array.isArray(t)||(t=[t]),t.forEach(((t,e)=>{var i,n;i="function"==typeof t?t:(n=this.table.columnManager.getColumnByField(t))?function(t){return n.getFieldValue(t)}:function(e){return e[t]},this.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!this.allowedValues&&this.allowedValues[e]})})),e&&(Array.isArray(e)||(e=[e]),e.forEach((t=>{})),this.startOpen=e),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(t,e){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];e.push(i.getRows(!1)[0])}return e}virtualRenderFill(){var t=this.table.rowManager.tableElement,e=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return e;e=e.filter((t=>"group"!==t.type)),t.style.minWidth=e.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(t,e,i){if(this.table.options.groupBy){this.assignRowToGroup(t);var n=t.modules.group.rows;return n.length>1&&(!e||e&&-1==n.indexOf(e)?i?n[0]!==t&&(e=n[0],this.table.rowManager.moveRowInArray(t.modules.group.rows,t,e,!i)):n[n.length-1]!==t&&(e=n[n.length-1],this.table.rowManager.moveRowInArray(t.modules.group.rows,t,e,!i)):this.table.rowManager.moveRowInArray(t.modules.group.rows,t,e,!i)),e}}trackChanges(){this.dispatch("group-changed")}setGroupBy(t){this.table.options.groupBy=t,this.initialized||this.initialize(),this.configureGroupSetup(),!t&&this.table.modExists("columnCalcs")&&!0===this.table.options.columnCalcs&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(t){this.table.options.groupValues=t,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(t){this.table.options.groupStartOpen=t,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(t){this.table.options.groupHeader=t,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(t){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(t){return!!t.modules.group&&t.modules.group.getComponent()}rowMoving(t,e,i){if(this.table.options.groupBy){!i&&e instanceof Zj&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e instanceof Zj?e:e.modules.group,o=t instanceof Zj?t:t.modules.group;n===o?this.table.rowManager.moveRowInArray(n.rows,t,e,i):(o&&o.removeRow(t),n.insertRow(t,e,i))}}rowDeleting(t){this.table.options.groupBy&&t.modules.group&&t.modules.group.removeRow(t)}rowsUpdated(t){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(t){this.table.options.groupBy&&this.reassignRowToGroup(t.row)}getRows(t){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(t),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):t.slice(0)}getGroups(t){var e=[];return this.groupList.forEach((function(i){e.push(t?i.getComponent():i)})),e}getChildGroups(t){var e=[];return t||(t=this),t.groupList.forEach((t=>{t.groupList.length?e=e.concat(this.getChildGroups(t)):e.push(t)})),e}wipe(){this.table.options.groupBy&&(this.groupList.forEach((function(t){t.wipe()})),this.groupList=[],this.groups={})}pullGroupListData(t){var e=[];return t.forEach((t=>{var i={level:0,rowCount:0,headerContent:""},n=[];t.hasSubGroups?(n=this.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),e.push(i),e=e.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,e.push(i),t.getRows().forEach((t=>{e.push(t.getData("data"))})))})),e}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(t){var e=!1;return this.options("dataTree")&&(t=this.table.modules.dataTree.getTreeParentRoot(t)),this.groupList.forEach((i=>{var n=i.getRowGroup(t);n&&(e=n)})),e}countGroups(){return this.groupList.length}generateGroups(t){var e=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((t=>{this.createGroup(t,0,e)})),t.forEach((t=>{this.assignRowToExistingGroup(t,e)}))):t.forEach((t=>{this.assignRowToGroup(t,e)})),Object.values(e).forEach((t=>{t.wipe(!0)}))}createGroup(t,e,i){var n,o=e+"_"+t;i=i||[],n=new Zj(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],i[o]),this.groups[o]=n,this.groupList.push(n)}assignRowToExistingGroup(t,e){var i="0_"+this.groupIDLookups[0].func(t.getData());this.groups[i]&&this.groups[i].addRow(t)}assignRowToGroup(t,e){var i=this.groupIDLookups[0].func(t.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,e),this.groups["0_"+i].addRow(t),!n}reassignRowToGroup(t){if("row"===t.type){var e=t.modules.group,i=e.getPath(),n=this.getExpectedPath(t);i.length==n.length&&i.every(((t,e)=>t===n[e]))||(e.removeRow(t),this.assignRowToGroup(t,this.groups),this.refreshData(!0))}}getExpectedPath(t){var e=[],i=t.getData();return this.groupIDLookups.forEach((t=>{e.push(t.func(i))})),e}updateGroupRows(t){var e=[];return this.blockRedraw||(this.groupList.forEach((t=>{e=e.concat(t.getHeadersAndRows())})),t&&this.refreshData(!0)),e}scrollHeaders(t){this.table.options.groupBy&&("virtual"===this.table.options.renderHorizontal&&(t-=this.table.columnManager.renderer.vDomPadLeft),t+="px",this.groupList.forEach((e=>{e.scrollHeader(t)})))}removeGroup(t){var e,i=t.level+"_"+t.key;this.groups[i]&&(delete this.groups[i],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))}checkBasicModeGroupHeaderWidth(){var t=this.table.rowManager.tableElement,e=!0;this.table.rowManager.getDisplayRows().forEach(((i,n)=>{this.table.rowManager.styleRow(i,n),t.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(e=!1)})),t.style.minWidth=e?this.table.columnManager.getWidth()+"px":""}}qj.moduleName="groupRows";class Kj extends dj{constructor(t){super(t),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(t,e,i){this.action("rowMove",t,{posFrom:t.getPosition(),posTo:e.getPosition(),to:e,after:i})}rowAdded(t,e,i,n){this.action("rowAdd",t,{data:e,pos:i,index:n})}rowDeleted(t){var e,i;this.table.options.groupBy?(e=(i=t.getComponent().getGroup()._getSelf().rows).indexOf(t))&&(e=i[e-1]):(e=t.table.rowManager.getRowIndex(t))&&(e=t.table.rowManager.rows[e-1]),this.action("rowDelete",t,{data:t.getData(),pos:!e,index:e})}cellUpdated(t){this.action("cellEdit",t,{oldValue:t.oldValue,newValue:t.value})}clear(){this.history=[],this.index=-1}action(t,e,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(t){var e=this.history.findIndex((function(e){return e.component===t}));e>-1&&(this.history.splice(e,1),e<=this.index&&this.index--,this.clearComponentHistory(t))}undo(){if(this.index>-1){let t=this.history[this.index];return Kj.undoers[t.type].call(this,t),this.index--,this.dispatchExternal("historyUndo",t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1}redo(){if(this.history.length-1>this.index){this.index++;let t=this.history[this.index];return Kj.redoers[t.type].call(this,t),this.dispatchExternal("historyRedo",t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1}_rebindRow(t,e){this.history.forEach((function(i){if(i.component instanceof Ij)i.component===t&&(i.component=e);else if(i.component instanceof Cj&&i.component.row===t){var n=i.component.column.getField();n&&(i.component=e.getCell(n))}}))}}Kj.moduleName="history",Kj.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue),t.component.cellRendered()},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowMove:function(t){var e=t.data.posFrom-t.data.posTo>0;this.table.rowManager.moveRowActual(t.component,this.table.rowManager.getRowFromPosition(t.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},Kj.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue),t.component.cellRendered()},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.getRowFromPosition(t.data.posTo),t.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}};class $j extends dj{constructor(t){super(t),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var t=this.table.originalElement,e=this.table.options,i=t.getElementsByTagName("th"),n=t.getElementsByTagName("tbody")[0],o=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(t,e),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var r=0;r<n.length;r++){var a=n[r].getElementsByTagName("td"),s={};this.hasIndex||(s[e.index]=r);for(var l=0;l<a.length;l++){var h=a[l];void 0!==this.fieldIndex[l]&&(s[this.fieldIndex[l]]=h.innerHTML)}o.push(s)}e.data=o,this.dispatchExternal("htmlImported")}_extractOptions(t,e,i){var n=t.attributes,o=i?Object.keys(i):Object.keys(e),r={};for(var a in o.forEach((t=>{r[t.toLowerCase()]=t})),n){var s,l=n[a];l&&"object"==typeof l&&l.name&&0===l.name.indexOf("tabulator-")&&(s=l.name.replace("tabulator-",""),void 0!==r[s]&&(e[r[s]]=this._attribValue(l.value)))}}_attribValue(t){return"true"===t||"false"!==t&&t}_findCol(t){return this.table.options.columns.find((e=>e.title===t))||!1}_extractHeaders(t,e){for(var i=0;i<t.length;i++){var n,o=t[i],r=!1,a=this._findCol(o.textContent);a?r=!0:a={title:o.textContent.trim()},a.field||(a.field=o.textContent.trim().toLowerCase().replaceAll(" ","_")),(n=o.getAttribute("width"))&&!a.width&&(a.width=n),this._extractOptions(o,a,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),r||this.table.options.columns.push(a)}}_generateBlankHeaders(t,e){for(var i=0;i<t.length;i++){var n=t[i],o={title:"",field:"col"+i};this.fieldIndex[i]=o.field;var r=n.getAttribute("width");r&&(o.width=r),this.table.options.columns.push(o)}}}$j.moduleName="htmlTableImport";var Jj={csv:function(t){var e=[],i=0,n=0,o=!1;for(let r=0;r<t.length;r++){let a=t[r],s=t[r+1];e[i]||(e[i]=[]),e[i][n]||(e[i][n]=""),'"'==a&&o&&'"'==s?(e[i][n]+=a,r++):'"'!=a?","!=a||o?"\r"!=a||"\n"!=s||o?"\r"!=a&&"\n"!=a||o?e[i][n]+=a:(n=0,i++):(n=0,i++,r++):n++:o=!o}return e},json:function(t){try{return JSON.parse(t)}catch(t){return console.warn("JSON Import Error - File contents is invalid JSON",t),Promise.reject()}},array:function(t){return t}};class Qj extends dj{constructor(t){super(t),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(t){return this.table.options.importFormat&&("string"==typeof t||Array.isArray(t)&&t.length&&Array.isArray(t))}loadData(t,e,i,n,o){return this.importData(this.lookupImporter(),t).then(this.structureData.bind(this)).catch((t=>(console.error("Import Error:",t||"Unable to import data"),Promise.reject(t))))}lookupImporter(t){var e;return t||(t=this.table.options.importFormat),(e="string"==typeof t?Qj.importers[t]:t)||console.error("Import Error - Importer not found:",t),e}importFromFile(t,e){var i=this.lookupImporter(t);if(i)return this.pickFile(e).then(this.importData.bind(this,i)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch((t=>(console.error("Import Error:",t||"Unable to import file"),Promise.reject(t))))}pickFile(t){return new Promise(((e,i)=>{var n=document.createElement("input");n.type="file",n.accept=t,n.addEventListener("change",(t=>{var o=n.files[0],r=new FileReader;switch(this.table.options.importReader){case"buffer":r.readAsArrayBuffer(o);break;case"binary":r.readAsBinaryString(o);break;case"url":r.readAsDataURL(o);break;default:r.readAsText(o)}r.onload=t=>{e(r.result)},r.onerror=t=>{console.warn("File Load Error - Unable to read file"),i()}})),n.click()}))}importData(t,e){var i=t.call(this.table,e);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(t){return Array.isArray(t)&&t.length&&Array.isArray(t[0])?this.table.options.autoColumns?this.structureArrayToObject(t):this.structureArrayToColumns(t):t}structureArrayToObject(t){var e=t.shift(),i=t.map((t=>{var i={};return e.forEach(((e,n)=>{i[e]=t[n]})),i}));return i}structureArrayToColumns(t){var e=[],i=this.table.getColumns();return i[0]&&t[0][0]&&i[0].getDefinition().title===t[0][0]&&t.shift(),t.forEach((t=>{var n={};t.forEach(((t,e)=>{var o=i[e];o&&(n[o.getField()]=t)})),e.push(n)})),e}setData(t){return this.table.setData(t)}}Qj.moduleName="import",Qj.importers=Jj;class tX extends dj{constructor(t){super(t),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){Object.values(this.touchWatchers).forEach((t=>{for(let e in t)t[e]=null}))}cellContentsSelectionFixer(t,e){var i;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==e){t.preventDefault();try{document.selection?((i=document.body.createTextRange()).moveToElementText(e.getElement()),i.select()):window.getSelection&&((i=document.createRange()).selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch(t){}}}initializeExternalEvents(){for(let t in this.eventMap)this.subscriptionChangeExternal(t,this.subscriptionChanged.bind(this,t))}subscriptionChanged(t,e){e?this.subscribers[t]||(this.eventMap[t].includes("-")?(this.subscribers[t]=this.handle.bind(this,t),this.subscribe(this.eventMap[t],this.subscribers[t])):this.subscribeTouchEvents(t)):this.eventMap[t].includes("-")?!this.subscribers[t]||this.columnSubscribers[t]||this.subscribedExternal(t)||(this.unsubscribe(this.eventMap[t],this.subscribers[t]),delete this.subscribers[t]):this.unsubscribeTouchEvents(t)}subscribeTouchEvents(t){var e=this.eventMap[t];this.touchSubscribers[e+"-touchstart"]||(this.touchSubscribers[e+"-touchstart"]=this.handleTouch.bind(this,e,"start"),this.touchSubscribers[e+"-touchend"]=this.handleTouch.bind(this,e,"end"),this.subscribe(e+"-touchstart",this.touchSubscribers[e+"-touchstart"]),this.subscribe(e+"-touchend",this.touchSubscribers[e+"-touchend"])),this.subscribers[t]=!0}unsubscribeTouchEvents(t){var e=!0,i=this.eventMap[t];if(this.subscribers[t]&&!this.subscribedExternal(t)){delete this.subscribers[t];for(let t in this.eventMap)this.eventMap[t]===i&&this.subscribers[t]&&(e=!1);e&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(t){var e=t.definition;for(let i in this.eventMap)e[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(t))}handle(t,e,i){this.dispatchEvent(t,e,i)}handleTouch(t,e,i,n){var o=this.touchWatchers[t];switch("column"===t&&(t="header"),e){case"start":o.tap=!0,clearTimeout(o.tapHold),o.tapHold=setTimeout((()=>{clearTimeout(o.tapHold),o.tapHold=null,o.tap=null,clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(t+"TapHold",i,n)}),1e3);break;case"end":o.tap&&(o.tap=null,this.dispatchEvent(t+"Tap",i,n)),o.tapDbl?(clearTimeout(o.tapDbl),o.tapDbl=null,this.dispatchEvent(t+"DblTap",i,n)):o.tapDbl=setTimeout((()=>{clearTimeout(o.tapDbl),o.tapDbl=null}),300),clearTimeout(o.tapHold),o.tapHold=null}}dispatchEvent(t,e,i){var n,o=i.getComponent();this.columnSubscribers[t]&&(i instanceof Cj?n=i.column.definition[t]:i instanceof Tj&&(n=i.definition[t]),n&&n(e,o)),this.dispatchExternal(t,e,o)}}tX.moduleName="interaction";class eX extends dj{constructor(t){super(t),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var t=this.table.options.keybindings,e={};this.watchKeys={},this.pressedKeys=[],!1!==t&&(Object.assign(e,eX.bindings),Object.assign(e,t),this.mapBindings(e),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(t){for(let e in t)eX.actions[e]?t[e]&&("object"!=typeof t[e]&&(t[e]=[t[e]]),t[e].forEach((t=>{(Array.isArray(t)?t:[t]).forEach((t=>{this.mapBinding(e,t)}))}))):console.warn("Key Binding Error - no such action:",e)}mapBinding(t,e){var i={action:eX.actions[t],keys:[],ctrl:!1,shift:!1,meta:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach((t=>{switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:t=isNaN(t)?t.toUpperCase().charCodeAt(0):parseInt(t),i.keys.push(t),this.watchKeys[t]||(this.watchKeys[t]=[]),this.watchKeys[t].push(i)}}))}bindEvents(){var t=this;this.keyupBinding=function(e){var i=e.keyCode,n=t.watchKeys[i];n&&(t.pressedKeys.push(i),n.forEach((function(i){t.checkBinding(e,i)})))},this.keydownBinding=function(e){var i=e.keyCode;if(t.watchKeys[i]){var n=t.pressedKeys.indexOf(i);n>-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(t,e){var i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach((t=>{-1==this.pressedKeys.indexOf(t)&&(i=!1)})),i&&e.action.call(this,t),!0)}}eX.moduleName="keybindings",eX.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"],copyToClipboard:["ctrl + 67","meta + 67"]},eX.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.element.clientHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.element.clientHeight,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){this.dispatch("keybinding-nav-prev",t)},navNext:function(t){this.dispatch("keybinding-nav-next",t)},navLeft:function(t){this.dispatch("keybinding-nav-left",t)},navRight:function(t){this.dispatch("keybinding-nav-right",t)},navUp:function(t){this.dispatch("keybinding-nav-up",t)},navDown:function(t){this.dispatch("keybinding-nav-down",t)},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}};class iX extends dj{constructor(t){super(t),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("menuContainer",void 0),this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheck("menuContainer","popupContainer")||(this.table.options.popupContainer=this.table.options.menuContainer)}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(t){var e=t.definition;e.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),e.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),e.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),e.headerMenu&&this.initializeColumnHeaderMenu(t),e.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),e.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),e.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(t){var e,i=t.definition.headerMenuIcon;(e=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(t.getComponent())),i instanceof HTMLElement?e.appendChild(i):e.innerHTML=i):e.innerHTML="⋮",e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),this.loadMenuEvent(t.definition.headerMenu,e,t)})),t.titleElement.insertBefore(e,t.titleElement.firstChild)}loadMenuTableCellEvent(t,e,i){i._cell&&(i=i._cell),i.column.definition[t]&&this.loadMenuEvent(i.column.definition[t],e,i)}loadMenuTableColumnEvent(t,e,i){i._column&&(i=i._column),i.definition[t]&&this.loadMenuEvent(i.definition[t],e,i)}loadMenuEvent(t,e,i){i._group?i=i._group:i._row&&(i=i._row),t="function"==typeof t?t.call(this.table,e,i.getComponent()):t,this.loadMenu(e,i,t)}loadMenu(t,e,i,n,o){var r,a=!(t instanceof MouseEvent),s=document.createElement("div");if(s.classList.add("tabulator-menu"),a||t.preventDefault(),i&&i.length){if(n)r=o.child(s);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=r=this.popup(s)}i.forEach((t=>{var i=document.createElement("div"),n=t.label,o=t.disabled;t.separator?i.classList.add("tabulator-menu-separator"):(i.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n.call(this.table,e.getComponent())),n instanceof Node?i.appendChild(n):i.innerHTML=n,"function"==typeof o&&(o=o.call(this.table,e.getComponent())),o?(i.classList.add("tabulator-menu-item-disabled"),i.addEventListener("click",(t=>{t.stopPropagation()}))):t.menu&&t.menu.length?i.addEventListener("click",(n=>{n.stopPropagation(),this.loadMenu(n,e,t.menu,i,r)})):t.action&&i.addEventListener("click",(i=>{t.action(i,e.getComponent())})),t.menu&&t.menu.length&&i.classList.add("tabulator-menu-item-submenu")),s.appendChild(i)})),s.addEventListener("click",(t=>{this.rootPopup&&this.rootPopup.hide()})),r.show(n||t),r===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=e,this.dispatchExternal("menuOpened",e.getComponent()))}}}iX.moduleName="menu";class nX extends dj{constructor(t){super(t),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t}initialize(){this.table.options.movableColumns&&this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(t){var e,i=this,n={};t.modules.frozen||t.isGroup||(e=t.getElement(),n.mousemove=function(n){t.parent===i.moving.parent&&((i.touchMove?n.touches[0].pageX:n.pageX)-uj.elOffset(e).left+i.table.columnManager.contentsElement.scrollLeft>t.getWidth()/2?i.toCol===t&&i.toColAfter||(e.parentNode.insertBefore(i.placeholderElement,e.nextSibling),i.moveColumn(t,!0)):(i.toCol!==t||i.toColAfter)&&(e.parentNode.insertBefore(i.placeholderElement,e),i.moveColumn(t,!1)))}.bind(i),e.addEventListener("mousedown",(function(e){i.touchMove=!1,1===e.which&&(i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),i.bindTouchEvents(t)),t.modules.moveColumn=n}bindTouchEvents(t){var e,i,n,o,r,a,s=t.getElement(),l=!1;s.addEventListener("touchstart",(s=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,e=t.nextColumn(),n=e?e.getWidth()/2:0,i=t.prevColumn(),o=i?i.getWidth()/2:0,r=0,a=0,l=!1,this.startMove(s,t)}),this.checkPeriod)}),{passive:!0}),s.addEventListener("touchmove",(s=>{var h,u;this.moving&&(this.moveHover(s),l||(l=s.touches[0].pageX),(h=s.touches[0].pageX-l)>0?e&&h-r>n&&(u=e)!==t&&(l=s.touches[0].pageX,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement().nextSibling),this.moveColumn(u,!0)):i&&-h-a>o&&(u=i)!==t&&(l=s.touches[0].pageX,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement()),this.moveColumn(u,!1)),u&&(e=u.nextColumn(),r=n,n=e?e.getWidth()/2:0,i=u.prevColumn(),a=o,o=i?i.getWidth()/2:0))}),{passive:!0}),s.addEventListener("touchend",(t=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(t)}))}startMove(t,e){var i=e.getElement(),n=this.table.columnManager.getContentsElement(),o=this.table.columnManager.getHeadersElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-uj.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),n.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-o.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}))}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}))}moveColumn(t,e){var i=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach((function(t,e){var n=t.getElement(!0);n.parentNode&&i[e]&&n.parentNode.insertBefore(i[e].getElement(),n.nextSibling)})):t.getCells().forEach((function(t,e){var n=t.getElement(!0);n.parentNode&&i[e]&&n.parentNode.insertBefore(i[e].getElement(),n)}))}endMove(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(t){var e,i=this.table.columnManager.getContentsElement(),n=i.scrollLeft,o=(this.touchMove?t.touches[0].pageX:t.pageX)-uj.elOffset(i).left+n;this.hoverElement.style.left=o-this.startX+"px",o-n<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout((()=>{e=Math.max(0,n-5),this.table.rowManager.getElement().scrollLeft=e,this.autoScrollTimeout=!1}),1))),n+i.clientWidth-o<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout((()=>{e=Math.min(i.clientWidth,n+5),this.table.rowManager.getElement().scrollLeft=e,this.autoScrollTimeout=!1}),1)))}}nX.moduleName="moveColumn";class oX extends dj{constructor(t){super(t),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.classList.add("tabulator-row-placeholder"),t}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(t){var e=this,i={};i.mouseup=function(i){e.tableRowDrop(i,t)}.bind(e),i.mousemove=function(i){var n;i.pageY-uj.elOffset(t.element).top+e.table.rowManager.element.scrollTop>t.getHeight()/2?e.toRow===t&&e.toRowAfter||((n=t.getElement()).parentNode.insertBefore(e.placeholderElement,n.nextSibling),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(n=t.getElement()).previousSibling&&(n.parentNode.insertBefore(e.placeholderElement,n),e.moveRow(t,!1))}.bind(e),t.modules.moveRow=i}initializeRow(t){var e,i=this,n={};n.mouseup=function(e){i.tableRowDrop(e,t)}.bind(i),n.mousemove=function(e){var n=t.getElement();e.pageY-uj.elOffset(n).top+i.table.rowManager.element.scrollTop>t.getHeight()/2?i.toRow===t&&i.toRowAfter||(n.parentNode.insertBefore(i.placeholderElement,n.nextSibling),i.moveRow(t,!0)):(i.toRow!==t||i.toRowAfter)&&(n.parentNode.insertBefore(i.placeholderElement,n),i.moveRow(t,!1))}.bind(i),this.hasHandle||((e=t.getElement()).addEventListener("mousedown",(function(e){1===e.which&&(i.checkTimeout=setTimeout((function(){i.startMove(e,t)}),i.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&i.checkTimeout&&clearTimeout(i.checkTimeout)})),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=n}initializeColumn(t){t.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}initializeCell(t){if(t.column.definition.rowHandle&&!1!==this.table.options.movableRows){var e=this,i=t.getElement(!0);i.addEventListener("mousedown",(function(i){1===i.which&&(e.checkTimeout=setTimeout((function(){e.startMove(i,t.row)}),e.checkPeriod))})),i.addEventListener("mouseup",(function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})),this.bindTouchEvents(t.row,i)}}bindTouchEvents(t,e){var i,n,o,r,a,s,l=!1;e.addEventListener("touchstart",(e=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,i=t.nextRow(),o=i?i.getHeight()/2:0,n=t.prevRow(),r=n?n.getHeight()/2:0,a=0,s=0,l=!1,this.startMove(e,t)}),this.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",(e=>{var h,u;this.moving&&(e.preventDefault(),this.moveHover(e),l||(l=e.touches[0].pageY),(h=e.touches[0].pageY-l)>0?i&&h-a>o&&(u=i)!==t&&(l=e.touches[0].pageY,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement().nextSibling),this.moveRow(u,!0)):n&&-h-s>r&&(u=n)!==t&&(l=e.touches[0].pageY,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement()),this.moveRow(u,!1)),u&&(i=u.nextRow(),a=o,o=i?i.getHeight()/2:0,n=u.prevRow(),s=r,r=n?n.getHeight()/2:0))})),e.addEventListener("touchend",(t=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(t),this.touchMove=!1)}))}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach((t=>{("row"===t.type||"group"===t.type)&&t.modules.moveRow&&t.modules.moveRow.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}))}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach((t=>{("row"===t.type||"group"===t.type)&&t.modules.moveRow&&t.modules.moveRow.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}))}startMove(t,e){var i=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",e.getComponent()),this.moveHover(t)}setStartPosition(t,e){var i,n,o=this.touchMove?t.touches[0].pageX:t.pageX,r=this.touchMove?t.touches[0].pageY:t.pageY;i=e.getElement(),this.connection?(n=i.getBoundingClientRect(),this.startX=n.left-o+window.pageXOffset,this.startY=n.top-r+window.pageYOffset):this.startY=r-i.getBoundingClientRect().top}endMove(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(t,e){this.toRow=t,this.toRowAfter=e}moveHover(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)}moveHoverTable(t){var e=this.table.rowManager.getElement(),i=e.scrollTop,n=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(n-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"}elementRowDrop(t,e,i){this.dispatchExternal("movableRowsElementDrop",t,e,!!i&&i.getComponent())}connectToTables(t){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",e),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:t})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((t=>{"string"==typeof t?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t))):this.connectionElements.push(t)})),this.connectionElements.forEach((t=>{var e=e=>{this.elementRowDrop(e,t,this.moving)};t.addEventListener("mouseup",e),t.tabulatorElementDropEvent=e,t.classList.add("tabulator-movingrow-receiving")})))}disconnectFromTables(){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",t),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent}))}connect(t,e){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((t=>{"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",e,t),!0)}disconnect(t){t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((t=>{"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",t)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(t,e,i){var n=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving?this.moving.getComponent():void 0,e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()}tableRowDrop(t,e){var i=!1,n=!1;switch(t.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=this.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver}i?n=i.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:e,success:n})}commsReceived(t,e,i){switch(e){case"connect":return this.connect(t,i.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,i.row,i.success)}}}oX.prototype.receivers={insert:function(t,e,i){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,i){return this.table.addRow(t.getData()),!0},update:function(t,e,i){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,i){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},oX.prototype.senders={delete:function(t,e,i){t.delete()}},oX.moduleName="moveRow";class rX extends dj{constructor(t){super(t),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(t,e,i){return this.transformRow(e,"data",i)}initializeColumn(t){var e=!1,i={};this.allowedTypes.forEach((n=>{var o,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(o=this.lookupMutator(t.definition[r]))&&(e=!0,i[r]={mutator:o,params:t.definition[r+"Params"]||{}})})),e&&(t.modules.mutate=i)}lookupMutator(t){var e=!1;switch(typeof t){case"string":rX.mutators[t]?e=rX.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e}transformRow(t,e,i){var n,o="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&this.table.columnManager.traverse((r=>{var a,s,l;r.modules.mutate&&(a=r.modules.mutate[o]||r.modules.mutate.mutator||!1)&&(n=r.getFieldValue(void 0!==i?i:t),("data"==e&&!i||void 0!==n)&&(l=r.getComponent(),s="function"==typeof a.params?a.params(n,t,e,l):a.params,r.setFieldValue(t,a.mutator(n,t,e,s,l))))})),t}transformCell(t,e){if(t.column.modules.mutate){var i=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,t.row.getData()),t.column.setFieldValue(n,e),i.mutator(e,n,"edit",i.params,t.getComponent())}return e}mutateLink(t){var e=t.column.definition.mutateLink;e&&(Array.isArray(e)||(e=[e]),e.forEach((e=>{var i=t.row.getCell(e);i&&i.setValue(i.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}rX.moduleName="mutator",rX.mutators={};var aX={rows:function(t,e,i,n,o){var r=document.createElement("span"),a=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),u=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(t=>{a.innerHTML=t})),this.table.modules.localize.langBind("pagination|counter|of",(t=>{l.innerHTML=t})),this.table.modules.localize.langBind("pagination|counter|rows",(t=>{u.innerHTML=t})),n?(s.innerHTML=" "+e+"-"+Math.min(e+t-1,n)+" ",h.innerHTML=" "+n+" ",r.appendChild(a),r.appendChild(s),r.appendChild(l),r.appendChild(h),r.appendChild(u)):(s.innerHTML=" 0 ",r.appendChild(a),r.appendChild(s),r.appendChild(u)),r},pages:function(t,e,i,n,o){var r=document.createElement("span"),a=document.createElement("span"),s=document.createElement("span"),l=document.createElement("span"),h=document.createElement("span"),u=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(t=>{a.innerHTML=t})),s.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|of",(t=>{l.innerHTML=t})),h.innerHTML=" "+o+" ",this.table.modules.localize.langBind("pagination|counter|pages",(t=>{u.innerHTML=t})),r.appendChild(a),r.appendChild(s),r.appendChild(l),r.appendChild(h),r.appendChild(u),r}};class sX extends dj{constructor(t){super(t),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(t,e){var i,n=this.table.rowManager,o=n.getDisplayRows();return e?o.length?i=o[0]:n.activeRows.length&&(i=n.activeRows[n.activeRows.length-1],e=!1):o.length&&(i=o[o.length-1],e=!(o.length<this.size)),{index:i,top:e}}calculatePageSizes(){var t,e;this.table.options.paginationSize?this.size=this.table.options.paginationSize:((t=document.createElement("div")).classList.add("tabulator-row"),t.style.visibility="hidden",(e=document.createElement("div")).classList.add("tabulator-cell"),e.innerHTML="Page Row Test",t.appendChild(e),this.table.rowManager.getTableElement().appendChild(t),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/t.offsetHeight),this.table.rowManager.getTableElement().removeChild(t)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(t,e,i,n){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),n.page=this.page,this.size&&(n.size=this.size),n}userSetPageToRow(t){return this.table.options.pagination&&(t=this.rowManager.findRow(t))?this.setPageToRow(t):Promise.reject()}userSetPageSize(t){return!!this.table.options.pagination&&(this.setPageSize(t),this.setPage(1))}scrollVertical(t,e){var i;e||this.table.dataLoader.loading||(i=this.table.rowManager.getElement()).scrollHeight-i.clientHeight-t<(this.table.options.progressiveLoadScrollMargin||2*i.clientHeight)&&this.nextPage().catch((()=>{}))}restOnRenderBefore(t,e){return e||"local"===this.mode&&this.reset(),t}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(t=document.createElement("button")).classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(let e=1;e<5;e++)t.push(this.size*e);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach((t=>{var e=document.createElement("option");e.value=t,!0===t?this.langBind("pagination|all",(function(t){e.innerHTML=t})):e.innerHTML=t,this.pageSizeSelect.appendChild(e)})),this.pageSizeSelect.value=this.size}}initializePageCounter(){var t=this.table.options.paginationCounter,e=null;t&&((e="function"==typeof t?t:sX.pageCounters[t])?(this.pageCounter=e,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",t))}initializePaginator(t){var e,i;t||(this.langBind("pagination|first",(t=>{this.firstBut.innerHTML=t})),this.langBind("pagination|first_title",(t=>{this.firstBut.setAttribute("aria-label",t),this.firstBut.setAttribute("title",t)})),this.langBind("pagination|prev",(t=>{this.prevBut.innerHTML=t})),this.langBind("pagination|prev_title",(t=>{this.prevBut.setAttribute("aria-label",t),this.prevBut.setAttribute("title",t)})),this.langBind("pagination|next",(t=>{this.nextBut.innerHTML=t})),this.langBind("pagination|next_title",(t=>{this.nextBut.setAttribute("aria-label",t),this.nextBut.setAttribute("title",t)})),this.langBind("pagination|last",(t=>{this.lastBut.innerHTML=t})),this.langBind("pagination|last_title",(t=>{this.lastBut.setAttribute("aria-label",t),this.lastBut.setAttribute("title",t)})),this.firstBut.addEventListener("click",(()=>{this.setPage(1)})),this.prevBut.addEventListener("click",(()=>{this.previousPage()})),this.nextBut.addEventListener("click",(()=>{this.nextPage()})),this.lastBut.addEventListener("click",(()=>{this.setPage(this.max)})),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),this.langBind("pagination|page_size",(t=>{this.pageSizeSelect.setAttribute("aria-label",t),this.pageSizeSelect.setAttribute("title",t),e.innerHTML=t})),this.element.appendChild(e),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",(t=>{this.setPageSize("true"==this.pageSizeSelect.value||this.pageSizeSelect.value),this.setPage(1)}))),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):"string"==typeof this.table.options.paginationCounterElement&&((i=document.querySelector(this.table.options.paginationCounterElement))?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(t){this.initializePaginator(!0),this.mode="progressive_"+t,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(t){this.max=t?!0===this.size?1:Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)}reset(t){this.initialLoad||("local"==this.mode||t)&&(this.page=1,this.trackChanges())}setMaxPage(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(t){switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(t=parseInt(t))>0&&t<=this.max||"local"!==this.mode?(this.page=t,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",t),Promise.reject())}setPageToRow(t){var e=this.displayRows(-1).indexOf(t);if(e>-1){var i=!0===this.size?1:Math.ceil((e+1)/this.size);return this.setPage(i)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(t){!0!==t&&(t=parseInt(t)),t>0&&(this.size=t,this.dispatchExternal("pageSizeChanged",t)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(t,e,i){var n;if(this.pageCounter)switch("remote"===this.mode&&(e=this.size,i=(this.page-1)*this.size+1,t=this.remoteRowCountEstimate),typeof(n=this.pageCounter.call(this,e,i,this.page,t,this.max))){case"object":if(n instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(n)}else this.pageCounterElement.innerHTML="",null!=n&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",n);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=n}}_setPageButtons(){let t=Math.floor((this.count-1)/2),e=Math.ceil((this.count-1)/2),i=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),n=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);1==this.page?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let t=i;t<=n;t++)t>0&&t<=this.max&&this.pagesElement.appendChild(this._generatePageButton(t));this.footerRedraw()}_generatePageButton(t){var e=document.createElement("button");return e.classList.add("tabulator-page"),t==this.page&&e.classList.add("active"),e.setAttribute("type","button"),e.setAttribute("role","button"),this.langBind("pagination|page_title",(i=>{e.setAttribute("aria-label",i+" "+t),e.setAttribute("title",i+" "+t)})),e.setAttribute("data-page",t),e.textContent=t,e.addEventListener("click",(e=>{this.setPage(t)})),e}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(t){return this.size}getMode(){return this.mode}getRows(t){var e,i,n,o,r=0,a=t.filter((t=>"row"===t.type));if("local"==this.mode){e=[],this.setMaxRows(t.length),!0===this.size?(i=0,n=t.length):n=(i=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(let a=i;a<n;a++){let i=t[a];i&&(e.push(i),"row"===i.type&&(o||(o=i),r++))}return this._setPageCounter(a.length,r,o?a.indexOf(o)+1:0),e}return this._setPageButtons(),this._setPageCounter(a.length),t.slice(0)}trigger(){var t;switch(this.mode){case"local":return t=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(t),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally((()=>{this.dataChanging=!1}));case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(t){var e;if(void 0===t.last_page&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),t.data){if(this.max=parseInt(t.last_page)||1,this.remoteRowCountEstimate=void 0!==t.last_row?t.last_row:t.last_page*this.size-(this.page==t.last_page?this.size-t.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(t.data,!1,1==this.page):this.table.rowManager.addRows(t.data),this.page<this.max&&setTimeout((()=>{this.nextPage()}),this.table.options.progressiveLoadDelay);break;case"progressive_scroll":t=1===this.page?t.data:this.table.rowManager.getData().concat(t.data),this.table.rowManager.setData(t,1!==this.page,1==this.page),e=this.table.options.progressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+e&&this.page<this.max&&setTimeout((()=>{this.nextPage()}))}return!1}this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return t.data}footerRedraw(){var t=this.table.footerManager.containerElement;Math.ceil(t.clientWidth)-t.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(t.clientWidth)-t.scrollWidth<0&&(this.pagesElement.style.display="none"))}}sX.moduleName="page",sX.pageCounters=aX;var lX={local:function(t,e){var i=localStorage.getItem(t+"-"+e);return!!i&&JSON.parse(i)},cookie:function(t,e){var i,n,o=document.cookie,r=t+"-"+e,a=o.indexOf(r+"=");return a>-1&&((i=(o=o.slice(a)).indexOf(";"))>-1&&(o=o.slice(0,i)),n=o.replace(r+"=","")),!!n&&JSON.parse(n)}},hX={local:function(t,e,i){localStorage.setItem(t+"-"+e,JSON.stringify(i))},cookie:function(t,e,i){var n=new Date;n.setDate(n.getDate()+1e4),document.cookie=t+"-"+e+"="+JSON.stringify(i)+"; expires="+n.toUTCString()}};class uX extends dj{constructor(t){super(t),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var t="_tabulator_test";try{return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}initialize(){if(this.table.options.persistence){var t,e=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==e?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:uX.readers[this.table.options.persistenceReaderFunc]?this.readFunc=uX.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):uX.readers[this.mode]?this.readFunc=uX.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:uX.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=uX.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):uX.writers[this.mode]?this.writeFunc=uX.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,headerFilter:!0===this.table.options.persistence||this.table.options.persistence.headerFilter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(t=this.retrieveData("page"))&&(void 0===t.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=t.paginationSize),void 0===t.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=t.paginationInitialPage)),this.config.group&&(t=this.retrieveData("group"))&&(void 0===t.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=t.groupBy),void 0===t.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=t.groupStartOpen),void 0===t.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=t.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(t){this.config[t]&&this.save(t)}tableBuilt(){var t,e,i;this.config.sort&&0==!(t=this.load("sort"))&&(this.table.options.initialSort=t),this.config.filter&&0==!(e=this.load("filter"))&&(this.table.options.initialFilter=e),this.config.headerFilter&&0==!(i=this.load("headerFilter"))&&(this.table.options.initialHeaderFilter=i)}tableRedraw(t){t&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(t){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,t)),!0}initializeColumn(t){var e;this.config.columns&&(this.defWatcherBlock=!0,e=t.getDefinition(),(!0===this.config.columns?Object.keys(e):this.config.columns).forEach((t=>{var i=Object.getOwnPropertyDescriptor(e,t),n=e[t];i&&Object.defineProperty(e,t,{set:t=>{n=t,this.defWatcherBlock||this.save("columns"),i.set&&i.set(t)},get:()=>(i.get&&i.get(),n)})})),this.defWatcherBlock=!1)}load(t,e){var i=this.retrieveData(t);return e&&(i=i?this.mergeDefinition(e,i):e),i}retrieveData(t){return!!this.readFunc&&this.readFunc(this.id,t)}mergeDefinition(t,e){var i=[];return(e=e||[]).forEach(((e,n)=>{var o,r=this._findColumn(t,e);r&&(!0===this.config.columns||null==this.config.columns?(o=Object.keys(r)).push("width"):o=this.config.columns,o.forEach((t=>{"columns"!==t&&void 0!==e[t]&&(r[t]=e[t])})),r.columns&&(r.columns=this.mergeDefinition(r.columns,e.columns)),i.push(r))})),t.forEach(((t,n)=>{this._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))})),i}_findColumn(t,e){var i=e.columns?"group":e.field?"field":"object";return t.find((function(t){switch(i){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}}))}save(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"headerFilter":e=this.table.modules.filter.getHeaderFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort());break;case"group":e=this.getGroupConfig();break;case"page":e=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,t,e)}validateSorters(t){return t.forEach((function(t){t.column=t.field,delete t.field})),t}getGroupConfig(){var t={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(t.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(t.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(t.groupHeader=this.table.options.groupHeader)),t}getPageConfig(){var t={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(t.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(t.paginationInitialPage=this.table.modules.page.getPage())),t}parseColumns(t){var e=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return t.forEach((t=>{var n,o={},r=t.getDefinition();t.isGroup?(o.title=r.title,o.columns=this.parseColumns(t.getColumns())):(o.field=t.getField(),!0===this.config.columns||null==this.config.columns?((n=Object.keys(r)).push("width"),n.push("visible")):n=this.config.columns,n.forEach((e=>{switch(e){case"width":o.width=t.getWidth();break;case"visible":o.visible=t.visible;break;default:"function"!=typeof r[e]&&-1===i.indexOf(e)&&(o[e]=r[e])}}))),e.push(o)})),e}}uX.moduleName="persistence",uX.moduleInitOrder=-10,uX.readers=lX,uX.writers=hX;class cX extends dj{constructor(t){super(t),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(t,e,i){this.loadPopupEvent(e,null,t,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(t){var e=t.definition;e.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),e.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),e.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),e.headerPopup&&this.initializeColumnHeaderPopup(t),e.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),e.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),e.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(t){var e,i=t.definition.headerPopupIcon;(e=document.createElement("span")).classList.add("tabulator-header-popup-button"),i?("function"==typeof i&&(i=i(t.getComponent())),i instanceof HTMLElement?e.appendChild(i):e.innerHTML=i):e.innerHTML="⋮",e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault(),this.loadPopupEvent(t.definition.headerPopup,e,t)})),t.titleElement.insertBefore(e,t.titleElement.firstChild)}loadPopupTableCellEvent(t,e,i){i._cell&&(i=i._cell),i.column.definition[t]&&this.loadPopupEvent(i.column.definition[t],e,i)}loadPopupTableColumnEvent(t,e,i){i._column&&(i=i._column),i.definition[t]&&this.loadPopupEvent(i.definition[t],e,i)}loadPopupEvent(t,e,i,n){var o;i._group?i=i._group:i._row&&(i=i._row),t="function"==typeof t?t.call(this.table,e,i.getComponent(),(function(t){o=t})):t,this.loadPopup(e,i,t,o,n)}loadPopup(t,e,i,n,o){var r,a,s=!(t instanceof MouseEvent);i instanceof HTMLElement?r=i:(r=document.createElement("div")).innerHTML=i,r.classList.add("tabulator-popup"),r.addEventListener("click",(t=>{t.stopPropagation()})),s||t.preventDefault(),a=this.popup(r),"function"==typeof n&&a.renderCallback(n),t?a.show(t):a.show(e.getElement(),o||"center"),a.hideOnBlur((()=>{this.dispatchExternal("popupClosed",e.getComponent())})),this.dispatchExternal("popupOpened",e.getComponent())}}cX.moduleName="popup";class dX extends dj{constructor(t){super(t),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(t,e,i){var n,o,r=window.scrollX,a=window.scrollY,s=document.createElement("div"),l=document.createElement("div"),h=this.table.modules.export.generateTable(void 0!==i?i:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),"string"==typeof(n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(h),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(o="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=o:l.appendChild(o),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,h),window.print(),this.cleanup(),window.scrollTo(r,a),this.manualBlock=!1}}dX.moduleName="print";class pX extends dj{constructor(t){super(t),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(t){var e,i=this;this.currentVersion++,e=this.currentVersion,this.unwatchData(),this.data=t,this.origFuncs.push=t.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n,o=Array.from(arguments);return i.blocked||e!==i.currentVersion||(i.block("data-push"),o.forEach((t=>{i.table.rowManager.addRowActual(t,!1)})),n=i.origFuncs.push.apply(t,arguments),i.unblock("data-push")),n}}),this.origFuncs.unshift=t.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n,o=Array.from(arguments);return i.blocked||e!==i.currentVersion||(i.block("data-unshift"),o.forEach((t=>{i.table.rowManager.addRowActual(t,!0)})),n=i.origFuncs.unshift.apply(t,arguments),i.unblock("data-unshift")),n}}),this.origFuncs.shift=t.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n,o;return i.blocked||e!==i.currentVersion||(i.block("data-shift"),i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[0]))&&n.deleteActual(),o=i.origFuncs.shift.call(t),i.unblock("data-shift")),o}}),this.origFuncs.pop=t.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n,o;return i.blocked||e!==i.currentVersion||(i.block("data-pop"),i.data.length&&(n=i.table.rowManager.getRowFromDataObject(i.data[i.data.length-1]))&&n.deleteActual(),o=i.origFuncs.pop.call(t),i.unblock("data-pop")),o}}),this.origFuncs.splice=t.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n,o,r=Array.from(arguments),a=r[0]<0?t.length+r[0]:r[0],s=r[1],l=!!r[2]&&r.slice(2);if(!i.blocked&&e===i.currentVersion){if(i.block("data-splice"),l&&((n=!!t[a]&&i.table.rowManager.getRowFromDataObject(t[a]))?l.forEach((t=>{i.table.rowManager.addRowActual(t,!0,n,!0)})):(l=l.slice().reverse()).forEach((t=>{i.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==s){var h=t.slice(a,void 0===r[1]?r[1]:a+s);h.forEach(((t,e)=>{var n=i.table.rowManager.getRowFromDataObject(t);n&&n.deleteActual(e!==h.length-1)}))}(l||0!==s)&&i.table.rowManager.reRenderInPosition(),o=i.origFuncs.splice.apply(t,arguments),i.unblock("data-splice")}return o}})}unwatchData(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(t){var e=t.getData();for(var i in e)this.watchKey(t,e,i);this.table.options.dataTree&&this.watchTreeChildren(t)}watchTreeChildren(t){var e=this,i=t.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!e.blocked){e.block("tree-push");var o=n.push.apply(i,arguments);this.rebuildTree(t),e.unblock("tree-push")}return o}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!e.blocked){e.block("tree-unshift");var o=n.unshift.apply(i,arguments);this.rebuildTree(t),e.unblock("tree-unshift")}return o}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!e.blocked){e.block("tree-shift");var o=n.shift.call(i);this.rebuildTree(t),e.unblock("tree-shift")}return o}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!e.blocked){e.block("tree-pop");var o=n.pop.call(i);this.rebuildTree(t),e.unblock("tree-pop")}return o}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!e.blocked){e.block("tree-splice");var o=n.splice.apply(i,arguments);this.rebuildTree(t),e.unblock("tree-splice")}return o}}))}rebuildTree(t){this.table.modules.dataTree.initializeRow(t),this.table.modules.dataTree.layoutRow(t),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(t,e,i){var n=this,o=Object.getOwnPropertyDescriptor(e,i),r=e[i],a=this.currentVersion;Object.defineProperty(e,i,{set:e=>{if(r=e,!n.blocked&&a===n.currentVersion){n.block("key");var s={};s[i]=e,t.updateData(s),n.unblock("key")}o.set&&o.set(e)},get:()=>(o.get&&o.get(),r)})}unwatchRow(t){var e=t.getData();for(var i in e)Object.defineProperty(e,i,{value:e[i]})}block(t){this.blocked||(this.blocked=t)}unblock(t){this.blocked===t&&(this.blocked=!1)}}pX.moduleName="reactiveData";class fX extends dj{constructor(t){super(t),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(t){"row"===t.row.type&&(this.deInitializeComponent(t),this.initializeColumn("cell",t,t.column,t.element))}layoutColumnHeader(t){t.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(t),this.initializeColumn("header",t,t,t.element))}columnLayoutUpdated(t){var e=t.prevColumn();this.reinitializeColumn(t),e&&this.reinitializeColumn(e)}columnWidthUpdated(t){t.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(t)?this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.reinitializeColumn(t)})):this.table.modules.frozenColumns.rightColumns.includes(t)&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.reinitializeColumn(t)})))}frozenColumnOffset(t){var e=!1;return t.modules.frozen&&(e=t.modules.frozen.marginValue,"left"===t.modules.frozen.position?e+=t.getWidth()-3:e&&(e-=3)),!1!==e&&e+"px"}reinitializeColumn(t){var e=this.frozenColumnOffset(t);t.cells.forEach((i=>{i.modules.resize&&i.modules.resize.handleEl&&(e&&(i.modules.resize.handleEl.style[t.modules.frozen.position]=e,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))})),t.modules.resize&&t.modules.resize.handleEl&&(e&&(t.modules.resize.handleEl.style[t.modules.frozen.position]=e),t.element.after(t.modules.resize.handleEl))}initializeColumn(t,e,i,n){var o=this,r=i.definition.resizable,a={},s=i.getLastColumn();if("header"===t&&(a={variableHeight:"textarea"==i.definition.formatter||i.definition.variableHeight}),(!0===r||r==t)&&this._checkResizability(s)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(t){t.stopPropagation()}));var h=function(t){o.startColumn=i,o.initialNextColumn=o.nextColumn=s.nextColumn(),o._mouseDown(t,s,l)};l.addEventListener("mousedown",h),l.addEventListener("touchstart",h,{passive:!0}),l.addEventListener("dblclick",(t=>{var e=s.getWidth();t.stopPropagation(),s.reinitializeWidth(!0),e!==s.getWidth()&&(o.dispatch("column-resized",s),o.table.externalEvents.dispatch("columnResized",s.getComponent()))})),i.modules.frozen&&(l.style.position="sticky",l.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),a.handleEl=l,n.parentNode&&i.visible&&n.after(l)}e.modules.resize=a}deInitializeColumn(t){this.deInitializeComponent(t),t.cells.forEach((t=>{this.deInitializeComponent(t)}))}deInitializeComponent(t){var e;t.modules.resize&&(e=t.modules.resize.handleEl)&&e.parentElement&&e.parentElement.removeChild(e)}resizeHandle(t,e){t.modules.resize&&t.modules.resize.handleEl&&(t.modules.resize.handleEl.style.height=e)}_checkResizability(t){return t.definition.resizable}_mouseDown(t,e,i){var n=this;function o(t){var i,o,r=void 0===t.screenX?t.touches[0].screenX:t.screenX,a=r-n.startX,s=r-n.latestX;if(n.latestX=r,n.table.rtl&&(a=-a,s=-s),i=e.width==e.minWidth||e.width==e.maxWidth,e.setWidth(n.startWidth+a),o=e.width==e.minWidth||e.width==e.maxWidth,s<0&&(n.nextColumn=n.initialNextColumn),n.table.options.resizableColumnFit&&n.nextColumn&&(!i||!o)){let t=n.nextColumn.getWidth();s>0&&t<=n.nextColumn.minWidth&&(n.nextColumn=n.nextColumn.nextColumn()),n.nextColumn&&n.nextColumn.setWidth(n.nextColumn.getWidth()-s)}n.table.columnManager.rerenderColumns(!0),!n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function r(t){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",r),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",r),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==e.getWidth()&&(n.table.columnManager.verticalAlignHeaders(),n.dispatch("column-resized",e),n.table.externalEvents.dispatch("columnResized",e.getComponent()))}n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,n.latestX=n.startX,n.startWidth=e.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",r),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",r)}}fX.moduleName="resizeColumns";class gX extends dj{constructor(t){super(t),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(t){var e=this,i=t.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var o=document.createElement("div");o.className="tabulator-row-resize-handle prev",n.addEventListener("click",(function(t){t.stopPropagation()}));var r=function(i){e.startRow=t,e._mouseDown(i,t,n)};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.addEventListener("click",(function(t){t.stopPropagation()}));var a=function(i){var n=e.table.rowManager.prevDisplayRow(t);n&&(e.startRow=n,e._mouseDown(i,n,o))};o.addEventListener("mousedown",a),o.addEventListener("touchstart",a,{passive:!0}),i.appendChild(n),i.appendChild(o)}_mouseDown(t,e,i){var n=this;function o(t){e.setHeight(n.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-n.startY))}function r(t){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",r),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",e.getComponent())}n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,n.startHeight=e.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",r),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",r)}}gX.moduleName="resizeRows";class mX extends dj{constructor(t){super(t),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var t,e=this.table;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),"undefined"!=typeof IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver((t=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var i=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);this.tableHeight==i&&this.tableWidth==n||(this.tableHeight=i,this.tableWidth=n,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}})),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((t=>{if(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell){var i=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);this.containerHeight==i&&this.containerWidth==n||(this.containerHeight=i,this.containerWidth=n,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&!e.modules.edit.currentCell)&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((t=>{this.visible=t[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(t){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(t))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}mX.moduleName="resizeTable";class vX extends dj{constructor(t){super(t),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(t){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(t||this.update())}initializeResponsivity(){var t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(((e,i)=>{e.modules.responsive&&e.modules.responsive.order&&e.modules.responsive.visible&&(e.modules.responsive.index=i,t.push(e),e.visible||"collapse"!==this.mode||this.hiddenColumns.push(e))})),t=(t=t.reverse()).sort(((t,e)=>e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index)),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if("responsiveCollapse"==t.definition.formatter){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}}initializeRow(t){var e;"calc"!==t.type&&((e=document.createElement("div")).classList.add("tabulator-responsive-collapse"),t.modules.responsiveLayout={element:e,open:this.collapseStartOpen},this.collapseStartOpen||(e.style.display="none"))}layoutRow(t){var e=t.getElement();t.modules.responsiveLayout&&(e.appendChild(t.modules.responsiveLayout.element),this.generateCollapsedRowContent(t))}updateColumnVisibility(t,e){!e&&t.modules.responsive&&(t.modules.responsive.visible=t.visible,this.initializeResponsivity())}hideColumn(t){var e=this.hiddenColumns.length;t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent(),this.collapseHandleColumn&&!e&&this.collapseHandleColumn.show())}showColumn(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&((e=this.hiddenColumns.indexOf(t))>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var t=!0;t;){let e="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-e;if(i<0){let e=this.columns[this.index];e?(this.hideColumn(e),this.index++):t=!1}else{let e=this.columns[this.index-1];e&&i>0&&i>=e.getWidth()?(this.showColumn(e),this.index--):t=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((t=>{this.generateCollapsedRowContent(t)}))}generateCollapsedRowContent(t){var e,i;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);(i=this.collapseFormatter(this.generateCollapsedRowData(t)))&&e.appendChild(i)}}generateCollapsedRowData(t){var e,i=t.getData(),n=[];return this.hiddenColumns.forEach((o=>{var r=o.getFieldValue(i);if(o.definition.title&&o.field)if(o.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function a(t){t()}e={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return o.getComponent()},getTable:()=>this.table},n.push({field:o.field,title:o.definition.title,value:o.modules.format.formatter.call(this.table.modules.format,e,o.modules.format.params,a)})}else n.push({field:o.field,title:o.definition.title,value:r})})),n}formatCollapsedData(t){var e=document.createElement("table");return t.forEach((function(t){var i,n=document.createElement("tr"),o=document.createElement("td"),r=document.createElement("td"),a=document.createElement("strong");o.appendChild(a),this.langBind("columns|"+t.field,(function(e){a.innerHTML=e||t.title})),t.value instanceof Node?((i=document.createElement("div")).appendChild(t.value),r.appendChild(i)):r.innerHTML=t.value,n.appendChild(o),n.appendChild(r),e.appendChild(n)}),this),Object.keys(t).length?e:""}}vX.moduleName="responsiveLayout";class yX extends dj{constructor(t){super(t),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectable","highlight"),this.registerTableOption("selectableRangeMode","drag"),this.registerTableOption("selectableRollingSelection",!0),this.registerTableOption("selectablePersistence",!0),this.registerTableOption("selectableCheck",(function(t,e){return!0})),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){!1!==this.table.options.selectable&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectable&&!this.table.options.selectablePersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}rowRetrieve(t,e){return"selected"===t?this.selectedRows:e}rowDeleted(t){this._deselectRow(t,!0)}clearSelectionData(t){var e=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e&&!0!==t&&this._rowSelectionChanged()}initializeRow(t){var e=this,i=t.getElement(),n=function(){setTimeout((function(){e.selecting=!1}),50),document.body.removeEventListener("mouseup",n)};t.modules.select={selected:!1},e.checkRowSelectability(t)?(i.classList.add("tabulator-selectable"),i.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&("click"===e.table.options.selectableRangeMode?i.addEventListener("click",this.handleComplexRowClick.bind(this,t)):(i.addEventListener("click",(function(i){e.table.modExists("edit")&&e.table.modules.edit.getCurrentCell()||e.table._clearSelection(),e.selecting||e.toggleRow(t)})),i.addEventListener("mousedown",(function(i){if(i.shiftKey)return e.table._clearSelection(),e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",n),document.body.addEventListener("keyup",n),e.toggleRow(t),!1})),i.addEventListener("mouseenter",(function(i){e.selecting&&(e.table._clearSelection(),e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))})),i.addEventListener("mouseout",(function(i){e.selecting&&(e.table._clearSelection(),e.selectPrev.unshift(t))}))))):(i.classList.add("tabulator-unselectable"),i.classList.remove("tabulator-selectable"))}handleComplexRowClick(t,e){if(e.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||t;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),n=this.table.rowManager.getDisplayRowIndex(t),o=i<=n?i:n,r=i>=n?i:n,a=this.table.rowManager.getDisplayRows().slice(0).splice(o,r-o+1);e.ctrlKey||e.metaKey?(a.forEach((e=>{e!==this.lastClickedRow&&(!0===this.table.options.selectable||this.isRowSelected(t)||this.selectedRows.length<this.table.options.selectable)&&this.toggleRow(e)})),this.lastClickedRow=t):(this.deselectRows(void 0,!0),!0!==this.table.options.selectable&&a.length>this.table.options.selectable&&(a=a.slice(0,this.table.options.selectable)),this.selectRows(a)),this.table._clearSelection()}else e.ctrlKey||e.metaKey?(this.toggleRow(t),this.lastClickedRow=t):(this.deselectRows(void 0,!0),this.selectRows(t),this.lastClickedRow=t)}checkRowSelectability(t){return!(!t||"row"!==t.type)&&this.table.options.selectableCheck.call(this.table,t.getComponent())}toggleRow(t){this.checkRowSelectability(t)&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))}selectRows(t){var e,i,n=[];switch(typeof t){case"undefined":e=this.table.rowManager.rows;break;case"string":(e=this.table.rowManager.findRow(t))||(e=this.table.rowManager.getRows(t));break;default:e=t}Array.isArray(e)?e.length&&(e.forEach((t=>{(i=this._selectRow(t,!0,!0))&&n.push(i)})),this._rowSelectionChanged(!1,n)):e&&this._selectRow(e,!1,!0)}_selectRow(t,e,i){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!i&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var n=this.table.rowManager.findRow(t);if(n){if(-1==this.selectedRows.indexOf(n))return n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(e,n),n}else e||console.warn("Selection Error - No such row found, ignoring selection:"+t)}isRowSelected(t){return-1!==this.selectedRows.indexOf(t)}deselectRows(t,e){var i,n,o=[];switch(typeof t){case"undefined":i=Object.assign([],this.selectedRows);break;case"string":(i=this.table.rowManager.findRow(t))||(i=this.table.rowManager.getRows(t));break;default:i=t}Array.isArray(i)?i.length&&(i.forEach((t=>{(n=this._deselectRow(t,!0,!0))&&o.push(n)})),this._rowSelectionChanged(e,[],o)):i&&this._deselectRow(i,e,!0)}_deselectRow(t,e){var i,n,o=this,r=o.table.rowManager.findRow(t);if(r){if((i=o.selectedRows.findIndex((function(t){return t==r})))>-1)return(n=r.getElement())&&n.classList.remove("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!1,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!1),o.selectedRows.splice(i,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!1),this.dispatchExternal("rowDeselected",r.getComponent()),o._rowSelectionChanged(e,void 0,r),r}else e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)}getSelectedData(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getData())})),t}getSelectedRows(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getComponent())})),t}_rowSelectionChanged(t,e=[],i=[]){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),t||(Array.isArray(e)||(e=[e]),e=e.map((t=>t.getComponent())),Array.isArray(i)||(i=[i]),i=i.map((t=>t.getComponent())),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),e,i))}registerRowSelectCheckbox(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e}registerHeaderSelectCheckbox(t){this.headerCheckboxElement=t}childRowSelection(t,e){var i=this.table.modules.dataTree.getChildren(t,!0);if(e)for(let t of i)this._selectRow(t,!0);else for(let t of i)this._deselectRow(t,!0)}}function bX(t,e,i,n,o,r,a){var s=window.DateTime||luxon.DateTime,l=a.format||"dd/MM/yyyy HH:mm:ss",h=a.alignEmptyValues,u=0;if(void 0!==s){if(s.isDateTime(t)||(t="iso"===l?s.fromISO(String(t)):s.fromFormat(String(t),l)),s.isDateTime(e)||(e="iso"===l?s.fromISO(String(e)):s.fromFormat(String(e),l)),t.isValid){if(e.isValid)return t-e;u=1}else u=e.isValid?-1:0;return("top"===h&&"desc"===r||"bottom"===h&&"asc"===r)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}yX.moduleName="selectRow";var xX={number:function(t,e,i,n,o,r,a){var s=a.alignEmptyValues,l=a.decimalSeparator,h=a.thousandSeparator,u=0;if(t=String(t),e=String(e),h&&(t=t.split(h).join(""),e=e.split(h).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))u=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;u=1}return("top"===s&&"desc"===r||"bottom"===s&&"asc"===r)&&(u*=-1),u},string:function(t,e,i,n,o,r,a){var s,l=a.alignEmptyValues,h=0;if(t){if(e){switch(typeof a.locale){case"boolean":a.locale&&(s=this.langLocale());break;case"string":s=a.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),s)}h=1}else h=e?-1:0;return("top"===l&&"desc"===r||"bottom"===l&&"asc"===r)&&(h*=-1),h},date:function(t,e,i,n,o,r,a){return a.format||(a.format="dd/MM/yyyy"),bX.call(this,t,e,i,n,o,r,a)},time:function(t,e,i,n,o,r,a){return a.format||(a.format="HH:mm"),bX.call(this,t,e,i,n,o,r,a)},datetime:bX,boolean:function(t,e,i,n,o,r,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,i,n,o,r,a){var s=a.type||"length",l=a.alignEmptyValues,h=0;function u(t){var e;switch(s){case"length":e=t.length;break;case"sum":e=t.reduce((function(t,e){return t+e}));break;case"max":e=Math.max.apply(null,t);break;case"min":e=Math.min.apply(null,t);break;case"avg":e=t.reduce((function(t,e){return t+e}))/t.length}return e}if(Array.isArray(t)){if(Array.isArray(e))return u(e)-u(t);h=1}else h=Array.isArray(e)?-1:0;return("top"===l&&"desc"===r||"bottom"===l&&"asc"===r)&&(h*=-1),h},exists:function(t,e,i,n,o,r,a){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,i,n,o,r,a){var s,l,h,u,c,d=0,p=/(\d+)|(\D+)/g,f=/\d/,g=a.alignEmptyValues,m=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((s=String(t).toLowerCase())===(l=String(e).toLowerCase()))return 0;if(!f.test(s)||!f.test(l))return s>l?1:-1;for(s=s.match(p),l=l.match(p),c=s.length>l.length?l.length:s.length;d<c;)if((h=s[d])!==(u=l[d++]))return isFinite(h)&&isFinite(u)?("0"===h.charAt(0)&&(h="."+h),"0"===u.charAt(0)&&(u="."+u),h-u):h>u?1:-1;return s.length>l.length}m=1}else m=e||0===e?-1:0;return("top"===g&&"desc"===r||"bottom"===g&&"asc"===r)&&(m*=-1),m}};class wX extends dj{constructor(t){super(t),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(t,e,i,n){var o=this.getSort();return o.forEach((t=>{delete t.column})),n.sort=o,n}userSetSort(t,e){this.setSort(t,e),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(t){var e,i,n=!1;switch(typeof t.definition.sorter){case"string":wX.sorters[t.definition.sorter]?n=wX.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":n=t.definition.sorter}if(t.modules.sort={sorter:n,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:t.definition.headerSortTristate},!1!==t.definition.headerSort){switch((e=t.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement?i.classList.add("tabulator-col-sorter-element"):e.classList.add("tabulator-col-sorter-element"),this.table.options.headerSortElement){case"function":break;case"object":i.appendChild(this.table.options.headerSortElement);break;default:i.innerHTML=this.table.options.headerSortElement}t.titleHolderElement.appendChild(i),t.modules.sort.element=i,this.setColumnHeaderSortIcon(t,"none"),("icon"===this.table.options.headerSortClickElement?i:e).addEventListener("click",(e=>{var i="",n=[],o=!1;if(t.modules.sort){if(t.modules.sort.tristate)i="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":i="desc";break;case"desc":i="asc";break;default:i=t.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=(n=this.getSort()).findIndex((e=>e.field===t.getField())),o>-1?(n[o].dir=i,o=n.splice(o,1)[0],"none"!=i&&n.push(o)):"none"!=i&&n.push({column:t,dir:i}),this.setSort(n)):"none"==i?this.clear():this.setSort(t,i),this.refreshSort()}}))}}refreshSort(){"remote"===this.table.options.sortMode?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var t=this.changed;return this.changed=!1,t}getSort(){var t=[];return this.sortList.forEach((function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})})),t}setSort(t,e){var i=this,n=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach((function(t){var e;(e=i.table.columnManager.findColumn(t.column))?(t.column=e,n.push(t),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)})),i.sortList=n,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(t){var e,i=this.table.rowManager.activeRows[0],n="string";if(i&&(i=i.getData(),t.getField()))switch(typeof(e=t.getFieldValue(i))){case"undefined":n="string";break;case"boolean":n="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(n="alphanum"):n="number"}return wX.sorters[n]}sort(t){var e=this,i=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,n=[],o=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",e.getSort()),e.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(i.forEach((function(t,i){var o;t.column&&((o=t.column.modules.sort)&&(o.sorter||(o.sorter=e.findSorter(t.column)),t.params="function"==typeof o.params?o.params(t.column.getComponent(),t.dir):o.params,n.push(t)),e.setColumnHeader(t.column,t.dir))})),n.length&&e._sortItems(t,n)):i.forEach((function(t,i){e.setColumnHeader(t.column,t.dir)})),this.subscribedExternal("dataSorted")&&(t.forEach((t=>{o.push(t.getComponent())})),this.dispatchExternal("dataSorted",e.getSort(),o)),t}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach((t=>{t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(t,"none"))}))}setColumnHeader(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort","asc"===e?"ascending":"descending"),this.setColumnHeaderSortIcon(t,e)}setColumnHeaderSortIcon(t,e){var i,n=t.modules.sort.element;if(t.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;n.firstChild;)n.removeChild(n.firstChild);"object"==typeof(i=this.table.options.headerSortElement.call(this.table,t.getComponent(),e))?n.appendChild(i):n.innerHTML=i}}_sortItems(t,e){var i=e.length-1;t.sort(((t,n)=>{for(var o,r=i;r>=0;r--){let i=e[r];if(0!==(o=this._sortRow(t,n,i.column,i.dir,i.params)))break}return o}))}_sortRow(t,e,i,n,o){var r,a,s="asc"==n?t:e,l="asc"==n?e:t;return t=void 0!==(t=i.getFieldValue(s.getData()))?t:"",e=void 0!==(e=i.getFieldValue(l.getData()))?e:"",r=s.getComponent(),a=l.getComponent(),i.modules.sort.sorter.call(this,t,e,r,a,i.getComponent(),n,o)}}wX.moduleName="sort",wX.sorters=xX;class _X extends dj{constructor(t){super(t),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipGenerationMode",void 0),this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){this.deprecationCheckMsg("tooltipGenerationMode","This option is no longer needed as tooltips are always generated on hover now")}initializeColumn(t){t.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),t.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(t,e,i){var n="tooltip"===t?i.column.definition.tooltip:i.definition.headerTooltip;n&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,e,i,n),this.table.options.tooltipDelay))}mouseoutCheck(t,e,i){this.popupInstance||this.clearPopup()}clearPopup(t,e,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(t,e,i){var n,o,r;"function"==typeof i&&(i=i(t,e.getComponent(),(function(t){o=t}))),i instanceof HTMLElement?n=i:(n=document.createElement("div"),!0===i&&(e instanceof Cj?i=e.value:e.definition.field?this.langBind("columns|"+e.definition.field,(t=>{n.innerHTML=i=t||e.definition.title})):i=e.definition.title),n.innerHTML=i),(i||0===i||!1===i)&&(n.classList.add("tabulator-tooltip"),n.addEventListener("mousemove",(t=>t.preventDefault())),this.popupInstance=this.popup(n),"function"==typeof o&&this.popupInstance.renderCallback(o),r=this.popupInstance.containerEventCoords(t),this.popupInstance.show(r.x+15,r.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",e.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",e.getComponent()))}}_X.moduleName="tooltip";var CX={integer:function(t,e,i){return""===e||null==e||(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(t,e,i){return""===e||null==e||(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!=0)},numeric:function(t,e,i){return""===e||null==e||!isNaN(e)},string:function(t,e,i){return""===e||null==e||isNaN(e)},max:function(t,e,i){return""===e||null==e||parseFloat(e)<=i},min:function(t,e,i){return""===e||null==e||parseFloat(e)>=i},starts:function(t,e,i){return""===e||null==e||String(e).toLowerCase().startsWith(String(i).toLowerCase())},ends:function(t,e,i){return""===e||null==e||String(e).toLowerCase().endsWith(String(i).toLowerCase())},minLength:function(t,e,i){return""===e||null==e||String(e).length>=i},maxLength:function(t,e,i){return""===e||null==e||String(e).length<=i},in:function(t,e,i){return""===e||null==e||("string"==typeof i&&(i=i.split("|")),i.indexOf(e)>-1)},regex:function(t,e,i){return""===e||null==e||new RegExp(i).test(e)},unique:function(t,e,i){if(""===e||null==e)return!0;var n=!0,o=t.getData(),r=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(t){var i=t.getData();i!==o&&e==r.getFieldValue(i)&&(n=!1)})),n},required:function(t,e,i){return""!==e&&null!=e}};class SX extends dj{constructor(t){super(t),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(t,e,i){var n="manual"===this.table.options.validationMode||this.validate(t.column.modules.validate,t,e);return!0!==n&&setTimeout((()=>{t.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",t.getComponent(),e,n)})),n}editorClear(t,e){e&&t.column.modules.validate&&this.cellValidate(t),t.getElement().classList.remove("tabulator-validation-fail")}editedClear(t){t.modules.validate&&(t.modules.validate.invalid=!1)}cellIsValid(t){return t.modules.validate&&t.modules.validate.invalid||!0}cellValidate(t){return this.validate(t.column.modules.validate,t,t.getValue())}columnValidate(t){var e=[];return t.cells.forEach((t=>{!0!==this.cellValidate(t)&&e.push(t.getComponent())})),!e.length||e}rowValidate(t){var e=[];return t.cells.forEach((t=>{!0!==this.cellValidate(t)&&e.push(t.getComponent())})),!e.length||e}userClearCellValidation(t){t||(t=this.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach((t=>{this.clearValidation(t._getSelf())}))}userValidate(t){var e=[];return this.table.rowManager.rows.forEach((t=>{var i=(t=t.getComponent()).validate();!0!==i&&(e=e.concat(i))})),!e.length||e}initializeColumnCheck(t){void 0!==t.definition.validator&&this.initializeColumn(t)}initializeColumn(t){var e,i=this,n=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach((t=>{(e=i._extractValidator(t))&&n.push(e)})):(e=this._extractValidator(t.definition.validator))&&n.push(e),t.modules.validate=!!n.length&&n)}_extractValidator(t){var e,i,n;switch(typeof t){case"string":return(n=t.indexOf(":"))>-1?(e=t.substring(0,n),i=t.substring(n+1)):e=t,this._buildValidator(e,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}}_buildValidator(t,e){var i="function"==typeof t?t:SX.validators[t];return i?{type:"function"==typeof t?"function":t,func:i,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)}validate(t,e,i){var n=this,o=[],r=this.invalidCells.indexOf(e);return t&&t.forEach((t=>{t.func.call(n,e.getComponent(),i,t.params)||o.push({type:t.type,parameters:t.params})})),e.modules.validate||(e.modules.validate={}),o.length?(e.modules.validate.invalid=o,"manual"!==this.table.options.validationMode&&e.getElement().classList.add("tabulator-validation-fail"),-1==r&&this.invalidCells.push(e)):(e.modules.validate.invalid=!1,e.getElement().classList.remove("tabulator-validation-fail"),r>-1&&this.invalidCells.splice(r,1)),!o.length||o}getInvalidCells(){var t=[];return this.invalidCells.forEach((e=>{t.push(e.getComponent())})),t}clearValidation(t){var e;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(e=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(e,1))}}SX.moduleName="validate",SX.validators=CX;var MX=Object.freeze({__proto__:null,AccessorModule:pj,AjaxModule:bj,ClipboardModule:xj,ColumnCalcsModule:kj,DataTreeModule:Aj,DownloadModule:Rj,EditModule:Nj,ExportModule:Vj,FilterModule:Gj,FormatModule:Uj,FrozenColumnsModule:jj,FrozenRowsModule:Xj,GroupRowsModule:qj,HistoryModule:Kj,HtmlTableImportModule:$j,ImportModule:Qj,InteractionModule:tX,KeybindingsModule:eX,MenuModule:iX,MoveColumnsModule:nX,MoveRowsModule:oX,MutatorModule:rX,PageModule:sX,PersistenceModule:uX,PopupModule:cX,PrintModule:dX,ReactiveDataModule:pX,ResizeColumnsModule:fX,ResizeRowsModule:gX,ResizeTableModule:mX,ResponsiveLayoutModule:vX,SelectRowModule:yX,SortModule:wX,TooltipModule:_X,ValidateModule:SX});class TX{constructor(t,e,i={}){this.table=t,this.msgType=e,this.registeredDefaults=Object.assign({},i)}register(t,e){this.registeredDefaults[t]=e}generate(t,e={}){var i=Object.assign({},this.registeredDefaults),n=this.table.options.debugInvalidOptions||!0===e.debugInvalidOptions;Object.assign(i,t);for(let t in e)i.hasOwnProperty(t)||(n&&console.warn("Invalid "+this.msgType+" option:",t),i[t]=e.key);for(let t in i)t in e?i[t]=e[t]:Array.isArray(i[t])?i[t]=Object.assign([],i[t]):"object"==typeof i[t]&&null!==i[t]?i[t]=Object.assign({},i[t]):void 0===i[t]&&delete i[t];return i}}class EX extends hj{constructor(t){super(t),this.elementVertical=t.rowManager.element,this.elementHorizontal=t.columnManager.element,this.tableElement=t.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(t){}renderRows(){}renderColumns(){}rerenderRows(t){t&&t()}rerenderColumns(t,e){}renderRowCells(t){}rerenderRowCells(t,e){}scrollColumns(t,e){}scrollRows(t,e){}resize(){}scrollToRow(t){}scrollToRowNearestTop(t){}visibleRows(t){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(t,e){var i=t.getElement();e%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(t){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(t,e,i){var n=this.rows().indexOf(t),o=t.getElement(),r=0;return new Promise(((a,s)=>{if(n>-1){if(void 0===i&&(i=this.table.options.scrollToRowIfVisible),!i&&uj.elVisible(o)&&(r=uj.elOffset(o).top-uj.elOffset(this.elementVertical).top)>0&&r<this.elementVertical.clientHeight-o.offsetHeight)return a(),!1;switch(void 0===e&&(e=this.table.options.scrollToRowPosition),"nearest"===e&&(e=this.scrollToRowNearestTop(t)?"top":"bottom"),this.scrollToRow(t),e){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(o.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-o.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-o.offsetTop)+o.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+o.offsetHeight;break;case"top":this.elementVertical.scrollTop=o.offsetTop}a()}else console.warn("Scroll Error - Row not visible"),s("Scroll Error - Row not visible")}))}}class IX extends EX{constructor(t){super(t)}renderRowCells(t,e){const i=document.createDocumentFragment();t.cells.forEach((t=>{i.appendChild(t.getElement())})),t.element.appendChild(i),e||t.cells.forEach((t=>{t.cellRendered()}))}reinitializeColumnWidths(t){t.forEach((function(t){t.reinitializeWidth()}))}}class DX extends EX{constructor(t){super(t),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(t,e){this.dataChange()}scrollColumns(t,e){this.scrollLeft!=t&&(this.scrollLeft=t,this.scroll(t-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var t=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach((e=>{if(e.visible){var i=e.getWidth();i>t&&(t=i)}})),this.windowBuffer=2*t}rerenderColumns(t,e){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},n=0;t&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((t=>{var e,i={};t.visible&&(t.modules.frozen||(e=t.getWidth(),i.leftPos=n,i.rightPos=n+e,i.width=e,this.isFitData&&(i.fitDataCheck=!t.modules.vdomHoz||t.modules.vdomHoz.fitDataCheck),n+e>this.vDomScrollPosLeft&&n<this.vDomScrollPosRight?(-1==this.leftCol&&(this.leftCol=this.columns.length,this.vDomPadLeft=n),this.rightCol=this.columns.length):-1!==this.leftCol&&(this.vDomPadRight+=e),this.columns.push(t),t.modules.vdomHoz=i,n+=e))})),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,e||t&&!this.reinitChanged(i)||this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(t){if(this.initialized)this.initializeRow(t);else{const e=document.createDocumentFragment();t.cells.forEach((t=>{e.appendChild(t.getElement())})),t.element.appendChild(e),t.cells.forEach((t=>{t.cellRendered()}))}}rerenderRowCells(t,e){this.reinitializeRow(t,e)}reinitializeColumnWidths(t){for(let t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var t,e,i=!1;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((t=>{!t.definition.width&&t.visible&&(i=!0)})),i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){e=t.getElement(),t.generateCells(),this.tableElement.appendChild(e);for(let i=0;i<t.cells.length;i++){let n=t.cells[i];e.appendChild(n.getElement()),n.column.reinitializeWidth()}e.parentNode.removeChild(e),this.rerenderColumns(!1,!0)}}else"fitColumns"===this.options("layout")&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(t){var e=!0;return t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol||(t.cols.forEach(((t,i)=>{t!==this.columns[i]&&(e=!1)})),!e)}reinitializeRows(){var t=this.getVisibleRows(),e=this.table.rowManager.getRows().filter((e=>!t.includes(e)));t.forEach((t=>{this.reinitializeRow(t,!0)})),e.forEach((t=>{t.deinitialize()}))}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(t){this.vDomScrollPosLeft+=t,this.vDomScrollPosRight+=t,Math.abs(t)>this.windowBuffer/2?this.rerenderColumns():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(t,e,i){for(let n=t;n<e;n++){let t=this.columns[n];t.modules.vdomHoz.leftPos+=i,t.modules.vdomHoz.rightPos+=i}}addColRight(){for(var t=!1,e=!0;e;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(t=!0,this.getVisibleRows().forEach((t=>{if("group"!==t.type){var e=t.getCell(i);t.getElement().insertBefore(e.getElement(),t.getCell(this.columns[this.rightCol]).getElement().nextSibling),e.cellRendered()}})),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach((t=>{"group"!==t.type&&(t.modules.vdomHoz.rightCol=this.rightCol)})),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):e=!1}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var t=!1,e=!0;e;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){t=!0,this.getVisibleRows().forEach((t=>{if("group"!==t.type){var e=t.getCell(i);t.getElement().insertBefore(e.getElement(),t.getCell(this.columns[this.leftCol]).getElement()),e.cellRendered()}})),this.leftCol--,this.getVisibleRows().forEach((t=>{"group"!==t.type&&(t.modules.vdomHoz.leftCol=this.leftCol)})),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let e=this.fitDataColActualWidthCheck(i);e&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+e,this.vDomPadRight-=e)}else e=!1;else e=!1}t&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var t=!1,e=!0;e;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(t=!0,this.getVisibleRows().forEach((t=>{if("group"!==t.type){var e=t.getCell(i);try{t.getElement().removeChild(e.getElement())}catch(t){console.warn("Could not removeColRight",t.message)}}})),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach((t=>{"group"!==t.type&&(t.modules.vdomHoz.rightCol=this.rightCol)}))):e=!1}t&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var t=!1,e=!0;e;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(t=!0,this.getVisibleRows().forEach((t=>{if("group"!==t.type){var e=t.getCell(i);try{t.getElement().removeChild(e.getElement())}catch(t){console.warn("Could not removeColLeft",t.message)}}})),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach((t=>{"group"!==t.type&&(t.modules.vdomHoz.leftCol=this.leftCol)}))):e=!1}t&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(t){var e,i;return t.modules.vdomHoz.fitDataCheck&&(t.reinitializeWidth(),(i=(e=t.getWidth())-t.modules.vdomHoz.width)&&(t.modules.vdomHoz.rightPos+=i,t.modules.vdomHoz.width=e,this.colPositionAdjust(this.columns.indexOf(t)+1,this.columns.length,i)),t.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(t){if("group"!==t.type){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.appendCell(t,e)}));for(let e=this.leftCol;e<=this.rightCol;e++)this.appendCell(t,this.columns[e]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.appendCell(t,e)}))}}appendCell(t,e){if(e&&e.visible){let i=t.getCell(e);t.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(t,e){if("group"!==t.type&&(e||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=t.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(t)}}}class kX extends hj{constructor(t){super(t),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new TX(this.table,"column definition",Mj),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(t){this.table.rtl?this.headersElement.style.marginLeft=t+"px":this.headersElement.style.marginRight=t+"px"}initializeRenderer(){var t,e={virtual:DX,basic:IX};(t="string"==typeof this.table.options.renderHorizontal?e[this.table.options.renderHorizontal]:this.table.options.renderHorizontal)?(this.renderer=new t(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t.setAttribute("role","row"),t}createHeaderContentsElement(){var t=document.createElement("div");return t.classList.add("tabulator-header-contents"),t.setAttribute("role","rowgroup"),t}createHeaderElement(){var t=document.createElement("div");return t.classList.add("tabulator-header"),t.setAttribute("role","rowgroup"),this.table.options.headerVisible||t.classList.add("tabulator-header-hidden"),t}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(t){this.contentsElement.scrollLeft=t,this.scrollLeft=t,this.renderer.scrollColumns(t)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",(t=>{var e;t.deltaX&&(e=this.contentsElement.scrollLeft+t.deltaX,this.table.rowManager.scrollHorizontal(e),this.table.columnManager.scrollHorizontal(e))}))}generateColumnsFromRowData(t){var e,i,n=[],o=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var r in e=t[0]){let t={field:r,title:r},o=e[r];switch(typeof o){case"undefined":i="string";break;case"boolean":i="boolean";break;case"object":i=Array.isArray(o)?"array":"string";break;default:i=isNaN(o)||""===o?o.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}t.sorter=i,n.push(t)}if(o)switch(typeof o){case"function":this.table.options.columns=o.call(this.table,n);break;case"object":Array.isArray(o)?n.forEach((t=>{var e=o.find((e=>e.field===t.field));e&&Object.assign(t,e)})):n.forEach((t=>{o[t.field]&&Object.assign(t,o[t.field])})),this.table.options.columns=n}else this.table.options.columns=n;this.setColumns(this.table.options.columns)}}setColumns(t,e){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),t.forEach(((t,e)=>{this._addColumn(t)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(t,e,i){var n=new Tj(t,this),o=n.getElement(),r=i?this.findColumnIndex(i):i;if(i&&r>-1){var a=i.getTopColumn(),s=this.columns.indexOf(a),l=a.getElement();e?(this.columns.splice(s,0,n),l.parentNode.insertBefore(o,l)):(this.columns.splice(s+1,0,n),l.parentNode.insertBefore(o,l.nextSibling))}else e?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}registerColumnField(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)}registerColumnPosition(t){this.columnsByIndex.push(t)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach((function(t){t.reRegisterPosition()}))}verticalAlignHeaders(){var t=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((t=>{t.clearVerticalAlign()})),this.columns.forEach((e=>{var i=e.getHeight();i>t&&(t=i)})),this.headersElement.style.height=t+"px",this.columns.forEach((e=>{e.verticalAlign(this.table.options.columnHeaderVertAlign,t)})),this.table.rowManager.adjustTableSize())}findColumn(t){var e;return"object"!=typeof t?this.columnsByField[t]||!1:t instanceof Tj?t:t instanceof Sj?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&(e=[],this.columns.forEach((t=>{e.push(t),e=e.concat(t.getColumns(!0))})),e.find((e=>e.element===t))||!1)}getColumnByField(t){return this.columnsByField[t]}getColumnsByFieldRoot(t){var e=[];return Object.keys(this.columnsByField).forEach((i=>{i.split(".")[0]===t&&e.push(this.columnsByField[i])})),e}getColumnByIndex(t){return this.columnsByIndex[t]}getFirstVisibleColumn(){var t=this.columnsByIndex.findIndex((t=>t.visible));return t>-1&&this.columnsByIndex[t]}getColumns(){return this.columns}findColumnIndex(t){return this.columnsByIndex.findIndex((e=>t===e))}getRealColumns(){return this.columnsByIndex}traverse(t){this.columnsByIndex.forEach(((e,i)=>{t(e,i)}))}getDefinitions(t){var e=[];return this.columnsByIndex.forEach((i=>{(!t||t&&i.visible)&&e.push(i.getDefinition())})),e}getDefinitionTree(){var t=[];return this.columns.forEach((e=>{t.push(e.getDefinition(!0))})),t}getComponents(t){var e=[];return(t?this.columns:this.columnsByIndex).forEach((t=>{e.push(t.getComponent())})),e}getWidth(){var t=0;return this.columnsByIndex.forEach((e=>{e.visible&&(t+=e.getWidth())})),t}moveColumn(t,e,i){e.element.parentNode.insertBefore(t.element,e.element),i&&e.element.parentNode.insertBefore(e.element,t.element),this.moveColumnActual(t,e,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(t,e,i){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,i):this._moveColumnInArray(this.columns,t,e,i),this._moveColumnInArray(this.columnsByIndex,t,e,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",t,e,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",t.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(t,e,i,n,o){var r,a=t.indexOf(e);a>-1&&(t.splice(a,1),(r=t.indexOf(i))>-1?n&&(r+=1):r=a,t.splice(r,0,e),o&&(this.chain("column-moving-rows",[e,i,n],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(r,0,e)}})))}scrollToColumn(t,e,i){var n=0,o=t.getLeftOffset(),r=0,a=t.getElement();return new Promise(((s,l)=>{if(void 0===e&&(e=this.table.options.scrollToColumnPosition),void 0===i&&(i=this.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":r=-this.element.clientWidth/2;break;case"right":r=a.clientWidth-this.headersElement.clientWidth}if(!i&&o>0&&o+a.offsetWidth<this.element.clientWidth)return!1;n=o+r,n=Math.max(Math.min(n,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(n),this.scrollHorizontal(n),s()}else console.warn("Scroll Error - Column not visible"),l("Scroll Error - Column not visible")}))}generateCells(t){var e=[];return this.columnsByIndex.forEach((i=>{e.push(i.generateCell(t))})),e}getFlexBaseWidth(){var t=this.table.element.clientWidth,e=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,o,r;i.visible&&(n=i.definition.width||0,o=parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,e+=r>o?r:o)})),e}addColumn(t,e,i){return new Promise(((n,o)=>{var r=this._addColumn(t,e,i);this._reIndexColumns(),this.dispatch("column-add",t,e,i),"fitColumns"!=this.layoutMode()&&r.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),n(r)}))}deregisterColumn(t){var e,i=t.getField();i&&delete this.columnsByField[i],(e=this.columnsByIndex.indexOf(t))>-1&&this.columnsByIndex.splice(e,1),(e=this.columns.indexOf(t))>-1&&this.columns.splice(e,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(t,e){this.redrawBlock?(!1===t||!0===t&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=t):this.renderer.rerenderColumns(t,e)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(t){uj.elVisible(this.element)&&this.verticalAlignHeaders(),t&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",t)||this.layoutRefresh(t),this.dispatch("table-redraw",t),this.table.footerManager.redraw()}}class AX extends EX{constructor(t){super(t),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var t=this.tableElement;t.firstChild;)t.removeChild(t.firstChild);t.scrollTop=0,t.scrollLeft=0,t.style.minWidth="",t.style.minHeight="",t.style.display="",t.style.visibility=""}renderRows(){var t=this.tableElement,e=!0,i=document.createDocumentFragment(),n=this.rows();n.forEach(((t,n)=>{this.styleRow(t,n),t.initialize(!1,!0),"group"!==t.type&&(e=!1),i.appendChild(t.getElement())})),t.appendChild(i),n.forEach((t=>{t.rendered(),t.heightInitialized||t.calcHeight(!0)})),n.forEach((t=>{t.heightInitialized||t.setCellHeight()})),t.style.minWidth=e?this.table.columnManager.getWidth()+"px":""}rerenderRows(t){this.clearRows(),t&&t(),this.renderRows()}scrollToRowNearestTop(t){var e=uj.elOffset(t.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-e)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-e))}scrollToRow(t){var e=t.getElement();this.elementVertical.scrollTop=uj.elOffset(e).top-uj.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(t){return this.rows()}}class LX extends EX{constructor(t){super(t),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var t=this.tableElement;t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minHeight="",t.style.display="",t.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(t){for(var e=this.elementVertical.scrollTop,i=!1,n=!1,o=this.table.rowManager.scrollLeft,r=this.rows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(r[a]){var s=e-r[a].getElement().offsetTop;if(!(!1===n||Math.abs(s)<n))break;n=s,i=a}r.forEach((t=>{t.deinitializeHeight()})),t&&t(),this.rows().length?this._virtualRenderFill(!1===i?this.rows.length-1:i,!0,n||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(o)}scrollColumns(t){this.table.rowManager.scrollHorizontal(t)}scrollRows(t,e){var i=t-this.vDomScrollPosTop,n=t-this.vDomScrollPosBottom,o=2*this.vDomWindowBuffer,r=this.rows();if(this.scrollTop=t,-i>o||n>o){var a=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*r.length)),this.scrollColumns(a)}else e?(i<0&&this._addTopRow(r,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(r,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(r,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(r,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(t){var e=this.rows().indexOf(t);return!(Math.abs(this.vDomTop-e)>Math.abs(this.vDomBottom-e))}scrollToRow(t){var e=this.rows().indexOf(t);e>-1&&this._virtualRenderFill(e,!0)}visibleRows(t){var e=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+e,n=!1,o=0,r=0,a=this.rows();if(t)o=this.vDomTop,r=this.vDomBottom;else for(var s=this.vDomTop;s<=this.vDomBottom;s++)if(a[s])if(n){if(!(i-a[s].getElement().offsetTop>=0))break;r=s}else if(e-a[s].getElement().offsetTop>=0)o=s;else{if(n=!0,!(i-a[s].getElement().offsetTop>=0))break;r=s}return a.slice(o,r+1)}_virtualRenderFill(t,e,i){var n,o,r=this.tableElement,a=this.elementVertical,s=0,l=0,h=0,u=0,c=0,d=0,p=this.rows(),f=p.length,g=0,m=[],v=0,y=0,b=this.table.rowManager.fixedHeight,x=this.elementVertical.clientHeight,w=this.table.options.rowHeight,_=!0;if(i=i||0,t=t||0){for(;r.firstChild;)r.removeChild(r.firstChild);(u=(f-t+1)*this.vDomRowHeight)<x&&(t-=Math.ceil((x-u)/this.vDomRowHeight))<0&&(t=0),t-=s=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),t)}else this.clear();if(f&&uj.elVisible(this.elementVertical)){for(this.vDomTop=t,this.vDomBottom=t-1,b||this.table.options.maxHeight?(w&&(y=x/w+this.vDomWindowBuffer/w),y=Math.max(this.vDomWindowMinTotalRows,Math.ceil(y))):y=f;(y==f||l<=x+this.vDomWindowBuffer||v<this.vDomWindowMinTotalRows)&&this.vDomBottom<f-1;){for(m=[],o=document.createDocumentFragment(),d=0;d<y&&this.vDomBottom<f-1;)n=p[g=this.vDomBottom+1],this.styleRow(n,g),n.initialize(!1,!0),n.heightInitialized||this.table.options.rowHeight||n.clearCellHeight(),o.appendChild(n.getElement()),m.push(n),this.vDomBottom++,d++;if(!m.length)break;r.appendChild(o),m.forEach((t=>{t.rendered(),t.heightInitialized||t.calcHeight(!0)})),m.forEach((t=>{t.heightInitialized||t.setCellHeight()})),m.forEach((t=>{h=t.getHeight(),v<s?c+=h:l+=h,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*h),v++})),_=this.table.rowManager.adjustTableSize(),x=this.elementVertical.clientHeight,_&&(b||this.table.options.maxHeight)&&(w=l/v,y=Math.max(this.vDomWindowMinTotalRows,Math.ceil(x/w+this.vDomWindowBuffer/w)))}t?(this.vDomTopPad=e?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-c,this.vDomBottomPad=this.vDomBottom==f-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-l-c,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((l+c)/v),this.vDomBottomPad=this.vDomRowHeight*(f-this.vDomBottom-1),this.vDomScrollHeight=c+l+this.vDomBottomPad-x),r.style.paddingTop=this.vDomTopPad+"px",r.style.paddingBottom=this.vDomBottomPad+"px",e&&(this.scrollTop=this.vDomTopPad+c+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-x:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-x),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&e&&(this.scrollTop+=this.elementVertical.offsetHeight-x),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,a.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(t,e){for(var i=this.tableElement,n=[],o=0,r=this.vDomTop-1,a=0,s=!0;s;)if(this.vDomTop){let l,h,u=t[r];u&&a<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,h=u.initialized,e>=l?(this.styleRow(u,r),i.insertBefore(u.getElement(),i.firstChild),u.initialized&&u.heightInitialized||n.push(u),u.initialize(),h||(l=u.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),e-=l,o+=l,this.vDomTop--,r--,a++):s=!1):s=!1}else s=!1;for(let t of n)t.clearCellHeight();this._quickNormalizeRowHeight(n),o&&(this.vDomTopPad-=o,this.vDomTopPad<0&&(this.vDomTopPad=r*this.vDomRowHeight),r<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=o)}_removeTopRow(t,e){for(var i=[],n=0,o=0,r=!0;r;){let a,s=t[this.vDomTop];s&&o<this.vDomMaxRenderChain?(a=s.getHeight()||this.vDomRowHeight,e>=a?(this.vDomTop++,e-=a,n+=a,i.push(s),o++):r=!1):r=!1}for(let t of i){let e=t.getElement();e.parentNode&&e.parentNode.removeChild(e)}n&&(this.vDomTopPad+=n,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?n:n+this.vDomWindowBuffer)}_addBottomRow(t,e){for(var i=this.tableElement,n=[],o=0,r=this.vDomBottom+1,a=0,s=!0;s;){let l,h,u=t[r];u&&a<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,h=u.initialized,e>=l?(this.styleRow(u,r),i.appendChild(u.getElement()),u.initialized&&u.heightInitialized||n.push(u),u.initialize(),h||(l=u.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),e-=l,o+=l,this.vDomBottom++,r++,a++):s=!1):s=!1}for(let t of n)t.clearCellHeight();this._quickNormalizeRowHeight(n),o&&(this.vDomBottomPad-=o,(this.vDomBottomPad<0||r==t.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=o)}_removeBottomRow(t,e){for(var i=[],n=0,o=0,r=!0;r;){let a,s=t[this.vDomBottom];s&&o<this.vDomMaxRenderChain?(a=s.getHeight()||this.vDomRowHeight,e>=a?(this.vDomBottom--,e-=a,n+=a,i.push(s),o++):r=!1):r=!1}for(let t of i){let e=t.getElement();e.parentNode&&e.parentNode.removeChild(e)}n&&(this.vDomBottomPad+=n,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=n)}_quickNormalizeRowHeight(t){for(let e of t)e.calcHeight();for(let e of t)e.setCellHeight()}}class RX extends hj{constructor(t){super(t),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var t=document.createElement("div");return t.classList.add("tabulator-tableholder"),t.setAttribute("tabindex",0),t}createTableElement(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t.setAttribute("role","rowgroup"),t}initializePlaceholder(){var t=this.table.options.placeholder;if("function"==typeof t&&(t=t.call(this.table)),t=this.chain("placeholder",[t],t,t)||t){let e=document.createElement("div");if(e.classList.add("tabulator-placeholder"),"string"==typeof t){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=t,e.appendChild(i),this.placeholderContents=i}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(e.appendChild(t),this.placeholderContents=t):(console.warn("Invalid placeholder provided, must be string or HTML Element",t),this.el=null);this.placeholder=e}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",(()=>{var t=this.element.scrollLeft,e=this.scrollLeft>t,i=this.element.scrollTop,n=this.scrollTop>i;this.scrollLeft!=t&&(this.scrollLeft=t,this.dispatch("scroll-horizontal",t,e),this.dispatchExternal("scrollHorizontal",t,e),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,n),this.dispatch("scroll-vertical",i,n),this.dispatchExternal("scrollVertical",i,n))}))}findRow(t){return"object"!=typeof t?void 0!==t&&(this.rows.find((e=>e.data[this.table.options.index]==t))||!1):t instanceof Ij?t:t instanceof Ej?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.rows.find((e=>e.getElement()===t))||!1}getRowFromDataObject(t){return this.rows.find((e=>e.data===t))||!1}getRowFromPosition(t){return this.getDisplayRows().find((e=>e.getPosition()===t&&e.isDisplayed()))}scrollToRow(t,e,i){return this.renderer.scrollToRowPosition(t,e,i)}setData(t,e,i){return new Promise(((n,o)=>{e&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(t,!0):this.reRenderInPosition((()=>{this._setDataActual(t)})):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(t),this.resetScroll(),this._setDataActual(t)),n()}))}_setDataActual(t,e){this.dispatchExternal("dataProcessing",t),this._wipeElements(),Array.isArray(t)?(this.dispatch("data-processing",t),t.forEach(((t,e)=>{if(t&&"object"==typeof t){var i=new Ij(t,this);this.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)})),this.refreshActiveData(!1,!1,e),this.dispatch("data-processed",t),this.dispatchExternal("dataProcessed",t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof t,"\nData: ",t)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach((t=>{t.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(t,e){var i=this.rows.indexOf(t),n=this.activeRows.indexOf(t);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator((e=>{var i=e.indexOf(t);i>-1&&e.splice(i,1)})),e||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",t.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(t,e,i,n){return this.addRowActual(t,e,i,n)}addRows(t,e,i,n){var o=[];return new Promise(((r,a)=>{e=this.findAddRowPos(e),Array.isArray(t)||(t=[t]),(void 0===i&&e||void 0!==i&&!e)&&t.reverse(),t.forEach(((t,n)=>{var r=this.addRow(t,e,i,!0);o.push(r),this.dispatch("row-added",r,t,e,i)})),this.refreshActiveData(!!n&&"displayPipeline",!1,!0),this.regenerateRowPositions(),o.length&&this._clearPlaceholder(),r(o)}))}findAddRowPos(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t}addRowActual(t,e,i,n){var o,r,a=t instanceof Ij?t:new Ij(t||{},this),s=this.findAddRowPos(e),l=-1;return i||(r=this.chain("row-adding-position",[a,s],null,{index:i,top:s}),i=r.index,s=r.top),void 0!==i&&(i=this.findRow(i)),(i=this.chain("row-adding-index",[a,i,s],null,i))&&(l=this.rows.indexOf(i)),i&&l>-1?(o=this.activeRows.indexOf(i),this.displayRowIterator((function(t){var e=t.indexOf(i);e>-1&&t.splice(s?e:e+1,0,a)})),o>-1&&this.activeRows.splice(s?o:o+1,0,a),this.rows.splice(s?l:l+1,0,a)):s?(this.displayRowIterator((function(t){t.unshift(a)})),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator((function(t){t.push(a)})),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",a.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),a}moveRow(t,e,i){this.dispatch("row-move",t,e,i),this.moveRowActual(t,e,i),this.regenerateRowPositions(),this.dispatch("row-moved",t,e,i),this.dispatchExternal("rowMoved",t.getComponent())}moveRowActual(t,e,i){this.moveRowInArray(this.rows,t,e,i),this.moveRowInArray(this.activeRows,t,e,i),this.displayRowIterator((n=>{this.moveRowInArray(n,t,e,i)})),this.dispatch("row-moving",t,e,i)}moveRowInArray(t,e,i,n){var o,r,a;if(e!==i&&((o=t.indexOf(e))>-1&&(t.splice(o,1),(r=t.indexOf(i))>-1?n?t.splice(r+1,0,e):t.splice(r,0,e):t.splice(o,0,e)),t===this.getDisplayRows())){a=r>o?r:o+1;for(let e=o<r?o:r;e<=a;e++)t[e]&&this.styleRow(t[e],e)}}clearData(){this.setData([])}getRowIndex(t){return this.findRowIndex(t,this.rows)}getDisplayRowIndex(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e}nextDisplayRow(t,e){var i=this.getDisplayRowIndex(t),n=!1;return!1!==i&&i<this.displayRowsCount-1&&(n=this.getDisplayRows()[i+1]),!n||n instanceof Ij&&"row"==n.type?n:this.nextDisplayRow(n,e)}prevDisplayRow(t,e){var i=this.getDisplayRowIndex(t),n=!1;return i&&(n=this.getDisplayRows()[i-1]),!e||!n||n instanceof Ij&&"row"==n.type?n:this.prevDisplayRow(n,e)}findRowIndex(t,e){var i;return!!((t=this.findRow(t))&&(i=e.indexOf(t))>-1)&&i}getData(t,e){var i=[];return this.getRows(t).forEach((function(t){"row"==t.type&&i.push(t.getData(e||"data"))})),i}getComponents(t){var e=[];return this.getRows(t).forEach((function(t){e.push(t.getComponent())})),e}getDataCount(t){return this.getRows(t).length}scrollHorizontal(t){this.scrollLeft=t,this.element.scrollLeft=t,this.dispatch("scroll-horizontal",t)}registerDataPipelineHandler(t,e){void 0!==e?(this.dataPipeline.push({handler:t,priority:e}),this.dataPipeline.sort(((t,e)=>t.priority-e.priority))):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(t,e){void 0!==e?(this.displayPipeline.push({handler:t,priority:e}),this.displayPipeline.sort(((t,e)=>t.priority-e.priority))):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(t,e,i){var n=this.table,o="",r=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof t)if((r=this.dataPipeline.findIndex((e=>e.handler===t)))>-1)o="dataPipeline",e&&(r==this.dataPipeline.length-1?o="display":r++);else{if(!((r=this.displayPipeline.findIndex((e=>e.handler===t)))>-1))return void console.error("Unable to refresh data, invalid handler provided",t);o="displayPipeline",e&&(r==this.displayPipeline.length-1?o="end":r++)}else o=t||"all",r=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===o&&r<this.redrawBlockRestoreConfig.index||a.indexOf(o)<a.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:t,skipStage:e,renderInPosition:i,stage:o,index:r}));uj.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,t,o,r,i)):(this.refreshPipelines(t,o,r,i),t||this.table.columnManager.renderer.renderColumns(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(t,o,r,i),this.dispatch("data-refreshed")}}refreshPipelines(t,e,i,n){switch(this.dispatch("data-refreshing"),t||(this.activeRowsPipeline[0]=this.rows.slice(0)),e){case"all":case"dataPipeline":for(let t=i;t<this.dataPipeline.length;t++){let e=this.dataPipeline[t].handler(this.activeRowsPipeline[t].slice(0));this.activeRowsPipeline[t+1]=e||this.activeRowsPipeline[t].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let t=i;t<this.displayPipeline.length;t++){let e=this.displayPipeline[t].handler((t?this.getDisplayRows(t-1):this.activeRows).slice(0),n);this.setDisplayRows(e||this.getDisplayRows(t-1).slice(0),t)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var t=this.getDisplayRows(),e=1;t.forEach((t=>{"row"===t.type&&(t.setPosition(e),e++)}))}setActiveRows(t){this.activeRows=this.activeRows=Object.assign([],t),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(t,e){this.displayRows[e]=t,e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]}getVisibleRows(t,e){var i=Object.assign([],this.renderer.visibleRows(!e));return t&&(i=this.chain("rows-visible",[e],i,i)),i}displayRowIterator(t){this.activeRowsPipeline.forEach(t),this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(t){var e=[];switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!1,!0);break;default:e=this.chain("rows-retrieve",t,null,this.rows)||this.rows}return e}reRenderInPosition(t){this.redrawBlock?t?t():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(t),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var t=0;this.element.scrollHeight>this.element.clientHeight&&(t=this.element.offsetWidth-this.element.clientWidth),t!==this.scrollbarWidth&&(this.scrollbarWidth=t,this.dispatch("scrollbar-vertical",t))}initializeRenderer(){var t,e={virtual:LX,basic:AX};(t="string"==typeof this.table.options.renderVertical?e[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=this.table.options.renderVertical,this.renderer=new t(this.table,this.element,this.tableElement),this.renderer.initialize(),!this.table.element.clientHeight&&!this.table.options.height||this.table.options.minHeight&&this.table.options.maxHeight?this.fixedHeight=!1:this.fixedHeight=!0):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(t,e){var i=t.getElement();e%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach((function(t){t.normalizeHeight()}))}adjustTableSize(){let t,e=this.element.clientHeight,i=!1;if("fill"===this.renderer.verticalFillMode){let n=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const e="calc(100% - "+n+"px)";this.element.style.minHeight=t||"calc(100% - "+n+"px)",this.element.style.height=e,this.element.style.maxHeight=e}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-n+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),this.fixedHeight||e==this.element.clientHeight||(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach((function(t){t.reinitialize(!0)}))}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(t){const e=this.adjustTableSize();this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():(e&&this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))}}class PX extends hj{constructor(t){super(t),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t}createContainerElement(){var t=document.createElement("div");return t.classList.add("tabulator-footer-contents"),this.element.appendChild(t),t}initializeElement(){this.table.options.footerElement&&("string"==typeof this.table.options.footerElement?"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement)):this.element=this.table.options.footerElement)}getElement(){return this.element}append(t){this.activate(),this.containerElement.appendChild(t),this.table.rowManager.adjustTableSize()}prepend(t){this.activate(),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(t){t.parentNode.removeChild(t),this.deactivate()}deactivate(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class OX extends hj{constructor(t){super(t),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var t={};this.listeners.forEach((e=>{t[e]={handler:null,components:[]}})),this.listeners=t}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach((t=>{this.pseudoTrackers[t].subscriber=this.pseudoMouseEnter.bind(this,t),this.subscribe(t+"-mouseover",this.pseudoTrackers[t].subscriber)})),this.pseudoTracking=!0}pseudoMouseEnter(t,e,i){this.pseudoTrackers[t].target!==i&&(this.pseudoTrackers[t].target&&this.dispatch(t+"-mouseleave",e,this.pseudoTrackers[t].target),this.pseudoMouseLeave(t,e),this.pseudoTrackers[t].target=i,this.dispatch(t+"-mouseenter",e,i))}pseudoMouseLeave(t,e){var i=Object.keys(this.pseudoTrackers),n={row:["cell"],cell:["row"]};(i=i.filter((e=>{var i=n[t];return e!==t&&(!i||i&&!i.includes(e))}))).forEach((t=>{var i=this.pseudoTrackers[t].target;this.pseudoTrackers[t].target&&(this.dispatch(t+"-mouseleave",e,i),this.pseudoTrackers[t].target=null)}))}bindSubscriptionWatchers(){var t=Object.keys(this.listeners),e=Object.values(this.componentMap);for(let i of e)for(let e of t){let t=i+"-"+e;this.subscriptionChange(t,this.subscriptionChanged.bind(this,i,e))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(t,e,i){var n=this.listeners[e].components,o=n.indexOf(t),r=!1;i?-1===o&&(n.push(t),r=!0):this.subscribed(t+"-"+e)||o>-1&&(n.splice(o,1),r=!0),"mouseenter"!==e&&"mouseleave"!==e||this.pseudoTracking||this.bindPseudoEvents(),r&&this.updateEventListeners()}updateEventListeners(){for(let t in this.listeners){let e=this.listeners[t];e.components.length?e.handler||(e.handler=this.track.bind(this,t),this.el.addEventListener(t,e.handler)):e.handler&&(this.el.removeEventListener(t,e.handler),e.handler=null)}}track(t,e){var i=e.composedPath&&e.composedPath()||e.path,n=this.findTargets(i);n=this.bindComponents(t,n),this.triggerEvents(t,e,n),!this.pseudoTracking||"mouseover"!=t&&"mouseleave"!=t||Object.keys(n).length||this.pseudoMouseLeave("none",e)}findTargets(t){var e={};let i=Object.keys(this.componentMap);for(let n of t){let t=n.classList?[...n.classList]:[];if(t.filter((t=>this.abortClasses.includes(t))).length)break;let o=t.filter((t=>i.includes(t)));for(let t of o)e[this.componentMap[t]]||(e[this.componentMap[t]]=n)}return e.group&&e.group===e.row&&delete e.row,e}bindComponents(t,e){var i=Object.keys(e).reverse(),n=this.listeners[t],o={},r={};for(let t of i){let i,a=e[t],s=this.previousTargets[t];if(s&&s.target===a)i=s.component;else switch(t){case"row":case"group":(n.components.includes("row")||n.components.includes("cell")||n.components.includes("group"))&&(i=this.table.rowManager.getVisibleRows(!0).find((t=>t.getElement()===a)),e.row&&e.row.parentNode&&e.row.parentNode.closest(".tabulator-row")&&(e[t]=!1));break;case"column":n.components.includes("column")&&(i=this.table.columnManager.findColumn(a));break;case"cell":n.components.includes("cell")&&(o.row instanceof Ij?i=o.row.findCell(a):e.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}i&&(o[t]=i,r[t]={target:a,component:i})}return this.previousTargets=r,o}triggerEvents(t,e,i){var n=this.listeners[t];for(let o in i)i[o]&&n.components.includes(o)&&this.dispatch(o+"-"+t,e,i[o])}clearWatchers(){for(let t in this.listeners){let e=this.listeners[t];e.handler&&(this.el.removeEventListener(t,e.handler),e.handler=null)}}}class zX{constructor(t){this.table=t,this.bindings={}}bind(t,e,i){this.bindings[t]||(this.bindings[t]={}),this.bindings[t][e]?console.warn("Unable to bind component handler, a matching function name is already bound",t,e,i):this.bindings[t][e]=i}handle(t,e,i){if(this.bindings[t]&&this.bindings[t][i]&&"function"==typeof this.bindings[t][i].bind)return this.bindings[t][i].bind(null,e);"then"===i||"string"!=typeof i||i.startsWith("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+t+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class NX extends hj{constructor(t){super(t),this.requestOrder=0,this.loading=!1}initialize(){}load(t,e,i,n,o,r){var a=++this.requestOrder;return this.table.destroyed?Promise.resolve():(this.dispatchExternal("dataLoading",t),!t||0!=t.indexOf("{")&&0!=t.indexOf("[")||(t=JSON.parse(t)),this.confirm("data-loading",[t,e,i,o])?(this.loading=!0,o||this.alertLoader(),e=this.chain("data-params",[t,i,o],e||{},e||{}),e=this.mapParams(e,this.table.options.dataSendParams),this.chain("data-load",[t,e,i,o],!1,Promise.resolve([])).then((t=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{Array.isArray(t)||"object"!=typeof t||(t=this.mapParams(t,this.objectInvert(this.table.options.dataReceiveParams)));var e=this.chain("data-loaded",t,null,t);a==this.requestOrder?(this.clearAlert(),!1!==e&&(this.dispatchExternal("dataLoaded",e),this.table.rowManager.setData(e,n,void 0===r?!n:r))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}})).catch((t=>{console.error("Data Load Error: ",t),this.dispatchExternal("dataLoadError",t),o||this.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",t),t||(t=[]),this.table.rowManager.setData(t,n,void 0===r?!n:r),Promise.resolve()))}mapParams(t,e){var i={};for(let n in t)i[e.hasOwnProperty(n)?e[n]:n]=t[n];return i}objectInvert(t){var e={};for(let i in t)e[t[i]]=i;return e}blockActiveLoad(){this.requestOrder++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class BX{constructor(t,e,i){this.table=t,this.events={},this.optionsList=e||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(t,e){this.subscriptionNotifiers[t]||(this.subscriptionNotifiers[t]=[]),this.subscriptionNotifiers[t].push(e),this.subscribed(t)&&this._notifySubscriptionChange(t,!0)}subscribe(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e),this._notifySubscriptionChange(t,!0)}unsubscribe(t,e){var i;if(this.events[t]){if(e){if(!((i=this.events[t].findIndex((t=>t===e)))>-1))return void console.warn("Cannot remove event, no matching event found:",t,e);this.events[t].splice(i,1)}else delete this.events[t];this._notifySubscriptionChange(t,!1)}else console.warn("Cannot remove event, no events set on:",t)}subscribed(t){return this.events[t]&&this.events[t].length}_notifySubscriptionChange(t,e){var i=this.subscriptionNotifiers[t];i&&i.forEach((t=>{t(e)}))}_dispatch(){var t,e=Array.from(arguments),i=e.shift();return this.events[i]&&this.events[i].forEach(((i,n)=>{let o=i.apply(this.table,e);n||(t=o)})),t}_debugDispatch(){var t=Array.from(arguments),e=t[0];return t[0]="ExternalEvent:"+t[0],(!0===this.debug||this.debug.includes(e))&&console.log(...t),this._dispatch(...arguments)}}class FX{constructor(t){this.events={},this.subscriptionNotifiers={},this.dispatch=t?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=t?this._debugChain.bind(this):this._chain.bind(this),this.confirm=t?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=t}subscriptionChange(t,e){this.subscriptionNotifiers[t]||(this.subscriptionNotifiers[t]=[]),this.subscriptionNotifiers[t].push(e),this.subscribed(t)&&this._notifySubscriptionChange(t,!0)}subscribe(t,e,i=1e4){this.events[t]||(this.events[t]=[]),this.events[t].push({callback:e,priority:i}),this.events[t].sort(((t,e)=>t.priority-e.priority)),this._notifySubscriptionChange(t,!0)}unsubscribe(t,e){var i;if(this.events[t]){if(e){if(!((i=this.events[t].findIndex((t=>t.callback===e)))>-1))return void console.warn("Cannot remove event, no matching event found:",t,e);this.events[t].splice(i,1)}this._notifySubscriptionChange(t,!1)}else console.warn("Cannot remove event, no events set on:",t)}subscribed(t){return this.events[t]&&this.events[t].length}_chain(t,e,i,n){var o=i;return Array.isArray(e)||(e=[e]),this.subscribed(t)?(this.events[t].forEach(((t,i)=>{o=t.callback.apply(this,e.concat([o]))})),o):"function"==typeof n?n():n}_confirm(t,e){var i=!1;return Array.isArray(e)||(e=[e]),this.subscribed(t)&&this.events[t].forEach(((t,n)=>{t.callback.apply(this,e)&&(i=!0)})),i}_notifySubscriptionChange(t,e){var i=this.subscriptionNotifiers[t];i&&i.forEach((t=>{t(e)}))}_dispatch(){var t=Array.from(arguments),e=t.shift();this.events[e]&&this.events[e].forEach((e=>{e.callback.apply(this,t)}))}_debugDispatch(){var t=Array.from(arguments),e=t[0];return t[0]="InternalEvent:"+e,(!0===this.debug||this.debug.includes(e))&&console.log(...t),this._dispatch(...arguments)}_debugChain(){var t=Array.from(arguments),e=t[0];return t[0]="InternalEvent:"+e,(!0===this.debug||this.debug.includes(e))&&console.log(...t),this._chain(...arguments)}_debugConfirm(){var t=Array.from(arguments),e=t[0];return t[0]="InternalEvent:"+e,(!0===this.debug||this.debug.includes(e))&&console.log(...t),this._confirm(...arguments)}}class VX extends hj{constructor(t){super(t)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(t,e){var i="";return void 0===this.options(t)||(i="Deprecated Setup Option - Use of the %c"+t+"%c option is now deprecated",e?(i=i+", Please use the %c"+e+"%c option instead",this._warnUser(i,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;")):this._warnUser(i,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(t,e){return void 0===this.options(t)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+t+" %c option is now deprecated, "+e,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(t){this._warnUser(t)}}class HX{static register(t){HX.tables.push(t)}static deregister(t){var e=HX.tables.indexOf(t);e>-1&&HX.tables.splice(e,1)}static lookupTable(t,e){var i,n,o=[];if("string"==typeof t){if((i=document.querySelectorAll(t)).length)for(var r=0;r<i.length;r++)(n=HX.matchElement(i[r]))&&o.push(n)}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||t instanceof KX?(n=HX.matchElement(t))&&o.push(n):Array.isArray(t)?t.forEach((function(t){o=o.concat(HX.lookupTable(t))})):e||console.warn("Table Connection Error - Invalid Selector",t);return o}static matchElement(t){return HX.tables.find((function(e){return t instanceof KX?e===t:e.element===t}))}}function GX(t,e){t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}HX.tables=[];var WX={fitData:function(t,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(t),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:GX,fitDataTable:GX,fitDataStretch:function(t,e){var i=0,n=this.table.rowManager.element.clientWidth,o=0,r=!1;t.forEach(((t,e)=>{t.widthFixed||t.reinitializeWidth(),(this.table.options.responsiveLayout?t.modules.responsive.visible:t.visible)&&(r=t),t.visible&&(i+=t.getWidth())})),r?(o=n-i+r.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(r.setWidth(0),this.table.modules.responsiveLayout.update()),o>0?r.setWidth(o):r.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t,e){var i,n,o=this.table.rowManager.element.getBoundingClientRect().width,r=0,a=0,s=0,l=[],h=[],u=0,c=0;function d(t){return"string"==typeof t?t.indexOf("%")>-1?o/100*parseInt(t):parseInt(t):t}function p(t,e,i,n){var o=[],r=0,a=0,l=0,h=s,u=0,c=0,f=[];function g(t){return i*(t.column.definition.widthGrow||1)}function m(t){return d(t.width)-i*(t.column.definition.widthShrink||0)}return t.forEach((function(t,r){var a=n?m(t):g(t);t.column.minWidth>=a?o.push(t):t.column.maxWidth&&t.column.maxWidth<a?(t.width=t.column.maxWidth,e-=t.column.maxWidth,(h-=n?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)&&(i=Math.floor(e/h))):(f.push(t),c+=n?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)})),o.length?(o.forEach((function(t){r+=n?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth})),a=e-r,l=c?Math.floor(a/c):a,u=p(f,a,l,n)):(u=c?e-Math.floor(e/c)*c:e,f.forEach((function(t){t.width=n?m(t):g(t)}))),u}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(o-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach((function(t){var e,i,n;t.visible&&(e=t.definition.width,i=parseInt(t.minWidth),e?(n=d(e),r+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),u+=t.definition.widthShrink)):(l.push({column:t,width:0}),s+=t.definition.widthGrow||1))})),a=o-r,i=Math.floor(a/s),c=p(l,a,i,!1),l.length&&c>0&&(l[l.length-1].width+=c),l.forEach((function(t){a-=t.width})),(n=Math.abs(c)+a)>0&&u&&(c=p(h,n,Math.floor(n/u),!0)),c&&h.length&&(h[h.length-1].width-=c),l.forEach((function(t){t.column.setWidth(t.width)})),h.forEach((function(t){t.column.setWidth(t.width)}))}};class UX extends dj{constructor(t){super(t,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var t=this.table.options.layout;UX.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(t){t.definition.widthGrow&&(t.definition.widthGrow=Number(t.definition.widthGrow)),t.definition.widthShrink&&(t.definition.widthShrink=Number(t.definition.widthShrink))}getMode(){return this.mode}layout(t){this.dispatch("layout-refreshing"),UX.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,t),this.dispatch("layout-refreshed")}}UX.moduleName="layout",UX.modes=WX;class jX extends dj{constructor(t){super(t),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=uj.deepClone(jX.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let t in this.table.options.langs)this.installLang(t,this.table.options.langs[t]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(t){this.langList.default.headerFilters.default=t}installLang(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e}_setLangProp(t,e){for(let i in e)t[i]&&"object"==typeof t[i]?this._setLangProp(t[i],e[i]):t[i]=e[i]}setLocale(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){let e=t.split("-")[0];this.langList[e]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,e),t=e):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=uj.deepClone(this.langList.default||{}),"default"!=t&&function t(e,i){for(var n in e)"object"==typeof e[n]?(i[n]||(i[n]={}),t(e[n],i[n])):i[n]=e[n]}(this.langList[t],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(t){return this.locale}getLang(t){return t?this.langList[t]:this.lang}getText(t,e){var i=(e?t+"|"+e:t).split("|");return this._getLangElement(i,this.locale)||""}_getLangElement(t,e){var i=this.lang;return t.forEach((function(t){var e;i&&(e=i[t],i=void 0!==e&&e)})),i}bind(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)}_executeBindings(){for(let t in this.bindings)this.bindings[t].forEach((e=>{e(this.getText(t),this.lang)}))}}jX.moduleName="localize",jX.langs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class XX extends dj{constructor(t){super(t)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(t){var e=[];return HX.lookupTable(t).forEach((t=>{this.table!==t&&e.push(t)})),e}send(t,e,i,n){var o=this.getConnections(t);o.forEach((t=>{t.tableComms(this.table.element,e,i,n)})),!o.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)}receive(t,e,i,n){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,i,n);console.warn("Inter-table Comms Error - no such module:",e)}}XX.moduleName="comms";var YX=Object.freeze({__proto__:null,LayoutModule:UX,LocalizeModule:jX,CommsModule:XX});class ZX{constructor(t,e){this.bindStaticFunctionality(t),this.bindModules(t,YX,!0),e&&this.bindModules(t,e)}bindStaticFunctionality(t){t.moduleBindings={},t.extendModule=function(e,i,n){if(t.moduleBindings[e]){var o=t.moduleBindings[e][i];if(o)if("object"==typeof n)for(let t in n)o[t]=n[t];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",i)}else console.warn("Module Error - module does not exist:",e)},t.registerModule=function(e){Array.isArray(e)||(e=[e]),e.forEach((e=>{t.registerModuleBinding(e)}))},t.registerModuleBinding=function(e){t.moduleBindings[e.moduleName]=e},t.findTable=function(t){var e=HX.lookupTable(t,!0);return!(Array.isArray(e)&&!e.length)&&e},t.prototype.bindModules=function(){var e=[],i=[],n=[];for(var o in this.modules={},t.moduleBindings){let r=t.moduleBindings[o],a=new r(this);this.modules[o]=a,r.prototype.moduleCore?this.modulesCore.push(a):r.moduleInitOrder?r.moduleInitOrder<0?e.push(a):i.push(a):n.push(a)}e.sort(((t,e)=>t.moduleInitOrder>e.moduleInitOrder?1:-1)),i.sort(((t,e)=>t.moduleInitOrder>e.moduleInitOrder?1:-1)),this.modulesRegular=e.concat(n.concat(i))}}bindModules(t,e,i){var n=Object.values(e);i&&n.forEach((t=>{t.prototype.moduleCore=!0})),t.registerModule(n)}}class qX extends hj{constructor(t){super(t),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var t=document.createElement("div");return t.classList.add("tabulator-alert"),t}_createMsgElement(){var t=document.createElement("div");return t.classList.add("tabulator-alert-msg"),t.setAttribute("role","alert"),t}_typeClass(){return"tabulator-alert-state-"+this.type}alert(t,e="msg"){if(t){for(this.clear(),this.type=e;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof t&&(t=t()),t instanceof HTMLElement?this.msgElement.appendChild(t):this.msgElement.innerHTML=t,this.table.element.appendChild(this.element)}}clear(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class KX{constructor(t,e){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new zX(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new VX(this),this.optionsList=new TX(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(t)&&(this.initializeCoreSystems(e),setTimeout((()=>{this._create()}))),HX.register(this)}initializeElement(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)}initializeCoreSystems(t){this.columnManager=new kX(this),this.rowManager=new RX(this),this.footerManager=new PX(this),this.dataLoader=new NX(this),this.alertManager=new qX(this),this.bindModules(),this.options=this.optionsList.generate(KX.defaultOptions,t),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new BX(this,this.options,this.options.debugEventsExternal),this.eventBus=new FX(this.options.debugEventsInternal),this.interactionMonitor=new OX(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this._loadInitialData(),this.initialized=!0,this.externalEvents.dispatch("tableBuilt")}_rtlCheck(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var t,e=this.element,i=this.options;if("TABLE"===e.tagName){this.originalElement=this.element,t=document.createElement("div");var n=e.attributes;for(var o in n)"object"==typeof n[o]&&t.setAttribute(n[o].name,n[o].value);e.parentNode.replaceChild(t,e),this.element=e=t}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight)}_initializeTable(){var t=this.element,e=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((t=>{t.initialize()})),t.appendChild(this.columnManager.getElement()),t.appendChild(this.rowManager.getElement()),e.footerElement&&this.footerManager.activate(),e.autoColumns&&e.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((t=>{t.initialize()})),this.columnManager.setColumns(e.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){this.dataLoader.load(this.options.data)}destroy(){var t=this.element;for(this.destroyed=!0,HX.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):t.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.slice(0,4))}initGuard(t,e){var i,n;return this.options.debugInitialization&&!this.initialized&&(t||(t=" "==(n="Error"==(i=(new Error).stack.split("\n"))[0]?i[2]:i[1])[0]?n.trim().split(" ")[1].split(".")[1]:n.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+t+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(e?" "+e:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(t,e,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(t,e,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(t){return this.rowManager.getData(t)}getDataCount(t){return this.rowManager.getDataCount(t)}replaceData(t,e,i){return this.initGuard(),this.dataLoader.load(t,e,i,!0,!0)}updateData(t){var e=0;return this.initGuard(),new Promise(((i,n)=>{this.dataLoader.blockActiveLoad(),"string"==typeof t&&(t=JSON.parse(t)),t&&t.length>0?t.forEach((t=>{var o=this.rowManager.findRow(t[this.options.index]);o?(e++,o.updateData(t).then((()=>{--e||i()})).catch((e=>{n("Update Error - Unable to update row",t,e)}))):n("Update Error - Unable to find row",t)})):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))}))}addData(t,e,i){return this.initGuard(),new Promise(((n,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof t&&(t=JSON.parse(t)),t?this.rowManager.addRows(t,e,i).then((t=>{var e=[];t.forEach((function(t){e.push(t.getComponent())})),n(e)})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}))}updateOrAddData(t){var e=[],i=0;return this.initGuard(),new Promise(((n,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof t&&(t=JSON.parse(t)),t&&t.length>0?t.forEach((t=>{var o=this.rowManager.findRow(t[this.options.index]);i++,o?o.updateData(t).then((()=>{i--,e.push(o.getComponent()),i||n(e)})):this.rowManager.addRows(t).then((t=>{i--,e.push(t[0].getComponent()),i||n(e)}))})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}))}getRow(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)}getRowFromPosition(t){var e=this.rowManager.getRowFromPosition(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)}deleteRow(t){var e=[];this.initGuard(),Array.isArray(t)||(t=[t]);for(let i of t){let t=this.rowManager.findRow(i,!0);if(!t)return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found");e.push(t)}return e.sort(((t,e)=>this.rowManager.rows.indexOf(t)>this.rowManager.rows.indexOf(e)?1:-1)),e.forEach((t=>{t.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(t,e,i){return this.initGuard(),"string"==typeof t&&(t=JSON.parse(t)),this.rowManager.addRows(t,e,i,!0).then((t=>t[0].getComponent()))}updateOrAddRow(t,e){var i=this.rowManager.findRow(t);return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),i?i.updateData(e).then((()=>i.getComponent())):this.rowManager.addRows(e).then((t=>t[0].getComponent()))}updateRow(t,e){var i=this.rowManager.findRow(t);return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),i?i.updateData(e).then((()=>Promise.resolve(i.getComponent()))):(console.warn("Update Error - No matching row found:",t),Promise.reject("Update Error - No matching row found"))}scrollToRow(t,e,i){var n=this.rowManager.findRow(t);return n?this.rowManager.scrollToRow(n,e,i):(console.warn("Scroll Error - No matching row found:",t),Promise.reject("Scroll Error - No matching row found"))}moveRow(t,e,i){var n=this.rowManager.findRow(t);this.initGuard(),n?n.moveToRow(e,i):console.warn("Move Error - No matching row found:",t)}getRows(t){return this.rowManager.getComponents(t)}getRowPosition(t){var e=this.rowManager.findRow(t);return e?e.getPosition():(console.warn("Position Error - No matching row found:",t),!1)}setColumns(t){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(t)}getColumns(t){return this.columnManager.getComponents(t)}getColumn(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(t){var e=this.columnManager.findColumn(t);if(this.initGuard(),!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show()}hideColumn(t){var e=this.columnManager.findColumn(t);if(this.initGuard(),!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide()}toggleColumn(t){var e=this.columnManager.findColumn(t);if(this.initGuard(),!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()}addColumn(t,e,i){var n=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(t,e,n).then((t=>t.getComponent()))}deleteColumn(t){var e=this.columnManager.findColumn(t);return this.initGuard(),e?e.delete():(console.warn("Column Delete Error - No matching column found:",t),Promise.reject())}updateColumnDefinition(t,e){var i=this.columnManager.findColumn(t);return this.initGuard(),i?i.updateDefinition(e):(console.warn("Column Update Error - No matching column found:",t),Promise.reject())}moveColumn(t,e,i){var n=this.columnManager.findColumn(t),o=this.columnManager.findColumn(e);this.initGuard(),n?o?this.columnManager.moveColumn(n,o,i):console.warn("Move Error - No matching column found:",o):console.warn("Move Error - No matching column found:",t)}scrollToColumn(t,e,i){return new Promise(((n,o)=>{var r=this.columnManager.findColumn(t);return r?this.columnManager.scrollToColumn(r,e,i):(console.warn("Scroll Error - No matching column found:",t),Promise.reject("Scroll Error - No matching column found"))}))}redraw(t){this.initGuard(),this.columnManager.redraw(t),this.rowManager.redraw(t)}setHeight(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw()}on(t,e){this.externalEvents.subscribe(t,e)}off(t,e){this.externalEvents.unsubscribe(t,e)}dispatchEvent(){Array.from(arguments).shift(),this.externalEvents.dispatch(...arguments)}alert(t,e){this.initGuard(),this.alertManager.alert(t,e)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)}module(t){var e=this.modules[t];return e||console.error("Tabulator module not installed: "+t),e}}KX.defaultOptions={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}},new ZX(KX);class $X extends KX{}function JX(t,e){const i=document.getElementById(t);return i?new $X(i,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function QX(t,e){let i=t.getValue();return i.length>e&&(i=`${i.substr(0,e)}<br>${i.substr(e)}`),i}function tY(t,e=!0){const i={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?i.Cont.push([t[3],t[4],t[2]]):i.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?i.Mob.push([t[3],t[4],t[2]]):i.Mob.push([t[3],t[2]]))})),i}function eY(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function iY(t){for(const e of t)if(Array.isArray(e)){if(!iY(e))return!1}else if("All"!==e)return!1;return!0}function nY(t,e,i,n){return iY(e)?(t.queryDefinition.dataAccessId=i,t.dashboard.setParameter(t.parameter,["All"])):t.queryDefinition.dataAccessId=n,!0}function oY(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function rY(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function aY(t,e){const i=t.resultset.toString();document.getElementById(e).innerText=i.replace(".",",")}function sY(t,e){document.getElementById(e).innerText=u(t)}new ZX($X,MX)})(),n})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vlcishared=e():t.vlcishared=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){const{resultset:e,metadata:n}=t,o=[];return e.forEach((t=>{const e={};t.forEach(((t,o)=>{e[n[o].colName]=t})),o.push(e)})),o}function o(t,e){t.forEach((t=>{t.id in e&&Object.entries(e[t.id]).forEach((n=>{const o=n[0],r=n[1];"object"==typeof r?r.className?document.querySelector(r.className).className=t[o]:r.element&&r.format&&(document.querySelector(r.element).textContent=e[t.id][o].format(t[o])):document.querySelector(r).textContent=t[o]}))}))}t.r(e),t.d(e,{addPointInteger:()=>c,buildCamarasTrafico:()=>O,buildTableCalidadAire:()=>A,calculateMaxYAxis:()=>L,calculatePentahoPath:()=>E,calculateXAxisStart:()=>T,configureDataGaugeCommon:()=>p,configureDataGaugeMonthCommon:()=>f,configureDataLine:()=>h,formatMonthAnyo:()=>i,formatName:()=>u,formatNameHeaderColumn:()=>S,formatToMillions:()=>l,formatTooltip:()=>N,formatTooltipPie:()=>I,formatTrimestre:()=>s,getMonth:()=>a,getSelectCommonOptions:()=>v,initChart:()=>x,initTable:()=>$,initialCalls:()=>M,printDataChart:()=>D,printDataInHTMLElements:()=>o,printNoDataChart:()=>w,processDataStackedBar:()=>m,resetFilter:()=>y,resultsetWithFields:()=>n,selectFilterAll:()=>b,splitDataset:()=>g});const r={"01":"Enero","02":"Febrero","03":"Marzo","04":"Abril","05":"Mayo","06":"Junio","07":"Julio","08":"Agosto","09":"Septiembre",10:"Octubre",11:"Noviembre",12:"Diciembre"};function a(t){return{1:"Gen",2:"Feb",3:"Mar",4:"Abr",5:"Mai",6:"Jun",7:"Jul",8:"Ago",9:"Sep",10:"Oct",11:"Nov",12:"Des"}[parseInt(t.toString(),10)]}function i(t){const e=t.substring(0,4);return`${r[t.substring(4,6)]} ${e}`}function s(t){const[e,n]=t.split("-");return`${parseFloat(n)/3}T ${e}`}function c(t){let e=navigator.language||navigator.userLanguage;e=e.length<=2?`${e}-${e.toUpperCase()}`:e;const n={minimumFractionDigits:0,maximumFractionDigits:2};return"es-ES"===e?t.toLocaleString("de-DE",n):t.toLocaleString(e,n)}function l(t){const e=1e6;return t>=e?t/e+"M":t.toString()}function u(t,e=29){if(t.length>=e){const n=t.split(" ");let o="",r="";return n.forEach((t=>{`${o} ${t}`.length<=e?o+=(o?" ":"")+t:(r+=`${o}\n`,o=t)})),r+=o,r}return t}function d(t,e,n=1){const o=Math.max(...t.map((t=>t[e])))*n;return 5e3*Math.ceil(o/5e3)}function m(t,e=!0,n="",o=12){let r=(0,t.reduce(((t,e)=>{const n=e[0];return t[n]||(t[n]=[]),t[n].push(e),t}),{}));const i=new Set(t.map((t=>t[1]))),s=Object.keys(r);i.forEach((t=>{s.forEach((e=>{void 0===r[e].find((e=>e[1]===t))&&(r[e].push([r[e][0][0],t,void 0]),r[e].sort())}))}));const l=Object.entries(r).sort(((t,e)=>t[0].localeCompare(e[0])));r=Object.fromEntries(l);const u=[];let d;return Object.keys(r).forEach((t=>{d=e?a(t):t;const i=""!==n?{borderWidth:2,borderColor:n.shift()}:void 0;u.push({name:d,type:"bar",stack:"total",label:{show:!0,fontFamily:"Montserrat",fontSize:o,formatter:t=>c(Math.round(t.value))},itemStyle:i,emphasis:{focus:"series"},data:r[t].map((t=>t[2]))})})),[Array.from(i),u]}function p(t,e,n,o=30,r=15,a=30,i=-70,s=70){const l=d(t,e.data,1.1),m=s,p=n.slice(),f=[];let h=r,g=a,b=i;for(let n=0;n<t.length;n+=1)f.push({value:t[n][e.data],name:u(t[n][e.type]),color:p.shift(),title:{offsetCenter:[`${String(b)}%`,`${String(h)}%`],fontFamily:"Montserrat",fontSize:o},detail:{offsetCenter:[`${String(b)}%`,`${String(g)}%`],fontFamily:"Montserrat",width:"33%",formatter:t=>c(Math.round(t))}}),b+=m,(n+1)%3==0&&(g+=a,h+=2*r,b=i);return[l,f]}function f(t,e,n,o=0){return[d(e,n.data,1.1),t=>function(t,e,n){const o=c(Math.round(e)),r=a(t[n][0]),i=t[n][1],s=`\n${r} ${i} : ${o}`,l=`${o}\n${r} ${i}`;return window.innerWidth<=1710?s:l}(e,t,o),[{value:e[o][n.data]}]]}function h(t,e,n=!1){const{resultset:o}={resultset:t},r=new Set,a=new Set,i=e,s=o.map((([t,e,o])=>{const i=n?Math.round(o):o;return r.add(t),a.add(e),{day:e,type:t,value:i}})),c=Array.from(a.values()),l=Array.from(r.values());return l.sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase(),"es",{ignorePunctuation:!0}))),[l.map((t=>{const e=s.filter((e=>e.type===t)).map((({day:e,value:n})=>[e,t,n])),n=c.map((t=>{const n=e.find((([e])=>e===t));return n?n[2]:null}));return{name:t,type:"line",symbol:"circle",color:i.shift(),symbolSize:6,smooth:!1,data:n}})),a,l]}function g(t,e=!0){const n={Cont:[],Mob:[]};return t.forEach((t=>{"is-res-001-kgs-contenidors"===t[0]&&"total"===t[1]&&(e?n.Cont.push([t[3],t[4],t[2]]):n.Cont.push([t[3],t[2]])),"Mobles"===t[1]&&(e?n.Mob.push([t[3],t[4],t[2]]):n.Mob.push([t[3],t[2]]))})),n}function b(t){const e=t.resultset.map((t=>t[0]));return this.dashboard.fireChange(this.parameter,e),t}function y(t){t.forEach((t=>{Dashboards.fireChange(t,["All"])}))}function v(){return{input:{root:{id:"All"},indexes:{id:0,label:0}},component:{Root:{strings:{isDisabled:"No disponible",allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}},Group:{Strings:{allItems:"Todos",noItems:"Ninguno",btnApply:"Aceptar",btnCancel:"Cancelar"}}}}}function $(t,e){const n=document.getElementById(t);return n?new Tabulator(n,e):(console.error(`No se pudo encontrar el elemento con ID ${t}.`),null)}function S(t,e){let n=t.getValue();return n.length>e&&(n=`${n.substr(0,e)}<br>${n.substr(e)}`),n}function A(t){const e=[],n=[100,200,350,500,750,751],o=[40,90,120,230,340,341],r=[50,100,130,240,380,381],a=[20,40,50,100,150,151],i=[10,20,25,50,75,76],s={0:"b",1:"a",2:"d",3:"m",4:"mm",5:"em",6:"",7:"nd"};function c(t,e,n){const o=document.createElement("td");if(o.setAttribute("id",t),null!=e){o.innerHTML=e;const t=function(t,e){let n;return void 0===e?n=6:"ND"===e?n=7:(n=5,t.forEach(((t,o)=>{e<=t&&5===n&&(n=o)}))),s[n]}(n,e);o.classList.add(t)}return o}return t.forEach((t=>{const s=t;"noData"===s.operationalstatus&&(s.so2value="ND",s.no2value="ND",s.o3value="ND",s.pm10value="ND",s.pm25value="ND"),"A09_CABANYAL_60m"===s.entityid&&(s.pm10value=void 0,s.pm25value=void 0);const l=document.createElement("tr"),u=document.createElement("td");u.innerHTML=s.address,l.appendChild(u),l.appendChild(c(`${s.entityid}_so2`,s.so2value,n)),l.appendChild(c(`${s.entityid}_no2`,s.no2value,o)),l.appendChild(c(`${s.entityid}_o3`,s.o3value,r)),l.appendChild(c(`${s.entityid}_pm10`,s.pm10value,a)),l.appendChild(c(`${s.entityid}_pm25`,s.pm25value,i)),e.push(l)})),e}function C(t,e){document.querySelectorAll(`[${t}]`).forEach((n=>{!function(t,e,n){const o=e;if(t){const e=new XMLHttpRequest;e.onreadystatechange=function(){4===this.readyState&&(200===this.status&&(o.innerHTML=this.responseText,n&&n()),404===this.status&&(o.innerHTML="No se ha podido cargar correctamente."))},e.open("GET",t,!0),e.send()}}(n.getAttribute(t),n,e)}))}function M(t){C("include-html-cabecera"),C("include-html-menu"),C("include-html-main-container",t),C("include-html-copyright")}function E(t){document.location=`${document.documentURI.split("%3A")[0]}%3A${document.documentURI.split("%3A")[1]}%3A${document.documentURI.split("%3A")[2]}%3A${document.documentURI.split("%3A")[3]}%3A${t}`}function x(t,e){const n=document.getElementById(t);if(!n)return console.error(`No se pudo encontrar el elemento con ID ${t}.`),null;const o=echarts.init(n);return o.setOption(e,!0),window.addEventListener("resize",(()=>{null!=o&&void 0!==o&&o.resize()})),o}function w(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="url('./build/images/nodata1.png') no-repeat top center",o.hidden=!1)}function D(t,e){const n=t?document.querySelector(t):null,o=e?document.querySelector(e):null;n&&(n.hidden=!0),o&&(o.style.background="#ffffff",o.hidden=!1)}function N(t,e=!1,n=!0){let o=`<p>${t[0].name}</p>`;return t.forEach((t=>{const r=e?Math.round(t.data):t.data,a=n?`<div>${i=t.color,`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${i}"></span>`} ${t.seriesName}: \n <strong style="float: right; margin-left:20px">\n ${t.data?c(r):"-"}\n </strong>\n </div>`:`<div>\n <strong>${t.data?c(r):"-"}\n </strong>\n </div>`;var i;o+=a})),o}function T(t){return 100*(t-120)/t}function L(t,e){const n=Math.max(...t);return n+(e-n%e)}function I(t,e=!1){const n=`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${t.color}"></span>`,o=e?`${t.percent}%`:c(t.value);return`<div> ${n} ${t.name} <strong style="float: right; margin-left:20px"> ${o} </strong></div>`}function O(t,e,n,o,r,a){let i=!1,s=!1;const c=document.querySelector(t),l=document.querySelector(e),u=()=>{"undefined"!=typeof Liferay&&"ca-ES"===Liferay.ThemeDisplay.getBCP47LanguageId()?(c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=cas"),l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=cas")):(c&&c.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?camara=1&lang=val"),l&&l.setAttribute("src","https://camaras.valencia.es/camaras/ocimovil.html?lang=val"))};function d(t=!0){const e=document.querySelector(n);t?(c&&(c.src="about:blank"),l&&(l.src="about:blank"),e.classList.add("blur"),s=!0):(e.classList.remove("blur"),u(),s=!1)}const m=t=>{new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(s||u(),i||(i=!0,window.setTimeout(d,a)))}))})).observe(t)};!function(){const{userAgent:t}=navigator;return/iPad|iPhone|iPod|Macintosh/.test(t)&&!window.MSStream}()?(c&&(c.setAttribute("sandbox","allow-scripts"),m(c)),l&&(l.setAttribute("sandbox","allow-scripts"),m(l)),document.querySelector(r).addEventListener("click",(()=>{d(!1),window.setTimeout(d,a)}))):document.querySelectorAll(o)[0].style.display="none"}return e})()));
|
|
3
2
|
//# sourceMappingURL=vlcishared.js.map
|