@govtechsg/sgds-web-component 3.16.1-rc.2 → 3.17.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 (119) hide show
  1. package/components/Accordion/accordion-item.js +1 -1
  2. package/components/Accordion/index.umd.min.js +13 -11
  3. package/components/Accordion/index.umd.min.js.map +1 -1
  4. package/components/Accordion/sgds-accordion-item.d.ts +4 -1
  5. package/components/Accordion/sgds-accordion-item.js +15 -11
  6. package/components/Accordion/sgds-accordion-item.js.map +1 -1
  7. package/components/Accordion/sgds-accordion.d.ts +1 -1
  8. package/components/Accordion/sgds-accordion.js.map +1 -1
  9. package/components/ComboBox/combo-box.js +1 -1
  10. package/components/ComboBox/index.umd.min.js +3 -3
  11. package/components/ComboBox/index.umd.min.js.map +1 -1
  12. package/components/ComboBox/sgds-combo-box.js +6 -1
  13. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  14. package/components/Datepicker/datepicker.js +1 -1
  15. package/components/Datepicker/index.umd.min.js +4 -4
  16. package/components/Datepicker/index.umd.min.js.map +1 -1
  17. package/components/Datepicker/sgds-datepicker.js +1 -1
  18. package/components/Datepicker/sgds-datepicker.js.map +1 -1
  19. package/components/Input/index.umd.min.js +2 -2
  20. package/components/Input/index.umd.min.js.map +1 -1
  21. package/components/Input/sgds-input.js +1 -1
  22. package/components/Input/sgds-input.js.map +1 -1
  23. package/components/QuantityToggle/index.umd.min.js +3 -3
  24. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  25. package/components/QuantityToggle/sgds-quantity-toggle.js +1 -1
  26. package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  27. package/components/Radio/index.umd.min.js +9 -9
  28. package/components/Radio/index.umd.min.js.map +1 -1
  29. package/components/Radio/sgds-radio-group.d.ts +2 -0
  30. package/components/Radio/sgds-radio-group.js +10 -1
  31. package/components/Radio/sgds-radio-group.js.map +1 -1
  32. package/components/Radio/sgds-radio.d.ts +2 -0
  33. package/components/Radio/sgds-radio.js +6 -1
  34. package/components/Radio/sgds-radio.js.map +1 -1
  35. package/components/Select/index.umd.min.js +2 -2
  36. package/components/Select/index.umd.min.js.map +1 -1
  37. package/components/Select/sgds-select.js +2 -1
  38. package/components/Select/sgds-select.js.map +1 -1
  39. package/components/Tab/index.umd.min.js +3 -2
  40. package/components/Tab/index.umd.min.js.map +1 -1
  41. package/components/Tab/sgds-tab-group.js +1 -0
  42. package/components/Tab/sgds-tab-group.js.map +1 -1
  43. package/components/Tab/tab-group.js +1 -1
  44. package/components/Tab/tab.js +1 -1
  45. package/components/Textarea/index.umd.min.js +4 -4
  46. package/components/Textarea/index.umd.min.js.map +1 -1
  47. package/components/Textarea/sgds-textarea.js +1 -1
  48. package/components/Textarea/sgds-textarea.js.map +1 -1
  49. package/components/Toast/index.umd.min.js +1 -1
  50. package/components/Toast/index.umd.min.js.map +1 -1
  51. package/components/Toast/toast.js +1 -1
  52. package/components/index.umd.min.js +25 -22
  53. package/components/index.umd.min.js.map +1 -1
  54. package/css/fouc.css +1 -1
  55. package/custom-elements.json +550 -503
  56. package/index.umd.min.js +25 -22
  57. package/index.umd.min.js.map +1 -1
  58. package/package.json +1 -1
  59. package/react/components/Accordion/accordion-item.cjs.js +1 -1
  60. package/react/components/Accordion/accordion-item.js +1 -1
  61. package/react/components/Accordion/sgds-accordion-item.cjs.js +15 -11
  62. package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
  63. package/react/components/Accordion/sgds-accordion-item.js +15 -11
  64. package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
  65. package/react/components/Accordion/sgds-accordion.cjs.js.map +1 -1
  66. package/react/components/Accordion/sgds-accordion.js.map +1 -1
  67. package/react/components/ComboBox/combo-box.cjs.js +1 -1
  68. package/react/components/ComboBox/combo-box.js +1 -1
  69. package/react/components/ComboBox/sgds-combo-box.cjs.js +6 -1
  70. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  71. package/react/components/ComboBox/sgds-combo-box.js +6 -1
  72. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  73. package/react/components/Datepicker/datepicker.cjs.js +1 -1
  74. package/react/components/Datepicker/datepicker.js +1 -1
  75. package/react/components/Datepicker/sgds-datepicker.cjs.js +1 -1
  76. package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
  77. package/react/components/Datepicker/sgds-datepicker.js +1 -1
  78. package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
  79. package/react/components/Input/sgds-input.cjs.js +1 -1
  80. package/react/components/Input/sgds-input.cjs.js.map +1 -1
  81. package/react/components/Input/sgds-input.js +1 -1
  82. package/react/components/Input/sgds-input.js.map +1 -1
  83. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +1 -1
  84. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
  85. package/react/components/QuantityToggle/sgds-quantity-toggle.js +1 -1
  86. package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  87. package/react/components/Radio/sgds-radio-group.cjs.js +10 -1
  88. package/react/components/Radio/sgds-radio-group.cjs.js.map +1 -1
  89. package/react/components/Radio/sgds-radio-group.js +10 -1
  90. package/react/components/Radio/sgds-radio-group.js.map +1 -1
  91. package/react/components/Radio/sgds-radio.cjs.js +6 -1
  92. package/react/components/Radio/sgds-radio.cjs.js.map +1 -1
  93. package/react/components/Radio/sgds-radio.js +6 -1
  94. package/react/components/Radio/sgds-radio.js.map +1 -1
  95. package/react/components/Select/sgds-select.cjs.js +2 -1
  96. package/react/components/Select/sgds-select.cjs.js.map +1 -1
  97. package/react/components/Select/sgds-select.js +2 -1
  98. package/react/components/Select/sgds-select.js.map +1 -1
  99. package/react/components/Tab/sgds-tab-group.cjs.js +1 -0
  100. package/react/components/Tab/sgds-tab-group.cjs.js.map +1 -1
  101. package/react/components/Tab/sgds-tab-group.js +1 -0
  102. package/react/components/Tab/sgds-tab-group.js.map +1 -1
  103. package/react/components/Tab/tab-group.cjs.js +1 -1
  104. package/react/components/Tab/tab-group.js +1 -1
  105. package/react/components/Tab/tab.cjs.js +1 -1
  106. package/react/components/Tab/tab.js +1 -1
  107. package/react/components/Textarea/sgds-textarea.cjs.js +1 -1
  108. package/react/components/Textarea/sgds-textarea.cjs.js.map +1 -1
  109. package/react/components/Textarea/sgds-textarea.js +1 -1
  110. package/react/components/Textarea/sgds-textarea.js.map +1 -1
  111. package/react/components/Toast/toast.cjs.js +1 -1
  112. package/react/components/Toast/toast.js +1 -1
  113. package/react/index.cjs.js +6 -6
  114. package/react/index.d.ts +1 -1
  115. package/react/index.js +1 -1
  116. package/react/styles/form-text-control.cjs.js +1 -1
  117. package/react/styles/form-text-control.js +1 -1
  118. package/styles/form-text-control.js +1 -1
  119. package/types/react.d.ts +22 -18
@@ -212,6 +212,7 @@ class SgdsTabGroup extends SgdsElement {
212
212
  <div class="tab-group__nav" role="tablist">
213
213
  <slot name="nav" @slotchange=${this._handleSlotChange}></slot>
214
214
  </div>
215
+
215
216
  <div class="tab-group__content">
216
217
  <slot class="tab-group__body" @slotchange=${this._syncTabsAndPanels}></slot>
217
218
  </div>
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-tab-group.js","sources":["../../../src/components/Tab/sgds-tab-group.ts"],"sourcesContent":["import { html, PropertyValues } from \"lit\";\nimport { property, query, queryAssignedElements } from \"lit/decorators.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { SgdsTab } from \"./sgds-tab\";\nimport { SgdsTabPanel } from \"./sgds-tab-panel\";\nimport tabGroupStyle from \"./tab-group.css\";\n/**\n * @summary Tab Group organizes content into a container with the syncing of tab and their corresponding panels.\n * Each tab must be slotted into the nav slot and its `panel` must refer to a tab panel of the same name.\n *\n * @slot default - The slot for `sgds-tab-panel`\n * @slot nav - The slot for `sgds-tab`\n *\n * @event sgds-tab-show - Emitted when a tab and its panels are shown. `event.detail.name` contains the active tab's panel name.\n * @event sgds-tab-hide - Emitted when a tab and its panels are hidden. `event.detail.name` contains the hidden tab's panel name.\n *\n */\nexport class SgdsTabGroup extends SgdsElement {\n static styles = [...SgdsElement.styles, tabGroupStyle];\n\n @query(\".tab-group\") private _tabGroup: HTMLElement;\n\n @query(\".tab-group__body\") private _body: HTMLSlotElement;\n\n @query(\".tab-group__nav\") private _nav: HTMLElement;\n\n private _activeTab?: SgdsTab;\n\n private _mutationObserver: MutationObserver;\n\n private _resizeObserver: ResizeObserver;\n\n private _tabs: SgdsTab[] = [];\n\n private _panels: SgdsTabPanel[] = [];\n /** The variant of tabs. Controls the visual styles of all `sgds-tabs` in its slot. It also sets the variant atttribute of `sgds-tab` */\n @property({ type: String, reflect: true }) variant: \"underlined\" | \"solid\" = \"underlined\";\n /** The orientation of tabs. Controls the orientation of all `sgds-tabs` in its slot. It also sets the orientation attribute of `sgds-tab` */\n @property({ type: String, reflect: true }) orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n /** The density of tabs. Controls the density of all `sgds-tabs` in its slot. It also sets the density attribute of `sgds-tab` */\n @property({ type: String, reflect: true }) density: \"compact\" | \"default\" = \"default\";\n\n connectedCallback() {\n const whenAllDefined = Promise.all([\n customElements.whenDefined(\"sgds-tab\"),\n customElements.whenDefined(\"sgds-tab-panel\")\n ]);\n super.connectedCallback();\n this._resizeObserver = new ResizeObserver(() => {\n return;\n });\n\n this._mutationObserver = new MutationObserver(mutations => {\n // Update aria labels when the DOM changes\n if (mutations.some(m => ![\"aria-labelledby\", \"aria-controls\"].includes(m.attributeName))) {\n setTimeout(() => this._setAriaLabels());\n }\n\n // Sync tabs when disabled states change\n if (mutations.some(m => m.attributeName === \"disabled\")) {\n this._syncTabsAndPanels();\n }\n });\n\n this.updateComplete.then(() => {\n this._syncTabsAndPanels();\n this._mutationObserver.observe(this, { attributes: true, childList: true, subtree: true });\n this._resizeObserver.observe(this._nav);\n whenAllDefined.then(() => {\n // Set initial tab state when the tabs first become visible\n const intersectionObserver = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this._setAriaLabels();\n // this.setTabVariant();\n this._setActiveTab(this._getActiveTab() ?? this._tabs[0], { emitEvents: false });\n observer.unobserve(entries[0].target);\n }\n });\n intersectionObserver.observe(this._tabGroup);\n });\n });\n }\n\n disconnectedCallback() {\n this._mutationObserver.disconnect();\n this._resizeObserver.unobserve(this._nav);\n }\n\n /** Shows the specified tab panel. */\n public show(panel: string) {\n const tab = this._tabs.find(el => el.panel === panel);\n\n if (tab) {\n this._setActiveTab(tab);\n }\n }\n private _getAllTabs(options: { includeDisabled: boolean } = { includeDisabled: true }) {\n const slot = this.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"nav\"]');\n\n return [...(slot.assignedElements() as SgdsTab[])].filter(el => {\n return options.includeDisabled\n ? el.tagName.toLowerCase() === \"sgds-tab\"\n : el.tagName.toLowerCase() === \"sgds-tab\" && !el.disabled;\n });\n }\n private _getAllPanels() {\n return [...this._body.assignedElements()].filter(el => el.tagName.toLowerCase() === \"sgds-tab-panel\") as [\n SgdsTabPanel\n ];\n }\n private _getActiveTab() {\n return this._tabs.find(el => el.active);\n }\n private _handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const tab = target.closest(\"sgds-tab\") as SgdsTab;\n const tabGroup = tab?.closest(\"sgds-tab-group\");\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this) {\n return;\n }\n\n if (tab !== null) {\n this._setActiveTab(tab);\n }\n }\n private _handleKeyDown(event: KeyboardEvent) {\n const target = event.target as HTMLElement;\n const tab = target.closest(\"sgds-tab\") as SgdsTab;\n const tabGroup = tab?.closest(\"sgds-tab-group\");\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this) {\n return;\n }\n\n // Activate a tab\n if ([\"Enter\", \" \"].includes(event.key)) {\n if (tab !== null) {\n this._setActiveTab(tab);\n event.preventDefault();\n }\n }\n\n // Move focus left or right\n if ([\"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(event.key)) {\n const activeEl = this._tabs.find(t => t.matches(\":focus\"));\n\n if (activeEl?.tagName.toLowerCase() === \"sgds-tab\") {\n let index = this._tabs.indexOf(activeEl);\n\n if (event.key === \"Home\") {\n index = 0;\n } else if (event.key === \"End\") {\n index = this._tabs.length - 1;\n } else if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n index--;\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n index++;\n }\n\n if (index < 0) {\n index = this._tabs.length - 1;\n }\n\n if (index > this._tabs.length - 1) {\n index = 0;\n }\n\n this._tabs[index].focus({ preventScroll: true });\n\n this._setActiveTab(this._tabs[index] /** , { scrollBehavior: \"smooth\" }*/);\n\n event.preventDefault();\n }\n }\n }\n private _setActiveTab(tab: SgdsTab, options?: { emitEvents?: boolean }) {\n options = {\n emitEvents: true,\n ...options\n };\n\n if (tab !== this._activeTab && !tab.disabled) {\n const previousTab = this._activeTab;\n this._activeTab = tab;\n\n // Sync active tab and panel\n this._tabs.forEach(el => {\n el.active = el === this._activeTab ? true : false;\n });\n\n this._panels.map(el => (el.active = el.name === this._activeTab?.panel));\n\n // Emit events\n if (options.emitEvents) {\n if (previousTab) {\n this.emit(\"sgds-tab-hide\", { detail: { name: previousTab.panel } });\n }\n\n this.emit(\"sgds-tab-show\", { detail: { name: this._activeTab.panel } });\n }\n }\n }\n private _setAriaLabels() {\n // Link each tab with its corresponding panel\n this._tabs.forEach(tab => {\n const panel = this._panels.find(el => el.name === tab.panel);\n if (panel) {\n tab.setAttribute(\"aria-controls\", panel.getAttribute(\"id\"));\n panel.setAttribute(\"aria-labelledby\", tab.getAttribute(\"id\"));\n }\n });\n }\n\n // This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.\n private _syncTabsAndPanels() {\n this._tabs = this._getAllTabs({ includeDisabled: false });\n this._panels = this._getAllPanels();\n }\n\n @queryAssignedElements({ slot: \"nav\", flatten: true })\n private _navSlot: SgdsTab[];\n\n private _updateTabsAttribute(name: string) {\n if (!this._navSlot) return;\n const tabs = this._navSlot;\n tabs.forEach(tab => {\n tab.setAttribute(name, this[name]);\n });\n }\n\n private _handleSlotChange() {\n this._updateTabsAttribute(\"variant\");\n this._updateTabsAttribute(\"orientation\");\n this._updateTabsAttribute(\"density\");\n this._syncTabsAndPanels();\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n // similar to @watch\n if (_changedProperties.has(\"variant\")) {\n this._updateTabsAttribute(\"variant\");\n }\n if (_changedProperties.has(\"orientation\")) {\n this._updateTabsAttribute(\"orientation\");\n }\n if (_changedProperties.has(\"density\")) {\n this._updateTabsAttribute(\"density\");\n }\n }\n\n render() {\n return html`\n <div class=\"tab-group\" @click=${this._handleClick} @keydown=${this._handleKeyDown}>\n <div class=\"tab-group__nav\" role=\"tablist\">\n <slot name=\"nav\" @slotchange=${this._handleSlotChange}></slot>\n </div>\n <div class=\"tab-group__content\">\n <slot class=\"tab-group__body\" @slotchange=${this._syncTabsAndPanels}></slot>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsTabGroup;\n"],"names":["tabGroupStyle"],"mappings":";;;;;;AAMA;;;;;;;;;;AAUG;AACG,MAAO,YAAa,SAAQ,WAAW,CAAA;AAA7C,IAAA,WAAA,GAAA;;QAeU,IAAK,CAAA,KAAA,GAAc,EAAE,CAAC;QAEtB,IAAO,CAAA,OAAA,GAAmB,EAAE,CAAC;;QAEM,IAAO,CAAA,OAAA,GAA2B,YAAY,CAAC;;QAE/C,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;;QAEtD,IAAO,CAAA,OAAA,GAA0B,SAAS,CAAC;KAiOvF;IA/NC,iBAAiB,GAAA;AACf,QAAA,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;AACjC,YAAA,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC;AACtC,YAAA,cAAc,CAAC,WAAW,CAAC,gBAAgB,CAAC;AAC7C,SAAA,CAAC,CAAC;QACH,KAAK,CAAC,iBAAiB,EAAE,CAAC;AAC1B,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B,CAAC;AAA2B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAYT,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAgD,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAE/C,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAuD,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEtD,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAA4C,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAuL9E,UAAA,CAAA;IADP,qBAAqB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"sgds-tab-group.js","sources":["../../../src/components/Tab/sgds-tab-group.ts"],"sourcesContent":["import { html, PropertyValues } from \"lit\";\nimport { property, query, queryAssignedElements } from \"lit/decorators.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { SgdsTab } from \"./sgds-tab\";\nimport { SgdsTabPanel } from \"./sgds-tab-panel\";\nimport tabGroupStyle from \"./tab-group.css\";\n/**\n * @summary Tab Group organizes content into a container with the syncing of tab and their corresponding panels.\n * Each tab must be slotted into the nav slot and its `panel` must refer to a tab panel of the same name.\n *\n * @slot default - The slot for `sgds-tab-panel`\n * @slot nav - The slot for `sgds-tab`\n *\n * @event sgds-tab-show - Emitted when a tab and its panels are shown. `event.detail.name` contains the active tab's panel name.\n * @event sgds-tab-hide - Emitted when a tab and its panels are hidden. `event.detail.name` contains the hidden tab's panel name.\n *\n */\nexport class SgdsTabGroup extends SgdsElement {\n static styles = [...SgdsElement.styles, tabGroupStyle];\n\n @query(\".tab-group\") private _tabGroup: HTMLElement;\n\n @query(\".tab-group__body\") private _body: HTMLSlotElement;\n\n @query(\".tab-group__nav\") private _nav: HTMLElement;\n\n private _activeTab?: SgdsTab;\n\n private _mutationObserver: MutationObserver;\n\n private _resizeObserver: ResizeObserver;\n\n private _tabs: SgdsTab[] = [];\n\n private _panels: SgdsTabPanel[] = [];\n /** The variant of tabs. Controls the visual styles of all `sgds-tabs` in its slot. It also sets the variant atttribute of `sgds-tab` */\n @property({ type: String, reflect: true }) variant: \"underlined\" | \"solid\" = \"underlined\";\n /** The orientation of tabs. Controls the orientation of all `sgds-tabs` in its slot. It also sets the orientation attribute of `sgds-tab` */\n @property({ type: String, reflect: true }) orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n /** The density of tabs. Controls the density of all `sgds-tabs` in its slot. It also sets the density attribute of `sgds-tab` */\n @property({ type: String, reflect: true }) density: \"compact\" | \"default\" = \"default\";\n\n connectedCallback() {\n const whenAllDefined = Promise.all([\n customElements.whenDefined(\"sgds-tab\"),\n customElements.whenDefined(\"sgds-tab-panel\")\n ]);\n super.connectedCallback();\n this._resizeObserver = new ResizeObserver(() => {\n return;\n });\n\n this._mutationObserver = new MutationObserver(mutations => {\n // Update aria labels when the DOM changes\n if (mutations.some(m => ![\"aria-labelledby\", \"aria-controls\"].includes(m.attributeName))) {\n setTimeout(() => this._setAriaLabels());\n }\n\n // Sync tabs when disabled states change\n if (mutations.some(m => m.attributeName === \"disabled\")) {\n this._syncTabsAndPanels();\n }\n });\n\n this.updateComplete.then(() => {\n this._syncTabsAndPanels();\n this._mutationObserver.observe(this, { attributes: true, childList: true, subtree: true });\n this._resizeObserver.observe(this._nav);\n whenAllDefined.then(() => {\n // Set initial tab state when the tabs first become visible\n const intersectionObserver = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this._setAriaLabels();\n // this.setTabVariant();\n this._setActiveTab(this._getActiveTab() ?? this._tabs[0], { emitEvents: false });\n observer.unobserve(entries[0].target);\n }\n });\n intersectionObserver.observe(this._tabGroup);\n });\n });\n }\n\n disconnectedCallback() {\n this._mutationObserver.disconnect();\n this._resizeObserver.unobserve(this._nav);\n }\n\n /** Shows the specified tab panel. */\n public show(panel: string) {\n const tab = this._tabs.find(el => el.panel === panel);\n\n if (tab) {\n this._setActiveTab(tab);\n }\n }\n private _getAllTabs(options: { includeDisabled: boolean } = { includeDisabled: true }) {\n const slot = this.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"nav\"]');\n\n return [...(slot.assignedElements() as SgdsTab[])].filter(el => {\n return options.includeDisabled\n ? el.tagName.toLowerCase() === \"sgds-tab\"\n : el.tagName.toLowerCase() === \"sgds-tab\" && !el.disabled;\n });\n }\n private _getAllPanels() {\n return [...this._body.assignedElements()].filter(el => el.tagName.toLowerCase() === \"sgds-tab-panel\") as [\n SgdsTabPanel\n ];\n }\n private _getActiveTab() {\n return this._tabs.find(el => el.active);\n }\n private _handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const tab = target.closest(\"sgds-tab\") as SgdsTab;\n const tabGroup = tab?.closest(\"sgds-tab-group\");\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this) {\n return;\n }\n\n if (tab !== null) {\n this._setActiveTab(tab);\n }\n }\n private _handleKeyDown(event: KeyboardEvent) {\n const target = event.target as HTMLElement;\n const tab = target.closest(\"sgds-tab\") as SgdsTab;\n const tabGroup = tab?.closest(\"sgds-tab-group\");\n\n // Ensure the target tab is in this tab group\n if (tabGroup !== this) {\n return;\n }\n\n // Activate a tab\n if ([\"Enter\", \" \"].includes(event.key)) {\n if (tab !== null) {\n this._setActiveTab(tab);\n event.preventDefault();\n }\n }\n\n // Move focus left or right\n if ([\"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(event.key)) {\n const activeEl = this._tabs.find(t => t.matches(\":focus\"));\n\n if (activeEl?.tagName.toLowerCase() === \"sgds-tab\") {\n let index = this._tabs.indexOf(activeEl);\n\n if (event.key === \"Home\") {\n index = 0;\n } else if (event.key === \"End\") {\n index = this._tabs.length - 1;\n } else if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n index--;\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n index++;\n }\n\n if (index < 0) {\n index = this._tabs.length - 1;\n }\n\n if (index > this._tabs.length - 1) {\n index = 0;\n }\n\n this._tabs[index].focus({ preventScroll: true });\n\n this._setActiveTab(this._tabs[index] /** , { scrollBehavior: \"smooth\" }*/);\n\n event.preventDefault();\n }\n }\n }\n private _setActiveTab(tab: SgdsTab, options?: { emitEvents?: boolean }) {\n options = {\n emitEvents: true,\n ...options\n };\n\n if (tab !== this._activeTab && !tab.disabled) {\n const previousTab = this._activeTab;\n this._activeTab = tab;\n\n // Sync active tab and panel\n this._tabs.forEach(el => {\n el.active = el === this._activeTab ? true : false;\n });\n\n this._panels.map(el => (el.active = el.name === this._activeTab?.panel));\n\n // Emit events\n if (options.emitEvents) {\n if (previousTab) {\n this.emit(\"sgds-tab-hide\", { detail: { name: previousTab.panel } });\n }\n\n this.emit(\"sgds-tab-show\", { detail: { name: this._activeTab.panel } });\n }\n }\n }\n private _setAriaLabels() {\n // Link each tab with its corresponding panel\n this._tabs.forEach(tab => {\n const panel = this._panels.find(el => el.name === tab.panel);\n if (panel) {\n tab.setAttribute(\"aria-controls\", panel.getAttribute(\"id\"));\n panel.setAttribute(\"aria-labelledby\", tab.getAttribute(\"id\"));\n }\n });\n }\n\n // This stores tabs and panels so we can refer to a cache instead of calling querySelectorAll() multiple times.\n private _syncTabsAndPanels() {\n this._tabs = this._getAllTabs({ includeDisabled: false });\n this._panels = this._getAllPanels();\n }\n\n @queryAssignedElements({ slot: \"nav\", flatten: true })\n private _navSlot: SgdsTab[];\n\n private _updateTabsAttribute(name: string) {\n if (!this._navSlot) return;\n const tabs = this._navSlot;\n tabs.forEach(tab => {\n tab.setAttribute(name, this[name]);\n });\n }\n\n private _handleSlotChange() {\n this._updateTabsAttribute(\"variant\");\n this._updateTabsAttribute(\"orientation\");\n this._updateTabsAttribute(\"density\");\n this._syncTabsAndPanels();\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n // similar to @watch\n if (_changedProperties.has(\"variant\")) {\n this._updateTabsAttribute(\"variant\");\n }\n if (_changedProperties.has(\"orientation\")) {\n this._updateTabsAttribute(\"orientation\");\n }\n if (_changedProperties.has(\"density\")) {\n this._updateTabsAttribute(\"density\");\n }\n }\n\n render() {\n return html`\n <div class=\"tab-group\" @click=${this._handleClick} @keydown=${this._handleKeyDown}>\n <div class=\"tab-group__nav\" role=\"tablist\">\n <slot name=\"nav\" @slotchange=${this._handleSlotChange}></slot>\n </div>\n\n <div class=\"tab-group__content\">\n <slot class=\"tab-group__body\" @slotchange=${this._syncTabsAndPanels}></slot>\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsTabGroup;\n"],"names":["tabGroupStyle"],"mappings":";;;;;;AAMA;;;;;;;;;;AAUG;AACG,MAAO,YAAa,SAAQ,WAAW,CAAA;AAA7C,IAAA,WAAA,GAAA;;QAeU,IAAK,CAAA,KAAA,GAAc,EAAE,CAAC;QAEtB,IAAO,CAAA,OAAA,GAAmB,EAAE,CAAC;;QAEM,IAAO,CAAA,OAAA,GAA2B,YAAY,CAAC;;QAE/C,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;;QAEtD,IAAO,CAAA,OAAA,GAA0B,SAAS,CAAC;KAkOvF;IAhOC,iBAAiB,GAAA;AACf,QAAA,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;AACjC,YAAA,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC;AACtC,YAAA,cAAc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,YAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAExB,UAAA,CAAA;IAAjC,KAAK,CAAC,iBAAiB,CAAC;AAA2B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAYT,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAgD,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAE/C,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAuD,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEtD,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAA4C,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAuL9E,UAAA,CAAA;IADP,qBAAqB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
2
 
3
- var css_248z = css`.tab-group{display:flex;flex-direction:column;gap:var(--sgds-gap-xl)}.tab-group__nav{display:flex;flex-direction:row}.tab-group__content{flex:1}:host([orientation=vertical]) .tab-group{flex-direction:row}:host([orientation=vertical]) .tab-group__nav{flex-direction:column}:host([variant=solid]) .tab-group__nav{gap:var(--sgds-gap-xs)}`;
3
+ var css_248z = css`.tab-group{display:flex;flex-direction:column;gap:var(--sgds-gap-xl)}.tab-group__nav{display:flex;flex-direction:row}.tab-group__content{flex:1}:host([orientation=vertical]) .tab-group{flex-direction:row}:host([orientation=vertical]) .tab-group__nav{flex-direction:column}:host([variant=solid]) .tab-group__nav{gap:var(--sgds-gap-xs)}:host([variant=underlined][orientation=horizontal]) .tab-group__nav{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);display:flex;flex-direction:row}:host([variant=underlined][orientation=vertical]) .tab-group__nav{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}`;
4
4
 
5
5
  export { css_248z as default };
6
6
  //# sourceMappingURL=tab-group.js.map
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
2
 
3
- var css_248z = css`:host([density=compact]) .tab{font-size:var(--sgds-font-size-14);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined][orientation=vertical]) .tab{border-right:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=vertical][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:0;content:"";height:100%;position:absolute;right:-1px;width:var(--sgds-border-width-4)}:host([variant=underlined][orientation=horizontal]) .tab{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([variant=underlined][orientation=horizontal][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:-1px;content:"";height:var(--sgds-border-width-4);left:0;position:absolute;width:100%}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
3
+ var css_248z = css`:host([density=compact]) .tab{font-size:var(--sgds-font-size-14);padding:var(--sgds-spacer-3) var(--sgds-spacer-5)}:host(:not([active])) .tab{cursor:pointer}:host([variant=solid]) .tab{background-color:var(--sgds-bg-translucent-subtle);border-radius:var(--sgds-border-radius-md)}:host([variant=solid][active]) .tab{background-color:var(--sgds-primary-surface-default);color:var(--sgds-color-fixed-light)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus,:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent)}:host([variant=solid]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=solid]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent)}:host([disabled]) .tab{cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=underlined][active]) .tab{color:var(--sgds-primary-color-default)}:host([variant=underlined][orientation=vertical][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:0;content:"";height:100%;position:absolute;right:-1px;width:var(--sgds-border-width-4)}:host([variant=underlined][orientation=horizontal][active]) .tab:after{background-color:var(--sgds-primary-surface-default);bottom:-1px;content:"";height:var(--sgds-border-width-4);left:0;position:absolute;width:100%}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus,:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{background-color:var(--sgds-bg-translucent-subtle);outline:0}:host([variant=underlined]:not([active]):not([disabled])) .tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}:host([variant=underlined]:not([active]):not([disabled])) .tab:hover{background-color:var(--sgds-bg-translucent-subtle)}.tab{align-items:center;color:var(--sgds-color-default);display:flex;gap:var(--sgds-spacer-3);padding:var(--sgds-spacer-4) var(--sgds-spacer-5);position:relative}.tab:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
4
4
 
5
5
  export { css_248z as default };
6
6
  //# sourceMappingURL=tab.js.map
@@ -4,13 +4,13 @@
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class r{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)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(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this._styleSheet=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}const o=(t,...e)=>{const i=1===t.length?t[0]:e.reduce((e,i,s)=>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.`)})(i)+t[s+1],t[0]);return new r(i,t,s)},a=t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return new r("string"==typeof(i=e)?i:String(i),void 0,s);var i},l=i?t=>t:t=>t instanceof CSSStyleSheet?a(t):t,{is:d,defineProperty:h,getOwnPropertyDescriptor:c,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:m}=Object,f=globalThis;let g;const v=f.trustedTypes,_=v?v.emptyScript:"",y=f.reactiveElementPolyfillSupportDevMode;f.litIssuedWarnings??=new Set,g=(t,e)=>{e+=` See https://lit.dev/msg/${t} for more information.`,f.litIssuedWarnings.has(e)||f.litIssuedWarnings.has(t)||(console.warn(e),f.litIssuedWarnings.add(e))},queueMicrotask(()=>{g("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&void 0===y&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const b=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},$=(t,e)=>!d(t,e),S={attribute:!0,type:String,converter:w,reflect:!1,useDefault:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),f.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 i=Symbol.for(`${String(t)} (@property() cache)`),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==s){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.`);g("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:s,set(e){const r=s?.call(this);n?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static __prepare(){if(this.hasOwnProperty(b("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(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const i=this.__attributeNameForProperty(t,e);void 0!==i&&this.__attributeToPropertyMap.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("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 i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static __attributeNameForProperty(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of s){const s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(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,i){this._$attributeToProperty(t,i)}__propertyToAttribute(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor.__attributeNameForProperty(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===n&&g("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==n?this.removeAttribute(s):this.setAttribute(s,n),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const i=this.constructor,s=i.__attributeToPropertyMap.get(t);if(void 0!==s&&this.__reflectingProperty!==s){const t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this.__reflectingProperty=s;const r=n.fromAttribute(e,t.type);this[s]=r??this.__defaultValues?.get(s)??r,this.__reflectingProperty=null}}requestUpdate(t,e,i,s=!1,n){if(void 0!==t){t instanceof Event&&g("","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 r=this.constructor;!1===s&&(n=this[t]),i??=r.getPropertyOptions(t);if(!((i.hasChanged??$)(n,e)||i.useDefault&&i.reflect&&n===this.__defaultValues?.get(t)&&!this.hasAttribute(r.__attributeNameForProperty(t,i))))return;this._$changeProperty(t,e,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,{useDefault:i,reflect:s,wrapped:n},r){i&&!(this.__defaultValues??=new Map).has(t)&&(this.__defaultValues.set(t,r??e??this[t]),!0!==n||void 0!==r)||(this._$changedProperties.has(t)||(this.hasUpdated||i||(e=void 0),this._$changedProperties.set(t,e)),!0===s&&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&&g("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"},f.emitLitDebugLogEvents&&f.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,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$changedProperties.has(e)||void 0===s||this._$changeProperty(e,void 0,i,s)}}let e=!1;const i=this._$changedProperties;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this.__controllers?.forEach(t=>t.hostUpdate?.()),this.update(i)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(i)}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")&&g("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[b("elementProperties")]=new Map,x[b("finalized")]=new Map,y?.({ReactiveElement:x});{x.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(b("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 i=this.enabledWarnings.indexOf(e);i>=0&&this.enabledWarnings.splice(i,1)}}(f.reactiveElementVersions??=[]).push("2.1.2"),f.reactiveElementVersions.length>1&&queueMicrotask(()=>{g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
7
+ const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class r{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)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(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this._styleSheet=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}const o=(t,...e)=>{const i=1===t.length?t[0]:e.reduce((e,i,s)=>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.`)})(i)+t[s+1],t[0]);return new r(i,t,s)},a=t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return new r("string"==typeof(i=e)?i:String(i),void 0,s);var i},l=i?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,_=v?v.emptyScript:"",y=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===y&&f("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const b=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},$=(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 i=Symbol.for(`${String(t)} (@property() cache)`),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==s){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:s,set(e){const r=s?.call(this);n?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static __prepare(){if(this.hasOwnProperty(b("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(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const i=this.__attributeNameForProperty(t,e);void 0!==i&&this.__attributeToPropertyMap.set(i,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 i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static __attributeNameForProperty(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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 i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,s)=>{if(i)t.adoptedStyleSheets=s.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of s){const s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=i.cssText,t.appendChild(s)}})(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,i){this._$attributeToProperty(t,i)}__propertyToAttribute(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor.__attributeNameForProperty(t,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===n&&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==n?this.removeAttribute(s):this.setAttribute(s,n),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const i=this.constructor,s=i.__attributeToPropertyMap.get(t);if(void 0!==s&&this.__reflectingProperty!==s){const t=i.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this.__reflectingProperty=s;const r=n.fromAttribute(e,t.type);this[s]=r??this.__defaultValues?.get(s)??r,this.__reflectingProperty=null}}requestUpdate(t,e,i,s=!1,n){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 r=this.constructor;!1===s&&(n=this[t]),i??=r.getPropertyOptions(t);if(!((i.hasChanged??$)(n,e)||i.useDefault&&i.reflect&&n===this.__defaultValues?.get(t)&&!this.hasAttribute(r.__attributeNameForProperty(t,i))))return;this._$changeProperty(t,e,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,{useDefault:i,reflect:s,wrapped:n},r){i&&!(this.__defaultValues??=new Map).has(t)&&(this.__defaultValues.set(t,r??e??this[t]),!0!==n||void 0!==r)||(this._$changedProperties.has(t)||(this.hasUpdated||i||(e=void 0),this._$changedProperties.set(t,e)),!0===s&&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,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$changedProperties.has(e)||void 0===s||this._$changeProperty(e,void 0,i,s)}}let e=!1;const i=this._$changedProperties;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this.__controllers?.forEach(t=>t.hostUpdate?.()),this.update(i)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(i)}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[b("elementProperties")]=new Map,x[b("finalized")]=new Map,y?.({ReactiveElement:x});{x.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(b("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 i=this.enabledWarnings.indexOf(e);i>=0&&this.enabledWarnings.splice(i,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.")});
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
12
  */
13
- const C=globalThis,k=t=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let V,P=0;C.litIssuedWarnings??=new Set,V=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",C.litIssuedWarnings.has(e)||C.litIssuedWarnings.has(t)||(console.warn(e),C.litIssuedWarnings.add(e))},queueMicrotask(()=>{V("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:t=>t,E=C.trustedTypes,I=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=t=>t,z=(t,e,i)=>U,N=t=>{if(rt!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=z},O=(t,e,i)=>rt(t,e,i),R="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+D,W=`<${A}>`,F=document,L=()=>F.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,q="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/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$)&&V("","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"),it=Symbol.for("lit-nothing"),st=new WeakMap,nt=F.createTreeWalker(F,129);let rt=z;function ot(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!==I?I.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=B;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===B){if("!--"===l[1])o=Z;else if(void 0!==l[1])o=J;else if(void 0!==l[2])K.test(l[2])&&(n=new RegExp(`</${l[2]}`,"g")),o=G;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 o===G?">"===l[0]?(o=n??B,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?G:'"'===l[3]?X:Y):o===X||o===Y?o=G:o===Z||o===J?o=B:(o=G,n=void 0);console.assert(-1===d||o===G||o===Y||o===X,"unexpected parse state B");const c=o===G&&t[e+1].startsWith("/>")?" ":"";r+=o===B?i+W:d>=0?(s.push(a),i.slice(0,d)+R+i.slice(d)+D+c):i+D+(-2===d?e:c)}return[ot(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=at.createElement(l,i),nt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=nt.nextNode())&&a.length<o;){if(1===s.nodeType){{const t=s.localName;if(/^(?:textarea|template)$/i.test(t)&&s.innerHTML.includes(D)){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);V("",e)}}if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(R)){const e=d[r++],i=s.getAttribute(t).split(D),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?pt:"?"===o[1]?ut:"@"===o[1]?mt:ct}),s.removeAttribute(t)}else t.startsWith(D)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(K.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),nt.nextNode(),a.push({type:2,index:++n});s.append(t[e],L())}}}else if(8===s.nodeType){if(s.data===A)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:n}),t+=D.length-1}}n++}if(d.length!==r)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 i=F.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let n=void 0!==s?i.__directives?.[s]:i.__directive;const r=j(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?n=void 0:(n=new r(t),n._$initialize(t,i,s)),void 0!==s?(i.__directives??=[])[s]=n:i.__directive=n),void 0!==n&&(e=lt(t,n._$resolve(t,e.values),n,s)),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:i}=this._$template,s=(t?.creationScope??F).importNode(e,!0);nt.currentNode=s;let n=nt.nextNode(),r=0,o=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ht(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new ft(n,this,t)),this._$parts.push(e),a=i[++o]}r!==a?.index&&(n=nt.nextNode(),r++)}return nt.currentNode=F,s}_update(t){let e=0;for(const i of this._$parts)void 0!==i&&(k&&k({kind:"set part",part:i,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==i.strings?(i._$setValue(t,i,e),e+=i.strings.length-2):i._$setValue(t[e])),e++}}class ht{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,i,s){this.type=2,this._$committedValue=it,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=s?.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===it||null==t||""===t?(this._$committedValue!==it&&(k&&k({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=it):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(),rt!==z){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!==it&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=O(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=F.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=O(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$:i}=t,s="number"==typeof i?this._$getTemplate(t):(void 0===i.el&&(i.el=at.createElement(ot(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)k&&k({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(s,this),i=t._clone(this.options);k&&k({kind:"template instantiated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),t._update(e),k&&k({kind:"template instantiated and updated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}_commitIterable(t){H(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i,s=0;for(const n of t)s===e.length?e.push(i=new ht(this._insert(L()),this._insert(L()),this,this.options)):i=e[s],i._$setValue(n),s++;s<e.length&&(this._$clear(i&&T(i._$endNode).nextSibling,s),e.length=s)}_$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,i,s,n){this.type=1,this._$committedValue=it,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=it,this._sanitizer=void 0}_$setValue(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=lt(this,t,e,0),r=!j(t)||t!==this._$committedValue&&t!==et,r&&(this._$committedValue=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=lt(this,s[i+o],e,o),a===et&&(a=this._$committedValue[o]),r||=!j(a)||a!==this._$committedValue[o],a===it?t=it:t!==it&&(t+=(a??"")+n[o+1]),this._$committedValue[o]=a}r&&!s&&this._commitValue(t)}_commitValue(t){t===it?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(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 ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(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===it?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){k&&k({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===it),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==it)}}class mt extends ct{constructor(t,e,i,s,n){if(super(t,e,i,s,n),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)??it)===et)return;const i=this._$committedValue,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==it&&(i===it||s);k&&k({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:s,addListener:n,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),n&&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 ft{constructor(t,e,i){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=i}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 gt=C.litHtmlPolyfillSupportDevMode;gt?.(at,ht),(C.litHtmlVersions??=[]).push("3.3.2"),C.litHtmlVersions.length>1&&queueMicrotask(()=>{V("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,i)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const s=P++,n=i?.renderBefore??e;let r=n._$litPart$;if(k&&k({kind:"begin render",id:s,value:t,container:e,options:i,part:r}),void 0===r){const t=i?.renderBefore??null;n._$litPart$=r=new ht(e.insertBefore(L(),t),t,void 0,i??{})}return r._$setValue(t),k&&k({kind:"end render",id:s,value:t,container:e,options:i,part:r}),r};vt.setSanitizer=N,vt.createSanitizer=O,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
13
+ const C=globalThis,k=t=>{C.emitLitDebugLogEvents&&C.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let V,P=0;C.litIssuedWarnings??=new Set,V=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",C.litIssuedWarnings.has(e)||C.litIssuedWarnings.has(t)||(console.warn(e),C.litIssuedWarnings.add(e))},queueMicrotask(()=>{V("dev-mode","Lit is in dev mode. Not recommended for production!")});const T=C.ShadyDOM?.inUse&&!0===C.ShadyDOM?.noPatch?C.ShadyDOM.wrap:t=>t,E=C.trustedTypes,I=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=t=>t,z=(t,e,i)=>U,N=t=>{if(rt!==z)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=z},O=(t,e,i)=>rt(t,e,i),R="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+D,W=`<${A}>`,F=document,L=()=>F.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,q="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,G=new RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/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$)&&V("","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"),it=Symbol.for("lit-nothing"),st=new WeakMap,nt=F.createTreeWalker(F,129);let rt=z;function ot(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!==I?I.createHTML(e):e}class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const o=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,s=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=B;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===B){if("!--"===l[1])o=Z;else if(void 0!==l[1])o=J;else if(void 0!==l[2])K.test(l[2])&&(n=new RegExp(`</${l[2]}`,"g")),o=G;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 o===G?">"===l[0]?(o=n??B,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?G:'"'===l[3]?X:Y):o===X||o===Y?o=G:o===Z||o===J?o=B:(o=G,n=void 0);console.assert(-1===d||o===G||o===Y||o===X,"unexpected parse state B");const c=o===G&&t[e+1].startsWith("/>")?" ":"";r+=o===B?i+W:d>=0?(s.push(a),i.slice(0,d)+R+i.slice(d)+D+c):i+D+(-2===d?e:c)}return[ot(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=at.createElement(l,i),nt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=nt.nextNode())&&a.length<o;){if(1===s.nodeType){{const t=s.localName;if(/^(?:textarea|template)$/i.test(t)&&s.innerHTML.includes(D)){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);V("",e)}}if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(R)){const e=d[r++],i=s.getAttribute(t).split(D),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?pt:"?"===o[1]?ut:"@"===o[1]?mt:ct}),s.removeAttribute(t)}else t.startsWith(D)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(K.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),nt.nextNode(),a.push({type:2,index:++n});s.append(t[e],L())}}}else if(8===s.nodeType){if(s.data===A)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:n}),t+=D.length-1}}n++}if(d.length!==r)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 i=F.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let n=void 0!==s?i.__directives?.[s]:i.__directive;const r=j(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?n=void 0:(n=new r(t),n._$initialize(t,i,s)),void 0!==s?(i.__directives??=[])[s]=n:i.__directive=n),void 0!==n&&(e=lt(t,n._$resolve(t,e.values),n,s)),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:i}=this._$template,s=(t?.creationScope??F).importNode(e,!0);nt.currentNode=s;let n=nt.nextNode(),r=0,o=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ht(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new gt(n,this,t)),this._$parts.push(e),a=i[++o]}r!==a?.index&&(n=nt.nextNode(),r++)}return nt.currentNode=F,s}_update(t){let e=0;for(const i of this._$parts)void 0!==i&&(k&&k({kind:"set part",part:i,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==i.strings?(i._$setValue(t,i,e),e+=i.strings.length-2):i._$setValue(t[e])),e++}}class ht{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,i,s){this.type=2,this._$committedValue=it,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=i,this.options=s,this.__isConnected=s?.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===it||null==t||""===t?(this._$committedValue!==it&&(k&&k({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=it):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(),rt!==z){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!==it&&j(this._$committedValue)){const e=T(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=O(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=F.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=O(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$:i}=t,s="number"==typeof i?this._$getTemplate(t):(void 0===i.el&&(i.el=at.createElement(ot(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)k&&k({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new dt(s,this),i=t._clone(this.options);k&&k({kind:"template instantiated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),t._update(e),k&&k({kind:"template instantiated and updated",template:s,instance:t,parts:t._$parts,options:this.options,fragment:i,values:e}),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new at(t)),e}_commitIterable(t){H(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let i,s=0;for(const n of t)s===e.length?e.push(i=new ht(this._insert(L()),this._insert(L()),this,this.options)):i=e[s],i._$setValue(n),s++;s<e.length&&(this._$clear(i&&T(i._$endNode).nextSibling,s),e.length=s)}_$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,i,s,n){this.type=1,this._$committedValue=it,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=it,this._sanitizer=void 0}_$setValue(t,e=this,i,s){const n=this.strings;let r=!1;if(void 0===n)t=lt(this,t,e,0),r=!j(t)||t!==this._$committedValue&&t!==et,r&&(this._$committedValue=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=lt(this,s[i+o],e,o),a===et&&(a=this._$committedValue[o]),r||=!j(a)||a!==this._$committedValue[o],a===it?t=it:t!==it&&(t+=(a??"")+n[o+1]),this._$committedValue[o]=a}r&&!s&&this._commitValue(t)}_commitValue(t){t===it?T(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(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 ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(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===it?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){k&&k({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===it),options:this.options}),T(this.element).toggleAttribute(this.name,!!t&&t!==it)}}class mt extends ct{constructor(t,e,i,s,n){if(super(t,e,i,s,n),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)??it)===et)return;const i=this._$committedValue,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==it&&(i===it||s);k&&k({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:s,addListener:n,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),n&&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,i){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=i}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 ft=C.litHtmlPolyfillSupportDevMode;ft?.(at,ht),(C.litHtmlVersions??=[]).push("3.3.2"),C.litHtmlVersions.length>1&&queueMicrotask(()=>{V("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});const vt=(t,e,i)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const s=P++,n=i?.renderBefore??e;let r=n._$litPart$;if(k&&k({kind:"begin render",id:s,value:t,container:e,options:i,part:r}),void 0===r){const t=i?.renderBefore??null;n._$litPart$=r=new ht(e.insertBefore(L(),t),t,void 0,i??{})}return r._$setValue(t),k&&k({kind:"end render",id:s,value:t,container:e,options:i,part:r}),r};vt.setSanitizer=N,vt.createSanitizer=O,vt._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
@@ -76,7 +76,7 @@ class extends Nt{constructor(t){if(super(t),t.type!==It&&t.type!==Et&&t.type!==U
76
76
  * @license
77
77
  * Copyright 2020 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
79
- */var jt,Ht=o`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,qt=o`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Bt=o`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Zt=o`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`,Jt=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);display:block;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 Gt extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(s){customElements.define(t,class extends e{},i)}}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}))}))}}function Yt(t="",e=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${t}-${e}`}Gt.styles=[Jt],Gt.dependencies={},t([kt({type:Boolean,reflect:!0})],Gt.prototype,"ssr",void 0);class Xt extends Gt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Yt("input"),this._labelId=Yt("label")}setInvalid(t){this.invalid=t,t?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Xt.styles=[...Gt.styles,Ht,qt,Bt,Zt],t([kt({reflect:!0})],Xt.prototype,"label",void 0),t([kt({reflect:!0})],Xt.prototype,"hintText",void 0),t([kt({reflect:!0})],Xt.prototype,"name",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"invalid",void 0);class Kt{constructor(t,e){(this.host=t).addController(this),this._internals=t._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(t,e)=>{t.invalid=e},value:t=>t.value,input:t=>t.input},e)}hostConnected(){this.host.addEventListener("invalid",t=>this.handleInvalid(t))}hostDisconnected(){this.host.removeEventListener("invalid",t=>this.handleInvalid(t))}handleInvalid(t){t.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(t){const e=t.target;this.options.setInvalid(this.host,!1),this.validateInput(e)}handleChange(t){const e=t.target;this.validateInput(e),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(t,e,i){return this._internals.setValidity(t,e,i)}setFormValue(){const t=this.options.value(this.host);this._internals.setFormValue(t)}validateInput(t){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const e=t.validity;if(e.valid)this._internals.setValidity({});else for(const i in e)e[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},t.validationMessage,t))}}const Qt=e=>{class i extends e{constructor(...t){super(...t),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var t;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(t=this.inputValidationController)&&void 0!==t||(this.inputValidationController=new Kt(this))}async firstUpdated(t){super.firstUpdated(t),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(t){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(t)}_mixinHandleInputChange(t){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(t)}_mixinResetValidity(t){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(t),this._isTouched&&(this._isTouched=!1))}_mixinValidate(t){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(t)}_mixinSetFormValue(){const t=this.value;this._internals.setFormValue(t)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(t,e,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(t,e,i)}_mixinShouldSkipSgdsValidation(){const t=this.closest("form");return(null==t?void 0:t.noValidate)||this.noValidate}}return i.formAssociated=!0,t([Tt("sgds-input")],i.prototype,"sgdsInput",void 0),t([Tt("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};function te(t,e){const i=Object.assign({waitUntilFirstUpdate:!1},e);return(e,s)=>{const{update:n}=e;if(t in e){const r=t;e.update=function(t){if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](e,n))}n.call(this,t)}}}}var ee,ie,se,ne,re,oe=o`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`,ae=o`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);min-width:0;outline:none;padding:0}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class le extends(Qt(Xt)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.noValidate=!1,this.hintText="",this._isTouched=!1}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(t){t.preventDefault(),this.invalid=!0}_handleChange(t){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(t)}_handleInputChange(t){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(t)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const t=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const t=Lt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&t}_wordCount(){return Lt`
79
+ */var jt,Ht=o`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-14);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,qt=o`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-14);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,Bt=o`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,Zt=o`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`,Jt=o`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);display:block;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 Gt extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(s){customElements.define(t,class extends e{},i)}}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}))}))}}function Yt(t="",e=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${t}-${e}`}Gt.styles=[Jt],Gt.dependencies={},t([kt({type:Boolean,reflect:!0})],Gt.prototype,"ssr",void 0);class Xt extends Gt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=Yt("input"),this._labelId=Yt("label")}setInvalid(t){this.invalid=t,t?this.emit("sgds-invalid"):this.emit("sgds-valid")}}Xt.styles=[...Gt.styles,Ht,qt,Bt,Zt],t([kt({reflect:!0})],Xt.prototype,"label",void 0),t([kt({reflect:!0})],Xt.prototype,"hintText",void 0),t([kt({reflect:!0})],Xt.prototype,"name",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),t([kt({type:Boolean,reflect:!0})],Xt.prototype,"invalid",void 0);class Kt{constructor(t,e){(this.host=t).addController(this),this._internals=t._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(t,e)=>{t.invalid=e},value:t=>t.value,input:t=>t.input},e)}hostConnected(){this.host.addEventListener("invalid",t=>this.handleInvalid(t))}hostDisconnected(){this.host.removeEventListener("invalid",t=>this.handleInvalid(t))}handleInvalid(t){t.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(t){const e=t.target;this.options.setInvalid(this.host,!1),this.validateInput(e)}handleChange(t){const e=t.target;this.validateInput(e),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(t,e,i){return this._internals.setValidity(t,e,i)}setFormValue(){const t=this.options.value(this.host);this._internals.setFormValue(t)}validateInput(t){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const e=t.validity;if(e.valid)this._internals.setValidity({});else for(const i in e)e[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},t.validationMessage,t))}}const Qt=e=>{class i extends e{constructor(...t){super(...t),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var t;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(t=this.inputValidationController)&&void 0!==t||(this.inputValidationController=new Kt(this))}async firstUpdated(t){super.firstUpdated(t),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(t){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(t)}_mixinHandleInputChange(t){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(t)}_mixinResetValidity(t){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(t),this._isTouched&&(this._isTouched=!1))}_mixinValidate(t){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(t)}_mixinSetFormValue(){const t=this.value;this._internals.setFormValue(t)}_mixinCheckValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.checkValidity()}_mixinReportValidity(){return!!this._mixinShouldSkipSgdsValidation()||this.inputValidationController.reportValidity()}_mixinGetValidity(){return this._internals.validity}_mixinGetValidationMessage(){return this._internals.validationMessage}_mixinSetValidity(t,e,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(t,e,i)}_mixinShouldSkipSgdsValidation(){const t=this.closest("form");return(null==t?void 0:t.noValidate)||this.noValidate}}return i.formAssociated=!0,t([Tt("sgds-input")],i.prototype,"sgdsInput",void 0),t([Tt("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};function te(t,e){const i=Object.assign({waitUntilFirstUpdate:!1},e);return(e,s)=>{const{update:n}=e;if(t in e){const r=t;e.update=function(t){if(t.has(r)){const e=t.get(r),n=this[r];e!==n&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](e,n))}n.call(this,t)}}}}var ee,ie,se,ne,re,oe=o`textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;resize:vertical}textarea.form-control-group{min-height:var(--sgds-dimension-136);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x)}.textarea-resize-none{resize:none}.textarea-resize-vertical{resize:vertical}.textarea-resize-auto{height:auto;overflow-y:hidden;resize:none}.textarea-info-container{display:flex;justify-content:space-between}.word-count{margin-left:auto}`,ae=o`.form-control-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}.m-width-160{min-width:var(--sgds-dimension-160)}.m-width-256{min-width:var(--sgds-dimension-256)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--input-border-radius,var(--sgds-form-border-radius-md));display:flex;gap:var(--sgds-form-gap-md);height:var(--sgds-dimension-48);justify-content:center;overflow:hidden;padding:0 var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;color:var(--sgds-form-color-default);display:block;flex-grow:1;font-size:var(--sgds-font-size-16);line-height:var(--sgds-line-height-24);min-width:0;outline:none;padding:0;width:100%}.form-clearable{color:var(--sgds-color-subtle);cursor:pointer}@media (prefers-reduced-motion:reduce){.form-control-group{transition:none}}.form-control-group:not(.disabled):not(.is-invalid):not(.readonly):not(:focus-within):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-group:not(.disabled):not(.is-invalid):focus-within{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-control-container.disabled{opacity:var(--sgds-opacity-50)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted);cursor:not-allowed}.form-control-group.readonly{background-color:var(--sgds-form-surface-raised)}.form-control-group.is-invalid:not(.disabled){border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-control-group:not(.disabled).is-invalid:focus-within{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;class le extends(Qt(Xt)){constructor(){super(...arguments),this.value="",this.spellcheck=!1,this.rows=4,this.placeholder="Placeholder",this.invalidFeedback="",this.autofocus=!1,this.readonly=!1,this.resize="vertical",this.defaultValue="",this.hasFeedback=!1,this.required=!1,this.noValidate=!1,this.hintText="",this._isTouched=!1}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}select(){this.textarea.select()}_handleInvalid(t){t.preventDefault(),this.invalid=!0}_handleChange(t){this.value=this.input.value,this.emit("sgds-change"),super._mixinHandleChange(t)}_handleInputChange(t){this.value=this.input.value,this.emit("sgds-input"),super._mixinHandleInputChange(t)}_handleFocus(){this.emit("sgds-focus")}_handleBlur(){const t=this.emit("sgds-blur",{cancelable:!0});this._mixinShouldSkipSgdsValidation()||t.defaultPrevented||(this.setInvalid(!this._mixinCheckValidity()),this._isTouched=!0)}_handleRowsChange(){this._setTextareaHeight()}_setTextareaHeight(){"auto"===this.resize?(this.textarea.style.height="auto",this.textarea.style.height=`${this.textarea.scrollHeight}px`):this.textarea.style.height=void 0}_handleIsTouched(){this._mixinShouldSkipSgdsValidation()||this._isTouched&&this.setInvalid(!this._mixinCheckValidity())}_handleDisabledChange(){this.setInvalid(!1)}_handleValueChange(){this.updateComplete.then(()=>this._setTextareaHeight())}_renderHintText(){const t=Lt` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&t}_wordCount(){return Lt`
80
80
  <div
81
81
  class="form-text word-count ${Mt({"invalid-feedback":this.invalid&&this.hasFeedback})}"
82
82
  >
@@ -84,7 +84,7 @@ class extends Nt{constructor(t){if(super(t),t.type!==It&&t.type!==Et&&t.type!==U
84
84
  </div>
85
85
  `}render(){return Lt`
86
86
  <div
87
- class="form-control-container ${Mt({disabled:this.disabled})}"
87
+ class="form-control-container m-width-256 ${Mt({disabled:this.disabled})}"
88
88
  >
89
89
  <label for=${this._controlId} class="form-label">${this.label}</label>
90
90
  <textarea