@govtechsg/sgds-web-component 3.10.0-rc.4 → 3.10.0

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.
Files changed (146) hide show
  1. package/base/select-element.d.ts +0 -1
  2. package/base/select-element.js +0 -1
  3. package/base/select-element.js.map +1 -1
  4. package/components/Checkbox/index.umd.min.js +3 -3
  5. package/components/Checkbox/index.umd.min.js.map +1 -1
  6. package/components/Checkbox/sgds-checkbox-group.d.ts +0 -1
  7. package/components/Checkbox/sgds-checkbox-group.js +0 -1
  8. package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  9. package/components/Checkbox/sgds-checkbox.d.ts +0 -1
  10. package/components/Checkbox/sgds-checkbox.js +0 -1
  11. package/components/Checkbox/sgds-checkbox.js.map +1 -1
  12. package/components/ComboBox/index.umd.min.js +225 -225
  13. package/components/ComboBox/index.umd.min.js.map +1 -1
  14. package/components/Datepicker/index.umd.min.js +3 -3
  15. package/components/Datepicker/index.umd.min.js.map +1 -1
  16. package/components/Datepicker/sgds-datepicker.d.ts +0 -1
  17. package/components/Datepicker/sgds-datepicker.js +0 -1
  18. package/components/Datepicker/sgds-datepicker.js.map +1 -1
  19. package/components/FileUpload/index.umd.min.js +2 -2
  20. package/components/FileUpload/index.umd.min.js.map +1 -1
  21. package/components/FileUpload/sgds-file-upload.d.ts +0 -1
  22. package/components/FileUpload/sgds-file-upload.js +0 -1
  23. package/components/FileUpload/sgds-file-upload.js.map +1 -1
  24. package/components/Input/index.umd.min.js +2 -2
  25. package/components/Input/index.umd.min.js.map +1 -1
  26. package/components/Input/sgds-input.d.ts +0 -1
  27. package/components/Input/sgds-input.js +0 -1
  28. package/components/Input/sgds-input.js.map +1 -1
  29. package/components/QuantityToggle/index.umd.min.js +3 -3
  30. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  31. package/components/QuantityToggle/sgds-quantity-toggle.d.ts +0 -1
  32. package/components/QuantityToggle/sgds-quantity-toggle.js +0 -1
  33. package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  34. package/components/Radio/index.umd.min.js +6 -6
  35. package/components/Radio/index.umd.min.js.map +1 -1
  36. package/components/Radio/sgds-radio-group.d.ts +0 -1
  37. package/components/Radio/sgds-radio-group.js +0 -1
  38. package/components/Radio/sgds-radio-group.js.map +1 -1
  39. package/components/Select/index.umd.min.js +2 -2
  40. package/components/Select/index.umd.min.js.map +1 -1
  41. package/components/SystemBanner/index.umd.min.js +2 -2
  42. package/components/SystemBanner/index.umd.min.js.map +1 -1
  43. package/components/SystemBanner/sgds-system-banner.d.ts +2 -2
  44. package/components/SystemBanner/sgds-system-banner.js +5 -5
  45. package/components/SystemBanner/sgds-system-banner.js.map +1 -1
  46. package/components/Table/index.umd.min.js +62 -17
  47. package/components/Table/index.umd.min.js.map +1 -1
  48. package/components/Table/sgds-table-cell.js +1 -1
  49. package/components/Table/sgds-table-cell.js.map +1 -1
  50. package/components/Table/sgds-table-head.d.ts +2 -5
  51. package/components/Table/sgds-table-head.js +24 -15
  52. package/components/Table/sgds-table-head.js.map +1 -1
  53. package/components/Table/sgds-table.d.ts +41 -6
  54. package/components/Table/sgds-table.js +57 -15
  55. package/components/Table/sgds-table.js.map +1 -1
  56. package/components/Table/table-cell.js +1 -1
  57. package/components/Table/table-context.d.ts +3 -0
  58. package/components/Table/table-context.js +6 -0
  59. package/components/Table/table-context.js.map +1 -0
  60. package/components/Table/table-head.js +1 -1
  61. package/components/Table/table.js +1 -1
  62. package/components/Textarea/index.umd.min.js +6 -6
  63. package/components/Textarea/index.umd.min.js.map +1 -1
  64. package/components/Textarea/sgds-textarea.d.ts +0 -1
  65. package/components/Textarea/sgds-textarea.js +0 -1
  66. package/components/Textarea/sgds-textarea.js.map +1 -1
  67. package/components/index.umd.min.js +31 -27
  68. package/components/index.umd.min.js.map +1 -1
  69. package/index.umd.min.js +616 -612
  70. package/index.umd.min.js.map +1 -1
  71. package/package.json +1 -1
  72. package/react/base/select-element.cjs.js +0 -1
  73. package/react/base/select-element.cjs.js.map +1 -1
  74. package/react/base/select-element.js +0 -1
  75. package/react/base/select-element.js.map +1 -1
  76. package/react/components/Checkbox/sgds-checkbox-group.cjs.js +0 -1
  77. package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
  78. package/react/components/Checkbox/sgds-checkbox-group.js +0 -1
  79. package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
  80. package/react/components/Checkbox/sgds-checkbox.cjs.js +0 -1
  81. package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
  82. package/react/components/Checkbox/sgds-checkbox.js +0 -1
  83. package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
  84. package/react/components/Datepicker/sgds-datepicker.cjs.js +0 -1
  85. package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
  86. package/react/components/Datepicker/sgds-datepicker.js +0 -1
  87. package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
  88. package/react/components/FileUpload/sgds-file-upload.cjs.js +0 -1
  89. package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
  90. package/react/components/FileUpload/sgds-file-upload.js +0 -1
  91. package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
  92. package/react/components/Input/sgds-input.cjs.js +0 -1
  93. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  94. package/react/components/Input/sgds-input.js +0 -1
  95. package/react/components/Input/sgds-input.js.map +1 -1
  96. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +0 -1
  97. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
  98. package/react/components/QuantityToggle/sgds-quantity-toggle.js +0 -1
  99. package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  100. package/react/components/Radio/sgds-radio-group.cjs.js +0 -1
  101. package/react/components/Radio/sgds-radio-group.cjs.js.map +1 -1
  102. package/react/components/Radio/sgds-radio-group.js +0 -1
  103. package/react/components/Radio/sgds-radio-group.js.map +1 -1
  104. package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -5
  105. package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
  106. package/react/components/SystemBanner/sgds-system-banner.js +5 -5
  107. package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
  108. package/react/components/Table/sgds-table-cell.cjs.js +1 -1
  109. package/react/components/Table/sgds-table-cell.cjs.js.map +1 -1
  110. package/react/components/Table/sgds-table-cell.js +1 -1
  111. package/react/components/Table/sgds-table-cell.js.map +1 -1
  112. package/react/components/Table/sgds-table-head.cjs.js +24 -15
  113. package/react/components/Table/sgds-table-head.cjs.js.map +1 -1
  114. package/react/components/Table/sgds-table-head.js +24 -15
  115. package/react/components/Table/sgds-table-head.js.map +1 -1
  116. package/react/components/Table/sgds-table.cjs.js +56 -14
  117. package/react/components/Table/sgds-table.cjs.js.map +1 -1
  118. package/react/components/Table/sgds-table.js +57 -15
  119. package/react/components/Table/sgds-table.js.map +1 -1
  120. package/react/components/Table/table-cell.cjs.js +1 -1
  121. package/react/components/Table/table-cell.js +1 -1
  122. package/react/components/Table/table-context.cjs.js +11 -0
  123. package/react/components/Table/table-context.cjs.js.map +1 -0
  124. package/react/components/Table/table-context.js +7 -0
  125. package/react/components/Table/table-context.js.map +1 -0
  126. package/react/components/Table/table-head.cjs.js +1 -1
  127. package/react/components/Table/table-head.js +1 -1
  128. package/react/components/Table/table.cjs.js +1 -1
  129. package/react/components/Table/table.js +1 -1
  130. package/react/components/Textarea/sgds-textarea.cjs.js +0 -1
  131. package/react/components/Textarea/sgds-textarea.cjs.js.map +1 -1
  132. package/react/components/Textarea/sgds-textarea.js +0 -1
  133. package/react/components/Textarea/sgds-textarea.js.map +1 -1
  134. package/react/utils/inputValidationController.cjs.js +2 -2
  135. package/react/utils/inputValidationController.cjs.js.map +1 -1
  136. package/react/utils/inputValidationController.js +2 -2
  137. package/react/utils/inputValidationController.js.map +1 -1
  138. package/react/utils/validatorMixin.cjs.js +10 -13
  139. package/react/utils/validatorMixin.cjs.js.map +1 -1
  140. package/react/utils/validatorMixin.js +10 -13
  141. package/react/utils/validatorMixin.js.map +1 -1
  142. package/utils/inputValidationController.d.ts +1 -1
  143. package/utils/inputValidationController.js +2 -2
  144. package/utils/inputValidationController.js.map +1 -1
  145. package/utils/validatorMixin.js +10 -13
  146. package/utils/validatorMixin.js.map +1 -1
@@ -25,10 +25,10 @@ export declare class SgdsSystemBanner extends SgdsElement {
25
25
  show: boolean;
26
26
  /** Enables a close button that allows the user to dismiss the alert. */
27
27
  dismissible: boolean;
28
- /** When true, removes max-width constraint to allow content to stretch full screen width */
29
- fluid: boolean;
30
28
  /** Disables the action link that appears when text content is clamped */
31
29
  noClampAction: boolean;
30
+ /** When true, removes max-width constraint to allow content to stretch full screen width */
31
+ fluid: boolean;
32
32
  /** Closes the alert */
33
33
  close(): void;
34
34
  private bannerItem;
@@ -30,10 +30,10 @@ class SgdsSystemBanner extends SgdsElement {
30
30
  this.show = false;
31
31
  /** Enables a close button that allows the user to dismiss the alert. */
32
32
  this.dismissible = false;
33
- /** When true, removes max-width constraint to allow content to stretch full screen width */
34
- this.fluid = false;
35
33
  /** Disables the action link that appears when text content is clamped */
36
34
  this.noClampAction = false;
35
+ /** When true, removes max-width constraint to allow content to stretch full screen width */
36
+ this.fluid = false;
37
37
  this._intervalId = null;
38
38
  this._intervalTime = 5000;
39
39
  this._currentIndex = 0;
@@ -190,15 +190,15 @@ __decorate([
190
190
  __decorate([
191
191
  property({ type: Boolean, reflect: true })
192
192
  ], SgdsSystemBanner.prototype, "dismissible", void 0);
193
- __decorate([
194
- property({ type: Boolean, reflect: true })
195
- ], SgdsSystemBanner.prototype, "fluid", void 0);
196
193
  __decorate([
197
194
  provide({ context: NoClampActionContext })
198
195
  /** When true, all its children SgdsSystemBannerItem's message will be truncated with ellipsis only */
199
196
  ,
200
197
  property({ type: Boolean })
201
198
  ], SgdsSystemBanner.prototype, "noClampAction", void 0);
199
+ __decorate([
200
+ property({ type: Boolean, reflect: true })
201
+ ], SgdsSystemBanner.prototype, "fluid", void 0);
202
202
  __decorate([
203
203
  queryAssignedElements({ flatten: true })
204
204
  ], SgdsSystemBanner.prototype, "bannerItem", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-system-banner.js","sources":["../../../src/components/SystemBanner/sgds-system-banner.ts"],"sourcesContent":["import { html, nothing, PropertyValueMap } from \"lit\";\nimport { property, query, queryAssignedElements, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsCloseButton from \"../CloseButton/sgds-close-button\";\nimport { animateTo } from \"../../utils/animate\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry\";\nimport { watch } from \"../../utils/watch\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport SgdsIconButton from \"../IconButton/sgds-icon-button\";\nimport alertBannerStyles from \"./system-banner.css\";\nimport SgdsSystemBannerItem from \"./sgds-system-banner-item\";\nimport { SystemBannerChildCountContext, NoClampActionContext } from \"./system-banner-context\";\nimport { provide } from \"@lit/context\";\n\n/**\n * @summary The system banner component for displaying important messages to users at the application level.\n * Each banner can contain up to 5 banner items that cycle automatically every 5 seconds. Pagination appears when there are multiple items, allowing users to navigate between them. The banner can also be made dismissible with a close button.\n * `sgds-system-banner-item` is the subcomponent for `sgds-system-banner`. Each banner item represents a message in the system banner.\n *\n * @slot default - The slot to pass in `sgds-system-banner-item`\n *\n * @event sgds-show - Emitted when the banner has start to appear on screen\n * @event sgds-hide - Emitted when the banner is disappearing from the screen\n */\nexport class SgdsSystemBanner extends SgdsElement {\n static styles = [...SgdsElement.styles, alertBannerStyles];\n /**@internal */\n static dependencies = {\n \"sgds-close-button\": SgdsCloseButton,\n \"sgds-icon\": SgdsIcon,\n \"sgds-icon-button\": SgdsIconButton\n };\n /** Controls the appearance of the alert */\n @property({ type: Boolean, reflect: true }) show = false;\n\n /** Enables a close button that allows the user to dismiss the alert. */\n @property({ type: Boolean, reflect: true }) dismissible = false;\n\n /** When true, removes max-width constraint to allow content to stretch full screen width */\n @property({ type: Boolean, reflect: true }) fluid = false;\n /** Disables the action link that appears when text content is clamped */\n\n @provide({ context: NoClampActionContext })\n /** When true, all its children SgdsSystemBannerItem's message will be truncated with ellipsis only */\n @property({ type: Boolean })\n noClampAction = false;\n\n /** Closes the alert */\n public close() {\n this.show = false;\n }\n @queryAssignedElements({ flatten: true })\n private bannerItem: SgdsSystemBannerItem[];\n\n @query(\".banner\")\n private banner: HTMLDivElement;\n\n @provide({ context: SystemBannerChildCountContext })\n @state()\n private childCount: number;\n\n @state() private _intervalId = null;\n\n private _intervalTime = 5000;\n\n @state() private _currentIndex = 0;\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>): void {\n super.firstUpdated(changedProperties);\n this.childCount = this.bannerItem.length;\n if (!this.show) {\n this.banner.classList.add(\"d-none\");\n } else {\n this.childCount > 1 && this._startAutoCycle();\n this.addEventListener(\"mouseenter\", this._pauseAutoCycle.bind(this));\n this.addEventListener(\"mouseleave\", this._resumeAutoCycle.bind(this));\n\n this.addEventListener(\"focus\", this._pauseAutoCycle.bind(this));\n this.addEventListener(\"blur\", this._resumeAutoCycle.bind(this));\n }\n this._updateActiveItem();\n\n if (this.childCount > 5) {\n console.warn(\"It is not recommended to have more than 5 <sgds-system-banner-item> elements.\");\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this._stopAutoCycle();\n }\n\n /**@internal */\n @watch(\"show\", { waitUntilFirstUpdate: true })\n async _handleShowChange() {\n if (this.show) {\n this.childCount > 1 && this._startAutoCycle();\n this.emit(\"sgds-show\");\n this.banner.classList.remove(\"d-none\");\n } else {\n this._stopAutoCycle();\n this.emit(\"sgds-hide\");\n this.banner.classList.add(\"d-none\");\n }\n }\n\n private _updateActiveItem() {\n const items = this.bannerItem;\n items.forEach((item, i) => {\n if (i === this._currentIndex) {\n item.setAttribute(\"active\", \"\");\n } else {\n item.removeAttribute(\"active\");\n }\n });\n }\n private _next() {\n const items = this.bannerItem;\n this._currentIndex = (this._currentIndex + 1) % items.length;\n this._updateActiveItem();\n this._animateItem(items[this._currentIndex], \"next\");\n this._resetAutoCycle();\n }\n\n private _prev() {\n const items = this.bannerItem;\n this._currentIndex = (this._currentIndex - 1 + items.length) % items.length;\n this._updateActiveItem();\n this._animateItem(items[this._currentIndex], \"prev\");\n this._resetAutoCycle();\n }\n private async _animateItem(item: SgdsSystemBannerItem, direction: \"next\" | \"prev\") {\n // Cancel any existing animations before starting a new one\n item.getAnimations().forEach(a => a.cancel());\n // Start the slide-down animation\n const bannerLoopMessage = getAnimation(this, `banner.item.${direction}`);\n await animateTo(item, bannerLoopMessage.keyframes, bannerLoopMessage.options);\n }\n private _startAutoCycle() {\n this._stopAutoCycle(); // avoid duplicates\n this._intervalId = setInterval(() => this._next(), this._intervalTime);\n }\n\n private _stopAutoCycle() {\n if (this._intervalId) {\n clearInterval(this._intervalId);\n this._intervalId = null;\n }\n }\n private _resetAutoCycle() {\n this._stopAutoCycle();\n this._startAutoCycle();\n }\n private _pauseAutoCycle(): void {\n this._stopAutoCycle();\n }\n\n private _resumeAutoCycle(): void {\n if (this.show && this.childCount > 1) {\n this._startAutoCycle();\n }\n }\n render() {\n return html`\n <div class=\"banner-wrapper\">\n <div\n class=\"${classMap({\n banner: true\n })}\"\n role=\"alert\"\n aria-hidden=${this.show ? \"false\" : \"true\"}\n >\n <div class=\"content\">\n <slot id=\"loop-slot\"></slot>\n </div>\n ${this.childCount > 1\n ? html` <div class=\"pagination\">\n <sgds-icon-button\n name=\"chevron-left\"\n tone=\"fixed-light\"\n variant=\"ghost\"\n size=\"xs\"\n @click=${this._prev}\n ></sgds-icon-button>\n <span>${this._currentIndex + 1}/${this.childCount}</span>\n <sgds-icon-button\n name=\"chevron-right\"\n tone=\"fixed-light\"\n variant=\"ghost\"\n size=\"xs\"\n @click=${this._next}\n ></sgds-icon-button>\n </div>`\n : nothing}\n ${this.dismissible\n ? html`\n <sgds-close-button\n aria-label=\"close the alert\"\n @click=${this.close}\n tone=\"fixed-light\"\n ></sgds-close-button>\n `\n : nothing}\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSystemBanner;\n\nsetDefaultAnimation(\"banner.item.next\", {\n keyframes: [\n { opacity: 0, transform: \"translateY(-100%)\" },\n { opacity: 1, transform: \"translateY(0)\" }\n ],\n options: {\n duration: 500,\n easing: \"cubic-bezier(0.45,0.05,0.55,0.95)\"\n }\n});\nsetDefaultAnimation(\"banner.item.prev\", {\n keyframes: [\n { opacity: 0, transform: \"translateY(100%)\" },\n { opacity: 1, transform: \"translateY(0)\" }\n ],\n options: {\n duration: 500,\n easing: \"cubic-bezier(0.45,0.05,0.55,0.95)\"\n }\n});\n"],"names":["alertBannerStyles"],"mappings":";;;;;;;;;;;;;;;AAeA;;;;;;;;;AASG;AACG,MAAO,gBAAiB,SAAQ,WAAW,CAAA;AAAjD,IAAA,WAAA,GAAA;;;QAS8C,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;QAGb,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAGpB,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;;QAM1D,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;QAgBL,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;QAE5B,IAAa,CAAA,aAAA,GAAG,IAAI,CAAC;QAEZ,IAAa,CAAA,aAAA,GAAG,CAAC,CAAC;KA6IpC;;IA9JQ,KAAK,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KACnB;AAiBS,IAAA,YAAY,CAAC,iBAAyC,EAAA;AAC9D,QAAA,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;AACzC,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC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EAAE;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,MAAM,EAAE,mCAAmC;AAC5C,KAAA;AACF,CAAA,CAAC,CAAC;AACH,mBAAmB,CAAC,kBAAkB,EAAE;AACtC,IAAA,SAAS,EAAE;AACT,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE;AAC7C,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE;AAC3C,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,MAAM,EAAE,mCAAmC;AAC5C,KAAA;AACF,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"sgds-system-banner.js","sources":["../../../src/components/SystemBanner/sgds-system-banner.ts"],"sourcesContent":["import { html, nothing, PropertyValueMap } from \"lit\";\nimport { property, query, queryAssignedElements, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsCloseButton from \"../CloseButton/sgds-close-button\";\nimport { animateTo } from \"../../utils/animate\";\nimport { getAnimation, setDefaultAnimation } from \"../../utils/animation-registry\";\nimport { watch } from \"../../utils/watch\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport SgdsIconButton from \"../IconButton/sgds-icon-button\";\nimport alertBannerStyles from \"./system-banner.css\";\nimport SgdsSystemBannerItem from \"./sgds-system-banner-item\";\nimport { SystemBannerChildCountContext, NoClampActionContext } from \"./system-banner-context\";\nimport { provide } from \"@lit/context\";\n\n/**\n * @summary The system banner component for displaying important messages to users at the application level.\n * Each banner can contain up to 5 banner items that cycle automatically every 5 seconds. Pagination appears when there are multiple items, allowing users to navigate between them. The banner can also be made dismissible with a close button.\n * `sgds-system-banner-item` is the subcomponent for `sgds-system-banner`. Each banner item represents a message in the system banner.\n *\n * @slot default - The slot to pass in `sgds-system-banner-item`\n *\n * @event sgds-show - Emitted when the banner has start to appear on screen\n * @event sgds-hide - Emitted when the banner is disappearing from the screen\n */\nexport class SgdsSystemBanner extends SgdsElement {\n static styles = [...SgdsElement.styles, alertBannerStyles];\n /**@internal */\n static dependencies = {\n \"sgds-close-button\": SgdsCloseButton,\n \"sgds-icon\": SgdsIcon,\n \"sgds-icon-button\": SgdsIconButton\n };\n /** Controls the appearance of the alert */\n @property({ type: Boolean, reflect: true }) show = false;\n\n /** Enables a close button that allows the user to dismiss the alert. */\n @property({ type: Boolean, reflect: true }) dismissible = false;\n\n /** Disables the action link that appears when text content is clamped */\n @provide({ context: NoClampActionContext })\n /** When true, all its children SgdsSystemBannerItem's message will be truncated with ellipsis only */\n @property({ type: Boolean })\n noClampAction = false;\n\n /** When true, removes max-width constraint to allow content to stretch full screen width */\n @property({ type: Boolean, reflect: true }) fluid = false;\n\n /** Closes the alert */\n public close() {\n this.show = false;\n }\n @queryAssignedElements({ flatten: true })\n private bannerItem: SgdsSystemBannerItem[];\n\n @query(\".banner\")\n private banner: HTMLDivElement;\n\n @provide({ context: SystemBannerChildCountContext })\n @state()\n private childCount: number;\n\n @state() private _intervalId = null;\n\n private _intervalTime = 5000;\n\n @state() private _currentIndex = 0;\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>): void {\n super.firstUpdated(changedProperties);\n this.childCount = this.bannerItem.length;\n if (!this.show) {\n this.banner.classList.add(\"d-none\");\n } else {\n this.childCount > 1 && this._startAutoCycle();\n this.addEventListener(\"mouseenter\", this._pauseAutoCycle.bind(this));\n this.addEventListener(\"mouseleave\", this._resumeAutoCycle.bind(this));\n\n this.addEventListener(\"focus\", this._pauseAutoCycle.bind(this));\n this.addEventListener(\"blur\", this._resumeAutoCycle.bind(this));\n }\n this._updateActiveItem();\n\n if (this.childCount > 5) {\n console.warn(\"It is not recommended to have more than 5 <sgds-system-banner-item> elements.\");\n }\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this._stopAutoCycle();\n }\n\n /**@internal */\n @watch(\"show\", { waitUntilFirstUpdate: true })\n async _handleShowChange() {\n if (this.show) {\n this.childCount > 1 && this._startAutoCycle();\n this.emit(\"sgds-show\");\n this.banner.classList.remove(\"d-none\");\n } else {\n this._stopAutoCycle();\n this.emit(\"sgds-hide\");\n this.banner.classList.add(\"d-none\");\n }\n }\n\n private _updateActiveItem() {\n const items = this.bannerItem;\n items.forEach((item, i) => {\n if (i === this._currentIndex) {\n item.setAttribute(\"active\", \"\");\n } else {\n item.removeAttribute(\"active\");\n }\n });\n }\n private _next() {\n const items = this.bannerItem;\n this._currentIndex = (this._currentIndex + 1) % items.length;\n this._updateActiveItem();\n this._animateItem(items[this._currentIndex], \"next\");\n this._resetAutoCycle();\n }\n\n private _prev() {\n const items = this.bannerItem;\n this._currentIndex = (this._currentIndex - 1 + items.length) % items.length;\n this._updateActiveItem();\n this._animateItem(items[this._currentIndex], \"prev\");\n this._resetAutoCycle();\n }\n private async _animateItem(item: SgdsSystemBannerItem, direction: \"next\" | \"prev\") {\n // Cancel any existing animations before starting a new one\n item.getAnimations().forEach(a => a.cancel());\n // Start the slide-down animation\n const bannerLoopMessage = getAnimation(this, `banner.item.${direction}`);\n await animateTo(item, bannerLoopMessage.keyframes, bannerLoopMessage.options);\n }\n private _startAutoCycle() {\n this._stopAutoCycle(); // avoid duplicates\n this._intervalId = setInterval(() => this._next(), this._intervalTime);\n }\n\n private _stopAutoCycle() {\n if (this._intervalId) {\n clearInterval(this._intervalId);\n this._intervalId = null;\n }\n }\n private _resetAutoCycle() {\n this._stopAutoCycle();\n this._startAutoCycle();\n }\n private _pauseAutoCycle(): void {\n this._stopAutoCycle();\n }\n\n private _resumeAutoCycle(): void {\n if (this.show && this.childCount > 1) {\n this._startAutoCycle();\n }\n }\n render() {\n return html`\n <div class=\"banner-wrapper\">\n <div\n class=\"${classMap({\n banner: true\n })}\"\n role=\"alert\"\n aria-hidden=${this.show ? \"false\" : \"true\"}\n >\n <div class=\"content\">\n <slot id=\"loop-slot\"></slot>\n </div>\n ${this.childCount > 1\n ? html` <div class=\"pagination\">\n <sgds-icon-button\n name=\"chevron-left\"\n tone=\"fixed-light\"\n variant=\"ghost\"\n size=\"xs\"\n @click=${this._prev}\n ></sgds-icon-button>\n <span>${this._currentIndex + 1}/${this.childCount}</span>\n <sgds-icon-button\n name=\"chevron-right\"\n tone=\"fixed-light\"\n variant=\"ghost\"\n size=\"xs\"\n @click=${this._next}\n ></sgds-icon-button>\n </div>`\n : nothing}\n ${this.dismissible\n ? html`\n <sgds-close-button\n aria-label=\"close the alert\"\n @click=${this.close}\n tone=\"fixed-light\"\n ></sgds-close-button>\n `\n : nothing}\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSystemBanner;\n\nsetDefaultAnimation(\"banner.item.next\", {\n keyframes: [\n { opacity: 0, transform: \"translateY(-100%)\" },\n { opacity: 1, transform: \"translateY(0)\" }\n ],\n options: {\n duration: 500,\n easing: \"cubic-bezier(0.45,0.05,0.55,0.95)\"\n }\n});\nsetDefaultAnimation(\"banner.item.prev\", {\n keyframes: [\n { opacity: 0, transform: \"translateY(100%)\" },\n { opacity: 1, transform: \"translateY(0)\" }\n ],\n options: {\n duration: 500,\n easing: \"cubic-bezier(0.45,0.05,0.55,0.95)\"\n }\n});\n"],"names":["alertBannerStyles"],"mappings":";;;;;;;;;;;;;;;AAeA;;;;;;;;;AASG;AACG,MAAO,gBAAiB,SAAQ,WAAW,CAAA;AAAjD,IAAA,WAAA,GAAA;;;QAS8C,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;;QAGb,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAMhE,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;;QAGsB,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;QAgBzC,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;QAE5B,IAAa,CAAA,aAAA,GAAG,IAAI,CAAC;QAEZ,IAAa,CAAA,aAAA,GAAG,CAAC,CAAC;KA6IpC;;IA9JQ,KAAK,GAAA;AACV,QAAA,IAA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C;AAW7C,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,IAAA,CAAA,CAAA;AA2GH,mBAAmB,CAAC,kBAAkB,EAAE;AACtC,IAAA,SAAS,EAAE;AACT,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE;AAC9C,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE;AAC3C,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,MAAM,EAAE,mCAAmC;AAC5C,KAAA;AACF,CAAA,CAAC,CAAC;AACH,mBAAmB,CAAC,kBAAkB,EAAE;AACtC,IAAA,SAAS,EAAE;AACT,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE;AAC7C,QAAA,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE;AAC3C,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,MAAM,EAAE,mCAAmC;AAC5C,KAAA;AACF,CAAA,CAAC;;;;"}
@@ -4,25 +4,30 @@
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new WeakMap;class o{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this._strings=e}get styleSheet(){let t=this._styleSheet;const e=this._strings;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this._styleSheet=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(s)+t[i+1],t[0]);return new o(s,t,i)},a=t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return new o("string"==typeof(s=e)?s:String(s),void 0,i);var s},l=s?t=>t:t=>t instanceof CSSStyleSheet?a(t):t,{is:d,defineProperty:h,getOwnPropertyDescriptor:c,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:m}=Object,g=globalThis;let f;const v=g.trustedTypes,b=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupportDevMode;g.litIssuedWarnings??=new Set,f=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,g.litIssuedWarnings.has(e)||g.litIssuedWarnings.has(t)||(console.warn(e),g.litIssuedWarnings.add(e))},queueMicrotask(()=>{f("dev-mode","Lit is in dev mode. Not recommended for production!"),g.ShadyDOM?.inUse&&void 0===_&&f("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const y=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},$=(t,e)=>!d(t,e),S={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class x extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&h(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(c(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);f("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(e){const o=i?.call(this);r?.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static __prepare(){if(this.hasOwnProperty(y("elementProperties")))return;const t=m(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&f("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&f("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(t=>this.enableUpdating=t),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(t=>t(this))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{if(s)t.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of i){const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:w).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&f("undefined-attribute-value",`The attribute value for the ${t} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this.__reflectingProperty=i;const o=r.fromAttribute(e,t.type);this[i]=o??this.__defaultValues?.get(i)??o,this.__reflectingProperty=null}}requestUpdate(t,e,s,i=!1,r){if(void 0!==t){t instanceof Event&&f("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const o=this.constructor;!1===i&&(r=this[t]),s??=o.getPropertyOptions(t);if(!((s.hasChanged??$)(r,e)||s.useDefault&&s.reflect&&r===this.__defaultValues?.get(t)&&!this.hasAttribute(o.__attributeNameForProperty(t,s))))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this.__defaultValues??=new Map).has(t)&&(this.__defaultValues.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$changedProperties.has(t)||(this.hasUpdated||s||(e=void 0),this._$changedProperties.set(t,e)),!0===i&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&f("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},g.emitLitDebugLogEvents&&g.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter(t=>this.hasOwnProperty(t)&&t in m(this));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$changedProperties.has(e)||void 0===i||this._$changeProperty(e,void 0,s,i)}}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach(t=>t.hostUpdate?.()),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&f("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach(t=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(t){}firstUpdated(t){}}x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[y("elementProperties")]=new Map,x[y("finalized")]=new Map,_?.({ReactiveElement:x});{x.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(y("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};x.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},x.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(g.reactiveElementVersions??=[]).push("2.1.2"),g.reactiveElementVersions.length>1&&queueMicrotask(()=>{f("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
7
+ const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),r=new WeakMap;class o{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this._strings=e}get styleSheet(){let t=this._styleSheet;const e=this._strings;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this._styleSheet=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(s)+t[i+1],t[0]);return new o(s,t,i)},a=t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return new o("string"==typeof(s=e)?s:String(s),void 0,i);var s},l=s?t=>t:t=>t instanceof CSSStyleSheet?a(t):t,{is:d,defineProperty:c,getOwnPropertyDescriptor:h,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:m}=Object,g=globalThis;let b;const v=g.trustedTypes,f=v?v.emptyScript:"",_=g.reactiveElementPolyfillSupportDevMode;g.litIssuedWarnings??=new Set,b=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,g.litIssuedWarnings.has(e)||g.litIssuedWarnings.has(t)||(console.warn(e),g.litIssuedWarnings.add(e))},queueMicrotask(()=>{b("dev-mode","Lit is in dev mode. Not recommended for production!"),g.ShadyDOM?.inUse&&void 0===_&&b("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const y=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},$=(t,e)=>!d(t,e),x={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(h(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);b("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:i,set(e){const o=i?.call(this);r?.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static __prepare(){if(this.hasOwnProperty(y("elementProperties")))return;const t=m(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&b("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&b("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(t=>this.enableUpdating=t),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(t=>t(this))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{if(s)t.adoptedStyleSheets=i.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of i){const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:w).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&b("undefined-attribute-value",`The attribute value for the ${t} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this.__reflectingProperty=i;const o=r.fromAttribute(e,t.type);this[i]=o??this.__defaultValues?.get(i)??o,this.__reflectingProperty=null}}requestUpdate(t,e,s,i=!1,r){if(void 0!==t){t instanceof Event&&b("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const o=this.constructor;!1===i&&(r=this[t]),s??=o.getPropertyOptions(t);if(!((s.hasChanged??$)(r,e)||s.useDefault&&s.reflect&&r===this.__defaultValues?.get(t)&&!this.hasAttribute(o.__attributeNameForProperty(t,s))))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this.__defaultValues??=new Map).has(t)&&(this.__defaultValues.set(t,o??e??this[t]),!0!==r||void 0!==o)||(this._$changedProperties.has(t)||(this.hasUpdated||s||(e=void 0),this._$changedProperties.set(t,e)),!0===i&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&b("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},g.emitLitDebugLogEvents&&g.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter(t=>this.hasOwnProperty(t)&&t in m(this));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$changedProperties.has(e)||void 0===i||this._$changeProperty(e,void 0,s,i)}}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach(t=>t.hostUpdate?.()),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&b("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach(t=>this.__propertyToAttribute(t,this[t])),this.__markUpdated()}updated(t){}firstUpdated(t){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[y("elementProperties")]=new Map,S[y("finalized")]=new Map,_?.({ReactiveElement:S});{S.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(y("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};S.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},S.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(g.reactiveElementVersions??=[]).push("2.1.2"),g.reactiveElementVersions.length>1&&queueMicrotask(()=>{b("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
12
  */
13
- const P=globalThis,C=t=>{P.emitLitDebugLogEvents&&P.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let E,k=0;P.litIssuedWarnings??=new Set,E=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",P.litIssuedWarnings.has(e)||P.litIssuedWarnings.has(t)||(console.warn(e),P.litIssuedWarnings.add(e))},queueMicrotask(()=>{E("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=P.ShadyDOM?.inUse&&!0===P.ShadyDOM?.noPatch?P.ShadyDOM.wrap:t=>t,N=P.trustedTypes,U=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=t=>t,V=(t,e,s)=>O,M=t=>{if(ot!==V)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ot=t},z=()=>{ot=V},D=(t,e,s)=>ot(t,e,s),A="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,R="?"+L,W=`<${R}>`,I=document,H=()=>I.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,q=Array.isArray,B="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,X=new RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,G=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(tt=1,(t,...e)=>(t.some(t=>void 0===t)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some(t=>t?._$litStatic$)&&E("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:tt,strings:t,values:e}));var tt;const et=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),it=new WeakMap,rt=I.createTreeWalker(I,129);let ot=V;function nt(t,e){if(!q(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(t)}return void 0!==U?U.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let a,l,d=-1,h=0;for(;h<s.length&&(n.lastIndex=h,l=n.exec(s),null!==l);)if(h=n.lastIndex,n===F){if("!--"===l[1])n=Z;else if(void 0!==l[1])n=J;else if(void 0!==l[2])K.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),n=X;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===X?">"===l[0]?(n=r??F,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?X:'"'===l[3]?G:Y):n===G||n===Y?n=X:n===Z||n===J?n=F:(n=X,r=void 0);console.assert(-1===d||n===X||n===Y||n===G,"unexpected parse state B");const c=n===X&&t[e+1].startsWith("/>")?" ":"";o+=n===F?s+W:d>=0?(i.push(a),s.slice(0,d)+A+s.slice(d)+L+c):s+L+(-2===d?e:c)}return[nt(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=at.createElement(l,s),rt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=rt.nextNode())&&a.length<n;){if(1===i.nodeType){{const t=i.localName;if(/^(?:textarea|template)$/i.test(t)&&i.innerHTML.includes(L)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);E("",e)}}if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=d[o++],s=i.getAttribute(t).split(L),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?pt:"?"===n[1]?ut:"@"===n[1]?mt:ct}),i.removeAttribute(t)}else t.startsWith(L)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(K.test(i.tagName)){const t=i.textContent.split(L),e=t.length-1;if(e>0){i.textContent=N?N.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],H()),rt.nextNode(),a.push({type:2,index:++r});i.append(t[e],H())}}}else if(8===i.nodeType){if(i.data===R)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(L,t+1));)a.push({type:7,index:r}),t+=L.length-1}}r++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+t.join("${...}")+"`");C&&C({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const s=I.createElement("template");return s.innerHTML=t,s}}function lt(t,e,s=t,i){if(e===et)return e;let r=void 0!==i?s.__directives?.[i]:s.__directive;const o=j(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?r=void 0:(r=new o(t),r._$initialize(t,s,i)),void 0!==i?(s.__directives??=[])[i]=r:s.__directive=r),void 0!==r&&(e=lt(t,r._$resolve(t,e.values),r,i)),e}class dt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:s}=this._$template,i=(t?.creationScope??I).importNode(e,!0);rt.currentNode=i;let r=rt.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new ht(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new gt(r,this,t)),this._$parts.push(e),a=s[++n]}o!==a?.index&&(r=rt.nextNode(),o++)}return rt.currentNode=I,i}_update(t){let e=0;for(const s of this._$parts)void 0!==s&&(C&&C({kind:"set part",part:s,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==s.strings?(s._$setValue(t,s,e),e+=s.strings.length-2):s._$setValue(t[e])),e++}}class ht{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,s,i){this.type=2,this._$committedValue=st,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=T(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(t=lt(this,t,e),j(t))t===st||null==t||""===t?(this._$committedValue!==st&&(C&&C({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=st):t!==this._$committedValue&&t!==et&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",t,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(t)}else(t=>q(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return T(T(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),ot!==V){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(e)}}C&&C({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==st&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=D(e,"data","property")),t=this._textSanitizer(t),C&&C({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=I.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=D(e,"data","property")),t=this._textSanitizer(t),C&&C({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$getTemplate(t):(void 0===s.el&&(s.el=at.createElement(nt(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)C&&C({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(i,this),s=t._clone(this.options);C&&C({kind:"template instantiated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),t._update(e),C&&C({kind:"template instantiated and updated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),this._commitNode(s),this._$committedValue=t}}_$getTemplate(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new at(t)),e}_commitIterable(t){q(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let s,i=0;for(const r of t)i===e.length?e.push(s=new ht(this._insert(H()),this._insert(H()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&T(s._$endNode).nextSibling,i),e.length=i)}_$clear(t=T(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t!==this._$endNode;){const e=T(t).nextSibling;T(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ct{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,s,i,r){this.type=1,this._$committedValue=st,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=st,this._sanitizer=void 0}_$setValue(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=lt(this,t,e,0),o=!j(t)||t!==this._$committedValue&&t!==et,o&&(this._$committedValue=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=lt(this,i[s+n],e,n),a===et&&(a=this._$committedValue[n]),o||=!j(a)||a!==this._$committedValue[n],a===st?t=st:t!==st&&(t+=(a??"")+r[n+1]),this._$committedValue[n]=a}o&&!i&&this._commitValue(t)}_commitValue(t){t===st?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ot(this.element,this.name,"attribute")),t=this._sanitizer(t??""),C&&C({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),T(this.element).setAttribute(this.name,t??""))}}class pt extends ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=ot(this.element,this.name,"property")),t=this._sanitizer(t),C&&C({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===st?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){C&&C({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===st),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==st)}}class mt extends ct{constructor(t,e,s,i,r){if(super(t,e,s,i,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=lt(this,t,e,0)??st)===et)return;const s=this._$committedValue,i=t===st&&s!==st||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==st&&(s===st||i);C&&C({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:i,addListener:r,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class gt{constructor(t,e,s){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){C&&C({kind:"commit to element binding",element:this.element,value:t,options:this.options}),lt(this,t)}}const ft=P.litHtmlPolyfillSupportDevMode;ft?.(at,ht),(P.litHtmlVersions??=[]).push("3.3.2"),P.litHtmlVersions.length>1&&queueMicrotask(()=>{E("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,s)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const i=k++,r=s?.renderBefore??e;let o=r._$litPart$;if(C&&C({kind:"begin render",id:i,value:t,container:e,options:s,part:o}),void 0===o){const t=s?.renderBefore??null;r._$litPart$=o=new ht(e.insertBefore(H(),t),t,void 0,s??{})}return o._$setValue(t),C&&C({kind:"end render",id:i,value:t,container:e,options:s,part:o}),o};vt.setSanitizer=M,vt.createSanitizer=D,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=z;
13
+ const P=globalThis,k=t=>{P.emitLitDebugLogEvents&&P.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let C,E=0;P.litIssuedWarnings??=new Set,C=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",P.litIssuedWarnings.has(e)||P.litIssuedWarnings.has(t)||(console.warn(e),P.litIssuedWarnings.add(e))},queueMicrotask(()=>{C("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=P.ShadyDOM?.inUse&&!0===P.ShadyDOM?.noPatch?P.ShadyDOM.wrap:t=>t,N=P.trustedTypes,O=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,V=t=>t,U=(t,e,s)=>V,M=t=>{if(ot!==U)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");ot=t},z=()=>{ot=U},D=(t,e,s)=>ot(t,e,s),A="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,L="?"+R,W=`<${L}>`,B=document,I=()=>B.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,q="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,X=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,G=/"/g,K=/^(?:script|style|textarea|title)$/i,Q=(tt=1,(t,...e)=>(t.some(t=>void 0===t)&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some(t=>t?._$litStatic$)&&C("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:tt,strings:t,values:e}));var tt;const et=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),it=new WeakMap,rt=B.createTreeWalker(B,129);let ot=U;function nt(t,e){if(!H(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(t)}return void 0!==O?O.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let a,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===F){if("!--"===l[1])n=Z;else if(void 0!==l[1])n=J;else if(void 0!==l[2])K.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),n=X;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else n===X?">"===l[0]?(n=r??F,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?X:'"'===l[3]?G:Y):n===G||n===Y?n=X:n===Z||n===J?n=F:(n=X,r=void 0);console.assert(-1===d||n===X||n===Y||n===G,"unexpected parse state B");const h=n===X&&t[e+1].startsWith("/>")?" ":"";o+=n===F?s+W:d>=0?(i.push(a),s.slice(0,d)+A+s.slice(d)+R+h):s+R+(-2===d?e:h)}return[nt(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=at.createElement(l,s),rt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=rt.nextNode())&&a.length<n;){if(1===i.nodeType){{const t=i.localName;if(/^(?:textarea|template)$/i.test(t)&&i.innerHTML.includes(R)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);C("",e)}}if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=d[o++],s=i.getAttribute(t).split(R),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?pt:"?"===n[1]?ut:"@"===n[1]?mt:ht}),i.removeAttribute(t)}else t.startsWith(R)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(K.test(i.tagName)){const t=i.textContent.split(R),e=t.length-1;if(e>0){i.textContent=N?N.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],I()),rt.nextNode(),a.push({type:2,index:++r});i.append(t[e],I())}}}else if(8===i.nodeType){if(i.data===L)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(R,t+1));)a.push({type:7,index:r}),t+=R.length-1}}r++}if(d.length!==o)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+t.join("${...}")+"`");k&&k({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const s=B.createElement("template");return s.innerHTML=t,s}}function lt(t,e,s=t,i){if(e===et)return e;let r=void 0!==i?s.__directives?.[i]:s.__directive;const o=j(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?r=void 0:(r=new o(t),r._$initialize(t,s,i)),void 0!==i?(s.__directives??=[])[i]=r:s.__directive=r),void 0!==r&&(e=lt(t,r._$resolve(t,e.values),r,i)),e}class dt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:s}=this._$template,i=(t?.creationScope??B).importNode(e,!0);rt.currentNode=i;let r=rt.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new ct(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new gt(r,this,t)),this._$parts.push(e),a=s[++n]}o!==a?.index&&(r=rt.nextNode(),o++)}return rt.currentNode=B,i}_update(t){let e=0;for(const s of this._$parts)void 0!==s&&(k&&k({kind:"set part",part:s,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==s.strings?(s._$setValue(t,s,e),e+=s.strings.length-2):s._$setValue(t[e])),e++}}class ct{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,s,i){this.type=2,this._$committedValue=st,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=T(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(t=lt(this,t,e),j(t))t===st||null==t||""===t?(this._$committedValue!==st&&(k&&k({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=st):t!==this._$committedValue&&t!==et&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",t,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(t)}else(t=>H(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return T(T(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),ot!==U){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(e)}}k&&k({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==st&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=D(e,"data","property")),t=this._textSanitizer(t),k&&k({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=B.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=D(e,"data","property")),t=this._textSanitizer(t),k&&k({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$getTemplate(t):(void 0===s.el&&(s.el=at.createElement(nt(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)k&&k({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(i,this),s=t._clone(this.options);k&&k({kind:"template instantiated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),t._update(e),k&&k({kind:"template instantiated and updated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),this._commitNode(s),this._$committedValue=t}}_$getTemplate(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new at(t)),e}_commitIterable(t){H(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let s,i=0;for(const r of t)i===e.length?e.push(s=new ct(this._insert(I()),this._insert(I()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&T(s._$endNode).nextSibling,i),e.length=i)}_$clear(t=T(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t!==this._$endNode;){const e=T(t).nextSibling;T(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ht{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,s,i,r){this.type=1,this._$committedValue=st,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=st,this._sanitizer=void 0}_$setValue(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=lt(this,t,e,0),o=!j(t)||t!==this._$committedValue&&t!==et,o&&(this._$committedValue=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=lt(this,i[s+n],e,n),a===et&&(a=this._$committedValue[n]),o||=!j(a)||a!==this._$committedValue[n],a===st?t=st:t!==st&&(t+=(a??"")+r[n+1]),this._$committedValue[n]=a}o&&!i&&this._commitValue(t)}_commitValue(t){t===st?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=ot(this.element,this.name,"attribute")),t=this._sanitizer(t??""),k&&k({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),T(this.element).setAttribute(this.name,t??""))}}class pt extends ht{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=ot(this.element,this.name,"property")),t=this._sanitizer(t),k&&k({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===st?void 0:t}}class ut extends ht{constructor(){super(...arguments),this.type=4}_commitValue(t){k&&k({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===st),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==st)}}class mt extends ht{constructor(t,e,s,i,r){if(super(t,e,s,i,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=lt(this,t,e,0)??st)===et)return;const s=this._$committedValue,i=t===st&&s!==st||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==st&&(s===st||i);k&&k({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:i,addListener:r,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class gt{constructor(t,e,s){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){k&&k({kind:"commit to element binding",element:this.element,value:t,options:this.options}),lt(this,t)}}const bt=P.litHtmlPolyfillSupportDevMode;bt?.(at,ct),(P.litHtmlVersions??=[]).push("3.3.2"),P.litHtmlVersions.length>1&&queueMicrotask(()=>{C("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,s)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const i=E++,r=s?.renderBefore??e;let o=r._$litPart$;if(k&&k({kind:"begin render",id:i,value:t,container:e,options:s,part:o}),void 0===o){const t=s?.renderBefore??null;r._$litPart$=o=new ct(e.insertBefore(I(),t),t,void 0,s??{})}return o._$setValue(t),k&&k({kind:"end render",id:i,value:t,container:e,options:s,part:o}),o};vt.setSanitizer=M,vt.createSanitizer=D,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=z;
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const bt=globalThis;let _t;bt.litIssuedWarnings??=new Set,_t=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,bt.litIssuedWarnings.has(e)||bt.litIssuedWarnings.has(t)||(console.warn(e),bt.litIssuedWarnings.add(e))};class yt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.__childPart=vt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return et}}var wt;yt._$litElement$=!0,yt[(wt="finalized",wt)]=!0,bt.litElementHydrateSupport?.({LitElement:yt});const $t=bt.litElementPolyfillSupportDevMode;
19
+ const ft=globalThis;let _t;ft.litIssuedWarnings??=new Set,_t=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,ft.litIssuedWarnings.has(e)||ft.litIssuedWarnings.has(t)||(console.warn(e),ft.litIssuedWarnings.add(e))};class yt extends S{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.__childPart=vt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return et}}var wt;yt._$litElement$=!0,yt[(wt="finalized",wt)]=!0,ft.litElementHydrateSupport?.({LitElement:yt});const $t=ft.litElementPolyfillSupportDevMode;
20
20
  /**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
24
24
  */
25
- let St;$t?.({LitElement:yt}),(bt.litElementVersions??=[]).push("4.2.2"),bt.litElementVersions.length>1&&queueMicrotask(()=>{_t("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,St=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,globalThis.litIssuedWarnings.has(e)||globalThis.litIssuedWarnings.has(t)||(console.warn(e),globalThis.litIssuedWarnings.add(e))};const xt={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$},Pt=(t=xt,e,s)=>{const{kind:i,metadata:r}=s;null==r&&St("missing-class-metadata",`The class ${e} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),o.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t,!0,s)},init(e){return void 0!==e&&this._$changeProperty(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t,!0,s)}}throw new Error(`Unsupported decorator location: ${i}`)};function Ct(t){return(e,s)=>"object"==typeof s?Pt(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
25
+ let xt;$t?.({LitElement:yt}),(ft.litElementVersions??=[]).push("4.2.2"),ft.litElementVersions.length>1&&queueMicrotask(()=>{_t("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,xt=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,globalThis.litIssuedWarnings.has(e)||globalThis.litIssuedWarnings.has(t)||(console.warn(e),globalThis.litIssuedWarnings.add(e))};const St={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$},Pt=(t=St,e,s)=>{const{kind:i,metadata:r}=s;null==r&&xt("missing-class-metadata",`The class ${e} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),o.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t,!0,s)},init(e){return void 0!==e&&this._$changeProperty(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t,!0,s)}}throw new Error(`Unsupported decorator location: ${i}`)};function kt(t){return(e,s)=>"object"==typeof s?Pt(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
26
+ /**
27
+ * @license
28
+ * Copyright 2017 Google LLC
29
+ * SPDX-License-Identifier: BSD-3-Clause
30
+ */function Ct(t){return kt({...t,state:!0,attribute:!1})}
26
31
  /**
27
32
  * @license
28
33
  * Copyright 2017 Google LLC
@@ -33,56 +38,96 @@ let St;$t?.({LitElement:yt}),(bt.litElementVersions??=[]).push("4.2.2"),bt.litEl
33
38
  * Copyright 2017 Google LLC
34
39
  * SPDX-License-Identifier: BSD-3-Clause
35
40
  */
36
- const Et=1;class kt{constructor(t){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,s){this.__part=t,this._$parent=e,this.__attributeIndex=s}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
41
+ const Et=1;class Tt{constructor(t){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,s){this.__part=t,this._$parent=e,this.__attributeIndex=s}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
37
42
  /**
38
43
  * @license
39
44
  * Copyright 2018 Google LLC
40
45
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const Tt=(Nt=class extends kt{constructor(t){if(super(t),t.type!==Et||"class"!==t.name||t.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==t.strings&&(this._staticClasses=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this._staticClasses?.has(t)&&this._previousClasses.add(t);return this.render(e)}const s=t.element.classList;for(const t of this._previousClasses)t in e||(s.remove(t),this._previousClasses.delete(t));for(const t in e){const i=!!e[t];i===this._previousClasses.has(t)||this._staticClasses?.has(t)||(i?(s.add(t),this._previousClasses.add(t)):(s.remove(t),this._previousClasses.delete(t)))}return et}},(...t)=>({_$litDirective$:Nt,values:t}));var Nt,Ut=n`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Ot extends yt{emit(t,e){const s=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(s),s}static define(t,e=this,s={}){if(customElements.get(t));else try{customElements.define(t,e,s)}catch(i){customElements.define(t,class extends e{},s)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ot.styles=[Ut],Ot.dependencies={},t([Ct({type:Boolean,reflect:!0})],Ot.prototype,"ssr",void 0);var Vt=n`tbody,td,th,thead,tr{border:var(--sgds-border-width-0) solid;border-color:inherit}th{text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{border-color:var(--sgds-border-color-default);display:table;vertical-align:top;width:100%}.hidden{display:none}.table>:not(caption) td,.table>:not(caption) th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>thead th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-group-divider{border-top:calc(var(--sgds-border-width)*2) solid}.table>:not(:first-child){border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}`;class Mt{constructor(t,...e){this.slotNames=[],(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{var e;if(t.nodeType===t.TEXT_NODE&&""!==(null===(e=t.textContent)||void 0===e?void 0:e.trim()))return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}}class zt extends Ot{constructor(){super(...arguments),this.rowHeader=[],this.columnHeader=[],this.tableData=[],this.headerPosition="horizontal",this.hasDefaultSlot=!1,this.hasSlotController=new Mt(this,"[default]")}connectedCallback(){super.connectedCallback()}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]"))}_renderTable(){if("horizontal"===this.headerPosition)return Q`
46
+ */const Nt=(Ot=class extends Tt{constructor(t){if(super(t),t.type!==Et||"class"!==t.name||t.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==t.strings&&(this._staticClasses=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this._staticClasses?.has(t)&&this._previousClasses.add(t);return this.render(e)}const s=t.element.classList;for(const t of this._previousClasses)t in e||(s.remove(t),this._previousClasses.delete(t));for(const t in e){const i=!!e[t];i===this._previousClasses.has(t)||this._staticClasses?.has(t)||(i?(s.add(t),this._previousClasses.add(t)):(s.remove(t),this._previousClasses.delete(t)))}return et}},(...t)=>({_$litDirective$:Ot,values:t}));var Ot,Vt=n`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class Ut extends yt{emit(t,e){const s=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(s),s}static define(t,e=this,s={}){if(customElements.get(t));else try{customElements.define(t,e,s)}catch(i){customElements.define(t,class extends e{},s)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ut.styles=[Vt],Ut.dependencies={},t([kt({type:Boolean,reflect:!0})],Ut.prototype,"ssr",void 0);var Mt=n`tbody,td,th,thead,tr{border:var(--sgds-border-width-0) solid;border-color:inherit}th{text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{display:table;width:100%}.hidden{display:none}.table>:not(caption) td,.table>:not(caption) th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}.table>:not(caption) td>div,.table>:not(caption) th>div{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:first-child){border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}:host([tableBorder]) .table{border:var(--sgds-border-width-1) solid;border-color:var(--sgds-border-color-muted);border-bottom:0}:host([tableBorder]) .table.no-border{border:0}:host([headerBackground]) th{background-color:var(--sgds-surface-raised)}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}`;class zt{constructor(t,...e){this.slotNames=[],(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{var e;if(t.nodeType===t.TEXT_NODE&&""!==(null===(e=t.textContent)||void 0===e?void 0:e.trim()))return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sl-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}}
47
+ /**
48
+ * @license
49
+ * Copyright 2021 Google LLC
50
+ * SPDX-License-Identifier: BSD-3-Clause
51
+ */class Dt extends Event{constructor(t,e,s,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=s,this.subscribe=i??!1}}
52
+ /**
53
+ * @license
54
+ * Copyright 2021 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */
57
+ /**
58
+ * @license
59
+ * Copyright 2021 Google LLC
60
+ * SPDX-License-Identifier: BSD-3-Clause
61
+ */
62
+ class At{constructor(t,e,s,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this._callback=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=e,this.callback=s,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Dt(this.context,this.host,this._callback,this.subscribe))}}
63
+ /**
64
+ * @license
65
+ * Copyright 2021 Google LLC
66
+ * SPDX-License-Identifier: BSD-3-Clause
67
+ */class Rt{get value(){return this._value}set value(t){this.setValue(t)}setValue(t,e=!1){const s=e||!Object.is(t,this._value);this._value=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:e}]of this.subscriptions)t(this._value,e)},void 0!==t&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}}
68
+ /**
69
+ * @license
70
+ * Copyright 2021 Google LLC
71
+ * SPDX-License-Identifier: BSD-3-Clause
72
+ */class Lt extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}}class Wt extends Rt{constructor(t,e,s){super(void 0!==e.context?e.initialValue:s),this.onContextRequest=t=>{if(t.context!==this.context)return;const e=t.contextTarget??t.composedPath()[0];e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context)return;if((t.contextTarget??t.composedPath()[0])===this.host)return;const e=new Set;for(const[t,{consumerHost:s}]of this.subscriptions)e.has(t)||(e.add(t),s.dispatchEvent(new Dt(this.context,s,t,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Lt(this.context,this.host))}}
73
+ /**
74
+ * @license
75
+ * Copyright 2017 Google LLC
76
+ * SPDX-License-Identifier: BSD-3-Clause
77
+ */const Bt="table-header-background";class It extends Ut{constructor(){super(...arguments),this.rowHeader=[],this.columnHeader=[],this.tableData=[],this.headerPosition="horizontal",this.headerBackground=!1,this.tableBorder=!1,this.hasDefaultSlot=!1,this._headerBackground=!1,this.hasSlotController=new zt(this,"[default]")}connectedCallback(){super.connectedCallback()}updated(){this.hasDefaultSlot||(this.hasDefaultSlot=this.hasSlotController.test("[default]")),this._headerBackground=this.headerBackground}_renderTable(){if("horizontal"===this.headerPosition)return Q`
42
78
  <thead>
43
79
  <tr>
44
- ${this.rowHeader.map(t=>Q` <th>${t}</th> `)}
80
+ ${this.rowHeader.map(t=>Q` <th><div>${t}</div></th> `)}
45
81
  </tr>
46
82
  </thead>
47
83
  <tbody>
48
84
  ${this.tableData.map(t=>Q`
49
85
  <tr>
50
- ${t.map(t=>Q`<td>${t}</td>`)}
86
+ ${t.map(t=>Q`<td><div>${t}</div></td>`)}
51
87
  </tr>
52
88
  `)}
53
89
  </tbody>
54
90
  `;if("both"===this.headerPosition)return Q`
55
91
  <thead>
56
92
  <tr>
57
- <th></th>
58
- ${this.rowHeader.map(t=>Q` <th>${t}</th> `)}
93
+ <th><div></div></th>
94
+ ${this.rowHeader.map(t=>Q` <th><div>${t}</div></th> `)}
59
95
  </tr>
60
96
  </thead>
61
97
  <tbody>
62
98
  ${this.tableData.map((t,e)=>Q`
63
99
  <tr>
64
- <th>${this.columnHeader[e]}</th>
65
- ${t.map(t=>Q`<td>${t}</td>`)}
100
+ <th><div>${this.columnHeader[e]}</div></th>
101
+ ${t.map(t=>Q`<td><div>${t}</div></td>`)}
66
102
  </tr>
67
103
  `)}
68
104
  </tbody>
69
105
  `;if("vertical"===this.headerPosition){const t=this.tableData[0].map((t,e)=>this.tableData.map(t=>t[e]));return Q`
70
106
  ${t.map((t,e)=>Q`
71
107
  <tr>
72
- <th>${this.columnHeader[e]}</th>
73
- ${t.map(t=>Q`<td>${t}</td>`)}
108
+ <th><div>${this.columnHeader[e]}</div></th>
109
+ ${t.map(t=>Q`<td><div>${t}</div></td>`)}
74
110
  </tr>
75
111
  `)}
76
112
  `}}render(){return Q`
77
113
  <div
78
- class=${Tt({"table-responsive":"always"===this.responsive,"table-responsive-sm":"sm"===this.responsive,"table-responsive-md":"md"===this.responsive,"table-responsive-lg":"lg"===this.responsive,"table-responsive-xl":"xl"===this.responsive})}
114
+ class=${Nt({"table-responsive":"always"===this.responsive,"table-responsive-sm":"sm"===this.responsive,"table-responsive-md":"md"===this.responsive,"table-responsive-lg":"lg"===this.responsive,"table-responsive-xl":"xl"===this.responsive})}
79
115
  tabindex="0"
80
116
  >
81
- <slot id="table-slot" class="table"></slot>
117
+ <slot id="table-slot" class=${Nt({table:!0,"no-border":!this.hasDefaultSlot})}></slot>
82
118
 
83
119
  ${this.hasDefaultSlot?"":Q`<table class="table">
84
120
  ${this._renderTable()}
85
121
  </table>`}
86
122
  </div>
87
- `}}function Dt(t,e){customElements.get(t)||customElements.define(t,e)}zt.styles=[...Ot.styles,Vt],t([Ct({type:String,reflect:!0})],zt.prototype,"responsive",void 0),t([Ct({type:Array})],zt.prototype,"rowHeader",void 0),t([Ct({type:Array})],zt.prototype,"columnHeader",void 0),t([Ct({type:Array})],zt.prototype,"tableData",void 0),t([Ct({type:String})],zt.prototype,"headerPosition",void 0),t([Ct({type:Boolean})],zt.prototype,"hasDefaultSlot",void 0);var At,Lt=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis);display:table-cell;font-weight:700;padding:var(--sgds-padding-lg)}:host(:not([border])){border-color:var(--sgds-border-color-muted)}`;class Rt extends Ot{constructor(){super(...arguments),this.border=!1}_handleBorderChange(){var t,e;this.border="sgds-table-cell"!==(null===(e=null===(t=this.nextElementSibling)||void 0===t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase()),this.border?this.setAttribute("border","true"):this.removeAttribute("border")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}render(){return Q`<slot></slot>`}}Rt.styles=[...Ot.styles,Lt],t([Ct({...At,state:!0,attribute:!1})],Rt.prototype,"border",void 0),t([function(t,e){const s=Object.assign({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:r}=e;if(t in e){const o=t;e.update=function(t){if(t.has(o)){const e=t.get(o),r=this[o];e!==r&&(s.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}r.call(this,t)}}}}("border")],Rt.prototype,"_handleBorderChange",null);var Wt=n`:host{display:table-row;width:100%}`;class It extends Ot{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return Q`<slot class="table-row"></slot>`}}It.styles=[...Ot.styles,Wt];var Ht=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;padding:var(--sgds-padding-lg)}`;class jt extends Ot{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return Q` <slot class="table-cell"></slot> `}}jt.styles=[...Ot.styles,Ht],Dt("sgds-table",zt),Dt("sgds-table-head",Rt),Dt("sgds-table-row",It),Dt("sgds-table-cell",jt)});
123
+ `}}function jt(t,e){customElements.get(t)||customElements.define(t,e)}It.styles=[...Ut.styles,Mt],t([kt({type:String,reflect:!0})],It.prototype,"responsive",void 0),t([kt({type:Array})],It.prototype,"rowHeader",void 0),t([kt({type:Array})],It.prototype,"columnHeader",void 0),t([kt({type:Array})],It.prototype,"tableData",void 0),t([kt({type:String})],It.prototype,"headerPosition",void 0),t([kt({type:Boolean})],It.prototype,"headerBackground",void 0),t([kt({type:Boolean})],It.prototype,"tableBorder",void 0),t([kt({type:Boolean})],It.prototype,"hasDefaultSlot",void 0),t([function({context:t}){return(e,s)=>{const i=new WeakMap;if("object"==typeof s)return{get(){return e.get.call(this)},set(t){return i.get(this).setValue(t),e.set.call(this,t)},init(e){return i.set(this,new Wt(this,{context:t,initialValue:e})),e}};{e.constructor.addInitializer(e=>{i.set(e,new Wt(e,{context:t}))});const r=Object.getOwnPropertyDescriptor(e,s);let o;if(void 0===r){const t=new WeakMap;o={get(){return t.get(this)},set(e){i.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=r.set;o={...r,set(e){i.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,o)}}}
124
+ /**
125
+ * @license
126
+ * Copyright 2022 Google LLC
127
+ * SPDX-License-Identifier: BSD-3-Clause
128
+ */({context:Bt}),Ct()],It.prototype,"_headerBackground",void 0);var Ht=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}:host([headerBackground]){background-color:var(--sgds-surface-raised)}.table-head{align-items:center;display:flex;font-weight:700;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class qt extends Ut{constructor(){super(...arguments),this._headerBackground=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}_handleHeaderBackground(){this._headerBackground?this.setAttribute("headerBackground","true"):this.removeAttribute("headerBackground")}render(){return Q`<div
129
+ class=${Nt({"table-head":!0,"header-background":this._headerBackground})}
130
+ >
131
+ <slot></slot>
132
+ </div>`}}qt.styles=[...Ut.styles,Ht],t([function({context:t,subscribe:e}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new At(this,{context:t,callback:t=>{s.set.call(this,t)},subscribe:e})}):s.constructor.addInitializer(s=>{new At(s,{context:t,callback:t=>{s[i]=t},subscribe:e})})}}({context:Bt,subscribe:!0}),Ct()],qt.prototype,"_headerBackground",void 0),t([function(t,e){const s=Object.assign({waitUntilFirstUpdate:!1},e);return(e,i)=>{const{update:r}=e;if(t in e){const o=t;e.update=function(t){if(t.has(o)){const e=t.get(o),r=this[o];e!==r&&(s.waitUntilFirstUpdate&&!this.hasUpdated||this[i](e,r))}r.call(this,t)}}}}("_headerBackground")],qt.prototype,"_handleHeaderBackground",null);var Ft=n`:host{display:table-row;width:100%}`;class Zt extends Ut{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return Q`<slot class="table-row"></slot>`}}Zt.styles=[...Ut.styles,Ft];var Jt=n`:host{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:table-cell;vertical-align:middle}.table-cell{align-items:center;display:flex;min-height:var(--sgds-dimension-56);padding:var(--sgds-padding-sm) var(--sgds-padding-md)}`;class Xt extends Ut{connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return Q`<div class="table-cell"><slot></slot></div>`}}Xt.styles=[...Ut.styles,Jt],jt("sgds-table",It),jt("sgds-table-head",qt),jt("sgds-table-row",Zt),jt("sgds-table-cell",Xt)});
88
133
  //# sourceMappingURL=index.umd.min.js.map