@highcharts/dashboards
Version:
Highcharts Dashboards framework
8 lines • 159 kB
JavaScript
!/**
* Highcharts Dashboards v3.6.0 (2025-09-10)
*
* (c) 2009-2025 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("dashboards/dashboards",function(){return t(e)}):(e.Dashboards&&e.Dashboards.error(16,!0),e.Dashboards=t(e))}("undefined"!=typeof window?window:this,function(e){"use strict";var t={};function i(t,i,n,s){!t.hasOwnProperty(i)&&(t[i]=s.apply(null,n),e&&"function"==typeof CustomEvent&&e.dispatchEvent(new CustomEvent("DashboardsModuleLoaded",{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.6.0",i.win=void 0!==e?e:{},i.doc=i.win.document,i.svg=!!i.doc?.createElementNS?.(i.SVG_NS,"svg")?.createSVGRect,i.pageLang=i.doc?.documentElement?.closest("[lang]")?.lang,i.userAgent=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,{charts:i,doc:n,win:s}=e;function o(t,i,n,r){let a=i?"Highcharts error":"Highcharts warning";32===t&&(t=`${a}: Deprecated member`);let l=u(t),c=l?`${a} #${t}: www.highcharts.com/errors/${t}/`:t.toString();if(void 0!==r){let e="";l&&(c+="?"),T(r,function(t,i){e+=`
- ${i}: ${t}`,l&&(c+=encodeURI(i)+"="+encodeURI(t))}),c+=e}D(e,"displayError",{chart:n,code:t,message:c,params:r},function(){if(i)throw Error(c);s.console&&-1===o.messages.indexOf(c)&&console.warn(c)}),o.messages.push(c)}function r(e,t){return parseInt(e,t||10)}function a(e){return"string"==typeof e}function l(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function c(e,t){return!!e&&"object"==typeof e&&(!t||!l(e))}function h(e){return c(e)&&"number"==typeof e.nodeType}function d(e){let t=e?.constructor;return!!(c(e,!0)&&!h(e)&&t?.name&&"Object"!==t.name)}function u(e){return"number"==typeof e&&!isNaN(e)&&e<1/0&&e>-1/0}function p(e){return null!=e}function m(e,t,i){let n,s=a(t)&&!p(i),o=(t,i)=>{p(t)?e.setAttribute(i,t):s?(n=e.getAttribute(i))||"class"!==i||(n=e.getAttribute(i+"Name")):e.removeAttribute(i)};return a(t)?o(i,t):T(t,o),n}function f(e){return l(e)?e:[e]}function g(e,t){let i;for(i in e||(e={}),t)e[i]=t[i];return e}function y(){let e=arguments,t=e.length;for(let i=0;i<t;i++){let t=e[i];if(null!=t)return t}}function b(e,t){g(e.style,t)}function C(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function v(e,t){return e>1e14?e:parseFloat(e.toPrecision(t||14))}(o||(o={})).messages=[],Math.easeInOutSine=function(e){return -.5*(Math.cos(Math.PI*e)-1)};let w=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){let i,n=e.length;for(i=0;i<n;i++)if(t(e[i],i))return e[i]};function T(e,t,i){for(let n in e)Object.hasOwnProperty.call(e,n)&&t.call(i||e[n],e[n],n,e)}function O(e,t,i){function n(t,i){let n=e.removeEventListener;n&&n.call(e,t,i,!1)}function s(i){let s,o;e.nodeName&&(t?(s={})[t]=!0:s=i,T(s,function(e,t){if(i[t])for(o=i[t].length;o--;)n(t,i[t][o].fn)}))}let o="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(o,"hcEvents")){let e=o.hcEvents;if(t){let o=e[t]||[];i?(e[t]=o.filter(function(e){return i!==e.fn}),n(t,i)):(s(e),e[t]=[])}else s(e),delete o.hcEvents}}function D(t,i,s,o){if(s=s||{},n?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==e)){let e=n.createEvent("Events");e.initEvent(i,!0,!0),s=g(e,s),t.dispatchEvent?t.dispatchEvent(s):t.fireEvent(i,s)}else if(t.hcEvents){s.target||g(s,{preventDefault:function(){s.defaultPrevented=!0},target:t,type:i});let e=[],n=t,o=!1;for(;n.hcEvents;)Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents[i]&&(e.length&&(o=!0),e.unshift.apply(e,n.hcEvents[i])),n=Object.getPrototypeOf(n);o&&e.sort((e,t)=>e.order-t.order),e.forEach(e=>{!1===e.fn.call(t,s)&&s.preventDefault()})}o&&!s.defaultPrevented&&o.call(t,s)}let x=function(){let e=Math.random().toString(36).substring(2,9)+"-",i=0;return function(){return"highcharts-"+(t?"":e)+i++}}();return s.jQuery&&(s.jQuery.fn.highcharts=function(){let t=[].slice.call(arguments);if(this[0])return t[0]?(new e[a(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):i[m(this[0],"data-highcharts-chart")]}),{addEvent:function(t,i,n,s={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents;e.Point&&t instanceof e.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let a=t.addEventListener;a&&a.call(t,i,n,!!e.supportsPassiveEvents&&{passive:void 0===s.passive?-1!==i.indexOf("touch"):s.passive,capture:!1}),r[i]||(r[i]=[]);let l={fn:n,order:"number"==typeof s.order?s.order:1/0};return r[i].push(l),r[i].sort((e,t)=>e.order-t.order),function(){O(t,i,n)}},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:m,clamp:function(e,t,i){return e>t?e<i?e:i:t},clearTimeout:function(e){p(e)&&clearTimeout(e)},correctFloat:v,createElement:function(e,t,i,s,o){let r=n.createElement(e);return t&&g(r,t),o&&b(r,{padding:"0",border:"none",margin:"0"}),i&&b(r,i),s&&s.appendChild(r),r},crisp:function(e,t=0,i){let n=t%2/2,s=i?-1:1;return(Math.round(e*s-n)+n)*s},css:b,defined:p,destroyObjectProperties:function(e,t,i){T(e,function(n,s){n!==t&&n?.destroy&&n.destroy(),(n?.destroy||!i)&&delete e[s]})},diffObjects:function(e,t,i,n){let s={};return!function e(t,s,o,r){let a=i?s:t;T(t,function(i,h){if(!r&&n&&n.indexOf(h)>-1&&s[h]){i=f(i),o[h]=[];for(let t=0;t<Math.max(i.length,s[h].length);t++)s[h][t]&&(void 0===i[t]?o[h][t]=s[h][t]:(o[h][t]={},e(i[t],s[h][t],o[h][t],r+1)))}else c(i,!0)&&!i.nodeType?(o[h]=l(i)?[]:{},e(i,s[h]||{},o[h],r+1),0===Object.keys(o[h]).length&&("colorAxis"!==h||0!==r)&&delete o[h]):(t[h]!==s[h]||h in t&&!(h in s))&&"__proto__"!==h&&"constructor"!==h&&(o[h]=a[h])})}(e,t,s,0),s},discardElement:function(e){e?.parentElement?.removeChild(e)},erase:function(e,t){let i=e.length;for(;i--;)if(e[i]===t){e.splice(i,1);break}},error:o,extend:g,extendClass:function(e,t){let i=function(){};return i.prototype=new e,g(i.prototype,t),i},find:w,fireEvent:D,getAlignFactor:(e="")=>({center:.5,right:1,middle:.5,bottom:1})[e]||0,getClosestDistance:function(e,t){let i,n,s,o,r=!t;return e.forEach(e=>{if(e.length>1)for(o=n=e.length-1;o>0;o--)(s=e[o]-e[o-1])<0&&!r?(t?.(),t=void 0):s&&(void 0===i||s<i)&&(i=s)}),i},getMagnitude:C,getNestedProperty:function(e,t){let i=e.split(".");for(;i.length&&p(t);){let e=i.shift();if(void 0===e||"__proto__"===e)return;if("this"===e){let e;return c(t)&&(e=t["@this"]),e??t}let n=t[e.replace(/[\\'"]/g,"")];if(!p(n)||"function"==typeof n||"number"==typeof n.nodeType||n===s)return;t=n}return t},getStyle:function e(t,i,n){let o;if("width"===i){let i=Math.min(t.offsetWidth,t.scrollWidth),n=t.getBoundingClientRect?.().width;return n<i&&n>=i-1&&(i=Math.floor(n)),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 a=s.getComputedStyle(t,void 0);return a&&(o=a.getPropertyValue(i),y(n,"opacity"!==i)&&(o=r(o))),o},insertItem:function(e,t){let i,n=e.options.index,s=t.length;for(i=e.options.isInternal?s:0;i<s+1;i++)if(!t[i]||u(n)&&n<y(t[i].options.index,t[i]._i)||t[i].options.isInternal){t.splice(i,0,e);break}return i},isArray:l,isClass:d,isDOMElement:h,isFunction:function(e){return"function"==typeof e},isNumber:u,isObject:c,isString:a,merge:function(e,...t){let i,n=[e,...t],s={},o=function(e,t){return"object"!=typeof e&&(e={}),T(t,function(i,n){"__proto__"!==n&&"constructor"!==n&&(!c(i,!0)||d(i)||h(i)?e[n]=t[n]:e[n]=o(e[n]||{},i))}),e};!0===e&&(s=n[1],n=Array.prototype.slice.call(n,2));let r=n.length;for(i=0;i<r;i++)s=o(s,n[i]);return s},normalizeTickInterval:function(e,t,i,n,s){let o,r=e;i=y(i,C(e));let a=e/i;for(!t&&(t=s?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===n&&(1===i?t=t.filter(function(e){return e%1==0}):i<=.1&&(t=[1/i]))),o=0;o<t.length&&(r=t[o],(!s||!(r*i>=e))&&(s||!(a<=(t[o]+(t[o+1]||t[o]))/2)));o++);return v(r*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:T,offset:function(e){let t=n.documentElement,i=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(s.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(s.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:y,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:O,replaceNested:function(e,...t){let i,n;do for(n of(i=e,t))e=e.replace(n[0],n[1]);while(e!==i);return e},splat:f,stableSort:function(e,t){let i,n,s=e.length;for(n=0;n<s;n++)e[n].safeI=n;for(e.sort(function(e,n){return 0===(i=t(e,n))?e.safeI-n.safeI:i}),n=0;n<s;n++)delete e[n].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 a(e)?e.substring(0,1).toUpperCase()+e.substring(1):String(e)},uniqueKey:x,useSerialIds:function(e){return t=y(e,t)},wrap:function(e,t,i){let n=e[t];e[t]=function(){let e=arguments,t=this;return i.apply(this,[function(){return n.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:n}=e,{attr:s,createElement:o,css:r,error:a,isFunction:l,isString:c,objectEach:h,splat:d}=t,{trustedTypes:u}=n,p=u&&l(u.createPolicy)&&u.createPolicy("highcharts",{createHTML:e=>e}),m=p?p.createHTML(""):"";class f{static filterUserAttributes(e){return h(e,(t,i)=>{let n=!0;-1===f.allowedAttributes.indexOf(i)&&(n=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(i)&&(n=c(t)&&f.allowedReferences.some(e=>0===t.indexOf(e))),n||(a(33,!1,void 0,{"Invalid attribute in config":`${i}`}),delete e[i]),c(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()),n=i.shift();return n&&i.length&&(e[n.replace(/-([a-z])/g,e=>e[1].toUpperCase())]=i.join(":")),e},{})}static setElementHTML(e,t){e.innerHTML=f.emptyHTML,t&&new f(t).addToDOM(e)}constructor(e){this.nodes="string"==typeof e?this.parseMarkup(e):e}addToDOM(t){return function t(n,o){let l;return d(n).forEach(function(n){let c,d=n.tagName,u=n.textContent?e.doc.createTextNode(n.textContent):void 0,p=f.bypassHTMLFiltering;if(d)if("#text"===d)c=u;else if(-1!==f.allowedTags.indexOf(d)||p){let a="svg"===d?i:o.namespaceURI||i,l=e.doc.createElementNS(a,d),m=n.attributes||{};h(n,function(e,t){"tagName"!==t&&"attributes"!==t&&"children"!==t&&"style"!==t&&"textContent"!==t&&(m[t]=e)}),s(l,p?m:f.filterUserAttributes(m)),n.style&&r(l,n.style),u&&l.appendChild(u),t(n.children||[],l),c=l}else a(33,!1,void 0,{"Invalid tagName in config":d});c&&o.appendChild(c),l=c}),l}(this.nodes,t)}parseMarkup(e){let t,i=[];e=e.trim().replace(/ style=(["'])/g," data-style=$1");try{t=new DOMParser().parseFromString(p?p.createHTML(e):e,"text/html")}catch{}if(!t){let i=o("div");i.innerHTML=e,t={body:i}}let n=(e,t)=>{let i=e.nodeName.toLowerCase(),s={tagName:i};"#text"===i&&(s.textContent=e.textContent||"");let o=e.attributes;if(o){let e={};[].forEach.call(o,t=>{"data-style"===t.name?s.style=f.parseStyle(t.value):e[t.name]=t.value}),s.attributes=e}if(e.childNodes.length){let t=[];[].forEach.call(e.childNodes,e=>{n(e,t)}),t.length&&(s.children=t)}t.push(s)};return[].forEach.call(t.body.childNodes,e=>n(e,i)),i}}return f.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","disabled","dx","dy","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","result","role","rowspan","scope","slope","src","startOffset","stdDeviation","stroke-linecap","stroke-width","stroke","style","summary","tabindex","tableValues","target","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],f.allowedReferences=["https://","http://","mailto:","/","../","./","#"],f.allowedTags=["#text","a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","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","tbody","td","text","textPath","th","thead","title","tr","tspan","u","ul"],f.emptyHTML=m,f.bypassHTMLFiltering=!1,f}),i(t,"Dashboards/Globals.js",[],function(){var t,i;return(i=t||(t={})).classNamePrefix="highcharts-dashboards-",i.classNames={layout:i.classNamePrefix+"layout",cell:i.classNamePrefix+"cell",cellHover:i.classNamePrefix+"cell-state-hover",cellActive:i.classNamePrefix+"cell-state-active",cellLoading:i.classNamePrefix+"cell-state-loading",row:i.classNamePrefix+"row",layoutsWrapper:i.classNamePrefix+"layouts-wrapper",boardContainer:i.classNamePrefix+"wrapper"},i.guiElementType={row:"row",cell:"cell",layout:"layout"},i.boards=[],i.win=e,i.doc=document,i.noop=function(){},i.isMS=/(edge|msie|trident)/i.test(i.win.navigator&&i.win.navigator.userAgent||"")&&!i.win.opera,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}(),t}),i(t,"Dashboards/EditMode/EditGlobals.js",[t["Dashboards/Globals.js"]],function(e){let t=e.classNamePrefix+"edit-";return{classNames:{resizeSnap:t+"resize-snap",resizeSnapX:t+"resize-snap-x",resizeSnapY:t+"resize-snap-y",separator:t+"separator",contextMenuBtn:t+"context-menu-btn",contextMenuBtnText:t+"context-menu-btn-text",contextMenu:t+"context-menu",contextMenuItem:t+"context-menu-item",editModeEnabled:t+"enabled",editToolbar:t+"toolbar",editToolbarCellOutline:t+"toolbar-cell-outline",editToolbarRowOutline:t+"toolbar-row-outline",editToolbarItem:t+"toolbar-item",editToolbarRow:t+"toolbar-row",editToolbarCell:t+"toolbar-cell",editSidebar:t+"sidebar",editSidebarShow:t+"sidebar-show",editSidebarHide:t+"sidebar-hide",editSidebarHeader:t+"sidebar-header",editSidebarTitle:t+"sidebar-title",editSidebarMenuItem:t+"sidebar-item",rowContextHighlight:t+"row-context-highlight",cellEditHighlight:t+"cell-highlight",dashboardCellEditHighlightActive:t+"cell-highlight-active",dragMock:t+"drag-mock",dropPointer:t+"drop-pointer",contextDetectionPointer:t+"ctx-detection-pointer",resizePointer:t+"resize-pointer",currentEditedElement:t+"unmask",maskElement:t+"mask",menuItem:t+"menu-item",menu:t+"menu",menuVerticalSeparator:t+"menu-vertical-separator",menuHorizontalSeparator:t+"menu-horizontal-separator",menuDestroy:t+"menu-destroy",editSidebarWrapper:t+"sidebar-wrapper",customSelect:t+"custom-select",customSelectButton:t+"custom-option-button",toggleContainer:t+"toggle-container",toggleWrapper:t+"toggle-wrapper",toggleSlider:t+"toggle-slider",toggleWrapperColored:t+"toggle-wrapper-colored",toggleLabels:t+"toggle-labels",labeledToggleWrapper:t+"labeled-toggle-wrapper",button:t+"button",sidebarNavButton:t+"sidebar-button-nav",labelText:t+"label-text",editSidebarTabBtn:t+"sidebar-tab-btn",editToolsBtn:t+"tools-btn",editTools:t+"tools",editGridItems:t+"grid-items",confirmationPopup:t+"confirmation-popup",popupButtonContainer:t+"confirmation-popup-button-container",popupContentContainer:t+"confirmation-popup-content",popupCancelBtn:t+"confirmation-popup-cancel-btn",popupConfirmBtn:t+"confirmation-popup-confirm-btn",popupCloseButton:t+"popup-close",editOverlay:t+"overlay",editOverlayActive:t+"overlay-active",resizerMenuBtnActive:t+"resizer-menu-btn-active",sidebarCloseButton:t+"close-btn",editSidebarTabBtnWrapper:t+"tabs-buttons-wrapper",editSidebarRight:t+"sidebar-right",editSidebarRightShow:t+"sidebar-right-show",viewFullscreen:t+"view-fullscreen",accordionMenu:t+"accordion-menu",accordionContainer:t+"accordion",accordionHeader:t+"accordion-header",accordionHeaderBtn:t+"accordion-header-btn",accordionHeaderWrapper:t+"accordion-header-wrapper",accordionHeaderIcon:t+"accordion-header-icon",accordionContent:t+"accordion-content",accordionNestedWrapper:t+"accordion-nested",accordionMenuButtonsContainer:t+"accordion-menu-buttons-container",accordionMenuButton:t+"accordion-menu-button",accordionStandaloneWrapper:t+"accordion-standalone-wrapper",hiddenElement:t+"hidden-element",collapsableContentHeader:t+"collapsable-content-header",standaloneElement:t+"standalone-element",collapsedElement:t+"collapsed-element",dropdown:t+"dropdown",dropdownContent:t+"dropdown-content",dropdownButton:t+"dropdown-button",dropdownButtonContent:t+"dropdown-button-content",dropdownIcon:t+"pointer",icon:t+"icon"},lang:{accessibility:{contextMenu:{button:"Context menu"},editMode:{editMode:"Edit mode toggle button"}},addComponent:"Add component",cancelButton:"Cancel",caption:"Caption",chartClassName:"Chart class name",chartConfig:"Chart configuration",chartID:"Chart ID",chartOptions:"Chart options",chartType:"Chart type",connectorName:"Connector name",confirmButton:"Confirm",confirmDestroyCell:"Do you really want to destroy the cell?",confirmDestroyRow:"Do you really want to destroy the row?",confirmDiscardChanges:"Do you really want to discard the changes?",dataLabels:"Data labels",editMode:"Edit mode",errorMessage:"Something went wrong",exitFullscreen:"Exit full screen",htmlInput:"HTML",id:"Id",off:"off",on:"on",pointFormat:"Point format",settings:"Settings",style:"Styles",title:"Title",viewFullscreen:"View in full screen",sidebar:{HTML:"HTML",row:"Row",Highcharts:"Highcharts",DataGrid:"DataGrid",KPI:"KPI"}}}}),i(t,"Dashboards/Layout/GUIElement.js",[t["Dashboards/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{addEvent:i,createElement:n,uniqueKey:s,objectEach:o,error:r}=t;return class{static getOffsets(e,t){let i={left:0,top:0,right:0,bottom:0};if(!e.container)return i;let n=e.container.getBoundingClientRect(),s=t?t.getBoundingClientRect():{left:0,top:0};return i.left=n.left-s.left,i.top=n.top-s.top,i.right=n.right-s.left,i.bottom=n.bottom-s.top,i}static getDimFromOffsets(e){return{width:e.right-e.left,height:e.bottom-e.top}}static getElementId(t){return e.classNamePrefix+t+"-"+s().slice(11)}static getPercentageWidth(e){let t,i=/^(\d{1})[\-\/\.](\d{1,2})$/;if(i.test(e)){let n=e.match(i)||[];t=((t=100*n[1]/n[2])<=100?t:100)+"%"}else if(-1!==e.indexOf("%")){let i=parseFloat(e);t=(i<=100?i>=0?i:0:100)+"%"}return t}getElementContainer(e){let t,s=this;if(e.render)e.attribs&&!e.attribs.id&&delete e.attribs.id;else if("string"==typeof e.elementId){let t=document.getElementById(e.elementId);t?s.container=t:r("Element "+e.elementId+" does not exist")}return s.removeBindedEventFn=i(t=e.element instanceof HTMLElement?e.element:n("div",e.attribs||{},e.style||{},e.parentContainer),"bindedGUIElement",function(e){e.guiElement=s,e.stopImmediatePropagation()}),t}destroy(){let e=this;e.removeBindedEventFn&&e.removeBindedEventFn(),e.container&&e.container.parentNode&&e.container.parentNode.removeChild(e.container),o(e,function(t,i){delete e[i]})}getType(){return this.type}changeVisibility(e=!0,t){let i=this.isVisible&&!e||!this.isVisible&&e;this.container&&i&&(this.container.style.display=e?t||"block":"none",this.isVisible=e)}hide(){this.changeVisibility(!1)}show(){this.changeVisibility()}}}),i(t,"Dashboards/Layout/Cell.js",[t["Dashboards/EditMode/EditGlobals.js"],t["Dashboards/Globals.js"],t["Dashboards/Layout/GUIElement.js"],t["Core/Utilities.js"]],function(e,t,i,n){var s;let{merge:o,fireEvent:r}=n;class a extends i{constructor(e,i,n){let s;super(),this.type=t.guiElementType.cell,this.id=i.id,this.options=i,this.row=e,this.isVisible=!0;let r=document.getElementById(i.parentContainerId||"")||e.container,a=e.layout.options||{},l=e.options||{},c=a.cellClassName||"";i.height&&(s="number"==typeof i.height?i.height+"px":i.height),this.container=this.getElementContainer({render:e.layout.board.guiEnabled,parentContainer:r,attribs:{id:i.id,className:t.classNames.cell+" "+c},element:n,elementId:i.id,style:o(a.style,l.style,i.style,{height:s})}),this.options.layout&&this.setNestedLayout()}setNestedLayout(){let e=this.row.layout.board,t=this.row.layout.constructor,i=e.options.gui;this.nestedLayout=new t(e,o({},i&&i.layoutOptions,this.options.layout,{parentContainerId:this.options.id}),this)}destroy(){let{row:e}=this;this.mountedComponent?.destroy(),this.nestedLayout?.destroy(),e.unmountCell(this);let t=e.cells?.length===0;super.destroy(),t&&e.destroy()}getOptions(){return this.options}changeVisibility(e=!0){super.changeVisibility(e);let t=this,i=t.row;t.row.getVisibleCells().length?t.isVisible&&!i.isVisible&&t.row.show():t.row.hide(),setTimeout(()=>{r(i,"cellChange",{row:i,cell:t})},0)}getParentCell(e){let t;if(e<=this.row.layout.level){if(this.row.layout.level===e)return this;if(this.row.layout.level-1>=0&&(t=this.row.layout.parentCell))return t.getParentCell(e)}}getOverlappingLevels(e,t,n){let s=this.row.layout.parentCell,o=[this.row.layout.level];if(s){let r=n||i.getOffsets(this)[e],a=i.getOffsets(s)[e];Math.abs(r-a)<t&&(o=[...o,...s.getOverlappingLevels(e,t,a)])}return o}setSize(e,t){let i=this.row.layout.board.editMode;if(this.container){if(e)if("auto"===e&&"1 1 0%"!==this.container.style.flex)this.container.style.flex="1 1 0%";else{let t=this.convertWidthToValue(e);t&&this.container.style.flex!=="0 0 "+t&&(this.container.style.flex="0 0 "+t),this.options.width=t}t&&(this.options.height=this.container.style.height=t+"px"),i&&(i.hideContextPointer(),i.cellToolbar&&i.cellToolbar.isVisible&&(i.cellToolbar.cell===this?i.cellToolbar.showToolbar(this):i.cellToolbar.hide())),r(this.row.layout.board,"cellResize",{cell:this}),r(this.row,"cellChange",{cell:this,row:this.row})}}setHighlight(t){let i=this.row?.layout.board.editMode;if(this.container&&i){let i=this.container,n=i.classList.contains(e.classNames.cellEditHighlight);t||n?t&&n&&(i.classList.remove(e.classNames.cellEditHighlight),this.row.layout.board.container.classList.remove(e.classNames.dashboardCellEditHighlightActive),this.isHighlighted=!1):(i.classList.add(e.classNames.cellEditHighlight),this.row.layout.board.container.classList.add(e.classNames.dashboardCellEditHighlightActive),this.isHighlighted=!0)}}setActiveState(){this.row.layout.board.mountedComponents.forEach(e=>{e.cell.container&&e.cell.container.classList.remove(t.classNames.cellActive),e.component.isActive=!1}),this.container&&this.container.classList.add(t.classNames.cellActive)}setLoadingState(e=!0){this.container?.classList?.toggle(t.classNames.cellLoading,e)}convertWidthToValue(e){return"number"==typeof e?e+"px":/px/.test(e)?e:i.getPercentageWidth(e)||""}}return(s=a||(a={})).isCell=function(e){return e instanceof s},a}),i(t,"Dashboards/CallbackRegistry.js",[],function(){return class{constructor(){this.registry={}}addCallback(e,t){this.registry[e]=t}getCallback(e){return this.registry[e]}toJSON(){let e={};return Object.keys(this.registry).forEach(t=>{let{func:i,type:n}=this.getCallback(t);e[t]={func:i.toString(),type:n}}),e}}}),i(t,"Dashboards/Components/ConnectorHandler.js",[t["Dashboards/Layout/Cell.js"],t["Dashboards/Globals.js"]],function(e,t){return class{constructor(e,t){this.tableEvents=[],this.component=e,this.options=t}async initConnector(){let t=this.component,i=this.options.id,n=this.component.board.dataPool;if(i&&(this.connectorId!==i||n.isNewConnector(i))){e.isCell(t.cell)&&t.cell.setLoadingState();let s=await n.getConnector(i);this.destroyed||this.setConnector(s)}return t}setTable(e){this.clearTableListeners(e),this.setupTableListeners(e),e.on("setModifier",()=>this.clearTableListeners(e)),e.on("afterSetModifier",e=>{"afterSetModifier"===e.type&&e.modified&&(this.setupTableListeners(e.modified),this.component.emit({type:"tableChanged",connector:this.connector}))}),this.presentationModifier?this.presentationTable=this.presentationModifier.modifyTable(e.modified.clone()).modified:this.presentationTable=e}setConnector(e){for(;this.tableEvents.length;){let e=this.tableEvents.pop();"function"==typeof e&&e()}if(this.connector=e,e){let t=e.dataTables;this.options.dataTableKey?this.setTable(t[this.options.dataTableKey]):this.setTable(Object.values(t)[0])}return this.addConnectorAssignment(),this.component}setupTableListeners(e){let i=this.connector;i&&e&&["afterDeleteRows","afterSetCell","afterSetColumns","afterSetRows"].forEach(n=>{this.tableEvents.push(e.on(n,e=>{clearTimeout(this.tableEventTimeout),this.tableEventTimeout=t.win.setTimeout(()=>{this.component.emit({...e,type:"tableChanged",targetConnector:i}),this.tableEventTimeout=void 0})}))})}clearTableListeners(e){let i=this.connector,n=this.tableEvents;this.removeTableEvents(),i&&n.push(e.on("afterSetModifier",e=>{"afterSetModifier"===e.type&&(clearTimeout(this.tableEventTimeout),this.tableEventTimeout=t.win.setTimeout(()=>{i.emit({...e,type:"tableChanged",targetConnector:i}),this.tableEventTimeout=void 0}))}))}addConnectorAssignment(){let{connector:e}=this;if(e&&(e.components||(e.components=[]),!e.components.includes(this.component))){let t=e.options;e.components.push(this.component),"enablePolling"in t&&t.enablePolling&&!e.polling&&1===e.components.length&&"dataRefreshRate"in t&&e.startPolling(1e3*Math.max(t.dataRefreshRate||0,1))}}removeConnectorAssignment(){let{connector:e}=this;if(!e?.components)return;let t=e.components.indexOf(this.component);t>-1&&(e.components.splice(t,1),e.components.length||(e.stopPolling(),delete e.components))}removeTableEvents(){this.tableEvents.forEach(e=>e()),this.tableEvents.length=0}updateOptions(e){this.options=e}destroy(){this.destroyed=!0,this.removeConnectorAssignment(),this.removeTableEvents()}}}),i(t,"Dashboards/Components/EditableOptions.js",[],function(){class e{constructor(t,i=e.defaultBindings){this.component=t,this.bindings=i}getOptions(){let e=this.component.options.editableOptions;if(!e)return[];for(let t=0,i=e.length;t<i;t++){let i=e[t];if(i.propertyPath?.some(e=>"connector"===e)){let e=this.component.board;i.selectOptions=e?e.dataPool.getConnectorIds().map(e=>({name:e})):[]}}return e}}return e.defaultBindings={keyMap:{color:"colorPicker",title:"text",caption:"text",style:"textarea"},typeMap:{string:"text",number:"input",boolean:"toggle"},skipRedraw:[]},e.defaultTypeMap={string:"text",number:"input",boolean:"toggle"},e}),i(t,"Dashboards/Components/Sync/Emitter.js",[],function(){class e{static register(e){let{id:t}=e;this.registry[t]=e}static get(e){return this.registry[e]}constructor(t,i){this.id=t,this.func=i,e.register(this)}create(e){this.callback=this.func.call(e)}remove(){this.callback&&this.callback()}}return e.registry={},e}),i(t,"Dashboards/Components/Sync/Handler.js",[],function(){class e{static register(e){let{id:t}=e;this.registry[t]=e}static get(e){return this.registry[e]}constructor(t,i){this.id=t,this.func=i,e.register(this)}register(e){let{func:t}=this;this.callback=t.call(e)}remove(){this.callback&&this.callback()}}return e.registry={},e}),i(t,"Dashboards/Components/Sync/Sync.js",[t["Dashboards/Components/Sync/Emitter.js"],t["Dashboards/Components/Sync/Handler.js"],t["Core/Utilities.js"]],function(e,t,i){let{merge:n,isObject:s}=i;class o{constructor(e,t){this.component=e,this.predefinedSyncConfig=t,this.syncConfig=o.prepareSyncConfig(t,e.options.sync),this.registeredSyncHandlers={},this.registeredSyncEmitters={},this.isSyncing=!1,this.listeners=[]}static prepareSyncConfig(e,t={}){let{defaultSyncPairs:i,defaultSyncOptions:o}=e;return Object.keys(t).reduce((e,r)=>{if(r){let a=i[r],l=o[r],c=t[r],h=n(l||{},{enabled:s(c)?c.enabled:c},s(c)?c:{});if(a&&h.enabled)for(let e of["emitter","handler"])(!0===h[e]||void 0===h[e])&&(h[e]=a[e]);e[r]=h}return e},{})}registerSyncEmitter(e){let{id:t}=e;this.registeredSyncEmitters[t]=e}isRegisteredEmitter(e){return!!this.registeredSyncEmitters[e]}registerSyncHandler(e){let{id:t}=e;this.registeredSyncHandlers[t]=e}isRegisteredHandler(e){return!!this.registeredSyncHandlers[e]}start(){let{component:i}=this;for(let n of(this.syncConfig=o.prepareSyncConfig(this.predefinedSyncConfig,i.options.sync),Object.keys(this.syncConfig))){let s=this.syncConfig[n];if(!s)continue;let{emitter:r,handler:a}=s;if(a){!0===a&&(a=o.defaultHandlers[n].handler);let e=new t(n,a);this.isRegisteredHandler(e.id)||(this.registerSyncHandler(e),e.register(i))}if(r){!0===r&&(r=o.defaultHandlers[n].emitter);let t=new e(n,r);this.isRegisteredEmitter(t.id)||(this.registerSyncEmitter(t),t.create(i))}}this.isSyncing=!0,this.listeners.push(i.on("update",()=>this.stop()))}stop(){let{component:e,listeners:t,registeredSyncHandlers:i,registeredSyncEmitters:n}=this;Object.keys(i).forEach(e=>{i[e].remove(),delete i[e]}),Object.keys(n).forEach(e=>{n[e].remove(),delete n[e]}),this.isSyncing=!1;for(let e=0,i=t.length;e<i;++e)t[e]();this.listeners.length=0,this.listeners.push(e.on("afterUpdate",()=>{this.start()}))}}return o.defaultHandlers={},o}),i(t,"Dashboards/Components/ComponentUtilities.js",[],function(){var t,i=t||(t={});function n(t,i){let n=e.getComputedStyle(t);return i.map(e=>n[e])}function s(e,t){return t&&(e+="number"==typeof t?t:parseFloat(t)),e}return i.getMargins=function(e,t=!0){let i={x:["borderLeft","borderRight"],y:["borderTop","borderBottom"]};return{y:n(e,["marginTop","marginBottom",...t?i.y:[]]).reduce(s,0),x:n(e,["marginLeft","marginTop",...t?i.x:[]]).reduce(s,0)}},i.getPaddings=function(e){return{x:n(e,["paddingLeft","paddingRight"]).reduce(s,0),y:n(e,["paddingTop","paddingBottom"]).reduce(s,0)}},i.getStyles=n,i.sumPixels=s,t}),i(t,"Dashboards/Utilities.js",[t["Dashboards/Globals.js"],t["Core/Utilities.js"]],function(e,t){let{doc:i,supportsPassiveEvents:n}=e,{error:s,isClass:o,isDOMElement:r,isObject:a,objectEach:l,uniqueKey:c}=t;function h(e,t){let i;for(i in e||(e={}),t)e[i]=t[i];return e}function d(e,t,i){function n(t,i){let n=e.removeEventListener;n&&n.call(e,t,i,!1)}function s(i){let s,o;e.nodeName&&(t?(s={})[t]=!0:s=i,l(s,function(e,t){if(i[t])for(o=i[t].length;o--;)n(t,i[t][o].fn)}))}let o="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(o,"hcEvents")){let e=o.hcEvents;if(t){let o=e[t]||[];i?(e[t]=o.filter(function(e){return i!==e.fn}),n(t,i)):(s(e),e[t]=[])}else s(e),delete o.hcEvents}}return{addEvent:function(e,t,i,s={}){let o="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents,a=e.addEventListener;a&&a.call(e,t,i,!!n&&{passive:void 0===s.passive?-1!==t.indexOf("touch"):s.passive,capture:!1}),r[t]||(r[t]=[]);let l={fn:i,order:"number"==typeof s.order?s.order:1/0};return r[t].push(l),r[t].sort((e,t)=>e.order-t.order),function(){d(e,t,i)}},deepClone:function e(t,i){if(Array.isArray(t))return t.map(t=>e(t,i));if(t&&"object"==typeof t){let n={};for(let s of Object.keys(t))i&&i.includes(s)?n[s]=t[s]:n[s]=e(t[s],i);return n}return t},error:function(e,t){if(16===e)return void console.warn("Dashboard error: Dashboards library loaded more than once.This may cause undefined behavior.");s(e,t)},fireEvent:function(t,n,s,o){if(s=s||{},i?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==e)){let e=i.createEvent("Events");e.initEvent(n,!0,!0),s=h(e,s),t.dispatchEvent?t.dispatchEvent(s):t.fireEvent(n,s)}else if(t.hcEvents){s.target||h(s,{preventDefault:function(){s.defaultPrevented=!0},target:t,type:n});let e=[],i=t,o=!1;for(;i.hcEvents;)Object.hasOwnProperty.call(i,"hcEvents")&&i.hcEvents[n]&&(e.length&&(o=!0),e.unshift.apply(e,i.hcEvents[n])),i=Object.getPrototypeOf(i);o&&e.sort((e,t)=>e.order-t.order),e.forEach(e=>{!1===e.fn.call(t,s)&&s.preventDefault()})}o&&!s.defaultPrevented&&o.call(t,s)},merge:function(e,...t){let i=0,n={},s=Error("Recursive copy depth > 100"),c=(e,t)=>{if("object"!=typeof e&&(e={}),++i>100)throw s;return l(t,(i,n)=>{"__proto__"!==n&&"constructor"!==n&&(!a(i,!0)||o(i)||r(i)?e[n]=t[n]:e[n]=c(e[n]||{},i))}),--i,e};!0===e?n=t.shift():t.unshift(e);for(let e=0,i=t.length;e<i;++e)n=c(n,t[e]);return n},removeEvent:d,uniqueKey:function(){return`dashboard-${c().replace("highcharts-","")}`}}}),i(t,"Dashboards/Components/Component.js",[t["Dashboards/Layout/Cell.js"],t["Dashboards/CallbackRegistry.js"],t["Dashboards/Components/ConnectorHandler.js"],t["Dashboards/Components/EditableOptions.js"],t["Dashboards/Components/Sync/Sync.js"],t["Dashboards/Globals.js"],t["Core/Utilities.js"],t["Dashboards/Components/ComponentUtilities.js"],t["Dashboards/Utilities.js"]],function(t,i,n,s,o,r,a,l,c){let{classNamePrefix:h}=r,{createElement:d,isArray:u,merge:p,fireEvent:m,addEvent:f,objectEach:g,isFunction:y,getStyle:b,diffObjects:C,removeEvent:v}=a,{getMargins:w,getPaddings:T}=l,{deepClone:O,uniqueKey:D}=c;class x{static createTextElement(e,t,i){if("object"==typeof i){let{className:n,text:s,style:o}=i;return d(e,{className:n||`${h}component-${t}`,textContent:s},o)}if("string"==typeof i)return d(e,{className:`${h}component-${t}`,textContent:i},{})}constructor(e,r,a){this.connectorHandlers=[],this.callbackRegistry=new i,this.cellListeners=[],this.resizeTimeouts=[],this.innerResizeTimeouts=[];let l=r.renderTo||r.cell;if(this.board=a||e?.row?.layout?.board||{},this.parentElement=e?.container||document.querySelector("#"+l),this.cell=e,this.options=p(x.defaultOptions,r),this.id=this.options.id&&this.options.id.length?this.options.id:D(),this.options.connector)for(let e of u(this.options.connector)?this.options.connector:[this.options.connector])this.connectorHandlers.push(new n(this,e));this.editableOptions=new s(this,r.editableOptionsBindings),this.dimensions={width:null,height:null},this.element=d("div",{className:this.options.className},{},this.parentElement),Number(b(this.element,"padding"))||(this.element.style.padding="0.1px"),this.contentElement=d("div",{className:`${this.options.className}-content`},{},this.element,!0),this.sync=new o(this,this.constructor.predefinedSyncConfig),this.setupEventListeners(),e&&(this.attachCellListeners(),this.on("update",()=>{t.isCell(this.cell)&&this.cell.setLoadingState()}),this.on("afterRender",()=>{t.isCell(this.cell)&&this.cell.setLoadingState(!1)})),this.on("tableChanged",()=>{this.onTableChanged()})}getOptionsOnDrop(e){return{}}getFirstConnector(){return this.connectorHandlers[0]?.connector}attachCellListeners(){for(;this.cellListeners.length;){let e=this.cellListeners.pop();e&&e()}if(this.cell&&t.isCell(this.cell)&&Object.keys(this.cell).length){let e=this.cell.row.layout.board;this.cellListeners.push(f(e,"cellResize",()=>{this.resizeTo(this.parentElement)}),f(this.cell.row,"cellChange",e=>{let{row:t}=e;t&&this.cell&&void 0===t.getCellIndex(this.cell)&&this.cell&&this.setCell(this.cell)}))}}setCell(e,t=!1){this.cell=e,e.container&&(this.parentElement=e.container),this.attachCellListeners(),t&&this.resizeTo(this.parentElement)}async initConnectors(){for(let e of(m(this,"setConnectors",{connectorHandlers:this.connectorHandlers}),this.connectorHandlers))await e.initConnector();return m(this,"afterSetConnectors",{connectorHandlers:this.connectorHandlers}),this}getContentHeight(){return(this.titleElement?this.titleElement.clientHeight+w(this.titleElement).y:0)+(this.captionElement?this.captionElement.clientHeight+w(this.captionElement).y:0)}resize(e,t){if(t){let e=T(this.element).y+w(this.element).y;this.element.style.height="calc(100% - "+e+"px)",this.contentElement.style.height="calc(100% - "+this.getContentHeight()+"px)"}else null===t&&(this.dimensions.height=null,this.element.style.removeProperty("height"));m(this,"resize",{width:e,height:t})}resizeDynamicContent(e,t){let{element:i}=this;if(t){let e=w(i).y,n=T(i).y;"string"==typeof t&&(t=parseFloat(t)),t=Math.round(t),i.style.height=`${t-e-n}px`,this.contentElement.style.height=`${i.clientHeight-this.getContentHeight()-n}px`}else null===t&&(this.dimensions.height=null,i.style.removeProperty("height"));m(this,"resize",{width:e,height:t})}resizeTo(e){for(;this.resizeTimeouts.length;){let e=this.resizeTimeouts.pop();e&&cancelAnimationFrame(e)}let t=requestAnimationFrame(()=>{let{width:t,height:i}=e.getBoundingClientRect(),n=T(e),s=w(e);this.resize(t-n.x-s.x,i-n.y-s.y)});this.resizeTimeouts.push(t)}async update(e,t=!0){let i={options:e,shouldForceRerender:!1};m(this,"update",i),e.connector&&Array.isArray(this.options.connector)&&(this.options.connector=void 0),this.options=p(this.options,e);let s=this.options.connector?u(this.options.connector)?this.options.connector:[this.options.connector]:[],o=s.length!==this.connectorHandlers.length;if(!o)for(let e=0,t=s.length;e<t;e++){let t=this.connectorHandlers[e]?.options,i=s[e];if(i?.id!==t?.id||i?.dataTableKey!==t?.dataTableKey){o=!0;break}this.connectorHandlers[e].updateOptions(s[e])}if(o){for(let e of this.connectorHandlers)e.destroy();for(let e of(this.connectorHandlers.length=0,s))this.connectorHandlers.push(new n(this,e));await this.initConnectors()}(t||i.shouldForceRerender)&&this.render()}setupEventListeners(){let t=this.options.events;t&&(Object.keys(t).forEach(e=>{let i=t[e];i&&this.callbackRegistry.addCallback(e,{type:"component",func:i})}),g(t,(e,t)=>{y(e)&&this.on(t,e)}));let i=()=>{this.resizeTo(this.parentElement)};if("function"==typeof ResizeObserver)this.resizeObserver=new ResizeObserver(i),this.resizeObserver.observe(this.element);else{let t=f(e,"resize",i);f(this,"destroy",t)}}setTitle(e){let t=this.titleElement;if(e&&("string"==typeof e||e.text)){let i=x.createTextElement("h2","title",e);i&&(t?t.replaceWith(i):this.element.insertBefore(i,this.element.firstChild),this.titleElement=i)}else if(t){t.remove(),delete this.titleElement;return}}setCaption(e){let t=this.captionElement;if(e&&("string"==typeof e||e.text)){let i=x.createTextElement("div","caption",e);i&&(t?t.replaceWith(i):this.element.appendChild(i),this.captionElement=i)}else if(t){t.remove(),delete this.captionElement;return}}async load(){return await this.initConnectors(),this.render(),this}render(){return this.emit({type:"render"}),this.setTitle(this.options.title),this.setCaption(this.options.caption),this.resizeTo(this.parentElement),this}destroy(){for(this.sync.isSyncing&&this.sync.stop();this.element.firstChild;)this.element.firstChild.remove();for(let e of(m(this,"unmount"),this.connectorHandlers))e.destroy();v(this),this.element.remove()}on(e,t){return f(this,e,t)}emit(e){e.target||(e.target=this),m(this,e.type,e)}getOptions(){return C(this.options,x.defaultOptions)}getEditableOptions(){return O(this.options,["dataTable","points","series","data","editableOptions"])}getEditableOptionValue(e){if(!e)return;let t=this.getEditableOptions();for(let i=0,n=e.length;i<n;i++){if(u(t)&&"connector"===e[0]&&t.length>1)return"multiple connectors";if(!t)return;!1===(t=t[e[i]])&&(e.indexOf("title")>=0||e.indexOf("subtitle")>=0||e.indexOf("caption")>=0)&&(t="")}return t}}return x.Sync=o,x.predefinedSyncConfig={defaultSyncOptions:{},defaultSyncPairs:{}},x.defaultOptions={className:`${h}component`,id:"",title:!1,caption:!1,sync:o.defaultHandlers,editableOptions:[{name:"title",propertyPath:["title"],type:"input"},{name:"caption",propertyPath:["caption"],type:"input"}]},x}),i(t,"Dashboards/Components/HTMLComponent/HTMLComponentDefaults.js",[t["Dashboards/Components/Component.js"]],function(e){return{type:"HTML",className:[e.defaultOptions.className,`${e.defaultOptions.className}-html`].join(" "),elements:[],editableOptions:[...e.defaultOptions.editableOptions||[],{name:"htmlInput",propertyPath:["html"],type:"textarea"}]}}),i(t,"Dashboards/Components/HTMLComponent/HTMLSyncs/HTMLSyncs.js",[],function(){return{defaultSyncPairs:{},defaultSyncOptions:{}}}),i(t,"Dashboards/Components/HTMLComponent/HTMLComponent.js",[t["Core/Renderer/HTML/AST.js"],t["Dashboards/Components/Component.js"],t["Dashboards/Components/HTMLComponent/HTMLComponentDefaults.js"],t["Dashboards/Components/HTMLComponent/HTMLSyncs/HTMLSyncs.js"],t["Dashboards/Utilities.js"],t["Core/Utilities.js"]],function(e,t,i,n,s,o){let{merge:r,diffObjects:a}=o,{deepClone:l}=s;e.allowedTags=[...e.allowedTags,"option","select","label","input","textarea"],e.allowedAttributes=[...e.allowedAttributes,"for","value","checked","src","name","selected"],e.allowedReferences=[...e.allowedReferences,"data:image/"];class c extends t{constructor(e,t){t.className&&(t.className=`${c.defaultOptions.className} ${t.className}`),super(e,t=r(c.defaultOptions,t)),this.options=t,this.type="HTML",this.elements=[]}async load(){this.emit({type:"load"}),await super.load();let t=this.options,i=!1;if(t.elements?.length?this.elements=t.elements.map(function(t){return"string"==typeof t?new e(t).nodes[0]:(t.textContent||t.tagName||!t.attributes||(i=!0),t)}):t.html&&(this.elements=this.getElementsFromString(t.html),this.options.elements=this.elements),this.constructTree(),this.emit({type:"afterLoad"}),i)throw Error(`Missing tagName param in component: ${t.renderTo}`);return this}render(){return super.render(),this.constructTree(),this.sync.start(),this.emit({type:"afterRender"}),this}resize(e,t){return super.resize(e,t),this}async update(e,t=!0){e.html?(this.elements=this.getElementsFromString(e.html),this.options.elements=this.elements,this.constructTree()):e.elements&&(this.elements=e.elements),await super.update(e,t),this.emit({type:"afterUpdate"})}getOptionsOnDrop(){return{cell:"",type:"HTML",elements:[{tagName:"span",textContent:"[Your custom HTML here- edit the component]"}]}}constructTree(){for(;this.contentElement.firstChild;)this.contentElement.firstChild.remove();new e(this.options.elements||[]).addToDOM(this.contentElement)}getElementsFromString(t){return new e(t).nodes}getOptions(){return{...a(this.options,c.defaultOptions),type:"HTML"}}getEditableOptions(){return l(this.options,["editableOptions"])}getEditableOptionValue(e){if(e){if("html"===e[0]){let t=this.getEditableOptions();return!t.html&&t.elements?this.getStringFromElements(t.elements):t[e[0]]}return super.getEditableOptionValue(e)}}getStringFromElements(e){let t="";for(let i of e)t+=this.serializeNode(i);return t}serializeNode(e){if(!e.tagName||"#text"===e.tagName)return e.textContent||"";let t=e.attributes,i=`<${e.tagName}`;if(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];void 0!==n&&(i+=` ${e}="${n}"`)}}return i+=">",i+=e.textContent||"",(e.children||[]).forEach(e=>{i+=this.serializeNode(e)}),i+=`</${e.tagName}>`}onTableChanged(e){e.detail?.sender!==this.id&&this.render()}}return c.defaultOptions=r(t.defaultOptions,i),c.predefinedSyncConfig=n,c}),i(t,"Data/ColumnUtils.js",[],function(){var e,t;return(t=e||(e={})).setLength=function(e,t,i){return Array.isArray(e)?(e.length=t,e):e[i?"subarray":"slice"](0,t)},t.splice=function(e,t,i,n,s=[]){if(Array.isArray(e))return Array.isArray(s)||(s=Array.from(s)),{removed:e.splice(t,i,...s),array:e};let o=Object.getPrototypeOf(e).constructor,r=e[n?"subarray":"slice"](t,t+i),a=new o(e.length-i+s.length);return a.set(e.subarray(0,t),0),a.set(s,t),a.set(e.subarray(t+i),t+s.length),{removed:r,array:a}},e}),i(t,"Data/DataTableCore.js",[t["Data/ColumnUtils.js"],t["Core/Utilities.js"]],function(e,t){let{setLength:i,splice:n}=e,{fireEvent:s,objectEach:o,uniqueKey:r}=t;return class{constructor(e={}){this.autoId=!e.id,this.columns={},this.id=e.id||r(),this.modified=this,this.rowCount=0,this.versionTag=r();let t=0;o(e.columns||{},(e,i)=>{this.columns[i]=e.slice(),t=Math.max(t,e.length)}),this.applyRowCount(t)}applyRowCount(e){this.rowCount=e,o(this.columns,(t,n)=>{t.length!==e&&(this.columns[n]=i(t,e))})}deleteRows(e,t=1){if(t>0&&e<this.rowCount){let i=0;o(this.columns,(s,o)=>{this.columns[o]=n(s,e,t).array,i=s.length}),this.rowCount=i}s(this,"afterDeleteRows",{rowIndex:e,rowCount:t}),this.versionTag=r()}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,n){this.setColumns({[e]:t},i,n)}setColumns(e,t,i){let n=this.rowCount;o(e,(e,t)=>{this.columns[t]=e.slice(),n=e.length}),this.applyRowCount(n),i?.silent||(s(this,"afterSetColumns"),this.versionTag=r())}setRow(e,t=this.rowCount,i,a){let{columns:l}=this,c=i?this.rowCount+1:t+1;o(e,(e,s)=>{let o=l[s]||a?.addColumns!==!1&&Array(c);o&&(i?o=n(o,t,0,!0,[e]).array:o[t]=e,l[s]=o)}),c>this.rowCount&&this.applyRowCount(c),a?.silent||(s(this,"afterSetRows"),this.versionTag=r())}}}),i(t,"Data/DataTable.js",[t["Data/ColumnUtils.js"],t["Data/DataTableCore.js"],t["Core/Utilities.js"]],function(e,t,i){let{addEvent:n,defined:s,extend:o,fireEvent:r,isNumber:a,uniqueKey:l}=i;class c extends t{static isNull(e){if(e===c.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,n=t.length;i<n;++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 n=new c(i);return e||(n.versionTag=this.versionTag,n.originalRowIndexes=this.originalRowIndexes,n.localRowIndexes=this.localRowIndexes),this.emit({type:"afterCloneTable",detail:t,tableClone:n}),n}deleteColumns(e,t){let i=this.columns,n={},s={},o=this.modifier,r=this.rowCount;if((e=e||Object.keys(i)).length){this.emit({type:"deleteColumns",columnNames:e,detail:t});for(let t=0,o=e.length,a,l;t<o;++t)(a=i[l=e[t]])&&(n[l]=a,s[l]=Array(r)),delete i[l];return Object.keys(i).length||(this.rowCount=0,this.deleteRowIndexReferences()),o&&o.modifyColumns(this,s,0,t),this.emit({type:"afterDeleteColumns",columns:n,columnNames:e,detail:t}),n}}deleteRowIndexReferences(){delete this.originalRowIndexes,delete this.localRowIndexes}deleteRows(t,i=1,n){let s=[],o=[],r=this.modifier;if(this.emit({type:"deleteRows",detail:n,rowCount:i,rowIndex:t||0}),void 0===t&&(t=0,i=this.rowCount),i>0&&t<this.rowCount){let n=this.columns,r=Object.keys(n);for(let a=0,l=r.length,c,h,d;a<l;++a){c=n[d=r[a]];let u=e.splice(c,t,i);h=u.removed,n[d]=c=u.array,a||(this.rowCount=c.length);for(let e=0,t=h.length;e<t;++e)s[e]=s[e]||[],s[e][a]=h[e];o.push(Array(l))}}return r&&r.modifyRows(this,o,t||0,n),this.emit({type:"afterDeleteRows",detail:n,rowCount:i,rowIndex:t||0,rows:s}),s}emit(e){["afterDeleteColumns","afterDeleteRows","afterSetCell","afterSetColumns","afterSetRows"].includes(e.type)&&(this.versionTag=l()),r(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 n=this.columns[e],s=n&&n[t];switch(typeof s){case"boolean":return+!!s;case"number":return isNaN(s)&&!i?null:s}return isNaN(s=parseFloat(`${s??""}`))&&!i?null:s}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],n=[];if(i){let s=i.length;if(t)for(let t=0;t<s;++t)n.push(this.getCellAsNumber(e,t,!0));else{for(let e=0,t;e<s;++e){if("number"==typeof(t=i[e]))return i.slice();if(null!=t)break}for(let t=0;t<s;++t)n.push(this.getCellAsNumber(e,t))}}return n}getColumnNames(){return Object.keys(this.columns)}getColumns(e,t,i){let n=this.columns,s={};e=e||Object.keys(n);for(let o=0,r=e.length,a,l;o<r;++o)(a=n[l=e[o]])&&(t?s[l]=a:i&&!Array.isArray(a)?s[l]=Array.from(a):s[l]=a.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 n=this.columns[e];if(n){let e=-1;if(Array.isArray(n)?e=n.indexOf(t,i):a(t)&&(e=n.indexOf(t,i)),-1!==e)return e}}getRowObject(e,t){return this.getRowObjects(e,1,t)[0]}getRowObjects(e=0,t=this.rowCount-e,i){let n=this.columns,s=Array(t);i=i||Object.keys(n);for(let o=e,r=0,a=Math.min(this.rowCount,e+t),l,c;o<a;++o,++r)for(let e of(c=s[r]={},i))l=n[e],c[e]=l?l[o]:void 0;return s}getRows(e=0,t=this.rowCount-e,i){let n=this.columns,s=Array(t);i=i||Object.keys(n);for(let o=e,r=0,a=Math.min(this.rowCount,e+t),l,c;o<a;++o,++r)for(let e of(c=s[r]=[],i))l=n[e],c.push(l?l[o]:void 0);return s}getVersionTag(){return this.versionTag}hasColumns(e){let t=this.columns;for(let i=0,n=e.length;i<n;++i)if(!t[e[i]])return!1;return!0}hasRowWith(e,t){let i=this.columns[e];return Ar