Hacked By AnonymousFox
!/**
* Highcharts JS v12.1.2 (2025-01-09)
* @module highcharts/modules/data-tools
* @requires highcharts
*
* Highcharts
*
* (c) 2010-2024 Highsoft AS
*
* License: www.highcharts.com/license
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts")):"function"==typeof define&&define.amd?define("highcharts/modules/data-tools",[["highcharts/highcharts"]],e):"object"==typeof exports?exports["highcharts/modules/data-tools"]=e(require("highcharts")):t.Highcharts=e(t.Highcharts)}(this,function(t){return function(){"use strict";var e,o,r,n,i,s,a,u,l,c,f,p,h,d,m,y,g,v={944:function(e){e.exports=t}},b={};function w(t){var e=b[t];if(void 0!==e)return e.exports;var o=b[t]={exports:{}};return v[t](o,o.exports,w),o.exports}w.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return w.d(e,{a:e}),e},w.d=function(t,e){for(var o in e)w.o(e,o)&&!w.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},w.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var C={};w.d(C,{default:function(){return eJ}});var R=w(944),O=w.n(R),N=O().addEvent,T=O().fireEvent,_=O().merge,j=function(){function t(){}return t.prototype.benchmark=function(t,e){var o=[],r=this,n=function(){r.modifyTable(t),r.emit({type:"afterBenchmarkIteration"})},i=_({iterations:1},e).iterations;r.on("afterBenchmarkIteration",function(){if(o.length===i){r.emit({type:"afterBenchmark",results:o});return}n()});var s={startTime:0,endTime:0};return r.on("modify",function(){s.startTime=window.performance.now()}),r.on("afterModify",function(){s.endTime=window.performance.now(),o.push(s.endTime-s.startTime)}),n(),o},t.prototype.emit=function(t){T(this,t.type,t)},t.prototype.modify=function(t,e){var o=this;return new Promise(function(r,n){t.modified===t&&(t.modified=t.clone(!1,e));try{r(o.modifyTable(t,e))}catch(r){o.emit({type:"error",detail:e,table:t}),n(r)}})},t.prototype.modifyCell=function(t,e,o,r,n){return this.modifyTable(t)},t.prototype.modifyColumns=function(t,e,o,r){return this.modifyTable(t)},t.prototype.modifyRows=function(t,e,o,r){return this.modifyTable(t)},t.prototype.on=function(t,e){return N(this,t,e)},t}();(e=j||(j={})).types={},e.registerType=function(t,o){return!!t&&!e.types[t]&&!!(e.types[t]=o)};var A=j,P=O().fireEvent,x=O().isArray,E=O().objectEach,I=O().uniqueKey,M=function(){function t(t){void 0===t&&(t={});var e=this;this.autoId=!t.id,this.columns={},this.id=t.id||I(),this.modified=this,this.rowCount=0,this.versionTag=I();var o=0;E(t.columns||{},function(t,r){e.columns[r]=t.slice(),o=Math.max(o,t.length)}),this.applyRowCount(o)}return t.prototype.applyRowCount=function(t){this.rowCount=t,E(this.columns,function(e){x(e)&&(e.length=t)})},t.prototype.getColumn=function(t,e){return this.columns[t]},t.prototype.getColumns=function(t,e){var o=this;return(t||Object.keys(this.columns)).reduce(function(t,e){return t[e]=o.columns[e],t},{})},t.prototype.getRow=function(t,e){var o=this;return(e||Object.keys(this.columns)).map(function(e){var r;return null===(r=o.columns[e])||void 0===r?void 0:r[t]})},t.prototype.setColumn=function(t,e,o,r){var n;void 0===e&&(e=[]),void 0===o&&(o=0),this.setColumns(((n={})[t]=e,n),o,r)},t.prototype.setColumns=function(t,e,o){var r=this,n=this.rowCount;E(t,function(t,e){r.columns[e]=t.slice(),n=t.length}),this.applyRowCount(n),(null==o?void 0:o.silent)||(P(this,"afterSetColumns"),this.versionTag=I())},t.prototype.setRow=function(t,e,o,r){void 0===e&&(e=this.rowCount);var n=this.columns,i=o?this.rowCount+1:e+1;E(t,function(t,s){var a=n[s]||(null==r?void 0:r.addColumns)!==!1&&Array(i);a&&(o?a.splice(e,0,t):a[e]=t,n[s]=a)}),i>this.rowCount&&this.applyRowCount(i),(null==r?void 0:r.silent)||(P(this,"afterSetRows"),this.versionTag=I())},t}(),F=(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),D=O().addEvent,S=O().defined,L=O().fireEvent,V=O().extend,k=O().uniqueKey,Y=function(t){function e(e){void 0===e&&(e={});var o=t.call(this,e)||this;return o.modified=o,o}return F(e,t),e.isNull=function(t){if(t===e.NULL)return!0;if(t instanceof Array){if(!t.length)return!1;for(var o=0,r=t.length;o<r;++o)if(null!==t[o])return!1}else{var n=Object.keys(t);if(!n.length)return!1;for(var o=0,r=n.length;o<r;++o)if(null!==t[n[o]])return!1}return!0},e.prototype.clone=function(t,o){var r={};this.emit({type:"cloneTable",detail:o}),t||(r.columns=this.columns),this.autoId||(r.id=this.id);var n=new e(r);return t||(n.versionTag=this.versionTag,n.originalRowIndexes=this.originalRowIndexes,n.localRowIndexes=this.localRowIndexes),this.emit({type:"afterCloneTable",detail:o,tableClone:n}),n},e.prototype.deleteColumns=function(t,e){var o=this.columns,r={},n={},i=this.modifier,s=this.rowCount;if((t=t||Object.keys(o)).length){this.emit({type:"deleteColumns",columnNames:t,detail:e});for(var a=0,u=t.length,l=void 0,c=void 0;a<u;++a)(l=o[c=t[a]])&&(r[c]=l,n[c]=Array(s)),delete o[c];return Object.keys(o).length||(this.rowCount=0,this.deleteRowIndexReferences()),i&&i.modifyColumns(this,n,0,e),this.emit({type:"afterDeleteColumns",columns:r,columnNames:t,detail:e}),r}},e.prototype.deleteRowIndexReferences=function(){delete this.originalRowIndexes,delete this.localRowIndexes},e.prototype.deleteRows=function(t,e,o){void 0===e&&(e=1);var r=[],n=[],i=this.modifier;if(this.emit({type:"deleteRows",detail:o,rowCount:e,rowIndex:t||0}),void 0===t&&(t=0,e=this.rowCount),e>0&&t<this.rowCount)for(var s=this.columns,a=Object.keys(s),u=0,l=a.length,c=void 0,f=void 0;u<l;++u){f=(c=s[a[u]]).splice(t,e),u||(this.rowCount=c.length);for(var p=0,h=f.length;p<h;++p)r[p]=r[p]||[],r[p][u]=f[p];n.push(Array(l))}return i&&i.modifyRows(this,n,t||0,o),this.emit({type:"afterDeleteRows",detail:o,rowCount:e,rowIndex:t||0,rows:r}),r},e.prototype.emit=function(t){["afterDeleteColumns","afterDeleteRows","afterSetCell","afterSetColumns","afterSetRows"].includes(t.type)&&(this.versionTag=k()),L(this,t.type,t)},e.prototype.getCell=function(t,e){var o=this.columns[t];if(o)return o[e]},e.prototype.getCellAsBoolean=function(t,e){var o=this.columns[t];return!!(o&&o[e])},e.prototype.getCellAsNumber=function(t,e,o){var r=this.columns[t],n=r&&r[e];switch(typeof n){case"boolean":return n?1:0;case"number":return isNaN(n)&&!o?null:n}return isNaN(n=parseFloat("".concat(null!=n?n:"")))&&!o?null:n},e.prototype.getCellAsString=function(t,e){var o=this.columns[t];return"".concat(o&&o[e])},e.prototype.getColumn=function(t,e){return this.getColumns([t],e)[t]},e.prototype.getColumnAsNumbers=function(t,e){var o=this.columns[t],r=[];if(o){var n=o.length;if(e)for(var i=0;i<n;++i)r.push(this.getCellAsNumber(t,i,!0));else{for(var i=0,s=void 0;i<n;++i){if("number"==typeof(s=o[i]))return o.slice();if(null!=s)break}for(var i=0;i<n;++i)r.push(this.getCellAsNumber(t,i))}}return r},e.prototype.getColumnNames=function(){return Object.keys(this.columns)},e.prototype.getColumns=function(t,e){var o=this.columns,r={};t=t||Object.keys(o);for(var n=0,i=t.length,s=void 0,a=void 0;n<i;++n)(s=o[a=t[n]])&&(r[a]=e?s:s.slice());return r},e.prototype.getLocalRowIndex=function(t){var e=this.localRowIndexes;return e?e[t]:t},e.prototype.getModifier=function(){return this.modifier},e.prototype.getOriginalRowIndex=function(t){var e=this.originalRowIndexes;return e?e[t]:t},e.prototype.getRow=function(t,e){return this.getRows(t,1,e)[0]},e.prototype.getRowCount=function(){return this.rowCount},e.prototype.getRowIndexBy=function(t,e,o){var r=this.columns[t];if(r){var n=r.indexOf(e,o);if(-1!==n)return n}},e.prototype.getRowObject=function(t,e){return this.getRowObjects(t,1,e)[0]},e.prototype.getRowObjects=function(t,e,o){void 0===t&&(t=0),void 0===e&&(e=this.rowCount-t);var r=this.columns,n=Array(e);o=o||Object.keys(r);for(var i=t,s=0,a=Math.min(this.rowCount,t+e),u=void 0,l=void 0;i<a;++i,++s){l=n[s]={};for(var c=0,f=o;c<f.length;c++){var p=f[c];u=r[p],l[p]=u?u[i]:void 0}}return n},e.prototype.getRows=function(t,e,o){void 0===t&&(t=0),void 0===e&&(e=this.rowCount-t);var r=this.columns,n=Array(e);o=o||Object.keys(r);for(var i=t,s=0,a=Math.min(this.rowCount,t+e),u=void 0,l=void 0;i<a;++i,++s){l=n[s]=[];for(var c=0,f=o;c<f.length;c++)u=r[f[c]],l.push(u?u[i]:void 0)}return n},e.prototype.getVersionTag=function(){return this.versionTag},e.prototype.hasColumns=function(t){for(var e=this.columns,o=0,r=t.length;o<r;++o)if(!e[t[o]])return!1;return!0},e.prototype.hasRowWith=function(t,e){var o=this.columns[t];return!!o&&-1!==o.indexOf(e)},e.prototype.on=function(t,e){return D(this,t,e)},e.prototype.renameColumn=function(t,e){var o=this.columns;return!!o[t]&&(t!==e&&(o[e]=o[t],delete o[t]),!0)},e.prototype.setCell=function(t,e,o,r){var n=this.columns,i=this.modifier,s=n[t];s&&s[e]===o||(this.emit({type:"setCell",cellValue:o,columnName:t,detail:r,rowIndex:e}),s||(s=n[t]=Array(this.rowCount)),e>=this.rowCount&&(this.rowCount=e+1),s[e]=o,i&&i.modifyCell(this,t,e,o),this.emit({type:"afterSetCell",cellValue:o,columnName:t,detail:r,rowIndex:e}))},e.prototype.setColumns=function(e,o,r){var n=this.columns,i=this.modifier,s=Object.keys(e),a=this.rowCount;if(this.emit({type:"setColumns",columns:e,columnNames:s,detail:r,rowIndex:o}),void 0===o)t.prototype.setColumns.call(this,e,o,V(r,{silent:!0}));else{for(var u=0,l=s.length,c=void 0,f=void 0;u<l;++u){c=e[f=s[u]];for(var p=n[f]?n[f]:n[f]=Array(this.rowCount),h=o||0,d=c.length;h<d;++h)p[h]=c[h];a=Math.max(a,p.length)}this.applyRowCount(a)}i&&i.modifyColumns(this,e,o||0),this.emit({type:"afterSetColumns",columns:e,columnNames:s,detail:r,rowIndex:o})},e.prototype.setModifier=function(t,e){var o=this;return o.emit({type:"setModifier",detail:e,modifier:t,modified:o.modified}),o.modified=o,o.modifier=t,(t?t.modify(o):Promise.resolve(o)).then(function(o){return o.emit({type:"afterSetModifier",detail:e,modifier:t,modified:o.modified}),o}).catch(function(e){throw o.emit({type:"setModifierError",error:e,modifier:t,modified:o.modified}),e})},e.prototype.setOriginalRowIndexes=function(t,e){if(void 0===e&&(e=!1),this.originalRowIndexes=t,!e)for(var o=this.localRowIndexes=[],r=0,n=t.length,i=void 0;r<n;++r)S(i=t[r])&&(o[i]=r)},e.prototype.setRow=function(t,e,o,r){this.setRows([t],e,o,r)},e.prototype.setRows=function(o,r,n,i){void 0===r&&(r=this.rowCount);var s=this.columns,a=Object.keys(s),u=this.modifier,l=o.length;this.emit({type:"setRows",detail:i,rowCount:l,rowIndex:r,rows:o});for(var c=0,f=r,p=void 0;c<l;++c,++f)if((p=o[c])===e.NULL)for(var h=0,d=a.length;h<d;++h)n?s[a[h]].splice(f,0,null):s[a[h]][f]=null;else if(p instanceof Array)for(var h=0,d=a.length;h<d;++h)s[a[h]][f]=p[h];else t.prototype.setRow.call(this,p,f,void 0,{silent:!0});var m=n?l+o.length:r+l;if(m>this.rowCount){this.rowCount=m;for(var c=0,y=a.length;c<y;++c)s[a[c]].length=m}u&&u.modifyRows(this,o,r),this.emit({type:"afterSetRows",detail:i,rowCount:l,rowIndex:r,rows:o})},e.NULL={},e.version="1.0.0",e}(M),U=O().addEvent,H=O().fireEvent,$=O().merge,B=O().pick,G=function(){function t(t){void 0===t&&(t={}),this.table=new Y(t.dataTable),this.metadata=t.metadata||{columns:{}}}return Object.defineProperty(t.prototype,"polling",{get:function(){return!!this.polling},enumerable:!1,configurable:!0}),t.prototype.describeColumn=function(t,e){var o=this.metadata.columns;o[t]=$(o[t]||{},e)},t.prototype.describeColumns=function(t){for(var e,o=Object.keys(t);"string"==typeof(e=o.pop());)this.describeColumn(e,t[e])},t.prototype.emit=function(t){H(this,t.type,t)},t.prototype.getColumnOrder=function(t){var e=this.metadata.columns,o=Object.keys(e||{});if(o.length)return o.sort(function(t,o){return B(e[t].index,0)-B(e[o].index,0)})},t.prototype.getSortedColumns=function(t){return this.table.getColumns(this.getColumnOrder(t))},t.prototype.load=function(){return H(this,"afterLoad",{table:this.table}),Promise.resolve(this)},t.prototype.on=function(t,e){return U(this,t,e)},t.prototype.save=function(){return H(this,"saveError",{table:this.table}),Promise.reject(Error("Not implemented"))},t.prototype.setColumnOrder=function(t){for(var e=0,o=t.length;e<o;++e)this.describeColumn(t[e],{index:e})},t.prototype.setModifierOptions=function(t){var e=this,o=t&&A.types[t.type];return this.table.setModifier(o?new o(t):void 0).then(function(){return e})},t.prototype.startPolling=function(t){void 0===t&&(t=1e3);var e=this;window.clearTimeout(e._polling),e._polling=window.setTimeout(function(){return e.load().catch(function(t){return e.emit({type:"loadError",error:t,table:e.table})}).then(function(){e._polling&&e.startPolling(t)})},t)},t.prototype.stopPolling=function(){window.clearTimeout(this._polling),delete this._polling},t.prototype.whatIs=function(t){return this.metadata.columns[t]},t}();(r=G||(G={})).types={},r.registerType=function(t,e){return!!t&&!r.types[t]&&!!(r.types[t]=e)};var Z=G,J=O().addEvent,X=O().fireEvent,K=O().isNumber,q=O().merge,z=function(){function t(e){this.dateFormats={"YYYY/mm/dd":{regex:/^(\d{4})([\-\.\/])(\d{1,2})\2(\d{1,2})$/,parser:function(t){return t?Date.UTC(+t[1],t[3]-1,+t[4]):NaN}},"dd/mm/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(t){return t?Date.UTC(+t[4],t[3]-1,+t[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(t){return t?Date.UTC(+t[4],t[1]-1,+t[3]):NaN}},"dd/mm/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(t){var e=new Date;if(!t)return NaN;var o=+t[4];return o>e.getFullYear()-2e3?o+=1900:o+=2e3,Date.UTC(o,t[3]-1,+t[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(t){return t?Date.UTC(+t[4]+2e3,t[1]-1,+t[3]):NaN}}};var o=q(t.defaultOptions,e),r=o.decimalPoint;("."===r||","===r)&&(r="."===r?"\\.":",",this.decimalRegExp=RegExp("^(-?[0-9]+)"+r+"([0-9]+)$")),this.options=o}return t.prototype.asBoolean=function(t){return"boolean"==typeof t?t:"string"==typeof t?""!==t&&"0"!==t&&"false"!==t:!!this.asNumber(t)},t.prototype.asDate=function(t){var e;if("string"==typeof t)e=this.parseDate(t);else if("number"==typeof t)e=t;else{if(t instanceof Date)return t;e=this.parseDate(this.asString(t))}return new Date(e)},t.prototype.asGuessedType=function(t){return({number:this.asNumber,Date:this.asDate,string:this.asString})[this.guessType(t)].call(this,t)},t.prototype.asNumber=function(t){if("number"==typeof t)return t;if("boolean"==typeof t)return t?1:0;if("string"==typeof t){var e=this.decimalRegExp;if(t.indexOf(" ")>-1&&(t=t.replace(/\s+/g,"")),e){if(!e.test(t))return NaN;t=t.replace(e,"$1.$2")}return parseFloat(t)}return t instanceof Date?t.getDate():t?t.getRowCount():NaN},t.prototype.asString=function(t){return""+t},t.prototype.deduceDateFormat=function(t,e,o){var r,n,i,s=[],a=[],u="YYYY/mm/dd",l=[],c=0,f=!1;for((!e||e>t.length)&&(e=t.length);c<e;c++)if(void 0!==t[c]&&t[c]&&t[c].length)for(i=0,r=t[c].trim().replace(/[\-\.\/]/g," ").split(" "),l=["","",""];i<r.length;i++)i<l.length&&(n=parseInt(r[i],10))&&(a[i]=!a[i]||a[i]<n?n:a[i],void 0!==s[i]?s[i]!==n&&(s[i]=!1):s[i]=n,n>31?n<100?l[i]="YY":l[i]="YYYY":n>12&&n<=31?(l[i]="dd",f=!0):l[i].length||(l[i]="mm"));if(f){for(i=0;i<s.length;i++)!1!==s[i]?a[i]>12&&"YY"!==l[i]&&"YYYY"!==l[i]&&(l[i]="YY"):a[i]>12&&"mm"===l[i]&&(l[i]="dd");3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),u=l.join("/")}return o&&(this.options.dateFormat=u),u},t.prototype.emit=function(t){X(this,t.type,t)},t.prototype.export=function(t,e){throw this.emit({type:"exportError",columns:[],headers:[]}),Error("Not implemented")},t.prototype.getTable=function(){throw Error("Not implemented")},t.prototype.guessType=function(t){var e="string";if("string"==typeof t){var o=this.trim("".concat(t)),r=this.decimalRegExp,n=this.trim(o,!0);r&&(n=r.test(n)?n.replace(r,"$1.$2"):"");var i=parseFloat(n);+n===i?t=i:e=K(this.parseDate(t))?"Date":"string"}return"number"==typeof t&&(e=t>31536e6?"Date":"number"),e},t.prototype.on=function(t,e){return J(this,t,e)},t.prototype.parse=function(t){throw this.emit({type:"parseError",columns:[],headers:[]}),Error("Not implemented")},t.prototype.parseDate=function(t,e){var o,r,n,i=this.options,s=e||i.dateFormat,a=NaN;if(i.parseDate)a=i.parseDate(t);else{if(s)(r=this.dateFormats[s])||(r=this.dateFormats["YYYY/mm/dd"]),(n=t.match(r.regex))&&(a=r.parser(n));else for(o in this.dateFormats)if(r=this.dateFormats[o],n=t.match(r.regex)){s=o,a=r.parser(n);break}!n&&("object"==typeof(n=Date.parse(t))&&null!==n&&n.getTime?a=n.getTime()-6e4*n.getTimezoneOffset():K(n)&&(a=n-6e4*new Date(n).getTimezoneOffset(),-1===t.indexOf("2001")&&2001===new Date(a).getFullYear()&&(a=NaN)))}return a},t.prototype.trim=function(t,e){return"string"==typeof t&&(t=t.replace(/^\s+|\s+$/g,""),e&&/^[\d\s]+$/.test(t)&&(t=t.replace(/\s/g,""))),t},t.defaultOptions={dateFormat:"",alternativeFormat:"",startColumn:0,endColumn:Number.MAX_VALUE,startRow:0,endRow:Number.MAX_VALUE,firstRowAsNames:!0,switchRowsAndColumns:!1},t}();(n=z||(z={})).types={},n.registerType=function(t,e){return!!t&&!n.types[t]&&!!(n.types[t]=e)},n.getTableFromColumns=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]);for(var o=new Y,r=0,n=Math.max(e.length,t.length);r<n;++r)o.setColumn(e[r]||"".concat(r),t[r]);return o};var Q=z,W=function(){function t(t){void 0===t&&(t={}),this.emittingRegister=[],this.listenerMap={},this.stateMap=t}return t.prototype.addListener=function(t,e,o){var r=this.listenerMap[t]=this.listenerMap[t]||{};return(r[e]=r[e]||[]).push(o),this},t.prototype.buildEmittingTag=function(t){return("position"===t.cursor.type?[t.table.id,t.cursor.column,t.cursor.row,t.cursor.state,t.cursor.type]:[t.table.id,t.cursor.columns,t.cursor.firstRow,t.cursor.lastRow,t.cursor.state,t.cursor.type]).join("\0")},t.prototype.emitCursor=function(e,o,r,n){var i,s=e.id,a=o.state,u=this.listenerMap[s]&&this.listenerMap[s][a];if(u){var l=this.stateMap[s]=null!==(i=this.stateMap[s])&&void 0!==i?i:{},c=l[o.state]||[];n&&(c.length||(l[o.state]=c),-1===t.getIndex(o,c)&&c.push(o));var f={cursor:o,cursors:c,table:e};r&&(f.event=r);var p=this.emittingRegister,h=this.buildEmittingTag(f);if(p.indexOf(h)>=0)return this;try{this.emittingRegister.push(h);for(var d=0,m=u.length;d<m;++d)u[d].call(this,f)}finally{var y=this.emittingRegister.indexOf(h);y>=0&&this.emittingRegister.splice(y,1)}}return this},t.prototype.remitCursor=function(e,o){var r=this.stateMap[e]&&this.stateMap[e][o.state];if(r){var n=t.getIndex(o,r);n>=0&&r.splice(n,1)}return this},t.prototype.removeListener=function(t,e,o){var r=this.listenerMap[t]&&this.listenerMap[t][e];if(r){var n=r.indexOf(o);n>=0&&r.splice(n,1)}return this},t.version="1.0.0",t}();!function(t){function e(t,e){if("range"===t.type)return t;var o,r,n,i,s={type:"range",firstRow:null!==(r=null!==(o=t.row)&&void 0!==o?o:e&&e.firstRow)&&void 0!==r?r:0,lastRow:null!==(i=null!==(n=t.row)&&void 0!==n?n:e&&e.lastRow)&&void 0!==i?i:Number.MAX_VALUE,state:t.state};return void 0!==t.column&&(s.columns=[t.column]),s}t.getIndex=function(t,e){if("position"===t.type){for(var o=void 0,r=0,n=e.length;r<n;++r)if("position"===(o=e[r]).type&&o.state===t.state&&o.column===t.column&&o.row===t.row)return r}else for(var i=JSON.stringify(t.columns),o=void 0,r=0,n=e.length;r<n;++r)if("range"===(o=e[r]).type&&o.state===t.state&&o.firstRow===t.firstRow&&o.lastRow===t.lastRow&&JSON.stringify(o.columns)===i)return r;return -1},t.isEqual=function(t,e){return"position"===t.type&&"position"===e.type?t.column===e.column&&t.row===e.row&&t.state===e.state:"range"===t.type&&"range"===e.type&&t.firstRow===e.firstRow&&t.lastRow===e.lastRow&&JSON.stringify(t.columns)===JSON.stringify(e.columns)},t.isInRange=function(t,o){"position"===o.type&&(o=e(o)),"position"===t.type&&(t=e(t,o));var r=t.columns,n=o.columns;return t.firstRow>=o.firstRow&&t.lastRow<=o.lastRow&&(!r||!n||r.every(function(t){return n.indexOf(t)>=0}))},t.toPositions=function(t){if("position"===t.type)return[t];for(var e=t.columns||[],o=[],r=t.state,n=t.firstRow,i=t.lastRow;n<i;++n){if(!e.length){o.push({type:"position",row:n,state:r});continue}for(var s=0,a=e.length;s<a;++s)o.push({type:"position",column:e[s],row:n,state:r})}return o},t.toRange=e}(W||(W={}));var tt=W,te={connectors:[]},to=function(){function t(t){void 0===t&&(t=te),t.connectors=t.connectors||[],this.connectors={},this.options=t,this.waiting={}}return t.prototype.emit=function(t){O().fireEvent(this,t.type,t)},t.prototype.getConnector=function(t){var e=this,o=this.connectors[t];if(o)return Promise.resolve(o);var r=this.waiting[t];if(!r){r=this.waiting[t]=[];var n=this.getConnectorOptions(t);if(!n)throw Error("Connector '".concat(t,"' not found."));this.loadConnector(n).then(function(o){delete e.waiting[t];for(var n=0,i=r.length;n<i;++n)r[n][0](o)}).catch(function(o){delete e.waiting[t];for(var n=0,i=r.length;n<i;++n)r[n][1](o)})}return new Promise(function(t,e){r.push([t,e])})},t.prototype.getConnectorIds=function(){for(var t=this.options.connectors,e=[],o=0,r=t.length;o<r;++o)e.push(t[o].id);return e},t.prototype.getConnectorOptions=function(t){for(var e=this.options.connectors,o=0,r=e.length;o<r;++o)if(e[o].id===t)return e[o]},t.prototype.getConnectorTable=function(t){return this.getConnector(t).then(function(t){return t.table})},t.prototype.isNewConnector=function(t){return!this.connectors[t]},t.prototype.loadConnector=function(t){var e=this;return new Promise(function(o,r){e.emit({type:"load",options:t});var n=Z.types[t.type];if(!n)throw Error("Connector type not found. (".concat(t.type,")"));new n(t.options).load().then(function(r){e.connectors[t.id]=r,e.emit({type:"afterLoad",options:t}),o(r)}).catch(r)})},t.prototype.on=function(t,e){return O().addEvent(this,t,e)},t.prototype.setConnectorOptions=function(t){var e=this.options.connectors,o=this.connectors;this.emit({type:"setConnectorOptions",options:t});for(var r=0,n=e.length;r<n;++r)if(e[r].id===t.id){e.splice(r,1);break}o[t.id]&&(o[t.id].stopPolling(),delete o[t.id]),e.push(t),this.emit({type:"afterSetConnectorOptions",options:t})},t.version="1.0.0",t}(),tr=/^(?:FALSE|TRUE)/,tn=/^[+\-]?\d+(?:\.\d+)?(?:e[+\-]\d+)?/,ti=/^[+\-]?\d+(?:,\d+)?(?:e[+\-]\d+)?/,ts=/^([A-Z][A-Z\d\.]*)\(/,ta=/^(?:[+\-*\/^<=>]|<=|=>)/,tu=/^(\$?[A-Z]+)(\$?\d+)\:(\$?[A-Z]+)(\$?\d+)/,tl=/^R(\d*|\[\d+\])C(\d*|\[\d+\])\:R(\d*|\[\d+\])C(\d*|\[\d+\])/,tc=/^(\$?[A-Z]+)(\$?\d+)(?![\:C])/,tf=/^R(\d*|\[\d+\])C(\d*|\[\d+\])(?!\:)/;function tp(t){for(var e=0,o=0,r=t.length,n=void 0,i=1;o<r;++o){if("("===(n=t[o])){e||(i=o+1),++e;continue}if(")"===n&&!--e)return t.substring(i,o)}if(e>0){var s=Error("Incomplete parantheses.");throw s.name="FormulaParseError",s}return""}function th(t){for(var e=-1,o=0,r=t.length,n=void 0,i=!1;o<r;++o){if("\\"===(n=t[o])){i=!i;continue}if(i){i=!1;continue}if('"'===n){if(!(e<0))return t.substring(e+1,o);e=o}}var s=Error("Incomplete string.");throw s.name="FormulaParseError",s}function td(t,e){if(o=t.match(tl)){var o,r=""===o[2]||"["===o[2][0],n=""===o[1]||"["===o[1][0],i=""===o[4]||"["===o[4][0],s=""===o[3]||"["===o[3][0],a={type:"range",beginColumn:r?parseInt(o[2].substring(1,-1)||"0",10):parseInt(o[2],10)-1,beginRow:n?parseInt(o[1].substring(1,-1)||"0",10):parseInt(o[1],10)-1,endColumn:i?parseInt(o[4].substring(1,-1)||"0",10):parseInt(o[4],10)-1,endRow:s?parseInt(o[3].substring(1,-1)||"0",10):parseInt(o[3],10)-1};return r&&(a.beginColumnRelative=!0),n&&(a.beginRowRelative=!0),i&&(a.endColumnRelative=!0),s&&(a.endRowRelative=!0),a}if(o=t.match(tu)){var r="$"!==o[1][0],n="$"!==o[2][0],i="$"!==o[3][0],s="$"!==o[4][0],a={type:"range",beginColumn:ty(r?o[1]:o[1].substring(1))-1,beginRow:parseInt(n?o[2]:o[2].substring(1),10)-1,endColumn:ty(i?o[3]:o[3].substring(1))-1,endRow:parseInt(s?o[4]:o[4].substring(1),10)-1};return r&&(a.beginColumnRelative=!0),n&&(a.beginRowRelative=!0),i&&(a.endColumnRelative=!0),s&&(a.endRowRelative=!0),a}var u=tm(t,e);return 1===u.length&&"string"!=typeof u[0]?u[0]:u}function tm(t,e){for(var o,r=e?ti:tn,n=[],i=("="===t[0]?t.substring(1):t).trim();i;){if(o=i.match(tf)){var s=""===o[2]||"["===o[2][0],a=""===o[1]||"["===o[1][0],u={type:"reference",column:s?parseInt(o[2].substring(1,-1)||"0",10):parseInt(o[2],10)-1,row:a?parseInt(o[1].substring(1,-1)||"0",10):parseInt(o[1],10)-1};s&&(u.columnRelative=!0),a&&(u.rowRelative=!0),n.push(u),i=i.substring(o[0].length).trim();continue}if(o=i.match(tc)){var s="$"!==o[1][0],a="$"!==o[2][0],u={type:"reference",column:ty(s?o[1]:o[1].substring(1))-1,row:parseInt(a?o[2]:o[2].substring(1),10)-1};s&&(u.columnRelative=!0),a&&(u.rowRelative=!0),n.push(u),i=i.substring(o[0].length).trim();continue}if(o=i.match(ta)){n.push(o[0]),i=i.substring(o[0].length).trim();continue}if(o=i.match(tr)){n.push("TRUE"===o[0]),i=i.substring(o[0].length).trim();continue}if(o=i.match(r)){n.push(parseFloat(o[0])),i=i.substring(o[0].length).trim();continue}if('"'===i[0]){var l=th(i);n.push(l.substring(1,-1)),i=i.substring(l.length+2).trim();continue}if(o=i.match(ts)){var c=tp(i=i.substring(o[1].length).trim());n.push({type:"function",name:o[1],args:function(t,e){for(var o=[],r=e?";":",",n=0,i="",s=0,a=t.length,u=void 0;s<a;++s)if((u=t[s])===r&&!n&&i)o.push(td(i,e)),i="";else if('"'!==u||n||i)" "!==u&&(i+=u,"("===u?++n:")"===u&&--n);else{var l=th(t.substring(s));o.push(l),s+=l.length+1}return!n&&i&&o.push(td(i,e)),o}(c,e)}),i=i.substring(c.length+2).trim();continue}if("("===i[0]){var f=tp(i);if(f){n.push(tm(f,e)),i=i.substring(f.length+2).trim();continue}}var p=t.length-i.length,h=Error("Unexpected character `"+t.substring(p,p+1)+"` at position "+(p+1)+". (`..."+t.substring(p-5,p+6)+"...`)");throw h.name="FormulaParseError",h}return n}function ty(t){for(var e=0,o=0,r=t.length,n=void 0,i=t.length-1;o<r;++o)(n=t.charCodeAt(o))>=65&&n<=90&&(e+=(n-64)*Math.pow(26,i)),--i;return e}var tg={parseFormula:tm},tv=["+","-","*","/","^","=","<","<=",">",">="],tb={isFormula:function(t){return t instanceof Array},isFunction:function(t){return"object"==typeof t&&!(t instanceof Array)&&"function"===t.type},isOperator:function(t){return"string"==typeof t&&tv.indexOf(t)>=0},isRange:function(t){return"object"==typeof t&&!(t instanceof Array)&&"range"===t.type},isReference:function(t){return"object"==typeof t&&!(t instanceof Array)&&"reference"===t.type},isValue:function(t){return"boolean"==typeof t||"number"==typeof t||"string"==typeof t}},tw=tb.isFormula,tC=tb.isFunction,tR=tb.isOperator,tO=tb.isRange,tN=tb.isReference,tT=tb.isValue,t_=/ */,tj=Number.MAX_VALUE/1.000000000001,tA=Number.MAX_VALUE/1.000000000002,tP=Number.MAX_VALUE,tx={"^":3,"*":2,"/":2,"+":1,"-":1,"=":0,"<":0,"<=":0,">":0,">=":0},tE={},tI=/^[A-Z][A-Z\.]*$/;function tM(t){switch(typeof t){case"boolean":return t?tP:tj;case"string":return tA;case"number":return t;default:return NaN}}function tF(t){return"string"==typeof t?t.toLowerCase().replace(t_,"\0"):t}function tD(t){switch(typeof t){case"boolean":return t?1:0;case"string":return parseFloat(t.replace(",","."));case"number":return t;default:return NaN}}function tS(t,e,o){var r;switch(t){case"=":return tF(e)===tF(o);case"<":if(typeof e==typeof o)return tF(e)<tF(o);return tM(e)<tM(o);case"<=":if(typeof e==typeof o)return tF(e)<=tF(o);return tM(e)<=tM(o);case">":if(typeof e==typeof o)return tF(e)>tF(o);return tM(e)>tM(o);case">=":if(typeof e==typeof o)return tF(e)>=tF(o);return tM(e)>=tM(o)}switch(e=tD(e),o=tD(o),t){case"+":r=e+o;break;case"-":r=e-o;break;case"*":r=e*o;break;case"/":r=e/o;break;case"^":r=Math.pow(e,o);break;default:return NaN}return r%1?Math.round(1e9*r)/1e9:r}function tL(t,e){return tT(t)?t:tO(t)?e&&tV(t,e)||[]:tC(t)?tU(t,e):tY(tw(t)?t:[t],e)}function tV(t,e){for(var o=e.getColumnNames().slice(t.beginColumn,t.endColumn+1),r=[],n=0,i=o.length,s=void 0;n<i;++n)for(var a=e.getColumn(o[n],!0)||[],u=t.beginRow,l=t.endRow+1;u<l;++u)"string"==typeof(s=a[u])&&"="===s[0]&&e!==e.modified&&(s=e.modified.getCell(o[n],u)),r.push(tT(s)?s:NaN);return r}function tk(t,e){var o=e.getColumnNames()[t.column];if(o){var r=e.getCell(o,t.row);if("string"==typeof r&&"="===r[0]&&e!==e.modified){var n=e.modified.getCell(o,t.row);return tT(n)?n:NaN}return tT(r)?r:NaN}return NaN}function tY(t,e){for(var o,r=0,n=t.length,i=void 0,s=void 0,a=void 0,u=void 0;r<n;++r){if(tR(i=t[r])){s=i;continue}if(tT(i)?u=i:tw(i)?u=tY(t,e):tC(i)?u=tT(a=tU(i,e))?a:NaN:tN(i)&&(u=e&&tk(i,e)),void 0!==u){if(void 0===o)o=s?tS(s,0,u):u;else{if(!s)return NaN;var l=t[r+1];tR(l)&&tx[l]>tx[s]&&(u=tS(l,u,tY(t.slice(r+2))),r=n),o=tS(s,o,u)}s=void 0,u=void 0}}return tT(o)?o:NaN}function tU(t,e,o){var r=tE[t.name];if(r)try{return r(t.args,e)}catch(t){return NaN}var n=Error('Function "'.concat(t.name,'" not found.'));throw n.name="FormulaProcessError",n}var tH={asNumber:tD,getArgumentValue:tL,getArgumentsValues:function(t,e){for(var o=[],r=0,n=t.length;r<n;++r)o.push(tL(t[r],e));return o},getRangeValues:tV,getReferenceValue:tk,processFormula:tY,processorFunctions:tE,registerProcessorFunction:function(t,e){return tI.test(t)&&!tE[t]&&!!(tE[t]=e)},translateReferences:function t(e,o,r){void 0===o&&(o=0),void 0===r&&(r=0);for(var n=0,i=e.length,s=void 0;n<i;++n)(s=e[n])instanceof Array?t(s,o,r):tC(s)?t(s.args,o,r):tO(s)?(s.beginColumnRelative&&(s.beginColumn+=o),s.beginRowRelative&&(s.beginRow+=r),s.endColumnRelative&&(s.endColumn+=o),s.endRowRelative&&(s.endRow+=r)):tN(s)&&(s.columnRelative&&(s.column+=o),s.rowRelative&&(s.row+=r));return e}},t$=tH.getArgumentValue;tH.registerProcessorFunction("ABS",function(t,e){var o=t$(t[0],e);switch(typeof o){case"number":return Math.abs(o);case"object":for(var r=[],n=0,i=o.length,s=void 0;n<i;++n){if("number"!=typeof(s=o[n]))return NaN;r.push(Math.abs(s))}return r;default:return NaN}});var tB=tH.getArgumentValue;tH.registerProcessorFunction("AND",function t(e,o){for(var r=0,n=e.length,i=void 0;r<n;++r)if(!(i=tB(e[r],o))||"object"==typeof i&&!t(i,o))return!1;return!0});var tG=tH.getArgumentsValues;tH.registerProcessorFunction("AVERAGE",function(t,e){for(var o=tG(t,e),r=0,n=0,i=0,s=o.length,a=void 0;i<s;++i)switch(typeof(a=o[i])){case"number":isNaN(a)||(++r,n+=a);break;case"object":for(var u=0,l=a.length,c=void 0;u<l;++u)"number"!=typeof(c=a[u])||isNaN(c)||(++r,n+=c)}return r?n/r:0});var tZ=tH.getArgumentValue;tH.registerProcessorFunction("AVERAGEA",function(t,e){for(var o=0,r=0,n=0,i=t.length,s=void 0;n<i;++n)switch(typeof(s=tZ(t[n],e))){case"boolean":++o,r+=s?1:0;continue;case"number":isNaN(s)||(++o,r+=s);continue;case"string":++o;continue;default:for(var a=0,u=s.length,l=void 0;a<u;++a)switch(typeof(l=s[a])){case"boolean":++o,r+=l?1:0;continue;case"number":isNaN(l)||(++o,r+=l);continue;case"string":++o;continue}continue}return o?r/o:0}),tH.registerProcessorFunction("COUNT",function t(e,o){for(var r=tH.getArgumentsValues(e,o),n=0,i=0,s=r.length,a=void 0;i<s;++i)switch(typeof(a=r[i])){case"number":!isNaN(a)&&++n;break;case"object":n+=t(a,o)}return n}),tH.registerProcessorFunction("COUNTA",function t(e,o){for(var r=tH.getArgumentsValues(e,o),n=0,i=0,s=r.length,a=void 0;i<s;++i){switch(typeof(a=r[i])){case"number":if(isNaN(a))continue;break;case"object":n+=t(a,o);continue;case"string":if(!a)continue}++n}return n});var tJ=tH.getArgumentValue;tH.registerProcessorFunction("IF",function(t,e){return tJ(t[0],e)?tJ(t[1],e):tJ(t[2],e)});var tX=tH.getArgumentValue;tH.registerProcessorFunction("ISNA",function(t,e){var o=tX(t[0],e);return"number"!=typeof o||isNaN(o)});var tK=tH.getArgumentsValues;tH.registerProcessorFunction("MAX",function t(e,o){for(var r=tK(e,o),n=Number.NEGATIVE_INFINITY,i=0,s=r.length,a=void 0;i<s;++i)switch(typeof(a=r[i])){case"number":a>n&&(n=a);break;case"object":(a=t(a))>n&&(n=a)}return isFinite(n)?n:0}),tH.registerProcessorFunction("MEDIAN",function(t,e){for(var o=[],r=tH.getArgumentsValues(t,e),n=0,i=r.length,s=void 0;n<i;++n)switch(typeof(s=r[n])){case"number":isNaN(s)||o.push(s);break;case"object":for(var a=0,u=s.length,l=void 0;a<u;++a)"number"!=typeof(l=s[a])||isNaN(l)||o.push(l)}var c=o.length;if(!c)return NaN;var f=Math.floor(c/2);return c%2?o[f]:(o[f-1]+o[f])/2});var tq=tH.getArgumentsValues;tH.registerProcessorFunction("MIN",function t(e,o){for(var r=tq(e,o),n=Number.POSITIVE_INFINITY,i=0,s=r.length,a=void 0;i<s;++i)switch(typeof(a=r[i])){case"number":a<n&&(n=a);break;case"object":(a=t(a))<n&&(n=a)}return isFinite(n)?n:0});var tz=tH.getArgumentValue;function tQ(t,e){for(var o={},r=tH.getArgumentsValues(t,e),n=0,i=r.length,s=void 0;n<i;++n)switch(typeof(s=r[n])){case"number":isNaN(s)||(o[s]=(o[s]||0)+1);break;case"object":for(var a=0,u=s.length,l=void 0;a<u;++a)"number"!=typeof(l=s[a])||isNaN(l)||(o[l]=(o[l]||0)+1)}return o}function tW(t,e){var o=tQ(t,e),r=Object.keys(o);if(!r.length)return NaN;for(var n=parseFloat(r[0]),i=o[r[0]],s=1,a=r.length,u=void 0,l=void 0,c=void 0;s<a;++s)i<(c=o[u=r[s]])?(n=parseFloat(u),i=c):i===c&&n>(l=parseFloat(u))&&(n=l,i=c);return i>1?n:NaN}tH.registerProcessorFunction("MOD",function(t,e){var o=tz(t[0],e),r=tz(t[1],e);return("object"==typeof o&&(o=o[0]),"object"==typeof r&&(r=r[0]),"number"!=typeof o||"number"!=typeof r||0===r)?NaN:o%r}),tH.registerProcessorFunction("MODE",tW),tH.registerProcessorFunction("MODE.MULT",function(t,e){var o=tQ(t,e),r=Object.keys(o);if(!r.length)return NaN;for(var n=[parseFloat(r[0])],i=o[r[0]],s=1,a=r.length,u=void 0,l=void 0;s<a;++s)i<(l=o[u=r[s]])?(n=[parseFloat(u)],i=l):i===l&&n.push(parseFloat(u));return i>1?n:NaN}),tH.registerProcessorFunction("MODE.SNGL",tW);var t0=tH.getArgumentValue;tH.registerProcessorFunction("NOT",function(t,e){var o=t0(t[0],e);switch("object"==typeof o&&(o=o[0]),typeof o){case"boolean":case"number":return!o}return NaN});var t1=tH.getArgumentValue;tH.registerProcessorFunction("OR",function t(e,o){for(var r=0,n=e.length,i=void 0;r<n;++r)if("object"==typeof(i=t1(e[r],o))){if(t(i,o))return!0}else if(i)return!0;return!1});var t2=tH.getArgumentsValues;tH.registerProcessorFunction("PRODUCT",function t(e,o){for(var r=t2(e,o),n=1,i=!1,s=0,a=r.length,u=void 0;s<a;++s)switch(typeof(u=r[s])){case"number":isNaN(u)||(i=!0,n*=u);break;case"object":i=!0,n*=t(u,o)}return i?n:0}),tH.registerProcessorFunction("SUM",function t(e,o){for(var r=tH.getArgumentsValues(e,o),n=0,i=0,s=r.length,a=void 0;i<s;++i)switch(typeof(a=r[i])){case"number":isNaN(a)||(n+=a);break;case"object":n+=t(a,o)}return n});var t3=tH.getArgumentValue;tH.registerProcessorFunction("XOR",function(t,e){for(var o=0,r=t.length,n=void 0,i=void 0;o<r;++o)switch(typeof(i=t3(t[o],e))){case"boolean":case"number":if(void 0===n)n=!!i;else if(!!i!==n)return!0;break;case"object":for(var s=0,a=i.length,u=void 0;s<a;++s)switch(typeof(u=i[s])){case"boolean":case"number":if(void 0===n)n=!!u;else if(!!u!==n)return!0}}return!1});var t4=function(){return(t4=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},t6=t4(t4(t4({},tg),tH),tb),t5=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),t9=function(){return(t9=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},t7=O().merge,t8=function(t){function e(o){var r=this,n=t7(e.defaultOptions,o);return(r=t.call(this,n)||this).columns=[],r.headers=[],r.dataTypes=[],r.options=n,r}return t5(e,t),e.prototype.export=function(t,e){void 0===e&&(e=this.options);var o=e.useLocalDecimalPoint,r=e.lineDelimiter,n=!1!==this.options.firstRowAsNames,i=e.decimalPoint,s=e.itemDelimiter;i||(i=","!==s&&o?1.1.toLocaleString()[1]:"."),s||(s=","===i?";":",");var a=t.getSortedColumns(e.usePresentationOrder),u=Object.keys(a),l=[],c=u.length,f=[];n&&l.push(u.map(function(t){return'"'.concat(t,'"')}).join(s));for(var p=0;p<c;p++){var h=u[p],d=a[h],m=d.length,y=t.whatIs(h),g=void 0;y&&(g=y.dataType);for(var v=0;v<m;v++){var b=d[v];if(f[v]||(f[v]=[]),"string"===g?b='"'+b+'"':"number"==typeof b?b=String(b).replace(".",i):"string"==typeof b&&(b='"'.concat(b,'"')),f[v][p]=b,p===c-1){for(var w=p;f[v].length>2&&void 0===f[v][w];)f[v].pop(),w--;l.push(f[v].join(s))}}}return l.join(r)},e.prototype.parse=function(t,e){var o,r,n=this.dataTypes,i=t7(this.options,t),s=i.beforeParse,a=i.lineDelimiter,u=i.firstRowAsNames,l=i.itemDelimiter,c=0,f=i.csv,p=i.startRow,h=i.endRow;if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:e,headers:this.headers}),f&&s&&(f=s(f)),f){if(o=f.replace(/\r\n|\r/g,"\n").split(a||"\n"),(!p||p<0)&&(p=0),(!h||h>=o.length)&&(h=o.length-1),l||(this.guessedItemDelimiter=this.guessDelimiter(o)),u){for(var d=o[0].split(l||this.guessedItemDelimiter||","),m=0;m<d.length;m++)d[m]=d[m].trim().replace(/^["']|["']$/g,"");this.headers=d,p++}var y=0;for(c=p;c<=h;c++)"#"===o[c][0]?y++:this.parseCSVRow(o[c],c-p-y);n.length&&n[0].length&&"date"===n[0][1]&&!this.options.dateFormat&&this.deduceDateFormat(this.columns[0],null,!0);for(var m=0,g=this.columns.length;m<g;++m){r=this.columns[m];for(var v=0,b=r.length;v<b;++v)if(r[v]&&"string"==typeof r[v]){var w=this.asGuessedType(r[v]);w instanceof Date&&(w=w.getTime()),this.columns[m][v]=w}}}this.emit({type:"afterParse",columns:this.columns,detail:e,headers:this.headers})},e.prototype.parseCSVRow=function(t,e){var o=this,r=o.columns||[],n=o.dataTypes,i=o.options,s=i.startColumn,a=i.endColumn,u=o.options.itemDelimiter||o.guessedItemDelimiter,l=o.options.decimalPoint;l&&l!==u||(l=o.guessedDecimalPoint||".");var c=0,f="",p="",h=0,d=0,m=function(e){f=t[e]},y=function(t){n.length<d+1&&n.push([t]),n[d][n[d].length-1]!==t&&n[d].push(t)},g=function(){if(s>h||h>a){++h,p="";return}if("string"==typeof p?!isNaN(parseFloat(p))&&isFinite(p)?(p=parseFloat(p),y("number")):isNaN(Date.parse(p))?y("string"):(p=p.replace(/\//g,"-"),y("date")):y("number"),r.length<d+1&&r.push([]),"number"!=typeof p&&"number"!==o.guessType(p)&&l){var t=p;p=p.replace(l,"."),"number"!==o.guessType(p)&&(p=t)}r[d][e]=p,p="",++d,++h};if(t.trim().length&&"#"!==t.trim()[0]){for(;c<t.length;c++){if(m(c),"#"===f&&!/^#[A-F\d]{3,3}|[A-F\d]{6,6}/i.test(t.substring(c))){g();return}if('"'===f)for(m(++c);c<t.length&&'"'!==f;)p+=f,m(++c);else f===u?g():p+=f}g()}},e.prototype.guessDelimiter=function(t){for(var e,o=0,r=0,n={",":0,";":0," ":0},i=t.length,s=0;s<i;s++){var a=!1,u=void 0,l=void 0,c=void 0,f="";if(s>13)break;for(var p=t[s],h=0;h<p.length&&(u=p[h],l=p[h+1],c=p[h-1],"#"!==u);h++){if('"'===u){if(a){if('"'!==c&&'"'!==l){for(;" "===l&&h<p.length;)l=p[++h];void 0!==n[l]&&n[l]++,a=!1}}else a=!0}else void 0!==n[u]?(isNaN(Date.parse(f=f.trim()))?(isNaN(Number(f))||!isFinite(Number(f)))&&n[u]++:n[u]++,f=""):f+=u;","===u&&r++,"."===u&&o++}}return n[";"]>n[","]?e=";":(n[","],n[";"],e=","),o>r?this.guessedDecimalPoint=".":this.guessedDecimalPoint=",",e},e.prototype.getTable=function(){return Q.getTableFromColumns(this.columns,this.headers)},e.defaultOptions=t9(t9({},Q.defaultOptions),{lineDelimiter:"\n"}),e}(Q);Q.registerType("CSV",t8);var et=(s=function(t,e){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ee=O().merge,eo=function(t){function e(o){var r=this,n=ee(e.defaultOptions,o);return(r=t.call(this,n)||this).converter=new t8(n),r.options=n,n.enablePolling&&r.startPolling(1e3*Math.max(n.dataRefreshRate||0,1)),r}return et(e,t),e.prototype.load=function(t){var e=this,o=e.converter,r=e.table,n=e.options,i=n.csv,s=n.csvURL,a=n.dataModifier;return e.emit({type:"load",csv:i,detail:t,table:r}),Promise.resolve(s?fetch(s).then(function(t){return t.text()}):i||"").then(function(t){return t&&(r.deleteColumns(),o.parse({csv:t}),r.setColumns(o.getTable().getColumns())),e.setModifierOptions(a).then(function(){return t})}).then(function(o){return e.emit({type:"afterLoad",csv:o,detail:t,table:r}),e}).catch(function(o){throw e.emit({type:"loadError",detail:t,error:o,table:r}),o})},e.defaultOptions={csv:"",csvURL:"",enablePolling:!1,dataRefreshRate:1,firstRowAsNames:!0},e}(Z);Z.registerType("CSV",eo);var er=(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),en=function(){return(en=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},ei=O().error,es=O().isArray,ea=O().merge,eu=O().objectEach,el=function(t){function e(o){var r=this,n=ea(e.defaultOptions,o);return(r=t.call(this,n)||this).columns=[],r.headers=[],r.options=n,r.table=new Y,r}return er(e,t),e.prototype.parse=function(t,e){var o=this,r=(t=ea(o.options,t)).beforeParse,n=t.orientation,i=t.firstRowAsNames,s=t.columnNames,a=t.data;if(a){if(o.columns=[],o.emit({type:"parse",columns:o.columns,detail:e,headers:o.headers}),r&&(a=r(a)),a=a.slice(),"columns"===n)for(var u=0,l=a.length;u<l;u++){var c=a[u];if(!(c instanceof Array))return;o.headers instanceof Array?(i?o.headers.push("".concat(c.shift())):s&&s instanceof Array&&o.headers.push(s[u]),o.table.setColumn(o.headers[u]||u.toString(),c)):ei("JSONConverter: Invalid `columnNames` option.",!1)}else if("rows"===n){i?o.headers=a.shift():s&&(o.headers=s);for(var f=this,p=0,l=a.length;p<l;p++)!function(t,e){var r=a[t];if(es(r))for(var n=0,i=r.length;n<i;n++)o.columns.length<n+1&&o.columns.push([]),o.columns[n].push(r[n]),o.headers instanceof Array?f.table.setColumn(o.headers[n]||n.toString(),o.columns[n]):ei("JSONConverter: Invalid `columnNames` option.",!1);else{var s=o.headers;if(s&&!(s instanceof Array)){var u={};eu(s,function(t,e){u[e]=t.reduce(function(t,e){return t[e]},r)}),r=u}f.table.setRows([r],t)}}(p,0)}o.emit({type:"afterParse",columns:o.columns,detail:e,headers:o.headers})}},e.prototype.getTable=function(){return this.table},e.defaultOptions=en(en({},Q.defaultOptions),{data:[],orientation:"rows"}),e}(Q);Q.registerType("JSON",el);var ec=(u=function(t,e){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ef=O().merge,ep=function(t){function e(o){var r=this,n=ef(e.defaultOptions,o);return(r=t.call(this,n)||this).converter=new el(n),r.options=n,n.enablePolling&&r.startPolling(1e3*Math.max(n.dataRefreshRate||0,1)),r}return ec(e,t),e.prototype.load=function(t){var e=this,o=e.converter,r=e.table,n=e.options,i=n.data,s=n.dataUrl,a=n.dataModifier;return e.emit({type:"load",data:i,detail:t,table:r}),Promise.resolve(s?fetch(s).then(function(t){return t.json()}):i||[]).then(function(t){return t&&(r.deleteColumns(),o.parse({data:t}),r.setColumns(o.getTable().getColumns())),e.setModifierOptions(a).then(function(){return t})}).then(function(o){return e.emit({type:"afterLoad",data:o,detail:t,table:r}),e}).catch(function(o){throw e.emit({type:"loadError",detail:t,error:o,table:r}),o})},e.defaultOptions={data:[],enablePolling:!1,dataRefreshRate:0,firstRowAsNames:!0,orientation:"rows"},e}(Z);Z.registerType("JSON",ep);var eh=(l=function(t,e){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ed=function(){return(ed=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},em=O().merge,ey=O().uniqueKey,eg=function(t){function e(o){var r=this,n=em(e.defaultOptions,o);return(r=t.call(this,n)||this).columns=[],r.header=[],r.options=n,r}return eh(e,t),e.prototype.parse=function(t,e){var o,r,n=em(this.options,t),i=((null===(o=n.json)||void 0===o?void 0:o.values)||[]).map(function(t){return t.slice()});if(0===i.length)return!1;this.header=[],this.columns=[],this.emit({type:"parse",columns:this.columns,detail:e,headers:this.header});var s=n.beforeParse,a=n.json;s&&a&&(i=s(a.values)),this.columns=i;for(var u=0,l=i.length;u<l;u++){r=i[u],this.header[u]=n.firstRowAsNames?"".concat(r.shift()):ey();for(var c=0,f=r.length;c<f;++c)if(r[c]&&"string"==typeof r[c]){var p=this.asGuessedType(r[c]);p instanceof Date&&(p=p.getTime()),this.columns[u][c]=p}}this.emit({type:"afterParse",columns:this.columns,detail:e,headers:this.header})},e.prototype.getTable=function(){return Q.getTableFromColumns(this.columns,this.header)},e.defaultOptions=ed({},Q.defaultOptions),e}(Q);Q.registerType("GoogleSheets",eg);var ev=(c=function(t,e){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eb=O().merge,ew=O().pick,eC=function(t){function e(o){var r=this,n=eb(e.defaultOptions,o);return(r=t.call(this,n)||this).converter=new eg(n),r.options=n,r}return ev(e,t),e.prototype.load=function(t){var o=this,r=o.converter,n=o.table,i=o.options,s=i.dataModifier,a=i.dataRefreshRate,u=i.enablePolling,l=i.firstRowAsNames,c=i.googleAPIKey,f=i.googleSpreadsheetKey,p=e.buildFetchURL(c,f,o.options);if(o.emit({type:"load",detail:t,table:n,url:p}),!URL.canParse(p))throw Error("Invalid URL: "+p);return fetch(p).then(function(t){return t.json()}).then(function(t){if("object"==typeof t&&t&&"object"==typeof t.error&&t.error&&"number"==typeof t.error.code&&"string"==typeof t.error.message&&"string"==typeof t.error.status)throw Error(t.error.message);return r.parse({firstRowAsNames:l,json:t}),n.deleteColumns(),n.setColumns(r.getTable().getColumns()),o.setModifierOptions(s)}).then(function(){return o.emit({type:"afterLoad",detail:t,table:n,url:p}),u&&setTimeout(function(){return o.load()},1e3*Math.max(a||0,1)),o}).catch(function(e){throw o.emit({type:"loadError",detail:t,error:e,table:n}),e})},e.defaultOptions={googleAPIKey:"",googleSpreadsheetKey:"",enablePolling:!1,dataRefreshRate:2,firstRowAsNames:!0},e}(Z);!function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function o(t){void 0===t&&(t={});var o=t.endColumn,r=t.endRow,n=t.googleSpreadsheetRange,i=t.startColumn,s=t.startRow;return n||(e[i||0]||"A")+(Math.max(s||0,0)+1)+":"+(e[ew(o,25)]||"Z")+(r?Math.max(r,0):"Z")}t.buildFetchURL=function(t,e,r){void 0===r&&(r={});var n=new URL("https://sheets.googleapis.com/v4/spreadsheets/".concat(e,"/values/")),i=r.onlyColumnNames?"A1:Z1":o(r);n.pathname+=i;var s=n.searchParams;return s.set("alt","json"),r.onlyColumnNames||(s.set("dateTimeRenderOption","FORMATTED_STRING"),s.set("majorDimension","COLUMNS"),s.set("valueRenderOption","UNFORMATTED_VALUE")),s.set("prettyPrint","false"),s.set("key",t),n.href},t.buildQueryRange=o}(eC||(eC={})),Z.registerType("GoogleSheets",eC);var eR=(f=function(t,e){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eO=function(){return(eO=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},eN=O().merge,eT=function(t){function e(o){var r=this,n=eN(e.defaultOptions,o);return(r=t.call(this,n)||this).columns=[],r.headers=[],r.options=n,n.tableElement&&(r.tableElement=n.tableElement,r.tableElementID=n.tableElement.id),r}return eR(e,t),e.prototype.export=function(t,e){void 0===e&&(e=this.options);var o=!1!==e.firstRowAsNames,r=e.useMultiLevelHeaders,n=t.getSortedColumns(e.usePresentationOrder),i=Object.keys(n),s=[],a=i.length,u=[],l="";if(o){var c=[];if(r){for(var f=0;f<i.length;f++){var p=(n[i[f]].shift()||"").toString();c.push(p)}l=this.getTableHeaderHTML(i,c,e)}else l=this.getTableHeaderHTML(void 0,i,e)}for(var h=0;h<a;h++)for(var d=n[i[h]],m=d.length,y=0;y<m;y++){var g=d[y];u[y]||(u[y]=[]),"string"==typeof g||"number"==typeof g||void 0===g||(g=(g||"").toString()),u[y][h]=this.getCellHTMLFromValue(h?"td":"th",null,h?"":'scope="row"',g),h===a-1&&s.push("<tr>"+u[y].join("")+"</tr>")}var v="";return e.tableCaption&&(v='<caption class="highcharts-table-caption">'+e.tableCaption+"</caption>"),"<table>"+v+l+"<tbody>"+s.join("")+"</tbody></table>"},e.prototype.getCellHTMLFromValue=function(t,e,o,r,n){var i=r,s="text"+(e?" "+e:"");return"number"==typeof i?(i=i.toString(),","===n&&(i=i.replace(".",n)),s="number"):r||(i="",s="empty"),"<"+t+(o?" "+o:"")+' class="'+s+'">'+i+"</"+t+">"},e.prototype.getTableHeaderHTML=function(t,e,o){void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===o&&(o=this.options);var r,n,i=o.useMultiLevelHeaders,s=o.useRowspanHeaders,a="<thead>",u=0,l=e&&e.length,c=0;if(i&&t&&e&&!function(t,e){var o=t.length;if(e.length!==o)return!1;for(;--o;)if(t[o]!==e[o])return!1;return!0}(t,e)){for(a+="<tr>";u<l;++u)(r=t[u])===t[u+1]?++c:c?(a+=this.getCellHTMLFromValue("th","highcharts-table-topheading",'scope="col" colspan="'+(c+1)+'"',r),c=0):(r===e[u]?s?(n=2,delete e[u]):(n=1,e[u]=""):n=1,a+=this.getCellHTMLFromValue("th","highcharts-table-topheading",'scope="col"'+(n>1?' valign="top" rowspan="'+n+'"':""),r));a+="</tr>"}if(e){for(a+="<tr>",u=0,l=e.length;u<l;++u)void 0!==e[u]&&(a+=this.getCellHTMLFromValue("th",null,'scope="col"',e[u]));a+="</tr>"}return a+"</thead>"},e.prototype.parse=function(t,e){var o=[],r=[],n=eN(this.options,t),i=n.endRow,s=n.startColumn,a=n.endColumn,u=n.firstRowAsNames,l=n.tableElement||this.tableElement;if(!(l instanceof HTMLElement)){this.emit({type:"parseError",columns:o,detail:e,headers:r,error:"Not a valid HTML Table"});return}this.tableElement=l,this.tableElementID=l.id,this.emit({type:"parse",columns:this.columns,detail:e,headers:this.headers});var c,f=l.getElementsByTagName("tr"),p=f.length,h=0,d=n.startRow;if(u&&p){for(var m=f[0].children,y=m.length,g=s;g<y&&!(g>a);g++)("TD"===(c=m[g]).tagName||"TH"===c.tagName)&&r.push(c.innerHTML);d++}for(;h<p;){if(h>=d&&h<=i)for(var v=f[h].children,b=v.length,w=0;w<b;){var C=w-s,R=o[C];if(("TD"===(c=v[w]).tagName||"TH"===c.tagName)&&w>=s&&w<=a){o[C]||(o[C]=[]);var O=this.asGuessedType(c.innerHTML);O instanceof Date&&(O=O.getTime()),o[C][h-d]=O;for(var g=1;h-d>=g&&void 0===R[h-d-g];)R[h-d-g]=null,g++}w++}h++}this.columns=o,this.headers=r,this.emit({type:"afterParse",columns:o,detail:e,headers:r})},e.prototype.getTable=function(){return Q.getTableFromColumns(this.columns,this.headers)},e.defaultOptions=eO(eO({},Q.defaultOptions),{useRowspanHeaders:!0,useMultiLevelHeaders:!0}),e}(Q);Q.registerType("HTMLTable",eT);var e_=(p=function(t,e){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ej=O().win,eA=O().merge,eP=function(t){function e(o){var r=this,n=eA(e.defaultOptions,o);return(r=t.call(this,n)||this).converter=new eT(n),r.options=n,r}return e_(e,t),e.prototype.load=function(t){var e,o=this,r=o.converter,n=o.table,i=o.options,s=i.dataModifier,a=i.table;if(o.emit({type:"load",detail:t,table:n,tableElement:o.tableElement}),"string"==typeof a?(o.tableID=a,e=ej.document.getElementById(a)):(e=a,o.tableID=e.id),o.tableElement=e||void 0,!o.tableElement){var u="HTML table not provided, or element with ID not found";return o.emit({type:"loadError",detail:t,error:u,table:n}),Promise.reject(Error(u))}return r.parse(eA({tableElement:o.tableElement},o.options),t),n.deleteColumns(),n.setColumns(r.getTable().getColumns()),o.setModifierOptions(s).then(function(){return o.emit({type:"afterLoad",detail:t,table:n,tableElement:o.tableElement}),o})},e.defaultOptions={table:""},e}(Z);Z.registerType("HTMLTable",eP);var ex=(h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eE=function(t,e){var o,r,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(o)throw TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(6===a[0]&&s.label<n[1]){s.label=n[1],n=a;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(a);break}n[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},eI=O().merge,eM=function(t){function e(o){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=t.call(this)||this;i.chain=r,i.options=eI(e.defaultOptions,o);for(var s=i.options.chain||[],a=0,u=s.length,l=void 0,c=void 0;a<u;++a)(l=s[a]).type&&(c=A.types[l.type])&&r.push(new c(l));return i}return ex(e,t),e.prototype.add=function(t,e){this.emit({type:"addModifier",detail:e,modifier:t}),this.chain.push(t),this.emit({type:"addModifier",detail:e,modifier:t})},e.prototype.clear=function(t){this.emit({type:"clearChain",detail:t}),this.chain.length=0,this.emit({type:"afterClearChain",detail:t})},e.prototype.modify=function(t,e){var o,r,n,i;return o=this,r=void 0,n=void 0,i=function(){var o,r,n,i,s;return eE(this,function(a){switch(a.label){case 0:o=this.options.reverse?this.chain.slice().reverse():this.chain.slice(),t.modified===t&&(t.modified=t.clone(!1,e)),r=t,n=0,i=o.length,a.label=1;case 1:if(!(n<i))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,o[n].modify(r,e)];case 3:return a.sent(),[3,5];case 4:throw s=a.sent(),this.emit({type:"error",detail:e,table:t}),s;case 5:r=r.modified,a.label=6;case 6:return++n,[3,1];case 7:return t.modified=r,[2,t]}})},new(n||(n=Promise))(function(t,e){function s(t){try{u(i.next(t))}catch(t){e(t)}}function a(t){try{u(i.throw(t))}catch(t){e(t)}}function u(e){var o;e.done?t(e.value):((o=e.value)instanceof n?o:new n(function(t){t(o)})).then(s,a)}u((i=i.apply(o,r||[])).next())})},e.prototype.modifyCell=function(t,e,o,r,n){var i=this.options.reverse?this.chain.reverse():this.chain;if(i.length){for(var s=t.clone(),a=0,u=i.length;a<u;++a)i[a].modifyCell(s,e,o,r,n),s=s.modified;t.modified=s}return t},e.prototype.modifyColumns=function(t,e,o,r){var n=this.options.reverse?this.chain.reverse():this.chain.slice();if(n.length){for(var i=t.clone(),s=0,a=n.length;s<a;++s)n[s].modifyColumns(i,e,o,r),i=i.modified;t.modified=i}return t},e.prototype.modifyRows=function(t,e,o,r){var n=this.options.reverse?this.chain.reverse():this.chain.slice();if(n.length){for(var i=t.clone(),s=0,a=n.length;s<a;++s)n[s].modifyRows(i,e,o,r),i=i.modified;t.modified=i}return t},e.prototype.modifyTable=function(t,e){this.emit({type:"modify",detail:e,table:t});for(var o=this.options.reverse?this.chain.reverse():this.chain.slice(),r=t.modified,n=0,i=o.length;n<i;++n)r=(0,o[n]).modifyTable(r,e).modified;return t.modified=r,this.emit({type:"afterModify",detail:e,table:t}),t},e.prototype.remove=function(t,e){var o=this.chain;this.emit({type:"removeModifier",detail:e,modifier:t}),o.splice(o.indexOf(t),1),this.emit({type:"afterRemoveModifier",detail:e,modifier:t})},e.defaultOptions={type:"Chain"},e}(A);A.registerType("Chain",eM);var eF=(d=function(t,e){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eD=O().merge,eS=function(t){function e(o){var r=t.call(this)||this;return r.options=eD(e.defaultOptions,o),r}return eF(e,t),e.prototype.modifyCell=function(t,e,o,r,n){var i=t.modified,s=i.getRowIndexBy("columnNames",e);return void 0===s?i.setColumns(this.modifyTable(t.clone()).getColumns(),void 0,n):i.setCell("".concat(o),s,r,n),t},e.prototype.modifyColumns=function(t,e,o,r){var n=t.modified,i=n.getColumn("columnNames")||[],s=t.getColumnNames(),a=t.getRowCount()!==i.length;if(!a){for(var u=0,l=s.length;u<l;++u)if(s[u]!==i[u]){a=!0;break}}if(a)return this.modifyTable(t,r);s=Object.keys(e);for(var u=0,l=s.length,c=void 0,f=void 0,p=void 0;u<l;++u){c=e[f=s[u]],p=n.getRowIndexBy("columnNames",f)||n.getRowCount();for(var h=0,d=o,m=c.length;h<m;++h,++d)n.setCell("".concat(d),p,c[h],r)}return t},e.prototype.modifyRows=function(t,e,o,r){var n=t.getColumnNames(),i=t.modified,s=i.getColumn("columnNames")||[],a=t.getRowCount()!==s.length;if(!a){for(var u=0,l=n.length;u<l;++u)if(n[u]!==s[u]){a=!0;break}}if(a)return this.modifyTable(t,r);for(var u=0,c=o,l=e.length,f=void 0;u<l;++u,++c)if((f=e[u])instanceof Array)i.setColumn("".concat(c),f);else for(var p=0,h=n.length;p<h;++p)i.setCell("".concat(c),p,f[n[p]],r);return t},e.prototype.modifyTable=function(t,e){this.emit({type:"modify",detail:e,table:t});var o=t.modified;if(t.hasColumns(["columnNames"])){for(var r=((t.deleteColumns(["columnNames"])||{}).columnNames||[]).map(function(t){return"".concat(t)}),n={},i=0,s=t.getRowCount(),a=void 0;i<s;++i)(a=t.getRow(i))&&(n[r[i]]=a);o.deleteColumns(),o.setColumns(n)}else{for(var n={},i=0,s=t.getRowCount(),a=void 0;i<s;++i)(a=t.getRow(i))&&(n["".concat(i)]=a);n.columnNames=t.getColumnNames(),o.deleteColumns(),o.setColumns(n)}return this.emit({type:"afterModify",detail:e,table:t}),t},e.defaultOptions={type:"Invert"},e}(A);A.registerType("Invert",eS);var eL=(m=function(t,e){return(m=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}m(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eV=function(){return(eV=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},ek=function(t){function e(o){var r=t.call(this)||this;return r.options=eV(eV({},e.defaultOptions),o),r}return eL(e,t),e.prototype.modifyTable=function(t,e){this.emit({type:"modify",detail:e,table:t});for(var o=this.options.alternativeSeparators,r=this.options.formulaColumns||t.getColumnNames(),n=t.modified,i=0,s=r.length,a=void 0;i<s;++i)a=r[i],r.indexOf(a)>=0&&n.setColumn(a,this.processColumn(t,a));for(var u=this.options.columnFormulas||[],i=0,s=u.length,l=void 0,c=void 0;i<s;++i)l=u[i],c=tg.parseFormula(l.formula,o),n.setColumn(l.column,this.processColumnFormula(c,t,l.rowStart,l.rowEnd));return this.emit({type:"afterModify",detail:e,table:t}),t},e.prototype.processColumn=function(t,e,o){void 0===o&&(o=0);for(var r=this.options.alternativeSeparators,n=(t.getColumn(e,!0)||[]).slice(o>0?o:0),i=0,s=n.length,a=[],u=void 0;i<s;++i)if("string"==typeof(u=n[i])&&"="===u[0])try{a=""===u?a:tg.parseFormula(u.substring(1),r),n[i]=tH.processFormula(a,t)}catch(t){n[i]=NaN}return n},e.prototype.processColumnFormula=function(t,e,o,r){void 0===o&&(o=0),void 0===r&&(r=e.getRowCount()),o=o>=0?o:0,r=r>=0?r:e.getRowCount()+r;for(var n=[],i=e.modified,s=0,a=r-o;s<a;++s)try{n[s]=tH.processFormula(t,i)}catch(t){n[s]=NaN}finally{t=tH.translateReferences(t,0,1)}return n},e.defaultOptions={type:"Math",alternativeSeparators:!1},e}(A);A.registerType("Math",ek);var eY=(y=function(t,e){return(y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eU=O().merge,eH=function(t){function e(o){var r=t.call(this)||this;return r.options=eU(e.defaultOptions,o),r}return eY(e,t),e.prototype.modifyTable=function(t,e){this.emit({type:"modify",detail:e,table:t});var o=[],r=this.options,n=r.additive,i=r.ranges,s=r.strict;if(i.length){for(var a=t.modified,u=t.getColumns(),l=[],c=0,f=i.length,p=void 0,h=void 0;c<f;++c)if(p=i[c],!s||typeof p.minValue==typeof p.maxValue){c>0&&!n&&(a.deleteRows(),a.setRows(l),a.setOriginalRowIndexes(o,!0),u=a.getColumns(),l=[],o=[]),h=u[p.column]||[];for(var d=0,m=h.length,y=void 0,g=void 0,v=void 0;d<m;++d){switch(typeof(y=h[d])){default:continue;case"boolean":case"number":case"string":}(!s||typeof y==typeof p.minValue)&&y>=p.minValue&&y<=p.maxValue&&(n?(g=t.getRow(d),v=t.getOriginalRowIndex(d)):(g=a.getRow(d),v=a.getOriginalRowIndex(d)),g&&(l.push(g),o.push(v)))}}a.deleteRows(),a.setRows(l),a.setOriginalRowIndexes(o)}return this.emit({type:"afterModify",detail:e,table:t}),t},e.defaultOptions={type:"Range",ranges:[]},e}(A);A.registerType("Range",eH);var e$=(g=function(t,e){return(g=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eB=O().merge,eG=function(t){function e(o){var r=t.call(this)||this;return r.options=eB(e.defaultOptions,o),r}return e$(e,t),e.ascending=function(t,e){return(t||0)<(e||0)?-1:(t||0)>(e||0)?1:0},e.descending=function(t,e){return(e||0)<(t||0)?-1:(e||0)>(t||0)?1:0},e.prototype.getRowReferences=function(t){for(var e=t.getRows(),o=[],r=0,n=e.length;r<n;++r)o.push({index:r,row:e[r]});return o},e.prototype.modifyCell=function(t,e,o,r,n){var i=this.options,s=i.orderByColumn,a=i.orderInColumn;return e===s&&(a?(t.modified.setCell(e,o,r),t.modified.setColumn(a,this.modifyTable(new Y({columns:t.getColumns([s,a])})).modified.getColumn(a))):this.modifyTable(t,n)),t},e.prototype.modifyColumns=function(t,e,o,r){var n=this.options,i=n.orderByColumn,s=n.orderInColumn,a=Object.keys(e);return a.indexOf(i)>-1&&(s&&e[a[0]].length?(t.modified.setColumns(e,o),t.modified.setColumn(s,this.modifyTable(new Y({columns:t.getColumns([i,s])})).modified.getColumn(s))):this.modifyTable(t,r)),t},e.prototype.modifyRows=function(t,e,o,r){var n=this.options,i=n.orderByColumn,s=n.orderInColumn;return s&&e.length?(t.modified.setRows(e,o),t.modified.setColumn(s,this.modifyTable(new Y({columns:t.getColumns([i,s])})).modified.getColumn(s))):this.modifyTable(t,r),t},e.prototype.modifyTable=function(t,o){this.emit({type:"modify",detail:o,table:t});var r,n=t.getColumnNames(),i=t.getRowCount(),s=this.getRowReferences(t),a=this.options,u=a.direction,l=a.orderByColumn,c=a.orderInColumn,f="asc"===u?e.ascending:e.descending,p=n.indexOf(l),h=t.modified;if(-1!==p&&s.sort(function(t,e){return f(t.row[p],e.row[p])}),c){for(var d=[],m=0;m<i;++m)d[s[m].index]=m;h.setColumns(((r={})[c]=d,r))}else{for(var y=[],g=[],v=void 0,m=0;m<i;++m)v=s[m],y.push(h.getOriginalRowIndex(v.index)),g.push(v.row);h.setRows(g,0),h.setOriginalRowIndexes(y)}return this.emit({type:"afterModify",detail:o,table:t}),t},e.defaultOptions={type:"Sort",direction:"desc",orderByColumn:"y"},e}(A);A.registerType("Sort",eG);var eZ=O();eZ.DataConnector=eZ.DataConnector||Z,eZ.DataConverter=eZ.DataConverter||Q,eZ.DataCursor=eZ.DataCursor||tt,eZ.DataModifier=eZ.DataModifier||A,eZ.DataPool=eZ.DataPool||to,eZ.DataTable=eZ.DataTable||Y,eZ.Formula=eZ.Formula||t6;var eJ=O();return C.default}()});
Hacked By AnonymousFox1.0, Coded By AnonymousFox