-
Notifications
You must be signed in to change notification settings - Fork 1
/
datagrid.js
11 lines (11 loc) · 105 KB
/
datagrid.js
1
2
3
4
5
6
7
8
9
10
11
!/**
* Highcharts Dashboards v3.1.0 (2024-12-04)
*
* (c) 2009-2024 Highsoft AS
*
* License: www.highcharts.com/license
*/function(e,t){"object"==typeof module&&module.exports?(t.default=t,module.exports=e&&e.document?t(e):t):"function"==typeof define&&define.amd?define("datagrid/datagrid",function(){return t(e)}):(e.DataGrid&&e.DataGrid.error(16,!0),e.DataGrid=t(e))}("undefined"!=typeof window?window:this,function(e){"use strict";var t={};function i(t,i,s,o){!t.hasOwnProperty(i)&&(t[i]=o.apply(null,s),e&&"function"==typeof CustomEvent&&e.dispatchEvent(new CustomEvent("DataGridModuleLoaded",{detail:{path:i,module:t[i]}})))}return i(t,"Core/Globals.js",[],function(){var t,i;return(i=t||(t={})).SVG_NS="http://www.w3.org/2000/svg",i.product="Highcharts",i.version="3.1.0",i.win=void 0!==e?e:{},i.doc=i.win.document,i.svg=i.doc&&i.doc.createElementNS&&!!i.doc.createElementNS(i.SVG_NS,"svg").createSVGRect,i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=i.win.chrome,i.isFirefox=-1!==i.userAgent.indexOf("Firefox"),i.isMS=/(edge|msie|trident)/i.test(i.userAgent)&&!i.win.opera,i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),i.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(i.userAgent),i.isWebKit=-1!==i.userAgent.indexOf("AppleWebKit"),i.deg2rad=2*Math.PI/360,i.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i.noop=function(){},i.supportsPassiveEvents=function(){let e=!1;if(!i.isMS){let t=Object.defineProperty({},"passive",{get:function(){e=!0}});i.win.addEventListener&&i.win.removeEventListener&&(i.win.addEventListener("testPassive",i.noop,t),i.win.removeEventListener("testPassive",i.noop,t))}return e}(),i.charts=[],i.composed=[],i.dateFormats={},i.seriesTypes={},i.symbolSizes={},i.chartCount=0,t}),i(t,"Core/Utilities.js",[t["Core/Globals.js"]],function(e){let t;let{charts:i,doc:s,win:o}=e;function n(t,i,s,r){let l=i?"Highcharts error":"Highcharts warning";32===t&&(t=`${l}: Deprecated member`);let a=c(t),d=a?`${l} #${t}: www.highcharts.com/errors/${t}/`:t.toString();if(void 0!==r){let e="";a&&(d+="?"),T(r,function(t,i){e+=`
- ${i}: ${t}`,a&&(d+=encodeURI(i)+"="+encodeURI(t))}),d+=e}D(e,"displayError",{chart:s,code:t,message:d,params:r},function(){if(i)throw Error(d);o.console&&-1===n.messages.indexOf(d)&&console.warn(d)}),n.messages.push(d)}function r(e,t){return parseInt(e,t||10)}function l(e){return"string"==typeof e}function a(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function d(e,t){return!!e&&"object"==typeof e&&(!t||!a(e))}function h(e){return d(e)&&"number"==typeof e.nodeType}function u(e){let t=e&&e.constructor;return!!(d(e,!0)&&!h(e)&&t&&t.name&&"Object"!==t.name)}function c(e){return"number"==typeof e&&!isNaN(e)&&e<1/0&&e>-1/0}function m(e){return null!=e}function f(e,t,i){let s;let o=l(t)&&!m(i),n=(t,i)=>{m(t)?e.setAttribute(i,t):o?(s=e.getAttribute(i))||"class"!==i||(s=e.getAttribute(i+"Name")):e.removeAttribute(i)};return l(t)?n(i,t):T(t,n),s}function p(e){return a(e)?e:[e]}function g(e,t){let i;for(i in e||(e={}),t)e[i]=t[i];return e}function w(){let e=arguments,t=e.length;for(let i=0;i<t;i++){let t=e[i];if(null!=t)return t}}function y(e,t){g(e.style,t)}function b(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function C(e,t){return e>1e14?e:parseFloat(e.toPrecision(t||14))}(n||(n={})).messages=[],Math.easeInOutSine=function(e){return -.5*(Math.cos(Math.PI*e)-1)};let v=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){let i;let s=e.length;for(i=0;i<s;i++)if(t(e[i],i))return e[i]};function T(e,t,i){for(let s in e)Object.hasOwnProperty.call(e,s)&&t.call(i||e[s],e[s],s,e)}function E(e,t,i){function s(t,i){let s=e.removeEventListener;s&&s.call(e,t,i,!1)}function o(i){let o,n;e.nodeName&&(t?(o={})[t]=!0:o=i,T(o,function(e,t){if(i[t])for(n=i[t].length;n--;)s(t,i[t][n].fn)}))}let n="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(n,"hcEvents")){let e=n.hcEvents;if(t){let n=e[t]||[];i?(e[t]=n.filter(function(e){return i!==e.fn}),s(t,i)):(o(e),e[t]=[])}else o(e),delete n.hcEvents}}function D(t,i,o,n){if(o=o||{},s.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==e)){let e=s.createEvent("Events");e.initEvent(i,!0,!0),o=g(e,o),t.dispatchEvent?t.dispatchEvent(o):t.fireEvent(i,o)}else if(t.hcEvents){o.target||g(o,{preventDefault:function(){o.defaultPrevented=!0},target:t,type:i});let e=[],s=t,n=!1;for(;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[i]&&(e.length&&(n=!0),e.unshift.apply(e,s.hcEvents[i])),s=Object.getPrototypeOf(s);n&&e.sort((e,t)=>e.order-t.order),e.forEach(e=>{!1===e.fn.call(t,o)&&o.preventDefault()})}n&&!o.defaultPrevented&&n.call(t,o)}let x=function(){let e=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(t?"":e)+i++}}();return o.jQuery&&(o.jQuery.fn.highcharts=function(){let t=[].slice.call(arguments);if(this[0])return t[0]?(new e[l(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):i[f(this[0],"data-highcharts-chart")]}),{addEvent:function(t,i,s,o={}){let n="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let r=n.hcEvents;e.Point&&t instanceof e.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let l=t.addEventListener;l&&l.call(t,i,s,!!e.supportsPassiveEvents&&{passive:void 0===o.passive?-1!==i.indexOf("touch"):o.passive,capture:!1}),r[i]||(r[i]=[]);let a={fn:s,order:"number"==typeof o.order?o.order:1/0};return r[i].push(a),r[i].sort((e,t)=>e.order-t.order),function(){E(t,i,s)}},arrayMax:function(e){let t=e.length,i=e[0];for(;t--;)e[t]>i&&(i=e[t]);return i},arrayMin:function(e){let t=e.length,i=e[0];for(;t--;)e[t]<i&&(i=e[t]);return i},attr:f,clamp:function(e,t,i){return e>t?e<i?e:i:t},clearTimeout:function(e){m(e)&&clearTimeout(e)},correctFloat:C,createElement:function(e,t,i,o,n){let r=s.createElement(e);return t&&g(r,t),n&&y(r,{padding:"0",border:"none",margin:"0"}),i&&y(r,i),o&&o.appendChild(r),r},crisp:function(e,t=0,i){let s=t%2/2,o=i?-1:1;return(Math.round(e*o-s)+s)*o},css:y,defined:m,destroyObjectProperties:function(e,t,i){T(e,function(s,o){s!==t&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete e[o]})},diffObjects:function(e,t,i,s){let o={};return function e(t,o,n,r){let l=i?o:t;T(t,function(i,h){if(!r&&s&&s.indexOf(h)>-1&&o[h]){i=p(i),n[h]=[];for(let t=0;t<Math.max(i.length,o[h].length);t++)o[h][t]&&(void 0===i[t]?n[h][t]=o[h][t]:(n[h][t]={},e(i[t],o[h][t],n[h][t],r+1)))}else d(i,!0)&&!i.nodeType?(n[h]=a(i)?[]:{},e(i,o[h]||{},n[h],r+1),0!==Object.keys(n[h]).length||"colorAxis"===h&&0===r||delete n[h]):(t[h]!==o[h]||h in t&&!(h in o))&&"__proto__"!==h&&"constructor"!==h&&(n[h]=l[h])})}(e,t,o,0),o},discardElement:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},erase:function(e,t){let i=e.length;for(;i--;)if(e[i]===t){e.splice(i,1);break}},error:n,extend:g,extendClass:function(e,t){let i=function(){};return i.prototype=new e,g(i.prototype,t),i},find:v,fireEvent:D,getAlignFactor:(e="")=>({center:.5,right:1,middle:.5,bottom:1})[e]||0,getClosestDistance:function(e,t){let i,s,o,n;let r=!t;return e.forEach(e=>{if(e.length>1)for(n=s=e.length-1;n>0;n--)(o=e[n]-e[n-1])<0&&!r?(t?.(),t=void 0):o&&(void 0===i||o<i)&&(i=o)}),i},getMagnitude:b,getNestedProperty:function(e,t){let i=e.split(".");for(;i.length&&m(t);){let e=i.shift();if(void 0===e||"__proto__"===e)return;if("this"===e){let e;return d(t)&&(e=t["@this"]),e??t}let s=t[e];if(!m(s)||"function"==typeof s||"number"==typeof s.nodeType||s===o)return;t=s}return t},getStyle:function e(t,i,s){let n;if("width"===i){let i=Math.min(t.offsetWidth,t.scrollWidth),s=t.getBoundingClientRect&&t.getBoundingClientRect().width;return s<i&&s>=i-1&&(i=Math.floor(s)),Math.max(0,i-(e(t,"padding-left",!0)||0)-(e(t,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(e(t,"padding-top",!0)||0)-(e(t,"padding-bottom",!0)||0));let l=o.getComputedStyle(t,void 0);return l&&(n=l.getPropertyValue(i),w(s,"opacity"!==i)&&(n=r(n))),n},insertItem:function(e,t){let i;let s=e.options.index,o=t.length;for(i=e.options.isInternal?o:0;i<o+1;i++)if(!t[i]||c(s)&&s<w(t[i].options.index,t[i]._i)||t[i].options.isInternal){t.splice(i,0,e);break}return i},isArray:a,isClass:u,isDOMElement:h,isFunction:function(e){return"function"==typeof e},isNumber:c,isObject:d,isString:l,merge:function(e,...t){let i,s=[e,...t],o={},n=function(e,t){return"object"!=typeof e&&(e={}),T(t,function(i,s){"__proto__"!==s&&"constructor"!==s&&(!d(i,!0)||u(i)||h(i)?e[s]=t[s]:e[s]=n(e[s]||{},i))}),e};!0===e&&(o=s[1],s=Array.prototype.slice.call(s,2));let r=s.length;for(i=0;i<r;i++)o=n(o,s[i]);return o},normalizeTickInterval:function(e,t,i,s,o){let n,r=e;i=w(i,b(e));let l=e/i;for(!t&&(t=o?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===s&&(1===i?t=t.filter(function(e){return e%1==0}):i<=.1&&(t=[1/i]))),n=0;n<t.length&&(r=t[n],(!o||!(r*i>=e))&&(o||!(l<=(t[n]+(t[n+1]||t[n]))/2)));n++);return C(r*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:T,offset:function(e){let t=s.documentElement,i=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(o.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(o.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:i.width,height:i.height}},pad:function(e,t,i){return Array((t||2)+1-String(e).replace("-","").length).join(i||"0")+e},pick:w,pInt:r,pushUnique:function(e,t){return 0>e.indexOf(t)&&!!e.push(t)},relativeLength:function(e,t,i){return/%$/.test(e)?t*parseFloat(e)/100+(i||0):parseFloat(e)},removeEvent:E,replaceNested:function(e,...t){let i,s;do for(s of(i=e,t))e=e.replace(s[0],s[1]);while(e!==i);return e},splat:p,stableSort:function(e,t){let i,s;let o=e.length;for(s=0;s<o;s++)e[s].safeI=s;for(e.sort(function(e,s){return 0===(i=t(e,s))?e.safeI-s.safeI:i}),s=0;s<o;s++)delete e[s].safeI},syncTimeout:function(e,t,i){return t>0?setTimeout(e,t,i):(e.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(e){return l(e)?e.substring(0,1).toUpperCase()+e.substring(1):String(e)},uniqueKey:x,useSerialIds:function(e){return t=w(e,t)},wrap:function(e,t,i){let s=e[t];e[t]=function(){let e=arguments,t=this;return i.apply(this,[function(){return s.apply(t,arguments.length?arguments:e)}].concat([].slice.call(arguments)))}}}}),i(t,"Core/Renderer/HTML/AST.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{SVG_NS:i,win:s}=e,{attr:o,createElement:n,css:r,error:l,isFunction:a,isString:d,objectEach:h,splat:u}=t,{trustedTypes:c}=s,m=c&&a(c.createPolicy)&&c.createPolicy("highcharts",{createHTML:e=>e}),f=m?m.createHTML(""):"";class p{static filterUserAttributes(e){return h(e,(t,i)=>{let s=!0;-1===p.allowedAttributes.indexOf(i)&&(s=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(s=d(t)&&p.allowedReferences.some(e=>0===t.indexOf(e))),s||(l(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete e[i]),d(t)&&e[i]&&(e[i]=t.replace(/</g,"<"))}),e}static parseStyle(e){return e.split(";").reduce((e,t)=>{let i=t.split(":").map(e=>e.trim()),s=i.shift();return s&&i.length&&(e[s.replace(/-([a-z])/g,e=>e[1].toUpperCase())]=i.join(":")),e},{})}static setElementHTML(e,t){e.innerHTML=p.emptyHTML,t&&new p(t).addToDOM(e)}constructor(e){this.nodes="string"==typeof e?this.parseMarkup(e):e}addToDOM(t){return function t(s,n){let a;return u(s).forEach(function(s){let d;let u=s.tagName,c=s.textContent?e.doc.createTextNode(s.textContent):void 0,m=p.bypassHTMLFiltering;if(u){if("#text"===u)d=c;else if(-1!==p.allowedTags.indexOf(u)||m){let l="svg"===u?i:n.namespaceURI||i,a=e.doc.createElementNS(l,u),f=s.attributes||{};h(s,function(e,t){"tagName"!==t&&"attributes"!==t&&"children"!==t&&"style"!==t&&"textContent"!==t&&(f[t]=e)}),o(a,m?f:p.filterUserAttributes(f)),s.style&&r(a,s.style),c&&a.appendChild(c),t(s.children||[],a),d=a}else l(33,!1,void 0,{"Invalid tagName in config":u})}d&&n.appendChild(d),a=d}),a}(this.nodes,t)}parseMarkup(e){let t;let i=[];e=e.trim().replace(/ style=(["'])/g," data-style=$1");try{t=new DOMParser().parseFromString(m?m.createHTML(e):e,"text/html")}catch(e){}if(!t){let i=n("div");i.innerHTML=e,t={body:i}}let s=(e,t)=>{let i=e.nodeName.toLowerCase(),o={tagName:i};"#text"===i&&(o.textContent=e.textContent||"");let n=e.attributes;if(n){let e={};[].forEach.call(n,t=>{"data-style"===t.name?o.style=p.parseStyle(t.value):e[t.name]=t.value}),o.attributes=e}if(e.childNodes.length){let t=[];[].forEach.call(e.childNodes,e=>{s(e,t)}),t.length&&(o.children=t)}t.push(o)};return[].forEach.call(t.body.childNodes,e=>s(e,i)),i}}return p.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],p.allowedReferences=["https://","http://","mailto:","/","../","./","#"],p.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMorphology","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],p.emptyHTML=f,p.bypassHTMLFiltering=!1,p}),i(t,"Data/Modifiers/DataModifier.js",[t["Core/Utilities.js"]],function(t){var i;let{addEvent:s,fireEvent:o,merge:n}=t;class r{benchmark(t,i){let s=[],o=this,r=()=>{o.modifyTable(t),o.emit({type:"afterBenchmarkIteration"})},{iterations:l}=n({iterations:1},i);o.on("afterBenchmarkIteration",()=>{if(s.length===l){o.emit({type:"afterBenchmark",results:s});return}r()});let a={startTime:0,endTime:0};return o.on("modify",()=>{a.startTime=e.performance.now()}),o.on("afterModify",()=>{a.endTime=e.performance.now(),s.push(a.endTime-a.startTime)}),r(),s}emit(e){o(this,e.type,e)}modify(e,t){let i=this;return new Promise((s,o)=>{e.modified===e&&(e.modified=e.clone(!1,t));try{s(i.modifyTable(e,t))}catch(s){i.emit({type:"error",detail:t,table:e}),o(s)}})}modifyCell(e,t,i,s,o){return this.modifyTable(e)}modifyColumns(e,t,i,s){return this.modifyTable(e)}modifyRows(e,t,i,s){return this.modifyTable(e)}on(e,t){return s(this,e,t)}}return(i=r||(r={})).types={},i.registerType=function(e,t){return!!e&&!i.types[e]&&!!(i.types[e]=t)},r}),i(t,"Data/DataTableCore.js",[t["Core/Utilities.js"]],function(e){let{fireEvent:t,isArray:i,objectEach:s,uniqueKey:o}=e;return class{constructor(e={}){this.autoId=!e.id,this.columns={},this.id=e.id||o(),this.modified=this,this.rowCount=0,this.versionTag=o();let t=0;s(e.columns||{},(e,i)=>{this.columns[i]=e.slice(),t=Math.max(t,e.length)}),this.applyRowCount(t)}applyRowCount(e){this.rowCount=e,s(this.columns,t=>{i(t)&&(t.length=e)})}getColumn(e,t){return this.columns[e]}getColumns(e,t){return(e||Object.keys(this.columns)).reduce((e,t)=>(e[t]=this.columns[t],e),{})}getRow(e,t){return(t||Object.keys(this.columns)).map(t=>this.columns[t]?.[e])}setColumn(e,t=[],i=0,s){this.setColumns({[e]:t},i,s)}setColumns(e,i,n){let r=this.rowCount;s(e,(e,t)=>{this.columns[t]=e.slice(),r=e.length}),this.applyRowCount(r),n?.silent||(t(this,"afterSetColumns"),this.versionTag=o())}setRow(e,i=this.rowCount,n,r){let{columns:l}=this,a=n?this.rowCount+1:i+1;s(e,(e,t)=>{let s=l[t]||r?.addColumns!==!1&&Array(a);s&&(n?s.splice(i,0,e):s[i]=e,l[t]=s)}),a>this.rowCount&&this.applyRowCount(a),r?.silent||(t(this,"afterSetRows"),this.versionTag=o())}}}),i(t,"Data/DataTable.js",[t["Data/DataTableCore.js"],t["Core/Utilities.js"]],function(e,t){let{addEvent:i,defined:s,fireEvent:o,extend:n,uniqueKey:r}=t;class l extends e{static isNull(e){if(e===l.NULL)return!0;if(e instanceof Array){if(!e.length)return!1;for(let t=0,i=e.length;t<i;++t)if(null!==e[t])return!1}else{let t=Object.keys(e);if(!t.length)return!1;for(let i=0,s=t.length;i<s;++i)if(null!==e[t[i]])return!1}return!0}constructor(e={}){super(e),this.modified=this}clone(e,t){let i={};this.emit({type:"cloneTable",detail:t}),e||(i.columns=this.columns),this.autoId||(i.id=this.id);let s=new l(i);return e||(s.versionTag=this.versionTag,s.originalRowIndexes=this.originalRowIndexes,s.localRowIndexes=this.localRowIndexes),this.emit({type:"afterCloneTable",detail:t,tableClone:s}),s}deleteColumns(e,t){let i=this.columns,s={},o={},n=this.modifier,r=this.rowCount;if((e=e||Object.keys(i)).length){this.emit({type:"deleteColumns",columnNames:e,detail:t});for(let t=0,n=e.length,l,a;t<n;++t)(l=i[a=e[t]])&&(s[a]=l,o[a]=Array(r)),delete i[a];return Object.keys(i).length||(this.rowCount=0,this.deleteRowIndexReferences()),n&&n.modifyColumns(this,o,0,t),this.emit({type:"afterDeleteColumns",columns:s,columnNames:e,detail:t}),s}}deleteRowIndexReferences(){delete this.originalRowIndexes,delete this.localRowIndexes}deleteRows(e,t=1,i){let s=[],o=[],n=this.modifier;if(this.emit({type:"deleteRows",detail:i,rowCount:t,rowIndex:e||0}),void 0===e&&(e=0,t=this.rowCount),t>0&&e<this.rowCount){let i=this.columns,n=Object.keys(i);for(let r=0,l=n.length,a,d;r<l;++r){d=(a=i[n[r]]).splice(e,t),r||(this.rowCount=a.length);for(let e=0,t=d.length;e<t;++e)s[e]=s[e]||[],s[e][r]=d[e];o.push(Array(l))}}return n&&n.modifyRows(this,o,e||0,i),this.emit({type:"afterDeleteRows",detail:i,rowCount:t,rowIndex:e||0,rows:s}),s}emit(e){["afterDeleteColumns","afterDeleteRows","afterSetCell","afterSetColumns","afterSetRows"].includes(e.type)&&(this.versionTag=r()),o(this,e.type,e)}getCell(e,t){let i=this.columns[e];if(i)return i[t]}getCellAsBoolean(e,t){let i=this.columns[e];return!!(i&&i[t])}getCellAsNumber(e,t,i){let s=this.columns[e],o=s&&s[t];switch(typeof o){case"boolean":return o?1:0;case"number":return isNaN(o)&&!i?null:o}return isNaN(o=parseFloat(`${o??""}`))&&!i?null:o}getCellAsString(e,t){let i=this.columns[e];return`${i&&i[t]}`}getColumn(e,t){return this.getColumns([e],t)[e]}getColumnAsNumbers(e,t){let i=this.columns[e],s=[];if(i){let o=i.length;if(t)for(let t=0;t<o;++t)s.push(this.getCellAsNumber(e,t,!0));else{for(let e=0,t;e<o;++e){if("number"==typeof(t=i[e]))return i.slice();if(null!=t)break}for(let t=0;t<o;++t)s.push(this.getCellAsNumber(e,t))}}return s}getColumnNames(){return Object.keys(this.columns)}getColumns(e,t){let i=this.columns,s={};e=e||Object.keys(i);for(let o=0,n=e.length,r,l;o<n;++o)(r=i[l=e[o]])&&(s[l]=t?r:r.slice());return s}getLocalRowIndex(e){let{localRowIndexes:t}=this;return t?t[e]:e}getModifier(){return this.modifier}getOriginalRowIndex(e){let{originalRowIndexes:t}=this;return t?t[e]:e}getRow(e,t){return this.getRows(e,1,t)[0]}getRowCount(){return this.rowCount}getRowIndexBy(e,t,i){let s=this.columns[e];if(s){let e=s.indexOf(t,i);if(-1!==e)return e}}getRowObject(e,t){return this.getRowObjects(e,1,t)[0]}getRowObjects(e=0,t=this.rowCount-e,i){let s=this.columns,o=Array(t);i=i||Object.keys(s);for(let n=e,r=0,l=Math.min(this.rowCount,e+t),a,d;n<l;++n,++r)for(let e of(d=o[r]={},i))a=s[e],d[e]=a?a[n]:void 0;return o}getRows(e=0,t=this.rowCount-e,i){let s=this.columns,o=Array(t);i=i||Object.keys(s);for(let n=e,r=0,l=Math.min(this.rowCount,e+t),a,d;n<l;++n,++r)for(let e of(d=o[r]=[],i))a=s[e],d.push(a?a[n]:void 0);return o}getVersionTag(){return this.versionTag}hasColumns(e){let t=this.columns;for(let i=0,s=e.length;i<s;++i)if(!t[e[i]])return!1;return!0}hasRowWith(e,t){let i=this.columns[e];return!!i&&-1!==i.indexOf(t)}on(e,t){return i(this,e,t)}renameColumn(e,t){let i=this.columns;return!!i[e]&&(e!==t&&(i[t]=i[e],delete i[e]),!0)}setCell(e,t,i,s){let o=this.columns,n=this.modifier,r=o[e];r&&r[t]===i||(this.emit({type:"setCell",cellValue:i,columnName:e,detail:s,rowIndex:t}),r||(r=o[e]=Array(this.rowCount)),t>=this.rowCount&&(this.rowCount=t+1),r[t]=i,n&&n.modifyCell(this,e,t,i),this.emit({type:"afterSetCell",cellValue:i,columnName:e,detail:s,rowIndex:t}))}setColumns(e,t,i){let s=this.columns,o=this.modifier,r=Object.keys(e),l=this.rowCount;if(this.emit({type:"setColumns",columns:e,columnNames:r,detail:i,rowIndex:t}),void 0===t)super.setColumns(e,t,n(i,{silent:!0}));else{for(let i=0,o=r.length,n,a;i<o;++i){n=e[a=r[i]];let o=s[a]?s[a]:s[a]=Array(this.rowCount);for(let e=t||0,i=n.length;e<i;++e)o[e]=n[e];l=Math.max(l,o.length)}this.applyRowCount(l)}o&&o.modifyColumns(this,e,t||0),this.emit({type:"afterSetColumns",columns:e,columnNames:r,detail:i,rowIndex:t})}setModifier(e,t){let i=this;return i.emit({type:"setModifier",detail:t,modifier:e,modified:i.modified}),i.modified=i,i.modifier=e,(e?e.modify(i):Promise.resolve(i)).then(i=>(i.emit({type:"afterSetModifier",detail:t,modifier:e,modified:i.modified}),i)).catch(t=>{throw i.emit({type:"setModifierError",error:t,modifier:e,modified:i.modified}),t})}setOriginalRowIndexes(e,t=!1){if(this.originalRowIndexes=e,t)return;let i=this.localRowIndexes=[];for(let t=0,o=e.length,n;t<o;++t)s(n=e[t])&&(i[n]=t)}setRow(e,t,i,s){this.setRows([e],t,i,s)}setRows(e,t=this.rowCount,i,s){let o=this.columns,n=Object.keys(o),r=this.modifier,a=e.length;this.emit({type:"setRows",detail:s,rowCount:a,rowIndex:t,rows:e});for(let s=0,r=t,d;s<a;++s,++r)if((d=e[s])===l.NULL)for(let e=0,t=n.length;e<t;++e)i?o[n[e]].splice(r,0,null):o[n[e]][r]=null;else if(d instanceof Array)for(let e=0,t=n.length;e<t;++e)o[n[e]][r]=d[e];else super.setRow(d,r,void 0,{silent:!0});let d=i?a+e.length:t+a;if(d>this.rowCount){this.rowCount=d;for(let e=0,t=n.length;e<t;++e)o[n[e]].length=d}r&&r.modifyRows(this,e,t),this.emit({type:"afterSetRows",detail:s,rowCount:a,rowIndex:t,rows:e})}}return l.NULL={},l.version="1.0.0",l}),i(t,"Data/Connectors/DataConnector.js",[t["Data/Modifiers/DataModifier.js"],t["Data/DataTable.js"],t["Core/Utilities.js"]],function(t,i,s){var o;let{addEvent:n,fireEvent:r,merge:l,pick:a}=s;class d{constructor(e={}){this.table=new i(e.dataTable),this.metadata=e.metadata||{columns:{}}}get polling(){return!!this.polling}describeColumn(e,t){let i=this.metadata.columns;i[e]=l(i[e]||{},t)}describeColumns(e){let t;let i=Object.keys(e);for(;"string"==typeof(t=i.pop());)this.describeColumn(t,e[t])}emit(e){r(this,e.type,e)}getColumnOrder(e){let t=this.metadata.columns,i=Object.keys(t||{});if(i.length)return i.sort((e,i)=>a(t[e].index,0)-a(t[i].index,0))}getSortedColumns(e){return this.table.getColumns(this.getColumnOrder(e))}load(){return r(this,"afterLoad",{table:this.table}),Promise.resolve(this)}on(e,t){return n(this,e,t)}save(){return r(this,"saveError",{table:this.table}),Promise.reject(Error("Not implemented"))}setColumnOrder(e){for(let t=0,i=e.length;t<i;++t)this.describeColumn(e[t],{index:t})}setModifierOptions(e){let i=e&&t.types[e.type];return this.table.setModifier(i?new i(e):void 0).then(()=>this)}startPolling(t=1e3){let i=this;e.clearTimeout(i._polling),i._polling=e.setTimeout(()=>i.load().catch(e=>i.emit({type:"loadError",error:e,table:i.table})).then(()=>{i._polling&&i.startPolling(t)}),t)}stopPolling(){e.clearTimeout(this._polling),delete this._polling}whatIs(e){return this.metadata.columns[e]}}return(o=d||(d={})).types={},o.registerType=function(e,t){return!!e&&!o.types[e]&&!!(o.types[e]=t)},d}),i(t,"Data/Converters/DataConverter.js",[t["Data/DataTable.js"],t["Core/Utilities.js"]],function(e,t){let{addEvent:i,fireEvent:s,isNumber:o,merge:n}=t;class r{constructor(e){this.dateFormats={"YYYY/mm/dd":{regex:/^(\d{4})([\-\.\/])(\d{1,2})\2(\d{1,2})$/,parser:function(e){return e?Date.UTC(+e[1],e[3]-1,+e[4]):NaN}},"dd/mm/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(e){return e?Date.UTC(+e[4],e[3]-1,+e[1]):NaN},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{4})$/,parser:function(e){return e?Date.UTC(+e[4],e[1]-1,+e[3]):NaN}},"dd/mm/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(e){let t=new Date;if(!e)return NaN;let i=+e[4];return i>t.getFullYear()-2e3?i+=1900:i+=2e3,Date.UTC(i,e[3]-1,+e[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^(\d{1,2})([\-\.\/])(\d{1,2})\2(\d{2})$/,parser:function(e){return e?Date.UTC(+e[4]+2e3,e[1]-1,+e[3]):NaN}}};let t=n(r.defaultOptions,e),i=t.decimalPoint;("."===i||","===i)&&(i="."===i?"\\.":",",this.decimalRegExp=RegExp("^(-?[0-9]+)"+i+"([0-9]+)$")),this.options=t}asBoolean(e){return"boolean"==typeof e?e:"string"==typeof e?""!==e&&"0"!==e&&"false"!==e:!!this.asNumber(e)}asDate(e){let t;if("string"==typeof e)t=this.parseDate(e);else if("number"==typeof e)t=e;else{if(e instanceof Date)return e;t=this.parseDate(this.asString(e))}return new Date(t)}asGuessedType(e){return({number:this.asNumber,Date:this.asDate,string:this.asString})[this.guessType(e)].call(this,e)}asNumber(e){if("number"==typeof e)return e;if("boolean"==typeof e)return e?1:0;if("string"==typeof e){let t=this.decimalRegExp;if(e.indexOf(" ")>-1&&(e=e.replace(/\s+/g,"")),t){if(!t.test(e))return NaN;e=e.replace(t,"$1.$2")}return parseFloat(e)}return e instanceof Date?e.getDate():e?e.getRowCount():NaN}asString(e){return""+e}deduceDateFormat(e,t,i){let s=[],o=[],n="YYYY/mm/dd",r,l=[],a=0,d=!1,h,u;for((!t||t>e.length)&&(t=e.length);a<t;a++)if(void 0!==e[a]&&e[a]&&e[a].length)for(u=0,r=e[a].trim().replace(/[\-\.\/]/g," ").split(" "),l=["","",""];u<r.length;u++)u<l.length&&(h=parseInt(r[u],10))&&(o[u]=!o[u]||o[u]<h?h:o[u],void 0!==s[u]?s[u]!==h&&(s[u]=!1):s[u]=h,h>31?h<100?l[u]="YY":l[u]="YYYY":h>12&&h<=31?(l[u]="dd",d=!0):l[u].length||(l[u]="mm"));if(d){for(u=0;u<s.length;u++)!1!==s[u]?o[u]>12&&"YY"!==l[u]&&"YYYY"!==l[u]&&(l[u]="YY"):o[u]>12&&"mm"===l[u]&&(l[u]="dd");3===l.length&&"dd"===l[1]&&"dd"===l[2]&&(l[2]="YY"),n=l.join("/")}return i&&(this.options.dateFormat=n),n}emit(e){s(this,e.type,e)}export(e,t){throw this.emit({type:"exportError",columns:[],headers:[]}),Error("Not implemented")}getTable(){throw Error("Not implemented")}guessType(e){let t="string";if("string"==typeof e){let i=this.trim(`${e}`),s=this.decimalRegExp,n=this.trim(i,!0);s&&(n=s.test(n)?n.replace(s,"$1.$2"):"");let r=parseFloat(n);+n===r?e=r:t=o(this.parseDate(e))?"Date":"string"}return"number"==typeof e&&(t=e>31536e6?"Date":"number"),t}on(e,t){return i(this,e,t)}parse(e){throw this.emit({type:"parseError",columns:[],headers:[]}),Error("Not implemented")}parseDate(e,t){let i=this.options,s=t||i.dateFormat,n=NaN,r,l,a;if(i.parseDate)n=i.parseDate(e);else{if(s)(l=this.dateFormats[s])||(l=this.dateFormats["YYYY/mm/dd"]),(a=e.match(l.regex))&&(n=l.parser(a));else for(r in this.dateFormats)if(l=this.dateFormats[r],a=e.match(l.regex)){s=r,n=l.parser(a);break}!a&&("object"==typeof(a=Date.parse(e))&&null!==a&&a.getTime?n=a.getTime()-6e4*a.getTimezoneOffset():o(a)&&(n=a-6e4*new Date(a).getTimezoneOffset(),-1===e.indexOf("2001")&&2001===new Date(n).getFullYear()&&(n=NaN)))}return n}trim(e,t){return"string"==typeof e&&(e=e.replace(/^\s+|\s+$/g,""),t&&/^[\d\s]+$/.test(e)&&(e=e.replace(/\s/g,""))),e}}return r.defaultOptions={dateFormat:"",alternativeFormat:"",startColumn:0,endColumn:Number.MAX_VALUE,startRow:0,endRow:Number.MAX_VALUE,firstRowAsNames:!0,switchRowsAndColumns:!1},(r||(r={})).getTableFromColumns=function(t=[],i=[]){let s=new e;for(let e=0,o=Math.max(i.length,t.length);e<o;++e)s.setColumn(i[e]||`${e}`,t[e]);return s},r}),i(t,"Data/DataCursor.js",[],function(){class e{constructor(e={}){this.emittingRegister=[],this.listenerMap={},this.stateMap=e}addListener(e,t,i){let s=this.listenerMap[e]=this.listenerMap[e]||{};return(s[t]=s[t]||[]).push(i),this}buildEmittingTag(e){return("position"===e.cursor.type?[e.table.id,e.cursor.column,e.cursor.row,e.cursor.state,e.cursor.type]:[e.table.id,e.cursor.columns,e.cursor.firstRow,e.cursor.lastRow,e.cursor.state,e.cursor.type]).join("\0")}emitCursor(t,i,s,o){let n=t.id,r=i.state,l=this.listenerMap[n]&&this.listenerMap[n][r];if(l){let r=this.stateMap[n]=this.stateMap[n]??{},a=r[i.state]||[];o&&(a.length||(r[i.state]=a),-1===e.getIndex(i,a)&&a.push(i));let d={cursor:i,cursors:a,table:t};s&&(d.event=s);let h=this.emittingRegister,u=this.buildEmittingTag(d);if(h.indexOf(u)>=0)return this;try{this.emittingRegister.push(u);for(let e=0,t=l.length;e<t;++e)l[e].call(this,d)}finally{let e=this.emittingRegister.indexOf(u);e>=0&&this.emittingRegister.splice(e,1)}}return this}remitCursor(t,i){let s=this.stateMap[t]&&this.stateMap[t][i.state];if(s){let t=e.getIndex(i,s);t>=0&&s.splice(t,1)}return this}removeListener(e,t,i){let s=this.listenerMap[e]&&this.listenerMap[e][t];if(s){let e=s.indexOf(i);e>=0&&s.splice(e,1)}return this}}return e.version="1.0.0",function(e){function t(e,t){if("range"===e.type)return e;let i={type:"range",firstRow:e.row??(t&&t.firstRow)??0,lastRow:e.row??(t&&t.lastRow)??Number.MAX_VALUE,state:e.state};return void 0!==e.column&&(i.columns=[e.column]),i}e.getIndex=function(e,t){if("position"===e.type){for(let i,s=0,o=t.length;s<o;++s)if("position"===(i=t[s]).type&&i.state===e.state&&i.column===e.column&&i.row===e.row)return s}else{let i=JSON.stringify(e.columns);for(let s,o=0,n=t.length;o<n;++o)if("range"===(s=t[o]).type&&s.state===e.state&&s.firstRow===e.firstRow&&s.lastRow===e.lastRow&&JSON.stringify(s.columns)===i)return o}return -1},e.isEqual=function(e,t){return"position"===e.type&&"position"===t.type?e.column===t.column&&e.row===t.row&&e.state===t.state:"range"===e.type&&"range"===t.type&&e.firstRow===t.firstRow&&e.lastRow===t.lastRow&&JSON.stringify(e.columns)===JSON.stringify(t.columns)},e.isInRange=function(e,i){"position"===i.type&&(i=t(i)),"position"===e.type&&(e=t(e,i));let s=e.columns,o=i.columns;return e.firstRow>=i.firstRow&&e.lastRow<=i.lastRow&&(!s||!o||s.every(e=>o.indexOf(e)>=0))},e.toPositions=function(e){if("position"===e.type)return[e];let t=e.columns||[],i=[],s=e.state;for(let o=e.firstRow,n=e.lastRow;o<n;++o){if(!t.length){i.push({type:"position",row:o,state:s});continue}for(let e=0,n=t.length;e<n;++e)i.push({type:"position",column:t[e],row:o,state:s})}return i},e.toRange=t}(e||(e={})),e}),i(t,"DataGrid/Globals.js",[],function(){var t,i;return(i=t||(t={})).classNamePrefix="highcharts-datagrid-",i.classNames={container:i.classNamePrefix+"container",tableElement:i.classNamePrefix+"table",captionElement:i.classNamePrefix+"caption",theadElement:i.classNamePrefix+"thead",tbodyElement:i.classNamePrefix+"tbody",rowElement:i.classNamePrefix+"row",rowEven:i.classNamePrefix+"row-even",rowOdd:i.classNamePrefix+"row-odd",hoveredRow:i.classNamePrefix+"hovered-row",columnElement:i.classNamePrefix+"column",hoveredCell:i.classNamePrefix+"hovered-cell",hoveredColumn:i.classNamePrefix+"hovered-column",editedCell:i.classNamePrefix+"edited-cell",rowsContentNowrap:i.classNamePrefix+"rows-content-nowrap",headerCell:i.classNamePrefix+"header-cell",headerCellContent:i.classNamePrefix+"header-cell-content",headerRow:i.classNamePrefix+"head-row-content",noData:i.classNamePrefix+"no-data",columnFirst:i.classNamePrefix+"column-first",columnSortable:i.classNamePrefix+"column-sortable",columnSortableIcon:i.classNamePrefix+"column-sortable-icon",columnSortedAsc:i.classNamePrefix+"column-sorted-asc",columnSortedDesc:i.classNamePrefix+"column-sorted-desc",resizerHandles:i.classNamePrefix+"column-resizer",resizedColumn:i.classNamePrefix+"column-resized",creditsContainer:i.classNamePrefix+"credits-container",creditsText:i.classNamePrefix+"credits",visuallyHidden:i.classNamePrefix+"visually-hidden"},i.win=e,i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=-1!==i.userAgent.indexOf("Chrome"),i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),t}),i(t,"DataGrid/Utils.js",[],function(){var e;return function(e){function t(e,t,i){let s=document.createElement(e);if(t){let e=Object.keys(t);for(let i=0;i<e.length;i++){let o=e[i],n=t[o];void 0!==n&&("style"===o?Object.assign(s.style,n):s[o]=n)}}return i&&i.appendChild(s),s}e.makeHTMLElement=t,e.makeDiv=function(e,i){return t("div",{className:e,id:i})},e.getTranslateY=function(e){let t=e.style.transform;if(t){let e=t.match(/translateY\(([^)]+)\)/);if(e)return parseFloat(e[1])}return 0},e.isHTML=function(e){return -1!==e.indexOf("<")},e.sanitizeText=function(e){try{return new DOMParser().parseFromString(e,"text/html").body.textContent||""}catch(e){return""}}}(e||(e={})),e}),i(t,"DataGrid/Accessibility/Accessibility.js",[t["DataGrid/Globals.js"],t["DataGrid/Utils.js"]],function(e,t){let{makeHTMLElement:i}=t;return class{constructor(t){this.dataGrid=t,this.element=document.createElement("div"),this.element.classList.add(e.classNames.visuallyHidden),this.dataGrid.container?.prepend(this.element),this.announcerElement=document.createElement("p"),this.announcerElement.setAttribute("aria-atomic","true"),this.announcerElement.setAttribute("aria-hidden","false")}addEditableCellHint(t){let s=this.dataGrid.options?.lang?.accessibility?.cellEditing?.editable;s&&i("span",{className:e.classNames.visuallyHidden,innerText:", "+s},t)}addHeaderCellDescription(e,t){t&&e.setAttribute("aria-description",t)}announce(e,t=!1){this.announcerTimeout&&clearTimeout(this.announcerTimeout),this.announcerElement.remove(),this.announcerElement.setAttribute("aria-live",t?"assertive":"polite"),this.element.appendChild(this.announcerElement),this.announcerElement.textContent=e,this.announcerTimeout=setTimeout(()=>{this.announcerElement.remove()},3e3)}userSortedColumn(e){let t;let{options:i}=this.dataGrid,s=i?.lang?.accessibility?.sorting?.announcements;if(i?.accessibility?.announcements?.sorting){switch(e){case"asc":t=s?.ascending;break;case"desc":t=s?.descending;break;default:t=s?.none}t&&this.announce(t,!0)}}userEditedCell(e){let{options:t}=this.dataGrid,i=t?.lang?.accessibility?.cellEditing?.announcements;if(!t?.accessibility?.announcements?.cellEditing)return;let s=i?.[e];s&&this.announce(s)}setColumnSortState(e,t){e?.setAttribute("aria-sort",t)}setRowIndex(e,t){e.setAttribute("aria-rowindex",t)}}}),i(t,"DataGrid/Credits.js",[t["DataGrid/Globals.js"],t["DataGrid/Utils.js"]],function(e,t){let{makeHTMLElement:i}=t;return class{constructor(t){this.dataGrid=t,this.options=t.options?.credits??{},this.containerElement=i("div",{className:e.classNames.creditsContainer}),this.textElement=i("a",{className:e.classNames.creditsText},this.containerElement),this.textElement.setAttribute("target","_top"),this.render()}setContent(){let{text:e,href:t}=this.options;this.textElement.innerText=e||"",this.textElement.setAttribute("href",t||"")}appendToContainer(){let{position:e}=this.options;if("top"===e){this.dataGrid.contentWrapper?.prepend(this.containerElement);return}this.dataGrid.contentWrapper?.appendChild(this.containerElement)}update(e,t=!0){e&&(this.dataGrid.update({credits:e},!1),this.options=this.dataGrid.options?.credits??{}),t&&this.render()}render(){let e=this.options.enabled??!1;this.containerElement.remove(),e?(this.setContent(),this.appendToContainer()):this.destroy(),this.dataGrid.viewport?.reflow()}getHeight(){return this.containerElement.offsetHeight}destroy(){this.containerElement.remove(),delete this.dataGrid.credits}}}),i(t,"DataGrid/Defaults.js",[t["Core/Utilities.js"]],function(e){var t,i;let{merge:s}=e;return(i=t||(t={})).defaultOptions={accessibility:{enabled:!0,announcements:{cellEditing:!0,sorting:!0}},lang:{accessibility:{cellEditing:{editable:"Editable.",announcements:{started:"Entered cell editing mode.",edited:"Edited cell value.",cancelled:"Editing canceled."}},sorting:{announcements:{ascending:"Sorted ascending.",descending:"Sorted descending.",none:"Not sorted."}}},noData:"No data to display"},rendering:{columns:{distribution:"full"},rows:{bufferSize:10,strictHeights:!1},header:{enabled:!0}},credits:{enabled:!0,text:"Highcharts.com",href:"https://www.highcharts.com?credits",position:"bottom"},columnDefaults:{sorting:{sortable:!0},resizing:!0}},i.setOptions=function(e){s(!0,i.defaultOptions,e)},t}),i(t,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),i(t,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),i(t,"Core/Time.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{win:i}=e,{defined:s,error:o,extend:n,isNumber:r,isObject:l,isString:a,merge:d,objectEach:h,pad:u,splat:c,timeUnits:m,ucfirst:f}=t,p=e.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange,g=e=>void 0===e.main,w=e=>["D","L","M","X","J","V","S"].indexOf(e);return class{constructor(e){this.options={},this.variableTimezone=!1,this.Date=i.Date,this.update(e)}update(e={}){let t=e.timezone??"UTC";this.dTLCache={},this.options=e=d(!0,this.options,e);let{timezoneOffset:o,useUTC:n}=e;this.Date=e.Date||i.Date||Date,s(n)&&(t=n?"UTC":void 0),o&&o%60==0&&(t="Etc/GMT"+(o>0?"+":"")+o/60),this.variableTimezone="UTC"!==t&&t?.indexOf("Etc/GMT")!==0,this.timezone=t,["months","shortMonths","weekdays","shortWeekdays"].forEach(e=>{let t=/months/i.test(e),i=/short/.test(e),s={timeZone:"UTC"};s[t?"month":"weekday"]=i?"short":"long",this[e]=(t?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(e=>this.dateFormat(s,(t?31:1)*24*36e5*e))})}toParts(e){let[t,i,s,o,n,r,l]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},e,"es").split(/(?:, |\/|:)/g);return[o,+s-1,i,n,r,l,Math.floor(Number(e)||0)%1e3,w(t)].map(Number)}dateTimeFormat(e,t,i=this.options.locale){let s=JSON.stringify(e)+i;a(e)&&(e=this.str2dtf(e));let n=this.dTLCache[s];if(!n){e.timeZone??(e.timeZone=this.timezone);try{n=new Intl.DateTimeFormat(i,e)}catch(t){/Invalid time zone/i.test(t.message)?(o(34),e.timeZone="UTC",n=new Intl.DateTimeFormat(i,e)):o(t.message,!1)}}return this.dTLCache[s]=n,n?.format(t)||""}str2dtf(e,t={}){let i={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(i).forEach(s=>{-1!==e.indexOf(s)&&n(t,i[s])}),t}makeTime(e,t,i=1,s=0,o,n,r){let l=this.Date.UTC(e,t,i,s,o||0,n||0,r||0);if("UTC"!==this.timezone){let e=this.getTimezoneOffset(l);if(l+=e,-1!==[2,3,8,9,10,11].indexOf(t)&&(s<5||s>20)){let t=this.getTimezoneOffset(l);e!==t?l+=t-e:e-36e5!==this.getTimezoneOffset(l-36e5)||p||(l-=36e5)}}return l}parse(e){if(!a(e))return e??void 0;let t=(e=e.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(e),i=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(e);t||i||(e+="Z");let s=Date.parse(e);if(r(s))return s+(!t||i?this.getTimezoneOffset(s):0)}getTimezoneOffset(e){if("UTC"!==this.timezone){let[t,i,s,o,n=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},e,"en").split(/(GMT|:)/).map(Number),l=-(36e5*(s+n/60));if(r(l))return l}return 0}dateFormat(t,i,o){let r=e.defaultOptions?.lang;if(!s(i)||isNaN(i))return r?.invalidDate||"";if(a(t=t??"%Y-%m-%d %H:%M:%S")){let e;let s=/%\[([a-zA-Z]+)\]/g;for(;e=s.exec(t);)t=t.replace(e[0],this.dateTimeFormat(e[1],i))}if(a(t)&&-1!==t.indexOf("%")){let s=this,[o,l,d,c,m,f,p,g]=this.toParts(i),w=r?.weekdays||this.weekdays,y=r?.shortWeekdays||this.shortWeekdays,b=r?.months||this.months,C=r?.shortMonths||this.shortMonths;h(n({a:y?y[g]:w[g].substr(0,3),A:w[g],d:u(d),e:u(d,2," "),w:g,b:C[l],B:b[l],m:u(l+1),o:l+1,y:o.toString().substr(2,2),Y:o,H:u(c),k:c,I:u(c%12||12),l:c%12||12,M:u(m),p:c<12?"AM":"PM",P:c<12?"am":"pm",S:u(f),L:u(p,3)},e.dateFormats),function(e,o){if(a(t))for(;-1!==t.indexOf("%"+o);)t=t.replace("%"+o,"function"==typeof e?e.call(s,i):e)})}else if(l(t)){let e=(this.getTimezoneOffset(i)||0)/36e5,s=this.options.timezone||"Etc/GMT"+(e>=0?"+":"")+e,{prefix:o="",suffix:r=""}=t;t=o+this.dateTimeFormat(n({timeZone:s},t),i)+r}return o?f(t):t}resolveDTLFormat(e){return l(e,!0)?l(e,!0)&&g(e)?{main:e}:e:{main:(e=c(e))[0],from:e[1],to:e[2]}}getTimeTicks(e,t,i,o){let r=this,l=[],a={},{count:d=1,unitRange:h}=e,[u,c,f,p,g,y]=r.toParts(t),b=(t||0)%1e3,C;if(o??(o=1),s(t)){if(b=h>=m.second?0:d*Math.floor(b/d),h>=m.second&&(y=h>=m.minute?0:d*Math.floor(y/d)),h>=m.minute&&(g=h>=m.hour?0:d*Math.floor(g/d)),h>=m.hour&&(p=h>=m.day?0:d*Math.floor(p/d)),h>=m.day&&(f=h>=m.month?1:Math.max(1,d*Math.floor(f/d))),h>=m.month&&(c=h>=m.year?0:d*Math.floor(c/d)),h>=m.year&&(u-=u%d),h===m.week){d&&(t=r.makeTime(u,c,f,p,g,y,b));let e=w(this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},t,"es"));f+=-e+o+(e<o?-7:0)}t=r.makeTime(u,c,f,p,g,y,b),r.variableTimezone&&s(i)&&(C=i-t>4*m.month||r.getTimezoneOffset(t)!==r.getTimezoneOffset(i));let e=t,n=1;for(;e<i;)l.push(e),h===m.year?e=r.makeTime(u+n*d,0):h===m.month?e=r.makeTime(u,c+n*d):C&&(h===m.day||h===m.week)?e=r.makeTime(u,c,f+n*d*(h===m.day?1:7)):C&&h===m.hour&&d>1?e=r.makeTime(u,c,f,p+n*d):e+=h*d,n++;l.push(e),h<=m.hour&&l.length<1e4&&l.forEach(e=>{e%18e5==0&&"000000000"===r.dateFormat("%H%M%S%L",e)&&(a[e]="day")})}return l.info=n(e,{higherRanks:a,totalRange:h*d}),l}getDateFormat(e,t,i,s){let o=this.dateFormat("%m-%d %H:%M:%S.%L",t),n="01-01 00:00:00.000",r={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond",a=l;for(l in m){if(e===m.week&&+this.dateFormat("%w",t)===i&&o.substr(6)===n.substr(6)){l="week";break}if(m[l]>e){l=a;break}if(r[l]&&o.substr(r[l])!==n.substr(r[l]))break;"week"!==l&&(a=l)}return this.resolveDTLFormat(s[l]).main}}}),i(t,"Core/Defaults.js",[t["Core/Chart/ChartDefaults.js"],t["Core/Globals.js"],t["Core/Color/Palettes.js"],t["Core/Time.js"],t["Core/Utilities.js"]],function(e,t,i,s,o){let{isTouchDevice:n}=t,{fireEvent:r,merge:l}=o,a={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{locale:void 0,loading:"Loading...",months:void 0,shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:e,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:e=>Math.sqrt(1-Math.pow(e-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"Week from %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:n?25:10,headerFormat:'<span style="font-size: 0.8em">{ucfirst point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};a.chart.styledMode=!1;let d=new s(a.time);return{defaultOptions:a,defaultTime:d,getOptions:function(){return a},setOptions:function(e){return r(t,"setOptions",{options:e}),l(!0,a,e),e.time&&d.update(a.time),e.lang&&"locale"in e.lang&&d.update({locale:e.lang.locale}),a}}}),i(t,"Core/Templating.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,i){let{defaultOptions:s,defaultTime:o}=e,{doc:n}=t,{extend:r,getNestedProperty:l,isArray:a,isNumber:d,isObject:h,pick:u,ucfirst:c}=i,m={add:(e,t)=>e+t,divide:(e,t)=>0!==t?e/t:"",eq:(e,t)=>e==t,each:function(e){let t=arguments[arguments.length-1];return!!a(e)&&e.map((i,s)=>p(t.body,r(h(i)?i:{"@this":i},{"@index":s,"@first":0===s,"@last":s===e.length-1}))).join("")},ge:(e,t)=>e>=t,gt:(e,t)=>e>t,if:e=>!!e,le:(e,t)=>e<=t,lt:(e,t)=>e<t,multiply:(e,t)=>e*t,ne:(e,t)=>e!=t,subtract:(e,t)=>e-t,ucfirst:c,unless:e=>!e},f={};function p(e="",t,i){let n=/\{([\p{L}\d:\.,;\-\/<>\[\]%_@"'’= #\(\)]+)\}/gu,r=/\(([\p{L}\d:\.,;\-\/<>\[\]%_@"'= ]+)\)/gu,a=[],d=/f$/,h=/\.(\d)/,c=i?.options.lang||s.lang,f=i&&i.time||o,w=i&&i.numberFormatter||g,y=(e="")=>{let i;return"true"===e||"false"!==e&&((i=Number(e)).toString()===e?i:/^["'].+["']$/.test(e)?e.slice(1,-1):l(e,t))},b,C,v=0,T;for(;null!==(b=n.exec(e));){let i=b,s=r.exec(b[1]);s&&(b=s,T=!0),C&&C.isBlock||(C={ctx:t,expression:b[1],find:b[0],isBlock:"#"===b[1].charAt(0),start:b.index,startInner:b.index+b[0].length,length:b[0].length});let o=(C.isBlock?i:b)[1].split(" ")[0].replace("#","");m[o]&&(C.isBlock&&o===C.fn&&v++,C.fn||(C.fn=o));let n="else"===b[1];if(C.isBlock&&C.fn&&(b[1]===`/${C.fn}`||n)){if(v)!n&&v--;else{let t=C.startInner,i=e.substr(t,b.index-t);void 0===C.body?(C.body=i,C.startInner=b.index+b[0].length):C.elseBody=i,C.find+=i+b[0],n||(a.push(C),C=void 0)}}else C.isBlock||a.push(C);if(s&&!C?.isBlock)break}return a.forEach(s=>{let o,n;let{body:r,elseBody:l,expression:a,fn:g}=s;if(g){let e=[s],d=[],h=a.length,u=0,c;for(n=0;n<=h;n++){let e=a.charAt(n);c||'"'!==e&&"'"!==e?c===e&&(c=""):c=e,c||" "!==e&&n!==h||(d.push(a.substr(u,n-u)),u=n+1)}for(n=m[g].length;n--;)e.unshift(y(d[n+1]));o=m[g].apply(t,e),s.isBlock&&"boolean"==typeof o&&(o=p(o?r:l,t,i))}else{let e=a.split(":");if(o=y(e.shift()||""),e.length&&"number"==typeof o){let t=e.join(":");if(d.test(t)){let e=parseInt((t.match(h)||["","-1"])[1],10);null!==o&&(o=w(o,e,c.decimalPoint,t.indexOf(",")>-1?c.thousandsSep:""))}else o=f.dateFormat(t,o),T&&(o=`"${o}"`)}}e=e.replace(s.find,u(o,""))}),T?p(e,t,i):e}function g(e,t,i,o){t=+t;let r,l,[a,h]=(e=+e||0).toString().split("e").map(Number),u=this?.options?.lang||s.lang,c=(e.toString().split(".")[1]||"").split("e")[0].length,m=t,p={};i??(i=u.decimalPoint),o??(o=u.thousandsSep),-1===t?t=Math.min(c,20):d(t)?t&&h<0&&((l=t+h)>=0?(a=+a.toExponential(l).split("e")[0],t=l):(a=Math.floor(a),e=t<20?+(a*Math.pow(10,h)).toFixed(t):0,h=0)):t=2,h&&(t??(t=2),e=a),d(t)&&t>=0&&(p.minimumFractionDigits=t,p.maximumFractionDigits=t),""===o&&(p.useGrouping=!1);let g=o||i,w=g?"en":this?.locale||u.locale||n.body.closest("[lang]")?.lang,y=JSON.stringify(p)+w;return r=(f[y]??(f[y]=new Intl.NumberFormat(w,p))).format(e),g&&(r=r.replace(/\,/g,o??",").replace(".",i??".")),(t||0!=+r)&&(!(h<0)||m)||(r="0"),h&&0!=+r&&(r+="e"+(h<0?"":"+")+h),r}return{dateFormat:function(e,t,i){return o.dateFormat(e,t,i)},format:p,helpers:m,numberFormat:g}}),i(t,"DataGrid/Table/Column.js",[t["DataGrid/Globals.js"],t["Core/Utilities.js"],t["DataGrid/Utils.js"],t["Core/Templating.js"]],function(e,t,i,s){let{merge:o}=t,{makeHTMLElement:n}=i;class r{constructor(e,t,i){this.cells=[],this.options=o(e.dataGrid.options?.columnDefaults??{},e.dataGrid.columnOptionsMap?.[t]??{}),this.id=t,this.index=i,this.viewport=e,this.width=this.getInitialWidth(),this.loadData()}loadData(){this.data=this.viewport.dataTable.getColumn(this.id,!0)}registerCell(t){t.htmlElement.setAttribute("data-column-id",this.id),this.options.className&&t.htmlElement.classList.add(...this.options.className.split(/\s+/g)),this.viewport.dataGrid.hoveredColumnId===this.id&&t.htmlElement.classList.add(e.classNames.hoveredColumn),this.cells.push(t)}unregisterCell(e){let t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getWidth(){let e=this.viewport;return"full"===e.columnDistribution?e.getWidthFromRatio(this.width):this.width}setHoveredState(t){this.header?.htmlElement?.classList[t?"add":"remove"](e.classNames.hoveredColumn);for(let i=0,s=this.cells.length;i<s;++i)this.cells[i].htmlElement.classList[t?"add":"remove"](e.classNames.hoveredColumn)}getInitialWidth(){let t;let{viewport:i}=this,s=n("div",{className:e.classNames.columnElement},i.dataGrid.container);return s.setAttribute("data-column-id",this.id),this.options.className&&s.classList.add(...this.options.className.split(/\s+/g)),t="full"===i.columnDistribution?this.getInitialFullDistWidth(s):s.offsetWidth||100,s.remove(),t}getInitialFullDistWidth(e){let t=this.viewport,i=t.dataGrid.enabledColumns?.length??0;if(this.index<i-1)return t.getRatioFromWidth(e.offsetWidth)||1/i;let s=0;for(let e=0,o=i-1;e<o;e++)s+=t.columns[e].width;let o=1-s;return o<0&&console.warn("The sum of the columns' widths exceeds the viewport width. It may cause unexpected behavior in the full distribution mode. Check the CSS styles of the columns. Corrections may be needed."),o}format(e){return s.format(e,this)}}return r.MIN_COLUMN_WIDTH=20,r}),i(t,"DataGrid/Table/Row.js",[t["DataGrid/Utils.js"]],function(e){let{makeHTMLElement:t}=e;return class{constructor(e){this.cells=[],this.viewport=e,this.htmlElement=t("tr",{})}render(){let e=this.viewport.columns;for(let t=0,i=e.length;t<i;t++)this.createCell(e[t]).render();this.reflow()}reflow(){for(let e=0,t=this.cells.length;e<t;++e)this.cells[e].reflow();let e=this.viewport;e.rowsWidth&&(this.htmlElement.style.width=e.rowsWidth+"px")}destroy(){if(this.destroyed=!0,this.htmlElement){for(let e=0,t=this.cells.length;e<t;++e)this.cells[e].destroy();this.htmlElement.remove()}}getCell(e){return this.cells.find(t=>t.column.id===e)}registerCell(e){this.cells.push(e)}unregisterCell(e){if(this.destroyed)return;let t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}}}),i(t,"DataGrid/Table/Cell.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Templating.js"]],function(e,t){return class{constructor(e,t){this.cellEvents=[],this.column=e,this.row=t,this.row.registerCell(this),this.htmlElement=this.init(),this.htmlElement.setAttribute("tabindex","-1"),this.initEvents()}init(){return document.createElement("td",{})}initEvents(){this.cellEvents.push(["blur",()=>this.onBlur()]),this.cellEvents.push(["focus",()=>this.onFocus()]),this.cellEvents.push(["click",e=>{this.onClick(e)}]),this.cellEvents.push(["keydown",e=>{this.onKeyDown(e)}]),this.cellEvents.forEach(e=>{this.htmlElement.addEventListener(e[0],e[1])})}onFocus(){let e=this.row.viewport,t=e.rowsVirtualizer.focusAnchorCell?.htmlElement;t?.setAttribute("tabindex","-1")}onBlur(){let e=this.row.viewport,t=e.rowsVirtualizer.focusAnchorCell?.htmlElement;t?.setAttribute("tabindex","0"),delete e.focusCursor}onKeyDown(e){let{row:t,column:i}=this,s=t.viewport,o={ArrowDown:[1,0],ArrowUp:[-1,0],ArrowLeft:[0,-1],ArrowRight:[0,1]}[e.key];if(o){e.preventDefault(),e.stopPropagation();let n=(void 0===t.index?-1:t.index-s.rows[0].index)+o[0];if(n<0&&s.header){s.columns[i.index+o[1]]?.header?.htmlElement.focus();return}let r=s.rows[n];r&&r.cells[i.index+o[1]]?.htmlElement.focus()}}render(){this.row.htmlElement.appendChild(this.htmlElement)}reflow(){let e=this.column,t=this.htmlElement.style;t.width=t.maxWidth=e.getWidth()+"px"}format(e){return t.format(e,this)}setCustomClassName(e){let t=this.htmlElement;if(this.customClassName&&t.classList.remove(...this.customClassName.split(/\s+/g)),!e){delete this.customClassName;return}let i=this.format(e);if(!i){delete this.customClassName;return}t.classList.add(...i.split(/\s+/g)),this.customClassName=i}renderHTMLCellContent(t,i){new e(t).addToDOM(i)}destroy(){this.cellEvents.forEach(e=>{this.htmlElement.removeEventListener(e[0],e[1])}),this.column.unregisterCell(this),this.row.unregisterCell(this),this.htmlElement.remove()}}}),i(t,"DataGrid/Table/Actions/ColumnSorting.js",[t["DataGrid/Globals.js"],t["DataGrid/Utils.js"]],function(e,t){let{makeHTMLElement:i}=t;return class{constructor(t,s){this.toggle=()=>{let e=this.column.viewport.dataGrid.querying.sorting,t=(e.currentSorting?.columnId===this.column.id?e.currentSorting.order:null)||"none";this.setOrder({none:"asc",asc:"desc",desc:null}[t])},this.column=t,this.headerCellElement=s,this.addHeaderElementAttributes(),t.options.sorting?.sortable&&(i("span",{className:e.classNames.columnSortableIcon,innerText:"▲"},s).setAttribute("aria-hidden",!0),s.classList.add(e.classNames.columnSortable))}addHeaderElementAttributes(){let t=this.column,i=t.viewport.dataGrid.accessibility,s=t.options.sorting,{currentSorting:o}=t.viewport.dataGrid.querying.sorting,n=this.headerCellElement;if(o?.columnId!==t.id||!o?.order){n.classList.remove(e.classNames.columnSortedAsc),n.classList.remove(e.classNames.columnSortedDesc),s?.sortable&&i?.setColumnSortState(n,"none");return}switch(o?.order){case"asc":n.classList.add(e.classNames.columnSortedAsc),n.classList.remove(e.classNames.columnSortedDesc),i?.setColumnSortState(n,"ascending");break;case"desc":n.classList.remove(e.classNames.columnSortedAsc),n.classList.add(e.classNames.columnSortedDesc),i?.setColumnSortState(n,"descending")}}async setOrder(e){let t=this.column.viewport,i=t.dataGrid.querying,s=i.sorting,o=t.dataGrid.accessibility;for(let o of(s.setSorting(e,this.column.id),await i.proceed(),t.loadPresentationData(),t.columns))o.sorting?.addHeaderElementAttributes();o?.userSortedColumn(e),t.dataGrid.options?.events?.column?.afterSorting?.call(this.column)}}}),i(t,"DataGrid/Table/Header/HeaderCell.js",[t["DataGrid/Table/Cell.js"],t["DataGrid/Utils.js"],t["DataGrid/Globals.js"],t["DataGrid/Table/Actions/ColumnSorting.js"],t["Core/Utilities.js"]],function(e,t,i,s,o){let{makeHTMLElement:n,isHTML:r}=t,{merge:l}=o;return class extends e{constructor(e,t){super(e,t),this.options={},this.value="",e.header=this,this.isMain=!!this.row.viewport.getColumn(this.column.id)}init(){let e=document.createElement("th",{});return e.classList.add(i.classNames.headerCell),e}render(){let e=this.column,t=l(e.options,this.options),s=t.header||{};s.formatter?this.value=s.formatter.call(this).toString():s.format?this.value=e.format(s.format):this.value=e.id,this.row.htmlElement.appendChild(this.htmlElement),this.headerContent=n(t.sorting?.sortable&&e.data?"button":"span",{className:i.classNames.headerCellContent},this.htmlElement),r(this.value)?this.renderHTMLCellContent(this.value,this.headerContent):this.headerContent.innerText=this.value,this.htmlElement.setAttribute("scope","col"),this.options.className&&this.htmlElement.classList.add(...this.options.className.split(/\s+/g)),this.isMain&&(this.htmlElement.setAttribute("data-column-id",e.id),e.options.className&&this.htmlElement.classList.add(...e.options.className.split(/\s+/g)),this.column.viewport.columnsResizer?.renderColumnDragHandles(this.column,this),this.initColumnSorting()),this.setCustomClassName(t.header?.className)}reflow(){let e=this.htmlElement,t=this.column.viewport;if(!e)return;let i=0;if(this.columns)for(let e of this.columns)i+=t.getColumn(e.columnId||"")?.getWidth()||0;else i=this.column.getWidth();e.style.width=e.style.maxWidth=i+"px"}onKeyDown(e){if(e.target===this.htmlElement){if("Enter"===e.key){this.column.options.sorting?.sortable&&this.column.sorting?.toggle();return}super.onKeyDown(e)}}onClick(e){let t=this.column;this.isMain&&(e.target===this.htmlElement||e.target===t.header?.headerContent)&&(t.options.sorting?.sortable&&t.sorting?.toggle(),t.viewport.dataGrid.options?.events?.header?.click?.call(t))}initColumnSorting(){let{column:e}=this;e.sorting=new s(e,this.htmlElement)}}}),i(t,"DataGrid/Table/Header/HeaderRow.js",[t["DataGrid/Table/Row.js"],t["DataGrid/Globals.js"],t["DataGrid/Table/Header/HeaderCell.js"],t["DataGrid/Table/Column.js"],t["DataGrid/Utils.js"]],function(e,t,i,s,o){let{sanitizeText:n}=o;return class extends e{constructor(e,t){super(e),this.level=t,this.setRowAttributes()}createCell(e){return new i(e,this)}renderMultipleLevel(e){let i=this.viewport.dataGrid.options?.header,o=this.viewport,r=o.dataGrid.enabledColumns;if(o.theadElement?.appendChild(this.htmlElement),this.htmlElement.classList.add(t.classNames.headerRow),!i){super.render();return}let l=this.getColumnsAtLevel(i,e);for(let i=0,a=l.length;i<a;i++){let a=l[i],d="string"!=typeof a&&a.columns?o.dataGrid.getColumnIds(a.columns).length:0,h="string"==typeof a?a:a.columnId,u=o.getColumn(h||""),c="string"!=typeof a?a.format:void 0,m="string"!=typeof a?a.className:void 0;if(h&&r&&r?.indexOf(h)<0||!u&&0===d)continue;let f=this.createCell(o.getColumn(h||"")||new s(o,n(c||"").trim()||"",i));"string"!=typeof a&&o.dataGrid.accessibility?.addHeaderCellDescription(f.htmlElement,a.accessibility?.description),c&&(f.options.header||(f.options.header={}),f.options.header.format=c),m&&(f.options.className=m),u?.index===0&&0===i&&f.htmlElement.classList.add(t.classNames.columnFirst),f.render(),f.columns="string"!=typeof a?a.columns:void 0,h?f.htmlElement.setAttribute("rowSpan",(this.viewport.header?.levels||1)-e):d>1&&f.htmlElement.setAttribute("colSpan",d)}}reflow(){for(let e=0,t=this.cells.length;e<t;e++)this.cells[e].reflow()}getColumnsAtLevel(e,t,i=0){let s=[];for(let o of e)i===t&&s.push(o),"string"!=typeof o&&o.columns&&(s=s.concat(this.getColumnsAtLevel(o.columns,t,i+1)));return s}setRowAttributes(){let e=this.viewport.dataGrid.accessibility;e?.setRowIndex(this.htmlElement,this.level)}}}),i(t,"DataGrid/Table/Header/TableHeader.js",[t["DataGrid/Table/Header/HeaderRow.js"],t["Core/Utilities.js"]],function(e,t){let{getStyle:i}=t;return class{constructor(e){this.columns=[],this.rows=[],this.levels=1,this.viewport=e,this.columns=e.columns,e.dataGrid.options?.header&&(this.levels=this.getRowLevels(e.dataGrid.options?.header))}render(){let t=this.viewport;if(t.dataGrid.enabledColumns)for(let i=0,s=this.levels;i<s;i++){let s=new e(t,i+1);s.renderMultipleLevel(i),this.rows.push(s)}}reflow(){let e=this.viewport;if(!e.theadElement)return;let{clientWidth:t,offsetWidth:s}=e.tbodyElement,o=e.header,n=this.rows,r=o?.viewport.dataGrid.tableElement,l=o?.viewport.theadElement,a=s-t-(l&&i(l,"border-right-width",!0)||0)-(r&&i(r,"border-right-width",!0)||0);for(let e of n)e.reflow();if(e.rowsWidth&&(e.theadElement.style.width=Math.max(e.rowsWidth,t)+a+"px"),o&&a>0){let e=o.rows[o.rows.length-1].cells,t=e[e.length-1].htmlElement;t.style.width=t.style.maxWidth=t.offsetWidth+a+"px"}}getRowLevels(e){let t=0;for(let i of e)if("string"!=typeof i&&i.columns){let e=this.getRowLevels(i.columns);e>t&&(t=e)}return t+1}scrollHorizontally(e){let t=this.viewport.theadElement;t&&(t.style.transform=`translateX(${-e}px)`)}}}),i(t,"DataGrid/Table/Content/TableCell.js",[t["DataGrid/Table/Cell.js"],t["Core/Utilities.js"],t["DataGrid/Utils.js"]],function(e,t,i){let{defined:s,fireEvent:o}=t,{isHTML:n}=i;return class extends e{constructor(e,t){super(e,t),this.row=t,this.column.registerCell(this)}render(){super.render(),this.setValue(this.column.data?.[this.row.index],!1)}initEvents(){this.cellEvents.push(["dblclick",e=>{this.onDblClick(e)}]),this.cellEvents.push(["mouseout",()=>this.onMouseOut()]),this.cellEvents.push(["mouseover",()=>this.onMouseOver()]),this.cellEvents.push(["mousedown",e=>{this.onMouseDown(e)}]),super.initEvents()}onFocus(){super.onFocus(),this.row.viewport.focusCursor=[this.row.index,this.column.index]}onMouseDown(e){let{dataGrid:t}=this.row.viewport;e.target===this.htmlElement&&this.htmlElement.focus(),o(t,"cellMouseDown",{target:this})}onMouseOver(){let{dataGrid:e}=this.row.viewport;e.hoverRow(this.row.index),e.hoverColumn(this.column.id),e.options?.events?.cell?.mouseOver?.call(this),o(e,"cellMouseOver",{target:this})}onMouseOut(){let{dataGrid:e}=this.row.viewport;e.hoverRow(),e.hoverColumn(),e.options?.events?.cell?.mouseOut?.call(this),o(e,"cellMouseOut",{target:this})}onDblClick(e){let t=this.row.viewport,{dataGrid:i}=t;this.column.options.cells?.editable&&(e.preventDefault(),t.cellEditing.startEditing(this)),i.options?.events?.cell?.dblClick?.call(this),o(i,"cellDblClick",{target:this})}onClick(){let{dataGrid:e}=this.row.viewport;e.options?.events?.cell?.click?.call(this),o(e,"cellClick",{target:this})}onKeyDown(e){if(e.target===this.htmlElement){if("Enter"===e.key){this.column.options.cells?.editable&&this.row.viewport.cellEditing.startEditing(this);return}super.onKeyDown(e)}}async setValue(e,t){let i;this.value=e;let s=this.column.viewport,o=this.htmlElement,r=this.formatCell();if(n(r)?this.renderHTMLCellContent(r,o):o.innerText=r,this.htmlElement.setAttribute("data-value",this.value+""),this.setCustomClassName(this.column.options.cells?.className),this.column.options.cells?.editable&&s.dataGrid.accessibility?.addEditableCellHint(this.htmlElement),s.dataGrid.options?.events?.cell?.afterSetValue?.call(this),!t)return;let{dataTable:l}=s.dataGrid,a=this.row.id&&l?.getLocalRowIndex(this.row.id);if(l&&void 0!==a&&(l.setCell(this.column.id,a,this.value),!s.dataGrid.querying.willNotModify()&&(s.focusCursor&&(i=s.dataTable.getOriginalRowIndex(s.focusCursor[0])),await s.dataGrid.querying.proceed(!0),s.loadPresentationData(),void 0!==i&&s.focusCursor))){let e=s.dataTable.getLocalRowIndex(i);void 0!==e&&s.rows[e-s.rows[0].index]?.cells[s.focusCursor[1]].htmlElement.focus()}}formatCell(){let{format:e,formatter:t}=this.column.options.cells||{},i=this.value;return s(i)||(i=""),t?t.call(this).toString():e?this.format(e):i+""}destroy(){super.destroy()}}}),i(t,"DataGrid/Table/Content/TableRow.js",[t["DataGrid/Table/Row.js"],t["DataGrid/Table/Content/TableCell.js"],t["DataGrid/Globals.js"]],function(e,t,i){return class extends e{constructor(e,t){super(e),this.index=t,this.id=e.dataTable.getOriginalRowIndex(t),this.setRowAttributes()}createCell(e){return new t(e,this)}setHoveredState(e){this.htmlElement.classList[e?"add":"remove"](i.classNames.hoveredRow),e&&(this.viewport.dataGrid.hoveredRowIndex=this.index)}setRowAttributes(){let e=this.index,t=this.htmlElement,s=this.viewport.dataGrid.accessibility;t.style.transform=`translateY(${this.getDefaultTopOffset()}px)`,t.classList.add(i.classNames.rowElement),t.setAttribute("data-row-index",e),void 0!==this.id&&t.setAttribute("data-row-id",this.id),s?.setRowIndex(t,e+(this.viewport.header?.levels??1)+1),t.classList.add(i.classNames[e%2?"rowEven":"rowOdd"]),this.viewport.dataGrid.hoveredRowIndex===e&&t.classList.add(i.classNames.hoveredRow)}getDefaultTopOffset(){return this.index*this.viewport.rowsVirtualizer.defaultRowHeight}}}),i(t,"DataGrid/Table/Actions/RowsVirtualizer.js",[t["DataGrid/Utils.js"],t["DataGrid/Globals.js"],t["DataGrid/Table/Content/TableRow.js"]],function(e,t,i){let{makeHTMLElement:s,getTranslateY:o}=e;return class{constructor(e){this.rowCursor=0,this.preventScroll=!1;let i=e.dataGrid.options?.rendering?.rows;this.viewport=e,this.strictRowHeights=i?.strictHeights,this.buffer=Math.max(i?.bufferSize,0),this.defaultRowHeight=this.getDefaultRowHeight(),this.strictRowHeights&&e.tbodyElement.classList.add(t.classNames.rowsContentNowrap)}initialRender(){this.viewport.reflow(),this.renderRows(this.rowCursor),this.adjustRowHeights()}rerender(){let e;let t=this.viewport.rows,i=this.viewport.tbodyElement;if(t.length){e=i.scrollTop;for(let e=0,i=t.length;e<i;++e)t[e].destroy();t.length=0}this.renderRows(this.rowCursor),void 0!==e&&(i.scrollTop=e),this.scroll();for(let e=0,i=t.length;e<i;++e)t[e].reflow()}scroll(){let e=this.viewport.tbodyElement,{defaultRowHeight:t}=this,i=e.scrollTop;if(this.preventScroll){i<=e.scrollTop&&(this.preventScroll=!1),this.adjustBottomRowHeights();return}let s=Math.floor(e.scrollTop/t);this.rowCursor!==s&&this.renderRows(s),this.rowCursor=s,this.adjustRowHeights(),this.strictRowHeights||!(i>e.scrollTop)||this.preventScroll||(e.scrollTop=i,this.preventScroll=!0)}adjustBottomRowHeights(){let e=this.viewport.rows,t=e.length,i=e[t-1],s=o(i.htmlElement),n=s+i.htmlElement.offsetHeight,r=i.cells[0].htmlElement.offsetHeight;s=n-r,i.htmlElement.style.height=r+"px",i.htmlElement.style.transform=`translateY(${s}px)`;for(let e=0,t=i.cells.length;e<t;++e)i.cells[e].htmlElement.style.transform="";for(let i=t-2;i>=0;i--){let t=e[i];s-=r=t.cells[0].htmlElement.offsetHeight,t.htmlElement.style.height=r+"px",t.htmlElement.style.transform=`translateY(${s}px)`;for(let e=0,i=t.cells.length;e<i;++e)t.cells[e].htmlElement.style.transform=""}}renderRows(e){let{viewport:t,buffer:s}=this,o=Math.ceil(t.tbodyElement.offsetHeight/this.defaultRowHeight),n=t.rows;if(!n.length){let e=new i(t,t.dataTable.getRowCount()-1);e.render(),n.push(e),t.tbodyElement.appendChild(e.htmlElement)}let r=Math.max(0,Math.min(e-s,t.dataTable.getRowCount()-o)),l=Math.min(e+o+s,n[n.length-1].index-1),a=n.pop();for(let e=0,t=n.length;e<t;++e)n[e].destroy();n.length=0;for(let e=r;e<=l;++e){let s=new i(t,e);s.render(),t.tbodyElement.insertBefore(s.htmlElement,t.tbodyElement.lastChild),n.push(s)}if(a&&n.push(a),t.focusCursor){let[e,i]=t.focusCursor,s=n.find(t=>t.index===e);s&&s.cells[i]?.htmlElement.focus({preventScroll:!0})}let d=n[e-n[0].index];this.focusAnchorCell=d?.cells[0],this.focusAnchorCell?.htmlElement.setAttribute("tabindex","0")}adjustRowHeights(){if(this.strictRowHeights)return;let{rowCursor:e,defaultRowHeight:t}=this,{rows:i,tbodyElement:s}=this.viewport,n=i.length,r=i[0].getDefaultTopOffset();for(let o=0;o<n;++o){let n=i[o];if(n.htmlElement.style.height="",n.cells[0].htmlElement.style.transform)for(let e=0,t=n.cells.length;e<t;++e)n.cells[e].htmlElement.style.transform="";if(n.index<e){n.htmlElement.style.height=t+"px";continue}let r=n.cells[0].htmlElement.offsetHeight;if(n.htmlElement.style.height=r+"px",!(n.index>e)&&n.htmlElement.offsetHeight>t){let i=Math.floor(r-(r-t)*(s.scrollTop/t-e));n.htmlElement.style.height=i+"px";for(let e=0,t=n.cells.length;e<t;++e)n.cells[e].htmlElement.style.transform=`translateY(${i-r}px)`}}for(let e=1,t=n-1;e<t;++e)r+=i[e-1].htmlElement.offsetHeight,i[e].htmlElement.style.transform=`translateY(${r}px)`;let l=i[n-1],a=i[n-2];a&&a.index===l.index-1&&(l.htmlElement.style.transform=`translateY(${a.htmlElement.offsetHeight+o(a.htmlElement)}px)`)}reflowRows(){let e=this.viewport.rows;if(!(e.length<1)){for(let t=0,i=e.length;t<i;++t)e[t].reflow();this.adjustRowHeights()}}getDefaultRowHeight(){let e=s("tr",{className:t.classNames.rowElement},this.viewport.tbodyElement),i=e.offsetHeight;return e.remove(),i}}}),i(t,"DataGrid/Table/Actions/ColumnsResizer.js",[t["DataGrid/Table/Column.js"],t["DataGrid/Globals.js"],t["DataGrid/Utils.js"]],function(e,t,i){let{makeHTMLElement:s}=i;return class{constructor(e){this.handles=[],this.onDocumentMouseMove=e=>{if(!this.draggedResizeHandle||!this.draggedColumn)return;let t=e.pageX-(this.dragStartX||0);"full"===this.viewport.columnDistribution?this.fullDistributionResize(t):this.fixedDistributionResize(t),this.viewport.reflow(),this.viewport.rowsVirtualizer.adjustRowHeights(),this.viewport.dataGrid.options?.events?.column?.afterResize?.call(this.draggedColumn)},this.onDocumentMouseUp=()=>{this.draggedColumn?.header?.htmlElement?.classList.remove(t.classNames.resizedColumn),this.dragStartX=void 0,this.draggedColumn=void 0,this.draggedResizeHandle=void 0,this.columnStartWidth=void 0,this.nextColumnStartWidth=void 0},this.viewport=e,document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("mouseup",this.onDocumentMouseUp)}fullDistributionResize(t){let i=this.viewport,s=this.draggedColumn;if(!s)return;let o=i.columns[s.index+1];if(!o)return;let n=this.columnStartWidth??0,r=this.nextColumnStartWidth??0,l=e.MIN_COLUMN_WIDTH,a=n+t,d=r-t;a<l&&(a=l,d=n+r-l),d<l&&(d=l,a=n+r-l),s.width=i.getRatioFromWidth(a),o.width=i.getRatioFromWidth(d)}renderColumnDragHandles(e,i){let o=e.viewport;if(o.columnsResizer&&("full"!==o.columnDistribution||o.dataGrid.enabledColumns&&e.index<o.dataGrid.enabledColumns.length-1)){let n=s("div",{className:t.classNames.resizerHandles},i.htmlElement);n.setAttribute("aria-hidden",!0),o.columnsResizer?.addHandleListeners(n,e)}}fixedDistributionResize(t){let i=this.draggedColumn;if(!i)return;let s=this.columnStartWidth??0,o=e.MIN_COLUMN_WIDTH,n=s+t;n<o&&(n=o),i.width=n}addHandleListeners(e,i){let s=s=>{this.dragStartX=s.pageX,this.draggedColumn=i,this.draggedResizeHandle=e,this.columnStartWidth=i.getWidth(),this.nextColumnStartWidth=this.viewport.columns[i.index+1]?.getWidth(),i.header?.htmlElement.classList.add(t.classNames.resizedColumn)};this.handles.push([e,s]),e.addEventListener("mousedown",s)}removeEventListeners(){document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("mouseup",this.onDocumentMouseUp);for(let e=0,t=this.handles.length;e<t;e++){let[t,i]=this.handles[e];t.removeEventListener("mousedown",i)}}}}),i(t,"DataGrid/Table/Actions/CellEditing.js",[t["DataGrid/Globals.js"],t["DataGrid/Utils.js"]],function(e,t){let{makeHTMLElement:i}=t;return class{constructor(){this.onInputBlur=()=>{this.stopEditing()},this.onInputKeyDown=e=>{let{keyCode:t}=e;(13===t||27===t)&&this.stopEditing(13===t)}}startEditing(t){if(this.editedCell===t)return;this.editedCell&&this.stopEditing(),this.editedCell=t;let i=t.htmlElement;i.innerHTML="",i.classList.add(e.classNames.editedCell),t.row.viewport.dataGrid.accessibility?.userEditedCell("started"),this.renderInput()}stopEditing(t=!0){let i=this.editedCell,s=this.inputElement;if(!i||!s)return;let o=i.column.viewport.dataGrid,n=s.value;this.destroyInput(),i.htmlElement.classList.remove(e.classNames.editedCell),i.htmlElement.focus(),isNaN(+n)||(n=+n),i.setValue(t?n:i.value,t&&i.value!==n),o.options?.events?.cell?.afterEdit?.call(i),i.row.viewport.dataGrid.accessibility?.userEditedCell(t?"edited":"cancelled"),delete this.editedCell}renderInput(){let e=this.editedCell;if(!e)return;let t=e.htmlElement,s=this.inputElement=i("input",{},t);s.value=""+e.value,s.focus(),s.addEventListener("blur",this.onInputBlur),s.addEventListener("keydown",this.onInputKeyDown)}destroyInput(){let e=this.inputElement;e&&(e.removeEventListener("keydown",this.onInputKeyDown),e.removeEventListener("blur",this.onInputBlur),e.remove(),delete this.inputElement)}}}),i(t,"DataGrid/Table/Table.js",[t["DataGrid/Utils.js"],t["DataGrid/Table/Column.js"],t["DataGrid/Table/Header/TableHeader.js"],t["DataGrid/Table/Actions/RowsVirtualizer.js"],t["DataGrid/Table/Actions/ColumnsResizer.js"],t["DataGrid/Globals.js"],t["Core/Utilities.js"],t["DataGrid/Table/Actions/CellEditing.js"]],function(e,t,i,s,o,n,r,l){let{makeHTMLElement:a}=e,{getStyle:d}=r;return class{constructor(e,t){this.columns=[],this.rows=[],this.onTBodyFocus=e=>{e.preventDefault(),this.rows[this.rowsVirtualizer.rowCursor-this.rows[0].index]?.cells[0]?.htmlElement.focus()},this.onResize=()=>{this.reflow()},this.onScroll=()=>{this.rowsVirtualizer.scroll(),this.header?.scrollHorizontally(this.tbodyElement.scrollLeft)},this.dataGrid=e,this.dataTable=this.dataGrid.presentationTable;let i=e.options,n=i?.rendering?.table?.className;this.columnDistribution=i?.rendering?.columns?.distribution,this.renderCaption(),i?.rendering?.header?.enabled&&(this.theadElement=a("thead",{},t)),this.tbodyElement=a("tbody",{},t),this.rowsVirtualizer=new s(this),i?.columnDefaults?.resizing&&(this.columnsResizer=new o(this)),this.cellEditing=new l,n&&t.classList.add(...n.split(/\s+/g)),this.init(),this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(t),this.tbodyElement.addEventListener("scroll",this.onScroll),this.tbodyElement.addEventListener("focus",this.onTBodyFocus)}init(){this.loadColumns(),this.dataGrid.options?.rendering?.header?.enabled&&(this.header=new i(this),this.header.render()),this.rowsVirtualizer.initialRender()}loadColumns(){let e;let{enabledColumns:i}=this.dataGrid;if(i)for(let s=0,o=i.length;s<o;++s)e=i[s],this.columns.push(new t(this,e,s))}loadPresentationData(){for(let e of(this.dataTable=this.dataGrid.presentationTable,this.columns))e.loadData();this.rowsVirtualizer.rerender()}reflow(){let e=this.dataGrid.tableElement,t=e?(d(e,"border-top-width",!0)||0)+(d(e,"border-bottom-width",!0)||0):0;if(this.tbodyElement.style.height=this.tbodyElement.style.minHeight=`${(this.dataGrid.container?.clientHeight||0)-(this.theadElement?.offsetHeight||0)-(this.captionElement?.offsetHeight||0)-(this.dataGrid.credits?.getHeight()||0)-t}px`,"fixed"===this.columnDistribution){let e=0;for(let t=0,i=this.columns.length;t<i;++t)e+=this.columns[t].width;this.rowsWidth=e}this.header?.reflow(),this.rowsVirtualizer.reflowRows()}scrollToRow(e){this.tbodyElement.scrollTop=e*this.rowsVirtualizer.defaultRowHeight}getRatioFromWidth(e){return e/this.tbodyElement.clientWidth}getWidthFromRatio(e){return this.tbodyElement.clientWidth*e}renderCaption(){let e=this.dataGrid.options?.caption;e?.text&&(this.captionElement=a("caption",{innerText:e.text,className:n.classNames.captionElement},this.dataGrid.tableElement),e.className&&this.captionElement.classList.add(...e.className.split(/\s+/g)))}destroy(){this.tbodyElement.removeEventListener("focus",this.onTBodyFocus),this.tbodyElement.removeEventListener("scroll",this.onScroll),this.resizeObserver.disconnect(),this.columnsResizer?.removeEventListeners();for(let e=0,t=this.rows.length;e<t;++e)this.rows[e].destroy()}getStateMeta(){return{scrollTop:this.tbodyElement.scrollTop,scrollLeft:this.tbodyElement.scrollLeft,columnDistribution:this.columnDistribution,columnWidths:this.columns.map(e=>e.width),focusCursor:this.focusCursor}}applyStateMeta(e){if(this.tbodyElement.scrollTop=e.scrollTop,this.tbodyElement.scrollLeft=e.scrollLeft,this.columnDistribution===e.columnDistribution&&this.columns.length===e.columnWidths.length){let t=e.columnWidths;for(let e=0,i=t.length;e<i;++e)this.columns[e].width=t[e];if(this.reflow(),e.focusCursor){let[t,i]=e.focusCursor,s=this.rows[t-this.rows[0].index];s?.cells[i]?.htmlElement.focus()}}}getColumn(e){let t=this.dataGrid.enabledColumns;if(!t)return;let i=t.indexOf(e);if(!(i<0))return this.columns[i]}getRow(e){return this.rows.find(t=>t.id===e)}}}),i(t,"Data/Modifiers/ChainModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(t,...o){super(),this.chain=o,this.options=i(s.defaultOptions,t);let n=this.options.chain||[];for(let t=0,i=n.length,s,r;t<i;++t)(s=n[t]).type&&(r=e.types[s.type])&&o.push(new r(s))}add(e,t){this.emit({type:"addModifier",detail:t,modifier:e}),this.chain.push(e),this.emit({type:"addModifier",detail:t,modifier:e})}clear(e){this.emit({type:"clearChain",detail:e}),this.chain.length=0,this.emit({type:"afterClearChain",detail:e})}async modify(e,t){let i=this.options.reverse?this.chain.slice().reverse():this.chain.slice();e.modified===e&&(e.modified=e.clone(!1,t));let s=e;for(let o=0,n=i.length;o<n;++o){try{await i[o].modify(s,t)}catch(i){throw this.emit({type:"error",detail:t,table:e}),i}s=s.modified}return e.modified=s,e}modifyCell(e,t,i,s,o){let n=this.options.reverse?this.chain.reverse():this.chain;if(n.length){let r=e.clone();for(let e=0,l=n.length;e<l;++e)n[e].modifyCell(r,t,i,s,o),r=r.modified;e.modified=r}return e}modifyColumns(e,t,i,s){let o=this.options.reverse?this.chain.reverse():this.chain.slice();if(o.length){let n=e.clone();for(let e=0,r=o.length;e<r;++e)o[e].modifyColumns(n,t,i,s),n=n.modified;e.modified=n}return e}modifyRows(e,t,i,s){let o=this.options.reverse?this.chain.reverse():this.chain.slice();if(o.length){let n=e.clone();for(let e=0,r=o.length;e<r;++e)o[e].modifyRows(n,t,i,s),n=n.modified;e.modified=n}return e}modifyTable(e,t){this.emit({type:"modify",detail:t,table:e});let i=this.options.reverse?this.chain.reverse():this.chain.slice(),s=e.modified;for(let e=0,o=i.length;e<o;++e)s=i[e].modifyTable(s,t).modified;return e.modified=s,this.emit({type:"afterModify",detail:t,table:e}),e}remove(e,t){let i=this.chain;this.emit({type:"removeModifier",detail:t,modifier:e}),i.splice(i.indexOf(e),1),this.emit({type:"afterRemoveModifier",detail:t,modifier:e})}}return s.defaultOptions={type:"Chain"},e.registerType("Chain",s),s}),i(t,"Data/Modifiers/SortModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Data/DataTable.js"],t["Core/Utilities.js"]],function(e,t,i){let{merge:s}=i;class o extends e{static ascending(e,t){return(e||0)<(t||0)?-1:(e||0)>(t||0)?1:0}static descending(e,t){return(t||0)<(e||0)?-1:(t||0)>(e||0)?1:0}constructor(e){super(),this.options=s(o.defaultOptions,e)}getRowReferences(e){let t=e.getRows(),i=[];for(let e=0,s=t.length;e<s;++e)i.push({index:e,row:t[e]});return i}modifyCell(e,i,s,o,n){let{orderByColumn:r,orderInColumn:l}=this.options;return i===r&&(l?(e.modified.setCell(i,s,o),e.modified.setColumn(l,this.modifyTable(new t({columns:e.getColumns([r,l])})).modified.getColumn(l))):this.modifyTable(e,n)),e}modifyColumns(e,i,s,o){let{orderByColumn:n,orderInColumn:r}=this.options,l=Object.keys(i);return l.indexOf(n)>-1&&(r&&i[l[0]].length?(e.modified.setColumns(i,s),e.modified.setColumn(r,this.modifyTable(new t({columns:e.getColumns([n,r])})).modified.getColumn(r))):this.modifyTable(e,o)),e}modifyRows(e,i,s,o){let{orderByColumn:n,orderInColumn:r}=this.options;return r&&i.length?(e.modified.setRows(i,s),e.modified.setColumn(r,this.modifyTable(new t({columns:e.getColumns([n,r])})).modified.getColumn(r))):this.modifyTable(e,o),e}modifyTable(e,t){this.emit({type:"modify",detail:t,table:e});let i=e.getColumnNames(),s=e.getRowCount(),n=this.getRowReferences(e),{direction:r,orderByColumn:l,orderInColumn:a}=this.options,d="asc"===r?o.ascending:o.descending,h=i.indexOf(l),u=e.modified;if(-1!==h&&n.sort((e,t)=>d(e.row[h],t.row[h])),a){let e=[];for(let t=0;t<s;++t)e[n[t].index]=t;u.setColumns({[a]:e})}else{let e;let t=[],i=[];for(let o=0;o<s;++o)e=n[o],t.push(u.getOriginalRowIndex(e.index)),i.push(e.row);u.setRows(i,0),u.setOriginalRowIndexes(t)}return this.emit({type:"afterModify",detail:t,table:e}),e}}return o.defaultOptions={type:"Sort",direction:"desc",orderByColumn:"y"},e.registerType("Sort",o),o}),i(t,"DataGrid/Querying/SortingController.js",[t["Data/Modifiers/SortModifier.js"]],function(e){return class{constructor(e){this.shouldBeUpdated=!1,this.dataGrid=e}setSorting(e,t){(this.currentSorting?.columnId!==t||this.currentSorting?.order!==e)&&(this.shouldBeUpdated=!0,this.currentSorting={columnId:t,order:e}),this.modifier=this.createModifier()}getSortingOptions(){let e;let{columnOptionsMap:t}=this.dataGrid;if(!t)return{order:null};let i=Object.keys(t),s=null;for(let o=i.length-1;o>-1;--o){let n=i[o],r=t[n],l=r.sorting?.order;if(l){if(e){console.warn(`DataGrid: Only one column can be sorted at a time. Data will be sorted only by the last found column with the sorting order defined in the options: "${e}".`);break}s=l,e=n}}return{columnId:e,order:s}}loadOptions(){let e=this.getSortingOptions();(e.columnId!==this.initialSorting?.columnId||e.order!==this.initialSorting?.order)&&(this.initialSorting=e,this.setSorting(e.order,e.columnId))}createModifier(){if(!this.currentSorting)return;let{columnId:t,order:i}=this.currentSorting;if(i)return new e({orderByColumn:t,direction:i})}}}),i(t,"DataGrid/Querying/QueryingController.js",[t["Data/Modifiers/ChainModifier.js"],t["DataGrid/Querying/SortingController.js"]],function(e,t){return class{constructor(e){this.dataGrid=e,this.sorting=new t(e)}async proceed(e=!1){(e||this.sorting.shouldBeUpdated)&&await this.modifyData()}loadOptions(){this.sorting.loadOptions()}willNotModify(){return!this.sorting.modifier}async modifyData(){let t=this.dataGrid.dataTable;if(!t)return;let i=[];if(this.sorting.modifier&&i.push(this.sorting.modifier),i.length>0){let s=new e({},...i),o=t.clone();await s.modify(o.modified),this.dataGrid.presentationTable=o.modified}else this.dataGrid.presentationTable=t.modified;this.sorting.shouldBeUpdated=!1}}}),i(t,"DataGrid/DataGrid.js",[t["DataGrid/Accessibility/Accessibility.js"],t["Core/Renderer/HTML/AST.js"],t["DataGrid/Credits.js"],t["DataGrid/Defaults.js"],t["DataGrid/Utils.js"],t["Data/DataTable.js"],t["DataGrid/Globals.js"],t["DataGrid/Table/Table.js"],t["Core/Utilities.js"],t["DataGrid/Querying/QueryingController.js"]],function(e,t,i,s,o,n,r,l,a,d){let{makeHTMLElement:h}=o,{win:u}=r,{merge:c}=a;class m{static dataGrid(e,t,i){return i?new Promise(i=>{new m(e,t,e=>{i(e)})}):new m(e,t)}constructor(e,t,i){this.columnOptionsMap={},this.userOptions={},this.loadUserOptions(t),this.querying=new d(this),this.initContainers(e),this.initAccessibility(),this.loadDataTable(this.options?.dataTable),this.querying.loadOptions(),this.querying.proceed().then(()=>{this.renderViewport(),i?.(this)}),m.dataGrids.push(this)}initAccessibility(){this.options?.accessibility?.enabled&&(this.accessibility=new e(this))}initContainers(e){let i="string"==typeof e?u.document.getElementById(e):e;if(!i){console.error(`
Rendering div not found. It is unable to find the HTML element
to render the DataGrid in.
`);return}this.container=i,this.container.innerHTML=t.emptyHTML,this.contentWrapper=h("div",{className:r.classNames.container},this.container)}loadUserOptions(e,t=!1){(e=c(e)).columns&&(t?this.loadColumnOptionsOneToOne(e.columns):this.loadColumnOptions(e.columns),delete e.columns),this.userOptions=c(this.userOptions,e),this.options=c(this.options??s.defaultOptions,this.userOptions);let i=this.options?.columns;if(!i)return;let o={};for(let e=0,t=i?.length??0;e<t;++e)o[i[e].id]=i[e];this.columnOptionsMap=o}loadColumnOptions(e,t=!1){this.userOptions.columns||(this.userOptions.columns=[]);let i=this.userOptions.columns;for(let s=0,o=e.length;s<o;++s){let o=e[s],n=i.findIndex(e=>e.id===o.id);if(Object.keys(o).length<2){t&&-1!==n&&i.splice(n,1);continue}-1===n?i.push(o):t?i[n]=o:i[n]=c(i[n],o)}i.length<1&&delete this.userOptions.columns}loadColumnOptionsOneToOne(e){let t;let i=this.userOptions.columns,s=[];for(let o=0,n=e.length;o<n;++o){let n=e[o],r=i?.findIndex(e=>e.id===n.id);void 0!==r&&-1!==r&&(t=i?.[r]);let l=c(t??{},n);Object.keys(l).length>1&&s.push(l)}this.userOptions.columns=s}async update(e={},t=!0,i=!1){this.loadUserOptions(e,i);let s=!1;(!this.dataTable||e.dataTable)&&(this.userOptions.dataTable=e.dataTable,(this.options??{}).dataTable=e.dataTable,this.loadDataTable(this.options?.dataTable),s=!0),this.querying.loadOptions(),t&&(await this.querying.proceed(s),this.renderViewport())}async updateColumn(e,t,i=!0,s=!1){this.loadColumnOptions([{id:e,...t}],s),await this.update(void 0,i)}hoverRow(e){let t=this.viewport?.rows;if(!t)return;let i=this.viewport?.rows[0]?.index??0;void 0!==this.hoveredRowIndex&&t[this.hoveredRowIndex-i]?.setHoveredState(!1),void 0!==e&&t[e-i]?.setHoveredState(!0),this.hoveredRowIndex=e}hoverColumn(e){let t=this.viewport;t&&(this.hoveredColumnId&&t.getColumn(this.hoveredColumnId)?.setHoveredState(!1),e&&t.getColumn(e)?.setHoveredState(!0),this.hoveredColumnId=e)}renderViewport(){let e=this.viewport,s=e?.getStateMeta();this.enabledColumns=this.getEnabledColumnIDs(),this.credits?.destroy(),e?.destroy(),this.contentWrapper&&(this.contentWrapper.innerHTML=t.emptyHTML),this.enabledColumns.length>0?(this.renderTable(),e=this.viewport,s&&e&&e.applyStateMeta(s)):this.renderNoData(),this.options?.credits?.enabled&&(this.credits=new i(this)),this.viewport?.reflow()}renderTable(){this.tableElement=h("table",{className:r.classNames.tableElement},this.contentWrapper),this.viewport=new l(this,this.tableElement),this.tableElement.setAttribute("aria-rowcount",this.dataTable?.getRowCount()??0)}renderNoData(){h("div",{className:r.classNames.noData,innerText:this.options?.lang?.noData},this.contentWrapper)}getEnabledColumnIDs(){let e;let{columnOptionsMap:t}=this,i=this.options?.header,s=this.getColumnIds(i||[],!1),o=this.options?.rendering?.columns?.included||(s&&s.length>0?s:this.dataTable?.getColumnNames());if(!o?.length)return[];if(!t)return o;let n=[];for(let i=0,s=o.length;i<s;++i)e=o[i],t?.[e]?.enabled!==!1&&n.push(e);return n}loadDataTable(e){if(e?.id){this.dataTable=e,this.presentationTable=this.dataTable.modified;return}this.dataTable=this.presentationTable=new n(e)}getColumnIds(e,t=!0){let i=[],{enabledColumns:s}=this;for(let o of e){let e="string"==typeof o?o:o.columnId;e&&(!t||s?.includes(e))&&i.push(e),"string"!=typeof o&&o.columns&&(i=i.concat(this.getColumnIds(o.columns,t)))}return i}destroy(){let e=m.dataGrids.findIndex(e=>e===this);this.viewport?.destroy(),this.container&&(this.container.innerHTML=t.emptyHTML,this.container.classList.remove(r.classNames.container)),Object.keys(this).forEach(e=>{delete this[e]}),m.dataGrids.splice(e,1)}getJSON(){let e=this.viewport?.dataTable.modified.columns;if(!this.enabledColumns||!e)return"{}";for(let t of Object.keys(e))-1===this.enabledColumns.indexOf(t)&&delete e[t];return JSON.stringify(e)}getOptionsJSON(e=!0){let t=e?c(this.userOptions):c(this.options);return t.dataTable?.id&&(t.dataTable={columns:t.dataTable.columns}),JSON.stringify(t)}}return m.dataGrids=[],m}),i(t,"Data/DataPoolDefaults.js",[],function(){return{connectors:[]}}),i(t,"Data/DataPool.js",[t["Data/Connectors/DataConnector.js"],t["Data/DataPoolDefaults.js"],t["Core/Utilities.js"]],function(e,t,i){class s{constructor(e=t){e.connectors=e.connectors||[],this.connectors={},this.options=e,this.waiting={}}emit(e){i.fireEvent(this,e.type,e)}getConnector(e){let t=this.connectors[e];if(t)return Promise.resolve(t);let i=this.waiting[e];if(!i){i=this.waiting[e]=[];let t=this.getConnectorOptions(e);if(!t)throw Error(`Connector '${e}' not found.`);this.loadConnector(t).then(t=>{delete this.waiting[e];for(let e=0,s=i.length;e<s;++e)i[e][0](t)}).catch(t=>{delete this.waiting[e];for(let e=0,s=i.length;e<s;++e)i[e][1](t)})}return new Promise((e,t)=>{i.push([e,t])})}getConnectorIds(){let e=this.options.connectors,t=[];for(let i=0,s=e.length;i<s;++i)t.push(e[i].id);return t}getConnectorOptions(e){let t=this.options.connectors;for(let i=0,s=t.length;i<s;++i)if(t[i].id===e)return t[i]}getConnectorTable(e){return this.getConnector(e).then(e=>e.table)}isNewConnector(e){return!this.connectors[e]}loadConnector(t){return new Promise((i,s)=>{this.emit({type:"load",options:t});let o=e.types[t.type];if(!o)throw Error(`Connector type not found. (${t.type})`);new o(t.options).load().then(e=>{this.connectors[t.id]=e,this.emit({type:"afterLoad",options:t}),i(e)}).catch(s)})}on(e,t){return i.addEvent(this,e,t)}setConnectorOptions(e){let t=this.options.connectors,i=this.connectors;this.emit({type:"setConnectorOptions",options:e});for(let i=0,s=t.length;i<s;++i)if(t[i].id===e.id){t.splice(i,1);break}i[e.id]&&(i[e.id].stopPolling(),delete i[e.id]),t.push(e),this.emit({type:"afterSetConnectorOptions",options:e})}}return s.version="1.0.0",s}),i(t,"Accessibility/HighContrastMode.js",[t["Core/Globals.js"]],function(e){let{doc:t,isMS:i,win:s}=e;return{isHighContrastModeActive:function(){let e=/(Edg)/.test(s.navigator.userAgent);if(s.matchMedia&&e)return s.matchMedia("(-ms-high-contrast: active)").matches;if(i&&s.getComputedStyle){let e=t.createElement("div");e.style.backgroundImage="url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)",t.body.appendChild(e);let i=(e.currentStyle||s.getComputedStyle(e)).backgroundImage;return t.body.removeChild(e),"none"===i}return s.matchMedia&&s.matchMedia("(forced-colors: active)").matches},setHighContrastTheme:function(e){e.highContrastModeActive=!0;let t=e.options.accessibility.highContrastTheme;e.update(t,!1);let i=t.colors?.length>1;e.series.forEach(function(e){let s=t.plotOptions[e.type]||{},o=i&&void 0!==e.colorIndex?t.colors[e.colorIndex]:s.color||"window",n={color:s.color||"windowText",colors:i?t.colors:[s.color||"windowText"],borderColor:s.borderColor||"window",fillColor:o};e.update(n,!1),e.points&&e.points.forEach(function(e){e.options&&e.options.color&&e.update({color:s.color||"windowText",borderColor:s.borderColor||"window"},!1)})}),e.redraw()}}}),i(t,"Data/Converters/CSVConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){let t=i(s.defaultOptions,e);super(t),this.columns=[],this.headers=[],this.dataTypes=[],this.options=t}export(e,t=this.options){let{useLocalDecimalPoint:i,lineDelimiter:s}=t,o=!1!==this.options.firstRowAsNames,{decimalPoint:n,itemDelimiter:r}=t;n||(n=","!==r&&i?1.1.toLocaleString()[1]:"."),r||(r=","===n?";":",");let l=e.getSortedColumns(t.usePresentationOrder),a=Object.keys(l),d=[],h=a.length,u=[];o&&d.push(a.map(e=>`"${e}"`).join(r));for(let t=0;t<h;t++){let i;let s=a[t],o=l[s],c=o.length,m=e.whatIs(s);m&&(i=m.dataType);for(let e=0;e<c;e++){let s=o[e];if(u[e]||(u[e]=[]),"string"===i?s='"'+s+'"':"number"==typeof s?s=String(s).replace(".",n):"string"==typeof s&&(s=`"${s}"`),u[e][t]=s,t===h-1){let i=t;for(;u[e].length>2&&void 0===u[e][i];)u[e].pop(),i--;d.push(u[e].join(r))}}}return d.join(s)}parse(e,t){let s=this.dataTypes,o=i(this.options,e),{beforeParse:n,lineDelimiter:r,firstRowAsNames:l,itemDelimiter:a}=o,d,h=0,{csv:u,startRow:c,endRow:m}=o,f;if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers}),u&&n&&(u=n(u)),u){if(d=u.replace(/\r\n|\r/g,"\n").split(r||"\n"),(!c||c<0)&&(c=0),(!m||m>=d.length)&&(m=d.length-1),a||(this.guessedItemDelimiter=this.guessDelimiter(d)),l){let e=d[0].split(a||this.guessedItemDelimiter||",");for(let t=0;t<e.length;t++)e[t]=e[t].trim().replace(/^["']|["']$/g,"");this.headers=e,c++}let e=0;for(h=c;h<=m;h++)"#"===d[h][0]?e++:this.parseCSVRow(d[h],h-c-e);s.length&&s[0].length&&"date"===s[0][1]&&!this.options.dateFormat&&this.deduceDateFormat(this.columns[0],null,!0);for(let e=0,t=this.columns.length;e<t;++e){f=this.columns[e];for(let t=0,i=f.length;t<i;++t)if(f[t]&&"string"==typeof f[t]){let i=this.asGuessedType(f[t]);i instanceof Date&&(i=i.getTime()),this.columns[e][t]=i}}}this.emit({type:"afterParse",columns:this.columns,detail:t,headers:this.headers})}parseCSVRow(e,t){let i=this,s=i.columns||[],o=i.dataTypes,{startColumn:n,endColumn:r}=i.options,l=i.options.itemDelimiter||i.guessedItemDelimiter,{decimalPoint:a}=i.options;a&&a!==l||(a=i.guessedDecimalPoint||".");let d=0,h="",u="",c=0,m=0,f=t=>{h=e[t]},p=e=>{o.length<m+1&&o.push([e]),o[m][o[m].length-1]!==e&&o[m].push(e)},g=()=>{if(n>c||c>r){++c,u="";return}if("string"==typeof u?!isNaN(parseFloat(u))&&isFinite(u)?(u=parseFloat(u),p("number")):isNaN(Date.parse(u))?p("string"):(u=u.replace(/\//g,"-"),p("date")):p("number"),s.length<m+1&&s.push([]),"number"!=typeof u&&"number"!==i.guessType(u)&&a){let e=u;u=u.replace(a,"."),"number"!==i.guessType(u)&&(u=e)}s[m][t]=u,u="",++m,++c};if(e.trim().length&&"#"!==e.trim()[0]){for(;d<e.length;d++){if(f(d),"#"===h&&!/^#[A-F\d]{3,3}|[A-F\d]{6,6}/i.test(e.substring(d))){g();return}if('"'===h)for(f(++d);d<e.length&&'"'!==h;)u+=h,f(++d);else h===l?g():u+=h}g()}}guessDelimiter(e){let t=0,i=0,s,o={",":0,";":0," ":0},n=e.length;for(let s=0;s<n;s++){let n=!1,r,l,a,d="";if(s>13)break;let h=e[s];for(let e=0;e<h.length&&(r=h[e],l=h[e+1],a=h[e-1],"#"!==r);e++){if('"'===r){if(n){if('"'!==a&&'"'!==l){for(;" "===l&&e<h.length;)l=h[++e];void 0!==o[l]&&o[l]++,n=!1}}else n=!0}else void 0!==o[r]?(isNaN(Date.parse(d=d.trim()))?(isNaN(Number(d))||!isFinite(Number(d)))&&o[r]++:o[r]++,d=""):d+=r;","===r&&i++,"."===r&&t++}}return o[";"]>o[","]?s=";":(o[","],o[";"],s=","),t>i?this.guessedDecimalPoint=".":this.guessedDecimalPoint=",",s}getTable(){return e.getTableFromColumns(this.columns,this.headers)}}return s.defaultOptions={...e.defaultOptions,lineDelimiter:"\n"},s}),i(t,"Data/Connectors/CSVConnector.js",[t["Data/Converters/CSVConverter.js"],t["Data/Connectors/DataConnector.js"],t["Core/Utilities.js"]],function(e,t,i){let{merge:s}=i;class o extends t{constructor(t){let i=s(o.defaultOptions,t);super(i),this.converter=new e(i),this.options=i,i.enablePolling&&this.startPolling(1e3*Math.max(i.dataRefreshRate||0,1))}load(e){let t=this,i=t.converter,s=t.table,{csv:o,csvURL:n,dataModifier:r}=t.options;return t.emit({type:"load",csv:o,detail:e,table:s}),Promise.resolve(n?fetch(n).then(e=>e.text()):o||"").then(e=>(e&&(s.deleteColumns(),i.parse({csv:e}),s.setColumns(i.getTable().getColumns())),t.setModifierOptions(r).then(()=>e))).then(i=>(t.emit({type:"afterLoad",csv:i,detail:e,table:s}),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return o.defaultOptions={csv:"",csvURL:"",enablePolling:!1,dataRefreshRate:1,firstRowAsNames:!0},t.registerType("CSV",o),o}),i(t,"Data/Converters/GoogleSheetsConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i,uniqueKey:s}=t;class o extends e{constructor(e){let t=i(o.defaultOptions,e);super(t),this.columns=[],this.header=[],this.options=t}parse(e,t){let o;let n=i(this.options,e),r=(n.json?.values||[]).map(e=>e.slice());if(0===r.length)return!1;this.header=[],this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.header});let{beforeParse:l,json:a}=n;l&&a&&(r=l(a.values)),this.columns=r;for(let e=0,t=r.length;e<t;e++){o=r[e],this.header[e]=n.firstRowAsNames?`${o.shift()}`:s();for(let t=0,i=o.length;t<i;++t)if(o[t]&&"string"==typeof o[t]){let i=this.asGuessedType(o[t]);i instanceof Date&&(i=i.getTime()),this.columns[e][t]=i}}this.emit({type:"afterParse",columns:this.columns,detail:t,headers:this.header})}getTable(){return e.getTableFromColumns(this.columns,this.header)}}return o.defaultOptions={...e.defaultOptions},o}),i(t,"Data/Connectors/GoogleSheetsConnector.js",[t["Data/Connectors/DataConnector.js"],t["Data/Converters/GoogleSheetsConverter.js"],t["Core/Utilities.js"]],function(e,t,i){let{merge:s,pick:o}=i;class n extends e{constructor(e){let i=s(n.defaultOptions,e);super(i),this.converter=new t(i),this.options=i}load(e){let t=this,i=t.converter,s=t.table,{dataModifier:o,dataRefreshRate:r,enablePolling:l,firstRowAsNames:a,googleAPIKey:d,googleSpreadsheetKey:h}=t.options,u=n.buildFetchURL(d,h,t.options);if(t.emit({type:"load",detail:e,table:s,url:u}),!URL.canParse(u))throw Error("Invalid URL: "+u);return fetch(u).then(e=>e.json()).then(e=>{if("object"==typeof e&&e&&"object"==typeof e.error&&e.error&&"number"==typeof e.error.code&&"string"==typeof e.error.message&&"string"==typeof e.error.status)throw Error(e.error.message);return i.parse({firstRowAsNames:a,json:e}),s.deleteColumns(),s.setColumns(i.getTable().getColumns()),t.setModifierOptions(o)}).then(()=>(t.emit({type:"afterLoad",detail:e,table:s,url:u}),l&&setTimeout(()=>t.load(),1e3*Math.max(r||0,1)),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return n.defaultOptions={googleAPIKey:"",googleSpreadsheetKey:"",enablePolling:!1,dataRefreshRate:2,firstRowAsNames:!0},function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function i(e={}){let{endColumn:s,endRow:n,googleSpreadsheetRange:r,startColumn:l,startRow:a}=e;return r||(t[l||0]||"A")+(Math.max(a||0,0)+1)+":"+(t[o(s,25)]||"Z")+(n?Math.max(n,0):"Z")}e.buildFetchURL=function(e,t,s={}){let o=new URL(`https://sheets.googleapis.com/v4/spreadsheets/${t}/values/`),n=s.onlyColumnNames?"A1:Z1":i(s);o.pathname+=n;let r=o.searchParams;return r.set("alt","json"),s.onlyColumnNames||(r.set("dateTimeRenderOption","FORMATTED_STRING"),r.set("majorDimension","COLUMNS"),r.set("valueRenderOption","UNFORMATTED_VALUE")),r.set("prettyPrint","false"),r.set("key",e),o.href},e.buildQueryRange=i}(n||(n={})),e.registerType("GoogleSheets",n),n}),i(t,"Data/Converters/HTMLTableConverter.js",[t["Data/Converters/DataConverter.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){let t=i(s.defaultOptions,e);super(t),this.columns=[],this.headers=[],this.options=t,t.tableElement&&(this.tableElement=t.tableElement,this.tableElementID=t.tableElement.id)}export(e,t=this.options){let i=!1!==t.firstRowAsNames,s=t.useMultiLevelHeaders,o=e.getSortedColumns(t.usePresentationOrder),n=Object.keys(o),r=[],l=n.length,a=[],d="";if(i){let e=[];if(s){for(let t of n){let i=(o[t].shift()||"").toString();e.push(i)}d=this.getTableHeaderHTML(n,e,t)}else d=this.getTableHeaderHTML(void 0,n,t)}for(let e=0;e<l;e++){let t=o[n[e]],i=t.length;for(let s=0;s<i;s++){let i=t[s];a[s]||(a[s]=[]),"string"==typeof i||"number"==typeof i||void 0===i||(i=(i||"").toString()),a[s][e]=this.getCellHTMLFromValue(e?"td":"th",null,e?"":'scope="row"',i),e===l-1&&r.push("<tr>"+a[s].join("")+"</tr>")}}let h="";return t.tableCaption&&(h='<caption class="highcharts-table-caption">'+t.tableCaption+"</caption>"),"<table>"+h+d+"<tbody>"+r.join("")+"</tbody></table>"}getCellHTMLFromValue(e,t,i,s,o){let n=s,r="text"+(t?" "+t:"");return"number"==typeof n?(n=n.toString(),","===o&&(n=n.replace(".",o)),r="number"):s||(n="",r="empty"),"<"+e+(i?" "+i:"")+' class="'+r+'">'+n+"</"+e+">"}getTableHeaderHTML(e=[],t=[],i=this.options){let{useMultiLevelHeaders:s,useRowspanHeaders:o}=i,n="<thead>",r=0,l=t&&t.length,a,d=0,h;if(s&&e&&t&&!function(e,t){let i=e.length;if(t.length!==i)return!1;for(;--i;)if(e[i]!==t[i])return!1;return!0}(e,t)){for(n+="<tr>";r<l;++r)(a=e[r])===e[r+1]?++d:d?(n+=this.getCellHTMLFromValue("th","highcharts-table-topheading",'scope="col" colspan="'+(d+1)+'"',a),d=0):(a===t[r]?o?(h=2,delete t[r]):(h=1,t[r]=""):h=1,n+=this.getCellHTMLFromValue("th","highcharts-table-topheading",'scope="col"'+(h>1?' valign="top" rowspan="'+h+'"':""),a));n+="</tr>"}if(t){for(n+="<tr>",r=0,l=t.length;r<l;++r)void 0!==t[r]&&(n+=this.getCellHTMLFromValue("th",null,'scope="col"',t[r]));n+="</tr>"}return n+"</thead>"}parse(e,t){let s=[],o=[],n=i(this.options,e),{endRow:r,startColumn:l,endColumn:a,firstRowAsNames:d}=n,h=n.tableElement||this.tableElement;if(!(h instanceof HTMLElement)){this.emit({type:"parseError",columns:s,detail:t,headers:o,error:"Not a valid HTML Table"});return}this.tableElement=h,this.tableElementID=h.id,this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers});let u=h.getElementsByTagName("tr"),c=u.length,m=0,f,{startRow:p}=n;if(d&&c){let e=u[0].children,t=e.length;for(let i=l;i<t&&!(i>a);i++)("TD"===(f=e[i]).tagName||"TH"===f.tagName)&&o.push(f.innerHTML);p++}for(;m<c;){if(m>=p&&m<=r){let e=u[m].children,t=e.length,i=0;for(;i<t;){let t=i-l,o=s[t];if(("TD"===(f=e[i]).tagName||"TH"===f.tagName)&&i>=l&&i<=a){s[t]||(s[t]=[]);let e=this.asGuessedType(f.innerHTML);e instanceof Date&&(e=e.getTime()),s[t][m-p]=e;let i=1;for(;m-p>=i&&void 0===o[m-p-i];)o[m-p-i]=null,i++}i++}}m++}this.columns=s,this.headers=o,this.emit({type:"afterParse",columns:s,detail:t,headers:o})}getTable(){return e.getTableFromColumns(this.columns,this.headers)}}return s.defaultOptions={...e.defaultOptions,useRowspanHeaders:!0,useMultiLevelHeaders:!0},s}),i(t,"Data/Connectors/HTMLTableConnector.js",[t["Data/Connectors/DataConnector.js"],t["Core/Globals.js"],t["Data/Converters/HTMLTableConverter.js"],t["Core/Utilities.js"]],function(e,t,i,s){let{win:o}=t,{merge:n}=s;class r extends e{constructor(e){let t=n(r.defaultOptions,e);super(t),this.converter=new i(t),this.options=t}load(e){let t;let i=this,s=i.converter,r=i.table,{dataModifier:l,table:a}=i.options;if(i.emit({type:"load",detail:e,table:r,tableElement:i.tableElement}),"string"==typeof a?(i.tableID=a,t=o.document.getElementById(a)):(t=a,i.tableID=t.id),i.tableElement=t||void 0,!i.tableElement){let t="HTML table not provided, or element with ID not found";return i.emit({type:"loadError",detail:e,error:t,table:r}),Promise.reject(Error(t))}return s.parse(n({tableElement:i.tableElement},i.options),e),r.deleteColumns(),r.setColumns(s.getTable().getColumns()),i.setModifierOptions(l).then(()=>(i.emit({type:"afterLoad",detail:e,table:r,tableElement:i.tableElement}),i))}}return r.defaultOptions={table:""},e.registerType("HTMLTable",r),r}),i(t,"Data/Converters/JSONConverter.js",[t["Data/Converters/DataConverter.js"],t["Data/DataTable.js"],t["Core/Utilities.js"]],function(e,t,i){let{error:s,isArray:o,merge:n,objectEach:r}=i;class l extends e{constructor(e){let i=n(l.defaultOptions,e);super(i),this.columns=[],this.headers=[],this.options=i,this.table=new t}parse(e,t){let{beforeParse:i,orientation:l,firstRowAsNames:a,columnNames:d}=e=n(this.options,e),h=e.data;if(h){if(this.columns=[],this.emit({type:"parse",columns:this.columns,detail:t,headers:this.headers}),i&&(h=i(h)),h=h.slice(),"columns"===l)for(let e=0,t=h.length;e<t;e++){let t=h[e];if(!(t instanceof Array))return;this.headers instanceof Array?(a?this.headers.push(`${t.shift()}`):d&&d instanceof Array&&this.headers.push(d[e]),this.table.setColumn(this.headers[e]||e.toString(),t)):s("JSONConverter: Invalid `columnNames` option.",!1)}else if("rows"===l){a?this.headers=h.shift():d&&(this.headers=d);for(let e=0,t=h.length;e<t;e++){let t=h[e];if(o(t))for(let e=0,i=t.length;e<i;e++)this.columns.length<e+1&&this.columns.push([]),this.columns[e].push(t[e]),this.headers instanceof Array?this.table.setColumn(this.headers[e]||e.toString(),this.columns[e]):s("JSONConverter: Invalid `columnNames` option.",!1);else{let i=this.headers;if(i&&!(i instanceof Array)){let e={};r(i,(i,s)=>{e[s]=i.reduce((e,t)=>e[t],t)}),t=e}this.table.setRows([t],e)}}}this.emit({type:"afterParse",columns:this.columns,detail:t,headers:this.headers})}}getTable(){return this.table}}return l.defaultOptions={...e.defaultOptions,data:[],orientation:"rows"},l}),i(t,"Data/Connectors/JSONConnector.js",[t["Data/Connectors/DataConnector.js"],t["Core/Utilities.js"],t["Data/Converters/JSONConverter.js"]],function(e,t,i){let{merge:s}=t;class o extends e{constructor(e){let t=s(o.defaultOptions,e);super(t),this.converter=new i(t),this.options=t,t.enablePolling&&this.startPolling(1e3*Math.max(t.dataRefreshRate||0,1))}load(e){let t=this,i=t.converter,s=t.table,{data:o,dataUrl:n,dataModifier:r}=t.options;return t.emit({type:"load",data:o,detail:e,table:s}),Promise.resolve(n?fetch(n).then(e=>e.json()):o||[]).then(e=>(e&&(s.deleteColumns(),i.parse({data:e}),s.setColumns(i.getTable().getColumns())),t.setModifierOptions(r).then(()=>e))).then(i=>(t.emit({type:"afterLoad",data:i,detail:e,table:s}),t)).catch(i=>{throw t.emit({type:"loadError",detail:e,error:i,table:s}),i})}}return o.defaultOptions={data:[],enablePolling:!1,dataRefreshRate:0,firstRowAsNames:!0,orientation:"rows"},e.registerType("JSON",o),o}),i(t,"Data/Modifiers/InvertModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){super(),this.options=i(s.defaultOptions,e)}modifyCell(e,t,i,s,o){let n=e.modified,r=n.getRowIndexBy("columnNames",t);return void 0===r?n.setColumns(this.modifyTable(e.clone()).getColumns(),void 0,o):n.setCell(`${i}`,r,s,o),e}modifyColumns(e,t,i,s){let o=e.modified,n=o.getColumn("columnNames")||[],r=e.getColumnNames(),l=e.getRowCount()!==n.length;if(!l){for(let e=0,t=r.length;e<t;++e)if(r[e]!==n[e]){l=!0;break}}if(l)return this.modifyTable(e,s);r=Object.keys(t);for(let e=0,n=r.length,l,a,d;e<n;++e){l=t[a=r[e]],d=o.getRowIndexBy("columnNames",a)||o.getRowCount();for(let e=0,t=i,n=l.length;e<n;++e,++t)o.setCell(`${t}`,d,l[e],s)}return e}modifyRows(e,t,i,s){let o=e.getColumnNames(),n=e.modified,r=n.getColumn("columnNames")||[],l=e.getRowCount()!==r.length;if(!l){for(let e=0,t=o.length;e<t;++e)if(o[e]!==r[e]){l=!0;break}}if(l)return this.modifyTable(e,s);for(let e=0,r=i,l=t.length,a;e<l;++e,++r)if((a=t[e])instanceof Array)n.setColumn(`${r}`,a);else for(let e=0,t=o.length;e<t;++e)n.setCell(`${r}`,e,a[o[e]],s);return e}modifyTable(e,t){this.emit({type:"modify",detail:t,table:e});let i=e.modified;if(e.hasColumns(["columnNames"])){let t=((e.deleteColumns(["columnNames"])||{}).columnNames||[]).map(e=>`${e}`),s={};for(let i=0,o=e.getRowCount(),n;i<o;++i)(n=e.getRow(i))&&(s[t[i]]=n);i.deleteColumns(),i.setColumns(s)}else{let t={};for(let i=0,s=e.getRowCount(),o;i<s;++i)(o=e.getRow(i))&&(t[`${i}`]=o);t.columnNames=e.getColumnNames(),i.deleteColumns(),i.setColumns(t)}return this.emit({type:"afterModify",detail:t,table:e}),e}}return s.defaultOptions={type:"Invert"},e.registerType("Invert",s),s}),i(t,"Data/Modifiers/RangeModifier.js",[t["Data/Modifiers/DataModifier.js"],t["Core/Utilities.js"]],function(e,t){let{merge:i}=t;class s extends e{constructor(e){super(),this.options=i(s.defaultOptions,e)}modifyTable(e,t){this.emit({type:"modify",detail:t,table:e});let i=[],{additive:s,ranges:o,strict:n}=this.options;if(o.length){let t=e.modified,r=e.getColumns(),l=[];for(let a=0,d=o.length,h,u;a<d;++a)if(h=o[a],!n||typeof h.minValue==typeof h.maxValue){a>0&&!s&&(t.deleteRows(),t.setRows(l),t.setOriginalRowIndexes(i,!0),r=t.getColumns(),l=[],i=[]),u=r[h.column]||[];for(let o=0,r=u.length,a,d,c;o<r;++o){switch(typeof(a=u[o])){default:continue;case"boolean":case"number":case"string":}(!n||typeof a==typeof h.minValue)&&a>=h.minValue&&a<=h.maxValue&&(s?(d=e.getRow(o),c=e.getOriginalRowIndex(o)):(d=t.getRow(o),c=t.getOriginalRowIndex(o)),d&&(l.push(d),i.push(c)))}}t.deleteRows(),t.setRows(l),t.setOriginalRowIndexes(i)}return this.emit({type:"afterModify",detail:t,table:e}),e}}return s.defaultOptions={type:"Range",ranges:[]},e.registerType("Range",s),s}),i(t,"masters/datagrid.src.js",[t["Core/Renderer/HTML/AST.js"],t["Data/Connectors/DataConnector.js"],t["Data/Converters/DataConverter.js"],t["Data/DataCursor.js"],t["DataGrid/DataGrid.js"],t["Data/Modifiers/DataModifier.js"],t["Data/DataPool.js"],t["Data/DataTable.js"],t["DataGrid/Defaults.js"],t["DataGrid/Globals.js"],t["Accessibility/HighContrastMode.js"]],function(e,t,i,s,o,n,r,l,a,d,h){return d.AST=e,d.DataConnector=t,d.DataCursor=s,d.DataConverter=i,d.DataGrid=o,d.dataGrid=o.dataGrid,d.dataGrids=o.dataGrids,d.DataModifier=n,d.DataPool=r,d.DataTable=l,d.defaultOptions=a.defaultOptions,d.setOptions=a.setOptions,d.isHighContrastModeActive=h.isHighContrastModeActive,d.win.DataGrid||(d.win.DataGrid=d),d}),t["masters/datagrid.src.js"]._modules=t,t["masters/datagrid.src.js"]});