@hpcc-js/composite 3.2.12 → 3.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.cjs","sources":["../../layout/dist/index.js","../src/Utility.ts","../src/MultiChart.ts","../src/ChartPanel.ts","../src/Dermatology.ts","../src/MegaChart.ts","../src/Persist.ts","../src/__package__.ts"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nimport { HTMLWidget, FAChar, select, selectAll, Utility, d3Event, Platform, drag, scaleLinear, dispatch, formatPrefix, format, formatLocale, formatSpecifier, sum, SVGWidget, Database, Palette, scaleOrdinal, ProgressBar, ToggleButton, Text, Button, Spacer, TitleBar, IconBar } from \"@hpcc-js/common\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { instanceOfIHighlight } from \"@hpcc-js/api\";\nfunction _mergeNamespaces(n, m) {\n for (var i = 0; i < m.length; i++) {\n const e = m[i];\n if (typeof e !== \"string\" && !Array.isArray(e)) {\n for (const k2 in e) {\n if (k2 !== \"default\" && !(k2 in n)) {\n const d = Object.getOwnPropertyDescriptor(e, k2);\n if (d) {\n Object.defineProperty(n, k2, d.get ? d : {\n enumerable: true,\n get: /* @__PURE__ */ __name(() => e[k2], \"get\")\n });\n }\n }\n }\n }\n }\n return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }));\n}\n__name(_mergeNamespaces, \"_mergeNamespaces\");\nconst PKG_NAME = \"@hpcc-js/layout\";\nconst PKG_VERSION = \"3.1.1\";\nconst BUILD_VERSION = \"3.2.1\";\nconst _AbsoluteSurface = class _AbsoluteSurface extends HTMLWidget {\n constructor() {\n super();\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element) {\n super.update(domNode, element);\n let xPos = 0;\n let yPos = 0;\n let width = this.clientWidth();\n let height = this.clientHeight();\n switch (this.units()) {\n case \"pixels\":\n xPos = this.widgetX();\n yPos = this.widgetY();\n width = this.widgetWidth() === \"\" ? width - xPos : Number(this.widgetWidth());\n height = this.widgetHeight() === \"\" ? height - yPos : Number(this.widgetHeight());\n break;\n case \"percent\":\n xPos = this.widgetX() * width / 100;\n yPos = this.widgetY() * height / 100;\n width = this.widgetWidth() === \"\" ? width - xPos : Number(this.widgetWidth()) * width / 100;\n height = this.widgetHeight() === \"\" ? height - yPos : Number(this.widgetHeight()) * height / 100;\n break;\n }\n element.style(\"opacity\", this.opacity());\n const widgets = element.selectAll(\"#\" + this._id + \" > .placeholder\").data(this.widget() ? [this.widget()] : [], function(d) {\n return d._id;\n });\n widgets.enter().append(\"div\").attr(\"class\", \"placeholder\").each(function(d) {\n d.target(this);\n }).merge(widgets).style(\"left\", xPos + \"px\").style(\"top\", yPos + \"px\").style(\"width\", width + \"px\").style(\"bottom\", height + \"px\").each(function(d) {\n d.resize({ width, height });\n });\n widgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n};\n__name(_AbsoluteSurface, \"AbsoluteSurface\");\nlet AbsoluteSurface = _AbsoluteSurface;\nAbsoluteSurface.prototype._class += \" layout_AbsoluteSurface\";\nAbsoluteSurface.prototype.publish(\"units\", \"percent\", \"set\", \"Units\", [\"pixels\", \"percent\"]);\nAbsoluteSurface.prototype.publish(\"widgetX\", 0, \"number\", \"Widget XPos\");\nAbsoluteSurface.prototype.publish(\"widgetY\", 0, \"number\", \"Widget YPos\");\nAbsoluteSurface.prototype.publish(\"widgetWidth\", \"100\", \"string\", \"Widget Width, omit for full\");\nAbsoluteSurface.prototype.publish(\"widgetHeight\", \"100\", \"string\", \"Widget Height, omit for full\");\nAbsoluteSurface.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Private\"] });\nAbsoluteSurface.prototype.publish(\"opacity\", 1, \"number\", \"Opacity\");\nconst _Accordion = class _Accordion extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_isClosed\");\n __publicField(this, \"titleSpan\");\n __publicField(this, \"iconDiv\");\n __publicField(this, \"ul\");\n __publicField(this, \"icon\");\n this._tag = \"div\";\n this._isClosed = false;\n }\n pushListItem(widget, prepend = false, protect = false) {\n const contentArr = this.content();\n widget._protected = protect;\n if (prepend) {\n contentArr.unshift(widget);\n } else {\n contentArr.push(widget);\n }\n this.content(contentArr);\n return this;\n }\n clearListItems() {\n const arr = [];\n for (const i in this.content()) {\n if (this.content()[i]._protected) {\n arr.push(this.content()[i]);\n }\n }\n this.content(arr);\n return this;\n }\n collapseClick(element) {\n if (element.classed(\"closed\")) {\n this._isClosed = false;\n element.classed(\"open\", true);\n element.classed(\"closed\", false);\n } else {\n this._isClosed = true;\n element.classed(\"open\", false);\n element.classed(\"closed\", true);\n }\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n this._isClosed = this.defaultCollapsed();\n element.classed(this._isClosed ? \"closed\" : \"open\", true);\n this.titleSpan = element.append(\"span\").classed(\"collapsible-title\", true);\n this.iconDiv = element.append(\"div\").classed(\"collapsible-icon\", true);\n this.ul = element.append(\"ul\");\n this.icon = new FAChar().size({ height: 24, width: 24 }).target(this.iconDiv.node());\n this.iconDiv.on(\"click\", function() {\n context.collapseClick(element);\n context.render();\n });\n this.titleSpan.on(\"click\", function() {\n context.collapseClick(element);\n context.render();\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n const this_id = \"\";\n this.titleSpan.text(context.title().length > 0 ? context.title() + this_id : \"Accordion [\" + context._id + \"]\" + this_id);\n const rows = this.ul.selectAll(\"#\" + context._id + \" > ul > li\").data(this.content(), function(d) {\n return d._id;\n });\n rows.enter().append(function(widget) {\n const li = document.createElement(\"li\");\n if (widget._target === null) {\n const wSize = widget.size();\n if (wSize.width === 0 || wSize.height === 0) {\n const cSize = context.size();\n widget.size({\n width: cSize.width,\n height: cSize.width\n });\n }\n widget.target(li);\n } else {\n return widget._target;\n }\n return li;\n });\n rows.exit().remove();\n this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed ? this.closedIcon() : this.openIcon()).render();\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n};\n__name(_Accordion, \"Accordion\");\nlet Accordion = _Accordion;\nAccordion.prototype._class += \" layout_Accordion\";\nAccordion.prototype.publish(\"content\", [], \"widgetArray\", \"Array of widgets\", null, { tags: [\"Basic\"] });\nAccordion.prototype.publish(\"title\", \"\", \"string\", \"Title of collapsible section\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"openIcon\", \"\", \"string\", \"Icon to display when list is open\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"closedIcon\", \"\", \"string\", \"Icon to display when list is closed\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"titleFontColor\", \"#FFFFFF\", \"html-color\", \"Title font color\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"titleBackgroundColor\", \"#333333\", \"html-color\", \"Title background color\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"defaultCollapsed\", false, \"boolean\", \"Collapsed by default if true\", null, { tags: [\"Private\"] });\nconst _Surface = class _Surface extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_surfaceButtons\");\n this._tag = \"div\";\n this._surfaceButtons = [];\n }\n widgetSize(titleDiv, widgetDiv) {\n let width = this.clientWidth();\n let height = this.clientHeight();\n if (this.title()) {\n height -= this.calcHeight(titleDiv);\n }\n height -= this.calcFrameHeight(widgetDiv);\n width -= this.calcFrameWidth(widgetDiv);\n return { width, height };\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element2) {\n super.update(domNode, element2);\n const context = this;\n element2.classed(\"shadow2\", this.surfaceShadow()).style(\"border-width\", this.surfaceBorderWidth_exists() ? this.surfaceBorderWidth() + \"px\" : null).style(\"border-color\", this.surfaceBorderColor()).style(\"border-radius\", this.surfaceBorderRadius_exists() ? this.surfaceBorderRadius() + \"px\" : null).style(\"background-color\", this.surfaceBackgroundColor());\n const titles = element2.selectAll(\".surfaceTitle\").data(this.title() ? [this.title()] : []);\n titles.enter().insert(\"h3\", \"div\").attr(\"class\", \"surfaceTitle\").merge(titles).text(function(d) {\n return d;\n }).style(\"text-align\", this.surfaceTitleAlignment()).style(\"color\", this.surfaceTitleFontColor()).style(\"font-size\", this.surfaceTitleFontSize_exists() ? this.surfaceTitleFontSize() + \"px\" : null).style(\"font-family\", this.surfaceTitleFontFamily()).style(\"font-weight\", this.surfaceTitleFontBold() ? \"bold\" : \"normal\").style(\"background-color\", this.surfaceTitleBackgroundColor()).style(\"padding\", this.surfaceTitlePadding_exists() ? this.surfaceTitlePadding() + \"px\" : null).style(\"title\", this.altText_exists() ? this.altText() : null);\n titles.exit().remove();\n const surfaceTitle = element2.select(\".surfaceTitle\");\n const surfaceButtons = surfaceTitle.append(\"div\").attr(\"class\", \"html-button-container\").selectAll(\".surface-button\").data(this.buttonAnnotations());\n surfaceButtons.enter().append(\"button\").classed(\"surface-button\", true).each(function(button, idx) {\n const el = context._surfaceButtons[idx] = select(this).attr(\"class\", \"surface-button\" + (button.class ? \" \" + button.class : \"\")).attr(\"id\", button.id).style(\"padding\", button.padding).style(\"width\", button.width).style(\"height\", button.height).style(\"cursor\", \"pointer\");\n if (button.font === \"FontAwesome\") {\n el.style(\"background\", \"transparent\").style(\"border\", \"none\").on(\"click\", function(d) {\n context.click(d);\n }).append(\"i\").attr(\"class\", \"fa\").text(function() {\n return button.label;\n });\n } else {\n el.text(function() {\n return button.label;\n }).on(\"click\", function(d) {\n context.click(d);\n });\n }\n });\n surfaceButtons.exit().each(function(_d, idx) {\n const element = select(this);\n delete context._surfaceButtons[idx];\n element.remove();\n });\n const widgets = element2.selectAll(\"#\" + this._id + \" > .surfaceWidget\").data(this.widget() ? [this.widget()] : [], function(d) {\n return d._id;\n });\n widgets.enter().append(\"div\").attr(\"class\", \"surfaceWidget\").each(function(d) {\n select(context.element().node().parentElement).classed(\"content-icon content-icon-\" + d.classID().split(\"_\")[1], true);\n d.target(this);\n }).merge(widgets).style(\"padding\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null).each(function(d) {\n const widgetSize = context.widgetSize(element2.select(\"h3\"), select(this));\n if (widgetSize.width < 0) widgetSize.width = 0;\n if (widgetSize.height < 0) widgetSize.height = 0;\n d.resize({ width: widgetSize.width, height: widgetSize.height });\n });\n widgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n // Events ---\n click(obj) {\n }\n};\n__name(_Surface, \"Surface\");\nlet Surface = _Surface;\nSurface.prototype._class += \" layout_Surface\";\nSurface.prototype.publish(\"title\", \"\", \"string\", \"Title\", null, { tags: [\"Intermediate\"] });\nSurface.prototype.publish(\"altText\", null, \"string\", \"Alt text\", null, { optional: true });\nSurface.prototype.publish(\"surfaceTitlePadding\", null, \"number\", \"Title Padding (px)\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleBackgroundColor\", null, \"html-color\", \"Title Background Color\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleAlignment\", \"center\", \"set\", \"Title Alignment\", [\"left\", \"right\", \"center\"], { tags: [\"Basic\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceShadow\", false, \"boolean\", \"3D Shadow\");\nSurface.prototype.publish(\"surfacePadding\", null, \"string\", \"Surface Padding (px)\", null, { tags: [\"Intermediate\"] });\nSurface.prototype.publish(\"surfaceBackgroundColor\", null, \"html-color\", \"Surface Background Color\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderWidth\", null, \"number\", \"Surface Border Width (px)\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderColor\", null, \"html-color\", \"Surface Border Color\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderRadius\", null, \"number\", \"Surface Border Radius (px)\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"buttonAnnotations\", [], \"array\", \"Button Array\", null, { tags: [\"Private\"] });\nSurface.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Basic\"] });\nconst _Cell = class _Cell extends Surface {\n constructor() {\n super();\n __publicField(this, \"_indicateTheseIds\");\n this._indicateTheseIds = [];\n }\n indicateTheseIds(_) {\n if (!arguments.length) return this._indicateTheseIds;\n this._indicateTheseIds = _;\n return this;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n element.classed(\"layout_Surface\", true).on(\"mouseenter\", function() {\n context.onMouseEnter();\n }).on(\"mouseleave\", function() {\n context.onMouseLeave();\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n }\n onMouseEnter() {\n const arr = this.indicateTheseIds();\n const opacity = this.indicatorOpacity();\n const indicatorBorderColor = this.indicatorBorderColor();\n const indicatorGlowColor = this.indicatorGlowColor();\n for (let i = 0; i < arr.length; i++) {\n const otherElement = select(\"#\" + arr[i]);\n const otherWidget = otherElement.datum();\n if (otherElement && otherWidget) {\n otherElement.append(\"div\").attr(\"class\", \"update-indicator\").style(\"width\", otherWidget.width() + \"px\").style(\"height\", otherWidget.height() + \"px\").style(\"opacity\", opacity).style(\"border-color\", indicatorBorderColor).style(\"-webkit-box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor).style(\"-moz-box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor).style(\"box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor);\n }\n }\n }\n onMouseLeave() {\n const arr = this.indicateTheseIds();\n for (let i = 0; i < arr.length; i++) {\n selectAll(\"#\" + arr[i] + \" > div.update-indicator\").remove();\n }\n }\n};\n__name(_Cell, \"Cell\");\nlet Cell = _Cell;\nCell.prototype._class += \" layout_Cell\";\nCell.prototype.publish(\"gridRow\", 0, \"number\", \"Grid Row Position\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridCol\", 0, \"number\", \"Grid Column Position\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridRowSpan\", 1, \"number\", \"Grid Row Span\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridColSpan\", 1, \"number\", \"Grid Column Span\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"indicatorGlowColor\", \"#EEEE11\", \"html-color\", \"Glow color of update-indicator\", null, { tags: [\"Basic\"] });\nCell.prototype.publish(\"indicatorBorderColor\", \"#F48A00\", \"html-color\", \"Border color of update-indicator\", null, { tags: [\"Basic\"] });\nCell.prototype.publish(\"indicatorOpacity\", 0.8, \"number\", \"Opacity of update-indicator\", null, { tags: [\"Basic\"] });\nconst _Border = class _Border extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_colCount\");\n __publicField(this, \"_rowCount\");\n __publicField(this, \"_colSize\");\n __publicField(this, \"_rowSize\");\n __publicField(this, \"_shrinkWrapBoxes\");\n __publicField(this, \"_watch\");\n __publicField(this, \"_offsetX\");\n __publicField(this, \"_offsetY\");\n __publicField(this, \"_dragCell\");\n __publicField(this, \"_dragCellSize\");\n __publicField(this, \"_dragCellStartSize\");\n __publicField(this, \"_handleTop\");\n __publicField(this, \"_handleLeft\");\n __publicField(this, \"_dragPrevX\");\n __publicField(this, \"_dragPrevY\");\n __publicField(this, \"_cellSizes\");\n __publicField(this, \"contentDiv\");\n __publicField(this, \"_scrollBarWidth\");\n __publicField(this, \"_borderHandles\");\n __publicField(this, \"_sectionTypeArr\");\n __publicField(this, \"lazyPostUpdate\", Utility.debounce(function() {\n this.postUpdate();\n }, 100));\n this._tag = \"div\";\n this._colCount = 0;\n this._rowCount = 0;\n this._colSize = 0;\n this._rowSize = 0;\n this._shrinkWrapBoxes = {};\n this.content([]);\n this.sectionTypes([]);\n }\n watchWidget(widget) {\n if (this._watch === void 0) {\n this._watch = {};\n }\n if (this._watch[widget.id()]) {\n this._watch[widget.id()].remove();\n delete this._watch[widget.id()];\n }\n if (widget) {\n const context = this;\n this._watch[widget.id()] = widget.monitor(function(paramId, newVal, oldVal) {\n if (oldVal !== newVal) {\n context.lazyPostUpdate();\n }\n });\n }\n }\n applyLayoutType() {\n const layoutObj = this.borderLayoutObject();\n this.content().forEach(function(cell, i) {\n cell._fixedLeft = layoutObj[this.sectionTypes()[i]].left;\n cell._fixedTop = layoutObj[this.sectionTypes()[i]].top;\n cell._fixedWidth = layoutObj[this.sectionTypes()[i]].width;\n cell._fixedHeight = layoutObj[this.sectionTypes()[i]].height;\n cell._dragHandles = this.cellSpecificDragHandles(this.sectionTypes()[i]);\n }, this);\n }\n cellSpecificDragHandles(sectionType) {\n switch (sectionType) {\n case \"top\":\n return [\"s\"];\n case \"right\":\n return [\"w\"];\n case \"bottom\":\n return [\"n\"];\n case \"left\":\n return [\"e\"];\n case \"center\":\n return [];\n }\n }\n borderLayoutObject(layoutType) {\n const retObj = {};\n const context = this;\n let topSize;\n let topPerc;\n let bottomSize;\n let bottomPerc;\n let leftSize;\n let leftPerc;\n let rightSize;\n let rightPerc;\n const bcRect = this.target().getBoundingClientRect();\n bcRect.top;\n bcRect.left;\n bcRect.bottom;\n bcRect.right;\n if (this.target() instanceof SVGElement) {\n parseFloat(this.target().getAttribute(\"width\"));\n parseFloat(this.target().getAttribute(\"height\"));\n } else {\n bcRect.width;\n bcRect.height;\n }\n if (this.sectionTypes().indexOf(\"top\") !== -1) {\n topSize = this.topSize();\n topPerc = this.topPercentage();\n if (typeof this._shrinkWrapBoxes[\"top\"] !== \"undefined\") {\n topSize = this._shrinkWrapBoxes[\"top\"].height + this.gutter();\n topPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"bottom\") !== -1) {\n bottomSize = this.bottomSize();\n bottomPerc = this.bottomPercentage();\n if (typeof this._shrinkWrapBoxes[\"bottom\"] !== \"undefined\") {\n bottomSize = this._shrinkWrapBoxes[\"bottom\"].height + this.gutter();\n bottomPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"left\") !== -1) {\n leftSize = this.leftSize();\n leftPerc = this.leftPercentage();\n if (typeof this._shrinkWrapBoxes[\"left\"] !== \"undefined\") {\n leftSize = this._shrinkWrapBoxes[\"left\"].width + this.gutter();\n leftPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"right\") !== -1) {\n rightSize = this.rightSize();\n rightPerc = this.rightPercentage();\n if (typeof this._shrinkWrapBoxes[\"right\"] !== \"undefined\") {\n rightSize = this._shrinkWrapBoxes[\"right\"].width + this.gutter();\n rightPerc = 0;\n }\n }\n const t = _sectionPlacementObject({\n width: { \"px\": 0, \"%\": 100 },\n height: { \"px\": topSize, \"%\": topPerc },\n top: { \"px\": 0, \"%\": 0 },\n left: { \"px\": 0, \"%\": 0 }\n });\n const b = _sectionPlacementObject({\n width: { \"px\": 0, \"%\": 100 },\n height: { \"px\": bottomSize, \"%\": bottomPerc },\n top: { \"px\": 0, \"%\": 100 },\n left: { \"px\": 0, \"%\": 0 }\n });\n b.top -= b.height;\n const l = _sectionPlacementObject({\n width: { \"px\": leftSize, \"%\": leftPerc },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": 0, \"%\": 0 }\n });\n const r = _sectionPlacementObject({\n width: { \"px\": rightSize, \"%\": rightPerc },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": 0, \"%\": 100 }\n });\n r.left -= r.width;\n const c2 = _sectionPlacementObject({\n width: { \"px\": -r.width - l.width, \"%\": 100 },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": l.width, \"%\": 0 }\n });\n retObj[\"top\"] = t;\n retObj[\"bottom\"] = b;\n retObj[\"right\"] = r;\n retObj[\"left\"] = l;\n retObj[\"center\"] = c2;\n return retObj;\n function _sectionPlacementObject(obj) {\n obj.width[\"px\"] = typeof obj.width[\"px\"] !== \"undefined\" ? obj.width[\"px\"] : 0;\n obj.width[\"%\"] = typeof obj.width[\"%\"] !== \"undefined\" ? obj.width[\"%\"] : 0;\n obj.height[\"px\"] = typeof obj.height[\"px\"] !== \"undefined\" ? obj.height[\"px\"] : 0;\n obj.height[\"%\"] = typeof obj.height[\"%\"] !== \"undefined\" ? obj.height[\"%\"] : 0;\n const ret = {\n width: obj.width[\"px\"] + obj.width[\"%\"] / 100 * context.width(),\n height: obj.height[\"px\"] + obj.height[\"%\"] / 100 * context.height(),\n top: obj.top[\"px\"] + obj.top[\"%\"] / 100 * context.height() + context.gutter() / 2,\n left: obj.left[\"px\"] + obj.left[\"%\"] / 100 * context.width() + context.gutter() / 2\n };\n return ret;\n }\n __name(_sectionPlacementObject, \"_sectionPlacementObject\");\n }\n clearContent(sectionType) {\n if (!sectionType) {\n this.content().forEach(function(contentWidget) {\n contentWidget.target(null);\n return false;\n });\n select(\"#\" + this.id() + \" > div.borderHandle\").classed(\"borderHandleDisabled\", true);\n delete this._watch;\n this.content([]);\n this.sectionTypes([]);\n } else {\n const idx = this.sectionTypes().indexOf(sectionType);\n if (idx >= 0) {\n if (this._watch && this.content()[idx]) {\n delete this._watch[this.content()[idx].id()];\n }\n this.content()[idx].target(null);\n select(\"#\" + this.id() + \" > div.borderHandle_\" + sectionType).classed(\"borderHandleDisabled\", true);\n this.content().splice(idx, 1);\n this.sectionTypes().splice(idx, 1);\n }\n }\n }\n hasContent(sectionType, widget, title) {\n return this.sectionTypes().indexOf(sectionType) >= 0;\n }\n setContent(sectionType, widget, title) {\n this.clearContent(sectionType);\n title = typeof title !== \"undefined\" ? title : \"\";\n if (widget) {\n const cell = new Cell().surfaceBorderWidth(0).widget(widget).title(title);\n this.watchWidget(widget);\n this.content().push(cell);\n this.sectionTypes().push(sectionType);\n }\n return this;\n }\n getCell(id) {\n const idx = this.sectionTypes().indexOf(id);\n if (idx >= 0) {\n return this.content()[idx];\n }\n return null;\n }\n getContent(id) {\n const idx = this.sectionTypes().indexOf(id);\n if (idx >= 0) {\n return this.content()[idx].widget();\n }\n return null;\n }\n setLayoutOffsets() {\n this._offsetX = this._element.node().getBoundingClientRect().left + this.gutter() / 2;\n this._offsetY = this._element.node().getBoundingClientRect().top + this.gutter() / 2;\n }\n dragStart(handle) {\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const context = this;\n this._dragCell = handle;\n this._dragCellStartSize = this[handle + \"Size\"]();\n if (this[handle + \"ShrinkWrap\"]()) {\n this[handle + \"Percentage\"](0);\n this[handle + \"ShrinkWrap\"](false);\n }\n const handleElm = select(\"#\" + context.id() + \" > div.borderHandle_\" + handle);\n context._handleTop = parseFloat(handleElm.style(\"top\").split(\"px\")[0]);\n context._handleLeft = parseFloat(handleElm.style(\"left\").split(\"px\")[0]);\n this._dragPrevX = event.sourceEvent.clientX;\n this._dragPrevY = event.sourceEvent.clientY;\n }\n dragTick(handle) {\n const context = this;\n const event = d3Event();\n const xDelta = this._dragPrevX - event.sourceEvent.clientX;\n const yDelta = this._dragPrevY - event.sourceEvent.clientY;\n switch (handle) {\n case \"top\":\n case \"bottom\":\n _moveHandles(handle, yDelta);\n break;\n case \"right\":\n case \"left\":\n _moveHandles(handle, xDelta);\n break;\n }\n function _moveHandles(handle2, delta) {\n if (delta === 0) return;\n const handles = selectAll(\"#\" + context.id() + \" > div.borderHandle\");\n const grabbedHandle = select(\"#\" + context.id() + \" > div.borderHandle_\" + handle2);\n if (grabbedHandle.classed(\"borderHandle_top\")) {\n grabbedHandle.style(\"top\", context._handleTop - delta + \"px\");\n context._cellSizes.topHeight = context._handleTop - delta;\n context._cellSizes.leftHeight = context._cellSizes.height;\n context._cellSizes.leftHeight -= context._cellSizes.topHeight;\n context._cellSizes.leftHeight -= context._cellSizes.bottomHeight;\n context._cellSizes.rightHeight = context._cellSizes.leftHeight;\n } else if (grabbedHandle.classed(\"borderHandle_right\")) {\n grabbedHandle.style(\"left\", context._handleLeft - delta + \"px\");\n context._cellSizes.rightWidth = context._cellSizes.width - context._handleLeft + delta;\n } else if (grabbedHandle.classed(\"borderHandle_bottom\")) {\n grabbedHandle.style(\"top\", context._handleTop - delta + \"px\");\n context._cellSizes.bottomHeight = context._cellSizes.height - context._handleTop + delta;\n context._cellSizes.leftHeight = context._cellSizes.height;\n context._cellSizes.leftHeight -= context._cellSizes.bottomHeight;\n context._cellSizes.leftHeight -= context._cellSizes.topHeight;\n context._cellSizes.rightHeight = context._cellSizes.leftHeight;\n } else if (grabbedHandle.classed(\"borderHandle_left\")) {\n grabbedHandle.style(\"left\", context._handleLeft - delta + \"px\");\n context._cellSizes.leftWidth = context._handleLeft - delta;\n }\n handles.each(function() {\n const handle3 = select(this);\n if (handle3.classed(\"borderHandle_top\")) {\n handle3.style(\"width\", context._cellSizes.width + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight - 3 + \"px\");\n } else if (handle3.classed(\"borderHandle_right\")) {\n handle3.style(\"left\", context._cellSizes.width - context._cellSizes.rightWidth + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n handle3.style(\"height\", context._cellSizes.rightHeight + \"px\");\n } else if (handle3.classed(\"borderHandle_bottom\")) {\n handle3.style(\"width\", context._cellSizes.width + \"px\");\n handle3.style(\"top\", context._cellSizes.height - context._cellSizes.bottomHeight - 3 + \"px\");\n } else if (handle3.classed(\"borderHandle_left\")) {\n handle3.style(\"left\", context._cellSizes.leftWidth + \"px\");\n handle3.style(\"height\", context._cellSizes.leftHeight + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n }\n });\n }\n __name(_moveHandles, \"_moveHandles\");\n }\n dragEnd(handle) {\n if (handle) {\n const event = d3Event();\n const xDelta = this._dragPrevX - event.sourceEvent.clientX;\n const yDelta = this._dragPrevY - event.sourceEvent.clientY;\n switch (handle) {\n case \"top\":\n if (yDelta !== 0) {\n this.topPercentage(0);\n this.topSize(this.topSize() === 0 ? this.getContent(\"top\").getBBox().height - yDelta : this.topSize() - yDelta);\n }\n break;\n case \"right\":\n if (xDelta !== 0) {\n this.rightPercentage(0);\n this.rightSize(this.rightSize() === 0 ? this.getContent(\"right\").getBBox().width + xDelta : this.rightSize() + xDelta);\n }\n break;\n case \"bottom\":\n if (yDelta !== 0) {\n this.bottomPercentage(0);\n this.bottomSize(this.bottomSize() === 0 ? this.getContent(\"bottom\").getBBox().height + yDelta : this.bottomSize() + yDelta);\n }\n break;\n case \"left\":\n if (xDelta !== 0) {\n this.leftPercentage(0);\n this.leftSize(this.leftSize() === 0 ? this.getContent(\"left\").getBBox().width - xDelta : this.leftSize() - xDelta);\n }\n break;\n }\n this._dragPrevX = event.sourceEvent.clientX;\n this._dragPrevY = event.sourceEvent.clientY;\n }\n this.render();\n }\n size(_) {\n const retVal = HTMLWidget.prototype.size.apply(this, arguments);\n if (arguments.length && this.contentDiv) {\n this.contentDiv.style(\"width\", this._size.width + \"px\").style(\"height\", this._size.height + \"px\");\n }\n return retVal;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n element.style(\"position\", \"relative\");\n this.contentDiv = element.append(\"div\").classed(\"border-content\", true);\n this._scrollBarWidth = Platform.getScrollbarWidth();\n this._borderHandles = [\"top\", \"left\", \"right\", \"bottom\"];\n const handles = element.selectAll(\"div.borderHandle\").data(this._borderHandles);\n handles.enter().append(\"div\").classed(\"borderHandle\", true).each(function(handle) {\n const h = select(this);\n h.classed(\"borderHandle_\" + handle, true).classed(\"borderHandleDisabled\", context.getContent(handle) === null);\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n this._sectionTypeArr = this.sectionTypes();\n const context = this;\n element.classed(\"design-mode\", this.designMode());\n this.setLayoutOffsets();\n const rows = this.contentDiv.selectAll(\".cell_\" + this._id).data(this.content(), function(d) {\n return d._id;\n });\n const rowsUpdate = rows.enter().append(\"div\").classed(\"cell_\" + this._id, true).style(\"position\", \"absolute\").each(function(d, i) {\n select(this).classed(\"border-cell border-cell-\" + context._sectionTypeArr[i], true);\n d.target(this);\n select(\"#\" + context.id() + \" > div.borderHandle_\" + context._sectionTypeArr[i]).classed(\"borderHandleDisabled\", false);\n }).merge(rows);\n rowsUpdate.each(function(d, idx) {\n const sectionType = context.sectionTypes()[idx];\n if (typeof context[sectionType + \"ShrinkWrap\"] !== \"undefined\" && context[sectionType + \"ShrinkWrap\"]()) {\n d.render();\n context._shrinkWrapBoxes[sectionType] = d.widget().getBBox(true);\n } else {\n delete context._shrinkWrapBoxes[sectionType];\n }\n });\n const drag$1 = drag().on(\"start\", function(d, i) {\n context.dragStart.call(context, d, i);\n }).on(\"drag\", function(d, i) {\n context.dragTick.call(context, d, i);\n }).on(\"end\", function(d, i) {\n context.dragEnd.call(context, d, i);\n });\n if (this.designMode()) {\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").call(drag$1);\n } else {\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").on(\".drag\", null);\n }\n const layoutObj = this.borderLayoutObject();\n this.content().forEach(function(cell, i) {\n cell._fixedLeft = layoutObj[this.sectionTypes()[i]].left;\n cell._fixedTop = layoutObj[this.sectionTypes()[i]].top;\n cell._fixedWidth = layoutObj[this.sectionTypes()[i]].width;\n cell._fixedHeight = layoutObj[this.sectionTypes()[i]].height;\n cell._dragHandles = [];\n }, this);\n rowsUpdate.style(\"left\", function(d) {\n return d._fixedLeft + \"px\";\n }).style(\"top\", function(d) {\n return d._fixedTop + \"px\";\n }).style(\"width\", function(d) {\n return d._fixedWidth - context.gutter() + \"px\";\n }).style(\"height\", function(d) {\n return d._fixedHeight - context.gutter() + \"px\";\n }).each(function(d) {\n d._placeholderElement.attr(\"draggable\", context.designMode()).selectAll(\".dragHandle\").attr(\"draggable\", context.designMode());\n d.surfacePadding(context.surfacePadding()).resize();\n });\n rows.exit().each(function(d) {\n d.target(null);\n }).remove();\n this.getCellSizes();\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").each(function() {\n const handle = select(this);\n if (handle.classed(\"borderHandle_top\")) {\n handle.style(\"width\", context._cellSizes.width + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight - 3 + \"px\");\n } else if (handle.classed(\"borderHandle_right\")) {\n handle.style(\"left\", context._cellSizes.width - context._cellSizes.rightWidth + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n handle.style(\"height\", context._cellSizes.rightHeight + \"px\");\n } else if (handle.classed(\"borderHandle_bottom\")) {\n handle.style(\"width\", context._cellSizes.width + \"px\");\n handle.style(\"top\", context._cellSizes.height - context._cellSizes.bottomHeight - 3 + \"px\");\n } else if (handle.classed(\"borderHandle_left\")) {\n handle.style(\"left\", context._cellSizes.leftWidth + \"px\");\n handle.style(\"height\", context._cellSizes.leftHeight + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n }\n });\n }\n getCellSizes() {\n const context = this;\n context._cellSizes = {};\n const contentRect = this.element().node().getBoundingClientRect();\n context._cellSizes.width = contentRect.width;\n context._cellSizes.height = contentRect.height;\n this.element().selectAll(\"#\" + this.id() + \" > div > div.border-cell\").each(function() {\n const cell = select(this);\n if (typeof cell.node === \"function\") {\n const rect = cell.node().getBoundingClientRect();\n if (cell.classed(\"border-cell-top\")) {\n context._cellSizes.topHeight = rect.height;\n } else if (cell.classed(\"border-cell-left\")) {\n context._cellSizes.leftWidth = rect.width;\n context._cellSizes.leftHeight = rect.height;\n } else if (cell.classed(\"border-cell-right\")) {\n context._cellSizes.rightWidth = rect.width;\n context._cellSizes.rightHeight = rect.height;\n } else if (cell.classed(\"border-cell-bottom\")) {\n context._cellSizes.bottomHeight = rect.height;\n }\n }\n });\n const sizes = [\"height\", \"width\", \"topHeight\", \"bottomHeight\", \"leftHeight\", \"rightHeight\", \"leftWidth\", \"rightWidth\"];\n sizes.forEach(function(size) {\n context._cellSizes[size] = context._cellSizes[size] === void 0 ? 0 : context._cellSizes[size];\n });\n }\n postUpdate(domNode, element) {\n const context = this;\n this.content().forEach(function(n) {\n if (n._element.node() !== null && n.widget()) {\n const prevBox = n.widget().getBBox(false, true);\n const currBox = n.widget().getBBox(true, true);\n if (prevBox.width !== currBox.width || prevBox.height !== currBox.height) {\n context.lazyRender();\n }\n }\n });\n }\n exit(domNode, element) {\n this.content().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n};\n__name(_Border, \"Border\");\nlet Border = _Border;\nBorder.prototype._class += \" layout_Border\";\nBorder.prototype.publish(\"designMode\", false, \"boolean\", \"Design Mode\", null, { tags: [\"Basic\"] });\nBorder.prototype.publish(\"content\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"gutter\", 0, \"number\", \"Gap Between Widgets\", null, { tags: [\"Basic\"] });\nBorder.prototype.publish(\"topShrinkWrap\", false, \"boolean\", \"'Top' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"leftShrinkWrap\", false, \"boolean\", \"'Left' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"rightShrinkWrap\", false, \"boolean\", \"'Right' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"bottomShrinkWrap\", false, \"boolean\", \"'Bottom' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"topSize\", 0, \"number\", \"Height of the 'Top' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"leftSize\", 0, \"number\", \"Width of the 'Left' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"rightSize\", 0, \"number\", \"Width of the 'Right' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"bottomSize\", 0, \"number\", \"Height of the 'Bottom' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"topPercentage\", 20, \"number\", \"Percentage (of parent) Height of the 'Top' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"leftPercentage\", 20, \"number\", \"Percentage (of parent) Width of the 'Left' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"rightPercentage\", 20, \"number\", \"Percentage (of parent) Width of the 'Right' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"bottomPercentage\", 20, \"number\", \"Percentage (of parent) Height of the 'Bottom' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"surfacePadding\", 0, \"number\", \"Cell Padding (px)\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"sectionTypes\", [], \"array\", \"Section Types sharing an index with 'content' - Used to determine position/size.\", null, { tags: [\"Private\"] });\nconst _WidgetDiv = class _WidgetDiv {\n constructor(div) {\n __publicField(this, \"_div\");\n __publicField(this, \"_overlay\", false);\n __publicField(this, \"_overflowX\", \"visible\");\n __publicField(this, \"_overflowY\", \"visible\");\n __publicField(this, \"_widget\");\n this._div = div;\n }\n overlay(_) {\n if (!arguments.length) return this._overlay;\n this._overlay = _;\n return this;\n }\n overflowX(_) {\n if (!arguments.length) return this._overflowX;\n this._overflowX = _;\n this._div.style(\"overflow-x\", _);\n return this;\n }\n overflowY(_) {\n if (!arguments.length) return this._overflowY;\n this._overflowY = _;\n this._div.style(\"overflow-y\", _);\n return this;\n }\n element() {\n return this._div;\n }\n node() {\n return this._div.node();\n }\n widget(_) {\n if (!arguments.length) return this._widget;\n if (this._widget !== _) {\n if (this._widget) {\n this._widget.target(null);\n }\n this._widget = _;\n if (this._widget) {\n this._widget.target(this._div.node());\n }\n }\n return this;\n }\n resize(size) {\n if (this._widget) {\n this._div.style(\"width\", `${size.width}px`).style(\"height\", `${size.height}px`);\n this._widget.resize(size);\n }\n return this;\n }\n async render(getBBox, availableHeight, availableWidth) {\n let overflowX = this.overflowX();\n if (!this.overlay() && overflowX === \"visible\") {\n overflowX = null;\n }\n let overflowY = this.overflowY();\n if (!this.overlay() && overflowY === \"visible\") {\n overflowY = null;\n }\n this._div.style(\"height\", this.overlay() ? \"0px\" : null).style(\"overflow-x\", overflowX).style(\"overflow-y\", overflowY);\n if (this._widget) {\n return this._widget.renderPromise().then((w) => {\n if (getBBox && this._widget.visible()) {\n const retVal = this._widget.getBBox();\n retVal.width += 8;\n if (availableHeight !== void 0 && retVal.height > availableHeight) {\n retVal.width += Platform.getScrollbarWidth();\n }\n if (availableWidth !== void 0 && retVal.width > availableWidth) {\n retVal.height += Platform.getScrollbarWidth();\n }\n if (this.overlay()) {\n retVal.height = 0;\n } else {\n retVal.height += 4;\n }\n return retVal;\n }\n return getBBox ? { x: 0, y: 0, width: 0, height: 0 } : void 0;\n });\n } else {\n return Promise.resolve(getBBox ? { x: 0, y: 0, width: 0, height: 0 } : void 0);\n }\n }\n};\n__name(_WidgetDiv, \"WidgetDiv\");\nlet WidgetDiv = _WidgetDiv;\nconst _Border2 = class _Border2 extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_bodyElement\");\n __publicField(this, \"_topWA\");\n __publicField(this, \"_leftWA\");\n __publicField(this, \"_centerWA\");\n __publicField(this, \"_rightWA\");\n __publicField(this, \"_bottomWA\");\n __publicField(this, \"_topPrevOverflow\");\n __publicField(this, \"_leftPrevOverflow\");\n __publicField(this, \"_rightPrevOverflow\");\n __publicField(this, \"_bottomPrevOverflow\");\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const topElement = element.append(\"header\");\n this._bodyElement = element.append(\"div\").attr(\"class\", \"body\");\n const centerElement = this._bodyElement.append(\"div\").attr(\"class\", \"center\");\n const leftElement = this._bodyElement.append(\"div\").attr(\"class\", \"lhs\");\n const rightElement = this._bodyElement.append(\"div\").attr(\"class\", \"rhs\");\n const bottomElement = element.append(\"div\").attr(\"class\", \"footer\");\n this._topWA = new WidgetDiv(topElement);\n this._centerWA = new WidgetDiv(centerElement);\n this._leftWA = new WidgetDiv(leftElement);\n this._rightWA = new WidgetDiv(rightElement);\n this._bottomWA = new WidgetDiv(bottomElement);\n }\n update(domNode, element) {\n super.update(domNode, element);\n this._topWA.element().style(\"display\", this.showTop() ? null : \"none\");\n this._rightWA.element().style(\"display\", this.showRight() ? null : \"none\");\n this._bottomWA.element().style(\"display\", this.showBottom() ? null : \"none\");\n this._leftWA.element().style(\"display\", this.showLeft() ? null : \"none\");\n if (this.topOverflowX() !== this._topWA.overflowX()) {\n this._topWA.overflowX(this.topOverflowX());\n }\n if (this.rightOverflowX() !== this._rightWA.overflowX()) {\n this._rightWA.overflowX(this.rightOverflowX());\n }\n if (this.bottomOverflowX() !== this._bottomWA.overflowX()) {\n this._bottomWA.overflowX(this.bottomOverflowX());\n }\n if (this.leftOverflowX() !== this._leftWA.overflowX()) {\n this._leftWA.overflowX(this.leftOverflowX());\n }\n if (this.topOverflowY() !== this._topWA.overflowY()) {\n this._topWA.overflowY(this.topOverflowY());\n }\n if (this.rightOverflowY() !== this._rightWA.overflowY()) {\n this._rightWA.overflowY(this.rightOverflowY());\n }\n if (this.bottomOverflowY() !== this._bottomWA.overflowY()) {\n this._bottomWA.overflowY(this.bottomOverflowY());\n }\n if (this.leftOverflowY() !== this._leftWA.overflowY()) {\n this._leftWA.overflowY(this.leftOverflowY());\n }\n this.element().style(\"width\", `${this.width()}px`).style(\"height\", `${this.height()}px`);\n }\n targetNull(w) {\n if (w) {\n w.target(null);\n }\n }\n exit(domNode, element) {\n this.targetNull(this.center());\n this.targetNull(this.bottom());\n this.targetNull(this.right());\n this.targetNull(this.left());\n this.targetNull(this.top());\n super.exit(domNode, element);\n }\n swap(sectionA, sectionB) {\n const a2 = this[sectionA]();\n const b = this[sectionB]();\n this.targetNull(a2);\n this.targetNull(b);\n this[`_${sectionA}WA`].widget(null);\n this[`_${sectionB}WA`].widget(null);\n this[sectionA](b);\n this[sectionB](a2);\n return this;\n }\n render(callback) {\n const retVal = super.render((w) => {\n if (this._topWA) {\n this._topWA.widget(this.top()).overlay(this.topOverlay()).render(true).then(async (topBBox) => {\n const bottomBBox = await this._bottomWA.widget(this.bottom()).render(true, void 0, this.width());\n const availableHeight = this.height() - (topBBox.height + bottomBBox.height);\n const leftBBox = await this._leftWA.widget(this.left()).render(true, availableHeight);\n const rightBBox = await this._rightWA.widget(this.right()).render(true, availableHeight);\n if (this.bottomHeight_exists()) {\n bottomBBox.height = this.bottomHeight();\n }\n const bodyWidth = this.width() - (leftBBox.width + rightBBox.width);\n const bodyHeight = this.height() - (topBBox.height + bottomBBox.height);\n const centerOverflowX = this.centerOverflowX();\n const centerOverflowY = this.centerOverflowY();\n const scrollCenterX = [\"auto\", \"scroll\"].indexOf(centerOverflowX) !== -1;\n const scrollCenterY = [\"auto\", \"scroll\"].indexOf(centerOverflowY) !== -1;\n if (scrollCenterX || scrollCenterY) {\n this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({\n width: bodyWidth,\n height: bodyHeight\n }).render();\n }\n this._bodyElement.style(\"height\", `${bodyHeight}px`);\n const promises = [\n this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({\n width: this.width(),\n height: topBBox.height\n }).render(),\n this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({\n width: leftBBox.width,\n height: bodyHeight\n }).render(),\n this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({\n width: rightBBox.width,\n height: bodyHeight\n }).render(),\n this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({\n width: bodyWidth,\n height: bodyHeight\n }).render(),\n this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({\n width: this.width(),\n height: bottomBBox.height\n }).render()\n ];\n Promise.all(promises).then((promises2) => {\n if (callback) {\n callback(this);\n }\n });\n });\n } else {\n if (callback) {\n callback(this);\n }\n }\n });\n return retVal;\n }\n};\n__name(_Border2, \"Border2\");\nlet Border2 = _Border2;\nBorder2.prototype._class += \" layout_Border2\";\nBorder2.prototype.publish(\"showTop\", true, \"boolean\", \"If true, top widget adapter will display\");\nBorder2.prototype.publish(\"showRight\", true, \"boolean\", \"If true, right widget adapter will display\");\nBorder2.prototype.publish(\"showBottom\", true, \"boolean\", \"If true, bottom widget adapter will display\");\nBorder2.prototype.publish(\"showLeft\", true, \"boolean\", \"If true, left widget adapter will display\");\nBorder2.prototype.publish(\"topOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the top widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"rightOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the right widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"bottomOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the bottom widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"leftOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the left widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"centerOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the center widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"topOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the top widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"rightOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the right widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"bottomOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the bottom widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"leftOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the left widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"centerOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the center widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"top\", null, \"widget\", \"Top Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"topOverlay\", false, \"boolean\", \"Overlay Top Widget\");\nBorder2.prototype.publish(\"left\", null, \"widget\", \"Left Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"center\", null, \"widget\", \"Center Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"right\", null, \"widget\", \"Right Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"bottom\", null, \"widget\", \"Bottom Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"bottomHeight\", null, \"number\", \"Bottom Fixed Height\", void 0, { optional: true });\nconst _Carousel = class _Carousel extends HTMLWidget {\n constructor() {\n super(...arguments);\n __publicField(this, \"_prevActive\", 0);\n __publicField(this, \"_root\");\n }\n activeWidget() {\n return this.widgets()[this.active()];\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._root = element.append(\"div\").attr(\"id\", `${this.id()}_root`);\n }\n update(domNode, element) {\n super.update(domNode, element);\n const active = this.active();\n const width = this.width();\n this._root.style(\"width\", `${width}px`).style(\"height\", `${this.height()}px`);\n const widgetElements = this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(), (d) => d.id());\n const update = widgetElements.enter().append(\"div\").attr(\"class\", \"carouselItem\").each(function(w) {\n w.target(this);\n }).merge(widgetElements).style(\"left\", (d, i) => `${(i - this._prevActive) * width}px`).style(\"width\", `${width}px`);\n if (this._prevActive !== active) {\n update.style(\"display\", (d, i) => i === this._prevActive || i === active ? null : \"none\").transition().duration(this.transitionDuration()).style(\"left\", (d, i) => `${(i - active) * width}px`).on(\"end\", function(d, i) {\n select(this).style(\"display\", () => i === active ? null : \"none\");\n });\n this._prevActive = active;\n }\n widgetElements.exit().each(function(w) {\n w.target(null);\n }).remove();\n }\n exit(domNode, element) {\n this.widgets().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n render(callback) {\n return super.render((w) => {\n if (!this.visible() || this.isDOMHidden()) {\n if (callback) {\n callback(w);\n }\n } else {\n const aw = this.activeWidget();\n if (aw) {\n aw.resize(this.size()).render((w2) => {\n if (callback) {\n callback(w);\n }\n });\n }\n }\n });\n }\n};\n__name(_Carousel, \"Carousel\");\nlet Carousel = _Carousel;\nCarousel.prototype._class += \" layout_Carousel\";\nCarousel.prototype.publish(\"widgets\", [], \"widgetArray\", \"Widgets\", null, { render: false });\nCarousel.prototype.publish(\"active\", 0, \"number\", \"Active widget\");\nCarousel.prototype.publish(\"transitionDuration\", 500, \"number\", \"Transition duration\");\nvar pi$1 = Math.PI, tau$1 = 2 * pi$1, epsilon = 1e-6, tauEpsilon = tau$1 - epsilon;\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null;\n this._ = \"\";\n}\n__name(Path, \"Path\");\nfunction path() {\n return new Path();\n}\n__name(path, \"path\");\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: /* @__PURE__ */ __name(function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n }, \"moveTo\"),\n closePath: /* @__PURE__ */ __name(function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }, \"closePath\"),\n lineTo: /* @__PURE__ */ __name(function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"lineTo\"),\n quadraticCurveTo: /* @__PURE__ */ __name(function(x1, y1, x, y) {\n this._ += \"Q\" + +x1 + \",\" + +y1 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"quadraticCurveTo\"),\n bezierCurveTo: /* @__PURE__ */ __name(function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + +x1 + \",\" + +y1 + \",\" + +x2 + \",\" + +y2 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"bezierCurveTo\"),\n arcTo: /* @__PURE__ */ __name(function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;\n if (r < 0) throw new Error(\"negative radius: \" + r);\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } else if (!(l01_2 > epsilon)) ;\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } else {\n var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi$1 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + +(y01 * x20 > x01 * y20) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n }, \"arcTo\"),\n arc: /* @__PURE__ */ __name(function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;\n if (r < 0) throw new Error(\"negative radius: \" + r);\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n if (!r) return;\n if (da < 0) da = da % tau$1 + tau$1;\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n } else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + +(da >= pi$1) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n }, \"arc\"),\n rect: /* @__PURE__ */ __name(function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + +w + \"v\" + +h + \"h\" + -w + \"Z\";\n }, \"rect\"),\n toString: /* @__PURE__ */ __name(function() {\n return this._;\n }, \"toString\")\n};\nfunction constant(x) {\n return /* @__PURE__ */ __name(function constant2() {\n return x;\n }, \"constant\");\n}\n__name(constant, \"constant\");\nvar pi = Math.PI;\nvar tau = 2 * pi;\nconst d3SymbolCircle = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }, \"draw\")\n};\nconst d3SymbolCross = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }, \"draw\")\n};\nvar tan30 = Math.sqrt(1 / 3), tan30_2 = tan30 * 2;\nconst d3SymbolDiamond = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var y = Math.sqrt(size / tan30_2), x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }, \"draw\")\n};\nvar ka = 0.8908130915292852, kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10), kx = Math.sin(tau / 10) * kr, ky = -Math.cos(tau / 10) * kr;\nconst d3SymbolStar = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size * ka), x = kx * r, y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a2 = tau * i / 5, c2 = Math.cos(a2), s2 = Math.sin(a2);\n context.lineTo(s2 * r, -c2 * r);\n context.lineTo(c2 * x - s2 * y, s2 * x + c2 * y);\n }\n context.closePath();\n }, \"draw\")\n};\nconst d3SymbolSquare = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var w = Math.sqrt(size), x = -w / 2;\n context.rect(x, x, w, w);\n }, \"draw\")\n};\nvar sqrt3 = Math.sqrt(3);\nconst d3SymbolTriangle = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }, \"draw\")\n};\nvar c = -0.5, s = Math.sqrt(3) / 2, k = 1 / Math.sqrt(12), a = (k / 2 + 1) * 3;\nconst d3SymbolWye = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / a), x0 = r / 2, y0 = r * k, x1 = x0, y1 = r * k + r, x2 = -x1, y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }, \"draw\")\n};\nfunction d3Symbol() {\n var type = constant(d3SymbolCircle), size = constant(64), context = null;\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n __name(symbol, \"symbol\");\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n return symbol;\n}\n__name(d3Symbol, \"d3Symbol\");\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function(obj) {\n return typeof obj;\n} : function(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\nvar d3_identity = /* @__PURE__ */ __name(function d3_identity2(d) {\n return d;\n}, \"d3_identity\");\nvar d3_reverse = /* @__PURE__ */ __name(function d3_reverse2(arr) {\n var mirror = [];\n for (var i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l - i - 1];\n }\n return mirror;\n}, \"d3_reverse\");\nvar d3_textWrapping = /* @__PURE__ */ __name(function d3_textWrapping2(text, width) {\n text.each(function() {\n var text2 = select(this), words = text2.text().split(/\\s+/).reverse(), word, line = [], lineHeight = 1.2;\n text2.attr(\"y\");\n var dy = parseFloat(text2.attr(\"dy\")) || 0, tspan = text2.text(null).append(\"tspan\").attr(\"x\", 0).attr(\"dy\", dy + \"em\");\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text2.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}, \"d3_textWrapping\");\nvar d3_mergeLabels = /* @__PURE__ */ __name(function d3_mergeLabels2() {\n var gen = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n var labels = arguments[1];\n var domain = arguments[2];\n var range = arguments[3];\n var labelDelimiter = arguments[4];\n if ((typeof labels === \"undefined\" ? \"undefined\" : _typeof(labels)) === \"object\") {\n if (labels.length === 0) return gen;\n var i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n var customLabels = [];\n var genLength = gen.length;\n for (var _i = 0; _i < genLength; _i++) {\n customLabels.push(labels({\n i: _i,\n genLength,\n generatedLabels: gen,\n domain,\n range,\n labelDelimiter\n }));\n }\n return customLabels;\n }\n return gen;\n}, \"d3_mergeLabels\");\nvar d3_linearLegend = /* @__PURE__ */ __name(function d3_linearLegend2(scale, cells, labelFormat) {\n var data = [];\n if (cells.length > 1) {\n data = cells;\n } else {\n var domain = scale.domain(), increment = (domain[domain.length - 1] - domain[0]) / (cells - 1);\n var i = 0;\n for (; i < cells; i++) {\n data.push(domain[0] + i * increment);\n }\n }\n var labels = data.map(labelFormat);\n return {\n data,\n labels,\n feature: /* @__PURE__ */ __name(function feature(d) {\n return scale(d);\n }, \"feature\")\n };\n}, \"d3_linearLegend\");\nvar d3_quantLegend = /* @__PURE__ */ __name(function d3_quantLegend2(scale, labelFormat, labelDelimiter) {\n var labels = scale.range().map(function(d) {\n var invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n return {\n data: scale.range(),\n labels,\n feature: d3_identity\n };\n}, \"d3_quantLegend\");\nvar d3_ordinalLegend = /* @__PURE__ */ __name(function d3_ordinalLegend2(scale) {\n return {\n data: scale.domain(),\n labels: scale.domain(),\n feature: /* @__PURE__ */ __name(function feature(d) {\n return scale(d);\n }, \"feature\")\n };\n}, \"d3_ordinalLegend\");\nvar d3_cellOver = /* @__PURE__ */ __name(function d3_cellOver2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellover\", obj, d);\n}, \"d3_cellOver\");\nvar d3_cellOut = /* @__PURE__ */ __name(function d3_cellOut2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellout\", obj, d);\n}, \"d3_cellOut\");\nvar d3_cellClick = /* @__PURE__ */ __name(function d3_cellClick2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellclick\", obj, d);\n}, \"d3_cellClick\");\nvar helper = {\n d3_drawShapes: /* @__PURE__ */ __name(function d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path2) {\n if (shape === \"rect\") {\n shapes.attr(\"height\", shapeHeight).attr(\"width\", shapeWidth);\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius);\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path2);\n }\n }, \"d3_drawShapes\"),\n d3_addText: /* @__PURE__ */ __name(function d3_addText(svg, enter, labels, classPrefix, labelWidth) {\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n var text = svg.selectAll(\"g.\" + classPrefix + \"cell text.\" + classPrefix + \"label\").data(labels).text(d3_identity);\n if (labelWidth) {\n svg.selectAll(\"g.\" + classPrefix + \"cell text.\" + classPrefix + \"label\").call(d3_textWrapping, labelWidth);\n }\n return text;\n }, \"d3_addText\"),\n d3_calcType: /* @__PURE__ */ __name(function d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter) {\n var type = scale.invertExtent ? d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ? d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n var range = scale.range && scale.range() || scale.domain();\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range, labelDelimiter);\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n return type;\n }, \"d3_calcType\"),\n d3_filterCells: /* @__PURE__ */ __name(function d3_filterCells(type, cellFilter) {\n var filterCells = type.data.map(function(d, i) {\n return { data: d, label: type.labels[i] };\n }).filter(cellFilter);\n var dataValues = filterCells.map(function(d) {\n return d.data;\n });\n var labelValues = filterCells.map(function(d) {\n return d.label;\n });\n type.data = type.data.filter(function(d) {\n return dataValues.indexOf(d) !== -1;\n });\n type.labels = type.labels.filter(function(d) {\n return labelValues.indexOf(d) !== -1;\n });\n return type;\n }, \"d3_filterCells\"),\n d3_placement: /* @__PURE__ */ __name(function d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign) {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\") {\n text.style(\"text-anchor\", labelAlign);\n }\n }, \"d3_placement\"),\n d3_addEvents: /* @__PURE__ */ __name(function d3_addEvents(cells, dispatcher) {\n cells.on(\"mouseover.legend\", function(d) {\n d3_cellOver(dispatcher, d, this);\n }).on(\"mouseout.legend\", function(d) {\n d3_cellOut(dispatcher, d, this);\n }).on(\"click.legend\", function(d) {\n d3_cellClick(dispatcher, d, this);\n });\n }, \"d3_addEvents\"),\n d3_title: /* @__PURE__ */ __name(function d3_title(svg, title, classPrefix, titleWidth) {\n if (title !== \"\") {\n var titleText = svg.selectAll(\"text.\" + classPrefix + \"legendTitle\");\n titleText.data([title]).enter().append(\"text\").attr(\"class\", classPrefix + \"legendTitle\");\n svg.selectAll(\"text.\" + classPrefix + \"legendTitle\").text(title);\n if (titleWidth) {\n svg.selectAll(\"text.\" + classPrefix + \"legendTitle\").call(d3_textWrapping, titleWidth);\n }\n var cellsSvg = svg.select(\".\" + classPrefix + \"legendCells\");\n var yOffset = svg.select(\".\" + classPrefix + \"legendTitle\").nodes().map(function(d) {\n return d.getBBox().height;\n })[0], xOffset = -cellsSvg.nodes().map(function(d) {\n return d.getBBox().x;\n })[0];\n cellsSvg.attr(\"transform\", \"translate(\" + xOffset + \",\" + yOffset + \")\");\n }\n }, \"d3_title\"),\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n d3_defaultFormatSpecifier: \".01f\",\n d3_defaultDelimiter: \"to\"\n};\nfunction color() {\n var scale = scaleLinear(), shape = \"rect\", shapeWidth = 15, shapeHeight = 15, shapeRadius = 10, shapePadding = 2, cells = [5], cellFilter = void 0, labels = [], classPrefix = \"\", useClass = false, title = \"\", locale = helper.d3_defaultLocale, specifier = helper.d3_defaultFormatSpecifier, labelOffset = 10, labelAlign = \"middle\", labelDelimiter = helper.d3_defaultDelimiter, labelWrap = void 0, orient = \"vertical\", ascending = false, path2 = void 0, titleWidth = void 0, legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n function legend(svg) {\n var type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), legendG = svg.selectAll(\"g\").data([scale]);\n legendG.enter().append(\"g\").attr(\"class\", classPrefix + \"legendCells\");\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter);\n }\n var cell = svg.select(\".\" + classPrefix + \"legendCells\").selectAll(\".\" + classPrefix + \"cell\").data(type.data);\n var cellEnter = cell.enter().append(\"g\").attr(\"class\", classPrefix + \"cell\");\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\");\n var shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape + \".\" + classPrefix + \"swatch\").data(type.data);\n helper.d3_addEvents(cellEnter, legendDispatcher);\n cell.exit().transition().style(\"opacity\", 0).remove();\n shapes.exit().transition().style(\"opacity\", 0).remove();\n shapes = shapes.merge(shapes);\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path2);\n var text = helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap);\n cell = cellEnter.merge(cell);\n var textSize = text.nodes().map(function(d) {\n return d.getBBox();\n }), shapeSize = shapes.nodes().map(function(d) {\n return d.getBBox();\n });\n if (!useClass) {\n if (shape == \"line\") {\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", function(d) {\n return classPrefix + \"swatch \" + type.feature(d);\n });\n }\n var cellTrans = void 0, textTrans = void 0, textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1;\n if (orient === \"vertical\") {\n (function() {\n var cellSize = textSize.map(function(d, i) {\n return Math.max(d.height, shapeSize[i].height);\n });\n cellTrans = /* @__PURE__ */ __name(function cellTrans2(d, i) {\n var height = sum(cellSize.slice(0, i));\n return \"translate(0, \" + (height + i * shapePadding) + \")\";\n }, \"cellTrans\");\n textTrans = /* @__PURE__ */ __name(function textTrans2(d, i) {\n return \"translate( \" + (shapeSize[i].width + shapeSize[i].x + labelOffset) + \", \" + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + \")\";\n }, \"textTrans\");\n })();\n } else if (orient === \"horizontal\") {\n cellTrans = /* @__PURE__ */ __name(function cellTrans2(d, i) {\n return \"translate(\" + i * (shapeSize[i].width + shapePadding) + \",0)\";\n }, \"cellTrans\");\n textTrans = /* @__PURE__ */ __name(function textTrans2(d, i) {\n return \"translate(\" + (shapeSize[i].width * textAlign + shapeSize[i].x) + \",\\n \" + (shapeSize[i].height + shapeSize[i].y + labelOffset + 8) + \")\";\n }, \"textTrans\");\n }\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n }\n __name(legend, \"legend\");\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2) {\n cells = _;\n }\n return legend;\n };\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || _ == \"path\" && typeof d === \"string\") {\n shape = _;\n path2 = d;\n }\n return legend;\n };\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n legend.locale = function(_) {\n if (!arguments.length) return locale;\n locale = formatLocale(_);\n return legend;\n };\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier);\n specifier = formatSpecifier(_);\n return legend;\n };\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false) {\n useClass = _;\n }\n return legend;\n };\n legend.orient = function(_) {\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n };\n legend.on = function() {\n var value = legendDispatcher.on.apply(legendDispatcher, arguments);\n return value === legendDispatcher ? legend : value;\n };\n return legend;\n}\n__name(color, \"color\");\nconst _Legend = class _Legend extends SVGWidget {\n constructor(owner) {\n super();\n __publicField(this, \"_owner\");\n __publicField(this, \"_targetWidget\");\n __publicField(this, \"_targetWidgetMonitor\");\n __publicField(this, \"_legendOrdinal\");\n __publicField(this, \"_disabled\", []);\n __publicField(this, \"_symbolTypeMap\", {\n \"circle\": d3SymbolCircle,\n \"cross\": d3SymbolCross,\n \"diamond\": d3SymbolDiamond,\n \"square\": d3SymbolSquare,\n \"star\": d3SymbolStar,\n \"triangle\": d3SymbolTriangle,\n \"wye\": d3SymbolWye\n });\n __publicField(this, \"_g\");\n __publicField(this, \"_containerSize\");\n this._owner = owner;\n this._drawStartPos = \"origin\";\n const context = this;\n this._legendOrdinal = color().shape(\"path\", d3Symbol().type(d3SymbolCircle).size(150)()).shapePadding(10).shapeRadius(10).on(\"cellclick\", function(d) {\n context.onClick(d, this);\n }).on(\"cellover\", (d) => {\n context.onOver(d, this);\n }).on(\"cellout\", (d) => {\n context.onOut(d, this);\n });\n }\n isDisabled(d) {\n if (typeof d === \"undefined\") {\n return false;\n } else if (typeof d === \"string\") {\n return d.indexOf(\"__\") === 0 || this._disabled.indexOf(d) >= 0;\n } else if (d instanceof Database.Field) {\n return d.id().indexOf(\"__\") === 0 || this._disabled.indexOf(d.id()) >= 0;\n }\n return this._disabled.indexOf(d) >= 0;\n }\n filteredFields() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.fields();\n case \"ND\":\n return this.fields().filter((d) => !this.isDisabled(d));\n }\n return this.fields();\n }\n filteredColumns() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.columns();\n case \"ND\":\n return this.columns().filter((d) => !this.isDisabled(d));\n }\n return this.columns();\n }\n filteredData() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.data().filter((row) => !this.isDisabled(row[0]));\n case \"ND\":\n const disabledCols = {};\n let anyDisabled = false;\n this.columns().forEach((col, idx) => {\n const disabled = this.isDisabled(col);\n disabledCols[idx] = disabled;\n if (disabled) {\n anyDisabled = true;\n }\n });\n return !anyDisabled ? this.data() : this.data().map((row) => {\n return row.filter((cell, idx) => !disabledCols[idx]);\n });\n }\n return this.data();\n }\n isRainbow() {\n const widget = this.getWidget();\n return widget && widget._palette && widget._palette.type() === \"rainbow\";\n }\n targetWidget(_) {\n if (!arguments.length) return this._targetWidget;\n this._targetWidget = _;\n if (this._targetWidgetMonitor) {\n this._targetWidgetMonitor.remove();\n delete this._targetWidgetMonitor;\n }\n if (this._targetWidget) {\n const context = this;\n this._targetWidgetMonitor = this._targetWidget.monitor(function(key, newProp, oldProp, source) {\n switch (key) {\n case \"chart\":\n case \"columns\":\n case \"data\":\n case \"paletteID\":\n context.lazyRender();\n break;\n }\n });\n }\n return this;\n }\n getWidget() {\n if (this._targetWidget) {\n switch (this._targetWidget.classID()) {\n case \"composite_MultiChart\":\n return this._targetWidget.chart();\n }\n }\n return this._targetWidget;\n }\n getPalette() {\n const widget = this.getWidget();\n if (widget && widget._palette) {\n switch (widget._palette.type()) {\n case \"ordinal\":\n return Palette.ordinal(widget._palette.id());\n case \"rainbow\":\n return Palette.rainbow(widget._palette.id());\n }\n }\n return Palette.ordinal(\"default\");\n }\n getPaletteType() {\n return this.getPalette().type();\n }\n fillColorFunc() {\n const widget = this.getWidget();\n if (widget && widget.fillColor) {\n if (widget._palette && widget.paletteID && widget._palette.name !== widget.paletteID()) {\n widget._palette = widget._palette.switch(widget.paletteID());\n }\n return (row, col, sel) => {\n return widget.fillColor(row, col, sel);\n };\n }\n const palette = Palette.ordinal(widget && widget.paletteID ? widget.paletteID() || \"default\" : \"default\");\n return (row, col, sel) => {\n return palette(col);\n };\n }\n fillColor(row, col, sel) {\n return this.fillColorFunc()(row, col, sel);\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._g = element.append(\"g\").attr(\"class\", \"legendOrdinal\");\n }\n calcMetaData() {\n let dataArr = [];\n let total = 0;\n let maxLabelWidth = 0;\n const colLength = this.columns().length;\n if (this._targetWidget) {\n const columns = this.columns();\n switch (this.getPaletteType()) {\n case \"ordinal\":\n const fillColor = this.fillColorFunc();\n let val = 0;\n switch (this.dataFamily()) {\n case \"2D\":\n dataArr = this.data().map(function(n, i) {\n val = this.data()[i].slice(1, colLength).reduce((acc, n2) => acc + n2, 0);\n const disabled = this.isDisabled(n[0]);\n if (!disabled) total += val;\n const label = n[0] + (!disabled && this.showSeriesTotal() ? ` (${val})` : \"\");\n const textSize = this.textSize(label);\n if (maxLabelWidth < textSize.width) maxLabelWidth = textSize.width;\n return [fillColor(n, n[0], false), n[0], label];\n }, this);\n break;\n case \"ND\":\n const widgetColumns = this.columns().filter((col) => col.indexOf(\"__\") !== 0);\n dataArr = widgetColumns.filter(function(n, i) {\n return i > 0;\n }).map(function(n, i) {\n val = this.data().reduce((acc, n2) => acc + n2[i + 1], 0);\n const disabled = this.isDisabled(columns[i + 1]);\n const label = n + (!disabled && this.showSeriesTotal() ? ` (${val})` : \"\");\n if (!disabled) total += val;\n const textSize = this.textSize(label);\n if (maxLabelWidth < textSize.width) maxLabelWidth = textSize.width;\n return [fillColor(void 0, n, false), n, label];\n }, this);\n break;\n default:\n const widgetColumns2 = this.columns();\n dataArr = widgetColumns2.map(function(n) {\n return [fillColor(void 0, n, false), n];\n }, this);\n break;\n }\n break;\n case \"rainbow\":\n const palette = this.getPalette();\n const format$1 = format(this.rainbowFormat());\n const widget = this.getWidget();\n const steps = this.rainbowBins();\n const weightMin = widget._dataMinWeight;\n const weightMax = widget._dataMaxWeight;\n const stepWeightDiff = (weightMax - weightMin) / (steps - 1);\n dataArr.push([palette(weightMin, weightMin, weightMax), format$1(weightMin)]);\n for (let x = 1; x < steps - 1; ++x) {\n let mid = stepWeightDiff * x;\n if (Math.floor(mid) > parseInt(dataArr[0][1])) {\n mid = Math.floor(mid);\n }\n dataArr.push([palette(mid, weightMin, weightMax), format$1(mid)]);\n }\n dataArr.push([palette(weightMax, weightMin, weightMax), format$1(weightMax)]);\n break;\n }\n }\n return {\n dataArr,\n total,\n maxLabelWidth\n };\n }\n update(domNode, element) {\n super.update(domNode, element);\n const { dataArr, maxLabelWidth, total } = this.calcMetaData();\n const radius = this.shapeRadius();\n const size = this.radiusToSymbolSize(radius);\n const strokeWidth = 1;\n let shapePadding = this.itemPadding();\n if (this.orientation() === \"horizontal\") {\n shapePadding += maxLabelWidth - radius * 2;\n }\n const ordinal = scaleOrdinal().domain(dataArr.map((row) => row[1])).range(dataArr.map((row) => row[0]));\n this._legendOrdinal.shape(\"path\", d3Symbol().type(this._symbolTypeMap[this.symbolType()]).size(size)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(shapePadding).scale(ordinal).labels((d) => dataArr[d.i][2]);\n this._g.call(this._legendOrdinal);\n this.updateDisabled(element, dataArr);\n const legendCellsBbox = this._g.select(\".legendCells\").node().getBBox();\n let offsetX = Math.abs(legendCellsBbox.x);\n let offsetY = Math.abs(legendCellsBbox.y) + strokeWidth;\n if (this.orientation() === \"horizontal\") {\n if (this.labelAlign() === \"start\") {\n offsetX += strokeWidth;\n } else if (this.labelAlign() === \"end\") {\n offsetX -= strokeWidth;\n }\n if (this.width() > legendCellsBbox.width) {\n const extraWidth = this.width() - legendCellsBbox.width;\n offsetX += extraWidth / 2;\n }\n } else if (this.orientation() === \"vertical\") {\n offsetX += strokeWidth;\n if (this._containerSize.height > legendCellsBbox.height) {\n const extraHeight = this.height() - legendCellsBbox.height;\n offsetY += extraHeight / 2;\n }\n }\n this._g.attr(\"transform\", `translate(${offsetX}, ${offsetY})`);\n this.pos({\n x: 0,\n y: 0\n });\n this._legendOrdinal.labelOffset(this.itemPadding());\n const legendTotal = this._g.selectAll(\".legendTotal\").data(dataArr.length && this.showLegendTotal() ? [total] : []);\n const totalText = `Total: ${total}`;\n const totalOffsetX = -offsetX;\n const totalOffsetY = legendCellsBbox.height + this.itemPadding() + strokeWidth;\n this.enableOverflowScroll(false);\n this.enableOverflow(true);\n legendTotal.enter().append(\"text\").classed(\"legendTotal\", true).merge(legendTotal).attr(\"transform\", `translate(${totalOffsetX}, ${totalOffsetY})`).text(totalText);\n legendTotal.exit().remove();\n }\n updateDisabled(element, dataArr) {\n element.style(\"cursor\", \"pointer\").selectAll(\"path.swatch\").filter((d, i) => i < dataArr.length).style(\"stroke\", (d, i) => dataArr[i][0]).style(\n \"fill\",\n (d, i) => this._disabled.indexOf(d) < 0 ? dataArr[i][0] : \"white\"\n );\n }\n postUpdate(domNode, element) {\n let w;\n if (this._boundingBox) {\n w = this._boundingBox.width;\n this._boundingBox.width = this._size.width;\n }\n super.postUpdate(domNode, element);\n if (w !== void 0) {\n this._boundingBox.width = w;\n }\n this._parentRelativeDiv.style(\"overflow\", \"hidden\");\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n radiusToSymbolSize(radius) {\n const circleSize = Math.pow(radius, 2) * Math.PI;\n switch (this.symbolType()) {\n case \"star\":\n return circleSize * 0.45;\n case \"triangle\":\n return circleSize * 0.65;\n case \"cross\":\n case \"diamond\":\n case \"wye\":\n return circleSize * 0.75;\n case \"circle\":\n return circleSize;\n case \"square\":\n return circleSize * 1.3;\n }\n }\n onClick(d, domNode) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n const disabledIdx = this._disabled.indexOf(d);\n if (disabledIdx < 0) {\n this._disabled.push(d);\n } else {\n this._disabled.splice(disabledIdx, 1);\n }\n this._owner.refreshColumns();\n this._owner.refreshData();\n this._owner.render();\n break;\n }\n break;\n }\n }\n onOver(d, domNode) {\n if (instanceOfIHighlight(this._owner)) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n if (this._disabled.indexOf(d) < 0) {\n this._owner.highlightColumn(d);\n }\n break;\n }\n break;\n }\n }\n }\n onOut(d, domNode) {\n if (instanceOfIHighlight(this._owner)) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n this._owner.highlightColumn();\n break;\n }\n break;\n }\n }\n }\n onDblClick(rowData, rowIdx) {\n }\n onMouseOver(rowData, rowIdx) {\n }\n resize(_size) {\n let retVal;\n if (this.fitToContent()) {\n this._containerSize = _size;\n const bbox = this.getBBox();\n if (_size.width > bbox.width) {\n bbox.width = _size.width;\n }\n if (_size.height > bbox.height) {\n bbox.height = _size.height;\n }\n retVal = super.resize.apply(this, [{ ...bbox }]);\n } else {\n retVal = super.resize.apply(this, arguments);\n }\n return retVal;\n }\n};\n__name(_Legend, \"Legend\");\nlet Legend = _Legend;\nLegend.prototype._class += \" layout_Legend\";\nLegend.prototype.publish(\"title\", \"\", \"string\", \"Title\");\nLegend.prototype.publish(\"symbolType\", \"circle\", \"set\", \"Shape of each legend item\", [\"circle\", \"cross\", \"diamond\", \"square\", \"star\", \"triangle\", \"wye\"]);\nLegend.prototype.publish(\"labelMaxWidth\", null, \"number\", \"Max Label Width (pixels)\", null, { optional: true });\nLegend.prototype.publish(\"orientation\", \"vertical\", \"set\", \"Orientation of Legend rows\", [\"vertical\", \"horizontal\"], { tags: [\"Private\"] });\nLegend.prototype.publish(\"dataFamily\", \"ND\", \"set\", \"Type of data\", [\"1D\", \"2D\", \"ND\", \"map\", \"graph\", \"any\"], { tags: [\"Private\"] });\nLegend.prototype.publish(\"rainbowFormat\", \",\", \"string\", \"Rainbow number formatting\", null, { tags: [\"Private\"], optional: true, disable: /* @__PURE__ */ __name((w) => !w.isRainbow(), \"disable\") });\nLegend.prototype.publish(\"rainbowBins\", 8, \"number\", \"Number of rainbow bins\", null, { tags: [\"Private\"], disable: /* @__PURE__ */ __name((w) => !w.isRainbow(), \"disable\") });\nLegend.prototype.publish(\"showSeriesTotal\", false, \"boolean\", \"Show value next to series\");\nLegend.prototype.publish(\"showLegendTotal\", false, \"boolean\", \"Show a total of the series values under the legend\", null);\nLegend.prototype.publish(\"itemPadding\", 8, \"number\", \"Padding between legend items (pixels)\");\nLegend.prototype.publish(\"shapeRadius\", 7, \"number\", \"Radius of legend shape (pixels)\");\nLegend.prototype.publish(\"fitToContent\", true, \"boolean\", \"If true, resize will simply reapply the bounding box dimensions\");\nLegend.prototype.publish(\"labelAlign\", \"start\", \"set\", \"Horizontal alignment of legend item label (for horizontal orientation only)\", [\"start\", \"middle\", \"end\"], { optional: true, disable: /* @__PURE__ */ __name((w) => w.orientation() === \"vertical\", \"disable\") });\nconst _Modal = class _Modal extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_widget\");\n __publicField(this, \"_relativeTarget\");\n __publicField(this, \"_fade\");\n __publicField(this, \"_modal\");\n __publicField(this, \"_modalHeader\");\n __publicField(this, \"_modalBody\");\n __publicField(this, \"_modalHeaderAnnotations\");\n __publicField(this, \"_modalHeaderCloseButton\");\n __publicField(this, \"_close\");\n this._tag = \"div\";\n }\n closeModal() {\n this.visible(false);\n }\n getRelativeTarget() {\n let relativeTarget;\n if (this.relativeTargetId()) {\n relativeTarget = document.getElementById(this.relativeTargetId());\n if (relativeTarget) {\n return relativeTarget;\n }\n }\n if (!relativeTarget) {\n relativeTarget = this.locateAncestor(\"layout_Grid\");\n if (relativeTarget && relativeTarget.element) {\n return relativeTarget.element().node();\n }\n }\n return document.body;\n }\n setModalSize() {\n if (this.fixedHeight() !== null && this.fixedWidth() !== null) {\n this._modal.style(\"height\", this.fixedHeight()).style(\"width\", this.fixedWidth()).style(\"min-height\", null).style(\"min-width\", null).style(\"max-height\", null).style(\"max-width\", null);\n } else if (this.minHeight() || this.minWidth()) {\n this._modal.style(\"min-height\", this.minHeight()).style(\"min-width\", this.minWidth()).style(\"max-height\", this.maxHeight()).style(\"max-width\", this.maxWidth());\n }\n const modalRect = this._modal.node().getBoundingClientRect();\n const headerRect = this._modalHeader.node().getBoundingClientRect();\n this._modalBody.style(\"height\", modalRect.height - headerRect.height + \"px\").style(\"width\", modalRect.width);\n return modalRect;\n }\n setFadePosition(rect) {\n this._fade.style(\"top\", rect.top + \"px\").style(\"left\", rect.left + \"px\").style(\"width\", rect.width + \"px\").style(\"height\", rect.height + \"px\");\n }\n setModalPosition(rect) {\n const modalRect = this.setModalSize();\n if (this.fixedTop() !== null && this.fixedLeft() !== null) {\n this._modal.style(\"top\", `calc(${this.fixedTop()} + ${rect.top}px)`).style(\"left\", `calc(${this.fixedLeft()} + ${rect.left}px)`);\n } else if (this.fixedHeight() !== null && this.fixedWidth() !== null) {\n this._modal.style(\"top\", rect.top + rect.height / 2 - modalRect.height / 2 + \"px\").style(\"left\", rect.left + rect.width / 2 - modalRect.width / 2 + \"px\");\n } else if (this.minHeight() || this.minWidth()) {\n const contentRect = this._modal.node().getBoundingClientRect();\n this._modal.style(\"top\", rect.top + rect.height / 2 - contentRect.height / 2 + \"px\").style(\"left\", rect.left + rect.width / 2 - contentRect.width / 2 + \"px\");\n }\n }\n resize(size) {\n super.resize();\n if (this._modal) this.setModalSize();\n return this;\n }\n resizeBodySync(width, height) {\n const header = this._modalHeader.node();\n const headerRect = header.getBoundingClientRect();\n this._modal.style(\"width\", width + \"px\").style(\"height\", height + headerRect.height + \"px\").style(\"min-width\", width + \"px\").style(\"min-height\", height + headerRect.height + \"px\");\n this._modalHeader.style(\"width\", width + \"px\");\n this._modalBody.style(\"width\", width + \"px\").style(\"height\", height + \"px\");\n return this.minWidth(width + \"px\").minHeight(height + headerRect.height + \"px\").resize({\n height: height + headerRect.height,\n width\n });\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._fade = element.append(\"div\").classed(\"layout_Modal-fade\", true).classed(\"layout_Modal-fadeClickable\", this.enableClickFadeToClose()).classed(\"layout_Modal-fade-hidden\", !this.showFade());\n const header_h = this.titleFontSize() * 2;\n this._modal = element.append(\"div\").classed(\"layout_Modal-content\", true);\n this._modalHeader = this._modal.append(\"div\").classed(\"layout_Modal-header\", true).style(\"color\", this.titleFontColor()).style(\"font-size\", this.titleFontSize() + \"px\").style(\"height\", header_h + \"px\");\n this._modalBody = this._modal.append(\"div\").classed(\"layout_Modal-body\", true).style(\"height\", `calc( 100% - ${header_h}px )`).style(\"overflow-x\", this.overflowX()).style(\"overflow-y\", this.overflowY());\n this._modalHeader.append(\"div\").classed(\"layout_Modal-title\", true).style(\"line-height\", this.titleFontSize() + \"px\").style(\"top\", this.titleFontSize() / 2 + \"px\").style(\"left\", this.titleFontSize() / 2 + \"px\").text(this.formattedTitle());\n this._modalHeaderAnnotations = this._modalHeader.append(\"div\").classed(\"layout_Modal-annotations\", true);\n this._modalHeaderCloseButton = this._modalHeaderAnnotations.append(\"div\").classed(\"layout_Modal-closeButton\", true).html('<i class=\"fa fa-close\"></i>');\n this._modalHeaderAnnotations.style(\"line-height\", this.titleFontSize() + \"px\").style(\"right\", this.titleFontSize() / 2 + \"px\").style(\"top\", this.titleFontSize() / 2 + \"px\");\n this._modalHeaderCloseButton.on(\"click\", () => {\n this.closeModal();\n });\n this._fade.on(\"click\", (n) => {\n if (this.enableClickFadeToClose()) {\n this.closeModal();\n }\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n element.style(\"display\", this.show() ? null : \"none\");\n this._fade.classed(\"layout_Modal-fade-hidden\", !this.showFade());\n this._relativeTarget = this.getRelativeTarget();\n this.setModalSize();\n const rect = this._relativeTarget.getBoundingClientRect();\n this.setFadePosition(rect);\n this.setModalPosition(rect);\n if (this.show()) {\n if (!this._widget.target()) {\n this._widget.target(this._modalBody.node());\n }\n this._widget.resize().render();\n } else {\n this._widget.target(null).render();\n }\n }\n exit(domNode, element) {\n if (this._widget) {\n this._widget.target(null);\n }\n super.exit(domNode, element);\n }\n formattedTitle() {\n const title = this.title_exists() ? this.title().trim() : \"\";\n if (title.length > 0 && title.slice(0, 1) === \"(\" && title.slice(-1) === \")\") {\n return title.slice(1, -1);\n }\n return this.title();\n }\n};\n__name(_Modal, \"Modal\");\nlet Modal = _Modal;\nModal.prototype._class += \" layout_Modal\";\nModal.prototype.publish(\"title\", null, \"string\", \"title\");\nModal.prototype.publish(\"widget\", null, \"widget\", \"widget\");\nModal.prototype.publish(\"titleFontSize\", 18, \"number\", \"titleFontSize (in pixels)\");\nModal.prototype.publish(\"titleFontColor\", \"#ffffff\", \"html-color\", \"titleFontColor\");\nModal.prototype.publish(\"relativeTargetId\", null, \"string\", \"relativeTargetId\");\nModal.prototype.publish(\"show\", true, \"boolean\", \"show\");\nModal.prototype.publish(\"showFade\", true, \"boolean\", \"showFade\");\nModal.prototype.publish(\"enableClickFadeToClose\", true, \"boolean\", \"enableClickFadeToClose\");\nModal.prototype.publish(\"minWidth\", \"400px\", \"string\", \"minWidth\");\nModal.prototype.publish(\"minHeight\", \"400px\", \"string\", \"minHeight\");\nModal.prototype.publish(\"maxWidth\", \"800px\", \"string\", \"maxWidth\");\nModal.prototype.publish(\"maxHeight\", \"800px\", \"string\", \"maxHeight\");\nModal.prototype.publish(\"fixedWidth\", null, \"string\", \"fixedWidth\");\nModal.prototype.publish(\"fixedHeight\", null, \"string\", \"fixedHeight\");\nModal.prototype.publish(\"fixedTop\", null, \"string\", \"fixedTop\");\nModal.prototype.publish(\"fixedLeft\", null, \"string\", \"fixedLeft\");\nModal.prototype.publish(\"overflowX\", \"hidden\", \"string\", \"overflowX\");\nModal.prototype.publish(\"overflowY\", \"scroll\", \"string\", \"overflowY\");\nconst _ChartPanel = class _ChartPanel extends Border2 {\n constructor() {\n super();\n __publicField(this, \"_legend\", new Legend(this).enableOverflow(true));\n __publicField(this, \"_progressBar\", new ProgressBar());\n __publicField(this, \"_autoScale\", false);\n __publicField(this, \"_resolutions\", {\n tiny: { width: 100, height: 100 },\n small: { width: 300, height: 300 }\n });\n __publicField(this, \"_modal\", new Modal());\n __publicField(this, \"_highlight\");\n __publicField(this, \"_scale\");\n __publicField(this, \"_orig_size\");\n __publicField(this, \"_toggleInfo\", new ToggleButton().faChar(\"fa-info-circle\").tooltip(\".Description\").selected(false).on(\"enabled\", () => {\n return this.description() !== \"\";\n }).on(\"click\", () => {\n if (this._toggleInfo.selected()) {\n this._modal.title(this.title()).widget(new Text().text(this.description())).show(true).render();\n const origCloseFunc = this._modal._close;\n this._modal._close = () => {\n this._toggleInfo.selected(false).render();\n this._modal._close = origCloseFunc;\n };\n }\n }).on(\"mouseMove\", () => {\n }).on(\"mouseOut\", () => {\n }));\n __publicField(this, \"_toggleData\", new ToggleButton().faChar(\"fa-table\").tooltip(\"Data\").on(\"click\", () => {\n this.dataVisible(this._toggleData.selected());\n this.render();\n }));\n __publicField(this, \"_buttonDownload\", new Button().faChar(\"fa-download\").tooltip(\"Download\").on(\"click\", () => {\n this.downloadCSV();\n }));\n __publicField(this, \"_buttonDownloadImage\", new Button().faChar(\"fa-image\").tooltip(\"Download Image\").on(\"click\", () => {\n this.downloadPNG();\n }));\n __publicField(this, \"_toggleLegend\", new ToggleButton().faChar(\"fa-list-ul\").tooltip(\"Legend\").selected(false).on(\"click\", () => {\n const selected = this._toggleLegend.selected();\n if (this.legendPosition() === \"bottom\") {\n this.showBottom(selected);\n } else if (this.legendPosition() === \"right\") {\n this.showRight(selected);\n }\n this.legendVisible(selected);\n this.render();\n }));\n __publicField(this, \"_spacer\", new Spacer());\n __publicField(this, \"_titleBar\", new TitleBar().buttons([this._toggleData, this._buttonDownload, this._buttonDownloadImage, this._spacer, this._toggleLegend]));\n __publicField(this, \"_carousel\", new Carousel());\n __publicField(this, \"_table\", new Table());\n __publicField(this, \"_widget\");\n __publicField(this, \"_hideLegendToggleList\", [\"dgrid_Table\"]);\n __publicField(this, \"_prevdataVisible\");\n __publicField(this, \"_prevlegendVisible\");\n __publicField(this, \"_prevLegendPosition\");\n __publicField(this, \"_prevChartDataFamily\");\n __publicField(this, \"_prevChart\");\n __publicField(this, \"_prevButtons\");\n this._tag = \"div\";\n }\n fields(_) {\n if (!arguments.length) return super.fields();\n super.fields(_);\n this._legend.fields(_);\n this.refreshFields();\n return this;\n }\n refreshFields() {\n this._widget.fields(this._legend.filteredFields());\n this._table.fields(this._legend.filteredFields());\n return this;\n }\n columns(_, asDefault) {\n if (!arguments.length) return super.columns();\n super.columns(_, asDefault);\n this._legend.columns(_, asDefault);\n this.refreshColumns();\n return this;\n }\n refreshColumns() {\n this._widget.columns(this._legend.filteredColumns());\n this._table.columns(this._legend.filteredColumns());\n return this;\n }\n data(_) {\n if (!arguments.length) return super.data();\n super.data(_);\n this._legend.data(_);\n this.refreshData();\n return this;\n }\n refreshData() {\n this._widget.data(this._legend.filteredData());\n this._table.data(this._legend.filteredData());\n return this;\n }\n highlight(_) {\n if (!arguments.length) return this._highlight;\n this._highlight = _;\n return this;\n }\n startProgress() {\n this._progressBar.start();\n }\n finishProgress() {\n this._progressBar.finish();\n }\n buttons(_) {\n if (!arguments.length) return this._titleBar.buttons();\n this._titleBar.buttons(_);\n return this;\n }\n downloadCSV() {\n const namePrefix = this.downloadTitle() ? this.downloadTitle() : this.title() ? this.title() : \"data\";\n const nameSuffix = this.downloadTimestampSuffix() ? \"_\" + Utility.timestamp() : \"\";\n Utility.downloadString(\"CSV\", this._widget.export(\"CSV\"), namePrefix + nameSuffix);\n return this;\n }\n downloadPNG() {\n const widget = this.widget();\n if (widget instanceof SVGWidget) {\n if (!this.legendVisible()) {\n widget.downloadPNG(this.title());\n } else {\n widget.downloadPNG(this.title(), void 0, this._legend);\n }\n }\n return this;\n }\n highlightColumn(column) {\n if (column) {\n const cssTag = `series-${this.cssTag(column)}`;\n this._centerWA.element().selectAll(\".series\").each(function() {\n const element = select(this);\n const highlight = element.classed(cssTag);\n element.classed(\"highlight\", highlight).classed(\"lowlight\", !highlight);\n });\n } else {\n this._centerWA.element().selectAll(\".series\").classed(\"highlight\", false).classed(\"lowlight\", false);\n }\n return this;\n }\n getResponsiveMode() {\n if (!this.enableAutoscaling()) return \"none\";\n if (!this._autoScale) return \"regular\";\n if (this.size().width <= this._resolutions.tiny.width || this.size().height <= this._resolutions.tiny.height) {\n return \"tiny\";\n } else if (this.size().width <= this._resolutions.small.width || this.size().height <= this._resolutions.small.height) {\n return \"small\";\n }\n return \"regular\";\n }\n setOrigSize() {\n this._orig_size = JSON.parse(JSON.stringify(this.size()));\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._modal.target(this.target()).relativeTargetId(this.id());\n this.top(this._titleBar);\n this.center(this._carousel);\n this._legend.targetWidget(this._widget).orientation(\"vertical\").title(\"\").visible(false);\n this._progressBar.enter(domNode, element);\n this.setOrigSize();\n }\n preUpdateTiny(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"none\");\n }\n preUpdateSmall(element) {\n const scale_x = this._orig_size.width / this._resolutions.small.width;\n const scale_y = this._orig_size.height / this._resolutions.small.height;\n this._scale = Math.min(scale_x, scale_y);\n const x_is_smaller = this._scale === scale_x;\n this.size({\n width: x_is_smaller ? this._resolutions.small.width : this._orig_size.width * (1 / this._scale),\n height: !x_is_smaller ? this._resolutions.small.height : this._orig_size.height * (1 / this._scale)\n });\n element.select(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"lhs\").style(\"display\", \"none\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n element.style(\"transform\", `scale(${this._scale})`);\n }\n preUpdateRegular(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n element.select(\"div.title-icon\").style(\"position\", \"static\");\n element.style(\"transform\", \"translate(0px,0px) scale(1)\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n }\n preUpdate(domNode, element) {\n super.preUpdate(domNode, element);\n if (this._prevLegendPosition !== this.legendPosition()) {\n if (this._legend.target() !== null) this._legend.target(null);\n if (this._prevLegendPosition !== void 0) {\n this.swap(this._prevLegendPosition, this.legendPosition());\n } else {\n this[this.legendPosition()](this._legend);\n }\n if (this.legendPosition() === \"right\") {\n this.rightOverflowX(\"hidden\");\n this.rightOverflowY(\"auto\");\n this.bottomOverflowX(\"visible\");\n this.bottomOverflowY(\"visible\");\n } else {\n this.rightOverflowX(\"visible\");\n this.rightOverflowY(\"visible\");\n this.bottomOverflowX(\"auto\");\n this.bottomOverflowY(\"hidden\");\n }\n this._prevLegendPosition = this.legendPosition();\n }\n if (this._prevdataVisible !== this.dataVisible()) {\n this._prevdataVisible = this.dataVisible();\n this._toggleData.selected(this._prevdataVisible);\n this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);\n this._carousel.active(this._prevdataVisible ? 1 : 0);\n }\n if (this._prevlegendVisible !== this.legendVisible()) {\n this._prevlegendVisible = this.legendVisible();\n this._toggleLegend.selected(this._prevlegendVisible);\n this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);\n }\n this._legend.orientation(this.legendPosition() === \"bottom\" ? \"horizontal\" : \"vertical\");\n this.showLeft(!this.left());\n switch (this.getResponsiveMode()) {\n case \"tiny\":\n this.preUpdateTiny(element);\n break;\n case \"small\":\n this.preUpdateSmall(element);\n break;\n case \"regular\":\n this.preUpdateRegular(element);\n break;\n }\n const chart = this._widget.classID() === \"composite_MultiChart\" ? this._widget[\"chart\"]() : this._widget;\n this._legend.dataFamily(chart._dataFamily || \"any\");\n if (this._prevChartDataFamily !== this._legend.dataFamily()) {\n this._prevChartDataFamily = this._legend.dataFamily();\n switch (this._prevChartDataFamily) {\n case \"any\":\n this._toggleLegend.selected(false);\n this._legend.visible(false);\n break;\n }\n }\n element.style(\"box-shadow\", this.highlight() ? `inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}` : \"none\");\n if (this._hideLegendToggleList.indexOf(chart.classID()) !== -1) {\n this._spacer.visible(false);\n this._toggleLegend.visible(false);\n } else {\n this._spacer.visible(true);\n this._toggleLegend.visible(true);\n }\n if (this._prevChart !== chart) {\n this._prevChart = chart;\n const widgetIconBar = chart ? chart[\"_titleBar\"] || chart[\"_iconBar\"] : void 0;\n if (widgetIconBar && widgetIconBar instanceof IconBar) {\n this._prevButtons = this._prevButtons || [...this.buttons()];\n const buttons = [\n ...widgetIconBar.buttons(),\n new Spacer(),\n ...this._prevButtons\n ];\n widgetIconBar.buttons([]).render();\n this.buttons(buttons);\n } else if (this._prevButtons) {\n this.buttons(this._prevButtons);\n }\n }\n const hiddenButtons = [];\n if (!this.dataButtonVisible()) hiddenButtons.push(this._toggleData);\n if (!this.downloadButtonVisible()) hiddenButtons.push(this._buttonDownload);\n if (!this.downloadImageButtonVisible()) hiddenButtons.push(this._buttonDownloadImage);\n if (!this.legendButtonVisible()) hiddenButtons.push(this._toggleLegend);\n this._buttonDownloadImage.enabled(this.widget() instanceof SVGWidget);\n this._titleBar.hiddenButtons(hiddenButtons).visible(this.titleVisible());\n this.topOverlay(this.titleOverlay() || !this.titleVisible());\n }\n postUpdate(domNode, element) {\n super.postUpdate(domNode, element);\n switch (this.getResponsiveMode()) {\n case \"tiny\":\n this.postUpdateTiny(element);\n break;\n case \"small\":\n this.postUpdateSmall(element);\n break;\n case \"regular\":\n this.postUpdateRegular(element);\n break;\n }\n }\n postUpdateTiny(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"none\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"visible\").style(\"font-size\", this.titleIconFontSize() / 3 + \"px\").style(\"line-height\", this.titleIconFontSize() / 3 + \"px\").style(\"left\", this.titleIconFontSize() + \"px\").text(this.data().length);\n element.style(\"transform\", \"translate(0px,0px) scale(1)\");\n const iconDiv = element.selectAll(\"div.title-icon\");\n const _node = iconDiv.node();\n const _container = element.node().parentElement;\n const containerRect = _container.getBoundingClientRect();\n if (_node) {\n const rect = iconDiv.node().getBoundingClientRect();\n const icon_top = containerRect.height / 2;\n iconDiv.style(\"position\", \"absolute\").style(\"left\", `calc(50% - ${rect.width / 2}px)`).style(\"top\", `${icon_top - rect.height / 2}px`);\n element.selectAll(\"div.data-count\").style(\"position\", \"absolute\").style(\"left\", `calc(50% + ${rect.width / 2}px)`).style(\"top\", `${icon_top - rect.height / 2}px`);\n }\n }\n postUpdateSmall(element) {\n element.selectAll(\"lhs\").style(\"display\", \"none\");\n element.selectAll(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n const rect = element.node().getBoundingClientRect();\n const parentRect = element.node().parentElement.getBoundingClientRect();\n element.style(\"transform\", `translate(${parentRect.x - rect.x}px, ${parentRect.y - rect.y}px) scale(${this._scale})`);\n }\n postUpdateRegular(element) {\n element.selectAll(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n }\n exit(domNode, element) {\n this._progressBar.exit(domNode, element);\n this.right(null);\n this._legend.target(null);\n this.center(null);\n this._carousel.target(null);\n this.top(null);\n this._titleBar.target(null);\n this._modal.target(null);\n delete this._prevChart;\n delete this._prevButtons;\n delete this._prevChartDataFamily;\n delete this._prevPos;\n delete this._prevdataVisible;\n delete this._prevlegendVisible;\n super.exit(domNode, element);\n }\n // Event Handlers ---\n // Events ---\n click(row, column, selected) {\n }\n dblclick(row, column, selected) {\n }\n vertex_click(row, col, sel, more) {\n if (more && more.vertex) ;\n }\n vertex_dblclick(row, col, sel, more) {\n if (more && more.vertex) ;\n }\n edge_click(row, col, sel, more) {\n if (more && more.edge) ;\n }\n edge_dblclick(row, col, sel, more) {\n if (more && more.edge) ;\n }\n};\n__name(_ChartPanel, \"ChartPanel\");\nlet ChartPanel = _ChartPanel;\nChartPanel.prototype._class += \" layout_ChartPanel\";\nChartPanel.prototype.publishReset();\nChartPanel.prototype.publishProxy(\"title\", \"_titleBar\");\nChartPanel.prototype.publish(\"titleVisible\", true, \"boolean\");\nChartPanel.prototype.publish(\"titleOverlay\", false, \"boolean\");\nChartPanel.prototype.publishProxy(\"titleIcon\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleIconFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleIconFontSize\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleFontSize\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"description\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"descriptionFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"descriptionFontSize\", \"_titleBar\");\nChartPanel.prototype.publish(\"dataVisible\", false, \"boolean\", \"Show data table\");\nChartPanel.prototype.publish(\"dataButtonVisible\", true, \"boolean\", \"Show data table button\");\nChartPanel.prototype.publish(\"downloadButtonVisible\", true, \"boolean\", \"Show data download button\");\nChartPanel.prototype.publish(\"downloadImageButtonVisible\", false, \"boolean\", \"Show image download button\");\nChartPanel.prototype.publish(\"downloadTitle\", \"\", \"string\", \"File name when downloaded\");\nChartPanel.prototype.publish(\"downloadTimestampSuffix\", true, \"boolean\", \"Use timestamp as file name suffix\");\nChartPanel.prototype.publish(\"legendVisible\", false, \"boolean\", \"Show legend\");\nChartPanel.prototype.publish(\"legendButtonVisible\", true, \"boolean\", \"Show legend button\");\nChartPanel.prototype.publish(\"legendPosition\", \"right\", \"set\", \"Position of legend\", [\"right\", \"bottom\"]);\nChartPanel.prototype.publishProxy(\"legend_labelMaxWidth\", \"_legend\", \"labelMaxWidth\");\nChartPanel.prototype.publishProxy(\"legend_showSeriesTotal\", \"_legend\", \"showSeriesTotal\");\nChartPanel.prototype.publishProxy(\"legend_showLegendTotal\", \"_legend\", \"showLegendTotal\");\nChartPanel.prototype.publishProxy(\"legend_itemPadding\", \"_legend\", \"itemPadding\");\nChartPanel.prototype.publishProxy(\"legend_shapeRadius\", \"_legend\", \"shapeRadius\");\nChartPanel.prototype.publishProxy(\"legend_symbolType\", \"_legend\", \"symbolType\");\nChartPanel.prototype.publishProxy(\"legend_labelAlign\", \"_legend\", \"labelAlign\");\nChartPanel.prototype.publish(\"widget\", null, \"widget\", \"Widget\", void 0, { render: false });\nChartPanel.prototype.publish(\"enableAutoscaling\", false, \"boolean\");\nChartPanel.prototype.publish(\"highlightSize\", 4, \"number\");\nChartPanel.prototype.publish(\"highlightColor\", \"#e67e22\", \"html-color\");\nChartPanel.prototype.publishProxy(\"progress_halfLife\", \"_progressBar\", \"halfLife\");\nChartPanel.prototype.publishProxy(\"progress_decay\", \"_progressBar\", \"decay\");\nChartPanel.prototype.publishProxy(\"progress_size\", \"_progressBar\", \"size\");\nChartPanel.prototype.publishProxy(\"progress_color\", \"_progressBar\", \"color\");\nChartPanel.prototype.publishProxy(\"progress_blurBar\", \"_progressBar\", \"blurBar\");\nChartPanel.prototype.publishProxy(\"progress_blurSize\", \"_progressBar\", \"blurSize\");\nChartPanel.prototype.publishProxy(\"progress_blurColor\", \"_progressBar\", \"blurColor\");\nChartPanel.prototype.publishProxy(\"progress_blurOpacity\", \"_progressBar\", \"blurOpacity\");\nChartPanel.prototype.widget = function(_) {\n if (!arguments.length) return this._widget;\n this._carousel.widgets([_, this._table]);\n this._widget = _;\n this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());\n const context = this;\n const tmpAny = this._widget;\n tmpAny.click = function() {\n context.click.apply(context, arguments);\n };\n tmpAny.dblclick = function() {\n context.dblclick.apply(context, arguments);\n };\n tmpAny.vertex_click = function() {\n context.vertex_click.apply(context, arguments);\n };\n tmpAny.vertex_dblclick = function() {\n context.vertex_dblclick.apply(context, arguments);\n };\n tmpAny.edge_click = function() {\n context.edge_click.apply(context, arguments);\n };\n tmpAny.edge_dblclick = function() {\n context.edge_dblclick.apply(context, arguments);\n };\n return this;\n};\nconst _FlexGrid = class _FlexGrid extends HTMLWidget {\n constructor() {\n super();\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n select(domNode.parentNode).style(\"height\", \"100%\").style(\"width\", \"100%\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n const cachedSizes = [];\n this.updateFlexParent(element);\n const listItems = element.selectAll(\".FlexGrid-list-item\").data(this.widgets(), (w) => w.id());\n listItems.enter().append(\"div\").classed(\"FlexGrid-list-item\", true).each(function(w) {\n w.target(this);\n }).merge(listItems).style(\"min-height\", this.itemMinHeight() + \"px\").style(\"min-width\", this.itemMinWidth() + \"px\").style(\"flex-basis\", (n, i) => {\n const flexBasis = this.widgetsFlexBasis()[i];\n return typeof flexBasis !== \"undefined\" ? flexBasis : this.flexBasis();\n }).style(\"flex-grow\", (n, i) => {\n const flexGrow = this.widgetsFlexGrow()[i];\n return typeof flexGrow !== \"undefined\" ? flexGrow : this.flexGrow();\n }).style(\"border-width\", this.borderWidth() + \"px\").style(\"border-color\", this.itemBorderColor()).each(function() {\n this.firstChild.style.display = \"none\";\n }).each(function() {\n const rect = this.getBoundingClientRect();\n cachedSizes.push([\n rect.width,\n rect.height\n ]);\n }).each(function(w, i) {\n this.firstChild.style.display = \"block\";\n w.resize({\n width: cachedSizes[i][0] - 2 * context.borderWidth(),\n height: cachedSizes[i][1] - 2 * context.borderWidth()\n });\n });\n listItems.exit().remove();\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n updateFlexParent(element) {\n element.style(\"height\", \"100%\").style(\"flex-direction\", this.orientation() === \"horizontal\" ? \"row\" : \"column\").style(\"flex-wrap\", this.flexWrap()).style(\"align-items\", this.alignItems()).style(\"align-content\", this.alignContent()).style(\"overflow-x\", () => {\n if (this.forceXScroll() || this.orientation() === \"horizontal\" && this.flexWrap() === \"nowrap\" && !this.disableScroll()) {\n return \"scroll\";\n }\n return \"hidden\";\n }).style(\"overflow-y\", () => {\n if (this.forceYScroll() || this.orientation() === \"vertical\" && this.flexWrap() === \"nowrap\" && !this.disableScroll()) {\n return \"scroll\";\n }\n return \"hidden\";\n });\n }\n};\n__name(_FlexGrid, \"FlexGrid\");\nlet FlexGrid = _FlexGrid;\nFlexGrid.prototype._class += \" layout_FlexGrid\";\nFlexGrid.prototype.publish(\"itemBorderColor\", \"transparent\", \"html-color\", \"Color of list item borders\");\nFlexGrid.prototype.publish(\"borderWidth\", 0, \"number\", \"Width of list item borders (pixels)\");\nFlexGrid.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"Controls the flex-direction of the list items\", [\"horizontal\", \"vertical\"]);\nFlexGrid.prototype.publish(\"flexWrap\", \"wrap\", \"set\", \"Controls the line wrap when overflow occurs\", [\"nowrap\", \"wrap\", \"wrap-reverse\"]);\nFlexGrid.prototype.publish(\"disableScroll\", false, \"boolean\", \"If false, scrollbar will show (when flexWrap is set to 'nowrap')\", null, { disable: /* @__PURE__ */ __name((w) => w.flexWrap() !== \"nowrap\", \"disable\") });\nFlexGrid.prototype.publish(\"forceXScroll\", false, \"boolean\", \"If true, horzontal scrollbar will show\");\nFlexGrid.prototype.publish(\"forceYScroll\", false, \"boolean\", \"If true, vertical scrollbar will show\");\nFlexGrid.prototype.publish(\"itemMinHeight\", 64, \"number\", \"Minimum height of a list item (pixels)\");\nFlexGrid.prototype.publish(\"itemMinWidth\", 64, \"number\", \"Minimum width of a list item (pixels)\");\nFlexGrid.prototype.publish(\"alignItems\", \"stretch\", \"set\", \"Controls normal alignment of items\", [\"flex-start\", \"center\", \"flex-end\", \"stretch\"]);\nFlexGrid.prototype.publish(\"alignContent\", \"stretch\", \"set\", \"Controls normal alignment of item rows\", [\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"space-between\", \"space-around\"]);\nFlexGrid.prototype.publish(\"flexGrow\", 1, \"number\", \"Default flex-grow style for all list items\");\nFlexGrid.prototype.publish(\"flexBasis\", \"10%\", \"string\", \"Default flex-basis style for all list items\");\nFlexGrid.prototype.publish(\"widgetsFlexGrow\", [], \"array\", \"Array of flex-grow values keyed on the widgets array\");\nFlexGrid.prototype.publish(\"widgetsFlexBasis\", [], \"array\", \"Array of flex-basis values keyed on the widgets array\");\nFlexGrid.prototype.publish(\"widgets\", [], \"widgetArray\", \"Array of widgets to be rendered as list items\");\nvar commonjsGlobal = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\n__name(getDefaultExportFromCjs, \"getDefaultExportFromCjs\");\nvar gridList$1 = { exports: {} };\n(function(module, exports) {\n (function(root, factory) {\n {\n module.exports = factory();\n }\n })(commonjsGlobal, function() {\n var GridList2 = /* @__PURE__ */ __name(function(items, options) {\n this._options = options;\n for (var k2 in this.defaults) {\n if (!this._options.hasOwnProperty(k2)) {\n this._options[k2] = this.defaults[k2];\n }\n }\n this.items = items;\n this._adjustSizeOfItems();\n this.generateGrid();\n }, \"GridList\");\n GridList2.cloneItems = function(items, _items) {\n var i, k2;\n if (_items === void 0) {\n _items = [];\n }\n for (i = 0; i < items.length; i++) {\n if (!_items[i]) {\n _items[i] = {};\n }\n for (k2 in items[i]) {\n _items[i][k2] = items[i][k2];\n }\n }\n return _items;\n };\n GridList2.prototype = {\n defaults: {\n lanes: 5,\n direction: \"horizontal\"\n },\n /**\n * Illustates grid as text-based table, using a number identifier for each\n * item. E.g.\n *\n * #| 0 1 2 3 4 5 6 7 8 9 10 11 12 13\n * --------------------------------------------\n * 0| 00 02 03 04 04 06 08 08 08 12 12 13 14 16\n * 1| 01 -- 03 05 05 07 09 10 11 11 -- 13 15 --\n *\n * Warn: Does not work if items don't have a width or height specified\n * besides their position in the grid.\n */\n toString: /* @__PURE__ */ __name(function() {\n var widthOfGrid = this.grid.length, output = \"\\n #|\", border = \"\\n --\", item, i, j;\n for (i = 0; i < widthOfGrid; i++) {\n output += \" \" + this._padNumber(i, \" \");\n border += \"---\";\n }\n output += border;\n for (i = 0; i < this._options.lanes; i++) {\n output += \"\\n\" + this._padNumber(i, \" \") + \"|\";\n for (j = 0; j < widthOfGrid; j++) {\n output += \" \";\n item = this.grid[j][i];\n output += item ? this._padNumber(this.items.indexOf(item), \"0\") : \"--\";\n }\n }\n output += \"\\n\";\n return output;\n }, \"toString\"),\n generateGrid: /* @__PURE__ */ __name(function() {\n var i;\n this._resetGrid();\n for (i = 0; i < this.items.length; i++) {\n this._markItemPositionToGrid(this.items[i]);\n }\n }, \"generateGrid\"),\n resizeGrid: /* @__PURE__ */ __name(function(lanes) {\n var currentColumn = 0;\n this._options.lanes = lanes;\n this._adjustSizeOfItems();\n this._sortItemsByPosition();\n this._resetGrid();\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i], position = this._getItemPosition(item);\n this._updateItemPosition(\n item,\n this.findPositionForItem(item, { x: currentColumn, y: 0 })\n );\n currentColumn = Math.max(currentColumn, position.x);\n }\n this._pullItemsToLeft();\n }, \"resizeGrid\"),\n findPositionForItem: /* @__PURE__ */ __name(function(item, start, fixedRow) {\n var x, y, position;\n for (x = start.x; x < this.grid.length; x++) {\n if (fixedRow !== void 0) {\n position = [x, fixedRow];\n if (this._itemFitsAtPosition(item, position)) {\n return position;\n }\n } else {\n for (y = start.y; y < this._options.lanes; y++) {\n position = [x, y];\n if (this._itemFitsAtPosition(item, position)) {\n return position;\n }\n }\n }\n }\n var newCol = this.grid.length, newRow = 0;\n if (fixedRow !== void 0 && this._itemFitsAtPosition(item, [newCol, fixedRow])) {\n newRow = fixedRow;\n }\n return [newCol, newRow];\n }, \"findPositionForItem\"),\n moveItemToPosition: /* @__PURE__ */ __name(function(item, newPosition) {\n var position = this._getItemPosition({\n x: newPosition[0],\n y: newPosition[1],\n w: item.w,\n h: item.h\n });\n this._updateItemPosition(item, [position.x, position.y]);\n this._resolveCollisions(item);\n }, \"moveItemToPosition\"),\n resizeItem: /* @__PURE__ */ __name(function(item, size) {\n var width = size.w || item.w, height = size.h || item.h;\n this._updateItemSize(item, width, height);\n this._resolveCollisions(item);\n this._pullItemsToLeft();\n }, \"resizeItem\"),\n getChangedItems: /* @__PURE__ */ __name(function(initialItems, idAttribute) {\n var changedItems = [];\n for (var i = 0; i < initialItems.length; i++) {\n var item = this._getItemByAttribute(\n idAttribute,\n initialItems[i][idAttribute]\n );\n if (item.x !== initialItems[i].x || item.y !== initialItems[i].y || item.w !== initialItems[i].w || item.h !== initialItems[i].h) {\n changedItems.push(item);\n }\n }\n return changedItems;\n }, \"getChangedItems\"),\n _sortItemsByPosition: /* @__PURE__ */ __name(function() {\n this.items.sort((function(item1, item2) {\n var position1 = this._getItemPosition(item1), position2 = this._getItemPosition(item2);\n if (position1.x != position2.x) {\n return position1.x - position2.x;\n }\n if (position1.y != position2.y) {\n return position1.y - position2.y;\n }\n return 0;\n }).bind(this));\n }, \"_sortItemsByPosition\"),\n _adjustSizeOfItems: /* @__PURE__ */ __name(function() {\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i];\n if (item.autoSize === void 0) {\n item.autoSize = item.w === 0 || item.h === 0;\n }\n if (item.autoSize) {\n if (this._options.direction === \"horizontal\") {\n item.h = this._options.lanes;\n } else {\n item.w = this._options.lanes;\n }\n }\n }\n }, \"_adjustSizeOfItems\"),\n _resetGrid: /* @__PURE__ */ __name(function() {\n this.grid = [];\n }, \"_resetGrid\"),\n _itemFitsAtPosition: /* @__PURE__ */ __name(function(item, newPosition) {\n var position = this._getItemPosition(item), x, y;\n if (newPosition[0] < 0 || newPosition[1] < 0) {\n return false;\n }\n if (newPosition[1] + position.h > this._options.lanes) {\n return false;\n }\n for (x = newPosition[0]; x < newPosition[0] + position.w; x++) {\n var col = this.grid[x];\n if (!col) {\n continue;\n }\n for (y = newPosition[1]; y < newPosition[1] + position.h; y++) {\n if (col[y] && col[y] !== item) {\n return false;\n }\n }\n }\n return true;\n }, \"_itemFitsAtPosition\"),\n _updateItemPosition: /* @__PURE__ */ __name(function(item, position) {\n if (item.x !== null && item.y !== null) {\n this._deleteItemPositionFromGrid(item);\n }\n this._setItemPosition(item, position);\n this._markItemPositionToGrid(item);\n }, \"_updateItemPosition\"),\n _updateItemSize: /* @__PURE__ */ __name(function(item, width, height) {\n if (item.x !== null && item.y !== null) {\n this._deleteItemPositionFromGrid(item);\n }\n item.w = width;\n item.h = height;\n this._markItemPositionToGrid(item);\n }, \"_updateItemSize\"),\n _markItemPositionToGrid: /* @__PURE__ */ __name(function(item) {\n var position = this._getItemPosition(item), x, y;\n this._ensureColumns(position.x + position.w);\n for (x = position.x; x < position.x + position.w; x++) {\n for (y = position.y; y < position.y + position.h; y++) {\n this.grid[x][y] = item;\n }\n }\n }, \"_markItemPositionToGrid\"),\n _deleteItemPositionFromGrid: /* @__PURE__ */ __name(function(item) {\n var position = this._getItemPosition(item), x, y;\n for (x = position.x; x < position.x + position.w; x++) {\n if (!this.grid[x]) {\n continue;\n }\n for (y = position.y; y < position.y + position.h; y++) {\n if (this.grid[x][y] == item) {\n this.grid[x][y] = null;\n }\n }\n }\n }, \"_deleteItemPositionFromGrid\"),\n _ensureColumns: /* @__PURE__ */ __name(function(N) {\n var i;\n for (i = 0; i < N; i++) {\n if (!this.grid[i]) {\n this.grid.push(new GridCol(this._options.lanes));\n }\n }\n }, \"_ensureColumns\"),\n _getItemsCollidingWithItem: /* @__PURE__ */ __name(function(item) {\n var collidingItems = [];\n for (var i = 0; i < this.items.length; i++) {\n if (item != this.items[i] && this._itemsAreColliding(item, this.items[i])) {\n collidingItems.push(i);\n }\n }\n return collidingItems;\n }, \"_getItemsCollidingWithItem\"),\n _itemsAreColliding: /* @__PURE__ */ __name(function(item1, item2) {\n var position1 = this._getItemPosition(item1), position2 = this._getItemPosition(item2);\n return !(position2.x >= position1.x + position1.w || position2.x + position2.w <= position1.x || position2.y >= position1.y + position1.h || position2.y + position2.h <= position1.y);\n }, \"_itemsAreColliding\"),\n _resolveCollisions: /* @__PURE__ */ __name(function(item) {\n if (!this._tryToResolveCollisionsLocally(item)) {\n this._pullItemsToLeft(item);\n }\n this._pullItemsToLeft();\n }, \"_resolveCollisions\"),\n _tryToResolveCollisionsLocally: /* @__PURE__ */ __name(function(item) {\n var collidingItems = this._getItemsCollidingWithItem(item);\n if (!collidingItems.length) {\n return true;\n }\n var _gridList = new GridList2([], this._options), leftOfItem, rightOfItem, aboveOfItem, belowOfItem;\n GridList2.cloneItems(this.items, _gridList.items);\n _gridList.generateGrid();\n for (var i = 0; i < collidingItems.length; i++) {\n var collidingItem = _gridList.items[collidingItems[i]], collidingPosition = this._getItemPosition(collidingItem);\n var position = this._getItemPosition(item);\n leftOfItem = [position.x - collidingPosition.w, collidingPosition.y];\n rightOfItem = [position.x + position.w, collidingPosition.y];\n aboveOfItem = [collidingPosition.x, position.y - collidingPosition.h];\n belowOfItem = [collidingPosition.x, position.y + position.h];\n if (_gridList._itemFitsAtPosition(collidingItem, leftOfItem)) {\n _gridList._updateItemPosition(collidingItem, leftOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, aboveOfItem)) {\n _gridList._updateItemPosition(collidingItem, aboveOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, belowOfItem)) {\n _gridList._updateItemPosition(collidingItem, belowOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, rightOfItem)) {\n _gridList._updateItemPosition(collidingItem, rightOfItem);\n } else {\n return false;\n }\n }\n GridList2.cloneItems(_gridList.items, this.items);\n this.generateGrid();\n return true;\n }, \"_tryToResolveCollisionsLocally\"),\n _pullItemsToLeft: /* @__PURE__ */ __name(function(fixedItem) {\n this._sortItemsByPosition();\n this._resetGrid();\n if (fixedItem) {\n var fixedPosition = this._getItemPosition(fixedItem);\n this._updateItemPosition(fixedItem, [fixedPosition.x, fixedPosition.y]);\n }\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i], position = this._getItemPosition(item);\n if (fixedItem && item == fixedItem) {\n continue;\n }\n var x = this._findLeftMostPositionForItem(item), newPosition = this.findPositionForItem(\n item,\n { x, y: 0 },\n position.y\n );\n this._updateItemPosition(item, newPosition);\n }\n }, \"_pullItemsToLeft\"),\n _findLeftMostPositionForItem: /* @__PURE__ */ __name(function(item) {\n var tail = 0, position = this._getItemPosition(item);\n for (var i = 0; i < this.grid.length; i++) {\n for (var j = position.y; j < position.y + position.h; j++) {\n var otherItem = this.grid[i][j];\n if (!otherItem) {\n continue;\n }\n var otherPosition = this._getItemPosition(otherItem);\n if (this.items.indexOf(otherItem) < this.items.indexOf(item)) {\n tail = otherPosition.x + otherPosition.w;\n }\n }\n }\n return tail;\n }, \"_findLeftMostPositionForItem\"),\n _getItemByAttribute: /* @__PURE__ */ __name(function(key, value) {\n for (var i = 0; i < this.items.length; i++) {\n if (this.items[i][key] === value) {\n return this.items[i];\n }\n }\n return null;\n }, \"_getItemByAttribute\"),\n _padNumber: /* @__PURE__ */ __name(function(nr, prefix) {\n return nr >= 10 ? nr : prefix + nr;\n }, \"_padNumber\"),\n _getItemPosition: /* @__PURE__ */ __name(function(item) {\n if (this._options.direction === \"horizontal\") {\n return item;\n } else {\n return {\n x: item.y,\n y: item.x,\n w: item.h,\n h: item.w\n };\n }\n }, \"_getItemPosition\"),\n _setItemPosition: /* @__PURE__ */ __name(function(item, position) {\n if (this._options.direction === \"horizontal\") {\n item.x = position[0];\n item.y = position[1];\n } else {\n item.x = position[1];\n item.y = position[0];\n }\n }, \"_setItemPosition\")\n };\n var GridCol = /* @__PURE__ */ __name(function(lanes) {\n for (var i = 0; i < lanes; i++) {\n this.push(null);\n }\n }, \"GridCol\");\n GridCol.prototype = [];\n return GridList2;\n });\n})(gridList$1);\nvar gridListExports = gridList$1.exports;\nconst gridList = /* @__PURE__ */ getDefaultExportFromCjs(gridListExports);\nconst _GridList = /* @__PURE__ */ _mergeNamespaces({\n __proto__: null,\n default: gridList\n}, [gridListExports]);\nconst GridList = _GridList && gridList || _GridList;\nconst _Grid = class _Grid extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"divItems\");\n __publicField(this, \"gridList\");\n __publicField(this, \"items\");\n __publicField(this, \"itemsMap\");\n __publicField(this, \"origItems\");\n __publicField(this, \"cellWidth\");\n __publicField(this, \"cellHeight\");\n __publicField(this, \"dragItem\");\n __publicField(this, \"dragItemPos\");\n __publicField(this, \"_d3Drag\");\n __publicField(this, \"_d3DragResize\");\n __publicField(this, \"_selectionBag\");\n __publicField(this, \"_scrollBarWidth\");\n this._tag = \"div\";\n this._selectionBag = new Utility.Selection(this);\n this.content([]);\n }\n getDimensions() {\n const size = { width: 0, height: 0 };\n this.content().forEach(function(cell) {\n if (size.width < cell.gridCol() + cell.gridColSpan()) {\n size.width = cell.gridCol() + cell.gridColSpan();\n }\n if (size.height < cell.gridRow() + cell.gridRowSpan()) {\n size.height = cell.gridRow() + cell.gridRowSpan();\n }\n }, this);\n return size;\n }\n clearContent(widget) {\n this.content(this.content().filter(function(contentWidget) {\n if (!widget) {\n contentWidget.target(null);\n return false;\n }\n let w = contentWidget;\n while (w) {\n if (widget === w) {\n contentWidget.target(null);\n return false;\n }\n w = w.widget ? w.widget() : null;\n }\n return true;\n }));\n }\n setContent(row, col, widget, title, rowSpan, colSpan) {\n rowSpan = rowSpan || 1;\n colSpan = colSpan || 1;\n title = title || \"\";\n this.content(this.content().filter(function(contentWidget) {\n if (contentWidget.gridRow() === row && contentWidget.gridCol() === col) {\n contentWidget.target(null);\n return false;\n }\n return true;\n }));\n if (widget) {\n const cell = new Cell().gridRow(row).gridCol(col).widget(widget).title(title).gridRowSpan(rowSpan).gridColSpan(colSpan);\n this.content().push(cell);\n }\n return this;\n }\n sortedContent() {\n return this.content().sort(function(l, r) {\n if (l.gridRow() === r.gridRow()) {\n return l.gridCol() - r.gridCol();\n }\n return l.gridRow() - r.gridRow();\n });\n }\n getCell(row, col) {\n let retVal = null;\n this.content().some(function(cell) {\n if (row >= cell.gridRow() && row < cell.gridRow() + cell.gridRowSpan() && col >= cell.gridCol() && col < cell.gridCol() + cell.gridColSpan()) {\n retVal = cell;\n return true;\n }\n return false;\n });\n return retVal;\n }\n getWidgetCell(id) {\n let retVal = null;\n this.content().some(function(cell) {\n if (cell.widget().id() === id) {\n retVal = cell;\n return true;\n }\n return false;\n });\n return retVal;\n }\n getContent(id) {\n let retVal = null;\n this.content().some(function(cell) {\n if (cell.widget().id() === id) {\n retVal = cell.widget();\n return true;\n }\n return false;\n });\n return retVal;\n }\n cellToGridItem(cell) {\n return {\n x: cell.gridCol(),\n y: cell.gridRow(),\n w: cell.gridColSpan(),\n h: cell.gridRowSpan(),\n id: cell.id(),\n cell\n };\n }\n gridItemToCell(item) {\n item.cell.gridCol(item.x).gridRow(item.y).gridColSpan(item.w).gridRowSpan(item.h);\n }\n resetItemsPos() {\n this.origItems.forEach(function(origItem) {\n const item = this.itemsMap[origItem.id];\n item.x = origItem.x;\n item.y = origItem.y;\n }, this);\n }\n initGridList() {\n this.itemsMap = {};\n this.items = this.content().map(function(cell) {\n const retVal = this.cellToGridItem(cell);\n this.itemsMap[retVal.id] = retVal;\n return retVal;\n }, this);\n this.origItems = this.content().map(this.cellToGridItem);\n this.gridList = new GridList(this.items, {\n direction: this.snapping(),\n lanes: this.snapping() === \"horizontal\" ? this.snappingRows() : this.snappingColumns()\n });\n }\n killGridList() {\n this.gridList = null;\n delete this.items;\n delete this.itemsMap;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._scrollBarWidth = Platform.getScrollbarWidth();\n const context = this;\n this._d3Drag = drag().subject(function(_d) {\n const d = context.cellToGridItem(_d);\n return { x: d.x * context.cellWidth, y: d.y * context.cellHeight };\n }).on(\"start\", function(_d) {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.initGridList();\n const d = context.itemsMap[_d.id()];\n context.dragItem = element.append(\"div\").attr(\"class\", \"dragging\").style(\"transform\", function() {\n return \"translate(\" + d.x * context.cellWidth + \"px, \" + d.y * context.cellHeight + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight - context.gutter() + \"px\";\n });\n context.selectionBagClick(_d);\n }).on(\"drag\", function(_d) {\n if (!context.designMode()) return;\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const d = context.itemsMap[_d.id()];\n if (event.x < 0) {\n event.x = 0;\n }\n if (event.x + d.w * context.cellWidth > context.snappingColumns() * context.cellWidth) {\n event.x = context.snappingColumns() * context.cellWidth - d.w * context.cellWidth;\n }\n if (event.y < 0) {\n event.y = 0;\n }\n if (event.y + d.h * context.cellWidth > context.snappingRows() * context.cellWidth) {\n event.y = context.snappingRows() * context.cellWidth - d.h * context.cellWidth;\n }\n const pos = [Math.max(0, Math.floor((event.x + context.cellWidth / 2) / context.cellWidth)), Math.max(0, Math.floor((event.y + context.cellHeight / 2) / context.cellHeight))];\n if (d.x !== pos[0] || d.y !== pos[1]) {\n if (context.snapping() !== \"none\") {\n context.resetItemsPos();\n context.gridList.moveItemToPosition(d, pos);\n } else {\n d.x = pos[0];\n d.y = pos[1];\n }\n if (_d.gridCol() !== d.x || _d.gridRow() !== d.y) {\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(false, 100);\n }\n }\n context.dragItem.style(\"transform\", function() {\n return \"translate(\" + event.x + \"px, \" + event.y + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight + \"px\";\n });\n }).on(\"end\", function() {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.dragItem.remove();\n context.dragItem = null;\n context.killGridList();\n });\n this._d3DragResize = drag().subject(function(_d) {\n const d = context.cellToGridItem(_d);\n return { x: (d.x + d.w - 1) * context.cellWidth, y: (d.y + d.h - 1) * context.cellHeight };\n }).on(\"start\", function(_d) {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.initGridList();\n const d = context.itemsMap[_d.id()];\n context.dragItem = element.append(\"div\").attr(\"class\", \"resizing\").style(\"transform\", function() {\n return \"translate(\" + d.x * context.cellWidth + \"px, \" + d.y * context.cellHeight + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight - context.gutter() + \"px\";\n });\n context.dragItemPos = { x: d.x, y: d.y };\n }).on(\"drag\", function(_d) {\n if (!context.designMode()) return;\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const d = context.itemsMap[_d.id()];\n const pos = [Math.max(0, Math.round(event.x / context.cellWidth)), Math.max(0, Math.round(event.y / context.cellHeight))];\n const size = {\n w: Math.max(1, pos[0] - d.x + 1),\n h: Math.max(1, pos[1] - d.y + 1)\n };\n if (d.w !== size.w || d.h !== size.h) {\n if (context.snapping() !== \"none\") {\n context.resetItemsPos();\n context.gridList.resizeItem(d, size);\n } else {\n d.w = size.w;\n d.h = size.h;\n }\n if (_d.gridColSpan() !== d.w || _d.gridRowSpan() !== d.h) {\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(d.id, 100);\n }\n }\n context.dragItem.style(\"width\", function() {\n return (-d.x + 1) * context.cellWidth + event.x - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return (-d.y + 1) * context.cellHeight + event.y - context.gutter() + \"px\";\n });\n }).on(\"end\", function() {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.dragItem.remove();\n context.dragItem = null;\n context.killGridList();\n });\n }\n updateGrid(resize, transitionDuration = 0, _noRender = false) {\n transitionDuration = transitionDuration || 0;\n const context = this;\n this.divItems.classed(\"draggable\", this.designMode()).transition().duration(transitionDuration).style(\"left\", function(d) {\n return d.gridCol() * context.cellWidth + context.gutter() / 2 + \"px\";\n }).style(\"top\", function(d) {\n return d.gridRow() * context.cellHeight + context.gutter() / 2 + \"px\";\n }).style(\"width\", function(d) {\n return d.gridColSpan() * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function(d) {\n return d.gridRowSpan() * context.cellHeight - context.gutter() + \"px\";\n }).on(\"end\", function(d) {\n d.surfaceShadow_default(context.surfaceShadow()).surfacePadding_default(context.surfacePadding()).surfaceBorderWidth_default(context.surfaceBorderWidth()).surfaceBackgroundColor_default(context.surfaceBackgroundColor());\n if (resize === true || resize === d.id()) {\n d.resize().lazyRender();\n }\n });\n }\n update(domNode, element2) {\n super.update(domNode, element2);\n this._placeholderElement.style(\"overflow-x\", this.fitTo() === \"width\" ? \"hidden\" : null);\n this._placeholderElement.style(\"overflow-y\", this.fitTo() === \"width\" ? \"scroll\" : null);\n const dimensions = this.getDimensions();\n const clientWidth = this.width() - (this.fitTo() === \"width\" ? this._scrollBarWidth : 0);\n this.cellWidth = clientWidth / dimensions.width;\n this.cellHeight = this.fitTo() === \"all\" ? this.height() / dimensions.height : this.cellWidth;\n if (this.designMode()) {\n const cellLaneRatio = Math.min(this.width() / this.snappingColumns(), this.height() / this.snappingRows());\n const laneWidth = Math.floor(cellLaneRatio);\n this.cellWidth = laneWidth;\n this.cellHeight = this.cellWidth;\n }\n const context = this;\n const divItems = element2.selectAll(\"#\" + this.id() + \" > .ddCell\").data(this.content(), function(d) {\n return d.id();\n });\n this.divItems = divItems.enter().append(\"div\").attr(\"class\", \"ddCell\").each(function(d) {\n d.target(this);\n d.__grid_watch = d.monitor(function(key, newVal, oldVal) {\n if (context._renderCount && (key === \"snapping\" || key.indexOf(\"grid\") === 0) && newVal !== oldVal) {\n if (!context.gridList) {\n context.initGridList();\n if (context.snapping() !== \"none\") {\n context.gridList.resizeGrid(context.snapping() === \"horizontal\" ? context.snappingRows() : context.snappingColumns());\n }\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(d.id(), 100);\n context.killGridList();\n }\n }\n });\n const element = select(this);\n element.append(\"div\").attr(\"class\", \"resizeHandle\").call(context._d3DragResize).append(\"div\").attr(\"class\", \"resizeHandleDisplay\");\n }).merge(divItems);\n this.divItems.each(function(d) {\n const element = select(this);\n if (context.designMode()) {\n element.call(context._d3Drag);\n } else {\n element.on(\"mousedown.drag\", null).on(\"touchstart.drag\", null);\n }\n });\n this.divItems.select(\".resizeHandle\").style(\"display\", this.designMode() ? null : \"none\");\n this.updateGrid(true);\n divItems.exit().each(function(d) {\n d.target(null);\n if (d.__grid_watch) {\n d.__grid_watch.remove();\n }\n }).remove();\n const lanesBackground = element2.selectAll(\"#\" + this.id() + \" > .laneBackground\").data(this.designMode() ? [\"\"] : []);\n lanesBackground.enter().insert(\"div\", \":first-child\").attr(\"class\", \"laneBackground\").style(\"left\", \"1px\").style(\"top\", \"1px\").on(\"click\", function() {\n context.selectionBagClear();\n }).merge(lanesBackground).style(\"width\", this.snappingColumns() * this.cellWidth + \"px\").style(\"height\", this.snappingRows() * this.cellHeight + \"px\");\n lanesBackground.exit().each(function() {\n context.selectionBagClear();\n }).remove();\n const lanes = element2.selectAll(\"#\" + this.id() + \" > .lane\").data(this.designMode() ? [\"\"] : []);\n lanes.enter().append(\"div\").attr(\"class\", \"lane\").style(\"left\", \"1px\").style(\"top\", \"1px\");\n lanes.style(\"display\", this.showLanes() ? null : \"none\").style(\"width\", this.snappingColumns() * this.cellWidth + \"px\").style(\"height\", this.snappingRows() * this.cellHeight + \"px\").style(\"background-image\", \"linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)\").style(\"background-size\", this.cellWidth + \"px \" + this.cellHeight + \"px\");\n lanes.exit().remove();\n }\n exit(domNode, element) {\n this.content().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n _createSelectionObject(d) {\n return {\n _id: d._id,\n element: /* @__PURE__ */ __name(() => {\n return d._element;\n }, \"element\"),\n widget: d\n };\n }\n selection(_) {\n if (!arguments.length) return this._selectionBag.get().map(function(d) {\n return d._id;\n });\n this._selectionBag.set(_.map(function(row) {\n return this._createSelectionObject(row);\n }, this));\n return this;\n }\n selectionBagClear() {\n if (!this._selectionBag.isEmpty()) {\n this._selectionBag.clear();\n this.postSelectionChange();\n }\n }\n selectionBagClick(d) {\n if (d !== null) {\n const selectionObj = this._createSelectionObject(d);\n if (d3Event().sourceEvent.ctrlKey) {\n if (this._selectionBag.isSelected(selectionObj)) {\n this._selectionBag.remove(selectionObj);\n this.postSelectionChange();\n } else {\n this._selectionBag.append(selectionObj);\n this.postSelectionChange();\n }\n } else {\n const selected = this._selectionBag.get();\n if (selected.length === 1 && selected[0]._id === selectionObj._id) {\n this.selectionBagClear();\n } else {\n this._selectionBag.set([selectionObj]);\n }\n this.postSelectionChange();\n }\n }\n }\n postSelectionChange() {\n }\n applyLayout(layoutArr) {\n this.divItems.each((d, i) => {\n if (layoutArr[i]) {\n const [x, y, w, h] = layoutArr[i];\n d.gridCol(x).gridRow(y).gridColSpan(w).gridRowSpan(h);\n }\n });\n this.updateGrid(true);\n }\n vizActivation(elem) {\n }\n};\n__name(_Grid, \"Grid\");\nlet Grid = _Grid;\nGrid.prototype._class += \" layout_Grid\";\nGrid.prototype.publish(\"designMode\", false, \"boolean\", \"Design Mode\", null, { tags: [\"Basic\"] });\nGrid.prototype.publish(\"showLanes\", true, \"boolean\", \"Show snapping lanes when in design mode\", null, { tags: [\"Basic\"], disable: /* @__PURE__ */ __name((w) => !w.designMode(), \"disable\") });\nGrid.prototype.publish(\"fitTo\", \"all\", \"set\", \"Sizing Strategy\", [\"all\", \"width\"], { tags: [\"Basic\"] });\nGrid.prototype.publish(\"snapping\", \"vertical\", \"set\", \"Snapping Strategy\", [\"vertical\", \"horizontal\", \"none\"]);\nGrid.prototype.publish(\"snappingColumns\", 12, \"number\", \"Snapping Columns\");\nGrid.prototype.publish(\"snappingRows\", 16, \"number\", \"Snapping Rows\");\nGrid.prototype.publish(\"gutter\", 6, \"number\", \"Gap Between Widgets\", null, { tags: [\"Basic\"] });\nGrid.prototype.publish(\"surfaceShadow\", true, \"boolean\", \"3D Shadow\");\nGrid.prototype.publish(\"surfacePadding\", null, \"string\", \"Cell Padding (px)\", null, { tags: [\"Intermediate\"] });\nGrid.prototype.publish(\"surfaceBorderWidth\", 1, \"number\", \"Width (px) of Cell Border\", null, { tags: [\"Intermediate\"] });\nGrid.prototype.publish(\"surfaceBackgroundColor\", null, \"html-color\", \"Surface Background Color\", null, { tags: [\"Advanced\"] });\nGrid.prototype.publish(\"content\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Basic\"], render: false });\nconst _HorizontalList = class _HorizontalList extends FlexGrid {\n constructor() {\n super();\n this.orientation_default(\"horizontal\");\n this.flexWrap_default(\"nowrap\");\n }\n};\n__name(_HorizontalList, \"HorizontalList\");\nlet HorizontalList = _HorizontalList;\nHorizontalList.prototype._class += \" layout_HorizontalList\";\nconst _Layered = class _Layered extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_contentContainer\");\n __publicField(this, \"_widgetPlacements\");\n __publicField(this, \"_widgetRatios\");\n this._tag = \"div\";\n this._widgetPlacements = [];\n this._widgetRatios = [];\n }\n addLayer(widget, placement = \"default\", widthRatio = 1, heightRatio = 1) {\n const widgets = this.widgets();\n widgets.push(widget ? widget : new Text().text(\"No widget defined for layer.\"));\n this.widgets(widgets);\n this._widgetPlacements.push(placement);\n this._widgetRatios.push([widthRatio, heightRatio]);\n return this;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._contentContainer = element.append(\"div\").attr(\"class\", \"container\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.style(\"padding\", this.surfacePadding() + \"px\");\n const content = this._contentContainer.selectAll(\".content.id\" + this.id()).data(this.widgets(), function(d) {\n return d.id();\n });\n content.enter().append(\"div\").attr(\"class\", \"content id\" + this.id()).each(function(widget, idx) {\n widget.target(this);\n }).merge(content).each(function(widget, idx) {\n const clientSize = {\n width: context.clientWidth(),\n height: context.clientHeight()\n };\n const widgetSize = context.widgetSize(idx, clientSize);\n const widgetPosition = context.widgetPosition(idx, clientSize, widgetSize);\n this.style.top = widgetPosition.y + \"px\";\n this.style.left = widgetPosition.x + \"px\";\n widget.resize(widgetSize).render();\n });\n content.exit().each(function(widget, idx) {\n widget.target(null);\n }).remove();\n content.order();\n }\n widgetSize(idx, clientSize) {\n if (this._widgetPlacements[idx] === \"default\") {\n return {\n width: clientSize.width * this._widgetRatios[idx][0],\n height: clientSize.height * this._widgetRatios[idx][1]\n };\n } else {\n return {\n width: clientSize.width * this._widgetRatios[idx][0],\n height: clientSize.height * this._widgetRatios[idx][1]\n };\n }\n }\n widgetPosition(idx, clientSize, widgetSize) {\n switch (this._widgetPlacements[idx]) {\n default:\n return {\n x: 0,\n y: 0\n };\n case \"top\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: 0\n };\n case \"bottom\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: clientSize.height - widgetSize.height\n };\n case \"left\":\n return {\n x: 0,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n case \"right\":\n return {\n x: clientSize.width - widgetSize.width,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n case \"center\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n }\n }\n};\n__name(_Layered, \"Layered\");\nlet Layered = _Layered;\nLayered.prototype._class += \" layout_Layered\";\nLayered.prototype.publish(\"surfacePadding\", 0, \"number\", \"Padding\");\nLayered.prototype.publish(\"widgets\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Private\"] });\nconst _Popup = class _Popup extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_surfaceButtons\");\n __publicField(this, \"_originalPosition\");\n this._tag = \"div\";\n this._surfaceButtons = [];\n }\n updateState(visible) {\n visible = visible || !this.popupState();\n this.popupState(visible).render();\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this.widget().target(domNode);\n this._originalPosition = this.position();\n }\n update(domNode, element) {\n super.update(domNode, element);\n element.style(\"visibility\", this.popupState() ? null : \"hidden\").style(\"opacity\", this.popupState() ? null : 0).style(\"width\", this.shrinkWrap() ? this.widget().width() + \"px\" : this._size.width + \"px\").style(\"height\", this.shrinkWrap() ? this.widget().height() + \"px\" : this._size.height + \"px\");\n if (this.widget().size().height === 0) {\n this.widget().resize(this.size());\n }\n }\n postUpdate(domNode, element) {\n let left;\n let top;\n switch (this.centerPopup()) {\n case \"container\":\n if (this._placeholderElement) {\n left = parseInt(this._placeholderElement.style(\"width\")) / 2 - this.widget().width() / 2;\n top = parseInt(this._placeholderElement.style(\"height\")) / 2 - this.widget().height() / 2;\n }\n this.position(\"absolute\");\n break;\n case \"window\":\n left = window.innerWidth / 2 - this.widget().width() / 2;\n top = window.innerHeight / 2 - this.widget().height() / 2;\n this.position(\"fixed\");\n break;\n default:\n left = 0;\n top = 0;\n this.position(this._originalPosition);\n break;\n }\n this.pos({ x: left, y: top });\n super.postUpdate(domNode, element);\n element.style(\"position\", this.position()).style(\"left\", this.left() + \"px\").style(\"right\", this.right() + \"px\").style(\"top\", this.top() + \"px\").style(\"bottom\", this.bottom() + \"px\");\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n click(obj) {\n }\n};\n__name(_Popup, \"Popup\");\nlet Popup = _Popup;\nPopup.prototype._class += \" layout_Popup\";\nPopup.prototype.publish(\"popupState\", false, \"boolean\", \"State of the popup, visible (true) or hidden (false)\", null, {});\nPopup.prototype.publish(\"shrinkWrap\", false, \"boolean\", \"The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)\", null, {});\nPopup.prototype.publish(\"centerPopup\", \"none\", \"set\", \"Center the widget in its container element (target) or in the window\", [\"none\", \"container\", \"window\"], {});\nPopup.prototype.publish(\"top\", null, \"number\", \"Top position property of popup\", null, {});\nPopup.prototype.publish(\"bottom\", null, \"number\", \"Bottom position property of popup\", null, {});\nPopup.prototype.publish(\"left\", null, \"number\", \"Left position property of popup\", null, {});\nPopup.prototype.publish(\"right\", null, \"number\", \"Right position property of popup\", null, {});\nPopup.prototype.publish(\"position\", \"relative\", \"set\", \"Value of the 'position' property\", [\"absolute\", \"relative\", \"fixed\", \"static\", \"initial\", \"inherit\"], { tags: [\"Private\"] });\nPopup.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Private\"] });\nconst _Tabbed = class _Tabbed extends HTMLWidget {\n constructor() {\n super();\n __publicField(this, \"_tabContainer\");\n __publicField(this, \"_contentContainer\");\n this._tag = \"div\";\n }\n clearTabs() {\n this.labels([]);\n this.widgets([]);\n return this;\n }\n addTab(widget, label, isActive, callback) {\n const widgetSize = widget.size();\n if (widgetSize.width === 0 && widgetSize.height === 0) {\n widget.size({ width: \"100%\", height: \"100%\" });\n }\n const labels = this.labels();\n const widgets = this.widgets();\n if (isActive) {\n this.activeTabIdx(this.widgets().length);\n }\n labels.push(label);\n const surface = new Surface().widget(widget ? widget : new Text().text(\"No widget defined for tab\"));\n widgets.push(surface);\n this.labels(labels);\n this.widgets(widgets);\n if (callback) {\n callback(surface);\n }\n return this;\n }\n widgetSize(widgetDiv) {\n const width = this.clientWidth();\n let height = this.clientHeight();\n const tcBox = this._tabContainer.node().getBoundingClientRect();\n if (typeof tcBox.height !== \"undefined\") {\n height -= tcBox.height;\n }\n return { width, height };\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tabContainer = element.append(\"div\");\n this._contentContainer = element.append(\"div\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.style(\"padding\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null);\n const tabs = this._tabContainer.selectAll(\".tab-button.id\" + this.id()).data(this.showTabs() ? this.labels() : [], function(d) {\n return d;\n });\n tabs.enter().append(\"span\").attr(\"class\", \"tab-button id\" + this.id()).style(\"cursor\", \"pointer\").on(\"click\", function(d, idx) {\n context.click(context.widgets()[idx].widget(), d, idx);\n context.activeTabIdx(idx).render();\n }).merge(tabs).classed(\"active\", function(d, idx) {\n return context.activeTabIdx() === idx;\n }).text(function(d) {\n return d;\n });\n tabs.exit().remove();\n const content = this._contentContainer.selectAll(\".tab-content.id\" + this.id()).data(this.widgets(), function(d) {\n return d.id();\n });\n content.enter().append(\"div\").attr(\"class\", \"tab-content id\" + this.id()).each(function(widget, idx) {\n widget.target(this);\n }).merge(content).classed(\"active\", function(d, idx) {\n return context.activeTabIdx() === idx;\n }).style(\"display\", function(d, idx) {\n return context.activeTabIdx() === idx ? \"block\" : \"none\";\n }).each(function(surface, idx) {\n surface.visible(context.activeTabIdx() === idx);\n if (context.activeTabIdx() === idx) {\n const wSize = context.widgetSize(select(this));\n surface.surfaceBorderWidth(context.showTabs() ? null : 0).surfacePadding(context.showTabs() ? null : 0).resize(wSize);\n }\n });\n content.exit().each(function(widget, idx) {\n widget.target(null);\n }).remove();\n switch (this.tabLocation()) {\n case \"bottom\":\n this._tabContainer.attr(\"class\", \"on_bottom\").style(\"top\", this._contentContainer.node().offsetHeight + this.surfacePadding() + \"px\").style(\"position\", \"absolute\");\n this._contentContainer.style(\"top\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null).style(\"position\", \"absolute\");\n break;\n default:\n this._tabContainer.attr(\"class\", \"on_top\").style(\"top\", null).style(\"position\", \"relative\");\n this._contentContainer.style(\"top\", this._tabContainer.node().offsetHeight + this.surfacePadding() + \"px\").style(\"position\", \"absolute\");\n break;\n }\n }\n click(widget, column, idx) {\n }\n};\n__name(_Tabbed, \"Tabbed\");\nlet Tabbed = _Tabbed;\nTabbed.prototype._class += \" layout_Tabbed\";\nTabbed.prototype.publish(\"showTabs\", true, \"boolean\", \"Show Tabs\", null, {});\nTabbed.prototype.publish(\"surfacePadding\", 4, \"number\", \"Padding\");\nTabbed.prototype.publish(\"activeTabIdx\", 0, \"number\", \"Index of active tab\", null, {});\nTabbed.prototype.publish(\"labels\", [], \"array\", \"Array of tab labels sharing an index with \", null, { tags: [\"Private\"] });\nTabbed.prototype.publish(\"tabLocation\", \"top\", \"set\", \"Position the tabs at the bottom of the widget\", [\"top\", \"bottom\"], { tags: [\"Private\"] });\nTabbed.prototype.publish(\"widgets\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Private\"] });\nconst _Toolbar = class _Toolbar extends HTMLWidget {\n constructor() {\n super();\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.attr(\"title\", context.title()).style(\"background-color\", this.backgroundColor());\n const title = element.selectAll(\"div.toolbar-title\").data(this.title() ? [this.title()] : []);\n title.enter().append(\"div\").classed(\"toolbar-title\", true).append(\"span\");\n title.selectAll(\"div.toolbar-title > span\").style(\"font-size\", this.fontSize_exists() ? this.fontSize() + \"px\" : null).style(\"color\", this.fontColor_exists() ? this.fontColor() : null).style(\"font-family\", this.fontFamily_exists() ? this.fontFamily() : null).style(\"font-weight\", this.fontBold_exists() ? this.fontBold() ? \"bold\" : \"normal\" : null).style(\"background-color\", this.backgroundColor_exists() ? this.backgroundColor() : null).text(context.title());\n title.exit().remove();\n const childWidgets = element.selectAll(\"div.toolbar-child\").data(this.widgets() !== null ? this.widgets() : [], function(d) {\n return d.id();\n });\n childWidgets.enter().insert(\"div\", \"div.toolbar-title\").each(function(d, i) {\n const widgetClass = context.widgetClasses()[i] ? context.widgetClasses()[i] + \" toolbar-child\" : \"toolbar-child\";\n select(this).classed(widgetClass, true);\n d.target(this);\n });\n childWidgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n childWidgets.order();\n }\n render(callback) {\n const context = this;\n return super.render(function(w) {\n const toolbarBBox = context.element().node().getBoundingClientRect();\n let minX = toolbarBBox.left + toolbarBBox.width;\n context.element().selectAll(\"div.toolbar-child\").each(function(d, i) {\n const childBBox = this.getBoundingClientRect();\n if (minX > childBBox.left)\n minX = childBBox.left;\n });\n context.element().select(\".toolbar-title\").style(\"width\", minX - toolbarBBox.left - 4 + \"px\");\n if (callback) {\n callback(w);\n }\n });\n }\n exit(domNode, element) {\n this.widgets().forEach(function(w) {\n w.target(null);\n });\n super.exit(domNode, element);\n }\n};\n__name(_Toolbar, \"Toolbar\");\nlet Toolbar = _Toolbar;\nToolbar.prototype._class += \" layout_Toolbar\";\nToolbar.prototype.publish(\"title\", \"\", \"string\", \"Title\", null, { tags: [\"Intermediate\"] });\nToolbar.prototype.publish(\"fontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"backgroundColor\", null, \"html-color\", \"Background Color\", null, { tags: [\"Intermediate\"], optional: true });\nToolbar.prototype.publish(\"responsive\", true, \"boolean\", \"Adapts to pixel width\", null, { tags: [\"Basic\"] });\nToolbar.prototype.publish(\"widgets\", [], \"widgetArray\", \"Child widgets of the toolbar\", null, { tags: [\"Basic\"] });\nToolbar.prototype.publish(\"widgetClasses\", [], \"array\", \"Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)\", null, { tags: [\"Basic\"] });\nconst _VerticalList = class _VerticalList extends FlexGrid {\n constructor() {\n super();\n this.orientation_default(\"vertical\");\n this.flexWrap_default(\"nowrap\");\n }\n};\n__name(_VerticalList, \"VerticalList\");\nlet VerticalList = _VerticalList;\nVerticalList.prototype._class += \" layout_VerticalList\";\nexport {\n AbsoluteSurface,\n Accordion,\n BUILD_VERSION,\n Border,\n Border2,\n Carousel,\n Cell,\n ChartPanel,\n FlexGrid,\n Grid,\n HorizontalList,\n Layered,\n Legend,\n Modal,\n PKG_NAME,\n PKG_VERSION,\n Popup,\n Surface,\n Tabbed,\n Toolbar,\n VerticalList,\n WidgetDiv\n};\n//# sourceMappingURL=index.js.map\n!function(){\"use strict\";try{if(\"undefined\"!=typeof document){var o=document.createElement(\"style\");o.appendChild(document.createTextNode('.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{position:relative;overflow:hidden;pointer-events:all}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0px;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{display:block;width:100%}.layout_Accordion>.collapsible-title{font-size:13px;color:#fff;padding:4px 8px;height:26px;-webkit-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);-moz-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;left:0;top:0}.layout_Accordion>.collapsible-icon{position:absolute;top:0;right:0;width:24px;height:24px;color:#fff}.layout_Surface{box-sizing:border-box;margin:0;border:1px solid #e5e5e5;overflow:hidden;height:100%;width:100%}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{margin:0;padding:2px;background-color:#e5e5e5}.layout_Surface .html-button-container{position:absolute;right:0;top:3px}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:\"\";font-family:FontAwesome;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px);font-size:100px}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Pie:before{top:calc(50% - 72px);left:calc(50% - 45px);content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:\"\"}.layout_Cell .update-indicator{box-sizing:border-box;position:absolute;top:0;left:0;padding:0;z-index:1000;border-width:0px;border-style:solid;pointer-events:none}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{width:6px;height:6px;background-color:#444;opacity:.3;position:absolute;visibility:hidden}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border-radius:5px;border:1px solid #e5e5e5;display:inline-block;overflow:hidden}.layout_Border .cell h2{margin:0;padding-top:4px;-webkit-margin:0px;text-align:center}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{position:fixed;box-sizing:border-box;border:2px dashed #7f8c8d;border-radius:0;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px,#6464641a 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px,#119bd71a 12px)}.layout_Border2{display:flex;flex-direction:column}.layout_Border2>.body{margin:0;padding:0;display:flex;flex-flow:row}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header{display:block}.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow-y:scroll;overflow-x:hidden}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{position:fixed;background-color:#000;opacity:.5;z-index:10000}.layout_Modal-content{position:fixed;background-color:#fff;z-index:10100}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{overflow:hidden;border-style:solid;flex-grow:1}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{position:absolute;border-style:solid;border-width:1px;background:#f5f5f5}.layout_Grid>.lane{position:absolute;border-style:none;opacity:.25;border-radius:0;pointer-events:none}.layout_Grid>.ddCell.draggable{border-style:solid;border-width:1px;background-color:#f8f8ff;border-radius:0;cursor:move}.layout_Grid>.ddCell.draggable>.resizeHandle{bottom:0;right:0;width:8px;height:8px;border-style:none;position:absolute;cursor:nwse-resize}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{bottom:2px;right:2px;width:4px;height:4px;border-style:solid;border-left-width:0px;border-top-width:0px;border-right-width:2px;border-bottom-width:2px;border-color:#a9a9a9;background-color:none;position:absolute}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{border-style:solid;border-width:1px;border-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px,#6464641a 8px)}.layout_Grid>.resizing{border-style:solid;border-width:1px;border-color:gray;background-color:orange;border-radius:0;position:absolute;opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px,orange 8px)}.layout_Grid>.ddCell.draggable .common_Widget.selected{border-style:solid;border-width:1px;border-color:red;background-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px,#6400001a 8px)}.layout_Grid #drag-me:before{content:\"#\" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{position:relative;top:1px;display:inline-block;border-left:1px solid #ddd;border-top:1px solid #ddd;border-right:1px solid #ddd;background-color:transparent;margin-right:4px;padding:2px 2px 4px;background-color:#ccc}.layout_Tabbed .tab-button.active{background-color:#fff;z-index:999}.layout_Tabbed .on_bottom .tab-button{border-bottom:1px solid #ddd;border-top:none;top:-1px}.layout_Toolbar{height:100%;background-color:#ddd;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-title{display:inline-block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);margin-left:4px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-child{position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);float:right;margin-left:4px;margin-right:4px;line-height:16px}')),document.head.appendChild(o)}}catch(e){console.error(\"vite-plugin-css-injected-by-js\",e)}}();\n","import { Utility } from \"@hpcc-js/common\";\n\ndeclare const require: any;\nexport function requireWidget(classID) {\n return new Promise(function (resolve, _reject) {\n const parsedClassID = Utility.parseClassID(classID);\n if (require) {\n require([parsedClassID.package], function (Package) {\n let Widget = null;\n if (Package && Package[parsedClassID.widgetID]) {\n Widget = Package[parsedClassID.widgetID];\n }\n resolve(parsedClassID.memberWidgetID ? (Widget.prototype ? Widget.prototype[parsedClassID.memberWidgetID] : Widget[parsedClassID.memberWidgetID]) : Widget);\n });\n }\n });\n}\n\nexport function requireWidgets(classIDs) {\n return Promise.all(classIDs.map(requireWidget));\n}\n","import { IGraph, INDChart } from \"@hpcc-js/api\";\nimport { Database, HTMLWidget, Utility, Widget } from \"@hpcc-js/common\";\nimport { map as d3Map } from \"d3-collection\";\nimport { requireWidget } from \"./Utility.ts\";\n\ndeclare const require: any;\nexport class MultiChart extends HTMLWidget {\n _allCharts = {};\n _chartTypeDefaults;\n _chartTypeProperties;\n _chartMonitor;\n _switchingTo;\n\n constructor() {\n super();\n INDChart.call(this);\n IGraph.call(this);\n\n this._tag = \"div\";\n\n this._allCharts = {};\n this._allChartTypes.forEach(function (item) {\n const newItem = JSON.parse(JSON.stringify(item));\n newItem.widget = null;\n this._allCharts[item.id] = newItem;\n this._allCharts[item.display] = newItem;\n this._allCharts[item.widgetClass] = newItem;\n }, this);\n this._chartTypeDefaults = {};\n this._chartTypeProperties = {};\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n const retVal = super.fields.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().fields();\n this.chart().fields(_);\n }\n return retVal;\n }\n\n columns(): string[];\n columns(_, asDefault?: boolean): this;\n columns(_?, asDefault?: boolean) {\n const retVal = HTMLWidget.prototype.columns.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().columns();\n this.chart().columns(_, asDefault);\n }\n return retVal;\n }\n\n data(_?) {\n const retVal = HTMLWidget.prototype.data.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().data();\n this.chart().data(_);\n }\n return retVal;\n }\n\n hasOverlay() {\n return this.chart() && this.chart().hasOverlay();\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return this.chart() && this.chart().visible();\n if (this.chart()) {\n this.chart().visible(_);\n }\n return this;\n }\n\n chartTypeDefaults(): object;\n chartTypeDefaults(_: object): this;\n chartTypeDefaults(_?: object): object | this {\n if (!arguments.length) return this._chartTypeDefaults;\n this._chartTypeDefaults = _;\n return this;\n }\n\n chartTypeProperties(): object;\n chartTypeProperties(_: object): this;\n chartTypeProperties(_?: object): object | this {\n if (!arguments.length) return this._chartTypeProperties;\n this._chartTypeProperties = _;\n return this;\n }\n\n getChartDataFamily() {\n return this._allCharts[this.chartType()].family;\n }\n\n requireContent(chartType, callback) {\n const classInfo = Utility.parseClassID(this._allCharts[chartType].widgetClass);\n switch (classInfo.package) {\n case \"@hpcc-js/chart\":\n import(\"@hpcc-js/chart\").then(mod => {\n callback(new mod[classInfo.widgetID]());\n });\n break;\n case \"@hpcc-js/dgrid\":\n import(\"@hpcc-js/dgrid\").then(mod => {\n callback(new mod[classInfo.widgetID]());\n });\n break;\n default:\n requireWidget(this._allCharts[chartType].widgetClass).then(function (WidgetClass: any) {\n callback(new WidgetClass());\n });\n }\n }\n\n switchChart(callback) {\n if (this._switchingTo === this.chartType()) {\n if (callback) {\n callback(this);\n }\n return;\n } else if (this._switchingTo) {\n console.warn(\"Attempting switch to: \" + this.chartType() + \", before previous switch is complete (\" + this._switchingTo + \")\");\n }\n this._switchingTo = this.chartType();\n const oldContent = this.chart();\n const context = this;\n this.requireContent(this.chartType(), function (newContent) {\n if (newContent !== oldContent) {\n const size = context.size();\n newContent\n .fields(context.fields())\n .data(context.data())\n .size(size)\n ;\n\n context.chart(newContent);\n if (oldContent) {\n oldContent\n .size({ width: 1, height: 1 })\n .render()\n ;\n }\n }\n delete context._switchingTo;\n if (callback) {\n callback(this);\n }\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n const content = element.selectAll(\".multiChart\").data(this.chart() ? [this.chart()] : [], function (d) { return d._id; });\n content.enter().append(\"div\")\n .attr(\"class\", \"multiChart\")\n .each(function (d) {\n d.target(this);\n })\n ;\n\n const currChart = this.chart();\n if (currChart) {\n for (const key in this._chartTypeDefaults) {\n if (currChart[key + \"_default\"]) {\n try {\n currChart[key + \"_default\"](this._chartTypeDefaults[key]);\n } catch (e) {\n console.warn(\"Exception Setting Default: \" + key);\n }\n } else {\n console.warn(\"Unknown Default: \" + key);\n }\n }\n this._chartTypeDefaults = {};\n for (const propKey in this._chartTypeProperties) {\n if (currChart[propKey]) {\n try {\n currChart[propKey](this._chartTypeProperties[propKey]);\n } catch (e) {\n console.warn(\"Exception Setting Property: \" + propKey);\n }\n } else {\n console.warn(\"Unknown Property: \" + propKey);\n }\n }\n this._chartTypeProperties = {};\n }\n\n const context = this;\n content\n .each(function (d) { d.resize(context.size()); })\n ;\n\n content.exit().transition()\n .each(function (d) { d.target(null); })\n .remove()\n ;\n }\n\n exit(domNode, element) {\n if (this._chartMonitor) {\n this._chartMonitor.remove();\n delete this._chartMonitor;\n }\n if (this.chart()) {\n this.chart().target(null);\n }\n super.exit(domNode, element);\n }\n\n render(_callback?) {\n if (this.chartType() && (!this.chart() || (this.chart().classID() !== this._allCharts[this.chartType()].widgetClass))) {\n const context = this;\n const args = arguments;\n this.switchChart(function () {\n HTMLWidget.prototype.render.apply(context, args);\n });\n return this;\n }\n return HTMLWidget.prototype.render.apply(this, arguments);\n }\n}\nMultiChart.prototype._class += \" composite_MultiChart\";\nMultiChart.prototype.implements(INDChart.prototype);\nMultiChart.prototype.implements(IGraph.prototype);\nexport interface ChartMeta {\n id: string;\n display: string;\n widgetClass: string;\n widgetPath?: string;\n}\nexport interface MultiChart {\n _otherChartTypes: ChartMeta[];\n _graphChartTypes: ChartMeta[];\n _1DChartTypes: ChartMeta[];\n _2DChartTypes: ChartMeta[];\n _NDChartTypes: ChartMeta[];\n _mapChartTypes: ChartMeta[];\n _anyChartTypes: ChartMeta[];\n _allChartTypes: ChartMeta[];\n _allMap;\n _allFamilies: string[];\n _allChartTypesMap;\n _allChartTypesByClass;\n\n hideRowOnLegendClick(): boolean;\n hideRowOnLegendClick(_: boolean): this;\n chartType(): string;\n chartType(_: string): this;\n chart(): Widget;\n chart(_: Widget): this;\n chart_access(): Widget;\n chart_access(_: Widget): this;\n\n click(_row, _column, _selected): void;\n dblclick(_row, _column, _selected): void;\n vertex_click(row, column, selected, more): void;\n vertex_dblclick(row, column, selected, more): void;\n edge_click(row, column, selected, more): void;\n edge_dblclick(row, column, selected, more): void;\n}\n\nMultiChart.prototype._otherChartTypes = [\n { id: \"FORM\", display: \"Form\", widgetClass: \"form_FieldForm\" }\n].map(function (item: any) { item.family = \"other\"; return item; });\nMultiChart.prototype._graphChartTypes = [\n { id: \"GRAPH\", display: \"Graph\", widgetClass: \"graph_Graph\" },\n { id: \"ADJACENCY_GRAPH\", display: \"Graph\", widgetClass: \"graph_AdjacencyGraph\" },\n { id: \"GRAPHC\", display: \"GraphC\", widgetClass: \"graph_GraphC\" }\n].map(function (item: any) { item.family = \"GRAPH\"; return item; });\nMultiChart.prototype._1DChartTypes = [\n].map(function (item: any) { item.family = \"1D\"; return item; });\nMultiChart.prototype._2DChartTypes = [\n { id: \"SUMMARY\", display: \"Summary\", widgetClass: \"chart_Summary\" },\n { id: \"BUBBLE\", display: \"Bubble\", widgetClass: \"chart_Bubble\" },\n { id: \"PIE\", display: \"Pie\", widgetClass: \"chart_Pie\" },\n { id: \"WORD_CLOUD\", display: \"Word Cloud\", widgetClass: \"other_WordCloud\" }\n].map(function (item: any) { item.family = \"2D\"; return item; });\nMultiChart.prototype._NDChartTypes = [\n { id: \"COLUMN\", display: \"Column\", widgetClass: \"chart_Column\" },\n { id: \"BAR\", display: \"Bar\", widgetClass: \"chart_Bar\" },\n { id: \"LINE\", display: \"Line\", widgetClass: \"chart_Line\" },\n { id: \"AREA\", display: \"Area\", widgetClass: \"chart_Area\" },\n { id: \"STEP\", display: \"Step\", widgetClass: \"chart_Step\" },\n { id: \"SCATTER\", display: \"Scatter\", widgetClass: \"chart_Scatter\" },\n { id: \"HEXBIN\", display: \"Hex Bin\", widgetClass: \"chart_HexBin\" }\n].map(function (item: any) { item.family = \"ND\"; return item; });\nMultiChart.prototype._mapChartTypes = [\n { id: \"CHORO_USSTATES\", display: \"US State Choropleth\", widgetClass: \"map_ChoroplethStates\" },\n { id: \"CHORO_USCOUNTIES\", display: \"US County Choropleth\", widgetClass: \"map_ChoroplethCounties\" },\n { id: \"CHORO_COUNTRIES\", display: \"Country Choropleth\", widgetClass: \"map_ChoroplethCountries\" },\n { id: \"GMAP_CHORO_USCOUNTIES\", display: \"Google Map US County Choropleth\", widgetClass: \"map_GMapCounties\" },\n { id: \"GOOGLE_MAP\", display: \"Google Map\", widgetClass: \"map_GMapLayered\" },\n { id: \"OPENSTREET\", display: \"Open Street Map\", widgetClass: \"map_OpenStreet\" }\n].map(function (item: any) { item.family = \"map\"; return item; });\nMultiChart.prototype._anyChartTypes = [\n { id: \"TABLE\", display: \"Table\", widgetClass: \"dgrid_Table\" },\n { id: \"TABLE_LEGACY\", display: \"Table (legacy)\", widgetClass: \"other_Table\" },\n { id: \"TABLE_NESTED\", display: \"Nested Table\", widgetClass: \"other_NestedTable\" },\n { id: \"TABLE_CALENDAR\", display: \"Table driven Calendar Heat Map\", widgetClass: \"other_CalendarHeatMap\" },\n { id: \"TABLE_BULLET\", display: \"Table driven bullet chart\", widgetClass: \"chart_Bullet\" },\n { id: \"TABLE_SELECT\", display: \"Table driven select\", widgetClass: \"other_Select\" },\n { id: \"TABLE_AUTOCOMPLETE\", display: \"Table driven auto complete\", widgetClass: \"other_AutoCompleteText\" },\n { id: \"TABLE_OPPORTUNITY\", display: \"Table driven opportunity widget\", widgetClass: \"graph_Opportunity\" },\n { id: \"TABLE_TREE\", display: \"Table driven tree\", widgetClass: \"tree_Dendrogram\" },\n { id: \"TABLE_TREEMAP\", display: \"Table driven Treemap\", widgetClass: \"tree_Treemap\" },\n { id: \"TABLE_SANKEY\", display: \"Table driven Sankey\", widgetClass: \"graph_Sankey\" },\n { id: \"TABLE_GMAP_PIN\", display: \"Table driven Google Map (pins)\", widgetClass: \"map_GMapPin\" },\n { id: \"TABLE_GMAP_PINLINE\", display: \"Table driven Google Map (pins/lines)\", widgetClass: \"map_GMapPinLine\" },\n { id: \"TABLE_XML_TREE\", display: \"Table driven XML Tree\", widgetClass: \"tree_Indented\" }\n].map(function (item: any) { item.family = \"any\"; return item; });\nMultiChart.prototype._allChartTypes =\n MultiChart.prototype._otherChartTypes.concat(\n MultiChart.prototype._graphChartTypes.concat(\n MultiChart.prototype._1DChartTypes.concat(\n MultiChart.prototype._2DChartTypes.concat(\n MultiChart.prototype._NDChartTypes.concat(\n MultiChart.prototype._mapChartTypes.concat(\n MultiChart.prototype._anyChartTypes\n ))))));\nMultiChart.prototype._allMap = d3Map(MultiChart.prototype._allChartTypes, function (item: any) { return item.family; });\nMultiChart.prototype._allFamilies = MultiChart.prototype._allMap.keys();\nMultiChart.prototype._allChartTypesMap = {};\nMultiChart.prototype._allChartTypesByClass = {};\nMultiChart.prototype._allChartTypes.forEach(function (item) {\n item.widgetPath = Utility.widgetPath(item.widgetClass);\n MultiChart.prototype._allChartTypesMap[item.id] = item;\n MultiChart.prototype._allChartTypesByClass[item.widgetClass] = item;\n});\n\nMultiChart.prototype.publishReset();\nMultiChart.prototype.publish(\"hideRowOnLegendClick\", false, \"boolean\", \"Enable/Disable hiding row on legend clicks\", null, { tags: [\"Basic\"] });\nMultiChart.prototype.publish(\"chartType\", \"BUBBLE\", \"set\", \"Chart Type\", MultiChart.prototype._allChartTypes.map(function (item) { return item.id; }), { tags: [\"Basic\"] });\nMultiChart.prototype.publish(\"chart\", null, \"widget\", \"Chart\", null, { tags: [\"Basic\"] });\n\nconst _origChart = MultiChart.prototype.chart;\nMultiChart.prototype.chart = function (_?) {\n const retVal = _origChart.apply(this, arguments);\n if (arguments.length) {\n const context = this;\n if (this._allChartTypesByClass[_.classID()]) {\n this.chartType(this._allChartTypesByClass[_.classID()].id);\n } else {\n console.warn(\"Unknown Class ID: \" + _.classID());\n }\n _.click = function (_row, _column, _selected) {\n context.click.apply(context, arguments);\n };\n _.dblclick = function (_row, _column, _selected) {\n context.dblclick.apply(context, arguments);\n };\n _.vertex_click = function (row, column, selected, more) {\n context.vertex_click.apply(context, arguments);\n };\n _.vertex_dblclick = function (row, column, selected, more) {\n context.vertex_dblclick.apply(context, arguments);\n };\n _.edge_click = function (row, column, selected, more) {\n context.edge_click.apply(context, arguments);\n };\n _.edge_dblclick = function (row, column, selected, more) {\n context.edge_dblclick.apply(context, arguments);\n };\n if (this._chartMonitor) {\n this._chartMonitor.remove();\n delete this._chartMonitor;\n }\n this._chartMonitor = _.monitor(function (key, newVal, oldVal) {\n context.broadcast(key, newVal, oldVal, _);\n });\n }\n return retVal;\n};\n","import { HTMLWidget, Widget } from \"@hpcc-js/common\";\nimport { ChartPanel } from \"@hpcc-js/layout\";\nimport { MultiChart } from \"./MultiChart.ts\";\n\nimport \"../src/ChartPanel.css\";\n\nclass Summary extends HTMLWidget {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.append(\"p\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n element.select(\"p\").text(this.text());\n }\n}\ninterface Summary {\n text(): string;\n text(_: string): this;\n}\nSummary.prototype.publish(\"text\", \"\", \"string\");\n\nexport class MultiChartPanel extends ChartPanel<MultiChart> {\n\n constructor() {\n super();\n this.widget(new MultiChart().chartType(\"COLUMN\"));\n }\n\n multiChart(): MultiChart {\n return this._widget;\n }\n\n chartType(): string;\n chartType(_: string): this;\n chartType(_?: string): string | this {\n if (!arguments.length) return this._widget.chartType();\n this._widget.chartType(_);\n return this;\n }\n\n chart(): Widget;\n chart(_: Widget): this;\n chart(_?: Widget): Widget | this {\n if (!arguments.length) return this._widget.chart();\n this._widget.chart(_);\n return this;\n }\n\n chartTypeDefaults(): object;\n chartTypeDefaults(_: object): this;\n chartTypeDefaults(_?: object): this | object {\n if (!arguments.length) return this._widget.chartTypeDefaults();\n this._widget.chartTypeDefaults(_);\n return this;\n }\n\n chartTypeProperties(): object;\n chartTypeProperties(_: object): this;\n chartTypeProperties(_?: object): this | object {\n if (!arguments.length) return this._widget.chartTypeProperties();\n this._widget.chartTypeProperties(_);\n return this;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n if (this._widget instanceof MultiChart) {\n this._legend.dataFamily(this._widget.getChartDataFamily());\n }\n super.update(domNode, element);\n }\n}\nMultiChartPanel.prototype._class += \" composite_MultiChartPanel\";\n","import { OnOff } from \"@hpcc-js/form\";\nimport { Border, Toolbar } from \"@hpcc-js/layout\";\nimport { PropertyEditor } from \"@hpcc-js/other\";\n\nimport \"../src/Dermatology.css\";\n\nexport class Dermatology extends Border {\n _toolbar;\n _propEditor;\n _showProperties;\n _propsButton;\n _prevWidget;\n\n constructor() {\n super();\n\n this._toolbar = new Toolbar()\n .title(\"Dermatology\")\n ;\n this._propEditor = new PropertyEditor()\n .show_settings(true)\n ;\n }\n\n showProperties(_?) {\n if (!arguments.length) return this._showProperties;\n this._showProperties = _;\n this\n .rightPercentage(0)\n .rightSize(this._showProperties ? 360 : 0)\n .setContent(\"right\", this._showProperties ? this._propEditor : null)\n ;\n const widget = this.widget();\n if (widget && widget.designMode) {\n widget.designMode(this._showProperties);\n }\n return this;\n }\n\n toggleProperties() {\n return this.showProperties(!this.showProperties());\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this\n .topPercentage(0)\n .topSize(0)\n .setContent(\"top\", this._toolbar)\n ;\n this.getCell(\"top\").surfaceShadow(true);\n\n const context = this;\n this._propsButton = new OnOff()\n .id(this.id() + \"_props\")\n .value(\"Properties\")\n .on(\"click\", function () {\n context\n .toggleProperties()\n .render()\n ;\n })\n ;\n this._toolbar.widgets([this._propsButton]);\n }\n\n update(domNode, element) {\n this\n .topPercentage(0)\n .topSize(this.showToolbar() ? 32 : 0)\n ;\n\n super.update(domNode, element);\n\n const widget = this.widget();\n element.style(\"background-color\", widget && widget.surfaceShadow ? null : \"white\");\n }\n\n render(callback) {\n const widget = this.widget();\n if (widget !== this._prevWidget) {\n if (widget && widget.surfaceShadow) {\n widget.surfaceBackgroundColor_default(\"white\");\n }\n this.setContent(\"center\", widget);\n this._propEditor.widget(widget);\n this._prevWidget = widget;\n }\n return super.render(callback);\n }\n\n showToolbar: { (): boolean; (_: boolean): Dermatology };\n showToolbar_exists: () => boolean;\n widget: { (): any; (_: any): Dermatology };\n widget_exists: () => boolean;\n}\nDermatology.prototype._class += \" composite_Dermatology\";\n\nDermatology.prototype.publish(\"showToolbar\", true, \"boolean\", \"Show Toolbar\");\nDermatology.prototype.publish(\"widget\", null, \"widget\", \"Widget\");\n","import { Database, Text, Utility } from \"@hpcc-js/common\";\nimport { Button, Input, Select } from \"@hpcc-js/form\";\nimport { Border, Grid, Toolbar } from \"@hpcc-js/layout\";\nimport { Html, Legend } from \"@hpcc-js/other\";\nimport { select as d3Select } from \"d3-selection\";\nimport \"d3-transition\";\nimport { MultiChart } from \"./MultiChart.ts\";\n\nimport \"../src/MegaChart.css\";\n\nexport class MegaChart extends Border {\n _chart = new MultiChart();\n _toolbar = new Toolbar();\n _valueTitle = new Text();\n _domainTitle = new Text();\n _legend: Legend = new Legend();\n _csvButton;\n _infoButton;\n _maximizeButton;\n _legendButton;\n _chartTypeSelect;\n _prevLegendPosition;\n _prevShowToolbar;\n _1DChartTypes;\n _2DChartTypes;\n _NDChartTypes;\n _anyChartTypes;\n _allChartTypes;\n _contentClasses;\n _dataCount;\n\n constructor() {\n super();\n this._tag = \"div\";\n const context = this;\n this._chart.click = function () {\n context.click.apply(context, arguments);\n };\n this._chart.dblclick = function () {\n context.dblclick.apply(context, arguments);\n };\n this._chart.vertex_click = function () {\n context.vertex_click.apply(context, arguments);\n };\n this._chart.vertex_dblclick = function () {\n context.vertex_dblclick.apply(context, arguments);\n };\n this._chart.edge_click = function () {\n context.edge_click.apply(context, arguments);\n };\n this._chart.edge_dblclick = function () {\n context.edge_dblclick.apply(context, arguments);\n };\n }\n\n toolbarWidgets(_?) {\n if (!arguments.length) return this._toolbar.widgets();\n this._toolbar.widgets(_);\n return this;\n }\n\n chartTypeDefaults(_?) {\n if (!arguments.length) return this._chart.chartTypeDefaults();\n this._chart.chartTypeDefaults(_);\n return this;\n }\n\n chartTypeProperties(_?) {\n if (!arguments.length) return this._chart.chartTypeProperties();\n this._chart.chartTypeProperties(_);\n return this;\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n if (!arguments.length) return this._chart.fields();\n this._chart.fields(_);\n return this;\n }\n\n columns(): string[];\n columns(_: string[], asDefault?: boolean): this;\n columns(_?: string[], asDefault?: boolean): string[] | this {\n if (!arguments.length) return this._chart.columns();\n this._chart.columns(_, asDefault);\n return this;\n }\n\n data(_?) {\n if (!arguments.length) return this._chart.data();\n this._chart.data(_);\n return this;\n }\n\n downloadCSV() {\n Utility.downloadString(\"CSV\", this._chart.export(\"CSV\"));\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n\n this.topShrinkWrap(false).topPercentage(0).topSize(30);\n this._dataCount = new Html()\n .classed({ \"composite_MegaChart-dataCount\": true })\n .id(this.id() + \"_dataCount\")\n .html('<span class=\"MegaChart-dataCount-label\">Count:</span>&nbsp;<span class=\"MegaChart-dataCount-value\">' + (this.data() ? this.data().length : \"0\") + \"</span>\")\n .overflowX(\"visible\")\n .overflowY(\"visible\")\n ;\n\n this._csvButton = new Button()\n .classed({ \"composite_MegaChart-CSV\": true })\n .id(this.id() + \"_csv\")\n .value(\"CSV\")\n ;\n this._csvButton.click = function (a) {\n context.downloadCSV();\n };\n\n this._infoButton = new Button()\n .classed({ \"composite_MegaChart-Info\": true })\n .id(this.id() + \"_info\")\n .value(this.infoIcon())\n ;\n\n this._maximizeButton = new Button()\n .classed({ \"composite_MegaChart-Maximize\": true })\n .id(this.id() + \"_maximize\")\n .value(\"\\uf2d0\")\n ;\n this._maximizeButton.click = function (buttonWidget) {\n const target = context.target() as any;\n let node = target;\n const isMaximized = d3Select(target).classed(\"__hpccisMaximized\");\n\n // Find the layout_Grid ancestor\n const parentGrid = context.locateAncestor(\"layout_Grid\");\n if (parentGrid) {\n node = parentGrid.element().node();\n } else {\n node = document.body;\n }\n\n const targetElement = d3Select(context.target()) as any;\n if (isMaximized) {\n // Restore from maximized to natural size/position\n const targetParentBox = target.parentElement.getBoundingClientRect();\n const targetPaddingTop = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-top\").replace(\"px\", \"\"));\n const targetPaddingLeft = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-left\").replace(\"px\", \"\"));\n const targetPaddingRight = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-right\").replace(\"px\", \"\"));\n const targetPaddingBottom = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-bottom\").replace(\"px\", \"\"));\n context.contentDiv.style(\"opacity\", 0).transition(100);\n targetElement.transition()// .duration(3000)\n .style(\"top\", targetParentBox.top + \"px\")\n .style(\"left\", targetParentBox.left + \"px\")\n .style(\"width\", (targetParentBox.width - targetPaddingLeft - targetPaddingRight) + \"px\")\n .style(\"height\", (targetParentBox.height - targetPaddingTop - targetPaddingBottom) + \"px\")\n .each(\"end\", function () {\n targetElement.style(\"position\", target.__old_position);\n targetElement.style(\"z-index\", target.__old_zindex);\n targetElement.style(\"background-color\", target.__old_backgroundColor);\n targetElement.style(\"box-shadow\", target.__old_boxshadow);\n context\n .resize({\n width: targetParentBox.width - targetPaddingLeft - targetPaddingRight,\n height: targetParentBox.height - targetPaddingTop - targetPaddingBottom\n })\n .render(function () {\n context.contentDiv.transition()\n .style(\"opacity\", 1);\n });\n buttonWidget.value(\"\\uf2d0\").render();\n });\n } else {\n // Maximize this MegaChart\n target.__old_position = target.style.position;\n target.__old_zindex = target.style.zIndex;\n target.__old_boxshadow = target.style.boxShadow;\n target.__old_backgroundColor = context.element().style(\"background-color\");\n const grid = d3Select(node).datum() as Grid;\n const gridTarget = grid.target();\n const gridBox = grid ? gridTarget.getBoundingClientRect() : node.getBoundingClientRect();\n const gridPaddingTop = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-top\").replace(\"px\", \"\"));\n const gridPaddingLeft = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-left\").replace(\"px\", \"\"));\n const gridPaddingRight = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-right\").replace(\"px\", \"\"));\n const gridPaddingBottom = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-bottom\").replace(\"px\", \"\"));\n context.contentDiv.style(\"opacity\", 0).transition(100);\n targetElement\n .style(\"position\", \"fixed\")\n .style(\"z-index\", 999999)\n .style(\"box-shadow\", \"0 8px 8px 0 rgba(0,0,0,.14),0 12px 4px -8px rgba(0,0,0,.2),0 4px 20px 0 rgba(0,0,0,.12)\")\n .style(\"background-color\", target.__old_backgroundColor)\n .transition()// .duration(3000)\n .style(\"top\", (gridBox.top + gridPaddingTop) + \"px\")\n .style(\"left\", (gridBox.left + gridPaddingLeft) + \"px\")\n .style(\"width\", (gridBox.width - gridPaddingLeft - gridPaddingRight) + \"px\")\n .style(\"height\", (gridBox.height - gridPaddingTop - gridPaddingBottom) + \"px\")\n .each(\"end\", function () {\n targetElement.style(\"background-color\", context.maximizedBackgroundColor());\n context\n .resize({\n width: (gridBox.width - gridPaddingLeft - gridPaddingRight),\n height: (gridBox.height - gridPaddingTop - gridPaddingBottom)\n })\n .render(function () {\n context.contentDiv.transition()\n .style(\"opacity\", 1);\n });\n buttonWidget.value(\"\\uf2d1\").render();\n });\n }\n\n d3Select(target).classed(\"__hpccisMaximized\", !isMaximized);\n };\n\n this._legendButton = new Input()\n .classed({ \"composite_MegaChart-legend\": true })\n .id(this.id() + \"_legend\")\n .type(\"checkbox\")\n .inlineLabel(\"Legend: \")\n ;\n this._legendButton.click = function (a) {\n context.render();\n };\n\n this._chartTypeSelect = new Select()\n .classed({ \"composite_MegaChart-chartType\": true })\n .id(this.id() + \"_chartType\")\n .selectOptions(this._allChartTypes.map(function (a) { return [a.id, a.display]; }))\n .value(this.chartType())\n ;\n this._chartTypeSelect.change = function (a) {\n context.chartType(a.value()).render();\n };\n\n this.setContent(\"center\", this._chart);\n\n this._legend\n .targetWidget(this._chart)\n .orientation([\"top\", \"bottom\"].indexOf(this.legendPosition()) !== -1 ? \"horizontal\" : \"vertical\")\n .fixedSize(true)\n ;\n\n this._prevLegendPosition = this.legendPosition();\n\n if (this.valueAxisTitle()) {\n this.setContent(\"left\", this._valueTitle.rotation(-90)).leftShrinkWrap(true);\n }\n if (this.domainAxisTitle()) {\n this.setContent(\"bottom\", this._domainTitle).bottomShrinkWrap(true);\n }\n\n if (this.legendPosition() !== \"none\") {\n this.setContent(this.legendPosition(), this._legend)[this.legendPosition() + \"ShrinkWrap\"](true);\n }\n }\n\n update(domNode, element) {\n function showHideButton(twArr2, button, show) {\n if (show && twArr2.indexOf(button) === -1) {\n twArr2.push(button);\n } else if (!show) {\n const idx = twArr2.indexOf(button);\n if (idx >= 0) {\n twArr2.splice(idx, 1);\n }\n }\n }\n\n if (this._chart && typeof this._chart.hideRowOnLegendClick === \"function\") {\n this._chart.hideRowOnLegendClick(this.hideRowOnLegendClick());\n }\n\n this._dataCount.html('<span class=\"MegaChart-dataCount-label\">Count:</span>&nbsp;<span class=\"MegaChart-dataCount-value\">' + (this.data() ? this.data().length : \"0\") + \"</span>\");\n\n this._chartTypeSelect.value(this.chartType());\n const twArr = this.toolbarWidgets();\n showHideButton(twArr, this._csvButton, this.showCSV());\n showHideButton(twArr, this._maximizeButton, this.showMaximize());\n showHideButton(twArr, this._legendButton, this.toolbarShowLegend());\n showHideButton(twArr, this._chartTypeSelect, this.showChartSelect());\n showHideButton(twArr, this._infoButton, this.showInfoButton());\n showHideButton(twArr, this._dataCount, this.showCount());\n this.toolbarWidgets(twArr);\n\n if (this._prevShowToolbar !== this.showToolbar()) {\n this.setContent(\"top\", this.showToolbar() ? this._toolbar : null);\n this._prevShowToolbar = this.showToolbar();\n }\n\n // TODO: Proxy + themes not working...\n this._toolbar\n .fontSize(this.titleFontSize())\n .fontColor(this.titleFontColor())\n .fontFamily(this.titleFontFamily())\n .fontBold(this.titleFontBold())\n .backgroundColor(this.titleBackgroundColor())\n ;\n\n this._chart\n .data(this.data());\n\n if (this._chart.chartType() !== this.chartType()) {\n this._chart.chartType(this.chartType());\n }\n\n let legendPosition = this.legendPosition();\n if (this.toolbarShowLegend() && !this._legendButton.checked()) {\n legendPosition = \"none\";\n }\n if (this._prevLegendPosition !== legendPosition) {\n if (this._prevLegendPosition !== \"none\") {\n this.clearContent(this._prevLegendPosition);\n }\n this._prevLegendPosition = legendPosition;\n if (legendPosition !== \"none\") {\n this._legend = new Legend().targetWidget(this.getContent(\"center\").fixedSize(true));\n this.setContent(legendPosition, this._legend);\n this._legend.orientation([\"top\", \"bottom\"].indexOf(legendPosition) !== -1 ? \"horizontal\" : \"vertical\");\n }\n }\n this._contentClasses = this.getContentClasses();\n\n if (this.valueAxisTitle() && this._contentClasses.left !== \"common_Text\") {\n if (legendPosition !== \"left\") {\n this.setContent(\"left\", this._valueTitle.rotation(-90));\n }\n }\n if (this.domainAxisTitle() && this._contentClasses.bottom !== \"common_Text\") {\n if (legendPosition !== \"bottom\") {\n this.setContent(\"bottom\", this._domainTitle).bottomShrinkWrap(true);\n }\n }\n\n this._legend.dataFamily(this._chart.getChartDataFamily());\n\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n getContentClasses() {\n const obj: any = {};\n const t = this.getContent(\"top\");\n const r = this.getContent(\"right\");\n const b = this.getContent(\"bottom\");\n const l = this.getContent(\"left\");\n obj.top = t !== null ? t.classID() : undefined;\n obj.right = r !== null ? r.classID() : undefined;\n obj.bottom = b !== null ? b.classID() : undefined;\n obj.left = l !== null ? l.classID() : undefined;\n return obj;\n }\n\n serializeState() {\n const state: any = {\n title: this.title(),\n data: this.data()\n };\n const chart = this.chart();\n if (chart) {\n if (chart.serializeState) {\n state.chart = chart.serializeState();\n delete state.chart.data;\n }\n }\n return state;\n }\n\n deserializeState(state) {\n if (state) {\n this\n .title(state.title)\n .data(state.data)\n ;\n const chart = this.chart();\n if (chart && state.chart) {\n if (chart.serializeState) {\n chart.deserializeState(state.chart);\n }\n }\n }\n return this;\n }\n\n // Events ---\n click(row, column, selected) {\n }\n\n dblclick(row, column, selected) {\n }\n vertex_click(row, col, sel, more) {\n if (more && more.vertex) {\n // console.log(\"Vertex click: \" + more.vertex.id());\n }\n }\n\n vertex_dblclick(row, col, sel, more) {\n if (more && more.vertex) {\n // console.log(\"Vertex double click: \" + more.vertex.id());\n }\n }\n\n edge_click(row, col, sel, more) {\n if (more && more.edge) {\n // console.log(\"Edge click: \" + more.edge.id());\n }\n }\n\n edge_dblclick(row, col, sel, more) {\n if (more && more.edge) {\n // console.log(\"Edge double click: \" + more.edge.id());\n }\n }\n\n hideRowOnLegendClick: { (): boolean; (_: boolean): MegaChart };\n hideRowOnLegendClick_exists: () => boolean;\n showToolbar: { (): boolean; (_: boolean): MegaChart };\n showToolbar_exists: () => boolean;\n titleFontSize: { (): number; (_: number): MegaChart };\n titleFontSize_exists: () => boolean;\n titleFontColor: { (): string; (_: string): MegaChart };\n titleFontColor_exists: () => boolean;\n titleFontFamily: { (): string; (_: string): MegaChart };\n titleFontFamily_exists: () => boolean;\n titleFontBold: { (): boolean; (_: boolean): MegaChart };\n titleFontBold_exists: () => boolean;\n titleBackgroundColor: { (): string; (_: string): MegaChart };\n titleBackgroundColor_exists: () => boolean;\n maximizedBackgroundColor: { (): string; (_: string): MegaChart };\n maximizedBackgroundColor_exists: () => boolean;\n showChartSelect: { (): boolean; (_: boolean): MegaChart };\n showChartSelect_exists: () => boolean;\n showCSV: { (): boolean; (_: boolean): MegaChart };\n showCSV_exists: () => boolean;\n showCount: { (): boolean; (_: boolean): MegaChart };\n showCount_exists: () => boolean;\n showMaximize: { (): boolean; (_: boolean): MegaChart };\n showMaximize_exists: () => boolean;\n toolbarShowLegend: { (): boolean; (_: boolean): MegaChart };\n toolbarShowLegend_exists: () => boolean;\n showInfoButton: { (): boolean; (_: boolean): MegaChart };\n showInfoButton_exists: () => boolean;\n infoIcon: { (): string; (_: string): MegaChart };\n infoIcon_exists: () => boolean;\n legendPosition: { (): string; (_: string): MegaChart };\n legendPosition_exists: () => boolean;\n\n title: { (): string; (_: string): MegaChart };\n title_exists: () => boolean;\n\n domainAxisTitle: { (): string; (_: string): MegaChart };\n domainAxisTitle_exists: () => boolean;\n valueAxisTitle: { (): string; (_: string): MegaChart };\n valueAxisTitle_exists: () => boolean;\n\n chartType: { (): string; (_: string): MegaChart };\n chartType_exists: () => boolean;\n chart: { (): any; (_: any): MegaChart };\n chart_exists: () => boolean;\n}\nMegaChart.prototype._class += \" composite_MegaChart\";\n\nMegaChart.prototype._1DChartTypes = MultiChart.prototype._1DChartTypes;\nMegaChart.prototype._2DChartTypes = MultiChart.prototype._2DChartTypes;\nMegaChart.prototype._NDChartTypes = MultiChart.prototype._NDChartTypes;\nMegaChart.prototype._anyChartTypes = MultiChart.prototype._anyChartTypes;\nMegaChart.prototype._allChartTypes = MultiChart.prototype._allChartTypes;\n\nMegaChart.prototype.publishReset();\n\nMegaChart.prototype.publish(\"hideRowOnLegendClick\", false, \"boolean\", \"Enable/Disable hiding row on legend clicks\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showToolbar\", true, \"boolean\", \"Enable/Disable Toolbar widget\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publishProxy(\"title\", \"_toolbar\", \"title\");\nMegaChart.prototype.publish(\"ddlParamsFormat\", \"\", \"string\", \"DDL Param Format '{fname}, {lname}'\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleBackgroundColor\", null, \"html-color\", \"Background Color\", null, { tags: [\"Intermediate\"], optional: true });\nMegaChart.prototype.publish(\"maximizedBackgroundColor\", \"#FFFFFF\", \"html-color\", \"Background Color while maximized\", null, { tags: [\"Intermediate\"], optional: true });\n\nMegaChart.prototype.publish(\"showChartSelect\", true, \"boolean\", \"Show/Hide the chartType dropdown in the toolbar\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showCSV\", true, \"boolean\", \"Show/Hide CSV button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showCount\", false, \"boolean\", \"Show/Hide Data Count\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showMaximize\", false, \"boolean\", \"Show/Hide Maximize button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"toolbarShowLegend\", false, \"boolean\", \"Show/Hide Legend button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showInfoButton\", false, \"boolean\", \"Show/Hide Info button in toolbar\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"infoIcon\", \"\\uf05a\", \"string\", \"Help Icon\", null, { tags: [\"Basic\"] });\n\nMegaChart.prototype.publish(\"legendPosition\", \"none\", \"set\", \"Position of the Legend widget\", [\"none\", \"top\", \"right\", \"bottom\", \"left\"], { tags: [\"Basic\"] });\nMegaChart.prototype.publishProxy(\"legendFormat\", \"_legend\", \"rainbowFormat\");\nMegaChart.prototype.publishProxy(\"legendBins\", \"_legend\", \"rainbowBins\");\n\nMegaChart.prototype.publishProxy(\"domainAxisTitle\", \"_domainTitle\", \"text\");\nMegaChart.prototype.publishProxy(\"valueAxisTitle\", \"_valueTitle\", \"text\");\n\nMegaChart.prototype.publishProxy(\"chartType\", \"_chart\", \"chartType\");\nMegaChart.prototype.publishProxy(\"chart\", \"_chart\", \"chart\");\n","import { Platform, Utility, Widget } from \"@hpcc-js/common\";\nimport { Persist } from \"@hpcc-js/other\";\nimport { requireWidget } from \"./Utility.ts\";\n\nexport function retrofit_114_serialization(state, replacement_version) {\n replacement_version = !replacement_version || replacement_version === \"1.14.2-dev\" ? \"1.18.0\" : replacement_version;\n if (!state.__version) return state;\n const state_version_obj = Utility.parseVersionString(state.__version);\n const target_version_obj = Utility.parseVersionString(replacement_version);\n if (state_version_obj.major === 1 && state_version_obj.minor === 14) {\n console.info(\"Upgrading old persist from \" + state.__version + \" to \" + replacement_version);\n let _json_str = JSON.stringify(state);\n _json_str = _json_str.split('\"' + state.__version).join('\"' + replacement_version);\n\n const ret_obj = JSON.parse(_json_str);\n if (ret_obj.__properties && ret_obj.__properties.content) {\n ret_obj.__properties.content.forEach(function (n) {// FOR EACH top tier layout_Cell\n if (JSON.stringify(n).split(\"graph_Graph\").length > 1 && target_version_obj.minor >= 16) {\n n.__properties.widget.__id = n.__properties.widget.__properties.widget.__id;\n n.__properties.widget.__class = \"composite_MegaChart\";\n n.__properties.widget.__properties.showCSV = false;\n n.__properties.widget.__properties.chartType = \"GRAPH\";\n n.__properties.widget.__properties.chart = n.__properties.widget.__properties.widget;\n delete n.__properties.widget.__properties.chart.__id;\n delete n.__properties.widget.__properties.widget;\n }\n if (\"undefined\" === typeof n.__properties.fields) {\n n.__properties.fields = [];\n }\n });\n }\n return ret_obj;\n } else {\n return state;\n }\n}\n\nexport function deserializeFromObject(widget, state) {\n const promises = [];\n Persist.widgetPropertyWalker(widget, null, (w, item) => {\n w[item.id + \"_reset\"]();\n if (state.__properties[item.id] !== undefined) {\n switch (item.type) {\n case \"widget\":\n const widgetKey = item.id;\n promises.push(create(state.__properties[item.id]).then((w2: any) => {\n w2._owner = w;\n w[widgetKey](w2);\n return w2;\n }));\n break;\n case \"widgetArray\":\n case \"propertyArray\":\n const widgetArrayKey = item.id;\n const widgetStateArray = state.__properties[item.id];\n if (widgetStateArray.length) {\n const arrPromises = [];\n for (const widgetState of widgetStateArray) {\n arrPromises.push(create(widgetState).then((widgetItem: any) => {\n widgetItem._owner = w;\n return widgetItem;\n }));\n }\n promises.push(Promise.all(arrPromises).then(widgetArray => {\n w[widgetArrayKey](widgetArray);\n }));\n }\n break;\n default:\n w[item.id](state.__properties[item.id]);\n break;\n }\n }\n });\n return Promise.all(promises).then(widgets => {\n if (state.__data) {\n for (const key in state.__data) {\n if (state.__data.HasOwnProperty(key)) {\n switch (key) {\n case \"data\":\n widget.data(state.__data[key]);\n break;\n default:\n console.warn(\"Unexpected __data item: \" + key);\n widget[key](state.__data[key]);\n break;\n }\n }\n }\n }\n if (state.__state) {\n if (widget.deserializeState) {\n widget.deserializeState(state.__state);\n } else if (state.__state.data && widget.data) {\n widget.data(state.__state.data);\n }\n }\n return widget;\n });\n}\n\nexport function deserialize(widget, state) {\n if (typeof state === \"string\") {\n state = JSON.parse(state);\n }\n if (state.__id && state.__id.indexOf(widget._idSeed) !== 0 && widget._id !== state.__id) {\n console.warn(\"Deserialize: IDs do not match - \" + widget._id);\n }\n deserializeFromObject(widget, state);\n}\n\nexport function create(state: any): Promise<Widget> {\n if (typeof state === \"string\") {\n state = JSON.parse(state);\n }\n state = retrofit_114_serialization(state, Platform.version());\n return requireWidget(state.__class).then((WidgetClass: any) => {\n const widget = new WidgetClass();\n if (state.__id && state.__id.indexOf(widget._idSeed) !== 0 && state.__id.indexOf(\"_pe\") !== 0) {\n widget._id = state.__id;\n }\n return deserializeFromObject(widget, state);\n }).catch(function (e) {\n console.error(\"Persist.create: ***exception***\");\n console.error(e);\n });\n}\n\nexport function clone(widget) {\n create(Persist.serializeToObject(widget, undefined, true, true));\n}\n","export const PKG_NAME = \"@hpcc-js/composite\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n"],"names":["__defProp","Object","defineProperty","__defNormalProp","obj","key","value","enumerable","configurable","writable","__name","target","__publicField","_mergeNamespaces","n","m","i","length","e","Array","isArray","k2","d","getOwnPropertyDescriptor","get","freeze","Symbol","toStringTag","_AbsoluteSurface","_a","HTMLWidget","constructor","super","this","_tag","enter","domNode","element","update","xPos","yPos","width","clientWidth","height","clientHeight","units","widgetX","widgetY","widgetWidth","Number","widgetHeight","style","opacity","widgets","selectAll","_id","data","widget","append","attr","each","merge","resize","exit","remove","AbsoluteSurface","prototype","_class","publish","tags","_Accordion","_b","_isClosed","pushListItem","prepend","protect","contentArr","content","_protected","unshift","push","clearListItems","arr","collapseClick","classed","context","defaultCollapsed","titleSpan","iconDiv","ul","icon","FAChar","size","node","on","render","text","title","rows","li","document","createElement","_target","wSize","cSize","text_colorFill","titleFontColor","char","closedIcon","openIcon","Accordion","_Surface","_c","_surfaceButtons","widgetSize","titleDiv","widgetDiv","calcHeight","calcFrameHeight","calcFrameWidth","element2","surfaceShadow","surfaceBorderWidth_exists","surfaceBorderWidth","surfaceBorderColor","surfaceBorderRadius_exists","surfaceBorderRadius","surfaceBackgroundColor","titles","insert","surfaceTitleAlignment","surfaceTitleFontColor","surfaceTitleFontSize_exists","surfaceTitleFontSize","surfaceTitleFontFamily","surfaceTitleFontBold","surfaceTitleBackgroundColor","surfaceTitlePadding_exists","surfaceTitlePadding","altText_exists","altText","surfaceButtons","select","buttonAnnotations","button","idx","el","class","id","padding","font","click","label","_d","parentElement","classID","split","surfacePadding_exists","surfacePadding","Surface","optional","disable","w","_Cell","_indicateTheseIds","indicateTheseIds","_","arguments","onMouseEnter","onMouseLeave","indicatorOpacity","indicatorBorderColor","indicatorGlowColor","otherElement","otherWidget","datum","Cell","_Border","_e","Utility","debounce","postUpdate","_colCount","_rowCount","_colSize","_rowSize","_shrinkWrapBoxes","sectionTypes","watchWidget","_watch","monitor","paramId","newVal","oldVal","lazyPostUpdate","applyLayoutType","layoutObj","borderLayoutObject","forEach","cell","_fixedLeft","left","_fixedTop","top","_fixedWidth","_fixedHeight","_dragHandles","cellSpecificDragHandles","sectionType","layoutType","retObj","topSize","topPerc","bottomSize","bottomPerc","leftSize","leftPerc","rightSize","rightPerc","bcRect","getBoundingClientRect","bottom","right","SVGElement","parseFloat","getAttribute","indexOf","topPercentage","gutter","bottomPercentage","leftPercentage","rightPercentage","t","_sectionPlacementObject","px","b","l","r","c2","clearContent","splice","contentWidget","hasContent","setContent","getCell","getContent","setLayoutOffsets","_offsetX","_element","_offsetY","dragStart","handle","event","d3Event","sourceEvent","stopPropagation","_dragCell","_dragCellStartSize","handleElm","_handleTop","_handleLeft","_dragPrevX","clientX","_dragPrevY","clientY","dragTick","xDelta","yDelta","_moveHandles","handle2","delta","handles","grabbedHandle","_cellSizes","topHeight","leftHeight","bottomHeight","rightHeight","rightWidth","leftWidth","handle3","dragEnd","getBBox","retVal","apply","contentDiv","_size","_scrollBarWidth","Platform","getScrollbarWidth","_borderHandles","_sectionTypeArr","designMode","rowsUpdate","drag$1","drag","call","_placeholderElement","getCellSizes","contentRect","rect","prevBox","currBox","lazyRender","Border","_WidgetDiv","_f","div","_div","overlay","_overlay","overflowX","_overflowX","overflowY","_overflowY","_widget","availableHeight","availableWidth","renderPromise","then","visible","x","y","Promise","resolve","WidgetDiv","_Border2","_g","topElement","_bodyElement","centerElement","leftElement","rightElement","bottomElement","_topWA","_centerWA","_leftWA","_rightWA","_bottomWA","showTop","showRight","showBottom","showLeft","topOverflowX","rightOverflowX","bottomOverflowX","leftOverflowX","topOverflowY","rightOverflowY","bottomOverflowY","leftOverflowY","targetNull","center","swap","sectionA","sectionB","a2","callback","topOverlay","async","topBBox","bottomBBox","leftBBox","rightBBox","bottomHeight_exists","bodyWidth","bodyHeight","centerOverflowX","centerOverflowY","scrollCenterX","scrollCenterY","promises","all","promises2","Border2","_Carousel","_h","activeWidget","active","_root","widgetElements","_prevActive","transition","duration","transitionDuration","isDOMHidden","aw","w2","Carousel","pi$1","Math","PI","tau$1","epsilon","tauEpsilon","Path","_x0","_y0","_x1","_y1","path","constant","moveTo","closePath","lineTo","quadraticCurveTo","x1","y1","bezierCurveTo","x2","y2","arcTo","x0","y0","x21","y21","x01","y01","l01_2","Error","abs","x20","y20","l21_2","l20_2","l21","sqrt","l01","tan","acos","t01","t21","arc","a0","a1","ccw","dx","cos","dy","sin","cw","da","h","toString","pi","tau","d3SymbolCircle","draw","d3SymbolCross","tan30","tan30_2","d3SymbolDiamond","kr","kx","ky","d3SymbolStar","s2","d3SymbolSquare","sqrt3","d3SymbolTriangle","c","s","k","a","d3SymbolWye","d3Symbol","type","symbol","buffer","_typeof","iterator","d3_identity","d3_reverse","mirror","d3_textWrapping","word","text2","words","reverse","line","tspan","pop","join","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","labelDelimiter","customLabels","genLength","_i","generatedLabels","d3_linearLegend","scale","cells","labelFormat","increment","map","feature","d3_quantLegend","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","d3_cellOut","d3_cellClick","helper","d3_drawShapes","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path2","d3_addText","svg","classPrefix","labelWidth","d3_calcType","ascending","ticks","d3_filterCells","cellFilter","filterCells","filter","dataValues","labelValues","d3_placement","orient","cellTrans","textTrans","labelAlign","d3_addEvents","dispatcher","d3_title","titleWidth","cellsSvg","yOffset","nodes","xOffset","d3_defaultLocale","format","formatPrefix","d3_defaultFormatSpecifier","d3_defaultDelimiter","color","scaleLinear","shapePadding","useClass","locale","specifier","labelOffset","labelWrap","legendDispatcher","dispatch","legend","cellEnter","textSize","shapeSize","cellSize","textAlign","max","sum","slice","formatLocale","formatSpecifier","toLowerCase","textWrap","_Legend","SVGWidget","owner","circle","cross","diamond","square","star","triangle","wye","_owner","_drawStartPos","_legendOrdinal","onClick","onOver","onOut","isDisabled","_disabled","Database","Field","filteredFields","dataFamily","fields","filteredColumns","columns","filteredData","row","disabledCols","anyDisabled","col","disabled","isRainbow","getWidget","_palette","targetWidget","_targetWidget","_targetWidgetMonitor","newProp","oldProp","source","chart","getPalette","Palette","ordinal","rainbow","getPaletteType","fillColorFunc","fillColor","paletteID","name","switch","sel","palette","calcMetaData","dataArr","total","maxLabelWidth","colLength","val","reduce","acc","n2","showSeriesTotal","format$1","rainbowFormat","steps","rainbowBins","weightMin","_dataMinWeight","weightMax","_dataMaxWeight","stepWeightDiff","mid","floor","parseInt","radius","radiusToSymbolSize","itemPadding","orientation","scaleOrdinal","_symbolTypeMap","symbolType","labelMaxWidth","updateDisabled","legendCellsBbox","offsetX","offsetY","_containerSize","pos","legendTotal","showLegendTotal","totalText","totalOffsetX","totalOffsetY","enableOverflowScroll","enableOverflow","_boundingBox","_parentRelativeDiv","circleSize","pow","disabledIdx","refreshColumns","refreshData","instanceOfIHighlight","highlightColumn","onDblClick","rowData","rowIdx","onMouseOver","fitToContent","bbox","Legend","_Modal","_j","closeModal","getRelativeTarget","relativeTarget","relativeTargetId","getElementById","locateAncestor","body","setModalSize","fixedHeight","fixedWidth","_modal","minHeight","minWidth","maxHeight","maxWidth","modalRect","headerRect","_modalHeader","_modalBody","setFadePosition","_fade","setModalPosition","fixedTop","fixedLeft","resizeBodySync","enableClickFadeToClose","showFade","header_h","titleFontSize","formattedTitle","_modalHeaderAnnotations","_modalHeaderCloseButton","html","show","_relativeTarget","title_exists","trim","Modal","_ChartPanel","_k","ProgressBar","tiny","small","ToggleButton","faChar","tooltip","selected","description","_toggleInfo","Text","origCloseFunc","_close","dataVisible","_toggleData","Button","downloadCSV","downloadPNG","_toggleLegend","legendPosition","legendVisible","Spacer","TitleBar","buttons","_buttonDownload","_buttonDownloadImage","_spacer","Table","_legend","refreshFields","_table","asDefault","highlight","_highlight","startProgress","_progressBar","start","finishProgress","finish","_titleBar","namePrefix","downloadTitle","nameSuffix","downloadTimestampSuffix","timestamp","downloadString","export","column","cssTag","getResponsiveMode","enableAutoscaling","_autoScale","_resolutions","setOrigSize","_orig_size","JSON","parse","stringify","_carousel","preUpdateTiny","preUpdateSmall","scale_x","scale_y","_scale","min","x_is_smaller","preUpdateRegular","preUpdate","_prevLegendPosition","_prevdataVisible","_prevlegendVisible","_dataFamily","_prevChartDataFamily","highlightSize","highlightColor","_hideLegendToggleList","_prevChart","widgetIconBar","IconBar","_prevButtons","hiddenButtons","dataButtonVisible","downloadButtonVisible","downloadImageButtonVisible","legendButtonVisible","enabled","titleVisible","titleOverlay","postUpdateTiny","postUpdateSmall","postUpdateRegular","titleIconFontSize","_node","containerRect","icon_top","parentRect","_prevPos","dblclick","vertex_click","more","vertex","vertex_dblclick","edge_click","edge","edge_dblclick","ChartPanel","publishReset","publishProxy","tmpAny","_FlexGrid","_l","parentNode","cachedSizes","updateFlexParent","listItems","itemMinHeight","itemMinWidth","flexBasis","widgetsFlexBasis","flexGrow","widgetsFlexGrow","borderWidth","itemBorderColor","firstChild","display","flexWrap","alignItems","alignContent","forceXScroll","disableScroll","forceYScroll","FlexGrid","globalThis","window","global","self","getDefaultExportFromCjs","__esModule","hasOwnProperty","gridList$1","exports","GridList2","items","options","_options","defaults","_adjustSizeOfItems","generateGrid","cloneItems","_items","lanes","direction","item","j","widthOfGrid","grid","output","border","_padNumber","_resetGrid","_markItemPositionToGrid","resizeGrid","currentColumn","_sortItemsByPosition","position","_getItemPosition","_updateItemPosition","findPositionForItem","_pullItemsToLeft","fixedRow","_itemFitsAtPosition","newCol","newRow","moveItemToPosition","newPosition","_resolveCollisions","resizeItem","_updateItemSize","getChangedItems","initialItems","idAttribute","changedItems","_getItemByAttribute","sort","item1","item2","position1","position2","bind","autoSize","_deleteItemPositionFromGrid","_setItemPosition","_ensureColumns","N","GridCol","_getItemsCollidingWithItem","collidingItems","_itemsAreColliding","_tryToResolveCollisionsLocally","leftOfItem","rightOfItem","aboveOfItem","belowOfItem","_gridList","collidingItem","collidingPosition","fixedItem","fixedPosition","_findLeftMostPositionForItem","tail","otherItem","otherPosition","nr","prefix","factory","gridListExports","gridList","_GridList","__proto__","default","GridList","_Grid","_m","_selectionBag","Selection","getDimensions","gridCol","gridColSpan","gridRow","gridRowSpan","rowSpan","colSpan","sortedContent","some","getWidgetCell","cellToGridItem","gridItemToCell","resetItemsPos","origItems","origItem","itemsMap","initGridList","snapping","snappingRows","snappingColumns","killGridList","_d3Drag","subject","cellWidth","cellHeight","dragItem","selectionBagClick","updateGrid","_d3DragResize","dragItemPos","round","_noRender","divItems","surfaceShadow_default","surfacePadding_default","surfaceBorderWidth_default","surfaceBackgroundColor_default","fitTo","dimensions","cellLaneRatio","laneWidth","__grid_watch","_renderCount","lanesBackground","selectionBagClear","showLanes","_createSelectionObject","selection","set","isEmpty","clear","postSelectionChange","selectionObj","ctrlKey","isSelected","applyLayout","layoutArr","vizActivation","elem","Grid","_HorizontalList","_n","orientation_default","flexWrap_default","_Layered","_o","_widgetPlacements","_widgetRatios","addLayer","placement","widthRatio","heightRatio","_contentContainer","clientSize","widgetPosition","order","Layered","_Popup","_p","updateState","popupState","_originalPosition","shrinkWrap","centerPopup","innerWidth","innerHeight","Popup","_Tabbed","_q","clearTabs","addTab","isActive","activeTabIdx","surface","tcBox","_tabContainer","tabs","showTabs","tabLocation","offsetHeight","Tabbed","_Toolbar","_r","backgroundColor","fontSize_exists","fontSize","fontColor_exists","fontColor","fontFamily_exists","fontFamily","fontBold_exists","fontBold","backgroundColor_exists","childWidgets","widgetClass","widgetClasses","toolbarBBox","minX","childBBox","Toolbar","_VerticalList","_s","requireWidget","_reject","parsedClassID","parseClassID","require","package","Package","Widget","widgetID","memberWidgetID","requireWidgets","classIDs","o","appendChild","createTextNode","head","console","error","_MultiChart","INDChart","IGraph","_allCharts","_allChartTypes","newItem","_chartTypeDefaults","_chartTypeProperties","hasOverlay","chartTypeDefaults","chartTypeProperties","getChartDataFamily","chartType","family","requireContent","classInfo","import","mod","WidgetClass","switchChart","_switchingTo","warn","oldContent","newContent","currChart","propKey","_chartMonitor","_callback","args","MultiChart","implements","_otherChartTypes","_graphChartTypes","_1DChartTypes","_2DChartTypes","_NDChartTypes","_mapChartTypes","_anyChartTypes","concat","_allMap","d3Map","_allFamilies","keys","_allChartTypesMap","_allChartTypesByClass","widgetPath","_origChart","_row","_column","_selected","broadcast","_Summary","_MultiChartPanel","multiChart","MultiChartPanel","_Dermatology","_toolbar","_propEditor","PropertyEditor","show_settings","showProperties","_showProperties","toggleProperties","_propsButton","OnOff","showToolbar","_prevWidget","Dermatology","_MegaChart","_chart","toolbarWidgets","topShrinkWrap","_dataCount","Html","_csvButton","_infoButton","infoIcon","_maximizeButton","buttonWidget","isMaximized","d3Select","parentGrid","targetElement","targetParentBox","targetPaddingTop","getComputedStyle","getPropertyValue","replace","targetPaddingLeft","targetPaddingRight","targetPaddingBottom","__old_position","__old_zindex","__old_backgroundColor","__old_boxshadow","zIndex","boxShadow","gridTarget","gridBox","gridPaddingTop","gridPaddingLeft","gridPaddingRight","gridPaddingBottom","maximizedBackgroundColor","_legendButton","Input","inlineLabel","_chartTypeSelect","Select","selectOptions","change","fixedSize","valueAxisTitle","_valueTitle","rotation","leftShrinkWrap","domainAxisTitle","_domainTitle","bottomShrinkWrap","showHideButton","twArr2","hideRowOnLegendClick","twArr","showCSV","showMaximize","toolbarShowLegend","showChartSelect","showInfoButton","showCount","_prevShowToolbar","titleFontFamily","titleFontBold","titleBackgroundColor","checked","_contentClasses","getContentClasses","serializeState","state","deserializeState","MegaChart","retrofit_114_serialization","replacement_version","__version","state_version_obj","parseVersionString","target_version_obj","major","minor","info","_json_str","ret_obj","__properties","__id","__class","deserializeFromObject","Persist","widgetPropertyWalker","widgetKey","create","widgetArrayKey","widgetStateArray","arrPromises","widgetState","widgetItem","widgetArray","__data","HasOwnProperty","__state","deserialize","_idSeed","version","catch","clone","serializeToObject"],"mappings":"0yBAAA,IAAIA,EAAYC,OAAOC,eACnBC,KAAmBC,EAAKC,EAAKC,IAAUD,KAAOD,EAAMJ,EAAUI,EAAKC,EAAK,CAAEE,YAAY,EAAMC,cAAc,EAAMC,UAAU,EAAMH,UAAWF,EAAIC,GAAOC,EAApI,mBAClBI,EAASA,EAAA,CAACC,EAAQL,IAAUN,EAAUW,EAAQ,OAAQ,CAAEL,QAAOE,cAAc,IAApE,UACTI,EAAgBF,EAAA,CAACN,EAAKC,EAAKC,IAAUH,EAAgBC,EAAoB,iBAARC,EAAmBA,EAAM,GAAKA,EAAKC,GAApF,iBAIpB,SAASO,EAAiBC,EAAGC,GAC3B,IAAA,IAASC,EAAI,EAAGA,EAAID,EAAEE,OAAQD,IAAK,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C5D6Y,GAAU1oC,UAAU6vB,aAAa,aAAc,UAAW,eAE1D6Y,GAAU1oC,UAAU6vB,aAAa,kBAAmB,eAAgB,QACpE6Y,GAAU1oC,UAAU6vB,aAAa,iBAAkB,cAAe,QAElE6Y,GAAU1oC,UAAU6vB,aAAa,YAAa,SAAU,aACxD6Y,GAAU1oC,UAAU6vB,aAAa,QAAS,SAAU,SCnfpCrzB,EAAAmsC,GAAA,8BAiCAnsC,EAAAitC,GAAA,yBAgEAjtC,EAAA+tC,GAAA,eAUA/tC,EAAAqtC,GAAA,UAiBArtC,EAAAmuC,GAAA,sNC9Ha,wFAFL,mCACG"}
1
+ {"version":3,"file":"index.umd.cjs","sources":["../../layout/dist/index.js","../src/Utility.ts","../src/MultiChart.ts","../src/ChartPanel.ts","../src/Dermatology.ts","../src/MegaChart.ts","../src/Persist.ts","../src/__package__.ts"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nimport { HTMLWidget, FAChar, select, selectAll, Utility, d3Event, Platform, drag, scaleLinear, dispatch, formatPrefix, format, formatLocale, formatSpecifier, sum, SVGWidget, Database, Palette, scaleOrdinal, ProgressBar, ToggleButton, Text, Button, Spacer, TitleBar, IconBar } from \"@hpcc-js/common\";\nimport { Table } from \"@hpcc-js/dgrid\";\nimport { instanceOfIHighlight } from \"@hpcc-js/api\";\nfunction _mergeNamespaces(n, m) {\n for (var i = 0; i < m.length; i++) {\n const e = m[i];\n if (typeof e !== \"string\" && !Array.isArray(e)) {\n for (const k2 in e) {\n if (k2 !== \"default\" && !(k2 in n)) {\n const d = Object.getOwnPropertyDescriptor(e, k2);\n if (d) {\n Object.defineProperty(n, k2, d.get ? d : {\n enumerable: true,\n get: /* @__PURE__ */ __name(() => e[k2], \"get\")\n });\n }\n }\n }\n }\n }\n return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }));\n}\n__name(_mergeNamespaces, \"_mergeNamespaces\");\nconst PKG_NAME = \"@hpcc-js/layout\";\nconst PKG_VERSION = \"3.1.1\";\nconst BUILD_VERSION = \"3.2.1\";\nconst _AbsoluteSurface = class _AbsoluteSurface extends HTMLWidget {\n constructor() {\n super();\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element) {\n super.update(domNode, element);\n let xPos = 0;\n let yPos = 0;\n let width = this.clientWidth();\n let height = this.clientHeight();\n switch (this.units()) {\n case \"pixels\":\n xPos = this.widgetX();\n yPos = this.widgetY();\n width = this.widgetWidth() === \"\" ? width - xPos : Number(this.widgetWidth());\n height = this.widgetHeight() === \"\" ? height - yPos : Number(this.widgetHeight());\n break;\n case \"percent\":\n xPos = this.widgetX() * width / 100;\n yPos = this.widgetY() * height / 100;\n width = this.widgetWidth() === \"\" ? width - xPos : Number(this.widgetWidth()) * width / 100;\n height = this.widgetHeight() === \"\" ? height - yPos : Number(this.widgetHeight()) * height / 100;\n break;\n }\n element.style(\"opacity\", this.opacity());\n const widgets = element.selectAll(\"#\" + this._id + \" > .placeholder\").data(this.widget() ? [this.widget()] : [], function(d) {\n return d._id;\n });\n widgets.enter().append(\"div\").attr(\"class\", \"placeholder\").each(function(d) {\n d.target(this);\n }).merge(widgets).style(\"left\", xPos + \"px\").style(\"top\", yPos + \"px\").style(\"width\", width + \"px\").style(\"bottom\", height + \"px\").each(function(d) {\n d.resize({ width, height });\n });\n widgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n};\n__name(_AbsoluteSurface, \"AbsoluteSurface\");\nlet AbsoluteSurface = _AbsoluteSurface;\nAbsoluteSurface.prototype._class += \" layout_AbsoluteSurface\";\nAbsoluteSurface.prototype.publish(\"units\", \"percent\", \"set\", \"Units\", [\"pixels\", \"percent\"]);\nAbsoluteSurface.prototype.publish(\"widgetX\", 0, \"number\", \"Widget XPos\");\nAbsoluteSurface.prototype.publish(\"widgetY\", 0, \"number\", \"Widget YPos\");\nAbsoluteSurface.prototype.publish(\"widgetWidth\", \"100\", \"string\", \"Widget Width, omit for full\");\nAbsoluteSurface.prototype.publish(\"widgetHeight\", \"100\", \"string\", \"Widget Height, omit for full\");\nAbsoluteSurface.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Private\"] });\nAbsoluteSurface.prototype.publish(\"opacity\", 1, \"number\", \"Opacity\");\nconst _Accordion = class _Accordion extends HTMLWidget {\n _isClosed;\n titleSpan;\n iconDiv;\n ul;\n icon;\n constructor() {\n super();\n this._tag = \"div\";\n this._isClosed = false;\n }\n pushListItem(widget, prepend = false, protect = false) {\n const contentArr = this.content();\n widget._protected = protect;\n if (prepend) {\n contentArr.unshift(widget);\n } else {\n contentArr.push(widget);\n }\n this.content(contentArr);\n return this;\n }\n clearListItems() {\n const arr = [];\n for (const i in this.content()) {\n if (this.content()[i]._protected) {\n arr.push(this.content()[i]);\n }\n }\n this.content(arr);\n return this;\n }\n collapseClick(element) {\n if (element.classed(\"closed\")) {\n this._isClosed = false;\n element.classed(\"open\", true);\n element.classed(\"closed\", false);\n } else {\n this._isClosed = true;\n element.classed(\"open\", false);\n element.classed(\"closed\", true);\n }\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n this._isClosed = this.defaultCollapsed();\n element.classed(this._isClosed ? \"closed\" : \"open\", true);\n this.titleSpan = element.append(\"span\").classed(\"collapsible-title\", true);\n this.iconDiv = element.append(\"div\").classed(\"collapsible-icon\", true);\n this.ul = element.append(\"ul\");\n this.icon = new FAChar().size({ height: 24, width: 24 }).target(this.iconDiv.node());\n this.iconDiv.on(\"click\", function() {\n context.collapseClick(element);\n context.render();\n });\n this.titleSpan.on(\"click\", function() {\n context.collapseClick(element);\n context.render();\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n const this_id = \"\";\n this.titleSpan.text(context.title().length > 0 ? context.title() + this_id : \"Accordion [\" + context._id + \"]\" + this_id);\n const rows = this.ul.selectAll(\"#\" + context._id + \" > ul > li\").data(this.content(), function(d) {\n return d._id;\n });\n rows.enter().append(function(widget) {\n const li = document.createElement(\"li\");\n if (widget._target === null) {\n const wSize = widget.size();\n if (wSize.width === 0 || wSize.height === 0) {\n const cSize = context.size();\n widget.size({\n width: cSize.width,\n height: cSize.width\n });\n }\n widget.target(li);\n } else {\n return widget._target;\n }\n return li;\n });\n rows.exit().remove();\n this.icon.text_colorFill(this.titleFontColor()).char(this._isClosed ? this.closedIcon() : this.openIcon()).render();\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n};\n__name(_Accordion, \"Accordion\");\nlet Accordion = _Accordion;\nAccordion.prototype._class += \" layout_Accordion\";\nAccordion.prototype.publish(\"content\", [], \"widgetArray\", \"Array of widgets\", null, { tags: [\"Basic\"] });\nAccordion.prototype.publish(\"title\", \"\", \"string\", \"Title of collapsible section\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"openIcon\", \"\", \"string\", \"Icon to display when list is open\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"closedIcon\", \"\", \"string\", \"Icon to display when list is closed\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"titleFontColor\", \"#FFFFFF\", \"html-color\", \"Title font color\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"titleBackgroundColor\", \"#333333\", \"html-color\", \"Title background color\", null, { tags: [\"Private\"] });\nAccordion.prototype.publish(\"defaultCollapsed\", false, \"boolean\", \"Collapsed by default if true\", null, { tags: [\"Private\"] });\nconst _Surface = class _Surface extends HTMLWidget {\n _surfaceButtons;\n constructor() {\n super();\n this._tag = \"div\";\n this._surfaceButtons = [];\n }\n widgetSize(titleDiv, widgetDiv) {\n let width = this.clientWidth();\n let height = this.clientHeight();\n if (this.title()) {\n height -= this.calcHeight(titleDiv);\n }\n height -= this.calcFrameHeight(widgetDiv);\n width -= this.calcFrameWidth(widgetDiv);\n return { width, height };\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element2) {\n super.update(domNode, element2);\n const context = this;\n element2.classed(\"shadow2\", this.surfaceShadow()).style(\"border-width\", this.surfaceBorderWidth_exists() ? this.surfaceBorderWidth() + \"px\" : null).style(\"border-color\", this.surfaceBorderColor()).style(\"border-radius\", this.surfaceBorderRadius_exists() ? this.surfaceBorderRadius() + \"px\" : null).style(\"background-color\", this.surfaceBackgroundColor());\n const titles = element2.selectAll(\".surfaceTitle\").data(this.title() ? [this.title()] : []);\n titles.enter().insert(\"h3\", \"div\").attr(\"class\", \"surfaceTitle\").merge(titles).text(function(d) {\n return d;\n }).style(\"text-align\", this.surfaceTitleAlignment()).style(\"color\", this.surfaceTitleFontColor()).style(\"font-size\", this.surfaceTitleFontSize_exists() ? this.surfaceTitleFontSize() + \"px\" : null).style(\"font-family\", this.surfaceTitleFontFamily()).style(\"font-weight\", this.surfaceTitleFontBold() ? \"bold\" : \"normal\").style(\"background-color\", this.surfaceTitleBackgroundColor()).style(\"padding\", this.surfaceTitlePadding_exists() ? this.surfaceTitlePadding() + \"px\" : null).style(\"title\", this.altText_exists() ? this.altText() : null);\n titles.exit().remove();\n const surfaceTitle = element2.select(\".surfaceTitle\");\n const surfaceButtons = surfaceTitle.append(\"div\").attr(\"class\", \"html-button-container\").selectAll(\".surface-button\").data(this.buttonAnnotations());\n surfaceButtons.enter().append(\"button\").classed(\"surface-button\", true).each(function(button, idx) {\n const el = context._surfaceButtons[idx] = select(this).attr(\"class\", \"surface-button\" + (button.class ? \" \" + button.class : \"\")).attr(\"id\", button.id).style(\"padding\", button.padding).style(\"width\", button.width).style(\"height\", button.height).style(\"cursor\", \"pointer\");\n if (button.font === \"FontAwesome\") {\n el.style(\"background\", \"transparent\").style(\"border\", \"none\").on(\"click\", function(d) {\n context.click(d);\n }).append(\"i\").attr(\"class\", \"fa\").text(function() {\n return button.label;\n });\n } else {\n el.text(function() {\n return button.label;\n }).on(\"click\", function(d) {\n context.click(d);\n });\n }\n });\n surfaceButtons.exit().each(function(_d, idx) {\n const element = select(this);\n delete context._surfaceButtons[idx];\n element.remove();\n });\n const widgets = element2.selectAll(\"#\" + this._id + \" > .surfaceWidget\").data(this.widget() ? [this.widget()] : [], function(d) {\n return d._id;\n });\n widgets.enter().append(\"div\").attr(\"class\", \"surfaceWidget\").each(function(d) {\n select(context.element().node().parentElement).classed(\"content-icon content-icon-\" + d.classID().split(\"_\")[1], true);\n d.target(this);\n }).merge(widgets).style(\"padding\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null).each(function(d) {\n const widgetSize = context.widgetSize(element2.select(\"h3\"), select(this));\n if (widgetSize.width < 0) widgetSize.width = 0;\n if (widgetSize.height < 0) widgetSize.height = 0;\n d.resize({ width: widgetSize.width, height: widgetSize.height });\n });\n widgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n // Events ---\n click(obj) {\n }\n};\n__name(_Surface, \"Surface\");\nlet Surface = _Surface;\nSurface.prototype._class += \" layout_Surface\";\nSurface.prototype.publish(\"title\", \"\", \"string\", \"Title\", null, { tags: [\"Intermediate\"] });\nSurface.prototype.publish(\"altText\", null, \"string\", \"Alt text\", null, { optional: true });\nSurface.prototype.publish(\"surfaceTitlePadding\", null, \"number\", \"Title Padding (px)\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleFontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleBackgroundColor\", null, \"html-color\", \"Title Background Color\", null, { tags: [\"Advanced\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceTitleAlignment\", \"center\", \"set\", \"Title Alignment\", [\"left\", \"right\", \"center\"], { tags: [\"Basic\"], disable: /* @__PURE__ */ __name((w) => !w.title(), \"disable\") });\nSurface.prototype.publish(\"surfaceShadow\", false, \"boolean\", \"3D Shadow\");\nSurface.prototype.publish(\"surfacePadding\", null, \"string\", \"Surface Padding (px)\", null, { tags: [\"Intermediate\"] });\nSurface.prototype.publish(\"surfaceBackgroundColor\", null, \"html-color\", \"Surface Background Color\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderWidth\", null, \"number\", \"Surface Border Width (px)\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderColor\", null, \"html-color\", \"Surface Border Color\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"surfaceBorderRadius\", null, \"number\", \"Surface Border Radius (px)\", null, { tags: [\"Advanced\"] });\nSurface.prototype.publish(\"buttonAnnotations\", [], \"array\", \"Button Array\", null, { tags: [\"Private\"] });\nSurface.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Basic\"] });\nconst _Cell = class _Cell extends Surface {\n _indicateTheseIds;\n constructor() {\n super();\n this._indicateTheseIds = [];\n }\n indicateTheseIds(_) {\n if (!arguments.length) return this._indicateTheseIds;\n this._indicateTheseIds = _;\n return this;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n element.classed(\"layout_Surface\", true).on(\"mouseenter\", function() {\n context.onMouseEnter();\n }).on(\"mouseleave\", function() {\n context.onMouseLeave();\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n }\n onMouseEnter() {\n const arr = this.indicateTheseIds();\n const opacity = this.indicatorOpacity();\n const indicatorBorderColor = this.indicatorBorderColor();\n const indicatorGlowColor = this.indicatorGlowColor();\n for (let i = 0; i < arr.length; i++) {\n const otherElement = select(\"#\" + arr[i]);\n const otherWidget = otherElement.datum();\n if (otherElement && otherWidget) {\n otherElement.append(\"div\").attr(\"class\", \"update-indicator\").style(\"width\", otherWidget.width() + \"px\").style(\"height\", otherWidget.height() + \"px\").style(\"opacity\", opacity).style(\"border-color\", indicatorBorderColor).style(\"-webkit-box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor).style(\"-moz-box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor).style(\"box-shadow\", \"inset 0px 0px 30px 0px \" + indicatorGlowColor);\n }\n }\n }\n onMouseLeave() {\n const arr = this.indicateTheseIds();\n for (let i = 0; i < arr.length; i++) {\n selectAll(\"#\" + arr[i] + \" > div.update-indicator\").remove();\n }\n }\n};\n__name(_Cell, \"Cell\");\nlet Cell = _Cell;\nCell.prototype._class += \" layout_Cell\";\nCell.prototype.publish(\"gridRow\", 0, \"number\", \"Grid Row Position\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridCol\", 0, \"number\", \"Grid Column Position\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridRowSpan\", 1, \"number\", \"Grid Row Span\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"gridColSpan\", 1, \"number\", \"Grid Column Span\", null, { tags: [\"Private\"] });\nCell.prototype.publish(\"indicatorGlowColor\", \"#EEEE11\", \"html-color\", \"Glow color of update-indicator\", null, { tags: [\"Basic\"] });\nCell.prototype.publish(\"indicatorBorderColor\", \"#F48A00\", \"html-color\", \"Border color of update-indicator\", null, { tags: [\"Basic\"] });\nCell.prototype.publish(\"indicatorOpacity\", 0.8, \"number\", \"Opacity of update-indicator\", null, { tags: [\"Basic\"] });\nconst _Border = class _Border extends HTMLWidget {\n _colCount;\n _rowCount;\n _colSize;\n _rowSize;\n _shrinkWrapBoxes;\n _watch;\n _offsetX;\n _offsetY;\n _dragCell;\n _dragCellSize;\n _dragCellStartSize;\n _handleTop;\n _handleLeft;\n _dragPrevX;\n _dragPrevY;\n _cellSizes;\n contentDiv;\n _scrollBarWidth;\n _borderHandles;\n _sectionTypeArr;\n constructor() {\n super();\n this._tag = \"div\";\n this._colCount = 0;\n this._rowCount = 0;\n this._colSize = 0;\n this._rowSize = 0;\n this._shrinkWrapBoxes = {};\n this.content([]);\n this.sectionTypes([]);\n }\n watchWidget(widget) {\n if (this._watch === void 0) {\n this._watch = {};\n }\n if (this._watch[widget.id()]) {\n this._watch[widget.id()].remove();\n delete this._watch[widget.id()];\n }\n if (widget) {\n const context = this;\n this._watch[widget.id()] = widget.monitor(function(paramId, newVal, oldVal) {\n if (oldVal !== newVal) {\n context.lazyPostUpdate();\n }\n });\n }\n }\n lazyPostUpdate = Utility.debounce(function() {\n this.postUpdate();\n }, 100);\n applyLayoutType() {\n const layoutObj = this.borderLayoutObject();\n this.content().forEach(function(cell, i) {\n cell._fixedLeft = layoutObj[this.sectionTypes()[i]].left;\n cell._fixedTop = layoutObj[this.sectionTypes()[i]].top;\n cell._fixedWidth = layoutObj[this.sectionTypes()[i]].width;\n cell._fixedHeight = layoutObj[this.sectionTypes()[i]].height;\n cell._dragHandles = this.cellSpecificDragHandles(this.sectionTypes()[i]);\n }, this);\n }\n cellSpecificDragHandles(sectionType) {\n switch (sectionType) {\n case \"top\":\n return [\"s\"];\n case \"right\":\n return [\"w\"];\n case \"bottom\":\n return [\"n\"];\n case \"left\":\n return [\"e\"];\n case \"center\":\n return [];\n }\n }\n borderLayoutObject(layoutType) {\n const retObj = {};\n const context = this;\n let topSize;\n let topPerc;\n let bottomSize;\n let bottomPerc;\n let leftSize;\n let leftPerc;\n let rightSize;\n let rightPerc;\n const bcRect = this.target().getBoundingClientRect();\n bcRect.top;\n bcRect.left;\n bcRect.bottom;\n bcRect.right;\n if (this.target() instanceof SVGElement) {\n parseFloat(this.target().getAttribute(\"width\"));\n parseFloat(this.target().getAttribute(\"height\"));\n } else {\n bcRect.width;\n bcRect.height;\n }\n if (this.sectionTypes().indexOf(\"top\") !== -1) {\n topSize = this.topSize();\n topPerc = this.topPercentage();\n if (typeof this._shrinkWrapBoxes[\"top\"] !== \"undefined\") {\n topSize = this._shrinkWrapBoxes[\"top\"].height + this.gutter();\n topPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"bottom\") !== -1) {\n bottomSize = this.bottomSize();\n bottomPerc = this.bottomPercentage();\n if (typeof this._shrinkWrapBoxes[\"bottom\"] !== \"undefined\") {\n bottomSize = this._shrinkWrapBoxes[\"bottom\"].height + this.gutter();\n bottomPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"left\") !== -1) {\n leftSize = this.leftSize();\n leftPerc = this.leftPercentage();\n if (typeof this._shrinkWrapBoxes[\"left\"] !== \"undefined\") {\n leftSize = this._shrinkWrapBoxes[\"left\"].width + this.gutter();\n leftPerc = 0;\n }\n }\n if (this.sectionTypes().indexOf(\"right\") !== -1) {\n rightSize = this.rightSize();\n rightPerc = this.rightPercentage();\n if (typeof this._shrinkWrapBoxes[\"right\"] !== \"undefined\") {\n rightSize = this._shrinkWrapBoxes[\"right\"].width + this.gutter();\n rightPerc = 0;\n }\n }\n const t = _sectionPlacementObject({\n width: { \"px\": 0, \"%\": 100 },\n height: { \"px\": topSize, \"%\": topPerc },\n top: { \"px\": 0, \"%\": 0 },\n left: { \"px\": 0, \"%\": 0 }\n });\n const b = _sectionPlacementObject({\n width: { \"px\": 0, \"%\": 100 },\n height: { \"px\": bottomSize, \"%\": bottomPerc },\n top: { \"px\": 0, \"%\": 100 },\n left: { \"px\": 0, \"%\": 0 }\n });\n b.top -= b.height;\n const l = _sectionPlacementObject({\n width: { \"px\": leftSize, \"%\": leftPerc },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": 0, \"%\": 0 }\n });\n const r = _sectionPlacementObject({\n width: { \"px\": rightSize, \"%\": rightPerc },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": 0, \"%\": 100 }\n });\n r.left -= r.width;\n const c2 = _sectionPlacementObject({\n width: { \"px\": -r.width - l.width, \"%\": 100 },\n height: { \"px\": -t.height - b.height, \"%\": 100 },\n top: { \"px\": t.height, \"%\": 0 },\n left: { \"px\": l.width, \"%\": 0 }\n });\n retObj[\"top\"] = t;\n retObj[\"bottom\"] = b;\n retObj[\"right\"] = r;\n retObj[\"left\"] = l;\n retObj[\"center\"] = c2;\n return retObj;\n function _sectionPlacementObject(obj) {\n obj.width[\"px\"] = typeof obj.width[\"px\"] !== \"undefined\" ? obj.width[\"px\"] : 0;\n obj.width[\"%\"] = typeof obj.width[\"%\"] !== \"undefined\" ? obj.width[\"%\"] : 0;\n obj.height[\"px\"] = typeof obj.height[\"px\"] !== \"undefined\" ? obj.height[\"px\"] : 0;\n obj.height[\"%\"] = typeof obj.height[\"%\"] !== \"undefined\" ? obj.height[\"%\"] : 0;\n const ret = {\n width: obj.width[\"px\"] + obj.width[\"%\"] / 100 * context.width(),\n height: obj.height[\"px\"] + obj.height[\"%\"] / 100 * context.height(),\n top: obj.top[\"px\"] + obj.top[\"%\"] / 100 * context.height() + context.gutter() / 2,\n left: obj.left[\"px\"] + obj.left[\"%\"] / 100 * context.width() + context.gutter() / 2\n };\n return ret;\n }\n __name(_sectionPlacementObject, \"_sectionPlacementObject\");\n }\n clearContent(sectionType) {\n if (!sectionType) {\n this.content().forEach(function(contentWidget) {\n contentWidget.target(null);\n return false;\n });\n select(\"#\" + this.id() + \" > div.borderHandle\").classed(\"borderHandleDisabled\", true);\n delete this._watch;\n this.content([]);\n this.sectionTypes([]);\n } else {\n const idx = this.sectionTypes().indexOf(sectionType);\n if (idx >= 0) {\n if (this._watch && this.content()[idx]) {\n delete this._watch[this.content()[idx].id()];\n }\n this.content()[idx].target(null);\n select(\"#\" + this.id() + \" > div.borderHandle_\" + sectionType).classed(\"borderHandleDisabled\", true);\n this.content().splice(idx, 1);\n this.sectionTypes().splice(idx, 1);\n }\n }\n }\n hasContent(sectionType, widget, title) {\n return this.sectionTypes().indexOf(sectionType) >= 0;\n }\n setContent(sectionType, widget, title) {\n this.clearContent(sectionType);\n title = typeof title !== \"undefined\" ? title : \"\";\n if (widget) {\n const cell = new Cell().surfaceBorderWidth(0).widget(widget).title(title);\n this.watchWidget(widget);\n this.content().push(cell);\n this.sectionTypes().push(sectionType);\n }\n return this;\n }\n getCell(id) {\n const idx = this.sectionTypes().indexOf(id);\n if (idx >= 0) {\n return this.content()[idx];\n }\n return null;\n }\n getContent(id) {\n const idx = this.sectionTypes().indexOf(id);\n if (idx >= 0) {\n return this.content()[idx].widget();\n }\n return null;\n }\n setLayoutOffsets() {\n this._offsetX = this._element.node().getBoundingClientRect().left + this.gutter() / 2;\n this._offsetY = this._element.node().getBoundingClientRect().top + this.gutter() / 2;\n }\n dragStart(handle) {\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const context = this;\n this._dragCell = handle;\n this._dragCellStartSize = this[handle + \"Size\"]();\n if (this[handle + \"ShrinkWrap\"]()) {\n this[handle + \"Percentage\"](0);\n this[handle + \"ShrinkWrap\"](false);\n }\n const handleElm = select(\"#\" + context.id() + \" > div.borderHandle_\" + handle);\n context._handleTop = parseFloat(handleElm.style(\"top\").split(\"px\")[0]);\n context._handleLeft = parseFloat(handleElm.style(\"left\").split(\"px\")[0]);\n this._dragPrevX = event.sourceEvent.clientX;\n this._dragPrevY = event.sourceEvent.clientY;\n }\n dragTick(handle) {\n const context = this;\n const event = d3Event();\n const xDelta = this._dragPrevX - event.sourceEvent.clientX;\n const yDelta = this._dragPrevY - event.sourceEvent.clientY;\n switch (handle) {\n case \"top\":\n case \"bottom\":\n _moveHandles(handle, yDelta);\n break;\n case \"right\":\n case \"left\":\n _moveHandles(handle, xDelta);\n break;\n }\n function _moveHandles(handle2, delta) {\n if (delta === 0) return;\n const handles = selectAll(\"#\" + context.id() + \" > div.borderHandle\");\n const grabbedHandle = select(\"#\" + context.id() + \" > div.borderHandle_\" + handle2);\n if (grabbedHandle.classed(\"borderHandle_top\")) {\n grabbedHandle.style(\"top\", context._handleTop - delta + \"px\");\n context._cellSizes.topHeight = context._handleTop - delta;\n context._cellSizes.leftHeight = context._cellSizes.height;\n context._cellSizes.leftHeight -= context._cellSizes.topHeight;\n context._cellSizes.leftHeight -= context._cellSizes.bottomHeight;\n context._cellSizes.rightHeight = context._cellSizes.leftHeight;\n } else if (grabbedHandle.classed(\"borderHandle_right\")) {\n grabbedHandle.style(\"left\", context._handleLeft - delta + \"px\");\n context._cellSizes.rightWidth = context._cellSizes.width - context._handleLeft + delta;\n } else if (grabbedHandle.classed(\"borderHandle_bottom\")) {\n grabbedHandle.style(\"top\", context._handleTop - delta + \"px\");\n context._cellSizes.bottomHeight = context._cellSizes.height - context._handleTop + delta;\n context._cellSizes.leftHeight = context._cellSizes.height;\n context._cellSizes.leftHeight -= context._cellSizes.bottomHeight;\n context._cellSizes.leftHeight -= context._cellSizes.topHeight;\n context._cellSizes.rightHeight = context._cellSizes.leftHeight;\n } else if (grabbedHandle.classed(\"borderHandle_left\")) {\n grabbedHandle.style(\"left\", context._handleLeft - delta + \"px\");\n context._cellSizes.leftWidth = context._handleLeft - delta;\n }\n handles.each(function() {\n const handle3 = select(this);\n if (handle3.classed(\"borderHandle_top\")) {\n handle3.style(\"width\", context._cellSizes.width + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight - 3 + \"px\");\n } else if (handle3.classed(\"borderHandle_right\")) {\n handle3.style(\"left\", context._cellSizes.width - context._cellSizes.rightWidth + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n handle3.style(\"height\", context._cellSizes.rightHeight + \"px\");\n } else if (handle3.classed(\"borderHandle_bottom\")) {\n handle3.style(\"width\", context._cellSizes.width + \"px\");\n handle3.style(\"top\", context._cellSizes.height - context._cellSizes.bottomHeight - 3 + \"px\");\n } else if (handle3.classed(\"borderHandle_left\")) {\n handle3.style(\"left\", context._cellSizes.leftWidth + \"px\");\n handle3.style(\"height\", context._cellSizes.leftHeight + \"px\");\n handle3.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n }\n });\n }\n __name(_moveHandles, \"_moveHandles\");\n }\n dragEnd(handle) {\n if (handle) {\n const event = d3Event();\n const xDelta = this._dragPrevX - event.sourceEvent.clientX;\n const yDelta = this._dragPrevY - event.sourceEvent.clientY;\n switch (handle) {\n case \"top\":\n if (yDelta !== 0) {\n this.topPercentage(0);\n this.topSize(this.topSize() === 0 ? this.getContent(\"top\").getBBox().height - yDelta : this.topSize() - yDelta);\n }\n break;\n case \"right\":\n if (xDelta !== 0) {\n this.rightPercentage(0);\n this.rightSize(this.rightSize() === 0 ? this.getContent(\"right\").getBBox().width + xDelta : this.rightSize() + xDelta);\n }\n break;\n case \"bottom\":\n if (yDelta !== 0) {\n this.bottomPercentage(0);\n this.bottomSize(this.bottomSize() === 0 ? this.getContent(\"bottom\").getBBox().height + yDelta : this.bottomSize() + yDelta);\n }\n break;\n case \"left\":\n if (xDelta !== 0) {\n this.leftPercentage(0);\n this.leftSize(this.leftSize() === 0 ? this.getContent(\"left\").getBBox().width - xDelta : this.leftSize() - xDelta);\n }\n break;\n }\n this._dragPrevX = event.sourceEvent.clientX;\n this._dragPrevY = event.sourceEvent.clientY;\n }\n this.render();\n }\n size(_) {\n const retVal = HTMLWidget.prototype.size.apply(this, arguments);\n if (arguments.length && this.contentDiv) {\n this.contentDiv.style(\"width\", this._size.width + \"px\").style(\"height\", this._size.height + \"px\");\n }\n return retVal;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n element.style(\"position\", \"relative\");\n this.contentDiv = element.append(\"div\").classed(\"border-content\", true);\n this._scrollBarWidth = Platform.getScrollbarWidth();\n this._borderHandles = [\"top\", \"left\", \"right\", \"bottom\"];\n const handles = element.selectAll(\"div.borderHandle\").data(this._borderHandles);\n handles.enter().append(\"div\").classed(\"borderHandle\", true).each(function(handle) {\n const h = select(this);\n h.classed(\"borderHandle_\" + handle, true).classed(\"borderHandleDisabled\", context.getContent(handle) === null);\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n this._sectionTypeArr = this.sectionTypes();\n const context = this;\n element.classed(\"design-mode\", this.designMode());\n this.setLayoutOffsets();\n const rows = this.contentDiv.selectAll(\".cell_\" + this._id).data(this.content(), function(d) {\n return d._id;\n });\n const rowsUpdate = rows.enter().append(\"div\").classed(\"cell_\" + this._id, true).style(\"position\", \"absolute\").each(function(d, i) {\n select(this).classed(\"border-cell border-cell-\" + context._sectionTypeArr[i], true);\n d.target(this);\n select(\"#\" + context.id() + \" > div.borderHandle_\" + context._sectionTypeArr[i]).classed(\"borderHandleDisabled\", false);\n }).merge(rows);\n rowsUpdate.each(function(d, idx) {\n const sectionType = context.sectionTypes()[idx];\n if (typeof context[sectionType + \"ShrinkWrap\"] !== \"undefined\" && context[sectionType + \"ShrinkWrap\"]()) {\n d.render();\n context._shrinkWrapBoxes[sectionType] = d.widget().getBBox(true);\n } else {\n delete context._shrinkWrapBoxes[sectionType];\n }\n });\n const drag$1 = drag().on(\"start\", function(d, i) {\n context.dragStart.call(context, d, i);\n }).on(\"drag\", function(d, i) {\n context.dragTick.call(context, d, i);\n }).on(\"end\", function(d, i) {\n context.dragEnd.call(context, d, i);\n });\n if (this.designMode()) {\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").call(drag$1);\n } else {\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").on(\".drag\", null);\n }\n const layoutObj = this.borderLayoutObject();\n this.content().forEach(function(cell, i) {\n cell._fixedLeft = layoutObj[this.sectionTypes()[i]].left;\n cell._fixedTop = layoutObj[this.sectionTypes()[i]].top;\n cell._fixedWidth = layoutObj[this.sectionTypes()[i]].width;\n cell._fixedHeight = layoutObj[this.sectionTypes()[i]].height;\n cell._dragHandles = [];\n }, this);\n rowsUpdate.style(\"left\", function(d) {\n return d._fixedLeft + \"px\";\n }).style(\"top\", function(d) {\n return d._fixedTop + \"px\";\n }).style(\"width\", function(d) {\n return d._fixedWidth - context.gutter() + \"px\";\n }).style(\"height\", function(d) {\n return d._fixedHeight - context.gutter() + \"px\";\n }).each(function(d) {\n d._placeholderElement.attr(\"draggable\", context.designMode()).selectAll(\".dragHandle\").attr(\"draggable\", context.designMode());\n d.surfacePadding(context.surfacePadding()).resize();\n });\n rows.exit().each(function(d) {\n d.target(null);\n }).remove();\n this.getCellSizes();\n element.selectAll(\"#\" + this.id() + \" > div.borderHandle\").each(function() {\n const handle = select(this);\n if (handle.classed(\"borderHandle_top\")) {\n handle.style(\"width\", context._cellSizes.width + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight - 3 + \"px\");\n } else if (handle.classed(\"borderHandle_right\")) {\n handle.style(\"left\", context._cellSizes.width - context._cellSizes.rightWidth + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n handle.style(\"height\", context._cellSizes.rightHeight + \"px\");\n } else if (handle.classed(\"borderHandle_bottom\")) {\n handle.style(\"width\", context._cellSizes.width + \"px\");\n handle.style(\"top\", context._cellSizes.height - context._cellSizes.bottomHeight - 3 + \"px\");\n } else if (handle.classed(\"borderHandle_left\")) {\n handle.style(\"left\", context._cellSizes.leftWidth + \"px\");\n handle.style(\"height\", context._cellSizes.leftHeight + \"px\");\n handle.style(\"top\", context._cellSizes.topHeight + 3 + \"px\");\n }\n });\n }\n getCellSizes() {\n const context = this;\n context._cellSizes = {};\n const contentRect = this.element().node().getBoundingClientRect();\n context._cellSizes.width = contentRect.width;\n context._cellSizes.height = contentRect.height;\n this.element().selectAll(\"#\" + this.id() + \" > div > div.border-cell\").each(function() {\n const cell = select(this);\n if (typeof cell.node === \"function\") {\n const rect = cell.node().getBoundingClientRect();\n if (cell.classed(\"border-cell-top\")) {\n context._cellSizes.topHeight = rect.height;\n } else if (cell.classed(\"border-cell-left\")) {\n context._cellSizes.leftWidth = rect.width;\n context._cellSizes.leftHeight = rect.height;\n } else if (cell.classed(\"border-cell-right\")) {\n context._cellSizes.rightWidth = rect.width;\n context._cellSizes.rightHeight = rect.height;\n } else if (cell.classed(\"border-cell-bottom\")) {\n context._cellSizes.bottomHeight = rect.height;\n }\n }\n });\n const sizes = [\"height\", \"width\", \"topHeight\", \"bottomHeight\", \"leftHeight\", \"rightHeight\", \"leftWidth\", \"rightWidth\"];\n sizes.forEach(function(size) {\n context._cellSizes[size] = context._cellSizes[size] === void 0 ? 0 : context._cellSizes[size];\n });\n }\n postUpdate(domNode, element) {\n const context = this;\n this.content().forEach(function(n) {\n if (n._element.node() !== null && n.widget()) {\n const prevBox = n.widget().getBBox(false, true);\n const currBox = n.widget().getBBox(true, true);\n if (prevBox.width !== currBox.width || prevBox.height !== currBox.height) {\n context.lazyRender();\n }\n }\n });\n }\n exit(domNode, element) {\n this.content().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n};\n__name(_Border, \"Border\");\nlet Border = _Border;\nBorder.prototype._class += \" layout_Border\";\nBorder.prototype.publish(\"designMode\", false, \"boolean\", \"Design Mode\", null, { tags: [\"Basic\"] });\nBorder.prototype.publish(\"content\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"gutter\", 0, \"number\", \"Gap Between Widgets\", null, { tags: [\"Basic\"] });\nBorder.prototype.publish(\"topShrinkWrap\", false, \"boolean\", \"'Top' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"leftShrinkWrap\", false, \"boolean\", \"'Left' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"rightShrinkWrap\", false, \"boolean\", \"'Right' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"bottomShrinkWrap\", false, \"boolean\", \"'Bottom' Cell shrinks to fit content\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"topSize\", 0, \"number\", \"Height of the 'Top' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"leftSize\", 0, \"number\", \"Width of the 'Left' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"rightSize\", 0, \"number\", \"Width of the 'Right' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"bottomSize\", 0, \"number\", \"Height of the 'Bottom' Cell (px)\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"topPercentage\", 20, \"number\", \"Percentage (of parent) Height of the 'Top' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"leftPercentage\", 20, \"number\", \"Percentage (of parent) Width of the 'Left' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"rightPercentage\", 20, \"number\", \"Percentage (of parent) Width of the 'Right' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"bottomPercentage\", 20, \"number\", \"Percentage (of parent) Height of the 'Bottom' Cell\", null, { tags: [\"Private\"] });\nBorder.prototype.publish(\"surfacePadding\", 0, \"number\", \"Cell Padding (px)\", null, { tags: [\"Intermediate\"] });\nBorder.prototype.publish(\"sectionTypes\", [], \"array\", \"Section Types sharing an index with 'content' - Used to determine position/size.\", null, { tags: [\"Private\"] });\nconst _WidgetDiv = class _WidgetDiv {\n _div;\n _overlay = false;\n _overflowX = \"visible\";\n _overflowY = \"visible\";\n _widget;\n constructor(div) {\n this._div = div;\n }\n overlay(_) {\n if (!arguments.length) return this._overlay;\n this._overlay = _;\n return this;\n }\n overflowX(_) {\n if (!arguments.length) return this._overflowX;\n this._overflowX = _;\n this._div.style(\"overflow-x\", _);\n return this;\n }\n overflowY(_) {\n if (!arguments.length) return this._overflowY;\n this._overflowY = _;\n this._div.style(\"overflow-y\", _);\n return this;\n }\n element() {\n return this._div;\n }\n node() {\n return this._div.node();\n }\n widget(_) {\n if (!arguments.length) return this._widget;\n if (this._widget !== _) {\n if (this._widget) {\n this._widget.target(null);\n }\n this._widget = _;\n if (this._widget) {\n this._widget.target(this._div.node());\n }\n }\n return this;\n }\n resize(size) {\n if (this._widget) {\n this._div.style(\"width\", `${size.width}px`).style(\"height\", `${size.height}px`);\n this._widget.resize(size);\n }\n return this;\n }\n async render(getBBox, availableHeight, availableWidth) {\n let overflowX = this.overflowX();\n if (!this.overlay() && overflowX === \"visible\") {\n overflowX = null;\n }\n let overflowY = this.overflowY();\n if (!this.overlay() && overflowY === \"visible\") {\n overflowY = null;\n }\n this._div.style(\"height\", this.overlay() ? \"0px\" : null).style(\"overflow-x\", overflowX).style(\"overflow-y\", overflowY);\n if (this._widget) {\n return this._widget.renderPromise().then((w) => {\n if (getBBox && this._widget.visible()) {\n const retVal = this._widget.getBBox();\n retVal.width += 8;\n if (availableHeight !== void 0 && retVal.height > availableHeight) {\n retVal.width += Platform.getScrollbarWidth();\n }\n if (availableWidth !== void 0 && retVal.width > availableWidth) {\n retVal.height += Platform.getScrollbarWidth();\n }\n if (this.overlay()) {\n retVal.height = 0;\n } else {\n retVal.height += 4;\n }\n return retVal;\n }\n return getBBox ? { x: 0, y: 0, width: 0, height: 0 } : void 0;\n });\n } else {\n return Promise.resolve(getBBox ? { x: 0, y: 0, width: 0, height: 0 } : void 0);\n }\n }\n};\n__name(_WidgetDiv, \"WidgetDiv\");\nlet WidgetDiv = _WidgetDiv;\nconst _Border2 = class _Border2 extends HTMLWidget {\n _bodyElement;\n _topWA;\n _leftWA;\n _centerWA;\n _rightWA;\n _bottomWA;\n _topPrevOverflow;\n _leftPrevOverflow;\n _rightPrevOverflow;\n _bottomPrevOverflow;\n constructor() {\n super();\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n const topElement = element.append(\"header\");\n this._bodyElement = element.append(\"div\").attr(\"class\", \"body\");\n const centerElement = this._bodyElement.append(\"div\").attr(\"class\", \"center\");\n const leftElement = this._bodyElement.append(\"div\").attr(\"class\", \"lhs\");\n const rightElement = this._bodyElement.append(\"div\").attr(\"class\", \"rhs\");\n const bottomElement = element.append(\"div\").attr(\"class\", \"footer\");\n this._topWA = new WidgetDiv(topElement);\n this._centerWA = new WidgetDiv(centerElement);\n this._leftWA = new WidgetDiv(leftElement);\n this._rightWA = new WidgetDiv(rightElement);\n this._bottomWA = new WidgetDiv(bottomElement);\n }\n update(domNode, element) {\n super.update(domNode, element);\n this._topWA.element().style(\"display\", this.showTop() ? null : \"none\");\n this._rightWA.element().style(\"display\", this.showRight() ? null : \"none\");\n this._bottomWA.element().style(\"display\", this.showBottom() ? null : \"none\");\n this._leftWA.element().style(\"display\", this.showLeft() ? null : \"none\");\n if (this.topOverflowX() !== this._topWA.overflowX()) {\n this._topWA.overflowX(this.topOverflowX());\n }\n if (this.rightOverflowX() !== this._rightWA.overflowX()) {\n this._rightWA.overflowX(this.rightOverflowX());\n }\n if (this.bottomOverflowX() !== this._bottomWA.overflowX()) {\n this._bottomWA.overflowX(this.bottomOverflowX());\n }\n if (this.leftOverflowX() !== this._leftWA.overflowX()) {\n this._leftWA.overflowX(this.leftOverflowX());\n }\n if (this.topOverflowY() !== this._topWA.overflowY()) {\n this._topWA.overflowY(this.topOverflowY());\n }\n if (this.rightOverflowY() !== this._rightWA.overflowY()) {\n this._rightWA.overflowY(this.rightOverflowY());\n }\n if (this.bottomOverflowY() !== this._bottomWA.overflowY()) {\n this._bottomWA.overflowY(this.bottomOverflowY());\n }\n if (this.leftOverflowY() !== this._leftWA.overflowY()) {\n this._leftWA.overflowY(this.leftOverflowY());\n }\n this.element().style(\"width\", `${this.width()}px`).style(\"height\", `${this.height()}px`);\n }\n targetNull(w) {\n if (w) {\n w.target(null);\n }\n }\n exit(domNode, element) {\n this.targetNull(this.center());\n this.targetNull(this.bottom());\n this.targetNull(this.right());\n this.targetNull(this.left());\n this.targetNull(this.top());\n super.exit(domNode, element);\n }\n swap(sectionA, sectionB) {\n const a2 = this[sectionA]();\n const b = this[sectionB]();\n this.targetNull(a2);\n this.targetNull(b);\n this[`_${sectionA}WA`].widget(null);\n this[`_${sectionB}WA`].widget(null);\n this[sectionA](b);\n this[sectionB](a2);\n return this;\n }\n render(callback) {\n const retVal = super.render((w) => {\n if (this._topWA) {\n this._topWA.widget(this.top()).overlay(this.topOverlay()).render(true).then(async (topBBox) => {\n const bottomBBox = await this._bottomWA.widget(this.bottom()).render(true, void 0, this.width());\n const availableHeight = this.height() - (topBBox.height + bottomBBox.height);\n const leftBBox = await this._leftWA.widget(this.left()).render(true, availableHeight);\n const rightBBox = await this._rightWA.widget(this.right()).render(true, availableHeight);\n if (this.bottomHeight_exists()) {\n bottomBBox.height = this.bottomHeight();\n }\n const bodyWidth = this.width() - (leftBBox.width + rightBBox.width);\n const bodyHeight = this.height() - (topBBox.height + bottomBBox.height);\n const centerOverflowX = this.centerOverflowX();\n const centerOverflowY = this.centerOverflowY();\n const scrollCenterX = [\"auto\", \"scroll\"].indexOf(centerOverflowX) !== -1;\n const scrollCenterY = [\"auto\", \"scroll\"].indexOf(centerOverflowY) !== -1;\n if (scrollCenterX || scrollCenterY) {\n this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({\n width: bodyWidth,\n height: bodyHeight\n }).render();\n }\n this._bodyElement.style(\"height\", `${bodyHeight}px`);\n const promises = [\n this._topWA.overflowX(this.topOverflowX()).overflowY(this.topOverflowY()).resize({\n width: this.width(),\n height: topBBox.height\n }).render(),\n this._leftWA.overflowX(this.leftOverflowX()).overflowY(this.leftOverflowY()).resize({\n width: leftBBox.width,\n height: bodyHeight\n }).render(),\n this._rightWA.overflowX(this.rightOverflowX()).overflowY(this.rightOverflowY()).resize({\n width: rightBBox.width,\n height: bodyHeight\n }).render(),\n this._centerWA.overflowX(this.centerOverflowX()).overflowY(this.centerOverflowY()).widget(this.center()).resize({\n width: bodyWidth,\n height: bodyHeight\n }).render(),\n this._bottomWA.overflowX(this.bottomOverflowX()).overflowY(this.bottomOverflowY()).resize({\n width: this.width(),\n height: bottomBBox.height\n }).render()\n ];\n Promise.all(promises).then((promises2) => {\n if (callback) {\n callback(this);\n }\n });\n });\n } else {\n if (callback) {\n callback(this);\n }\n }\n });\n return retVal;\n }\n};\n__name(_Border2, \"Border2\");\nlet Border2 = _Border2;\nBorder2.prototype._class += \" layout_Border2\";\nBorder2.prototype.publish(\"showTop\", true, \"boolean\", \"If true, top widget adapter will display\");\nBorder2.prototype.publish(\"showRight\", true, \"boolean\", \"If true, right widget adapter will display\");\nBorder2.prototype.publish(\"showBottom\", true, \"boolean\", \"If true, bottom widget adapter will display\");\nBorder2.prototype.publish(\"showLeft\", true, \"boolean\", \"If true, left widget adapter will display\");\nBorder2.prototype.publish(\"topOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the top widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"rightOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the right widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"bottomOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the bottom widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"leftOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the left widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"centerOverflowX\", \"visible\", \"set\", \"Sets the overflow-x css style for the center widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"topOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the top widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"rightOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the right widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"bottomOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the bottom widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"leftOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the left widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"centerOverflowY\", \"visible\", \"set\", \"Sets the overflow-y css style for the center widget adapter\", [\"hidden\", \"scroll\", \"visible\", \"auto\"]);\nBorder2.prototype.publish(\"top\", null, \"widget\", \"Top Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"topOverlay\", false, \"boolean\", \"Overlay Top Widget\");\nBorder2.prototype.publish(\"left\", null, \"widget\", \"Left Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"center\", null, \"widget\", \"Center Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"right\", null, \"widget\", \"Right Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"bottom\", null, \"widget\", \"Bottom Widget\", void 0, { render: false });\nBorder2.prototype.publish(\"bottomHeight\", null, \"number\", \"Bottom Fixed Height\", void 0, { optional: true });\nconst _Carousel = class _Carousel extends HTMLWidget {\n _prevActive = 0;\n _root;\n activeWidget() {\n return this.widgets()[this.active()];\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._root = element.append(\"div\").attr(\"id\", `${this.id()}_root`);\n }\n update(domNode, element) {\n super.update(domNode, element);\n const active = this.active();\n const width = this.width();\n this._root.style(\"width\", `${width}px`).style(\"height\", `${this.height()}px`);\n const widgetElements = this._root.selectAll(`#${this.id()}_root > .carouselItem`).data(this.widgets(), (d) => d.id());\n const update = widgetElements.enter().append(\"div\").attr(\"class\", \"carouselItem\").each(function(w) {\n w.target(this);\n }).merge(widgetElements).style(\"left\", (d, i) => `${(i - this._prevActive) * width}px`).style(\"width\", `${width}px`);\n if (this._prevActive !== active) {\n update.style(\"display\", (d, i) => i === this._prevActive || i === active ? null : \"none\").transition().duration(this.transitionDuration()).style(\"left\", (d, i) => `${(i - active) * width}px`).on(\"end\", function(d, i) {\n select(this).style(\"display\", () => i === active ? null : \"none\");\n });\n this._prevActive = active;\n }\n widgetElements.exit().each(function(w) {\n w.target(null);\n }).remove();\n }\n exit(domNode, element) {\n this.widgets().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n render(callback) {\n return super.render((w) => {\n if (!this.visible() || this.isDOMHidden()) {\n if (callback) {\n callback(w);\n }\n } else {\n const aw = this.activeWidget();\n if (aw) {\n aw.resize(this.size()).render((w2) => {\n if (callback) {\n callback(w);\n }\n });\n }\n }\n });\n }\n};\n__name(_Carousel, \"Carousel\");\nlet Carousel = _Carousel;\nCarousel.prototype._class += \" layout_Carousel\";\nCarousel.prototype.publish(\"widgets\", [], \"widgetArray\", \"Widgets\", null, { render: false });\nCarousel.prototype.publish(\"active\", 0, \"number\", \"Active widget\");\nCarousel.prototype.publish(\"transitionDuration\", 500, \"number\", \"Transition duration\");\nvar pi$1 = Math.PI, tau$1 = 2 * pi$1, epsilon = 1e-6, tauEpsilon = tau$1 - epsilon;\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null;\n this._ = \"\";\n}\n__name(Path, \"Path\");\nfunction path() {\n return new Path();\n}\n__name(path, \"path\");\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: /* @__PURE__ */ __name(function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n }, \"moveTo\"),\n closePath: /* @__PURE__ */ __name(function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }, \"closePath\"),\n lineTo: /* @__PURE__ */ __name(function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"lineTo\"),\n quadraticCurveTo: /* @__PURE__ */ __name(function(x1, y1, x, y) {\n this._ += \"Q\" + +x1 + \",\" + +y1 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"quadraticCurveTo\"),\n bezierCurveTo: /* @__PURE__ */ __name(function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + +x1 + \",\" + +y1 + \",\" + +x2 + \",\" + +y2 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n }, \"bezierCurveTo\"),\n arcTo: /* @__PURE__ */ __name(function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;\n if (r < 0) throw new Error(\"negative radius: \" + r);\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } else if (!(l01_2 > epsilon)) ;\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } else {\n var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi$1 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + +(y01 * x20 > x01 * y20) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n }, \"arcTo\"),\n arc: /* @__PURE__ */ __name(function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;\n if (r < 0) throw new Error(\"negative radius: \" + r);\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n if (!r) return;\n if (da < 0) da = da % tau$1 + tau$1;\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n } else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + +(da >= pi$1) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n }, \"arc\"),\n rect: /* @__PURE__ */ __name(function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + +w + \"v\" + +h + \"h\" + -w + \"Z\";\n }, \"rect\"),\n toString: /* @__PURE__ */ __name(function() {\n return this._;\n }, \"toString\")\n};\nfunction constant(x) {\n return /* @__PURE__ */ __name(function constant2() {\n return x;\n }, \"constant\");\n}\n__name(constant, \"constant\");\nvar pi = Math.PI;\nvar tau = 2 * pi;\nconst d3SymbolCircle = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }, \"draw\")\n};\nconst d3SymbolCross = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }, \"draw\")\n};\nvar tan30 = Math.sqrt(1 / 3), tan30_2 = tan30 * 2;\nconst d3SymbolDiamond = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var y = Math.sqrt(size / tan30_2), x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }, \"draw\")\n};\nvar ka = 0.8908130915292852, kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10), kx = Math.sin(tau / 10) * kr, ky = -Math.cos(tau / 10) * kr;\nconst d3SymbolStar = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size * ka), x = kx * r, y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a2 = tau * i / 5, c2 = Math.cos(a2), s2 = Math.sin(a2);\n context.lineTo(s2 * r, -c2 * r);\n context.lineTo(c2 * x - s2 * y, s2 * x + c2 * y);\n }\n context.closePath();\n }, \"draw\")\n};\nconst d3SymbolSquare = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var w = Math.sqrt(size), x = -w / 2;\n context.rect(x, x, w, w);\n }, \"draw\")\n};\nvar sqrt3 = Math.sqrt(3);\nconst d3SymbolTriangle = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }, \"draw\")\n};\nvar c = -0.5, s = Math.sqrt(3) / 2, k = 1 / Math.sqrt(12), a = (k / 2 + 1) * 3;\nconst d3SymbolWye = {\n draw: /* @__PURE__ */ __name(function(context, size) {\n var r = Math.sqrt(size / a), x0 = r / 2, y0 = r * k, x1 = x0, y1 = r * k + r, x2 = -x1, y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }, \"draw\")\n};\nfunction d3Symbol() {\n var type = constant(d3SymbolCircle), size = constant(64), context = null;\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n __name(symbol, \"symbol\");\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n return symbol;\n}\n__name(d3Symbol, \"d3Symbol\");\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function(obj) {\n return typeof obj;\n} : function(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\nvar d3_identity = /* @__PURE__ */ __name(function d3_identity2(d) {\n return d;\n}, \"d3_identity\");\nvar d3_reverse = /* @__PURE__ */ __name(function d3_reverse2(arr) {\n var mirror = [];\n for (var i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l - i - 1];\n }\n return mirror;\n}, \"d3_reverse\");\nvar d3_textWrapping = /* @__PURE__ */ __name(function d3_textWrapping2(text, width) {\n text.each(function() {\n var text2 = select(this), words = text2.text().split(/\\s+/).reverse(), word, line = [], lineHeight = 1.2;\n text2.attr(\"y\");\n var dy = parseFloat(text2.attr(\"dy\")) || 0, tspan = text2.text(null).append(\"tspan\").attr(\"x\", 0).attr(\"dy\", dy + \"em\");\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text2.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}, \"d3_textWrapping\");\nvar d3_mergeLabels = /* @__PURE__ */ __name(function d3_mergeLabels2() {\n var gen = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n var labels = arguments[1];\n var domain = arguments[2];\n var range = arguments[3];\n var labelDelimiter = arguments[4];\n if ((typeof labels === \"undefined\" ? \"undefined\" : _typeof(labels)) === \"object\") {\n if (labels.length === 0) return gen;\n var i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n var customLabels = [];\n var genLength = gen.length;\n for (var _i = 0; _i < genLength; _i++) {\n customLabels.push(labels({\n i: _i,\n genLength,\n generatedLabels: gen,\n domain,\n range,\n labelDelimiter\n }));\n }\n return customLabels;\n }\n return gen;\n}, \"d3_mergeLabels\");\nvar d3_linearLegend = /* @__PURE__ */ __name(function d3_linearLegend2(scale, cells, labelFormat) {\n var data = [];\n if (cells.length > 1) {\n data = cells;\n } else {\n var domain = scale.domain(), increment = (domain[domain.length - 1] - domain[0]) / (cells - 1);\n var i = 0;\n for (; i < cells; i++) {\n data.push(domain[0] + i * increment);\n }\n }\n var labels = data.map(labelFormat);\n return {\n data,\n labels,\n feature: /* @__PURE__ */ __name(function feature(d) {\n return scale(d);\n }, \"feature\")\n };\n}, \"d3_linearLegend\");\nvar d3_quantLegend = /* @__PURE__ */ __name(function d3_quantLegend2(scale, labelFormat, labelDelimiter) {\n var labels = scale.range().map(function(d) {\n var invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n return {\n data: scale.range(),\n labels,\n feature: d3_identity\n };\n}, \"d3_quantLegend\");\nvar d3_ordinalLegend = /* @__PURE__ */ __name(function d3_ordinalLegend2(scale) {\n return {\n data: scale.domain(),\n labels: scale.domain(),\n feature: /* @__PURE__ */ __name(function feature(d) {\n return scale(d);\n }, \"feature\")\n };\n}, \"d3_ordinalLegend\");\nvar d3_cellOver = /* @__PURE__ */ __name(function d3_cellOver2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellover\", obj, d);\n}, \"d3_cellOver\");\nvar d3_cellOut = /* @__PURE__ */ __name(function d3_cellOut2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellout\", obj, d);\n}, \"d3_cellOut\");\nvar d3_cellClick = /* @__PURE__ */ __name(function d3_cellClick2(cellDispatcher, d, obj) {\n cellDispatcher.call(\"cellclick\", obj, d);\n}, \"d3_cellClick\");\nvar helper = {\n d3_drawShapes: /* @__PURE__ */ __name(function d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path2) {\n if (shape === \"rect\") {\n shapes.attr(\"height\", shapeHeight).attr(\"width\", shapeWidth);\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius);\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path2);\n }\n }, \"d3_drawShapes\"),\n d3_addText: /* @__PURE__ */ __name(function d3_addText(svg, enter, labels, classPrefix, labelWidth) {\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n var text = svg.selectAll(\"g.\" + classPrefix + \"cell text.\" + classPrefix + \"label\").data(labels).text(d3_identity);\n if (labelWidth) {\n svg.selectAll(\"g.\" + classPrefix + \"cell text.\" + classPrefix + \"label\").call(d3_textWrapping, labelWidth);\n }\n return text;\n }, \"d3_addText\"),\n d3_calcType: /* @__PURE__ */ __name(function d3_calcType(scale, ascending, cells, labels, labelFormat, labelDelimiter) {\n var type = scale.invertExtent ? d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ? d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n var range = scale.range && scale.range() || scale.domain();\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range, labelDelimiter);\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n return type;\n }, \"d3_calcType\"),\n d3_filterCells: /* @__PURE__ */ __name(function d3_filterCells(type, cellFilter) {\n var filterCells = type.data.map(function(d, i) {\n return { data: d, label: type.labels[i] };\n }).filter(cellFilter);\n var dataValues = filterCells.map(function(d) {\n return d.data;\n });\n var labelValues = filterCells.map(function(d) {\n return d.label;\n });\n type.data = type.data.filter(function(d) {\n return dataValues.indexOf(d) !== -1;\n });\n type.labels = type.labels.filter(function(d) {\n return labelValues.indexOf(d) !== -1;\n });\n return type;\n }, \"d3_filterCells\"),\n d3_placement: /* @__PURE__ */ __name(function d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign) {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\") {\n text.style(\"text-anchor\", labelAlign);\n }\n }, \"d3_placement\"),\n d3_addEvents: /* @__PURE__ */ __name(function d3_addEvents(cells, dispatcher) {\n cells.on(\"mouseover.legend\", function(d) {\n d3_cellOver(dispatcher, d, this);\n }).on(\"mouseout.legend\", function(d) {\n d3_cellOut(dispatcher, d, this);\n }).on(\"click.legend\", function(d) {\n d3_cellClick(dispatcher, d, this);\n });\n }, \"d3_addEvents\"),\n d3_title: /* @__PURE__ */ __name(function d3_title(svg, title, classPrefix, titleWidth) {\n if (title !== \"\") {\n var titleText = svg.selectAll(\"text.\" + classPrefix + \"legendTitle\");\n titleText.data([title]).enter().append(\"text\").attr(\"class\", classPrefix + \"legendTitle\");\n svg.selectAll(\"text.\" + classPrefix + \"legendTitle\").text(title);\n if (titleWidth) {\n svg.selectAll(\"text.\" + classPrefix + \"legendTitle\").call(d3_textWrapping, titleWidth);\n }\n var cellsSvg = svg.select(\".\" + classPrefix + \"legendCells\");\n var yOffset = svg.select(\".\" + classPrefix + \"legendTitle\").nodes().map(function(d) {\n return d.getBBox().height;\n })[0], xOffset = -cellsSvg.nodes().map(function(d) {\n return d.getBBox().x;\n })[0];\n cellsSvg.attr(\"transform\", \"translate(\" + xOffset + \",\" + yOffset + \")\");\n }\n }, \"d3_title\"),\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n d3_defaultFormatSpecifier: \".01f\",\n d3_defaultDelimiter: \"to\"\n};\nfunction color() {\n var scale = scaleLinear(), shape = \"rect\", shapeWidth = 15, shapeHeight = 15, shapeRadius = 10, shapePadding = 2, cells = [5], cellFilter = void 0, labels = [], classPrefix = \"\", useClass = false, title = \"\", locale = helper.d3_defaultLocale, specifier = helper.d3_defaultFormatSpecifier, labelOffset = 10, labelAlign = \"middle\", labelDelimiter = helper.d3_defaultDelimiter, labelWrap = void 0, orient = \"vertical\", ascending = false, path2 = void 0, titleWidth = void 0, legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n function legend(svg) {\n var type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), legendG = svg.selectAll(\"g\").data([scale]);\n legendG.enter().append(\"g\").attr(\"class\", classPrefix + \"legendCells\");\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter);\n }\n var cell = svg.select(\".\" + classPrefix + \"legendCells\").selectAll(\".\" + classPrefix + \"cell\").data(type.data);\n var cellEnter = cell.enter().append(\"g\").attr(\"class\", classPrefix + \"cell\");\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\");\n var shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape + \".\" + classPrefix + \"swatch\").data(type.data);\n helper.d3_addEvents(cellEnter, legendDispatcher);\n cell.exit().transition().style(\"opacity\", 0).remove();\n shapes.exit().transition().style(\"opacity\", 0).remove();\n shapes = shapes.merge(shapes);\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path2);\n var text = helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap);\n cell = cellEnter.merge(cell);\n var textSize = text.nodes().map(function(d) {\n return d.getBBox();\n }), shapeSize = shapes.nodes().map(function(d) {\n return d.getBBox();\n });\n if (!useClass) {\n if (shape == \"line\") {\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", function(d) {\n return classPrefix + \"swatch \" + type.feature(d);\n });\n }\n var cellTrans = void 0, textTrans = void 0, textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1;\n if (orient === \"vertical\") {\n (function() {\n var cellSize = textSize.map(function(d, i) {\n return Math.max(d.height, shapeSize[i].height);\n });\n cellTrans = /* @__PURE__ */ __name(function cellTrans2(d, i) {\n var height = sum(cellSize.slice(0, i));\n return \"translate(0, \" + (height + i * shapePadding) + \")\";\n }, \"cellTrans\");\n textTrans = /* @__PURE__ */ __name(function textTrans2(d, i) {\n return \"translate( \" + (shapeSize[i].width + shapeSize[i].x + labelOffset) + \", \" + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + \")\";\n }, \"textTrans\");\n })();\n } else if (orient === \"horizontal\") {\n cellTrans = /* @__PURE__ */ __name(function cellTrans2(d, i) {\n return \"translate(\" + i * (shapeSize[i].width + shapePadding) + \",0)\";\n }, \"cellTrans\");\n textTrans = /* @__PURE__ */ __name(function textTrans2(d, i) {\n return \"translate(\" + (shapeSize[i].width * textAlign + shapeSize[i].x) + \",\\n \" + (shapeSize[i].height + shapeSize[i].y + labelOffset + 8) + \")\";\n }, \"textTrans\");\n }\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n cell.transition().style(\"opacity\", 1);\n }\n __name(legend, \"legend\");\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2) {\n cells = _;\n }\n return legend;\n };\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || _ == \"path\" && typeof d === \"string\") {\n shape = _;\n path2 = d;\n }\n return legend;\n };\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n legend.locale = function(_) {\n if (!arguments.length) return locale;\n locale = formatLocale(_);\n return legend;\n };\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier);\n specifier = formatSpecifier(_);\n return legend;\n };\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false) {\n useClass = _;\n }\n return legend;\n };\n legend.orient = function(_) {\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n };\n legend.on = function() {\n var value = legendDispatcher.on.apply(legendDispatcher, arguments);\n return value === legendDispatcher ? legend : value;\n };\n return legend;\n}\n__name(color, \"color\");\nconst _Legend = class _Legend extends SVGWidget {\n _owner;\n _targetWidget;\n _targetWidgetMonitor;\n _legendOrdinal;\n _disabled = [];\n _symbolTypeMap = {\n \"circle\": d3SymbolCircle,\n \"cross\": d3SymbolCross,\n \"diamond\": d3SymbolDiamond,\n \"square\": d3SymbolSquare,\n \"star\": d3SymbolStar,\n \"triangle\": d3SymbolTriangle,\n \"wye\": d3SymbolWye\n };\n constructor(owner) {\n super();\n this._owner = owner;\n this._drawStartPos = \"origin\";\n const context = this;\n this._legendOrdinal = color().shape(\"path\", d3Symbol().type(d3SymbolCircle).size(150)()).shapePadding(10).shapeRadius(10).on(\"cellclick\", function(d) {\n context.onClick(d, this);\n }).on(\"cellover\", (d) => {\n context.onOver(d, this);\n }).on(\"cellout\", (d) => {\n context.onOut(d, this);\n });\n }\n isDisabled(d) {\n if (typeof d === \"undefined\") {\n return false;\n } else if (typeof d === \"string\") {\n return d.indexOf(\"__\") === 0 || this._disabled.indexOf(d) >= 0;\n } else if (d instanceof Database.Field) {\n return d.id().indexOf(\"__\") === 0 || this._disabled.indexOf(d.id()) >= 0;\n }\n return this._disabled.indexOf(d) >= 0;\n }\n filteredFields() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.fields();\n case \"ND\":\n return this.fields().filter((d) => !this.isDisabled(d));\n }\n return this.fields();\n }\n filteredColumns() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.columns();\n case \"ND\":\n return this.columns().filter((d) => !this.isDisabled(d));\n }\n return this.columns();\n }\n filteredData() {\n switch (this.dataFamily()) {\n case \"2D\":\n return this.data().filter((row) => !this.isDisabled(row[0]));\n case \"ND\":\n const disabledCols = {};\n let anyDisabled = false;\n this.columns().forEach((col, idx) => {\n const disabled = this.isDisabled(col);\n disabledCols[idx] = disabled;\n if (disabled) {\n anyDisabled = true;\n }\n });\n return !anyDisabled ? this.data() : this.data().map((row) => {\n return row.filter((cell, idx) => !disabledCols[idx]);\n });\n }\n return this.data();\n }\n isRainbow() {\n const widget = this.getWidget();\n return widget && widget._palette && widget._palette.type() === \"rainbow\";\n }\n targetWidget(_) {\n if (!arguments.length) return this._targetWidget;\n this._targetWidget = _;\n if (this._targetWidgetMonitor) {\n this._targetWidgetMonitor.remove();\n delete this._targetWidgetMonitor;\n }\n if (this._targetWidget) {\n const context = this;\n this._targetWidgetMonitor = this._targetWidget.monitor(function(key, newProp, oldProp, source) {\n switch (key) {\n case \"chart\":\n case \"columns\":\n case \"data\":\n case \"paletteID\":\n context.lazyRender();\n break;\n }\n });\n }\n return this;\n }\n getWidget() {\n if (this._targetWidget) {\n switch (this._targetWidget.classID()) {\n case \"composite_MultiChart\":\n return this._targetWidget.chart();\n }\n }\n return this._targetWidget;\n }\n getPalette() {\n const widget = this.getWidget();\n if (widget && widget._palette) {\n switch (widget._palette.type()) {\n case \"ordinal\":\n return Palette.ordinal(widget._palette.id());\n case \"rainbow\":\n return Palette.rainbow(widget._palette.id());\n }\n }\n return Palette.ordinal(\"default\");\n }\n getPaletteType() {\n return this.getPalette().type();\n }\n fillColorFunc() {\n const widget = this.getWidget();\n if (widget && widget.fillColor) {\n if (widget._palette && widget.paletteID && widget._palette.name !== widget.paletteID()) {\n widget._palette = widget._palette.switch(widget.paletteID());\n }\n return (row, col, sel) => {\n return widget.fillColor(row, col, sel);\n };\n }\n const palette = Palette.ordinal(widget && widget.paletteID ? widget.paletteID() || \"default\" : \"default\");\n return (row, col, sel) => {\n return palette(col);\n };\n }\n fillColor(row, col, sel) {\n return this.fillColorFunc()(row, col, sel);\n }\n _g;\n enter(domNode, element) {\n super.enter(domNode, element);\n this._g = element.append(\"g\").attr(\"class\", \"legendOrdinal\");\n }\n calcMetaData() {\n let dataArr = [];\n let total = 0;\n let maxLabelWidth = 0;\n const colLength = this.columns().length;\n if (this._targetWidget) {\n const columns = this.columns();\n switch (this.getPaletteType()) {\n case \"ordinal\":\n const fillColor = this.fillColorFunc();\n let val = 0;\n switch (this.dataFamily()) {\n case \"2D\":\n dataArr = this.data().map(function(n, i) {\n val = this.data()[i].slice(1, colLength).reduce((acc, n2) => acc + n2, 0);\n const disabled = this.isDisabled(n[0]);\n if (!disabled) total += val;\n const label = n[0] + (!disabled && this.showSeriesTotal() ? ` (${val})` : \"\");\n const textSize = this.textSize(label);\n if (maxLabelWidth < textSize.width) maxLabelWidth = textSize.width;\n return [fillColor(n, n[0], false), n[0], label];\n }, this);\n break;\n case \"ND\":\n const widgetColumns = this.columns().filter((col) => col.indexOf(\"__\") !== 0);\n dataArr = widgetColumns.filter(function(n, i) {\n return i > 0;\n }).map(function(n, i) {\n val = this.data().reduce((acc, n2) => acc + n2[i + 1], 0);\n const disabled = this.isDisabled(columns[i + 1]);\n const label = n + (!disabled && this.showSeriesTotal() ? ` (${val})` : \"\");\n if (!disabled) total += val;\n const textSize = this.textSize(label);\n if (maxLabelWidth < textSize.width) maxLabelWidth = textSize.width;\n return [fillColor(void 0, n, false), n, label];\n }, this);\n break;\n default:\n const widgetColumns2 = this.columns();\n dataArr = widgetColumns2.map(function(n) {\n return [fillColor(void 0, n, false), n];\n }, this);\n break;\n }\n break;\n case \"rainbow\":\n const palette = this.getPalette();\n const format$1 = format(this.rainbowFormat());\n const widget = this.getWidget();\n const steps = this.rainbowBins();\n const weightMin = widget._dataMinWeight;\n const weightMax = widget._dataMaxWeight;\n const stepWeightDiff = (weightMax - weightMin) / (steps - 1);\n dataArr.push([palette(weightMin, weightMin, weightMax), format$1(weightMin)]);\n for (let x = 1; x < steps - 1; ++x) {\n let mid = stepWeightDiff * x;\n if (Math.floor(mid) > parseInt(dataArr[0][1])) {\n mid = Math.floor(mid);\n }\n dataArr.push([palette(mid, weightMin, weightMax), format$1(mid)]);\n }\n dataArr.push([palette(weightMax, weightMin, weightMax), format$1(weightMax)]);\n break;\n }\n }\n return {\n dataArr,\n total,\n maxLabelWidth\n };\n }\n update(domNode, element) {\n super.update(domNode, element);\n const { dataArr, maxLabelWidth, total } = this.calcMetaData();\n const radius = this.shapeRadius();\n const size = this.radiusToSymbolSize(radius);\n const strokeWidth = 1;\n let shapePadding = this.itemPadding();\n if (this.orientation() === \"horizontal\") {\n shapePadding += maxLabelWidth - radius * 2;\n }\n const ordinal = scaleOrdinal().domain(dataArr.map((row) => row[1])).range(dataArr.map((row) => row[0]));\n this._legendOrdinal.shape(\"path\", d3Symbol().type(this._symbolTypeMap[this.symbolType()]).size(size)()).orient(this.orientation()).title(this.title()).labelWrap(this.labelMaxWidth()).labelAlign(this.labelAlign()).shapePadding(shapePadding).scale(ordinal).labels((d) => dataArr[d.i][2]);\n this._g.call(this._legendOrdinal);\n this.updateDisabled(element, dataArr);\n const legendCellsBbox = this._g.select(\".legendCells\").node().getBBox();\n let offsetX = Math.abs(legendCellsBbox.x);\n let offsetY = Math.abs(legendCellsBbox.y) + strokeWidth;\n if (this.orientation() === \"horizontal\") {\n if (this.labelAlign() === \"start\") {\n offsetX += strokeWidth;\n } else if (this.labelAlign() === \"end\") {\n offsetX -= strokeWidth;\n }\n if (this.width() > legendCellsBbox.width) {\n const extraWidth = this.width() - legendCellsBbox.width;\n offsetX += extraWidth / 2;\n }\n } else if (this.orientation() === \"vertical\") {\n offsetX += strokeWidth;\n if (this._containerSize.height > legendCellsBbox.height) {\n const extraHeight = this.height() - legendCellsBbox.height;\n offsetY += extraHeight / 2;\n }\n }\n this._g.attr(\"transform\", `translate(${offsetX}, ${offsetY})`);\n this.pos({\n x: 0,\n y: 0\n });\n this._legendOrdinal.labelOffset(this.itemPadding());\n const legendTotal = this._g.selectAll(\".legendTotal\").data(dataArr.length && this.showLegendTotal() ? [total] : []);\n const totalText = `Total: ${total}`;\n const totalOffsetX = -offsetX;\n const totalOffsetY = legendCellsBbox.height + this.itemPadding() + strokeWidth;\n this.enableOverflowScroll(false);\n this.enableOverflow(true);\n legendTotal.enter().append(\"text\").classed(\"legendTotal\", true).merge(legendTotal).attr(\"transform\", `translate(${totalOffsetX}, ${totalOffsetY})`).text(totalText);\n legendTotal.exit().remove();\n }\n updateDisabled(element, dataArr) {\n element.style(\"cursor\", \"pointer\").selectAll(\"path.swatch\").filter((d, i) => i < dataArr.length).style(\"stroke\", (d, i) => dataArr[i][0]).style(\n \"fill\",\n (d, i) => this._disabled.indexOf(d) < 0 ? dataArr[i][0] : \"white\"\n );\n }\n postUpdate(domNode, element) {\n let w;\n if (this._boundingBox) {\n w = this._boundingBox.width;\n this._boundingBox.width = this._size.width;\n }\n super.postUpdate(domNode, element);\n if (w !== void 0) {\n this._boundingBox.width = w;\n }\n this._parentRelativeDiv.style(\"overflow\", \"hidden\");\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n radiusToSymbolSize(radius) {\n const circleSize = Math.pow(radius, 2) * Math.PI;\n switch (this.symbolType()) {\n case \"star\":\n return circleSize * 0.45;\n case \"triangle\":\n return circleSize * 0.65;\n case \"cross\":\n case \"diamond\":\n case \"wye\":\n return circleSize * 0.75;\n case \"circle\":\n return circleSize;\n case \"square\":\n return circleSize * 1.3;\n }\n }\n onClick(d, domNode) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n const disabledIdx = this._disabled.indexOf(d);\n if (disabledIdx < 0) {\n this._disabled.push(d);\n } else {\n this._disabled.splice(disabledIdx, 1);\n }\n this._owner.refreshColumns();\n this._owner.refreshData();\n this._owner.render();\n break;\n }\n break;\n }\n }\n onOver(d, domNode) {\n if (instanceOfIHighlight(this._owner)) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n if (this._disabled.indexOf(d) < 0) {\n this._owner.highlightColumn(d);\n }\n break;\n }\n break;\n }\n }\n }\n onOut(d, domNode) {\n if (instanceOfIHighlight(this._owner)) {\n switch (this.getPaletteType()) {\n case \"ordinal\":\n switch (this.dataFamily()) {\n case \"2D\":\n case \"ND\":\n this._owner.highlightColumn();\n break;\n }\n break;\n }\n }\n }\n onDblClick(rowData, rowIdx) {\n }\n onMouseOver(rowData, rowIdx) {\n }\n _containerSize;\n resize(_size) {\n let retVal;\n if (this.fitToContent()) {\n this._containerSize = _size;\n const bbox = this.getBBox();\n if (_size.width > bbox.width) {\n bbox.width = _size.width;\n }\n if (_size.height > bbox.height) {\n bbox.height = _size.height;\n }\n retVal = super.resize.apply(this, [{ ...bbox }]);\n } else {\n retVal = super.resize.apply(this, arguments);\n }\n return retVal;\n }\n};\n__name(_Legend, \"Legend\");\nlet Legend = _Legend;\nLegend.prototype._class += \" layout_Legend\";\nLegend.prototype.publish(\"title\", \"\", \"string\", \"Title\");\nLegend.prototype.publish(\"symbolType\", \"circle\", \"set\", \"Shape of each legend item\", [\"circle\", \"cross\", \"diamond\", \"square\", \"star\", \"triangle\", \"wye\"]);\nLegend.prototype.publish(\"labelMaxWidth\", null, \"number\", \"Max Label Width (pixels)\", null, { optional: true });\nLegend.prototype.publish(\"orientation\", \"vertical\", \"set\", \"Orientation of Legend rows\", [\"vertical\", \"horizontal\"], { tags: [\"Private\"] });\nLegend.prototype.publish(\"dataFamily\", \"ND\", \"set\", \"Type of data\", [\"1D\", \"2D\", \"ND\", \"map\", \"graph\", \"any\"], { tags: [\"Private\"] });\nLegend.prototype.publish(\"rainbowFormat\", \",\", \"string\", \"Rainbow number formatting\", null, { tags: [\"Private\"], optional: true, disable: /* @__PURE__ */ __name((w) => !w.isRainbow(), \"disable\") });\nLegend.prototype.publish(\"rainbowBins\", 8, \"number\", \"Number of rainbow bins\", null, { tags: [\"Private\"], disable: /* @__PURE__ */ __name((w) => !w.isRainbow(), \"disable\") });\nLegend.prototype.publish(\"showSeriesTotal\", false, \"boolean\", \"Show value next to series\");\nLegend.prototype.publish(\"showLegendTotal\", false, \"boolean\", \"Show a total of the series values under the legend\", null);\nLegend.prototype.publish(\"itemPadding\", 8, \"number\", \"Padding between legend items (pixels)\");\nLegend.prototype.publish(\"shapeRadius\", 7, \"number\", \"Radius of legend shape (pixels)\");\nLegend.prototype.publish(\"fitToContent\", true, \"boolean\", \"If true, resize will simply reapply the bounding box dimensions\");\nLegend.prototype.publish(\"labelAlign\", \"start\", \"set\", \"Horizontal alignment of legend item label (for horizontal orientation only)\", [\"start\", \"middle\", \"end\"], { optional: true, disable: /* @__PURE__ */ __name((w) => w.orientation() === \"vertical\", \"disable\") });\nconst _Modal = class _Modal extends HTMLWidget {\n _widget;\n _relativeTarget;\n _fade;\n _modal;\n _modalHeader;\n _modalBody;\n _modalHeaderAnnotations;\n _modalHeaderCloseButton;\n _close;\n constructor() {\n super();\n this._tag = \"div\";\n }\n closeModal() {\n this.visible(false);\n }\n getRelativeTarget() {\n let relativeTarget;\n if (this.relativeTargetId()) {\n relativeTarget = document.getElementById(this.relativeTargetId());\n if (relativeTarget) {\n return relativeTarget;\n }\n }\n if (!relativeTarget) {\n relativeTarget = this.locateAncestor(\"layout_Grid\");\n if (relativeTarget && relativeTarget.element) {\n return relativeTarget.element().node();\n }\n }\n return document.body;\n }\n setModalSize() {\n if (this.fixedHeight() !== null && this.fixedWidth() !== null) {\n this._modal.style(\"height\", this.fixedHeight()).style(\"width\", this.fixedWidth()).style(\"min-height\", null).style(\"min-width\", null).style(\"max-height\", null).style(\"max-width\", null);\n } else if (this.minHeight() || this.minWidth()) {\n this._modal.style(\"min-height\", this.minHeight()).style(\"min-width\", this.minWidth()).style(\"max-height\", this.maxHeight()).style(\"max-width\", this.maxWidth());\n }\n const modalRect = this._modal.node().getBoundingClientRect();\n const headerRect = this._modalHeader.node().getBoundingClientRect();\n this._modalBody.style(\"height\", modalRect.height - headerRect.height + \"px\").style(\"width\", modalRect.width);\n return modalRect;\n }\n setFadePosition(rect) {\n this._fade.style(\"top\", rect.top + \"px\").style(\"left\", rect.left + \"px\").style(\"width\", rect.width + \"px\").style(\"height\", rect.height + \"px\");\n }\n setModalPosition(rect) {\n const modalRect = this.setModalSize();\n if (this.fixedTop() !== null && this.fixedLeft() !== null) {\n this._modal.style(\"top\", `calc(${this.fixedTop()} + ${rect.top}px)`).style(\"left\", `calc(${this.fixedLeft()} + ${rect.left}px)`);\n } else if (this.fixedHeight() !== null && this.fixedWidth() !== null) {\n this._modal.style(\"top\", rect.top + rect.height / 2 - modalRect.height / 2 + \"px\").style(\"left\", rect.left + rect.width / 2 - modalRect.width / 2 + \"px\");\n } else if (this.minHeight() || this.minWidth()) {\n const contentRect = this._modal.node().getBoundingClientRect();\n this._modal.style(\"top\", rect.top + rect.height / 2 - contentRect.height / 2 + \"px\").style(\"left\", rect.left + rect.width / 2 - contentRect.width / 2 + \"px\");\n }\n }\n resize(size) {\n super.resize();\n if (this._modal) this.setModalSize();\n return this;\n }\n resizeBodySync(width, height) {\n const header = this._modalHeader.node();\n const headerRect = header.getBoundingClientRect();\n this._modal.style(\"width\", width + \"px\").style(\"height\", height + headerRect.height + \"px\").style(\"min-width\", width + \"px\").style(\"min-height\", height + headerRect.height + \"px\");\n this._modalHeader.style(\"width\", width + \"px\");\n this._modalBody.style(\"width\", width + \"px\").style(\"height\", height + \"px\");\n return this.minWidth(width + \"px\").minHeight(height + headerRect.height + \"px\").resize({\n height: height + headerRect.height,\n width\n });\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._fade = element.append(\"div\").classed(\"layout_Modal-fade\", true).classed(\"layout_Modal-fadeClickable\", this.enableClickFadeToClose()).classed(\"layout_Modal-fade-hidden\", !this.showFade());\n const header_h = this.titleFontSize() * 2;\n this._modal = element.append(\"div\").classed(\"layout_Modal-content\", true);\n this._modalHeader = this._modal.append(\"div\").classed(\"layout_Modal-header\", true).style(\"color\", this.titleFontColor()).style(\"font-size\", this.titleFontSize() + \"px\").style(\"height\", header_h + \"px\");\n this._modalBody = this._modal.append(\"div\").classed(\"layout_Modal-body\", true).style(\"height\", `calc( 100% - ${header_h}px )`).style(\"overflow-x\", this.overflowX()).style(\"overflow-y\", this.overflowY());\n this._modalHeader.append(\"div\").classed(\"layout_Modal-title\", true).style(\"line-height\", this.titleFontSize() + \"px\").style(\"top\", this.titleFontSize() / 2 + \"px\").style(\"left\", this.titleFontSize() / 2 + \"px\").text(this.formattedTitle());\n this._modalHeaderAnnotations = this._modalHeader.append(\"div\").classed(\"layout_Modal-annotations\", true);\n this._modalHeaderCloseButton = this._modalHeaderAnnotations.append(\"div\").classed(\"layout_Modal-closeButton\", true).html('<i class=\"fa fa-close\"></i>');\n this._modalHeaderAnnotations.style(\"line-height\", this.titleFontSize() + \"px\").style(\"right\", this.titleFontSize() / 2 + \"px\").style(\"top\", this.titleFontSize() / 2 + \"px\");\n this._modalHeaderCloseButton.on(\"click\", () => {\n this.closeModal();\n });\n this._fade.on(\"click\", (n) => {\n if (this.enableClickFadeToClose()) {\n this.closeModal();\n }\n });\n }\n update(domNode, element) {\n super.update(domNode, element);\n element.style(\"display\", this.show() ? null : \"none\");\n this._fade.classed(\"layout_Modal-fade-hidden\", !this.showFade());\n this._relativeTarget = this.getRelativeTarget();\n this.setModalSize();\n const rect = this._relativeTarget.getBoundingClientRect();\n this.setFadePosition(rect);\n this.setModalPosition(rect);\n if (this.show()) {\n if (!this._widget.target()) {\n this._widget.target(this._modalBody.node());\n }\n this._widget.resize().render();\n } else {\n this._widget.target(null).render();\n }\n }\n exit(domNode, element) {\n if (this._widget) {\n this._widget.target(null);\n }\n super.exit(domNode, element);\n }\n formattedTitle() {\n const title = this.title_exists() ? this.title().trim() : \"\";\n if (title.length > 0 && title.slice(0, 1) === \"(\" && title.slice(-1) === \")\") {\n return title.slice(1, -1);\n }\n return this.title();\n }\n};\n__name(_Modal, \"Modal\");\nlet Modal = _Modal;\nModal.prototype._class += \" layout_Modal\";\nModal.prototype.publish(\"title\", null, \"string\", \"title\");\nModal.prototype.publish(\"widget\", null, \"widget\", \"widget\");\nModal.prototype.publish(\"titleFontSize\", 18, \"number\", \"titleFontSize (in pixels)\");\nModal.prototype.publish(\"titleFontColor\", \"#ffffff\", \"html-color\", \"titleFontColor\");\nModal.prototype.publish(\"relativeTargetId\", null, \"string\", \"relativeTargetId\");\nModal.prototype.publish(\"show\", true, \"boolean\", \"show\");\nModal.prototype.publish(\"showFade\", true, \"boolean\", \"showFade\");\nModal.prototype.publish(\"enableClickFadeToClose\", true, \"boolean\", \"enableClickFadeToClose\");\nModal.prototype.publish(\"minWidth\", \"400px\", \"string\", \"minWidth\");\nModal.prototype.publish(\"minHeight\", \"400px\", \"string\", \"minHeight\");\nModal.prototype.publish(\"maxWidth\", \"800px\", \"string\", \"maxWidth\");\nModal.prototype.publish(\"maxHeight\", \"800px\", \"string\", \"maxHeight\");\nModal.prototype.publish(\"fixedWidth\", null, \"string\", \"fixedWidth\");\nModal.prototype.publish(\"fixedHeight\", null, \"string\", \"fixedHeight\");\nModal.prototype.publish(\"fixedTop\", null, \"string\", \"fixedTop\");\nModal.prototype.publish(\"fixedLeft\", null, \"string\", \"fixedLeft\");\nModal.prototype.publish(\"overflowX\", \"hidden\", \"string\", \"overflowX\");\nModal.prototype.publish(\"overflowY\", \"scroll\", \"string\", \"overflowY\");\nconst _ChartPanel = class _ChartPanel extends Border2 {\n _legend = new Legend(this).enableOverflow(true);\n _progressBar = new ProgressBar();\n _autoScale = false;\n _resolutions = {\n tiny: { width: 100, height: 100 },\n small: { width: 300, height: 300 }\n };\n _modal = new Modal();\n _highlight;\n _scale;\n _orig_size;\n _toggleInfo = new ToggleButton().faChar(\"fa-info-circle\").tooltip(\".Description\").selected(false).on(\"enabled\", () => {\n return this.description() !== \"\";\n }).on(\"click\", () => {\n if (this._toggleInfo.selected()) {\n this._modal.title(this.title()).widget(new Text().text(this.description())).show(true).render();\n const origCloseFunc = this._modal._close;\n this._modal._close = () => {\n this._toggleInfo.selected(false).render();\n this._modal._close = origCloseFunc;\n };\n }\n }).on(\"mouseMove\", () => {\n }).on(\"mouseOut\", () => {\n });\n _toggleData = new ToggleButton().faChar(\"fa-table\").tooltip(\"Data\").on(\"click\", () => {\n this.dataVisible(this._toggleData.selected());\n this.render();\n });\n _buttonDownload = new Button().faChar(\"fa-download\").tooltip(\"Download\").on(\"click\", () => {\n this.downloadCSV();\n });\n _buttonDownloadImage = new Button().faChar(\"fa-image\").tooltip(\"Download Image\").on(\"click\", () => {\n this.downloadPNG();\n });\n _toggleLegend = new ToggleButton().faChar(\"fa-list-ul\").tooltip(\"Legend\").selected(false).on(\"click\", () => {\n const selected = this._toggleLegend.selected();\n if (this.legendPosition() === \"bottom\") {\n this.showBottom(selected);\n } else if (this.legendPosition() === \"right\") {\n this.showRight(selected);\n }\n this.legendVisible(selected);\n this.render();\n });\n _spacer = new Spacer();\n _titleBar = new TitleBar().buttons([this._toggleData, this._buttonDownload, this._buttonDownloadImage, this._spacer, this._toggleLegend]);\n _carousel = new Carousel();\n _table = new Table();\n _widget;\n _hideLegendToggleList = [\"dgrid_Table\"];\n constructor() {\n super();\n this._tag = \"div\";\n }\n fields(_) {\n if (!arguments.length) return super.fields();\n super.fields(_);\n this._legend.fields(_);\n this.refreshFields();\n return this;\n }\n refreshFields() {\n this._widget.fields(this._legend.filteredFields());\n this._table.fields(this._legend.filteredFields());\n return this;\n }\n columns(_, asDefault) {\n if (!arguments.length) return super.columns();\n super.columns(_, asDefault);\n this._legend.columns(_, asDefault);\n this.refreshColumns();\n return this;\n }\n refreshColumns() {\n this._widget.columns(this._legend.filteredColumns());\n this._table.columns(this._legend.filteredColumns());\n return this;\n }\n data(_) {\n if (!arguments.length) return super.data();\n super.data(_);\n this._legend.data(_);\n this.refreshData();\n return this;\n }\n refreshData() {\n this._widget.data(this._legend.filteredData());\n this._table.data(this._legend.filteredData());\n return this;\n }\n highlight(_) {\n if (!arguments.length) return this._highlight;\n this._highlight = _;\n return this;\n }\n startProgress() {\n this._progressBar.start();\n }\n finishProgress() {\n this._progressBar.finish();\n }\n buttons(_) {\n if (!arguments.length) return this._titleBar.buttons();\n this._titleBar.buttons(_);\n return this;\n }\n downloadCSV() {\n const namePrefix = this.downloadTitle() ? this.downloadTitle() : this.title() ? this.title() : \"data\";\n const nameSuffix = this.downloadTimestampSuffix() ? \"_\" + Utility.timestamp() : \"\";\n Utility.downloadString(\"CSV\", this._widget.export(\"CSV\"), namePrefix + nameSuffix);\n return this;\n }\n downloadPNG() {\n const widget = this.widget();\n if (widget instanceof SVGWidget) {\n if (!this.legendVisible()) {\n widget.downloadPNG(this.title());\n } else {\n widget.downloadPNG(this.title(), void 0, this._legend);\n }\n }\n return this;\n }\n highlightColumn(column) {\n if (column) {\n const cssTag = `series-${this.cssTag(column)}`;\n this._centerWA.element().selectAll(\".series\").each(function() {\n const element = select(this);\n const highlight = element.classed(cssTag);\n element.classed(\"highlight\", highlight).classed(\"lowlight\", !highlight);\n });\n } else {\n this._centerWA.element().selectAll(\".series\").classed(\"highlight\", false).classed(\"lowlight\", false);\n }\n return this;\n }\n getResponsiveMode() {\n if (!this.enableAutoscaling()) return \"none\";\n if (!this._autoScale) return \"regular\";\n if (this.size().width <= this._resolutions.tiny.width || this.size().height <= this._resolutions.tiny.height) {\n return \"tiny\";\n } else if (this.size().width <= this._resolutions.small.width || this.size().height <= this._resolutions.small.height) {\n return \"small\";\n }\n return \"regular\";\n }\n setOrigSize() {\n this._orig_size = JSON.parse(JSON.stringify(this.size()));\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._modal.target(this.target()).relativeTargetId(this.id());\n this.top(this._titleBar);\n this.center(this._carousel);\n this._legend.targetWidget(this._widget).orientation(\"vertical\").title(\"\").visible(false);\n this._progressBar.enter(domNode, element);\n this.setOrigSize();\n }\n preUpdateTiny(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"none\");\n }\n preUpdateSmall(element) {\n const scale_x = this._orig_size.width / this._resolutions.small.width;\n const scale_y = this._orig_size.height / this._resolutions.small.height;\n this._scale = Math.min(scale_x, scale_y);\n const x_is_smaller = this._scale === scale_x;\n this.size({\n width: x_is_smaller ? this._resolutions.small.width : this._orig_size.width * (1 / this._scale),\n height: !x_is_smaller ? this._resolutions.small.height : this._orig_size.height * (1 / this._scale)\n });\n element.select(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"lhs\").style(\"display\", \"none\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n element.style(\"transform\", `scale(${this._scale})`);\n }\n preUpdateRegular(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n element.select(\"div.title-icon\").style(\"position\", \"static\");\n element.style(\"transform\", \"translate(0px,0px) scale(1)\");\n }\n _prevdataVisible;\n _prevlegendVisible;\n _prevLegendPosition;\n _prevChartDataFamily;\n _prevChart;\n _prevButtons;\n update(domNode, element) {\n super.update(domNode, element);\n }\n preUpdate(domNode, element) {\n super.preUpdate(domNode, element);\n if (this._prevLegendPosition !== this.legendPosition()) {\n if (this._legend.target() !== null) this._legend.target(null);\n if (this._prevLegendPosition !== void 0) {\n this.swap(this._prevLegendPosition, this.legendPosition());\n } else {\n this[this.legendPosition()](this._legend);\n }\n if (this.legendPosition() === \"right\") {\n this.rightOverflowX(\"hidden\");\n this.rightOverflowY(\"auto\");\n this.bottomOverflowX(\"visible\");\n this.bottomOverflowY(\"visible\");\n } else {\n this.rightOverflowX(\"visible\");\n this.rightOverflowY(\"visible\");\n this.bottomOverflowX(\"auto\");\n this.bottomOverflowY(\"hidden\");\n }\n this._prevLegendPosition = this.legendPosition();\n }\n if (this._prevdataVisible !== this.dataVisible()) {\n this._prevdataVisible = this.dataVisible();\n this._toggleData.selected(this._prevdataVisible);\n this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);\n this._carousel.active(this._prevdataVisible ? 1 : 0);\n }\n if (this._prevlegendVisible !== this.legendVisible()) {\n this._prevlegendVisible = this.legendVisible();\n this._toggleLegend.selected(this._prevlegendVisible);\n this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);\n }\n this._legend.orientation(this.legendPosition() === \"bottom\" ? \"horizontal\" : \"vertical\");\n this.showLeft(!this.left());\n switch (this.getResponsiveMode()) {\n case \"tiny\":\n this.preUpdateTiny(element);\n break;\n case \"small\":\n this.preUpdateSmall(element);\n break;\n case \"regular\":\n this.preUpdateRegular(element);\n break;\n }\n const chart = this._widget.classID() === \"composite_MultiChart\" ? this._widget[\"chart\"]() : this._widget;\n this._legend.dataFamily(chart._dataFamily || \"any\");\n if (this._prevChartDataFamily !== this._legend.dataFamily()) {\n this._prevChartDataFamily = this._legend.dataFamily();\n switch (this._prevChartDataFamily) {\n case \"any\":\n this._toggleLegend.selected(false);\n this._legend.visible(false);\n break;\n }\n }\n element.style(\"box-shadow\", this.highlight() ? `inset 0px 0px 0px ${this.highlightSize()}px ${this.highlightColor()}` : \"none\");\n if (this._hideLegendToggleList.indexOf(chart.classID()) !== -1) {\n this._spacer.visible(false);\n this._toggleLegend.visible(false);\n } else {\n this._spacer.visible(true);\n this._toggleLegend.visible(true);\n }\n if (this._prevChart !== chart) {\n this._prevChart = chart;\n const widgetIconBar = chart ? chart[\"_titleBar\"] || chart[\"_iconBar\"] : void 0;\n if (widgetIconBar && widgetIconBar instanceof IconBar) {\n this._prevButtons = this._prevButtons || [...this.buttons()];\n const buttons = [\n ...widgetIconBar.buttons(),\n new Spacer(),\n ...this._prevButtons\n ];\n widgetIconBar.buttons([]).render();\n this.buttons(buttons);\n } else if (this._prevButtons) {\n this.buttons(this._prevButtons);\n }\n }\n const hiddenButtons = [];\n if (!this.dataButtonVisible()) hiddenButtons.push(this._toggleData);\n if (!this.downloadButtonVisible()) hiddenButtons.push(this._buttonDownload);\n if (!this.downloadImageButtonVisible()) hiddenButtons.push(this._buttonDownloadImage);\n if (!this.legendButtonVisible()) hiddenButtons.push(this._toggleLegend);\n this._buttonDownloadImage.enabled(this.widget() instanceof SVGWidget);\n this._titleBar.hiddenButtons(hiddenButtons).visible(this.titleVisible());\n this.topOverlay(this.titleOverlay() || !this.titleVisible());\n }\n postUpdate(domNode, element) {\n super.postUpdate(domNode, element);\n switch (this.getResponsiveMode()) {\n case \"tiny\":\n this.postUpdateTiny(element);\n break;\n case \"small\":\n this.postUpdateSmall(element);\n break;\n case \"regular\":\n this.postUpdateRegular(element);\n break;\n }\n }\n postUpdateTiny(element) {\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"none\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"visible\").style(\"font-size\", this.titleIconFontSize() / 3 + \"px\").style(\"line-height\", this.titleIconFontSize() / 3 + \"px\").style(\"left\", this.titleIconFontSize() + \"px\").text(this.data().length);\n element.style(\"transform\", \"translate(0px,0px) scale(1)\");\n const iconDiv = element.selectAll(\"div.title-icon\");\n const _node = iconDiv.node();\n const _container = element.node().parentElement;\n const containerRect = _container.getBoundingClientRect();\n if (_node) {\n const rect = iconDiv.node().getBoundingClientRect();\n const icon_top = containerRect.height / 2;\n iconDiv.style(\"position\", \"absolute\").style(\"left\", `calc(50% - ${rect.width / 2}px)`).style(\"top\", `${icon_top - rect.height / 2}px`);\n element.selectAll(\"div.data-count\").style(\"position\", \"absolute\").style(\"left\", `calc(50% + ${rect.width / 2}px)`).style(\"top\", `${icon_top - rect.height / 2}px`);\n }\n }\n postUpdateSmall(element) {\n element.selectAll(\"lhs\").style(\"display\", \"none\");\n element.selectAll(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n const rect = element.node().getBoundingClientRect();\n const parentRect = element.node().parentElement.getBoundingClientRect();\n element.style(\"transform\", `translate(${parentRect.x - rect.x}px, ${parentRect.y - rect.y}px) scale(${this._scale})`);\n }\n postUpdateRegular(element) {\n element.selectAll(\"div.title-icon\").style(\"position\", \"static\");\n element.selectAll(\"div.body,div.title-text,div.icon-bar\").style(\"display\", \"\");\n element.selectAll(\"div.data-count\").style(\"visibility\", \"hidden\");\n }\n exit(domNode, element) {\n this._progressBar.exit(domNode, element);\n this.right(null);\n this._legend.target(null);\n this.center(null);\n this._carousel.target(null);\n this.top(null);\n this._titleBar.target(null);\n this._modal.target(null);\n delete this._prevChart;\n delete this._prevButtons;\n delete this._prevChartDataFamily;\n delete this._prevPos;\n delete this._prevdataVisible;\n delete this._prevlegendVisible;\n super.exit(domNode, element);\n }\n // Event Handlers ---\n // Events ---\n click(row, column, selected) {\n }\n dblclick(row, column, selected) {\n }\n vertex_click(row, col, sel, more) {\n if (more && more.vertex) ;\n }\n vertex_dblclick(row, col, sel, more) {\n if (more && more.vertex) ;\n }\n edge_click(row, col, sel, more) {\n if (more && more.edge) ;\n }\n edge_dblclick(row, col, sel, more) {\n if (more && more.edge) ;\n }\n};\n__name(_ChartPanel, \"ChartPanel\");\nlet ChartPanel = _ChartPanel;\nChartPanel.prototype._class += \" layout_ChartPanel\";\nChartPanel.prototype.publishReset();\nChartPanel.prototype.publishProxy(\"title\", \"_titleBar\");\nChartPanel.prototype.publish(\"titleVisible\", true, \"boolean\");\nChartPanel.prototype.publish(\"titleOverlay\", false, \"boolean\");\nChartPanel.prototype.publishProxy(\"titleIcon\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleIconFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleIconFontSize\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"titleFontSize\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"description\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"descriptionFont\", \"_titleBar\");\nChartPanel.prototype.publishProxy(\"descriptionFontSize\", \"_titleBar\");\nChartPanel.prototype.publish(\"dataVisible\", false, \"boolean\", \"Show data table\");\nChartPanel.prototype.publish(\"dataButtonVisible\", true, \"boolean\", \"Show data table button\");\nChartPanel.prototype.publish(\"downloadButtonVisible\", true, \"boolean\", \"Show data download button\");\nChartPanel.prototype.publish(\"downloadImageButtonVisible\", false, \"boolean\", \"Show image download button\");\nChartPanel.prototype.publish(\"downloadTitle\", \"\", \"string\", \"File name when downloaded\");\nChartPanel.prototype.publish(\"downloadTimestampSuffix\", true, \"boolean\", \"Use timestamp as file name suffix\");\nChartPanel.prototype.publish(\"legendVisible\", false, \"boolean\", \"Show legend\");\nChartPanel.prototype.publish(\"legendButtonVisible\", true, \"boolean\", \"Show legend button\");\nChartPanel.prototype.publish(\"legendPosition\", \"right\", \"set\", \"Position of legend\", [\"right\", \"bottom\"]);\nChartPanel.prototype.publishProxy(\"legend_labelMaxWidth\", \"_legend\", \"labelMaxWidth\");\nChartPanel.prototype.publishProxy(\"legend_showSeriesTotal\", \"_legend\", \"showSeriesTotal\");\nChartPanel.prototype.publishProxy(\"legend_showLegendTotal\", \"_legend\", \"showLegendTotal\");\nChartPanel.prototype.publishProxy(\"legend_itemPadding\", \"_legend\", \"itemPadding\");\nChartPanel.prototype.publishProxy(\"legend_shapeRadius\", \"_legend\", \"shapeRadius\");\nChartPanel.prototype.publishProxy(\"legend_symbolType\", \"_legend\", \"symbolType\");\nChartPanel.prototype.publishProxy(\"legend_labelAlign\", \"_legend\", \"labelAlign\");\nChartPanel.prototype.publish(\"widget\", null, \"widget\", \"Widget\", void 0, { render: false });\nChartPanel.prototype.publish(\"enableAutoscaling\", false, \"boolean\");\nChartPanel.prototype.publish(\"highlightSize\", 4, \"number\");\nChartPanel.prototype.publish(\"highlightColor\", \"#e67e22\", \"html-color\");\nChartPanel.prototype.publishProxy(\"progress_halfLife\", \"_progressBar\", \"halfLife\");\nChartPanel.prototype.publishProxy(\"progress_decay\", \"_progressBar\", \"decay\");\nChartPanel.prototype.publishProxy(\"progress_size\", \"_progressBar\", \"size\");\nChartPanel.prototype.publishProxy(\"progress_color\", \"_progressBar\", \"color\");\nChartPanel.prototype.publishProxy(\"progress_blurBar\", \"_progressBar\", \"blurBar\");\nChartPanel.prototype.publishProxy(\"progress_blurSize\", \"_progressBar\", \"blurSize\");\nChartPanel.prototype.publishProxy(\"progress_blurColor\", \"_progressBar\", \"blurColor\");\nChartPanel.prototype.publishProxy(\"progress_blurOpacity\", \"_progressBar\", \"blurOpacity\");\nChartPanel.prototype.widget = function(_) {\n if (!arguments.length) return this._widget;\n this._carousel.widgets([_, this._table]);\n this._widget = _;\n this._widget.fields(this._legend.filteredFields()).data(this._legend.filteredData());\n const context = this;\n const tmpAny = this._widget;\n tmpAny.click = function() {\n context.click.apply(context, arguments);\n };\n tmpAny.dblclick = function() {\n context.dblclick.apply(context, arguments);\n };\n tmpAny.vertex_click = function() {\n context.vertex_click.apply(context, arguments);\n };\n tmpAny.vertex_dblclick = function() {\n context.vertex_dblclick.apply(context, arguments);\n };\n tmpAny.edge_click = function() {\n context.edge_click.apply(context, arguments);\n };\n tmpAny.edge_dblclick = function() {\n context.edge_dblclick.apply(context, arguments);\n };\n return this;\n};\nconst _FlexGrid = class _FlexGrid extends HTMLWidget {\n constructor() {\n super();\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n select(domNode.parentNode).style(\"height\", \"100%\").style(\"width\", \"100%\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n const cachedSizes = [];\n this.updateFlexParent(element);\n const listItems = element.selectAll(\".FlexGrid-list-item\").data(this.widgets(), (w) => w.id());\n listItems.enter().append(\"div\").classed(\"FlexGrid-list-item\", true).each(function(w) {\n w.target(this);\n }).merge(listItems).style(\"min-height\", this.itemMinHeight() + \"px\").style(\"min-width\", this.itemMinWidth() + \"px\").style(\"flex-basis\", (n, i) => {\n const flexBasis = this.widgetsFlexBasis()[i];\n return typeof flexBasis !== \"undefined\" ? flexBasis : this.flexBasis();\n }).style(\"flex-grow\", (n, i) => {\n const flexGrow = this.widgetsFlexGrow()[i];\n return typeof flexGrow !== \"undefined\" ? flexGrow : this.flexGrow();\n }).style(\"border-width\", this.borderWidth() + \"px\").style(\"border-color\", this.itemBorderColor()).each(function() {\n this.firstChild.style.display = \"none\";\n }).each(function() {\n const rect = this.getBoundingClientRect();\n cachedSizes.push([\n rect.width,\n rect.height\n ]);\n }).each(function(w, i) {\n this.firstChild.style.display = \"block\";\n w.resize({\n width: cachedSizes[i][0] - 2 * context.borderWidth(),\n height: cachedSizes[i][1] - 2 * context.borderWidth()\n });\n });\n listItems.exit().remove();\n }\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n updateFlexParent(element) {\n element.style(\"height\", \"100%\").style(\"flex-direction\", this.orientation() === \"horizontal\" ? \"row\" : \"column\").style(\"flex-wrap\", this.flexWrap()).style(\"align-items\", this.alignItems()).style(\"align-content\", this.alignContent()).style(\"overflow-x\", () => {\n if (this.forceXScroll() || this.orientation() === \"horizontal\" && this.flexWrap() === \"nowrap\" && !this.disableScroll()) {\n return \"scroll\";\n }\n return \"hidden\";\n }).style(\"overflow-y\", () => {\n if (this.forceYScroll() || this.orientation() === \"vertical\" && this.flexWrap() === \"nowrap\" && !this.disableScroll()) {\n return \"scroll\";\n }\n return \"hidden\";\n });\n }\n};\n__name(_FlexGrid, \"FlexGrid\");\nlet FlexGrid = _FlexGrid;\nFlexGrid.prototype._class += \" layout_FlexGrid\";\nFlexGrid.prototype.publish(\"itemBorderColor\", \"transparent\", \"html-color\", \"Color of list item borders\");\nFlexGrid.prototype.publish(\"borderWidth\", 0, \"number\", \"Width of list item borders (pixels)\");\nFlexGrid.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"Controls the flex-direction of the list items\", [\"horizontal\", \"vertical\"]);\nFlexGrid.prototype.publish(\"flexWrap\", \"wrap\", \"set\", \"Controls the line wrap when overflow occurs\", [\"nowrap\", \"wrap\", \"wrap-reverse\"]);\nFlexGrid.prototype.publish(\"disableScroll\", false, \"boolean\", \"If false, scrollbar will show (when flexWrap is set to 'nowrap')\", null, { disable: /* @__PURE__ */ __name((w) => w.flexWrap() !== \"nowrap\", \"disable\") });\nFlexGrid.prototype.publish(\"forceXScroll\", false, \"boolean\", \"If true, horzontal scrollbar will show\");\nFlexGrid.prototype.publish(\"forceYScroll\", false, \"boolean\", \"If true, vertical scrollbar will show\");\nFlexGrid.prototype.publish(\"itemMinHeight\", 64, \"number\", \"Minimum height of a list item (pixels)\");\nFlexGrid.prototype.publish(\"itemMinWidth\", 64, \"number\", \"Minimum width of a list item (pixels)\");\nFlexGrid.prototype.publish(\"alignItems\", \"stretch\", \"set\", \"Controls normal alignment of items\", [\"flex-start\", \"center\", \"flex-end\", \"stretch\"]);\nFlexGrid.prototype.publish(\"alignContent\", \"stretch\", \"set\", \"Controls normal alignment of item rows\", [\"flex-start\", \"center\", \"flex-end\", \"stretch\", \"space-between\", \"space-around\"]);\nFlexGrid.prototype.publish(\"flexGrow\", 1, \"number\", \"Default flex-grow style for all list items\");\nFlexGrid.prototype.publish(\"flexBasis\", \"10%\", \"string\", \"Default flex-basis style for all list items\");\nFlexGrid.prototype.publish(\"widgetsFlexGrow\", [], \"array\", \"Array of flex-grow values keyed on the widgets array\");\nFlexGrid.prototype.publish(\"widgetsFlexBasis\", [], \"array\", \"Array of flex-basis values keyed on the widgets array\");\nFlexGrid.prototype.publish(\"widgets\", [], \"widgetArray\", \"Array of widgets to be rendered as list items\");\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\n__name(getDefaultExportFromCjs, \"getDefaultExportFromCjs\");\nvar gridList$2 = { exports: {} };\nvar gridList$1 = gridList$2.exports;\nvar hasRequiredGridList;\nfunction requireGridList() {\n if (hasRequiredGridList) return gridList$2.exports;\n hasRequiredGridList = 1;\n (function(module, exports) {\n (function(root, factory) {\n {\n module.exports = factory();\n }\n })(gridList$1, function() {\n var GridList2 = /* @__PURE__ */ __name(function(items, options) {\n this._options = options;\n for (var k2 in this.defaults) {\n if (!this._options.hasOwnProperty(k2)) {\n this._options[k2] = this.defaults[k2];\n }\n }\n this.items = items;\n this._adjustSizeOfItems();\n this.generateGrid();\n }, \"GridList\");\n GridList2.cloneItems = function(items, _items) {\n var i, k2;\n if (_items === void 0) {\n _items = [];\n }\n for (i = 0; i < items.length; i++) {\n if (!_items[i]) {\n _items[i] = {};\n }\n for (k2 in items[i]) {\n _items[i][k2] = items[i][k2];\n }\n }\n return _items;\n };\n GridList2.prototype = {\n defaults: {\n lanes: 5,\n direction: \"horizontal\"\n },\n /**\n * Illustates grid as text-based table, using a number identifier for each\n * item. E.g.\n *\n * #| 0 1 2 3 4 5 6 7 8 9 10 11 12 13\n * --------------------------------------------\n * 0| 00 02 03 04 04 06 08 08 08 12 12 13 14 16\n * 1| 01 -- 03 05 05 07 09 10 11 11 -- 13 15 --\n *\n * Warn: Does not work if items don't have a width or height specified\n * besides their position in the grid.\n */\n toString: /* @__PURE__ */ __name(function() {\n var widthOfGrid = this.grid.length, output = \"\\n #|\", border = \"\\n --\", item, i, j;\n for (i = 0; i < widthOfGrid; i++) {\n output += \" \" + this._padNumber(i, \" \");\n border += \"---\";\n }\n output += border;\n for (i = 0; i < this._options.lanes; i++) {\n output += \"\\n\" + this._padNumber(i, \" \") + \"|\";\n for (j = 0; j < widthOfGrid; j++) {\n output += \" \";\n item = this.grid[j][i];\n output += item ? this._padNumber(this.items.indexOf(item), \"0\") : \"--\";\n }\n }\n output += \"\\n\";\n return output;\n }, \"toString\"),\n generateGrid: /* @__PURE__ */ __name(function() {\n var i;\n this._resetGrid();\n for (i = 0; i < this.items.length; i++) {\n this._markItemPositionToGrid(this.items[i]);\n }\n }, \"generateGrid\"),\n resizeGrid: /* @__PURE__ */ __name(function(lanes) {\n var currentColumn = 0;\n this._options.lanes = lanes;\n this._adjustSizeOfItems();\n this._sortItemsByPosition();\n this._resetGrid();\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i], position = this._getItemPosition(item);\n this._updateItemPosition(\n item,\n this.findPositionForItem(item, { x: currentColumn, y: 0 })\n );\n currentColumn = Math.max(currentColumn, position.x);\n }\n this._pullItemsToLeft();\n }, \"resizeGrid\"),\n findPositionForItem: /* @__PURE__ */ __name(function(item, start, fixedRow) {\n var x, y, position;\n for (x = start.x; x < this.grid.length; x++) {\n if (fixedRow !== void 0) {\n position = [x, fixedRow];\n if (this._itemFitsAtPosition(item, position)) {\n return position;\n }\n } else {\n for (y = start.y; y < this._options.lanes; y++) {\n position = [x, y];\n if (this._itemFitsAtPosition(item, position)) {\n return position;\n }\n }\n }\n }\n var newCol = this.grid.length, newRow = 0;\n if (fixedRow !== void 0 && this._itemFitsAtPosition(item, [newCol, fixedRow])) {\n newRow = fixedRow;\n }\n return [newCol, newRow];\n }, \"findPositionForItem\"),\n moveItemToPosition: /* @__PURE__ */ __name(function(item, newPosition) {\n var position = this._getItemPosition({\n x: newPosition[0],\n y: newPosition[1],\n w: item.w,\n h: item.h\n });\n this._updateItemPosition(item, [position.x, position.y]);\n this._resolveCollisions(item);\n }, \"moveItemToPosition\"),\n resizeItem: /* @__PURE__ */ __name(function(item, size) {\n var width = size.w || item.w, height = size.h || item.h;\n this._updateItemSize(item, width, height);\n this._resolveCollisions(item);\n this._pullItemsToLeft();\n }, \"resizeItem\"),\n getChangedItems: /* @__PURE__ */ __name(function(initialItems, idAttribute) {\n var changedItems = [];\n for (var i = 0; i < initialItems.length; i++) {\n var item = this._getItemByAttribute(\n idAttribute,\n initialItems[i][idAttribute]\n );\n if (item.x !== initialItems[i].x || item.y !== initialItems[i].y || item.w !== initialItems[i].w || item.h !== initialItems[i].h) {\n changedItems.push(item);\n }\n }\n return changedItems;\n }, \"getChangedItems\"),\n _sortItemsByPosition: /* @__PURE__ */ __name(function() {\n this.items.sort((function(item1, item2) {\n var position1 = this._getItemPosition(item1), position2 = this._getItemPosition(item2);\n if (position1.x != position2.x) {\n return position1.x - position2.x;\n }\n if (position1.y != position2.y) {\n return position1.y - position2.y;\n }\n return 0;\n }).bind(this));\n }, \"_sortItemsByPosition\"),\n _adjustSizeOfItems: /* @__PURE__ */ __name(function() {\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i];\n if (item.autoSize === void 0) {\n item.autoSize = item.w === 0 || item.h === 0;\n }\n if (item.autoSize) {\n if (this._options.direction === \"horizontal\") {\n item.h = this._options.lanes;\n } else {\n item.w = this._options.lanes;\n }\n }\n }\n }, \"_adjustSizeOfItems\"),\n _resetGrid: /* @__PURE__ */ __name(function() {\n this.grid = [];\n }, \"_resetGrid\"),\n _itemFitsAtPosition: /* @__PURE__ */ __name(function(item, newPosition) {\n var position = this._getItemPosition(item), x, y;\n if (newPosition[0] < 0 || newPosition[1] < 0) {\n return false;\n }\n if (newPosition[1] + position.h > this._options.lanes) {\n return false;\n }\n for (x = newPosition[0]; x < newPosition[0] + position.w; x++) {\n var col = this.grid[x];\n if (!col) {\n continue;\n }\n for (y = newPosition[1]; y < newPosition[1] + position.h; y++) {\n if (col[y] && col[y] !== item) {\n return false;\n }\n }\n }\n return true;\n }, \"_itemFitsAtPosition\"),\n _updateItemPosition: /* @__PURE__ */ __name(function(item, position) {\n if (item.x !== null && item.y !== null) {\n this._deleteItemPositionFromGrid(item);\n }\n this._setItemPosition(item, position);\n this._markItemPositionToGrid(item);\n }, \"_updateItemPosition\"),\n _updateItemSize: /* @__PURE__ */ __name(function(item, width, height) {\n if (item.x !== null && item.y !== null) {\n this._deleteItemPositionFromGrid(item);\n }\n item.w = width;\n item.h = height;\n this._markItemPositionToGrid(item);\n }, \"_updateItemSize\"),\n _markItemPositionToGrid: /* @__PURE__ */ __name(function(item) {\n var position = this._getItemPosition(item), x, y;\n this._ensureColumns(position.x + position.w);\n for (x = position.x; x < position.x + position.w; x++) {\n for (y = position.y; y < position.y + position.h; y++) {\n this.grid[x][y] = item;\n }\n }\n }, \"_markItemPositionToGrid\"),\n _deleteItemPositionFromGrid: /* @__PURE__ */ __name(function(item) {\n var position = this._getItemPosition(item), x, y;\n for (x = position.x; x < position.x + position.w; x++) {\n if (!this.grid[x]) {\n continue;\n }\n for (y = position.y; y < position.y + position.h; y++) {\n if (this.grid[x][y] == item) {\n this.grid[x][y] = null;\n }\n }\n }\n }, \"_deleteItemPositionFromGrid\"),\n _ensureColumns: /* @__PURE__ */ __name(function(N) {\n var i;\n for (i = 0; i < N; i++) {\n if (!this.grid[i]) {\n this.grid.push(new GridCol(this._options.lanes));\n }\n }\n }, \"_ensureColumns\"),\n _getItemsCollidingWithItem: /* @__PURE__ */ __name(function(item) {\n var collidingItems = [];\n for (var i = 0; i < this.items.length; i++) {\n if (item != this.items[i] && this._itemsAreColliding(item, this.items[i])) {\n collidingItems.push(i);\n }\n }\n return collidingItems;\n }, \"_getItemsCollidingWithItem\"),\n _itemsAreColliding: /* @__PURE__ */ __name(function(item1, item2) {\n var position1 = this._getItemPosition(item1), position2 = this._getItemPosition(item2);\n return !(position2.x >= position1.x + position1.w || position2.x + position2.w <= position1.x || position2.y >= position1.y + position1.h || position2.y + position2.h <= position1.y);\n }, \"_itemsAreColliding\"),\n _resolveCollisions: /* @__PURE__ */ __name(function(item) {\n if (!this._tryToResolveCollisionsLocally(item)) {\n this._pullItemsToLeft(item);\n }\n this._pullItemsToLeft();\n }, \"_resolveCollisions\"),\n _tryToResolveCollisionsLocally: /* @__PURE__ */ __name(function(item) {\n var collidingItems = this._getItemsCollidingWithItem(item);\n if (!collidingItems.length) {\n return true;\n }\n var _gridList = new GridList2([], this._options), leftOfItem, rightOfItem, aboveOfItem, belowOfItem;\n GridList2.cloneItems(this.items, _gridList.items);\n _gridList.generateGrid();\n for (var i = 0; i < collidingItems.length; i++) {\n var collidingItem = _gridList.items[collidingItems[i]], collidingPosition = this._getItemPosition(collidingItem);\n var position = this._getItemPosition(item);\n leftOfItem = [position.x - collidingPosition.w, collidingPosition.y];\n rightOfItem = [position.x + position.w, collidingPosition.y];\n aboveOfItem = [collidingPosition.x, position.y - collidingPosition.h];\n belowOfItem = [collidingPosition.x, position.y + position.h];\n if (_gridList._itemFitsAtPosition(collidingItem, leftOfItem)) {\n _gridList._updateItemPosition(collidingItem, leftOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, aboveOfItem)) {\n _gridList._updateItemPosition(collidingItem, aboveOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, belowOfItem)) {\n _gridList._updateItemPosition(collidingItem, belowOfItem);\n } else if (_gridList._itemFitsAtPosition(collidingItem, rightOfItem)) {\n _gridList._updateItemPosition(collidingItem, rightOfItem);\n } else {\n return false;\n }\n }\n GridList2.cloneItems(_gridList.items, this.items);\n this.generateGrid();\n return true;\n }, \"_tryToResolveCollisionsLocally\"),\n _pullItemsToLeft: /* @__PURE__ */ __name(function(fixedItem) {\n this._sortItemsByPosition();\n this._resetGrid();\n if (fixedItem) {\n var fixedPosition = this._getItemPosition(fixedItem);\n this._updateItemPosition(fixedItem, [fixedPosition.x, fixedPosition.y]);\n }\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i], position = this._getItemPosition(item);\n if (fixedItem && item == fixedItem) {\n continue;\n }\n var x = this._findLeftMostPositionForItem(item), newPosition = this.findPositionForItem(\n item,\n { x, y: 0 },\n position.y\n );\n this._updateItemPosition(item, newPosition);\n }\n }, \"_pullItemsToLeft\"),\n _findLeftMostPositionForItem: /* @__PURE__ */ __name(function(item) {\n var tail = 0, position = this._getItemPosition(item);\n for (var i = 0; i < this.grid.length; i++) {\n for (var j = position.y; j < position.y + position.h; j++) {\n var otherItem = this.grid[i][j];\n if (!otherItem) {\n continue;\n }\n var otherPosition = this._getItemPosition(otherItem);\n if (this.items.indexOf(otherItem) < this.items.indexOf(item)) {\n tail = otherPosition.x + otherPosition.w;\n }\n }\n }\n return tail;\n }, \"_findLeftMostPositionForItem\"),\n _getItemByAttribute: /* @__PURE__ */ __name(function(key, value) {\n for (var i = 0; i < this.items.length; i++) {\n if (this.items[i][key] === value) {\n return this.items[i];\n }\n }\n return null;\n }, \"_getItemByAttribute\"),\n _padNumber: /* @__PURE__ */ __name(function(nr, prefix) {\n return nr >= 10 ? nr : prefix + nr;\n }, \"_padNumber\"),\n _getItemPosition: /* @__PURE__ */ __name(function(item) {\n if (this._options.direction === \"horizontal\") {\n return item;\n } else {\n return {\n x: item.y,\n y: item.x,\n w: item.h,\n h: item.w\n };\n }\n }, \"_getItemPosition\"),\n _setItemPosition: /* @__PURE__ */ __name(function(item, position) {\n if (this._options.direction === \"horizontal\") {\n item.x = position[0];\n item.y = position[1];\n } else {\n item.x = position[1];\n item.y = position[0];\n }\n }, \"_setItemPosition\")\n };\n var GridCol = /* @__PURE__ */ __name(function(lanes) {\n for (var i = 0; i < lanes; i++) {\n this.push(null);\n }\n }, \"GridCol\");\n GridCol.prototype = [];\n return GridList2;\n });\n })(gridList$2);\n return gridList$2.exports;\n}\n__name(requireGridList, \"requireGridList\");\nvar gridListExports = requireGridList();\nconst gridList = /* @__PURE__ */ getDefaultExportFromCjs(gridListExports);\nconst _GridList = /* @__PURE__ */ _mergeNamespaces({\n __proto__: null,\n default: gridList\n}, [gridListExports]);\nconst GridList = _GridList && gridList || _GridList;\nconst _Grid = class _Grid extends HTMLWidget {\n divItems;\n gridList;\n items;\n itemsMap;\n origItems;\n cellWidth;\n cellHeight;\n dragItem;\n dragItemPos;\n _d3Drag;\n _d3DragResize;\n _selectionBag;\n _scrollBarWidth;\n constructor() {\n super();\n this._tag = \"div\";\n this._selectionBag = new Utility.Selection(this);\n this.content([]);\n }\n getDimensions() {\n const size = { width: 0, height: 0 };\n this.content().forEach(function(cell) {\n if (size.width < cell.gridCol() + cell.gridColSpan()) {\n size.width = cell.gridCol() + cell.gridColSpan();\n }\n if (size.height < cell.gridRow() + cell.gridRowSpan()) {\n size.height = cell.gridRow() + cell.gridRowSpan();\n }\n }, this);\n return size;\n }\n clearContent(widget) {\n this.content(this.content().filter(function(contentWidget) {\n if (!widget) {\n contentWidget.target(null);\n return false;\n }\n let w = contentWidget;\n while (w) {\n if (widget === w) {\n contentWidget.target(null);\n return false;\n }\n w = w.widget ? w.widget() : null;\n }\n return true;\n }));\n }\n setContent(row, col, widget, title, rowSpan, colSpan) {\n rowSpan = rowSpan || 1;\n colSpan = colSpan || 1;\n title = title || \"\";\n this.content(this.content().filter(function(contentWidget) {\n if (contentWidget.gridRow() === row && contentWidget.gridCol() === col) {\n contentWidget.target(null);\n return false;\n }\n return true;\n }));\n if (widget) {\n const cell = new Cell().gridRow(row).gridCol(col).widget(widget).title(title).gridRowSpan(rowSpan).gridColSpan(colSpan);\n this.content().push(cell);\n }\n return this;\n }\n sortedContent() {\n return this.content().sort(function(l, r) {\n if (l.gridRow() === r.gridRow()) {\n return l.gridCol() - r.gridCol();\n }\n return l.gridRow() - r.gridRow();\n });\n }\n getCell(row, col) {\n let retVal = null;\n this.content().some(function(cell) {\n if (row >= cell.gridRow() && row < cell.gridRow() + cell.gridRowSpan() && col >= cell.gridCol() && col < cell.gridCol() + cell.gridColSpan()) {\n retVal = cell;\n return true;\n }\n return false;\n });\n return retVal;\n }\n getWidgetCell(id) {\n let retVal = null;\n this.content().some(function(cell) {\n if (cell.widget().id() === id) {\n retVal = cell;\n return true;\n }\n return false;\n });\n return retVal;\n }\n getContent(id) {\n let retVal = null;\n this.content().some(function(cell) {\n if (cell.widget().id() === id) {\n retVal = cell.widget();\n return true;\n }\n return false;\n });\n return retVal;\n }\n cellToGridItem(cell) {\n return {\n x: cell.gridCol(),\n y: cell.gridRow(),\n w: cell.gridColSpan(),\n h: cell.gridRowSpan(),\n id: cell.id(),\n cell\n };\n }\n gridItemToCell(item) {\n item.cell.gridCol(item.x).gridRow(item.y).gridColSpan(item.w).gridRowSpan(item.h);\n }\n resetItemsPos() {\n this.origItems.forEach(function(origItem) {\n const item = this.itemsMap[origItem.id];\n item.x = origItem.x;\n item.y = origItem.y;\n }, this);\n }\n initGridList() {\n this.itemsMap = {};\n this.items = this.content().map(function(cell) {\n const retVal = this.cellToGridItem(cell);\n this.itemsMap[retVal.id] = retVal;\n return retVal;\n }, this);\n this.origItems = this.content().map(this.cellToGridItem);\n this.gridList = new GridList(this.items, {\n direction: this.snapping(),\n lanes: this.snapping() === \"horizontal\" ? this.snappingRows() : this.snappingColumns()\n });\n }\n killGridList() {\n this.gridList = null;\n delete this.items;\n delete this.itemsMap;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._scrollBarWidth = Platform.getScrollbarWidth();\n const context = this;\n this._d3Drag = drag().subject(function(_d) {\n const d = context.cellToGridItem(_d);\n return { x: d.x * context.cellWidth, y: d.y * context.cellHeight };\n }).on(\"start\", function(_d) {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.initGridList();\n const d = context.itemsMap[_d.id()];\n context.dragItem = element.append(\"div\").attr(\"class\", \"dragging\").style(\"transform\", function() {\n return \"translate(\" + d.x * context.cellWidth + \"px, \" + d.y * context.cellHeight + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight - context.gutter() + \"px\";\n });\n context.selectionBagClick(_d);\n }).on(\"drag\", function(_d) {\n if (!context.designMode()) return;\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const d = context.itemsMap[_d.id()];\n if (event.x < 0) {\n event.x = 0;\n }\n if (event.x + d.w * context.cellWidth > context.snappingColumns() * context.cellWidth) {\n event.x = context.snappingColumns() * context.cellWidth - d.w * context.cellWidth;\n }\n if (event.y < 0) {\n event.y = 0;\n }\n if (event.y + d.h * context.cellWidth > context.snappingRows() * context.cellWidth) {\n event.y = context.snappingRows() * context.cellWidth - d.h * context.cellWidth;\n }\n const pos = [Math.max(0, Math.floor((event.x + context.cellWidth / 2) / context.cellWidth)), Math.max(0, Math.floor((event.y + context.cellHeight / 2) / context.cellHeight))];\n if (d.x !== pos[0] || d.y !== pos[1]) {\n if (context.snapping() !== \"none\") {\n context.resetItemsPos();\n context.gridList.moveItemToPosition(d, pos);\n } else {\n d.x = pos[0];\n d.y = pos[1];\n }\n if (_d.gridCol() !== d.x || _d.gridRow() !== d.y) {\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(false, 100);\n }\n }\n context.dragItem.style(\"transform\", function() {\n return \"translate(\" + event.x + \"px, \" + event.y + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight + \"px\";\n });\n }).on(\"end\", function() {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.dragItem.remove();\n context.dragItem = null;\n context.killGridList();\n });\n this._d3DragResize = drag().subject(function(_d) {\n const d = context.cellToGridItem(_d);\n return { x: (d.x + d.w - 1) * context.cellWidth, y: (d.y + d.h - 1) * context.cellHeight };\n }).on(\"start\", function(_d) {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.initGridList();\n const d = context.itemsMap[_d.id()];\n context.dragItem = element.append(\"div\").attr(\"class\", \"resizing\").style(\"transform\", function() {\n return \"translate(\" + d.x * context.cellWidth + \"px, \" + d.y * context.cellHeight + \"px)\";\n }).style(\"width\", function() {\n return d.w * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return d.h * context.cellHeight - context.gutter() + \"px\";\n });\n context.dragItemPos = { x: d.x, y: d.y };\n }).on(\"drag\", function(_d) {\n if (!context.designMode()) return;\n const event = d3Event();\n event.sourceEvent.stopPropagation();\n const d = context.itemsMap[_d.id()];\n const pos = [Math.max(0, Math.round(event.x / context.cellWidth)), Math.max(0, Math.round(event.y / context.cellHeight))];\n const size = {\n w: Math.max(1, pos[0] - d.x + 1),\n h: Math.max(1, pos[1] - d.y + 1)\n };\n if (d.w !== size.w || d.h !== size.h) {\n if (context.snapping() !== \"none\") {\n context.resetItemsPos();\n context.gridList.resizeItem(d, size);\n } else {\n d.w = size.w;\n d.h = size.h;\n }\n if (_d.gridColSpan() !== d.w || _d.gridRowSpan() !== d.h) {\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(d.id, 100);\n }\n }\n context.dragItem.style(\"width\", function() {\n return (-d.x + 1) * context.cellWidth + event.x - context.gutter() + \"px\";\n }).style(\"height\", function() {\n return (-d.y + 1) * context.cellHeight + event.y - context.gutter() + \"px\";\n });\n }).on(\"end\", function() {\n if (!context.designMode()) return;\n d3Event().sourceEvent.stopPropagation();\n context.dragItem.remove();\n context.dragItem = null;\n context.killGridList();\n });\n }\n updateGrid(resize, transitionDuration = 0, _noRender = false) {\n transitionDuration = transitionDuration || 0;\n const context = this;\n this.divItems.classed(\"draggable\", this.designMode()).transition().duration(transitionDuration).style(\"left\", function(d) {\n return d.gridCol() * context.cellWidth + context.gutter() / 2 + \"px\";\n }).style(\"top\", function(d) {\n return d.gridRow() * context.cellHeight + context.gutter() / 2 + \"px\";\n }).style(\"width\", function(d) {\n return d.gridColSpan() * context.cellWidth - context.gutter() + \"px\";\n }).style(\"height\", function(d) {\n return d.gridRowSpan() * context.cellHeight - context.gutter() + \"px\";\n }).on(\"end\", function(d) {\n d.surfaceShadow_default(context.surfaceShadow()).surfacePadding_default(context.surfacePadding()).surfaceBorderWidth_default(context.surfaceBorderWidth()).surfaceBackgroundColor_default(context.surfaceBackgroundColor());\n if (resize === true || resize === d.id()) {\n d.resize().lazyRender();\n }\n });\n }\n update(domNode, element2) {\n super.update(domNode, element2);\n this._placeholderElement.style(\"overflow-x\", this.fitTo() === \"width\" ? \"hidden\" : null);\n this._placeholderElement.style(\"overflow-y\", this.fitTo() === \"width\" ? \"scroll\" : null);\n const dimensions = this.getDimensions();\n const clientWidth = this.width() - (this.fitTo() === \"width\" ? this._scrollBarWidth : 0);\n this.cellWidth = clientWidth / dimensions.width;\n this.cellHeight = this.fitTo() === \"all\" ? this.height() / dimensions.height : this.cellWidth;\n if (this.designMode()) {\n const cellLaneRatio = Math.min(this.width() / this.snappingColumns(), this.height() / this.snappingRows());\n const laneWidth = Math.floor(cellLaneRatio);\n this.cellWidth = laneWidth;\n this.cellHeight = this.cellWidth;\n }\n const context = this;\n const divItems = element2.selectAll(\"#\" + this.id() + \" > .ddCell\").data(this.content(), function(d) {\n return d.id();\n });\n this.divItems = divItems.enter().append(\"div\").attr(\"class\", \"ddCell\").each(function(d) {\n d.target(this);\n d.__grid_watch = d.monitor(function(key, newVal, oldVal) {\n if (context._renderCount && (key === \"snapping\" || key.indexOf(\"grid\") === 0) && newVal !== oldVal) {\n if (!context.gridList) {\n context.initGridList();\n if (context.snapping() !== \"none\") {\n context.gridList.resizeGrid(context.snapping() === \"horizontal\" ? context.snappingRows() : context.snappingColumns());\n }\n context.items.forEach(context.gridItemToCell);\n context.updateGrid(d.id(), 100);\n context.killGridList();\n }\n }\n });\n const element = select(this);\n element.append(\"div\").attr(\"class\", \"resizeHandle\").call(context._d3DragResize).append(\"div\").attr(\"class\", \"resizeHandleDisplay\");\n }).merge(divItems);\n this.divItems.each(function(d) {\n const element = select(this);\n if (context.designMode()) {\n element.call(context._d3Drag);\n } else {\n element.on(\"mousedown.drag\", null).on(\"touchstart.drag\", null);\n }\n });\n this.divItems.select(\".resizeHandle\").style(\"display\", this.designMode() ? null : \"none\");\n this.updateGrid(true);\n divItems.exit().each(function(d) {\n d.target(null);\n if (d.__grid_watch) {\n d.__grid_watch.remove();\n }\n }).remove();\n const lanesBackground = element2.selectAll(\"#\" + this.id() + \" > .laneBackground\").data(this.designMode() ? [\"\"] : []);\n lanesBackground.enter().insert(\"div\", \":first-child\").attr(\"class\", \"laneBackground\").style(\"left\", \"1px\").style(\"top\", \"1px\").on(\"click\", function() {\n context.selectionBagClear();\n }).merge(lanesBackground).style(\"width\", this.snappingColumns() * this.cellWidth + \"px\").style(\"height\", this.snappingRows() * this.cellHeight + \"px\");\n lanesBackground.exit().each(function() {\n context.selectionBagClear();\n }).remove();\n const lanes = element2.selectAll(\"#\" + this.id() + \" > .lane\").data(this.designMode() ? [\"\"] : []);\n lanes.enter().append(\"div\").attr(\"class\", \"lane\").style(\"left\", \"1px\").style(\"top\", \"1px\");\n lanes.style(\"display\", this.showLanes() ? null : \"none\").style(\"width\", this.snappingColumns() * this.cellWidth + \"px\").style(\"height\", this.snappingRows() * this.cellHeight + \"px\").style(\"background-image\", \"linear-gradient(to right, grey 1px, transparent 1px), linear-gradient(to bottom, grey 1px, transparent 1px)\").style(\"background-size\", this.cellWidth + \"px \" + this.cellHeight + \"px\");\n lanes.exit().remove();\n }\n exit(domNode, element) {\n this.content().forEach((w) => w.target(null));\n super.exit(domNode, element);\n }\n _createSelectionObject(d) {\n return {\n _id: d._id,\n element: /* @__PURE__ */ __name(() => {\n return d._element;\n }, \"element\"),\n widget: d\n };\n }\n selection(_) {\n if (!arguments.length) return this._selectionBag.get().map(function(d) {\n return d._id;\n });\n this._selectionBag.set(_.map(function(row) {\n return this._createSelectionObject(row);\n }, this));\n return this;\n }\n selectionBagClear() {\n if (!this._selectionBag.isEmpty()) {\n this._selectionBag.clear();\n this.postSelectionChange();\n }\n }\n selectionBagClick(d) {\n if (d !== null) {\n const selectionObj = this._createSelectionObject(d);\n if (d3Event().sourceEvent.ctrlKey) {\n if (this._selectionBag.isSelected(selectionObj)) {\n this._selectionBag.remove(selectionObj);\n this.postSelectionChange();\n } else {\n this._selectionBag.append(selectionObj);\n this.postSelectionChange();\n }\n } else {\n const selected = this._selectionBag.get();\n if (selected.length === 1 && selected[0]._id === selectionObj._id) {\n this.selectionBagClear();\n } else {\n this._selectionBag.set([selectionObj]);\n }\n this.postSelectionChange();\n }\n }\n }\n postSelectionChange() {\n }\n applyLayout(layoutArr) {\n this.divItems.each((d, i) => {\n if (layoutArr[i]) {\n const [x, y, w, h] = layoutArr[i];\n d.gridCol(x).gridRow(y).gridColSpan(w).gridRowSpan(h);\n }\n });\n this.updateGrid(true);\n }\n vizActivation(elem) {\n }\n};\n__name(_Grid, \"Grid\");\nlet Grid = _Grid;\nGrid.prototype._class += \" layout_Grid\";\nGrid.prototype.publish(\"designMode\", false, \"boolean\", \"Design Mode\", null, { tags: [\"Basic\"] });\nGrid.prototype.publish(\"showLanes\", true, \"boolean\", \"Show snapping lanes when in design mode\", null, { tags: [\"Basic\"], disable: /* @__PURE__ */ __name((w) => !w.designMode(), \"disable\") });\nGrid.prototype.publish(\"fitTo\", \"all\", \"set\", \"Sizing Strategy\", [\"all\", \"width\"], { tags: [\"Basic\"] });\nGrid.prototype.publish(\"snapping\", \"vertical\", \"set\", \"Snapping Strategy\", [\"vertical\", \"horizontal\", \"none\"]);\nGrid.prototype.publish(\"snappingColumns\", 12, \"number\", \"Snapping Columns\");\nGrid.prototype.publish(\"snappingRows\", 16, \"number\", \"Snapping Rows\");\nGrid.prototype.publish(\"gutter\", 6, \"number\", \"Gap Between Widgets\", null, { tags: [\"Basic\"] });\nGrid.prototype.publish(\"surfaceShadow\", true, \"boolean\", \"3D Shadow\");\nGrid.prototype.publish(\"surfacePadding\", null, \"string\", \"Cell Padding (px)\", null, { tags: [\"Intermediate\"] });\nGrid.prototype.publish(\"surfaceBorderWidth\", 1, \"number\", \"Width (px) of Cell Border\", null, { tags: [\"Intermediate\"] });\nGrid.prototype.publish(\"surfaceBackgroundColor\", null, \"html-color\", \"Surface Background Color\", null, { tags: [\"Advanced\"] });\nGrid.prototype.publish(\"content\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Basic\"], render: false });\nconst _HorizontalList = class _HorizontalList extends FlexGrid {\n constructor() {\n super();\n this.orientation_default(\"horizontal\");\n this.flexWrap_default(\"nowrap\");\n }\n};\n__name(_HorizontalList, \"HorizontalList\");\nlet HorizontalList = _HorizontalList;\nHorizontalList.prototype._class += \" layout_HorizontalList\";\nconst _Layered = class _Layered extends HTMLWidget {\n _contentContainer;\n _widgetPlacements;\n _widgetRatios;\n constructor() {\n super();\n this._tag = \"div\";\n this._widgetPlacements = [];\n this._widgetRatios = [];\n }\n addLayer(widget, placement = \"default\", widthRatio = 1, heightRatio = 1) {\n const widgets = this.widgets();\n widgets.push(widget ? widget : new Text().text(\"No widget defined for layer.\"));\n this.widgets(widgets);\n this._widgetPlacements.push(placement);\n this._widgetRatios.push([widthRatio, heightRatio]);\n return this;\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._contentContainer = element.append(\"div\").attr(\"class\", \"container\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.style(\"padding\", this.surfacePadding() + \"px\");\n const content = this._contentContainer.selectAll(\".content.id\" + this.id()).data(this.widgets(), function(d) {\n return d.id();\n });\n content.enter().append(\"div\").attr(\"class\", \"content id\" + this.id()).each(function(widget, idx) {\n widget.target(this);\n }).merge(content).each(function(widget, idx) {\n const clientSize = {\n width: context.clientWidth(),\n height: context.clientHeight()\n };\n const widgetSize = context.widgetSize(idx, clientSize);\n const widgetPosition = context.widgetPosition(idx, clientSize, widgetSize);\n this.style.top = widgetPosition.y + \"px\";\n this.style.left = widgetPosition.x + \"px\";\n widget.resize(widgetSize).render();\n });\n content.exit().each(function(widget, idx) {\n widget.target(null);\n }).remove();\n content.order();\n }\n widgetSize(idx, clientSize) {\n if (this._widgetPlacements[idx] === \"default\") {\n return {\n width: clientSize.width * this._widgetRatios[idx][0],\n height: clientSize.height * this._widgetRatios[idx][1]\n };\n } else {\n return {\n width: clientSize.width * this._widgetRatios[idx][0],\n height: clientSize.height * this._widgetRatios[idx][1]\n };\n }\n }\n widgetPosition(idx, clientSize, widgetSize) {\n switch (this._widgetPlacements[idx]) {\n default:\n return {\n x: 0,\n y: 0\n };\n case \"top\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: 0\n };\n case \"bottom\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: clientSize.height - widgetSize.height\n };\n case \"left\":\n return {\n x: 0,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n case \"right\":\n return {\n x: clientSize.width - widgetSize.width,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n case \"center\":\n return {\n x: clientSize.width / 2 - widgetSize.width / 2,\n y: clientSize.height / 2 - widgetSize.height / 2\n };\n }\n }\n};\n__name(_Layered, \"Layered\");\nlet Layered = _Layered;\nLayered.prototype._class += \" layout_Layered\";\nLayered.prototype.publish(\"surfacePadding\", 0, \"number\", \"Padding\");\nLayered.prototype.publish(\"widgets\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Private\"] });\nconst _Popup = class _Popup extends HTMLWidget {\n _surfaceButtons;\n _originalPosition;\n constructor() {\n super();\n this._tag = \"div\";\n this._surfaceButtons = [];\n }\n updateState(visible) {\n visible = visible || !this.popupState();\n this.popupState(visible).render();\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this.widget().target(domNode);\n this._originalPosition = this.position();\n }\n update(domNode, element) {\n super.update(domNode, element);\n element.style(\"visibility\", this.popupState() ? null : \"hidden\").style(\"opacity\", this.popupState() ? null : 0).style(\"width\", this.shrinkWrap() ? this.widget().width() + \"px\" : this._size.width + \"px\").style(\"height\", this.shrinkWrap() ? this.widget().height() + \"px\" : this._size.height + \"px\");\n if (this.widget().size().height === 0) {\n this.widget().resize(this.size());\n }\n }\n postUpdate(domNode, element) {\n let left;\n let top;\n switch (this.centerPopup()) {\n case \"container\":\n if (this._placeholderElement) {\n left = parseInt(this._placeholderElement.style(\"width\")) / 2 - this.widget().width() / 2;\n top = parseInt(this._placeholderElement.style(\"height\")) / 2 - this.widget().height() / 2;\n }\n this.position(\"absolute\");\n break;\n case \"window\":\n left = window.innerWidth / 2 - this.widget().width() / 2;\n top = window.innerHeight / 2 - this.widget().height() / 2;\n this.position(\"fixed\");\n break;\n default:\n left = 0;\n top = 0;\n this.position(this._originalPosition);\n break;\n }\n this.pos({ x: left, y: top });\n super.postUpdate(domNode, element);\n element.style(\"position\", this.position()).style(\"left\", this.left() + \"px\").style(\"right\", this.right() + \"px\").style(\"top\", this.top() + \"px\").style(\"bottom\", this.bottom() + \"px\");\n }\n exit(domNode, element) {\n if (this.widget()) {\n this.widget().target(null);\n }\n super.exit(domNode, element);\n }\n click(obj) {\n }\n};\n__name(_Popup, \"Popup\");\nlet Popup = _Popup;\nPopup.prototype._class += \" layout_Popup\";\nPopup.prototype.publish(\"popupState\", false, \"boolean\", \"State of the popup, visible (true) or hidden (false)\", null, {});\nPopup.prototype.publish(\"shrinkWrap\", false, \"boolean\", \"The popup parent container either shrinks to the size of its contents (true) or expands to fit thge popup's parentDiv (false)\", null, {});\nPopup.prototype.publish(\"centerPopup\", \"none\", \"set\", \"Center the widget in its container element (target) or in the window\", [\"none\", \"container\", \"window\"], {});\nPopup.prototype.publish(\"top\", null, \"number\", \"Top position property of popup\", null, {});\nPopup.prototype.publish(\"bottom\", null, \"number\", \"Bottom position property of popup\", null, {});\nPopup.prototype.publish(\"left\", null, \"number\", \"Left position property of popup\", null, {});\nPopup.prototype.publish(\"right\", null, \"number\", \"Right position property of popup\", null, {});\nPopup.prototype.publish(\"position\", \"relative\", \"set\", \"Value of the 'position' property\", [\"absolute\", \"relative\", \"fixed\", \"static\", \"initial\", \"inherit\"], { tags: [\"Private\"] });\nPopup.prototype.publish(\"widget\", null, \"widget\", \"Widget\", null, { tags: [\"Private\"] });\nconst _Tabbed = class _Tabbed extends HTMLWidget {\n _tabContainer;\n _contentContainer;\n constructor() {\n super();\n this._tag = \"div\";\n }\n clearTabs() {\n this.labels([]);\n this.widgets([]);\n return this;\n }\n addTab(widget, label, isActive, callback) {\n const widgetSize = widget.size();\n if (widgetSize.width === 0 && widgetSize.height === 0) {\n widget.size({ width: \"100%\", height: \"100%\" });\n }\n const labels = this.labels();\n const widgets = this.widgets();\n if (isActive) {\n this.activeTabIdx(this.widgets().length);\n }\n labels.push(label);\n const surface = new Surface().widget(widget ? widget : new Text().text(\"No widget defined for tab\"));\n widgets.push(surface);\n this.labels(labels);\n this.widgets(widgets);\n if (callback) {\n callback(surface);\n }\n return this;\n }\n widgetSize(widgetDiv) {\n const width = this.clientWidth();\n let height = this.clientHeight();\n const tcBox = this._tabContainer.node().getBoundingClientRect();\n if (typeof tcBox.height !== \"undefined\") {\n height -= tcBox.height;\n }\n return { width, height };\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tabContainer = element.append(\"div\");\n this._contentContainer = element.append(\"div\");\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.style(\"padding\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null);\n const tabs = this._tabContainer.selectAll(\".tab-button.id\" + this.id()).data(this.showTabs() ? this.labels() : [], function(d) {\n return d;\n });\n tabs.enter().append(\"span\").attr(\"class\", \"tab-button id\" + this.id()).style(\"cursor\", \"pointer\").on(\"click\", function(d, idx) {\n context.click(context.widgets()[idx].widget(), d, idx);\n context.activeTabIdx(idx).render();\n }).merge(tabs).classed(\"active\", function(d, idx) {\n return context.activeTabIdx() === idx;\n }).text(function(d) {\n return d;\n });\n tabs.exit().remove();\n const content = this._contentContainer.selectAll(\".tab-content.id\" + this.id()).data(this.widgets(), function(d) {\n return d.id();\n });\n content.enter().append(\"div\").attr(\"class\", \"tab-content id\" + this.id()).each(function(widget, idx) {\n widget.target(this);\n }).merge(content).classed(\"active\", function(d, idx) {\n return context.activeTabIdx() === idx;\n }).style(\"display\", function(d, idx) {\n return context.activeTabIdx() === idx ? \"block\" : \"none\";\n }).each(function(surface, idx) {\n surface.visible(context.activeTabIdx() === idx);\n if (context.activeTabIdx() === idx) {\n const wSize = context.widgetSize(select(this));\n surface.surfaceBorderWidth(context.showTabs() ? null : 0).surfacePadding(context.showTabs() ? null : 0).resize(wSize);\n }\n });\n content.exit().each(function(widget, idx) {\n widget.target(null);\n }).remove();\n switch (this.tabLocation()) {\n case \"bottom\":\n this._tabContainer.attr(\"class\", \"on_bottom\").style(\"top\", this._contentContainer.node().offsetHeight + this.surfacePadding() + \"px\").style(\"position\", \"absolute\");\n this._contentContainer.style(\"top\", this.surfacePadding_exists() ? this.surfacePadding() + \"px\" : null).style(\"position\", \"absolute\");\n break;\n default:\n this._tabContainer.attr(\"class\", \"on_top\").style(\"top\", null).style(\"position\", \"relative\");\n this._contentContainer.style(\"top\", this._tabContainer.node().offsetHeight + this.surfacePadding() + \"px\").style(\"position\", \"absolute\");\n break;\n }\n }\n click(widget, column, idx) {\n }\n};\n__name(_Tabbed, \"Tabbed\");\nlet Tabbed = _Tabbed;\nTabbed.prototype._class += \" layout_Tabbed\";\nTabbed.prototype.publish(\"showTabs\", true, \"boolean\", \"Show Tabs\", null, {});\nTabbed.prototype.publish(\"surfacePadding\", 4, \"number\", \"Padding\");\nTabbed.prototype.publish(\"activeTabIdx\", 0, \"number\", \"Index of active tab\", null, {});\nTabbed.prototype.publish(\"labels\", [], \"array\", \"Array of tab labels sharing an index with \", null, { tags: [\"Private\"] });\nTabbed.prototype.publish(\"tabLocation\", \"top\", \"set\", \"Position the tabs at the bottom of the widget\", [\"top\", \"bottom\"], { tags: [\"Private\"] });\nTabbed.prototype.publish(\"widgets\", [], \"widgetArray\", \"widgets\", null, { tags: [\"Private\"] });\nconst _Toolbar = class _Toolbar extends HTMLWidget {\n constructor() {\n super();\n this._tag = \"div\";\n }\n enter(domNode, element) {\n super.enter(domNode, element);\n }\n update(domNode, element) {\n super.update(domNode, element);\n const context = this;\n element.attr(\"title\", context.title()).style(\"background-color\", this.backgroundColor());\n const title = element.selectAll(\"div.toolbar-title\").data(this.title() ? [this.title()] : []);\n title.enter().append(\"div\").classed(\"toolbar-title\", true).append(\"span\");\n title.selectAll(\"div.toolbar-title > span\").style(\"font-size\", this.fontSize_exists() ? this.fontSize() + \"px\" : null).style(\"color\", this.fontColor_exists() ? this.fontColor() : null).style(\"font-family\", this.fontFamily_exists() ? this.fontFamily() : null).style(\"font-weight\", this.fontBold_exists() ? this.fontBold() ? \"bold\" : \"normal\" : null).style(\"background-color\", this.backgroundColor_exists() ? this.backgroundColor() : null).text(context.title());\n title.exit().remove();\n const childWidgets = element.selectAll(\"div.toolbar-child\").data(this.widgets() !== null ? this.widgets() : [], function(d) {\n return d.id();\n });\n childWidgets.enter().insert(\"div\", \"div.toolbar-title\").each(function(d, i) {\n const widgetClass = context.widgetClasses()[i] ? context.widgetClasses()[i] + \" toolbar-child\" : \"toolbar-child\";\n select(this).classed(widgetClass, true);\n d.target(this);\n });\n childWidgets.exit().each(function(d) {\n d.target(null);\n }).remove();\n childWidgets.order();\n }\n render(callback) {\n const context = this;\n return super.render(function(w) {\n const toolbarBBox = context.element().node().getBoundingClientRect();\n let minX = toolbarBBox.left + toolbarBBox.width;\n context.element().selectAll(\"div.toolbar-child\").each(function(d, i) {\n const childBBox = this.getBoundingClientRect();\n if (minX > childBBox.left)\n minX = childBBox.left;\n });\n context.element().select(\".toolbar-title\").style(\"width\", minX - toolbarBBox.left - 4 + \"px\");\n if (callback) {\n callback(w);\n }\n });\n }\n exit(domNode, element) {\n this.widgets().forEach(function(w) {\n w.target(null);\n });\n super.exit(domNode, element);\n }\n};\n__name(_Toolbar, \"Toolbar\");\nlet Toolbar = _Toolbar;\nToolbar.prototype._class += \" layout_Toolbar\";\nToolbar.prototype.publish(\"title\", \"\", \"string\", \"Title\", null, { tags: [\"Intermediate\"] });\nToolbar.prototype.publish(\"fontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"fontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], optional: true });\nToolbar.prototype.publish(\"backgroundColor\", null, \"html-color\", \"Background Color\", null, { tags: [\"Intermediate\"], optional: true });\nToolbar.prototype.publish(\"responsive\", true, \"boolean\", \"Adapts to pixel width\", null, { tags: [\"Basic\"] });\nToolbar.prototype.publish(\"widgets\", [], \"widgetArray\", \"Child widgets of the toolbar\", null, { tags: [\"Basic\"] });\nToolbar.prototype.publish(\"widgetClasses\", [], \"array\", \"Array of Html Element classes to be assigned to the child widgets (shares index with widgets param)\", null, { tags: [\"Basic\"] });\nconst _VerticalList = class _VerticalList extends FlexGrid {\n constructor() {\n super();\n this.orientation_default(\"vertical\");\n this.flexWrap_default(\"nowrap\");\n }\n};\n__name(_VerticalList, \"VerticalList\");\nlet VerticalList = _VerticalList;\nVerticalList.prototype._class += \" layout_VerticalList\";\nexport {\n AbsoluteSurface,\n Accordion,\n BUILD_VERSION,\n Border,\n Border2,\n Carousel,\n Cell,\n ChartPanel,\n FlexGrid,\n Grid,\n HorizontalList,\n Layered,\n Legend,\n Modal,\n PKG_NAME,\n PKG_VERSION,\n Popup,\n Surface,\n Tabbed,\n Toolbar,\n VerticalList,\n WidgetDiv\n};\n//# sourceMappingURL=index.js.map\n!function(){\"use strict\";try{if(\"undefined\"!=typeof document){var o=document.createElement(\"style\");o.appendChild(document.createTextNode('.layout_AbsoluteSurface{pointer-events:none!important}.layout_AbsoluteSurface>.placeholder{position:relative;overflow:hidden;pointer-events:all}.layout_Accordion>ul{position:relative}.layout_Accordion.open>span{font-style:italic}.layout_Accordion.closed>ul{height:0px;overflow:hidden}.layout_Accordion.open>ul{display:block}.layout_Accordion>.collapsible-icon,.layout_Accordion>.collapsible-title{cursor:pointer;box-sizing:border-box}.layout_Accordion>.collapsible-title{display:block;width:100%}.layout_Accordion>.collapsible-title{font-size:13px;color:#fff;padding:4px 8px;height:26px;-webkit-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);-moz-box-shadow:inset 0px -1px 1px 0px rgba(0,0,0,.2);box-shadow:inset 0 -1px 1px #0003}.layout_Accordion li{background-color:#fff}.layout_Accordion>ul,.layout_Accordion>.collapsible-title{background-color:#333}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>.collapsible-title{background-color:#555}.layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#777}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#999}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#bbb}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ccc}.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion .layout_Accordion>.collapsible-title{background-color:#ddd}.layout_Accordion>ul,.layout_Accordion>span{padding-left:0}.layout_Accordion .layout_Accordion>ul,.layout_Accordion .layout_Accordion>span{padding-left:12px}.layout_Accordion>.collapsible-title:before{padding:4px 8px;position:absolute;left:0;top:0}.layout_Accordion>.collapsible-icon{position:absolute;top:0;right:0;width:24px;height:24px;color:#fff}.layout_Surface{box-sizing:border-box;margin:0;border:1px solid #e5e5e5;overflow:hidden;height:100%;width:100%}.layout_Surface.shadow2{box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0003,0 1px 5px #0000001f}.layout_Surface>h3{margin:0;padding:2px;background-color:#e5e5e5}.layout_Surface .html-button-container{position:absolute;right:0;top:3px}.layout_Surface>div{padding:8px}.layout_Surface .html-button-container .surface-button{margin-right:5px}.layout_Surface .html-button-container .surface-button i{opacity:.8}.layout_Surface .html-button-container .surface-button:hover{opacity:1}.layout_Surface .html-button-container .surface-button:active{opacity:.5}div[draggable=true].hideDragCellContent.content-icon:before{content:\"\";font-family:FontAwesome;position:absolute;top:calc(50% - 74px);left:calc(50% - 56px);font-size:100px}div[draggable=true].hideDragCellContent.content-icon-Line:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Pie:before{top:calc(50% - 72px);left:calc(50% - 45px);content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Area:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Gauge:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Table:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Form:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Grid:before,div[draggable=true].hideDragCellContent.content-icon-Graph:before,div[draggable=true].hideDragCellContent.content-icon-Border:before,div[draggable=true].hideDragCellContent.content-icon-Tabbed:before,div[draggable=true].hideDragCellContent.content-icon-Accordion:before,div[draggable=true].hideDragCellContent.content-icon-MultiChart:before,div[draggable=true].hideDragCellContent.content-icon-MultiChartSurface:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-ChoroplethStates:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethStatesHeat:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCounties:before,div[draggable=true].hideDragCellContent.content-icon-ChoroplethCountries:before,div[draggable=true].hideDragCellContent.content-icon-GMap:before,div[draggable=true].hideDragCellContent.content-icon-GMapHeat:before,div[draggable=true].hideDragCellContent.content-icon-GMapGraph:before{content:\"\"}div[draggable=true].hideDragCellContent.content-icon-Text:before,div[draggable=true].hideDragCellContent.content-icon-TextBox:before,div[draggable=true].hideDragCellContent.content-icon-FAChar:before{content:\"\"}.layout_Cell .update-indicator{box-sizing:border-box;position:absolute;top:0;left:0;padding:0;z-index:1000;border-width:0px;border-style:solid;pointer-events:none}.layout_Border{width:100%;height:100%}.layout_Border>.border-content{width:100%;height:100%;position:relative}.layout_Border>.borderHandle{width:6px;height:6px;background-color:#444;opacity:.3;position:absolute;visibility:hidden}.layout_Border.design-mode>.borderHandle{visibility:visible}.layout_Border>.borderHandle:hover{background-color:#666}.layout_Border>.borderHandle.borderHandleDisabled{display:none}.layout_Border>.borderHandle_top,.layout_Border>.borderHandle_bottom{cursor:ns-resize}.layout_Border>.borderHandle_left,.layout_Border>.borderHandle_right{cursor:ew-resize}.layout_Border .cell{border-radius:5px;border:1px solid #e5e5e5;display:inline-block;overflow:hidden}.layout_Border .cell h2{margin:0;padding-top:4px;-webkit-margin:0px;text-align:center}.layout_Border .layout_BorderCell.over{border:2px dashed #000}.layout_Border .dragItem{z-index:-1;opacity:.33}.layout_Border .notDragItem{z-index:-1;opacity:1}.layout_Border div[draggable=true]{opacity:.75;cursor:default}.layout_Border div[draggable=true] .dragHandle{opacity:1}.layout_Border div[draggable=true] .dragHandle_n,.layout_Border div[draggable=true] .dragHandle_e,.layout_Border div[draggable=true] .dragHandle_s,.layout_Border div[draggable=true] .dragHandle_w{background-color:#aaa}.layout_Border div[draggable=true] .dragHandle_nw,.layout_Border div[draggable=true] .dragHandle_ne,.layout_Border div[draggable=true] .dragHandle_se,.layout_Border div[draggable=true] .dragHandle_sw{background-color:#333}.layout_Border div[draggable=true] .dragHandle_nw{cursor:nw-resize}.layout_Border div[draggable=true] .dragHandle_n{cursor:n-resize}.layout_Border div[draggable=true] .dragHandle_ne{cursor:ne-resize}.layout_Border div[draggable=true] .dragHandle_e{cursor:e-resize}.layout_Border div[draggable=true] .dragHandle_se{cursor:se-resize}.layout_Border div[draggable=true] .dragHandle_s{cursor:s-resize}.layout_Border div[draggable=true] .dragHandle_sw{cursor:sw-resize}.layout_Border div[draggable=true] .dragHandle_w{cursor:w-resize}.layout_Border div[draggable=false]>div>.dragHandle{display:none}.layout_Border .grid-drop-target{position:fixed;box-sizing:border-box;border:2px dashed #7f8c8d;border-radius:0;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Border .grid-drop-target.drop-target-over{border:2px dashed #179BD7;background:repeating-linear-gradient(-45deg,#0000,#0000 6px,#119bd71a 6px 12px)}.layout_Border2{display:flex;flex-direction:column}.layout_Border2>.body{margin:0;padding:0;display:flex;flex-flow:row}.layout_Border2>.body>.center{flex:1}.layout_Border2>.header{display:block}.layout_Border2>.footer{display:block}.layout_Carousel>div{position:relative;overflow:hidden}.layout_Carousel>div>.carouselItem{position:absolute}.layout_Modal-header{background-color:#3f51b5;overflow:hidden}.layout_Modal-body{background-color:#fff;overflow-y:scroll;overflow-x:hidden}.layout_Modal-title,.layout_Modal-annotations{position:absolute}.layout_Modal-closeButton{cursor:pointer}.layout_Modal-closeButton:hover{opacity:.7}.layout_Modal-closeButton:active{opacity:.5}.layout_Modal-fade{position:fixed;background-color:#000;opacity:.5;z-index:10000}.layout_Modal-content{position:fixed;background-color:#fff;z-index:10100}.layout_Modal-fade-hidden{display:none}.layout_Modal-fadeClickable{cursor:pointer}.layout_ChartPanel .series.highlight{stroke-width:2px;opacity:1}.layout_ChartPanel .series.lowlight{opacity:.3!important}.layout_FlexGrid{display:flex}.FlexGrid-list-item{overflow:hidden;border-style:solid;flex-grow:1}.layout_Grid>.ddCell{position:absolute}.layout_Grid>.laneBackground{position:absolute;border-style:solid;border-width:1px;background:#f5f5f5}.layout_Grid>.lane{position:absolute;border-style:none;opacity:.25;border-radius:0;pointer-events:none}.layout_Grid>.ddCell.draggable{border-style:solid;border-width:1px;background-color:#f8f8ff;border-radius:0;cursor:move}.layout_Grid>.ddCell.draggable>.resizeHandle{bottom:0;right:0;width:8px;height:8px;border-style:none;position:absolute;cursor:nwse-resize}.layout_Grid>.ddCell.draggable .resizeHandleDisplay{bottom:2px;right:2px;width:4px;height:4px;border-style:solid;border-left-width:0px;border-top-width:0px;border-right-width:2px;border-bottom-width:2px;border-color:#a9a9a9;background-color:none;position:absolute}.layout_Grid>.ddCell.draggable .resizeHandleDisplay:hover{border-color:orange}.layout_Grid>.dragging{border-style:solid;border-width:1px;border-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6464641a 4px 8px)}.layout_Grid>.resizing{border-style:solid;border-width:1px;border-color:gray;background-color:orange;border-radius:0;position:absolute;opacity:.3;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,orange 4px 8px)}.layout_Grid>.ddCell.draggable .common_Widget.selected{border-style:solid;border-width:1px;border-color:red;background-color:gray;border-radius:0;position:absolute;background:repeating-linear-gradient(-45deg,#0000,#0000 4px,#6400001a 4px 8px)}.layout_Grid #drag-me:before{content:\"#\" attr(id);font-weight:700}.layout_Layered{pointer-events:none}.layout_Layered>.container>.content{position:absolute}.layout_Layered>.container>.content>div>.common_Widget,.layout_Layered>.container>.content>div>svg>.common_Widget{pointer-events:all}.layout_Tabbed .tab-button{position:relative;top:1px;display:inline-block;border-left:1px solid #ddd;border-top:1px solid #ddd;border-right:1px solid #ddd;background-color:transparent;margin-right:4px;padding:2px 2px 4px;background-color:#ccc}.layout_Tabbed .tab-button.active{background-color:#fff;z-index:999}.layout_Tabbed .on_bottom .tab-button{border-bottom:1px solid #ddd;border-top:none;top:-1px}.layout_Toolbar{height:100%;background-color:#ddd;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-title{display:inline-block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);margin-left:4px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout_Toolbar .toolbar-child{position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);float:right;margin-left:4px;margin-right:4px;line-height:16px}')),document.head.appendChild(o)}}catch(e){console.error(\"vite-plugin-css-injected-by-js\",e)}}();\n","import { Utility } from \"@hpcc-js/common\";\n\ndeclare const require: any;\nexport function requireWidget(classID) {\n return new Promise(function (resolve, _reject) {\n const parsedClassID = Utility.parseClassID(classID);\n if (require) {\n require([parsedClassID.package], function (Package) {\n let Widget = null;\n if (Package && Package[parsedClassID.widgetID]) {\n Widget = Package[parsedClassID.widgetID];\n }\n resolve(parsedClassID.memberWidgetID ? (Widget.prototype ? Widget.prototype[parsedClassID.memberWidgetID] : Widget[parsedClassID.memberWidgetID]) : Widget);\n });\n }\n });\n}\n\nexport function requireWidgets(classIDs) {\n return Promise.all(classIDs.map(requireWidget));\n}\n","import { IGraph, INDChart } from \"@hpcc-js/api\";\nimport { Database, HTMLWidget, Utility, Widget } from \"@hpcc-js/common\";\nimport { map as d3Map } from \"d3-collection\";\nimport { requireWidget } from \"./Utility.ts\";\n\ndeclare const require: any;\nexport class MultiChart extends HTMLWidget {\n _allCharts = {};\n _chartTypeDefaults;\n _chartTypeProperties;\n _chartMonitor;\n _switchingTo;\n\n constructor() {\n super();\n INDChart.call(this);\n IGraph.call(this);\n\n this._tag = \"div\";\n\n this._allCharts = {};\n this._allChartTypes.forEach(function (item) {\n const newItem = JSON.parse(JSON.stringify(item));\n newItem.widget = null;\n this._allCharts[item.id] = newItem;\n this._allCharts[item.display] = newItem;\n this._allCharts[item.widgetClass] = newItem;\n }, this);\n this._chartTypeDefaults = {};\n this._chartTypeProperties = {};\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n const retVal = super.fields.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().fields();\n this.chart().fields(_);\n }\n return retVal;\n }\n\n columns(): string[];\n columns(_, asDefault?: boolean): this;\n columns(_?, asDefault?: boolean) {\n const retVal = HTMLWidget.prototype.columns.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().columns();\n this.chart().columns(_, asDefault);\n }\n return retVal;\n }\n\n data(_?) {\n const retVal = HTMLWidget.prototype.data.apply(this, arguments);\n if (this.chart()) {\n if (!arguments.length) return this.chart().data();\n this.chart().data(_);\n }\n return retVal;\n }\n\n hasOverlay() {\n return this.chart() && this.chart().hasOverlay();\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return this.chart() && this.chart().visible();\n if (this.chart()) {\n this.chart().visible(_);\n }\n return this;\n }\n\n chartTypeDefaults(): object;\n chartTypeDefaults(_: object): this;\n chartTypeDefaults(_?: object): object | this {\n if (!arguments.length) return this._chartTypeDefaults;\n this._chartTypeDefaults = _;\n return this;\n }\n\n chartTypeProperties(): object;\n chartTypeProperties(_: object): this;\n chartTypeProperties(_?: object): object | this {\n if (!arguments.length) return this._chartTypeProperties;\n this._chartTypeProperties = _;\n return this;\n }\n\n getChartDataFamily() {\n return this._allCharts[this.chartType()].family;\n }\n\n requireContent(chartType, callback) {\n const classInfo = Utility.parseClassID(this._allCharts[chartType].widgetClass);\n switch (classInfo.package) {\n case \"@hpcc-js/chart\":\n import(\"@hpcc-js/chart\").then(mod => {\n callback(new mod[classInfo.widgetID]());\n });\n break;\n case \"@hpcc-js/dgrid\":\n import(\"@hpcc-js/dgrid\").then(mod => {\n callback(new mod[classInfo.widgetID]());\n });\n break;\n default:\n requireWidget(this._allCharts[chartType].widgetClass).then(function (WidgetClass: any) {\n callback(new WidgetClass());\n });\n }\n }\n\n switchChart(callback) {\n if (this._switchingTo === this.chartType()) {\n if (callback) {\n callback(this);\n }\n return;\n } else if (this._switchingTo) {\n console.warn(\"Attempting switch to: \" + this.chartType() + \", before previous switch is complete (\" + this._switchingTo + \")\");\n }\n this._switchingTo = this.chartType();\n const oldContent = this.chart();\n const context = this;\n this.requireContent(this.chartType(), function (newContent) {\n if (newContent !== oldContent) {\n const size = context.size();\n newContent\n .fields(context.fields())\n .data(context.data())\n .size(size)\n ;\n\n context.chart(newContent);\n if (oldContent) {\n oldContent\n .size({ width: 1, height: 1 })\n .render()\n ;\n }\n }\n delete context._switchingTo;\n if (callback) {\n callback(this);\n }\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n const content = element.selectAll(\".multiChart\").data(this.chart() ? [this.chart()] : [], function (d) { return d._id; });\n content.enter().append(\"div\")\n .attr(\"class\", \"multiChart\")\n .each(function (d) {\n d.target(this);\n })\n ;\n\n const currChart = this.chart();\n if (currChart) {\n for (const key in this._chartTypeDefaults) {\n if (currChart[key + \"_default\"]) {\n try {\n currChart[key + \"_default\"](this._chartTypeDefaults[key]);\n } catch (e) {\n console.warn(\"Exception Setting Default: \" + key);\n }\n } else {\n console.warn(\"Unknown Default: \" + key);\n }\n }\n this._chartTypeDefaults = {};\n for (const propKey in this._chartTypeProperties) {\n if (currChart[propKey]) {\n try {\n currChart[propKey](this._chartTypeProperties[propKey]);\n } catch (e) {\n console.warn(\"Exception Setting Property: \" + propKey);\n }\n } else {\n console.warn(\"Unknown Property: \" + propKey);\n }\n }\n this._chartTypeProperties = {};\n }\n\n const context = this;\n content\n .each(function (d) { d.resize(context.size()); })\n ;\n\n content.exit().transition()\n .each(function (d) { d.target(null); })\n .remove()\n ;\n }\n\n exit(domNode, element) {\n if (this._chartMonitor) {\n this._chartMonitor.remove();\n delete this._chartMonitor;\n }\n if (this.chart()) {\n this.chart().target(null);\n }\n super.exit(domNode, element);\n }\n\n render(_callback?) {\n if (this.chartType() && (!this.chart() || (this.chart().classID() !== this._allCharts[this.chartType()].widgetClass))) {\n const context = this;\n const args = arguments;\n this.switchChart(function () {\n HTMLWidget.prototype.render.apply(context, args);\n });\n return this;\n }\n return HTMLWidget.prototype.render.apply(this, arguments);\n }\n}\nMultiChart.prototype._class += \" composite_MultiChart\";\nMultiChart.prototype.implements(INDChart.prototype);\nMultiChart.prototype.implements(IGraph.prototype);\nexport interface ChartMeta {\n id: string;\n display: string;\n widgetClass: string;\n widgetPath?: string;\n}\nexport interface MultiChart {\n _otherChartTypes: ChartMeta[];\n _graphChartTypes: ChartMeta[];\n _1DChartTypes: ChartMeta[];\n _2DChartTypes: ChartMeta[];\n _NDChartTypes: ChartMeta[];\n _mapChartTypes: ChartMeta[];\n _anyChartTypes: ChartMeta[];\n _allChartTypes: ChartMeta[];\n _allMap;\n _allFamilies: string[];\n _allChartTypesMap;\n _allChartTypesByClass;\n\n hideRowOnLegendClick(): boolean;\n hideRowOnLegendClick(_: boolean): this;\n chartType(): string;\n chartType(_: string): this;\n chart(): Widget;\n chart(_: Widget): this;\n chart_access(): Widget;\n chart_access(_: Widget): this;\n\n click(_row, _column, _selected): void;\n dblclick(_row, _column, _selected): void;\n vertex_click(row, column, selected, more): void;\n vertex_dblclick(row, column, selected, more): void;\n edge_click(row, column, selected, more): void;\n edge_dblclick(row, column, selected, more): void;\n}\n\nMultiChart.prototype._otherChartTypes = [\n { id: \"FORM\", display: \"Form\", widgetClass: \"form_FieldForm\" }\n].map(function (item: any) { item.family = \"other\"; return item; });\nMultiChart.prototype._graphChartTypes = [\n { id: \"GRAPH\", display: \"Graph\", widgetClass: \"graph_Graph\" },\n { id: \"ADJACENCY_GRAPH\", display: \"Graph\", widgetClass: \"graph_AdjacencyGraph\" },\n { id: \"GRAPHC\", display: \"GraphC\", widgetClass: \"graph_GraphC\" }\n].map(function (item: any) { item.family = \"GRAPH\"; return item; });\nMultiChart.prototype._1DChartTypes = [\n].map(function (item: any) { item.family = \"1D\"; return item; });\nMultiChart.prototype._2DChartTypes = [\n { id: \"SUMMARY\", display: \"Summary\", widgetClass: \"chart_Summary\" },\n { id: \"BUBBLE\", display: \"Bubble\", widgetClass: \"chart_Bubble\" },\n { id: \"PIE\", display: \"Pie\", widgetClass: \"chart_Pie\" },\n { id: \"WORD_CLOUD\", display: \"Word Cloud\", widgetClass: \"other_WordCloud\" }\n].map(function (item: any) { item.family = \"2D\"; return item; });\nMultiChart.prototype._NDChartTypes = [\n { id: \"COLUMN\", display: \"Column\", widgetClass: \"chart_Column\" },\n { id: \"BAR\", display: \"Bar\", widgetClass: \"chart_Bar\" },\n { id: \"LINE\", display: \"Line\", widgetClass: \"chart_Line\" },\n { id: \"AREA\", display: \"Area\", widgetClass: \"chart_Area\" },\n { id: \"STEP\", display: \"Step\", widgetClass: \"chart_Step\" },\n { id: \"SCATTER\", display: \"Scatter\", widgetClass: \"chart_Scatter\" },\n { id: \"HEXBIN\", display: \"Hex Bin\", widgetClass: \"chart_HexBin\" }\n].map(function (item: any) { item.family = \"ND\"; return item; });\nMultiChart.prototype._mapChartTypes = [\n { id: \"CHORO_USSTATES\", display: \"US State Choropleth\", widgetClass: \"map_ChoroplethStates\" },\n { id: \"CHORO_USCOUNTIES\", display: \"US County Choropleth\", widgetClass: \"map_ChoroplethCounties\" },\n { id: \"CHORO_COUNTRIES\", display: \"Country Choropleth\", widgetClass: \"map_ChoroplethCountries\" },\n { id: \"GMAP_CHORO_USCOUNTIES\", display: \"Google Map US County Choropleth\", widgetClass: \"map_GMapCounties\" },\n { id: \"GOOGLE_MAP\", display: \"Google Map\", widgetClass: \"map_GMapLayered\" },\n { id: \"OPENSTREET\", display: \"Open Street Map\", widgetClass: \"map_OpenStreet\" }\n].map(function (item: any) { item.family = \"map\"; return item; });\nMultiChart.prototype._anyChartTypes = [\n { id: \"TABLE\", display: \"Table\", widgetClass: \"dgrid_Table\" },\n { id: \"TABLE_LEGACY\", display: \"Table (legacy)\", widgetClass: \"other_Table\" },\n { id: \"TABLE_NESTED\", display: \"Nested Table\", widgetClass: \"other_NestedTable\" },\n { id: \"TABLE_CALENDAR\", display: \"Table driven Calendar Heat Map\", widgetClass: \"other_CalendarHeatMap\" },\n { id: \"TABLE_BULLET\", display: \"Table driven bullet chart\", widgetClass: \"chart_Bullet\" },\n { id: \"TABLE_SELECT\", display: \"Table driven select\", widgetClass: \"other_Select\" },\n { id: \"TABLE_AUTOCOMPLETE\", display: \"Table driven auto complete\", widgetClass: \"other_AutoCompleteText\" },\n { id: \"TABLE_OPPORTUNITY\", display: \"Table driven opportunity widget\", widgetClass: \"graph_Opportunity\" },\n { id: \"TABLE_TREE\", display: \"Table driven tree\", widgetClass: \"tree_Dendrogram\" },\n { id: \"TABLE_TREEMAP\", display: \"Table driven Treemap\", widgetClass: \"tree_Treemap\" },\n { id: \"TABLE_SANKEY\", display: \"Table driven Sankey\", widgetClass: \"graph_Sankey\" },\n { id: \"TABLE_GMAP_PIN\", display: \"Table driven Google Map (pins)\", widgetClass: \"map_GMapPin\" },\n { id: \"TABLE_GMAP_PINLINE\", display: \"Table driven Google Map (pins/lines)\", widgetClass: \"map_GMapPinLine\" },\n { id: \"TABLE_XML_TREE\", display: \"Table driven XML Tree\", widgetClass: \"tree_Indented\" }\n].map(function (item: any) { item.family = \"any\"; return item; });\nMultiChart.prototype._allChartTypes =\n MultiChart.prototype._otherChartTypes.concat(\n MultiChart.prototype._graphChartTypes.concat(\n MultiChart.prototype._1DChartTypes.concat(\n MultiChart.prototype._2DChartTypes.concat(\n MultiChart.prototype._NDChartTypes.concat(\n MultiChart.prototype._mapChartTypes.concat(\n MultiChart.prototype._anyChartTypes\n ))))));\nMultiChart.prototype._allMap = d3Map(MultiChart.prototype._allChartTypes, function (item: any) { return item.family; });\nMultiChart.prototype._allFamilies = MultiChart.prototype._allMap.keys();\nMultiChart.prototype._allChartTypesMap = {};\nMultiChart.prototype._allChartTypesByClass = {};\nMultiChart.prototype._allChartTypes.forEach(function (item) {\n item.widgetPath = Utility.widgetPath(item.widgetClass);\n MultiChart.prototype._allChartTypesMap[item.id] = item;\n MultiChart.prototype._allChartTypesByClass[item.widgetClass] = item;\n});\n\nMultiChart.prototype.publishReset();\nMultiChart.prototype.publish(\"hideRowOnLegendClick\", false, \"boolean\", \"Enable/Disable hiding row on legend clicks\", null, { tags: [\"Basic\"] });\nMultiChart.prototype.publish(\"chartType\", \"BUBBLE\", \"set\", \"Chart Type\", MultiChart.prototype._allChartTypes.map(function (item) { return item.id; }), { tags: [\"Basic\"] });\nMultiChart.prototype.publish(\"chart\", null, \"widget\", \"Chart\", null, { tags: [\"Basic\"] });\n\nconst _origChart = MultiChart.prototype.chart;\nMultiChart.prototype.chart = function (_?) {\n const retVal = _origChart.apply(this, arguments);\n if (arguments.length) {\n const context = this;\n if (this._allChartTypesByClass[_.classID()]) {\n this.chartType(this._allChartTypesByClass[_.classID()].id);\n } else {\n console.warn(\"Unknown Class ID: \" + _.classID());\n }\n _.click = function (_row, _column, _selected) {\n context.click.apply(context, arguments);\n };\n _.dblclick = function (_row, _column, _selected) {\n context.dblclick.apply(context, arguments);\n };\n _.vertex_click = function (row, column, selected, more) {\n context.vertex_click.apply(context, arguments);\n };\n _.vertex_dblclick = function (row, column, selected, more) {\n context.vertex_dblclick.apply(context, arguments);\n };\n _.edge_click = function (row, column, selected, more) {\n context.edge_click.apply(context, arguments);\n };\n _.edge_dblclick = function (row, column, selected, more) {\n context.edge_dblclick.apply(context, arguments);\n };\n if (this._chartMonitor) {\n this._chartMonitor.remove();\n delete this._chartMonitor;\n }\n this._chartMonitor = _.monitor(function (key, newVal, oldVal) {\n context.broadcast(key, newVal, oldVal, _);\n });\n }\n return retVal;\n};\n","import { HTMLWidget, Widget } from \"@hpcc-js/common\";\nimport { ChartPanel } from \"@hpcc-js/layout\";\nimport { MultiChart } from \"./MultiChart.ts\";\n\nimport \"../src/ChartPanel.css\";\n\nclass Summary extends HTMLWidget {\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element.append(\"p\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n element.select(\"p\").text(this.text());\n }\n}\ninterface Summary {\n text(): string;\n text(_: string): this;\n}\nSummary.prototype.publish(\"text\", \"\", \"string\");\n\nexport class MultiChartPanel extends ChartPanel<MultiChart> {\n\n constructor() {\n super();\n this.widget(new MultiChart().chartType(\"COLUMN\"));\n }\n\n multiChart(): MultiChart {\n return this._widget;\n }\n\n chartType(): string;\n chartType(_: string): this;\n chartType(_?: string): string | this {\n if (!arguments.length) return this._widget.chartType();\n this._widget.chartType(_);\n return this;\n }\n\n chart(): Widget;\n chart(_: Widget): this;\n chart(_?: Widget): Widget | this {\n if (!arguments.length) return this._widget.chart();\n this._widget.chart(_);\n return this;\n }\n\n chartTypeDefaults(): object;\n chartTypeDefaults(_: object): this;\n chartTypeDefaults(_?: object): this | object {\n if (!arguments.length) return this._widget.chartTypeDefaults();\n this._widget.chartTypeDefaults(_);\n return this;\n }\n\n chartTypeProperties(): object;\n chartTypeProperties(_: object): this;\n chartTypeProperties(_?: object): this | object {\n if (!arguments.length) return this._widget.chartTypeProperties();\n this._widget.chartTypeProperties(_);\n return this;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n if (this._widget instanceof MultiChart) {\n this._legend.dataFamily(this._widget.getChartDataFamily());\n }\n super.update(domNode, element);\n }\n}\nMultiChartPanel.prototype._class += \" composite_MultiChartPanel\";\n","import { OnOff } from \"@hpcc-js/form\";\nimport { Border, Toolbar } from \"@hpcc-js/layout\";\nimport { PropertyEditor } from \"@hpcc-js/other\";\n\nimport \"../src/Dermatology.css\";\n\nexport class Dermatology extends Border {\n _toolbar;\n _propEditor;\n _showProperties;\n _propsButton;\n _prevWidget;\n\n constructor() {\n super();\n\n this._toolbar = new Toolbar()\n .title(\"Dermatology\")\n ;\n this._propEditor = new PropertyEditor()\n .show_settings(true)\n ;\n }\n\n showProperties(_?) {\n if (!arguments.length) return this._showProperties;\n this._showProperties = _;\n this\n .rightPercentage(0)\n .rightSize(this._showProperties ? 360 : 0)\n .setContent(\"right\", this._showProperties ? this._propEditor : null)\n ;\n const widget = this.widget();\n if (widget && widget.designMode) {\n widget.designMode(this._showProperties);\n }\n return this;\n }\n\n toggleProperties() {\n return this.showProperties(!this.showProperties());\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this\n .topPercentage(0)\n .topSize(0)\n .setContent(\"top\", this._toolbar)\n ;\n this.getCell(\"top\").surfaceShadow(true);\n\n const context = this;\n this._propsButton = new OnOff()\n .id(this.id() + \"_props\")\n .value(\"Properties\")\n .on(\"click\", function () {\n context\n .toggleProperties()\n .render()\n ;\n })\n ;\n this._toolbar.widgets([this._propsButton]);\n }\n\n update(domNode, element) {\n this\n .topPercentage(0)\n .topSize(this.showToolbar() ? 32 : 0)\n ;\n\n super.update(domNode, element);\n\n const widget = this.widget();\n element.style(\"background-color\", widget && widget.surfaceShadow ? null : \"white\");\n }\n\n render(callback) {\n const widget = this.widget();\n if (widget !== this._prevWidget) {\n if (widget && widget.surfaceShadow) {\n widget.surfaceBackgroundColor_default(\"white\");\n }\n this.setContent(\"center\", widget);\n this._propEditor.widget(widget);\n this._prevWidget = widget;\n }\n return super.render(callback);\n }\n\n showToolbar: { (): boolean; (_: boolean): Dermatology };\n showToolbar_exists: () => boolean;\n widget: { (): any; (_: any): Dermatology };\n widget_exists: () => boolean;\n}\nDermatology.prototype._class += \" composite_Dermatology\";\n\nDermatology.prototype.publish(\"showToolbar\", true, \"boolean\", \"Show Toolbar\");\nDermatology.prototype.publish(\"widget\", null, \"widget\", \"Widget\");\n","import { Database, Text, Utility } from \"@hpcc-js/common\";\nimport { Button, Input, Select } from \"@hpcc-js/form\";\nimport { Border, Grid, Toolbar } from \"@hpcc-js/layout\";\nimport { Html, Legend } from \"@hpcc-js/other\";\nimport { select as d3Select } from \"d3-selection\";\nimport \"d3-transition\";\nimport { MultiChart } from \"./MultiChart.ts\";\n\nimport \"../src/MegaChart.css\";\n\nexport class MegaChart extends Border {\n _chart = new MultiChart();\n _toolbar = new Toolbar();\n _valueTitle = new Text();\n _domainTitle = new Text();\n _legend: Legend = new Legend();\n _csvButton;\n _infoButton;\n _maximizeButton;\n _legendButton;\n _chartTypeSelect;\n _prevLegendPosition;\n _prevShowToolbar;\n _1DChartTypes;\n _2DChartTypes;\n _NDChartTypes;\n _anyChartTypes;\n _allChartTypes;\n _contentClasses;\n _dataCount;\n\n constructor() {\n super();\n this._tag = \"div\";\n const context = this;\n this._chart.click = function () {\n context.click.apply(context, arguments);\n };\n this._chart.dblclick = function () {\n context.dblclick.apply(context, arguments);\n };\n this._chart.vertex_click = function () {\n context.vertex_click.apply(context, arguments);\n };\n this._chart.vertex_dblclick = function () {\n context.vertex_dblclick.apply(context, arguments);\n };\n this._chart.edge_click = function () {\n context.edge_click.apply(context, arguments);\n };\n this._chart.edge_dblclick = function () {\n context.edge_dblclick.apply(context, arguments);\n };\n }\n\n toolbarWidgets(_?) {\n if (!arguments.length) return this._toolbar.widgets();\n this._toolbar.widgets(_);\n return this;\n }\n\n chartTypeDefaults(_?) {\n if (!arguments.length) return this._chart.chartTypeDefaults();\n this._chart.chartTypeDefaults(_);\n return this;\n }\n\n chartTypeProperties(_?) {\n if (!arguments.length) return this._chart.chartTypeProperties();\n this._chart.chartTypeProperties(_);\n return this;\n }\n\n fields(): Database.Field[];\n fields(_: Database.Field[]): this;\n fields(_?: Database.Field[]): Database.Field[] | this {\n if (!arguments.length) return this._chart.fields();\n this._chart.fields(_);\n return this;\n }\n\n columns(): string[];\n columns(_: string[], asDefault?: boolean): this;\n columns(_?: string[], asDefault?: boolean): string[] | this {\n if (!arguments.length) return this._chart.columns();\n this._chart.columns(_, asDefault);\n return this;\n }\n\n data(_?) {\n if (!arguments.length) return this._chart.data();\n this._chart.data(_);\n return this;\n }\n\n downloadCSV() {\n Utility.downloadString(\"CSV\", this._chart.export(\"CSV\"));\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const context = this;\n\n this.topShrinkWrap(false).topPercentage(0).topSize(30);\n this._dataCount = new Html()\n .classed({ \"composite_MegaChart-dataCount\": true })\n .id(this.id() + \"_dataCount\")\n .html('<span class=\"MegaChart-dataCount-label\">Count:</span>&nbsp;<span class=\"MegaChart-dataCount-value\">' + (this.data() ? this.data().length : \"0\") + \"</span>\")\n .overflowX(\"visible\")\n .overflowY(\"visible\")\n ;\n\n this._csvButton = new Button()\n .classed({ \"composite_MegaChart-CSV\": true })\n .id(this.id() + \"_csv\")\n .value(\"CSV\")\n ;\n this._csvButton.click = function (a) {\n context.downloadCSV();\n };\n\n this._infoButton = new Button()\n .classed({ \"composite_MegaChart-Info\": true })\n .id(this.id() + \"_info\")\n .value(this.infoIcon())\n ;\n\n this._maximizeButton = new Button()\n .classed({ \"composite_MegaChart-Maximize\": true })\n .id(this.id() + \"_maximize\")\n .value(\"\\uf2d0\")\n ;\n this._maximizeButton.click = function (buttonWidget) {\n const target = context.target() as any;\n let node = target;\n const isMaximized = d3Select(target).classed(\"__hpccisMaximized\");\n\n // Find the layout_Grid ancestor\n const parentGrid = context.locateAncestor(\"layout_Grid\");\n if (parentGrid) {\n node = parentGrid.element().node();\n } else {\n node = document.body;\n }\n\n const targetElement = d3Select(context.target()) as any;\n if (isMaximized) {\n // Restore from maximized to natural size/position\n const targetParentBox = target.parentElement.getBoundingClientRect();\n const targetPaddingTop = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-top\").replace(\"px\", \"\"));\n const targetPaddingLeft = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-left\").replace(\"px\", \"\"));\n const targetPaddingRight = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-right\").replace(\"px\", \"\"));\n const targetPaddingBottom = parseInt(getComputedStyle(target, null).getPropertyValue(\"padding-bottom\").replace(\"px\", \"\"));\n context.contentDiv.style(\"opacity\", 0).transition(100);\n targetElement.transition()// .duration(3000)\n .style(\"top\", targetParentBox.top + \"px\")\n .style(\"left\", targetParentBox.left + \"px\")\n .style(\"width\", (targetParentBox.width - targetPaddingLeft - targetPaddingRight) + \"px\")\n .style(\"height\", (targetParentBox.height - targetPaddingTop - targetPaddingBottom) + \"px\")\n .each(\"end\", function () {\n targetElement.style(\"position\", target.__old_position);\n targetElement.style(\"z-index\", target.__old_zindex);\n targetElement.style(\"background-color\", target.__old_backgroundColor);\n targetElement.style(\"box-shadow\", target.__old_boxshadow);\n context\n .resize({\n width: targetParentBox.width - targetPaddingLeft - targetPaddingRight,\n height: targetParentBox.height - targetPaddingTop - targetPaddingBottom\n })\n .render(function () {\n context.contentDiv.transition()\n .style(\"opacity\", 1);\n });\n buttonWidget.value(\"\\uf2d0\").render();\n });\n } else {\n // Maximize this MegaChart\n target.__old_position = target.style.position;\n target.__old_zindex = target.style.zIndex;\n target.__old_boxshadow = target.style.boxShadow;\n target.__old_backgroundColor = context.element().style(\"background-color\");\n const grid = d3Select(node).datum() as Grid;\n const gridTarget = grid.target();\n const gridBox = grid ? gridTarget.getBoundingClientRect() : node.getBoundingClientRect();\n const gridPaddingTop = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-top\").replace(\"px\", \"\"));\n const gridPaddingLeft = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-left\").replace(\"px\", \"\"));\n const gridPaddingRight = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-right\").replace(\"px\", \"\"));\n const gridPaddingBottom = parseInt(getComputedStyle(gridTarget, null).getPropertyValue(\"padding-bottom\").replace(\"px\", \"\"));\n context.contentDiv.style(\"opacity\", 0).transition(100);\n targetElement\n .style(\"position\", \"fixed\")\n .style(\"z-index\", 999999)\n .style(\"box-shadow\", \"0 8px 8px 0 rgba(0,0,0,.14),0 12px 4px -8px rgba(0,0,0,.2),0 4px 20px 0 rgba(0,0,0,.12)\")\n .style(\"background-color\", target.__old_backgroundColor)\n .transition()// .duration(3000)\n .style(\"top\", (gridBox.top + gridPaddingTop) + \"px\")\n .style(\"left\", (gridBox.left + gridPaddingLeft) + \"px\")\n .style(\"width\", (gridBox.width - gridPaddingLeft - gridPaddingRight) + \"px\")\n .style(\"height\", (gridBox.height - gridPaddingTop - gridPaddingBottom) + \"px\")\n .each(\"end\", function () {\n targetElement.style(\"background-color\", context.maximizedBackgroundColor());\n context\n .resize({\n width: (gridBox.width - gridPaddingLeft - gridPaddingRight),\n height: (gridBox.height - gridPaddingTop - gridPaddingBottom)\n })\n .render(function () {\n context.contentDiv.transition()\n .style(\"opacity\", 1);\n });\n buttonWidget.value(\"\\uf2d1\").render();\n });\n }\n\n d3Select(target).classed(\"__hpccisMaximized\", !isMaximized);\n };\n\n this._legendButton = new Input()\n .classed({ \"composite_MegaChart-legend\": true })\n .id(this.id() + \"_legend\")\n .type(\"checkbox\")\n .inlineLabel(\"Legend: \")\n ;\n this._legendButton.click = function (a) {\n context.render();\n };\n\n this._chartTypeSelect = new Select()\n .classed({ \"composite_MegaChart-chartType\": true })\n .id(this.id() + \"_chartType\")\n .selectOptions(this._allChartTypes.map(function (a) { return [a.id, a.display]; }))\n .value(this.chartType())\n ;\n this._chartTypeSelect.change = function (a) {\n context.chartType(a.value()).render();\n };\n\n this.setContent(\"center\", this._chart);\n\n this._legend\n .targetWidget(this._chart)\n .orientation([\"top\", \"bottom\"].indexOf(this.legendPosition()) !== -1 ? \"horizontal\" : \"vertical\")\n .fixedSize(true)\n ;\n\n this._prevLegendPosition = this.legendPosition();\n\n if (this.valueAxisTitle()) {\n this.setContent(\"left\", this._valueTitle.rotation(-90)).leftShrinkWrap(true);\n }\n if (this.domainAxisTitle()) {\n this.setContent(\"bottom\", this._domainTitle).bottomShrinkWrap(true);\n }\n\n if (this.legendPosition() !== \"none\") {\n this.setContent(this.legendPosition(), this._legend)[this.legendPosition() + \"ShrinkWrap\"](true);\n }\n }\n\n update(domNode, element) {\n function showHideButton(twArr2, button, show) {\n if (show && twArr2.indexOf(button) === -1) {\n twArr2.push(button);\n } else if (!show) {\n const idx = twArr2.indexOf(button);\n if (idx >= 0) {\n twArr2.splice(idx, 1);\n }\n }\n }\n\n if (this._chart && typeof this._chart.hideRowOnLegendClick === \"function\") {\n this._chart.hideRowOnLegendClick(this.hideRowOnLegendClick());\n }\n\n this._dataCount.html('<span class=\"MegaChart-dataCount-label\">Count:</span>&nbsp;<span class=\"MegaChart-dataCount-value\">' + (this.data() ? this.data().length : \"0\") + \"</span>\");\n\n this._chartTypeSelect.value(this.chartType());\n const twArr = this.toolbarWidgets();\n showHideButton(twArr, this._csvButton, this.showCSV());\n showHideButton(twArr, this._maximizeButton, this.showMaximize());\n showHideButton(twArr, this._legendButton, this.toolbarShowLegend());\n showHideButton(twArr, this._chartTypeSelect, this.showChartSelect());\n showHideButton(twArr, this._infoButton, this.showInfoButton());\n showHideButton(twArr, this._dataCount, this.showCount());\n this.toolbarWidgets(twArr);\n\n if (this._prevShowToolbar !== this.showToolbar()) {\n this.setContent(\"top\", this.showToolbar() ? this._toolbar : null);\n this._prevShowToolbar = this.showToolbar();\n }\n\n // TODO: Proxy + themes not working...\n this._toolbar\n .fontSize(this.titleFontSize())\n .fontColor(this.titleFontColor())\n .fontFamily(this.titleFontFamily())\n .fontBold(this.titleFontBold())\n .backgroundColor(this.titleBackgroundColor())\n ;\n\n this._chart\n .data(this.data());\n\n if (this._chart.chartType() !== this.chartType()) {\n this._chart.chartType(this.chartType());\n }\n\n let legendPosition = this.legendPosition();\n if (this.toolbarShowLegend() && !this._legendButton.checked()) {\n legendPosition = \"none\";\n }\n if (this._prevLegendPosition !== legendPosition) {\n if (this._prevLegendPosition !== \"none\") {\n this.clearContent(this._prevLegendPosition);\n }\n this._prevLegendPosition = legendPosition;\n if (legendPosition !== \"none\") {\n this._legend = new Legend().targetWidget(this.getContent(\"center\").fixedSize(true));\n this.setContent(legendPosition, this._legend);\n this._legend.orientation([\"top\", \"bottom\"].indexOf(legendPosition) !== -1 ? \"horizontal\" : \"vertical\");\n }\n }\n this._contentClasses = this.getContentClasses();\n\n if (this.valueAxisTitle() && this._contentClasses.left !== \"common_Text\") {\n if (legendPosition !== \"left\") {\n this.setContent(\"left\", this._valueTitle.rotation(-90));\n }\n }\n if (this.domainAxisTitle() && this._contentClasses.bottom !== \"common_Text\") {\n if (legendPosition !== \"bottom\") {\n this.setContent(\"bottom\", this._domainTitle).bottomShrinkWrap(true);\n }\n }\n\n this._legend.dataFamily(this._chart.getChartDataFamily());\n\n super.update(domNode, element);\n }\n\n exit(domNode, element) {\n super.exit(domNode, element);\n }\n\n getContentClasses() {\n const obj: any = {};\n const t = this.getContent(\"top\");\n const r = this.getContent(\"right\");\n const b = this.getContent(\"bottom\");\n const l = this.getContent(\"left\");\n obj.top = t !== null ? t.classID() : undefined;\n obj.right = r !== null ? r.classID() : undefined;\n obj.bottom = b !== null ? b.classID() : undefined;\n obj.left = l !== null ? l.classID() : undefined;\n return obj;\n }\n\n serializeState() {\n const state: any = {\n title: this.title(),\n data: this.data()\n };\n const chart = this.chart();\n if (chart) {\n if (chart.serializeState) {\n state.chart = chart.serializeState();\n delete state.chart.data;\n }\n }\n return state;\n }\n\n deserializeState(state) {\n if (state) {\n this\n .title(state.title)\n .data(state.data)\n ;\n const chart = this.chart();\n if (chart && state.chart) {\n if (chart.serializeState) {\n chart.deserializeState(state.chart);\n }\n }\n }\n return this;\n }\n\n // Events ---\n click(row, column, selected) {\n }\n\n dblclick(row, column, selected) {\n }\n vertex_click(row, col, sel, more) {\n if (more && more.vertex) {\n // console.log(\"Vertex click: \" + more.vertex.id());\n }\n }\n\n vertex_dblclick(row, col, sel, more) {\n if (more && more.vertex) {\n // console.log(\"Vertex double click: \" + more.vertex.id());\n }\n }\n\n edge_click(row, col, sel, more) {\n if (more && more.edge) {\n // console.log(\"Edge click: \" + more.edge.id());\n }\n }\n\n edge_dblclick(row, col, sel, more) {\n if (more && more.edge) {\n // console.log(\"Edge double click: \" + more.edge.id());\n }\n }\n\n hideRowOnLegendClick: { (): boolean; (_: boolean): MegaChart };\n hideRowOnLegendClick_exists: () => boolean;\n showToolbar: { (): boolean; (_: boolean): MegaChart };\n showToolbar_exists: () => boolean;\n titleFontSize: { (): number; (_: number): MegaChart };\n titleFontSize_exists: () => boolean;\n titleFontColor: { (): string; (_: string): MegaChart };\n titleFontColor_exists: () => boolean;\n titleFontFamily: { (): string; (_: string): MegaChart };\n titleFontFamily_exists: () => boolean;\n titleFontBold: { (): boolean; (_: boolean): MegaChart };\n titleFontBold_exists: () => boolean;\n titleBackgroundColor: { (): string; (_: string): MegaChart };\n titleBackgroundColor_exists: () => boolean;\n maximizedBackgroundColor: { (): string; (_: string): MegaChart };\n maximizedBackgroundColor_exists: () => boolean;\n showChartSelect: { (): boolean; (_: boolean): MegaChart };\n showChartSelect_exists: () => boolean;\n showCSV: { (): boolean; (_: boolean): MegaChart };\n showCSV_exists: () => boolean;\n showCount: { (): boolean; (_: boolean): MegaChart };\n showCount_exists: () => boolean;\n showMaximize: { (): boolean; (_: boolean): MegaChart };\n showMaximize_exists: () => boolean;\n toolbarShowLegend: { (): boolean; (_: boolean): MegaChart };\n toolbarShowLegend_exists: () => boolean;\n showInfoButton: { (): boolean; (_: boolean): MegaChart };\n showInfoButton_exists: () => boolean;\n infoIcon: { (): string; (_: string): MegaChart };\n infoIcon_exists: () => boolean;\n legendPosition: { (): string; (_: string): MegaChart };\n legendPosition_exists: () => boolean;\n\n title: { (): string; (_: string): MegaChart };\n title_exists: () => boolean;\n\n domainAxisTitle: { (): string; (_: string): MegaChart };\n domainAxisTitle_exists: () => boolean;\n valueAxisTitle: { (): string; (_: string): MegaChart };\n valueAxisTitle_exists: () => boolean;\n\n chartType: { (): string; (_: string): MegaChart };\n chartType_exists: () => boolean;\n chart: { (): any; (_: any): MegaChart };\n chart_exists: () => boolean;\n}\nMegaChart.prototype._class += \" composite_MegaChart\";\n\nMegaChart.prototype._1DChartTypes = MultiChart.prototype._1DChartTypes;\nMegaChart.prototype._2DChartTypes = MultiChart.prototype._2DChartTypes;\nMegaChart.prototype._NDChartTypes = MultiChart.prototype._NDChartTypes;\nMegaChart.prototype._anyChartTypes = MultiChart.prototype._anyChartTypes;\nMegaChart.prototype._allChartTypes = MultiChart.prototype._allChartTypes;\n\nMegaChart.prototype.publishReset();\n\nMegaChart.prototype.publish(\"hideRowOnLegendClick\", false, \"boolean\", \"Enable/Disable hiding row on legend clicks\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showToolbar\", true, \"boolean\", \"Enable/Disable Toolbar widget\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publishProxy(\"title\", \"_toolbar\", \"title\");\nMegaChart.prototype.publish(\"ddlParamsFormat\", \"\", \"string\", \"DDL Param Format '{fname}, {lname}'\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontSize\", null, \"number\", \"Title Font Size (px)\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontColor\", null, \"html-color\", \"Title Font Color\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontFamily\", null, \"string\", \"Title Font Family\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleFontBold\", true, \"boolean\", \"Enable Bold Title Font\", null, { tags: [\"Advanced\"], optional: true });\nMegaChart.prototype.publish(\"titleBackgroundColor\", null, \"html-color\", \"Background Color\", null, { tags: [\"Intermediate\"], optional: true });\nMegaChart.prototype.publish(\"maximizedBackgroundColor\", \"#FFFFFF\", \"html-color\", \"Background Color while maximized\", null, { tags: [\"Intermediate\"], optional: true });\n\nMegaChart.prototype.publish(\"showChartSelect\", true, \"boolean\", \"Show/Hide the chartType dropdown in the toolbar\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showCSV\", true, \"boolean\", \"Show/Hide CSV button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showCount\", false, \"boolean\", \"Show/Hide Data Count\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showMaximize\", false, \"boolean\", \"Show/Hide Maximize button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"toolbarShowLegend\", false, \"boolean\", \"Show/Hide Legend button\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"showInfoButton\", false, \"boolean\", \"Show/Hide Info button in toolbar\", null, { tags: [\"Basic\"] });\nMegaChart.prototype.publish(\"infoIcon\", \"\\uf05a\", \"string\", \"Help Icon\", null, { tags: [\"Basic\"] });\n\nMegaChart.prototype.publish(\"legendPosition\", \"none\", \"set\", \"Position of the Legend widget\", [\"none\", \"top\", \"right\", \"bottom\", \"left\"], { tags: [\"Basic\"] });\nMegaChart.prototype.publishProxy(\"legendFormat\", \"_legend\", \"rainbowFormat\");\nMegaChart.prototype.publishProxy(\"legendBins\", \"_legend\", \"rainbowBins\");\n\nMegaChart.prototype.publishProxy(\"domainAxisTitle\", \"_domainTitle\", \"text\");\nMegaChart.prototype.publishProxy(\"valueAxisTitle\", \"_valueTitle\", \"text\");\n\nMegaChart.prototype.publishProxy(\"chartType\", \"_chart\", \"chartType\");\nMegaChart.prototype.publishProxy(\"chart\", \"_chart\", \"chart\");\n","import { Platform, Utility, Widget } from \"@hpcc-js/common\";\nimport { Persist } from \"@hpcc-js/other\";\nimport { requireWidget } from \"./Utility.ts\";\n\nexport function retrofit_114_serialization(state, replacement_version) {\n replacement_version = !replacement_version || replacement_version === \"1.14.2-dev\" ? \"1.18.0\" : replacement_version;\n if (!state.__version) return state;\n const state_version_obj = Utility.parseVersionString(state.__version);\n const target_version_obj = Utility.parseVersionString(replacement_version);\n if (state_version_obj.major === 1 && state_version_obj.minor === 14) {\n console.info(\"Upgrading old persist from \" + state.__version + \" to \" + replacement_version);\n let _json_str = JSON.stringify(state);\n _json_str = _json_str.split('\"' + state.__version).join('\"' + replacement_version);\n\n const ret_obj = JSON.parse(_json_str);\n if (ret_obj.__properties && ret_obj.__properties.content) {\n ret_obj.__properties.content.forEach(function (n) {// FOR EACH top tier layout_Cell\n if (JSON.stringify(n).split(\"graph_Graph\").length > 1 && target_version_obj.minor >= 16) {\n n.__properties.widget.__id = n.__properties.widget.__properties.widget.__id;\n n.__properties.widget.__class = \"composite_MegaChart\";\n n.__properties.widget.__properties.showCSV = false;\n n.__properties.widget.__properties.chartType = \"GRAPH\";\n n.__properties.widget.__properties.chart = n.__properties.widget.__properties.widget;\n delete n.__properties.widget.__properties.chart.__id;\n delete n.__properties.widget.__properties.widget;\n }\n if (\"undefined\" === typeof n.__properties.fields) {\n n.__properties.fields = [];\n }\n });\n }\n return ret_obj;\n } else {\n return state;\n }\n}\n\nexport function deserializeFromObject(widget, state) {\n const promises = [];\n Persist.widgetPropertyWalker(widget, null, (w, item) => {\n w[item.id + \"_reset\"]();\n if (state.__properties[item.id] !== undefined) {\n switch (item.type) {\n case \"widget\":\n const widgetKey = item.id;\n promises.push(create(state.__properties[item.id]).then((w2: any) => {\n w2._owner = w;\n w[widgetKey](w2);\n return w2;\n }));\n break;\n case \"widgetArray\":\n case \"propertyArray\":\n const widgetArrayKey = item.id;\n const widgetStateArray = state.__properties[item.id];\n if (widgetStateArray.length) {\n const arrPromises = [];\n for (const widgetState of widgetStateArray) {\n arrPromises.push(create(widgetState).then((widgetItem: any) => {\n widgetItem._owner = w;\n return widgetItem;\n }));\n }\n promises.push(Promise.all(arrPromises).then(widgetArray => {\n w[widgetArrayKey](widgetArray);\n }));\n }\n break;\n default:\n w[item.id](state.__properties[item.id]);\n break;\n }\n }\n });\n return Promise.all(promises).then(widgets => {\n if (state.__data) {\n for (const key in state.__data) {\n if (state.__data.HasOwnProperty(key)) {\n switch (key) {\n case \"data\":\n widget.data(state.__data[key]);\n break;\n default:\n console.warn(\"Unexpected __data item: \" + key);\n widget[key](state.__data[key]);\n break;\n }\n }\n }\n }\n if (state.__state) {\n if (widget.deserializeState) {\n widget.deserializeState(state.__state);\n } else if (state.__state.data && widget.data) {\n widget.data(state.__state.data);\n }\n }\n return widget;\n });\n}\n\nexport function deserialize(widget, state) {\n if (typeof state === \"string\") {\n state = JSON.parse(state);\n }\n if (state.__id && state.__id.indexOf(widget._idSeed) !== 0 && widget._id !== state.__id) {\n console.warn(\"Deserialize: IDs do not match - \" + widget._id);\n }\n deserializeFromObject(widget, state);\n}\n\nexport function create(state: any): Promise<Widget> {\n if (typeof state === \"string\") {\n state = JSON.parse(state);\n }\n state = retrofit_114_serialization(state, Platform.version());\n return requireWidget(state.__class).then((WidgetClass: any) => {\n const widget = new WidgetClass();\n if (state.__id && state.__id.indexOf(widget._idSeed) !== 0 && state.__id.indexOf(\"_pe\") !== 0) {\n widget._id = state.__id;\n }\n return deserializeFromObject(widget, state);\n }).catch(function (e) {\n console.error(\"Persist.create: ***exception***\");\n console.error(e);\n });\n}\n\nexport function clone(widget) {\n create(Persist.serializeToObject(widget, undefined, true, true));\n}\n","export const PKG_NAME = \"@hpcc-js/composite\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\n"],"names":["__defProp","Object","defineProperty","__name","target","value","configurable","_mergeNamespaces","n","m","i","length","e","Array","isArray","k2","d","getOwnPropertyDescriptor","get","enumerable","freeze","Symbol","toStringTag","_AbsoluteSurface","_a","HTMLWidget","constructor","super","this","_tag","enter","domNode","element","update","xPos","yPos","width","clientWidth","height","clientHeight","units","widgetX","widgetY","widgetWidth","Number","widgetHeight","style","opacity","widgets","selectAll","_id","data","widget","append","attr","each","merge","resize","exit","remove","AbsoluteSurface","prototype","_class","publish","tags","_Accordion","_b","_isClosed","titleSpan","iconDiv","ul","icon","pushListItem","prepend","protect","contentArr","content","_protected","unshift","push","clearListItems","arr","collapseClick","classed","context","defaultCollapsed","FAChar","size","node","on","render","text","title","rows","li","document","createElement","_target","wSize","cSize","text_colorFill","titleFontColor","char","closedIcon","openIcon","Accordion","_Surface","_c","_surfaceButtons","widgetSize","titleDiv","widgetDiv","calcHeight","calcFrameHeight","calcFrameWidth","element2","surfaceShadow","surfaceBorderWidth_exists","surfaceBorderWidth","surfaceBorderColor","surfaceBorderRadius_exists","surfaceBorderRadius","surfaceBackgroundColor","titles","insert","surfaceTitleAlignment","surfaceTitleFontColor","surfaceTitleFontSize_exists","surfaceTitleFontSize","surfaceTitleFontFamily","surfaceTitleFontBold","surfaceTitleBackgroundColor","surfaceTitlePadding_exists","surfaceTitlePadding","altText_exists","altText","surfaceButtons","select","buttonAnnotations","button","idx","el","class","id","padding","font","click","label","_d","parentElement","classID","split","surfacePadding_exists","surfacePadding","obj","Surface","optional","disable","w","_Cell","_indicateTheseIds","indicateTheseIds","_","arguments","onMouseEnter","onMouseLeave","indicatorOpacity","indicatorBorderColor","indicatorGlowColor","otherElement","otherWidget","datum","Cell","_Border","_e","_colCount","_rowCount","_colSize","_rowSize","_shrinkWrapBoxes","_watch","_offsetX","_offsetY","_dragCell","_dragCellSize","_dragCellStartSize","_handleTop","_handleLeft","_dragPrevX","_dragPrevY","_cellSizes","contentDiv","_scrollBarWidth","_borderHandles","_sectionTypeArr","sectionTypes","watchWidget","monitor","paramId","newVal","oldVal","lazyPostUpdate","Utility","debounce","postUpdate","applyLayoutType","layoutObj","borderLayoutObject","forEach","cell","_fixedLeft","left","_fixedTop","top","_fixedWidth","_fixedHeight","_dragHandles","cellSpecificDragHandles","sectionType","layoutType","retObj","topSize","topPerc","bottomSize","bottomPerc","leftSize","leftPerc","rightSize","rightPerc","bcRect","getBoundingClientRect","bottom","right","SVGElement","parseFloat","getAttribute","indexOf","topPercentage","gutter","bottomPercentage","leftPercentage","rightPercentage","t","_sectionPlacementObject","px","b","l","r","c2","clearContent","splice","contentWidget","hasContent","setContent","getCell","getContent","setLayoutOffsets","_element","dragStart","handle","event","d3Event","sourceEvent","stopPropagation","handleElm","clientX","clientY","dragTick","xDelta","yDelta","_moveHandles","handle2","delta","handles","grabbedHandle","topHeight","leftHeight","bottomHeight","rightHeight","rightWidth","leftWidth","handle3","dragEnd","getBBox","retVal","apply","_size","Platform","getScrollbarWidth","designMode","rowsUpdate","drag$1","drag","call","_placeholderElement","getCellSizes","contentRect","rect","prevBox","currBox","lazyRender","Border","_WidgetDiv","_f","_div","_overlay","_overflowX","_overflowY","_widget","div","overlay","overflowX","overflowY","availableHeight","availableWidth","renderPromise","then","visible","x","y","Promise","resolve","WidgetDiv","_Border2","_g","_bodyElement","_topWA","_leftWA","_centerWA","_rightWA","_bottomWA","_topPrevOverflow","_leftPrevOverflow","_rightPrevOverflow","_bottomPrevOverflow","topElement","centerElement","leftElement","rightElement","bottomElement","showTop","showRight","showBottom","showLeft","topOverflowX","rightOverflowX","bottomOverflowX","leftOverflowX","topOverflowY","rightOverflowY","bottomOverflowY","leftOverflowY","targetNull","center","swap","sectionA","sectionB","a2","callback","topOverlay","async","topBBox","bottomBBox","leftBBox","rightBBox","bottomHeight_exists","bodyWidth","bodyHeight","centerOverflowX","centerOverflowY","scrollCenterX","scrollCenterY","promises","all","promises2","Border2","_Carousel","_h","_prevActive","_root","activeWidget","active","widgetElements","transition","duration","transitionDuration","isDOMHidden","aw","w2","Carousel","pi$1","Math","PI","tau$1","epsilon","tauEpsilon","Path","_x0","_y0","_x1","_y1","path","constant","moveTo","closePath","lineTo","quadraticCurveTo","x1","y1","bezierCurveTo","x2","y2","arcTo","x0","y0","x21","y21","x01","y01","l01_2","Error","abs","x20","y20","l21_2","l20_2","l21","sqrt","l01","tan","acos","t01","t21","arc","a0","a1","ccw","dx","cos","dy","sin","cw","da","h","toString","pi","tau","d3SymbolCircle","draw","d3SymbolCross","tan30","tan30_2","d3SymbolDiamond","kr","kx","ky","d3SymbolStar","s2","d3SymbolSquare","sqrt3","d3SymbolTriangle","c","s","k","a","d3SymbolWye","d3Symbol","type","symbol","buffer","_typeof","iterator","d3_identity","d3_reverse","mirror","d3_textWrapping","word","text2","words","reverse","line","tspan","pop","join","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","labelDelimiter","customLabels","genLength","_i","generatedLabels","d3_linearLegend","scale","cells","labelFormat","increment","map","feature","d3_quantLegend","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","d3_cellOut","d3_cellClick","helper","d3_drawShapes","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path2","d3_addText","svg","classPrefix","labelWidth","d3_calcType","ascending","ticks","d3_filterCells","cellFilter","filterCells","filter","dataValues","labelValues","d3_placement","orient","cellTrans","textTrans","labelAlign","d3_addEvents","dispatcher","d3_title","titleWidth","cellsSvg","yOffset","nodes","xOffset","d3_defaultLocale","format","formatPrefix","d3_defaultFormatSpecifier","d3_defaultDelimiter","color","scaleLinear","shapePadding","useClass","locale","specifier","labelOffset","labelWrap","legendDispatcher","dispatch","legend","cellEnter","textSize","shapeSize","cellSize","textAlign","max","sum","slice","formatLocale","formatSpecifier","toLowerCase","textWrap","_Legend","SVGWidget","_owner","_targetWidget","_targetWidgetMonitor","_legendOrdinal","_disabled","_symbolTypeMap","circle","cross","diamond","square","star","triangle","wye","owner","_drawStartPos","onClick","onOver","onOut","isDisabled","Database","Field","filteredFields","dataFamily","fields","filteredColumns","columns","filteredData","row","disabledCols","anyDisabled","col","disabled","isRainbow","getWidget","_palette","targetWidget","key","newProp","oldProp","source","chart","getPalette","Palette","ordinal","rainbow","getPaletteType","fillColorFunc","fillColor","paletteID","name","switch","sel","palette","calcMetaData","dataArr","total","maxLabelWidth","colLength","val","reduce","acc","n2","showSeriesTotal","format$1","rainbowFormat","steps","rainbowBins","weightMin","_dataMinWeight","weightMax","_dataMaxWeight","stepWeightDiff","mid","floor","parseInt","radius","radiusToSymbolSize","itemPadding","orientation","scaleOrdinal","symbolType","labelMaxWidth","updateDisabled","legendCellsBbox","offsetX","offsetY","_containerSize","pos","legendTotal","showLegendTotal","totalText","totalOffsetX","totalOffsetY","enableOverflowScroll","enableOverflow","_boundingBox","_parentRelativeDiv","circleSize","pow","disabledIdx","refreshColumns","refreshData","instanceOfIHighlight","highlightColumn","onDblClick","rowData","rowIdx","onMouseOver","fitToContent","bbox","Legend","_Modal","_j","_relativeTarget","_fade","_modal","_modalHeader","_modalBody","_modalHeaderAnnotations","_modalHeaderCloseButton","_close","closeModal","getRelativeTarget","relativeTarget","relativeTargetId","getElementById","locateAncestor","body","setModalSize","fixedHeight","fixedWidth","minHeight","minWidth","maxHeight","maxWidth","modalRect","headerRect","setFadePosition","setModalPosition","fixedTop","fixedLeft","resizeBodySync","enableClickFadeToClose","showFade","header_h","titleFontSize","formattedTitle","html","show","title_exists","trim","Modal","_ChartPanel","_k","_legend","_progressBar","ProgressBar","_autoScale","_resolutions","tiny","small","_highlight","_scale","_orig_size","_toggleInfo","ToggleButton","faChar","tooltip","selected","description","Text","origCloseFunc","_toggleData","dataVisible","_buttonDownload","Button","downloadCSV","_buttonDownloadImage","downloadPNG","_toggleLegend","legendPosition","legendVisible","_spacer","Spacer","_titleBar","TitleBar","buttons","_carousel","_table","Table","_hideLegendToggleList","refreshFields","asDefault","highlight","startProgress","start","finishProgress","finish","namePrefix","downloadTitle","nameSuffix","downloadTimestampSuffix","timestamp","downloadString","export","column","cssTag","getResponsiveMode","enableAutoscaling","setOrigSize","JSON","parse","stringify","preUpdateTiny","preUpdateSmall","scale_x","scale_y","min","x_is_smaller","preUpdateRegular","_prevdataVisible","_prevlegendVisible","_prevLegendPosition","_prevChartDataFamily","_prevChart","_prevButtons","preUpdate","_dataFamily","highlightSize","highlightColor","widgetIconBar","IconBar","hiddenButtons","dataButtonVisible","downloadButtonVisible","downloadImageButtonVisible","legendButtonVisible","enabled","titleVisible","titleOverlay","postUpdateTiny","postUpdateSmall","postUpdateRegular","titleIconFontSize","_node","containerRect","icon_top","parentRect","_prevPos","dblclick","vertex_click","more","vertex","vertex_dblclick","edge_click","edge","edge_dblclick","ChartPanel","publishReset","publishProxy","tmpAny","_FlexGrid","_l","parentNode","cachedSizes","updateFlexParent","listItems","itemMinHeight","itemMinWidth","flexBasis","widgetsFlexBasis","flexGrow","widgetsFlexGrow","borderWidth","itemBorderColor","firstChild","display","flexWrap","alignItems","alignContent","forceXScroll","disableScroll","forceYScroll","FlexGrid","getDefaultExportFromCjs","__esModule","hasOwnProperty","hasRequiredGridList","gridList$2","exports","requireGridList","GridList2","items","options","_options","defaults","_adjustSizeOfItems","generateGrid","cloneItems","_items","lanes","direction","item","j","widthOfGrid","grid","output","border","_padNumber","_resetGrid","_markItemPositionToGrid","resizeGrid","currentColumn","_sortItemsByPosition","position","_getItemPosition","_updateItemPosition","findPositionForItem","_pullItemsToLeft","fixedRow","_itemFitsAtPosition","newCol","newRow","moveItemToPosition","newPosition","_resolveCollisions","resizeItem","_updateItemSize","getChangedItems","initialItems","idAttribute","changedItems","_getItemByAttribute","sort","item1","item2","position1","position2","bind","autoSize","_deleteItemPositionFromGrid","_setItemPosition","_ensureColumns","N","GridCol","_getItemsCollidingWithItem","collidingItems","_itemsAreColliding","_tryToResolveCollisionsLocally","leftOfItem","rightOfItem","aboveOfItem","belowOfItem","_gridList","collidingItem","collidingPosition","fixedItem","fixedPosition","_findLeftMostPositionForItem","tail","otherItem","otherPosition","nr","prefix","factory","gridListExports","gridList","_GridList","__proto__","default","GridList","_Grid","_m","divItems","itemsMap","origItems","cellWidth","cellHeight","dragItem","dragItemPos","_d3Drag","_d3DragResize","_selectionBag","Selection","getDimensions","gridCol","gridColSpan","gridRow","gridRowSpan","rowSpan","colSpan","sortedContent","some","getWidgetCell","cellToGridItem","gridItemToCell","resetItemsPos","origItem","initGridList","snapping","snappingRows","snappingColumns","killGridList","subject","selectionBagClick","updateGrid","round","_noRender","surfaceShadow_default","surfacePadding_default","surfaceBorderWidth_default","surfaceBackgroundColor_default","fitTo","dimensions","cellLaneRatio","laneWidth","__grid_watch","_renderCount","lanesBackground","selectionBagClear","showLanes","_createSelectionObject","selection","set","isEmpty","clear","postSelectionChange","selectionObj","ctrlKey","isSelected","applyLayout","layoutArr","vizActivation","elem","Grid","_HorizontalList","_n","orientation_default","flexWrap_default","_Layered","_o","_contentContainer","_widgetPlacements","_widgetRatios","addLayer","placement","widthRatio","heightRatio","clientSize","widgetPosition","order","Layered","_Popup","_p","_originalPosition","updateState","popupState","shrinkWrap","centerPopup","window","innerWidth","innerHeight","Popup","_Tabbed","_q","_tabContainer","clearTabs","addTab","isActive","activeTabIdx","surface","tcBox","tabs","showTabs","tabLocation","offsetHeight","Tabbed","_Toolbar","_r","backgroundColor","fontSize_exists","fontSize","fontColor_exists","fontColor","fontFamily_exists","fontFamily","fontBold_exists","fontBold","backgroundColor_exists","childWidgets","widgetClass","widgetClasses","toolbarBBox","minX","childBBox","Toolbar","_VerticalList","_s","requireWidget","_reject","parsedClassID","parseClassID","require","package","Package","Widget","widgetID","memberWidgetID","requireWidgets","classIDs","o","appendChild","createTextNode","head","console","error","_MultiChart","_allCharts","_chartTypeDefaults","_chartTypeProperties","_chartMonitor","_switchingTo","INDChart","IGraph","_allChartTypes","newItem","hasOverlay","chartTypeDefaults","chartTypeProperties","getChartDataFamily","chartType","family","requireContent","classInfo","import","mod","WidgetClass","switchChart","warn","oldContent","newContent","currChart","propKey","_callback","args","MultiChart","implements","_otherChartTypes","_graphChartTypes","_1DChartTypes","_2DChartTypes","_NDChartTypes","_mapChartTypes","_anyChartTypes","concat","_allMap","d3Map","_allFamilies","keys","_allChartTypesMap","_allChartTypesByClass","widgetPath","_origChart","_row","_column","_selected","broadcast","_Summary","_MultiChartPanel","multiChart","MultiChartPanel","_Dermatology","_toolbar","_propEditor","_showProperties","_propsButton","_prevWidget","PropertyEditor","show_settings","showProperties","toggleProperties","OnOff","showToolbar","showToolbar_exists","widget_exists","Dermatology","_MegaChart","_chart","_valueTitle","_domainTitle","_csvButton","_infoButton","_maximizeButton","_legendButton","_chartTypeSelect","_prevShowToolbar","_contentClasses","_dataCount","toolbarWidgets","topShrinkWrap","Html","infoIcon","buttonWidget","isMaximized","d3Select","parentGrid","targetElement","targetParentBox","targetPaddingTop","getComputedStyle","getPropertyValue","replace","targetPaddingLeft","targetPaddingRight","targetPaddingBottom","__old_position","__old_zindex","__old_backgroundColor","__old_boxshadow","zIndex","boxShadow","gridTarget","gridBox","gridPaddingTop","gridPaddingLeft","gridPaddingRight","gridPaddingBottom","maximizedBackgroundColor","Input","inlineLabel","Select","selectOptions","change","fixedSize","valueAxisTitle","rotation","leftShrinkWrap","domainAxisTitle","bottomShrinkWrap","showHideButton","twArr2","hideRowOnLegendClick","twArr","showCSV","showMaximize","toolbarShowLegend","showChartSelect","showInfoButton","showCount","titleFontFamily","titleFontBold","titleBackgroundColor","checked","getContentClasses","serializeState","state","deserializeState","hideRowOnLegendClick_exists","titleFontSize_exists","titleFontColor_exists","titleFontFamily_exists","titleFontBold_exists","titleBackgroundColor_exists","maximizedBackgroundColor_exists","showChartSelect_exists","showCSV_exists","showCount_exists","showMaximize_exists","toolbarShowLegend_exists","showInfoButton_exists","infoIcon_exists","legendPosition_exists","domainAxisTitle_exists","valueAxisTitle_exists","chartType_exists","chart_exists","MegaChart","retrofit_114_serialization","replacement_version","__version","state_version_obj","parseVersionString","target_version_obj","major","minor","info","_json_str","ret_obj","__properties","__id","__class","deserializeFromObject","Persist","widgetPropertyWalker","widgetKey","create","widgetArrayKey","widgetStateArray","arrPromises","widgetState","widgetItem","widgetArray","__data","HasOwnProperty","__state","deserialize","_idSeed","version","catch","clone","serializeToObject"],"mappings":"4qBAAA,IAAIA,EAAYC,OAAOC,eACnBC,EAASA,EAAA,CAACC,EAAQC,IAAUL,EAAUI,EAAQ,OAAQ,CAAEC,QAAOC,cAAc,IAApE,UAI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