dpchart
Version:
Create your graph based of eCharts
1 lines • 1.17 MB
JavaScript
var index;(()=>{var t={99(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(dpchart,"fakeData",{value:(t,e,n)=>{let i=+new Date(t);const r=[],o=[Math.random()*e];for(let t=1;t<n;t++){var a=new Date(i+=864e5);r.push([a.getFullYear(),a.getMonth()+1,a.getDate()].join("/")),o.push(Math.round(20*(Math.random()-.5)+o[t-1]))}return[r,o]}})},190(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(dpchart,"cvs",{value:{processData:t=>{const e=t.split(/\r\n|\n/)[0].split(","),n=[],i=e.splice(0,5);for(;e.length>0;){const t=[];for(let n=0;n<5;n++)t.push(i[n]+":"+e.shift());n.push(t)}return n},import:()=>{$.ajax({type:"GET",url:"data.txt",dataType:"text",success:t=>{dpchart.csv.processData(t)}})},export:()=>{}}})},330(t){"use strict";t.exports=JSON.parse('{"name":"dpchart","version":"1.0.21","description":"Create your graph based of eCharts","homepage":"https://github.com/passariello","copyright":"Dario Passariello","license":"MIT","port":3000,"target":"web","deprecated":false,"preferGlobal":true,"main":"./index.js","app":{"folder":"/","port":"3001","code":"dpchart","name":"dpchart","type":"alpha","url":{"dev":"http://localhost","prod":""},"proxy":{"api":{"tst":"http://localhost:5003/","dev":"https://a51.dev/","pro":"https://a51.dev/"}},"socket":{"url":{"tst":"wss://ws.a51.dev/","dev":"wss://ws.a51.dev/","pro":"wss://ws.a51.dev/"}}},"author":{"name":"Dario Passariello","url":"https://github.com/passariello/","email":"dariopassariello@gmail.com"},"contributors":[{"name":"Dario Passariello","email":"dariopassariello@gamil.com"},{"name":"Valeria Cala\' Scaglitta","email":"valeriacalascaglitta@gamil.com"}],"support":{"name":"Dario Passariello","url":"https://github.com/passariello","email":"dariopassariello@gmail.com","info":"dariopassariello@gmail.com"},"company":{},"workspaces":[".dev"],"globals":{"dpchart":{}},"browserslist":{"production":["last 2 Chrome major versions","last 2 Firefox major versions","last 2 Safari major versions","last 2 Edge major versions","last 2 Opera versions","last 2 iOS major versions","last 1 Explorer major version","last 1 ChromeAndroid version","last 1 UCAndroid version","last 1 Samsung version","last 1 OperaMini version","Firefox ESR",">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"keywords":["charts","line","bar","passariello","dpchart"],"funding":[{"type":"patreon","url":"https://www.patreon.com/passariello"}],"extends":"./tsconfig.json","types":"./index.d.ts","typings":"./types/*","typing":["types/*"],"scripts":{"build":"webpack --progress --color --mode production --config webpack.ts && cd dist","watch":"webpack --watch --progress --color --mode development --config webpack.ts","-----------":"","npm:publish":"npm run build && cd dist && ls -al && npm publish"},"engines":{"node":">=18"},"dependencies":{"echarts":"6.0.0","echarts-stat":"1.2.0"},"devDependencies":{"dphelper":"2.2.4","@babel/runtime":"7.28.4","@babel/core":"^7.28.5","@babel/plugin-transform-runtime":"7.28.5","@babel/preset-env":"7.28.5","@babel/preset-react":"7.28.5","@babel/preset-typescript":"7.28.5","@types/react":"19.2.7","@types/react-dom":"19.2.3","babel-loader":"10.0.0","@babel/eslint-parser":"^7.28.5","@eslint/js":"9.39.2","@types/jest":"^30.0.0","@types/node":"^25.0.3","@types/webpack-env":"1.18.8","@typescript-eslint/eslint-plugin":"8.50.1","@typescript-eslint/parser":"8.50.1","copy-webpack-plugin":"^13.0.1","css-loader":"7.1.2","eslint":"9.39.2","file-loader":"6.2.0","react":"19.2.3","react-dom":"19.2.3","sass":"^1.97.1","sass-loader":"^16.0.6","style-loader":"^4.0.0","terser-webpack-plugin":"^5.3.16","ts-jest":"29.4.6","ts-loader":"^9.5.4","ts-node":"10.9.2","typescript":"5.9.3","webpack":"^5.104.1","webpack-cli":"6.0.1","webpack-dev-server":"^5.2.2"}}')},347(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(dpchart,"update",{value:t=>{const e=dpchart.echarts.init(document.getElementById(t.id));e.hideLoading(),t.data&&e.setOption(t.data),t.json&&$.get(t.json).done((t=>e.setOption(t)))}})},423(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(635);n(799);const r=i.__importDefault(n(330));e.default=()=>{window.dpchart||(Object.defineProperty(window,"dpchart",{value:{},writable:!1,configurable:!1,enumerable:!1}),dpchart.echarts||(dpchart.echarts=n(803)),dpchart.ecStat||(dpchart.ecStat=n(970)),dphelper.load.all(n(847)),dpchart[r.default.name+"_socket"]=n(662))}},635(t,e,n){"use strict";n.r(e),n.d(e,{__addDisposableResource:()=>N,__assign:()=>o,__asyncDelegator:()=>I,__asyncGenerator:()=>M,__asyncValues:()=>T,__await:()=>S,__awaiter:()=>f,__classPrivateFieldGet:()=>P,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>O,__createBinding:()=>y,__decorate:()=>s,__disposeResources:()=>z,__esDecorate:()=>u,__exportStar:()=>v,__extends:()=>r,__generator:()=>g,__importDefault:()=>L,__importStar:()=>k,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>l,__propKey:()=>h,__read:()=>x,__rest:()=>a,__rewriteRelativeImportExtension:()=>B,__runInitializers:()=>c,__setFunctionName:()=>d,__spread:()=>_,__spreadArray:()=>w,__spreadArrays:()=>b,__values:()=>m,default:()=>V});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};function a(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function s(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){return function(n,i){e(n,i,t)}}function u(t,e,n,i,r,o){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,l=i.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!e&&t?i.static?t:t.prototype:null,h=e||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var g in i)f[g]="access"===g?{}:i[g];for(var g in i.access)f.access[g]=i.access[g];f.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(t||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[u],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(h.get=s),(s=a(y.set))&&(h.set=s),(s=a(y.init))&&r.unshift(s)}else(s=a(y))&&("field"===l?r.unshift(s):h[u]=s)}c&&Object.defineProperty(c,i.name,h),d=!0}function c(t,e,n){for(var i=arguments.length>2,r=0;r<e.length;r++)n=i?e[r].call(t,n):e[r].call(t);return i?n:void 0}function h(t){return"symbol"==typeof t?t:"".concat(t)}function d(t,e,n){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function p(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function g(t,e){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var y=Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]};function v(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||y(e,t,n)}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}function b(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}function w(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function S(t){return this instanceof S?(this.v=t,this):new S(t)}function M(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(t){return function(e){return Promise.resolve(e).then(t,u)}})),i[Symbol.asyncIterator]=function(){return this},i;function a(t,e){r[t]&&(i[t]=function(e){return new Promise((function(n,i){o.push([t,e,n,i])>1||s(t,e)}))},e&&(i[t]=e(i[t])))}function s(t,e){try{(n=r[t](e)).value instanceof S?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(t){c(o[0][3],t)}var n}function l(t){s("next",t)}function u(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function I(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:S(t[i](e)),done:!1}:r?r(e):e}:r}}function T(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=m(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var D=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},A=function(t){return A=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},A(t)};function k(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=A(t),i=0;i<n.length;i++)"default"!==n[i]&&y(e,t,n[i]);return D(e,t),e}function L(t){return t&&t.__esModule?t:{default:t}}function P(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function O(t,e,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}function R(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function N(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e}var E="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function z(t){function e(e){t.error=t.hasError?new E(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,i=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===i)return i=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(o).then(r,(function(t){return e(t),r()}))}else i|=1}catch(t){e(t)}if(1===i)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}function B(t,e){return"string"==typeof t&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(t,n,i,r,o){return n?e?".jsx":".js":!i||r&&o?i+r+"."+o.toLowerCase()+"js":t})):t}const V={__extends:r,__assign:o,__rest:a,__decorate:s,__param:l,__esDecorate:u,__runInitializers:c,__propKey:h,__setFunctionName:d,__metadata:p,__awaiter:f,__generator:g,__createBinding:y,__exportStar:v,__values:m,__read:x,__spread:_,__spreadArrays:b,__spreadArray:w,__await:S,__asyncGenerator:M,__asyncDelegator:I,__asyncValues:T,__makeTemplateObject:C,__importStar:k,__importDefault:L,__classPrivateFieldGet:P,__classPrivateFieldSet:O,__classPrivateFieldIn:R,__addDisposableResource:N,__disposeResources:z,__rewriteRelativeImportExtension:B}},662(t){"use strict";t.exports=JSON.parse('[{"name":"DPCHART.UPGRADE","active":true,"description":"none"}]')},672(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(dpchart,"credits",{value:t=>{console.groupCollapsed(`%c${t.name} v${t.version}%c`,"color:orange",""),console.debug(`%c${t.name} v${t.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`%cType ${t.name} in this console to see it`,"color:gray",""),console.debug("name: %c"+t.name,"color:orange",""),console.debug("version: %c"+t.version,"color:orange",""),console.debug("description: %c"+t.description,"color:orange",""),console.debug("license: %c"+t.license,"color:orange",""),console.debug("author: %c"+t.author.name,"color:orange",""),console.debug("email: %c"+t.author.email,"color:orange",""),console.groupEnd()},writable:!1,configurable:!1,enumerable:!1})},733(t){var e;e=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){var i;void 0===(i=function(t){return{clustering:n(1),regression:n(5),statistics:n(6),histogram:n(15),transform:{regression:n(18),histogram:n(21),clustering:n(22)}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;i=function(t){var e=n(2),i=e.dataPreprocess,r=e.normalizeDimensions,o=n(3),a=n(4),s=o.size,l=o.sumOfColumn,u=o.sum,c=o.zeros,h=(a=n(4)).isNumber,d=Math.pow,p={SINGLE:"single",MULTIPLE:"multiple"};function f(t,e,n){for(var i,r,o,a,s=c(t.length,2),l=function(t,e){for(var n=c(t,e.length),i=0;i<e.length;i++)for(var r=e[i],o=0;o<t;o++)n[o][i]=r.min+r.span*Math.random();return n}(e,m(t,n.dimensions)),u=!0;u;){u=!1;for(var h=0;h<t.length;h++){i=1/0,r=-1;for(var d=0;d<e;d++)(o=v(t[h],l[d],n))<i&&(i=o,r=d);s[h][0]!==r&&(u=!0),s[h][0]=r,s[h][1]=i}for(h=0;h<e;h++){for(a=[],d=0;d<s.length;d++)s[d][0]===h&&a.push(t[d]);l[h]=g(a,n)}}return{centroids:l,clusterAssigned:s}}function g(t,e){for(var n,i,r=[],o=0;o<e.dimensions.length;o++){var a=e.dimensions[o];n=0;for(var s=0;s<t.length;s++)n+=t[s][a];i=n/t.length,r.push(i)}return r}function y(t,e){var n=e.outputCentroidDimensions;if(e.outputType===p.SINGLE&&null!=n)for(var i=t.data,r=t.centroids,o=0;o<i.length;o++)for(var a=i[o],s=r[a[e.outputClusterIndexDimension]],l=Math.min(s.length,n.length),u=0;u<l;u++)a[n[u]]=s[u]}function v(t,e,n){for(var i=0,r=n.dimensions,o=n.rawExtents,a=0;a<r.length;a++){var s=o[a].span;if(s){var l=(t[r[a]]-e[a])/s;i+=d(l,2)}}return i}function m(t,e){for(var n=[],i=e.length,r=0;r<i;r++)n.push({min:1/0,max:-1/0});for(r=0;r<t.length;r++)for(var o=t[r],a=0;a<i;a++){var s=n[a],l=o[e[a]];s.min>l&&(s.min=l),s.max<l&&(s.max=l)}for(r=0;r<i;r++)n[r].span=n[r].max-n[r].min;return n}return{OutputType:p,hierarchicalKMeans:function(t,e,n){var o=(h(e)?{clusterCount:e,stepByStep:n}:e)||{clusterCount:2},d=o.clusterCount;if(!(d<2)){var x,_,b,w=function(t,e){var n=s(t);if(n.length<1)throw new Error("The input data of clustering should be two-dimension array.");for(var i=n[1],o=[],l=0;l<i;l++)o.push(l);var u=r(e.dimensions,o),c=e.outputType||p.MULTIPLE,h=e.outputClusterIndexDimension;if(c===p.SINGLE&&!a.isNumber(h))throw new Error("outputClusterIndexDimension is required as a number.");return{dimensions:u,rawExtents:m(t,u),outputType:c,outputClusterIndexDimension:h,outputCentroidDimensions:e.outputCentroidDimensions}}(t,o),S=w.outputType===p.SINGLE,M=i(t,{dimensions:w.dimensions}),I=c(M.length,2);if(S){x=[];var T=w.outputClusterIndexDimension;_=function(t,e){x[t][T]=e},b=function(t){return x[t][T]};for(var C=0;C<M.length;C++)x.push(M[C].slice()),B(C,0),_(C,0)}else _=function(t,e){I[t][0]=e},b=function(t){return I[t][0]};var D,A,k,L,P,O,R=g(M,w),N=[R];for(C=0;C<M.length;C++)B(C,v(M[C],R,w));var E=1,z={data:x,centroids:N,isEnd:!1};if(S||(z.clusterAssment=I),o.stepByStep)z.next=function(){return V(),y(z,w),z};else for(;V(),!z.isEnd;);return y(z,w),z}function B(t,e){I[t][1]=e}function V(){if(E<d){var t,e,n;D=1/0;for(var i=0;i<N.length;i++){A=[],k=[];for(var r=0;r<M.length;r++)b(r)===i?A.push(M[r]):k.push(I[r][1]);L=f(A,2,w),P=l(L.clusterAssigned,1),O=u(k),P+O<D&&(D=O+P,t=i,e=L.centroids,n=L.clusterAssigned)}for(r=0;r<n.length;r++)0===n[r][0]?n[r][0]=t:1===n[r][0]&&(n[r][0]=N.length);for(N[t]=e[0],N.push(e[1]),r=0,i=0;r<M.length&&i<n.length;r++)b(r)===t&&(_(r,n[i][0]),B(r,n[i++][1]));var o=[];if(!S){for(r=0;r<N.length;r++)for(o[r]=[],i=0;i<M.length;i++)b(i)===r&&o[r].push(M[i]);z.pointsInCluster=o}E++}else z.isEnd=!0}}}}.call(e,n,e,t),void 0===i||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(3),i=e.isArray,r=e.size,o=n(4).isNumber;return{normalizeDimensions:function(t,e){return"number"==typeof t?[t]:null==t?e:t},dataPreprocess:function(t,e){var n=(e=e||{}).dimensions,a={};if(null!=n)for(var s=0;s<n.length;s++)a[n[s]]=!0;var l=e.toOneDimensionArray?n?n[0]:0:null;if(!i(t))throw new Error("Invalid data type, you should input an array");var u,c=[],h=r(t);if(1===h.length)for(s=0;s<h[0];s++){var d=t[s];o(d)&&c.push(d)}else if(2===h.length)for(s=0;s<h[0];s++){for(var p=!0,f=(d=t[s],0);f<h[1];f++)u=f,n&&!a.hasOwnProperty(u)||o(d[f])||(p=!1);p&&c.push(null!=l?d[l]:d)}return c},getPrecision:function(t){var e=t.toString(),n=e.indexOf(".");return n<0?0:e.length-1-n}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=Object.prototype.toString,n=Array.prototype.map;function i(t){return"[object Array]"===e.call(t)}function r(t,e){return t>e?1:t<e?-1:t===e?0:NaN}return{size:function(t){for(var e=[];i(t);)e.push(t.length),t=t[0];return e},isArray:i,zeros:function(t,e){for(var n=[],i=0;i<t;i++){n[i]=[];for(var r=0;r<e;r++)n[i][r]=0}return n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e},sumOfColumn:function(t,e){for(var n=0,i=0;i<t.length;i++)n+=t[i][e];return n},ascending:r,bisect:function(t,e,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var o=Math.floor((n+i)/2),a=r(t[o],e);if(a>0)i=o;else{if(!(a<0))return o+1;n=o+1}}return n},map:function(t,e,i){if(t&&e){if(t.map&&t.map===n)return t.map(e,i);for(var r=[],o=0,a=t.length;o<a;o++)r.push(e.call(i,t[o],o,t));return r}}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){return{isNumber:function(t){return"number"==typeof(t=null===t?NaN:+t)&&!isNaN(t)},isInteger:function(t){return isFinite(t)&&t===Math.round(t)},quantityExponent:function(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;i=function(t){var e=n(2),i=e.dataPreprocess,r=e.normalizeDimensions,o={linear:function(t,e){for(var n=e.dimensions[0],i=e.dimensions[1],r=0,o=0,a=0,s=0,l=t.length,u=0;u<l;u++)r+=(f=t[u])[n],o+=f[i],a+=f[n]*f[i],s+=f[n]*f[n];for(var c=(l*a-r*o)/(l*s-r*r),h=o/l-c*r/l,d=[],p=0;p<t.length;p++){var f,g=(f=t[p]).slice();g[n]=f[n],g[i]=c*f[n]+h,d.push(g)}return{points:d,parameter:{gradient:c,intercept:h},expression:"y = "+Math.round(100*c)/100+"x + "+Math.round(100*h)/100}},linearThroughOrigin:function(t,e){for(var n=e.dimensions[0],i=e.dimensions[1],r=0,o=0,a=0;a<t.length;a++)r+=(c=t[a])[n]*c[n],o+=c[n]*c[i];for(var s=o/r,l=[],u=0;u<t.length;u++){var c,h=(c=t[u]).slice();h[n]=c[n],h[i]=c[n]*s,l.push(h)}return{points:l,parameter:{gradient:s},expression:"y = "+Math.round(100*s)/100+"x"}},exponential:function(t,e){for(var n=e.dimensions[0],i=e.dimensions[1],r=0,o=0,a=0,s=0,l=0,u=0;u<t.length;u++)(g=t[u])[n],r+=g[i],l+=g[n]*g[i],o+=g[n]*g[n]*g[i],a+=g[i]*Math.log(g[i]),s+=g[n]*g[i]*Math.log(g[i]);for(var c=r*o-l*l,h=Math.pow(Math.E,(o*a-l*s)/c),d=(r*s-l*a)/c,p=[],f=0;f<t.length;f++){var g,y=(g=t[f]).slice();y[n]=g[n],y[i]=h*Math.pow(Math.E,d*g[n]),p.push(y)}return{points:p,parameter:{coefficient:h,index:d},expression:"y = "+Math.round(100*h)/100+"e^("+Math.round(100*d)/100+"x)"}},logarithmic:function(t,e){for(var n=e.dimensions[0],i=e.dimensions[1],r=0,o=0,a=0,s=0,l=0;l<t.length;l++){var u=t[l];r+=Math.log(u[n]),o+=u[i]*Math.log(u[n]),a+=u[i],s+=Math.pow(Math.log(u[n]),2)}for(var c=(l*o-a*r)/(l*s-r*r),h=(a-c*r)/l,d=[],p=0;p<t.length;p++){var f=(u=t[p]).slice();f[n]=u[n],f[i]=c*Math.log(u[n])+h,d.push(f)}return{points:d,parameter:{gradient:c,intercept:h},expression:"y = "+Math.round(100*h)/100+" + "+Math.round(100*c)/100+"ln(x)"}},polynomial:function(t,e){var n=e.dimensions[0],i=e.dimensions[1],r=e.order;null==r&&(r=2);for(var o=[],a=[],s=r+1,l=0;l<s;l++){for(var u=0,c=0;c<t.length;c++)u+=(m=t[c])[i]*Math.pow(m[n],l);a.push(u);for(var h=[],d=0;d<s;d++){for(var p=0,f=0;f<t.length;f++)p+=Math.pow(t[f][n],l+d);h.push(p)}o.push(h)}o.push(a);var g=function(t,e){for(var n=0;n<t.length-1;n++){for(var i=n,r=n+1;r<t.length-1;r++)Math.abs(t[n][r])>Math.abs(t[n][i])&&(i=r);for(var o=n;o<t.length;o++){var a=t[o][n];t[o][n]=t[o][i],t[o][i]=a}for(var s=n+1;s<t.length-1;s++)for(var l=t.length-1;l>=n;l--)t[l][s]-=t[l][n]/t[n][n]*t[n][s]}var u=new Array(e),c=t.length-1;for(r=t.length-2;r>=0;r--){for(a=0,n=r+1;n<t.length-1;n++)a+=t[n][r]*u[n];u[r]=(t[c][r]-a)/t[r][r]}return u}(o,s),y=[];for(l=0;l<t.length;l++){var v=0,m=t[l];for(c=0;c<g.length;c++)v+=g[c]*Math.pow(m[n],c);var x=m.slice();x[n]=m[n],x[i]=v,y.push(x)}var _="y = ";for(l=g.length-1;l>=0;l--)_+=l>1?Math.round(g[l]*Math.pow(10,l+1))/Math.pow(10,l+1)+"x^"+l+" + ":1===l?Math.round(100*g[l])/100+"x + ":Math.round(100*g[l])/100;return{points:y,parameter:g,expression:_}}};return function(t,e,n){var a="number"==typeof n?{order:n}:n||{},s=r(a.dimensions,[0,1]),l=i(e,{dimensions:s}),u=o[t](l,{order:a.order,dimensions:s}),c=s[0];return u.points.sort((function(t,e){return t[c]-e[c]})),u}}.call(e,n,e,t),void 0===i||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e={};return e.max=n(7),e.deviation=n(8),e.mean=n(10),e.median=n(12),e.min=n(14),e.quantile=n(13),e.sampleVariance=n(9),e.sum=n(11),e}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(4).isNumber;return function(t){for(var n=-1/0,i=0;i<t.length;i++)e(t[i])&&t[i]>n&&(n=t[i]);return n}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(9);return function(t){var n=e(t);return n?Math.sqrt(n):n}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(4).isNumber,i=n(10);return function(t){var n=t.length;if(!n||n<2)return 0;if(t.length>=2){for(var r,o=i(t),a=0,s=0;s<t.length;s++)e(t[s])&&(a+=(r=t[s]-o)*r);return a/(t.length-1)}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(11);return function(t){return t.length?e(t)/t.length:0}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(4).isNumber;return function(t){var n=t.length;if(!n)return 0;for(var i=0,r=0;r<n;r++)e(t[r])&&(i+=t[r]);return i}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(13);return function(t){return e(t,.5)}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){return function(t,e){var n=t.length;if(!n)return 0;if(e<=0||n<2)return t[0];if(e>=1)return t[n-1];var i=(n-1)*e,r=Math.floor(i),o=t[r];return o+(t[r+1]-o)*(i-r)}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(4).isNumber;return function(t){for(var n=1/0,i=0;i<t.length;i++)e(t[i])&&t[i]<n&&(n=t[i]);return n}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(7),i=n(14),r=n(13),o=n(8),a=n(2),s=a.dataPreprocess,l=a.normalizeDimensions,u=n(3),c=u.ascending,h=u.map,d=n(16),p=u.bisect,f=n(17),g={squareRoot:function(t){var e=Math.ceil(Math.sqrt(t.length));return e>50?50:e},scott:function(t,e,n){return Math.ceil((n-e)/(3.5*o(t)*Math.pow(t.length,-1/3)))},freedmanDiaconis:function(t,e,n){return t.sort(c),Math.ceil((n-e)/(2*(r(t,.75)-r(t,.25))*Math.pow(t.length,-1/3)))},sturges:function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}};return function(t,n){for(var r="string"==typeof n?{method:n}:n||{},o=null==r.method?g.squareRoot:g[r.method],a=l(r.dimensions),u=s(t,{dimensions:a,toOneDimensionArray:!0}),c=e(u),y=i(u),v=o(u,y,c),m=f(y,c,v),x=m.step,_=m.toFixedPrecision,b=d(+(Math.ceil(y/x)*x).toFixed(_),+(Math.floor(c/x)*x).toFixed(_),x,_),w=b.length,S=new Array(w+1),M=0;M<=w;M++)S[M]={},S[M].sample=[],S[M].x0=M>0?b[M-1]:b[M]-y===x?y:b[M]-x,S[M].x1=M<w?b[M]:c-b[M-1]===x?c:b[M-1]+x;for(M=0;M<u.length;M++)y<=u[M]&&u[M]<=c&&S[p(b,u[M],0,w)].sample.push(u[M]);return{bins:S,data:t=h(S,(function(t){return[+((t.x0+t.x1)/2).toFixed(_),t.sample.length,t.x0,t.x1,t.x0+" - "+t.x1]})),customData:h(S,(function(t){return[t.x0,t.x1,t.sample.length]}))}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;i=function(t){var e=n(2).getPrecision;return function(t,n,i,r){var o=arguments.length;o<2?(n=t,t=0,i=1):o<3?i=1:r=o<4?e(i=+i):+r;for(var a=Math.ceil(((n-t)/i).toFixed(r)),s=new Array(a+1),l=0;l<a+1;l++)s[l]=+(t+l*i).toFixed(r);return s}}.call(e,n,e,t),void 0===i||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(4);return function(t,n,i){var r=Math.abs(n-t)/i,o=e.quantityExponent(r),a=Math.pow(10,o),s=r/a;s>=Math.sqrt(50)?a*=10:s>=Math.sqrt(10)?a*=5:s>=Math.sqrt(2)&&(a*=2);var l=o<0?-o:0;return{step:+(n>=t?a:-a).toFixed(l),toFixedPrecision:l}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(5),i=n(19);return{type:"ecStat:regression",transform:function(t){var n,r=t.upstream,o=t.config||{},a=o.method||"linear",s=e(a,r.cloneRawData(),{order:o.order,dimensions:i.normalizeExistingDimensions(t,o.dimensions)}),l=s.points,u=o.formulaOn;if(null==u&&(u="end"),"none"!==u){for(var c=0;c<l.length;c++)l[c][2]="start"===u&&0===c||"all"===u||"end"===u&&c===l.length-1?s.expression:"";(n=r.cloneAllDimensionInfo())[2]={}}return[{dimensions:n,data:l}]}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(3),i=n(4),r=n(20);return{normalizeExistingDimensions:function(t,n){if(null!=n){var i=t.upstream;if(e.isArray(n)){for(var r=[],o=0;o<n.length;o++){var a;s(a=i.getDimensionInfo(n[o]),n[o]),r[o]=a.index}return r}return s(a=i.getDimensionInfo(n),n),a.index}function s(t,e){if(!t)throw new Error("Can not find dimension by "+e)}},normalizeNewDimensions:function(t){if(e.isArray(t)){for(var n=[],o=[],a=0;a<t.length;a++){var s=l(t[a]);n.push(s.name),o.push(s.index)}return{name:n,index:o}}if(null!=t)return l(t);function l(t){if(i.isNumber(t))return{index:t};if(r.isObject(t)&&i.isNumber(t.index))return t;throw new Error("Illegle new dimensions config. Expect `{ name: string, index: number }`.")}}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){return{extend:function(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},isObject:function(t){const e=typeof t;return"function"===e||!!t&&"object"===e}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(15),i=n(19);return{type:"ecStat:histogram",transform:function(t){var n=t.upstream,r=t.config||{},o=e(n.cloneRawData(),{method:r.method,dimensions:i.normalizeExistingDimensions(t,r.dimensions)});return[{dimensions:["MeanOfV0V1","VCount","V0","V1","DisplayableName"],data:o.data},{data:o.customData}]}}}.call(e,n,e,t))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t){var e=n(1),i=n(4),r=n(19),o=i.isNumber;return{type:"ecStat:clustering",transform:function(t){var n=t.upstream,i=t.config||{},a=i.clusterCount;if(!o(a)||a<=0)throw new Error('config param "clusterCount" need to be specified as an interger greater than 1.');if(1===a)return[{},{data:[]}];var s=r.normalizeNewDimensions(i.outputClusterIndexDimension),l=r.normalizeNewDimensions(i.outputCentroidDimensions);if(null==s)throw new Error("outputClusterIndexDimension is required as a number.");for(var u=e.hierarchicalKMeans(n.cloneRawData(),{clusterCount:a,stepByStep:!1,dimensions:r.normalizeExistingDimensions(t,i.dimensions),outputType:e.OutputType.SINGLE,outputClusterIndexDimension:s.index,outputCentroidDimensions:(l||{}).index}),c=n.cloneAllDimensionInfo(),h=[],d=0;d<c.length;d++){var p=c[d];h.push(p.name)}if(h[s.index]=s.name,l)for(d=0;d<l.index.length;d++)null!=l.name[d]&&(h[l.index[d]]=l.name[d]);return[{dimensions:h,data:u.data},{data:u.centroids}]}}}.call(e,n,e,t))||(t.exports=i)}])},t.exports=e()},799(t){"use strict";t.exports=dphelper},803(t,e,n){!function(t){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},e(t,n)};function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var r=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},o=new function(){this.browser=new r,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?(o.wxa=!0,o.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?o.worker=!0:!o.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(o.node=!0,o.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);if(i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document){var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,o);var a,s,l="sans-serif",u="12px "+l,c=function(){var t={};if("undefined"==typeof JSON)return t;for(var e=0;e<95;e++){var n=String.fromCharCode(e+32),i=("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N".charCodeAt(e)-20)/100;t[n]=i}return t}(),h={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!a){var n=h.createCanvas();a=n&&n.getContext("2d")}if(a)return s!==e&&(s=a.font=e||u),a.measureText(t);t=t||"";var i=/((?:\d+)?\.?\d*)px/.exec(e=e||u),r=i&&+i[1]||12,o=0;if(e.indexOf("mono")>=0)o=r*t.length;else for(var l=0;l<t.length;l++){var d=c[t[l]];o+=null==d?r:d*r}return{width:o}},loadImage:function(t,e,n){var i=new Image;return i.onload=e,i.onerror=n,i.src=t,i}};function d(t){for(var e in h)t[e]&&(h[e]=t[e])}var p=V(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),f=V(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),g=Object.prototype.toString,y=Array.prototype,v=y.forEach,m=y.filter,x=y.slice,_=y.map,b=function(){}.constructor,w=b?b.prototype:null,S="__proto__",M=2311;function I(){return M++}function T(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function C(t){if(null==t||"object"!=typeof t)return t;var e=t,n=g.call(t);if("[object Array]"===n){if(!pt(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=C(t[i])}}else if(f[n]){if(!pt(t)){var o=t.constructor;if(o.from)e=o.from(t);else for(e=new o(t.length),i=0,r=t.length;i<r;i++)e[i]=t[i]}}else if(!p[n]&&!pt(t)&&!Q(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==S&&(e[a]=C(t[a]));return e}function D(t,e,n){if(!K(e)||!K(t))return n?C(e):t;for(var i in e)if(e.hasOwnProperty(i)&&i!==S){var r=t[i],o=e[i];!K(o)||!K(r)||Y(o)||Y(r)||Q(o)||Q(r)||$(o)||$(r)||pt(o)||pt(r)?!n&&i in t||(t[i]=C(e[i])):D(r,o,n)}return t}function A(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=D(n,t[i],e);return n}function k(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==S&&(t[n]=e[n]);return t}function L(t,e,n){for(var i=W(e),r=0,o=i.length;r<o;r++){var a=i[r];(n?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}var P=h.createCanvas;function O(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function R(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function N(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else L(t,e,n)}function E(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function z(t,e,n){if(t&&e)if(t.forEach&&t.forEach===v)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function B(t,e,n){if(!t)return[];if(!e)return st(t);if(t.map&&t.map===_)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function V(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function G(t,e,n){if(!t)return[];if(!e)return st(t);if(t.filter&&t.filter===m)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function F(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}function W(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}var H=w&&X(w.bind)?w.call.bind(w.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(x.call(arguments)))}};function U(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(x.call(arguments)))}}function Y(t){return Array.isArray?Array.isArray(t):"[object Array]"===g.call(t)}function X(t){return"function"==typeof t}function j(t){return"string"==typeof t}function Z(t){return"[object String]"===g.call(t)}function q(t){return"number"==typeof t}function K(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function $(t){return!!p[g.call(t)]}function J(t){return!!f[g.call(t)]}function Q(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function tt(t){return null!=t.colorStops}function et(t){return null!=t.image}function nt(t){return"[object RegExp]"===g.call(t)}function it(t){return t!=t}function rt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function ot(t,e){return null!=t?t:e}function at(t,e,n){return null!=t?t:null!=e?e:n}function st(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return x.apply(t,e)}function lt(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 ut(t,e){if(!t)throw new Error(e)}function ct(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ht="__ec_primitive__";function dt(t){t[ht]=!0}function pt(t){return t[ht]}var ft=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 W(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},t}(),gt="function"==typeof Map,yt=function(){function t(e){var n=Y(e);this.data=gt?new Map:new ft;var i=this;function r(t,e){n?i.set(t,e):i.set(e,t)}e instanceof t?e.each(r):e&&z(e,r)}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(n,i){t.call(e,n,i)}))},t.prototype.keys=function(){var t=this.data.keys();return gt?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function vt(t){return new yt(t)}function mt(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function xt(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&k(n,e),n}function _t(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function bt(t,e){return t.hasOwnProperty(e)}function wt(){}var St=180/Math.PI,Mt=Number.EPSILON||Math.pow(2,-52),It=Object.freeze({__proto__:null,guid:I,logError:T,clone:C,merge:D,mergeAll:A,extend:k,defaults:L,createCanvas:P,indexOf:O,inherits:R,mixin:N,isArrayLike:E,each:z,map:B,reduce:V,filter:G,find:F,keys:W,bind:H,curry:U,isArray:Y,isFunction:X,isString:j,isStringSafe:Z,isNumber:q,isObject:K,isBuiltInObject:$,isTypedArray:J,isDom:Q,isGradientObject:tt,isImagePatternObject:et,isRegExp:nt,eqNaN:it,retrieve:rt,retrieve2:ot,retrieve3:at,slice:st,normalizeCssArray:lt,assert:ut,trim:ct,setAsPrimitive:dt,isPrimitive:pt,HashMap:yt,createHashMap:vt,concatArray:mt,createObject:xt,disableUserSelect:_t,hasOwn:bt,noop:wt,RADIAN_TO_DEGREE:St,EPSILON:Mt});function Tt(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function Ct(t,e){return t[0]=e[0],t[1]=e[1],t}function Dt(t){return[t[0],t[1]]}function At(t,e,n){return t[0]=e,t[1]=n,t}function kt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Lt(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function Pt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Ot(t){return Math.sqrt(Nt(t))}var Rt=Ot;function Nt(t){return t[0]*t[0]+t[1]*t[1]}var Et=Nt;function zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Bt(t,e){var n=Ot(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function Vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Gt=Vt;function Ft(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Wt=Ft;function Ht(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Ut(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function Yt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Xt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var jt=Object.freeze({__proto__:null,create:Tt,copy:Ct,clone:Dt,set:At,add:kt,scaleAndAdd:Lt,sub:Pt,len:Ot,length:Rt,lenSquare:Nt,lengthSquare:Et,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:zt,normalize:Bt,distance:Vt,dist:Gt,distanceSquare:Ft,distSquare:Wt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:Ht,applyTransform:Ut,min:Yt,max:Xt}),Zt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},qt=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 Zt(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new Zt(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Zt(s,t),"dragleave",t.event),a&&a!==s&&this.handler.dispatchToElement(new Zt(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Zt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Zt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Kt=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===n)return this;var s={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=r[t].length-1,u=r[t][l];return u&&u.callAtLast?r[t].splice(l,0,s):r[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 n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){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 r&&r.afterTrigger&&r.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=e[o-1],s=i.length,l=0;l<s;l++){var u=i[l];if(!r||!r.filter||null==u.query||r.filter(t,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,o-1))}}return r&&r.afterTrigger&&r.afterTrigger(t),this},t}(),$t=Math.log(2);function Jt(t,e,n,i,r,o){var a=i+"-"+r,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/$t);return t[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,p=0;d<s;d++){var f=1<<d;f&r||(h+=(p%2?-1:1)*t[n][d]*Jt(t,e-1,c,u,r|f,o),p++)}return o[a]=h,h}function Qt(t,e){var n=[[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]]],i={},r=Jt(n,8,0,0,0,i);if(0!==r){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Jt(n,7,0===a?1:0,1<<a,1<<s,i)/r*e[a];return function(t,e,n){var i=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/i,t[1]=(e*o[3]+n*o[4]+o[5])/i}}}var te="___zrEVENTSAVED",ee=[];function ne(t,e,n,i,r){if(e.getBoundingClientRect&&o.domSupported&&!ie(e)){var a=e[te]||(e[te]={}),s=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;a.push(d,p),l=l&&o&&d===o[h]&&p===o[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?Qt(s,a):Qt(a,s))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return e.clearMarkers=function(){z(n,(function(t){t.parentNode&&t.parentNode.removeChild(t)}))},n}(e,a),a,r);if(s)return s(t,n,i),!0}return!1}function ie(t){return"CANVAS"===t.nodeName.toUpperCase()}var re=/([&<>"'])/g,oe={"&":"&","<":"<",">":">",'"':""","'":"'"};function ae(t){return null==t?"":(t+"").replace(re,(function(t,e){return oe[e]}))}var se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,le=[],ue=o.browser.firefox&&+o.browser.version.split(".")[0]<39;function ce(t,e,n,i){return n=n||{},i?he(t,e,n):ue&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):he(t,e,n),n}function he(t,e,n){if(o.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ie(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(ne(le,t,i,r))return n.zrX=le[0],void(n.zrY=le[1])}n.zrX=n.zrY=0}function de(t){return t||window.event}function pe(t,e,n){if(null!=(e=de(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&ce(t,r,e,n)}else{ce(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&se.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function fe(t,e,n,i){t.addEventListener(e,n,i)}var ge=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function ye(t){return 2===t.which||3===t.which}var ve=function(){function t(){this._track=[]}return