@govtechsg/sgds-web-component 3.17.1-rc.0 → 3.18.1-rc.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 (91) hide show
  1. package/base/card-element.d.ts +1 -0
  2. package/base/card-element.js +14 -0
  3. package/base/card-element.js.map +1 -1
  4. package/base/card.js +1 -1
  5. package/components/Breadcrumb/index.umd.min.js +10 -16
  6. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  7. package/components/Card/index.umd.min.js +2 -2
  8. package/components/Card/index.umd.min.js.map +1 -1
  9. package/components/Card/sgds-card.js +3 -9
  10. package/components/Card/sgds-card.js.map +1 -1
  11. package/components/ComboBox/index.umd.min.js +1 -1
  12. package/components/ComboBox/index.umd.min.js.map +1 -1
  13. package/components/Datepicker/index.umd.min.js +1 -1
  14. package/components/Datepicker/index.umd.min.js.map +1 -1
  15. package/components/Dropdown/dropdown-menu.js +1 -1
  16. package/components/Dropdown/dropdown.js +1 -1
  17. package/components/Dropdown/index.umd.min.js +3 -9
  18. package/components/Dropdown/index.umd.min.js.map +1 -1
  19. package/components/Dropdown/sgds-dropdown.js +19 -11
  20. package/components/Dropdown/sgds-dropdown.js.map +1 -1
  21. package/components/IconCard/index.umd.min.js +3 -3
  22. package/components/IconCard/index.umd.min.js.map +1 -1
  23. package/components/IconCard/sgds-icon-card.js +3 -9
  24. package/components/IconCard/sgds-icon-card.js.map +1 -1
  25. package/components/ImageCard/index.umd.min.js +2 -2
  26. package/components/ImageCard/index.umd.min.js.map +1 -1
  27. package/components/ImageCard/sgds-image-card.js +3 -9
  28. package/components/ImageCard/sgds-image-card.js.map +1 -1
  29. package/components/Mainnav/index.umd.min.js +10 -16
  30. package/components/Mainnav/index.umd.min.js.map +1 -1
  31. package/components/OverflowMenu/index.umd.min.js +3 -9
  32. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  33. package/components/Select/index.umd.min.js +1 -1
  34. package/components/Select/index.umd.min.js.map +1 -1
  35. package/components/Stepper/index.umd.min.js +5 -6
  36. package/components/Stepper/index.umd.min.js.map +1 -1
  37. package/components/Stepper/sgds-step.js +3 -4
  38. package/components/Stepper/sgds-step.js.map +1 -1
  39. package/components/Stepper/sgds-stepper.js +8 -2
  40. package/components/Stepper/sgds-stepper.js.map +1 -1
  41. package/components/Stepper/step.js +1 -1
  42. package/components/ThumbnailCard/index.umd.min.js +5 -5
  43. package/components/ThumbnailCard/index.umd.min.js.map +1 -1
  44. package/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
  45. package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
  46. package/components/index.umd.min.js +8 -14
  47. package/components/index.umd.min.js.map +1 -1
  48. package/custom-elements.json +95 -1
  49. package/index.umd.min.js +12 -19
  50. package/index.umd.min.js.map +1 -1
  51. package/package.json +1 -1
  52. package/react/base/card-element.cjs.js +14 -0
  53. package/react/base/card-element.cjs.js.map +1 -1
  54. package/react/base/card-element.js +14 -0
  55. package/react/base/card-element.js.map +1 -1
  56. package/react/base/card.cjs.js +1 -1
  57. package/react/base/card.js +1 -1
  58. package/react/components/Card/sgds-card.cjs.js +3 -9
  59. package/react/components/Card/sgds-card.cjs.js.map +1 -1
  60. package/react/components/Card/sgds-card.js +3 -9
  61. package/react/components/Card/sgds-card.js.map +1 -1
  62. package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
  63. package/react/components/Dropdown/dropdown-menu.js +1 -1
  64. package/react/components/Dropdown/dropdown.cjs.js +1 -1
  65. package/react/components/Dropdown/dropdown.js +1 -1
  66. package/react/components/Dropdown/sgds-dropdown.cjs.js +19 -11
  67. package/react/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
  68. package/react/components/Dropdown/sgds-dropdown.js +19 -11
  69. package/react/components/Dropdown/sgds-dropdown.js.map +1 -1
  70. package/react/components/IconCard/sgds-icon-card.cjs.js +3 -9
  71. package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
  72. package/react/components/IconCard/sgds-icon-card.js +3 -9
  73. package/react/components/IconCard/sgds-icon-card.js.map +1 -1
  74. package/react/components/ImageCard/sgds-image-card.cjs.js +3 -9
  75. package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
  76. package/react/components/ImageCard/sgds-image-card.js +3 -9
  77. package/react/components/ImageCard/sgds-image-card.js.map +1 -1
  78. package/react/components/Stepper/sgds-step.cjs.js +3 -4
  79. package/react/components/Stepper/sgds-step.cjs.js.map +1 -1
  80. package/react/components/Stepper/sgds-step.js +3 -4
  81. package/react/components/Stepper/sgds-step.js.map +1 -1
  82. package/react/components/Stepper/sgds-stepper.cjs.js +8 -2
  83. package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
  84. package/react/components/Stepper/sgds-stepper.js +8 -2
  85. package/react/components/Stepper/sgds-stepper.js.map +1 -1
  86. package/react/components/Stepper/step.cjs.js +1 -1
  87. package/react/components/Stepper/step.js +1 -1
  88. package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +6 -9
  89. package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
  90. package/react/components/ThumbnailCard/sgds-thumbnail-card.js +6 -9
  91. package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
@@ -49,17 +49,11 @@ class SgdsCard extends CardElement {
49
49
  return (element.querySelector("a") || element);
50
50
  }
51
51
  firstUpdated(changedProperties) {
52
- var _a, _b;
53
52
  super.firstUpdated(changedProperties);
54
53
  if (this.stretchedLink) {
55
- const footerHref = (_a = this.footerSlotItems) === null || _a === void 0 ? void 0 : _a.href;
56
- const linkHref = (_b = this.linkSlotItems) === null || _b === void 0 ? void 0 : _b.href;
57
- if (footerHref) {
58
- this.card.setAttribute("href", footerHref);
59
- }
60
- else if (linkHref) {
61
- this.card.setAttribute("href", linkHref);
62
- }
54
+ const footerAnchor = this.footerSlotItems;
55
+ const linkAnchor = this.linkSlotItems;
56
+ this._forwardAnchorAttributes((footerAnchor === null || footerAnchor === void 0 ? void 0 : footerAnchor.href) ? footerAnchor : linkAnchor);
63
57
  }
64
58
  }
65
59
  updated() {
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-card.js","sources":["../../../src/components/Card/sgds-card.ts"],"sourcesContent":["import { PropertyValueMap } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport { HasSlotController } from \"../../utils/slot\";\nimport { CardImageAdjustment, CardImagePosition } from \"./types\";\nimport type SgdsLink from \"../Link/sgds-link\";\nimport cardStyle from \"./card.css\";\n\n/**\n * @summary Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.\n * @slot default - The content area of the card, placed directly under the title. Accepts any HTML or custom elements.\n * @slot menu - Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the card. Typically used for action menus or dropdowns.\n * @slot upper - Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.\n * @slot image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.\n * @slot icon - Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.\n * @slot subtitle - The subtitle of the card\n * @slot title - The title of the card\n * @slot description - The paragrapher text of the card\n * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.\n * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.\n * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.\n * Legacy slot for anchor elements. Use `footer` instead.\n */\nexport class SgdsCard extends CardElement {\n static styles = [...CardElement.styles, cardStyle];\n\n @queryAssignedElements({ slot: \"footer\" })\n private footerNode!: HTMLElement[];\n @queryAssignedElements({ slot: \"link\" })\n private linkNode!: HTMLAnchorElement[] | SgdsLink[];\n\n /** Sets the image position of the card. Available options: `before`, `after` */\n @property({ type: String, reflect: true }) imagePosition: CardImagePosition = \"before\";\n\n /** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */\n @property({ type: String, reflect: true }) imageAdjustment: CardImageAdjustment = \"default\";\n\n /** Used only for SSR to indicate the presence of the `image` slot. */\n @property({ type: Boolean }) hasImageSlot = false;\n\n /** Used only for SSR to indicate the presence of the `icon` slot. */\n @property({ type: Boolean }) hasIconSlot = false;\n\n /** Used only for SSR to indicate the presence of the `upper` slot. */\n @property({ type: Boolean }) hasUpperSlot = false;\n\n private get linkSlotItems(): HTMLAnchorElement | null {\n if (!this.linkNode || this.linkNode.length === 0) return null;\n const element = this.linkNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private get footerSlotItems(): HTMLAnchorElement | null {\n if (!this.footerNode || this.footerNode.length === 0) return null;\n const element = this.footerNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private readonly hasSlotController = new HasSlotController(this, \"image\", \"icon\", \"upper\");\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n if (this.stretchedLink) {\n const footerHref = this.footerSlotItems?.href;\n const linkHref = this.linkSlotItems?.href;\n\n if (footerHref) {\n this.card.setAttribute(\"href\", footerHref);\n } else if (linkHref) {\n this.card.setAttribute(\"href\", linkHref);\n }\n }\n }\n\n updated() {\n if (!this.hasImageSlot) this.hasImageSlot = this.hasSlotController.test(\"image\");\n if (!this.hasIconSlot) this.hasIconSlot = this.hasSlotController.test(\"icon\");\n if (!this.hasUpperSlot) this.hasUpperSlot = this.hasSlotController.test(\"upper\");\n }\n\n handleImgSlotChange(e: Event) {\n const childNodes = (e.target as HTMLSlotElement).assignedNodes({ flatten: true }) as Array<HTMLOrSVGImageElement>;\n\n if (childNodes.length > 1) {\n console.error(\"Multiple elements passed into SgdsCard's image slot\");\n }\n\n if (this.hasSlotController.test(\"image\") && this.hasSlotController.test(\"icon\")) {\n console.error(\"Both image and icon slots cannot be used together in SgdsCard\");\n }\n }\n\n render() {\n const tag = this.stretchedLink ? literal`a` : literal`div`;\n const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;\n\n return html`\n <${tag}\n class=\"card ${classMap({\n disabled: this.disabled\n })}\"\n tabindex=${cardTabIndex}\n >\n <div class=\"card-tinted-bg\"></div>\n \n <slot name=\"menu\"></slot>\n <div class=${classMap({\n \"card-image\": this.hasImageSlot,\n \"card-media\": this.hasIconSlot || this.hasUpperSlot\n })}>\n <slot name=\"upper\">\n <slot name=\"image\" @slotchange=${this.handleImgSlotChange}></slot>\n <slot name=\"icon\"></slot>\n </slot>\n </div>\n\n <div class=\"card-body\">\n <div class=\"card-header-container\">\n <div class=\"card-header\">\n <slot name=\"subtitle\"></slot>\n <h3 class=\"card-title\"><slot name=\"title\" @slotchange=${this.handleTitleSlotChange}></slot></h3>\n </div>\n <slot></slot>\n </div>\n <slot name=\"description\"></slot>\n <slot name=\"lower\"></slot>\n <slot name=\"footer\">\n <slot name=\"link\" @slotchange=${this.warnLinkSlotMisused}></slot>\n </slot>\n </div>\n </${tag}>\n `;\n }\n}\n\nexport default SgdsCard;\n"],"names":["cardStyle"],"mappings":";;;;;;;;AAUA;;;;;;;;;;;;;;AAcG;AACG,MAAO,QAAS,SAAQ,WAAW,CAAA;AAAzC,IAAA,WAAA,GAAA;;;QAS6C,IAAa,CAAA,aAAA,GAAsB,QAAQ,CAAC;;QAG5C,IAAe,CAAA,eAAA,GAAwB,SAAS,CAAC;;QAG/D,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;;QAGrB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAGpB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AAcjC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;KA2E5F;AAvFC,IAAA,IAAY,aAAa,GAAA;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAAqB,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,aAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGpB,UAAA,CAAA;AAA5B,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAAsB,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"sgds-card.js","sources":["../../../src/components/Card/sgds-card.ts"],"sourcesContent":["import { PropertyValueMap } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html, literal } from \"lit/static-html.js\";\nimport { CardElement } from \"../../base/card-element\";\nimport { HasSlotController } from \"../../utils/slot\";\nimport { CardImageAdjustment, CardImagePosition } from \"./types\";\nimport type SgdsLink from \"../Link/sgds-link\";\nimport cardStyle from \"./card.css\";\n\n/**\n * @summary Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.\n * @slot default - The content area of the card, placed directly under the title. Accepts any HTML or custom elements.\n * @slot menu - Accepts an element for an overflow or contextual menu, positioned at the top-right corner of the card. Typically used for action menus or dropdowns.\n * @slot upper - Accepts an element to be displayed above the card content. When used, it overrides image and icon slot content.\n * @slot image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.\n * @slot icon - Accepts an icon element to visually represent the card. Only a single element is allowed to be passed in.\n * @slot subtitle - The subtitle of the card\n * @slot title - The title of the card\n * @slot description - The paragrapher text of the card\n * @slot lower - Accepts any additional content to be displayed below the card description, such as badges, metadata, or supplementary information.\n * @slot footer - Footer area of the card. Accepts links, actions, or any custom content.\n * @slot link - (@deprecated) Deprecated since 3.3.2 in favour of `footer` slot.\n * Legacy slot for anchor elements. Use `footer` instead.\n */\nexport class SgdsCard extends CardElement {\n static styles = [...CardElement.styles, cardStyle];\n\n @queryAssignedElements({ slot: \"footer\" })\n private footerNode!: HTMLElement[];\n @queryAssignedElements({ slot: \"link\" })\n private linkNode!: HTMLAnchorElement[] | SgdsLink[];\n\n /** Sets the image position of the card. Available options: `before`, `after` */\n @property({ type: String, reflect: true }) imagePosition: CardImagePosition = \"before\";\n\n /** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */\n @property({ type: String, reflect: true }) imageAdjustment: CardImageAdjustment = \"default\";\n\n /** Used only for SSR to indicate the presence of the `image` slot. */\n @property({ type: Boolean }) hasImageSlot = false;\n\n /** Used only for SSR to indicate the presence of the `icon` slot. */\n @property({ type: Boolean }) hasIconSlot = false;\n\n /** Used only for SSR to indicate the presence of the `upper` slot. */\n @property({ type: Boolean }) hasUpperSlot = false;\n\n private get linkSlotItems(): HTMLAnchorElement | null {\n if (!this.linkNode || this.linkNode.length === 0) return null;\n const element = this.linkNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private get footerSlotItems(): HTMLAnchorElement | null {\n if (!this.footerNode || this.footerNode.length === 0) return null;\n const element = this.footerNode[0] as HTMLElement;\n return (element.querySelector(\"a\") || element) as HTMLAnchorElement;\n }\n\n private readonly hasSlotController = new HasSlotController(this, \"image\", \"icon\", \"upper\");\n\n protected firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n if (this.stretchedLink) {\n const footerAnchor = this.footerSlotItems;\n const linkAnchor = this.linkSlotItems;\n this._forwardAnchorAttributes(footerAnchor?.href ? footerAnchor : linkAnchor);\n }\n }\n\n updated() {\n if (!this.hasImageSlot) this.hasImageSlot = this.hasSlotController.test(\"image\");\n if (!this.hasIconSlot) this.hasIconSlot = this.hasSlotController.test(\"icon\");\n if (!this.hasUpperSlot) this.hasUpperSlot = this.hasSlotController.test(\"upper\");\n }\n\n handleImgSlotChange(e: Event) {\n const childNodes = (e.target as HTMLSlotElement).assignedNodes({ flatten: true }) as Array<HTMLOrSVGImageElement>;\n\n if (childNodes.length > 1) {\n console.error(\"Multiple elements passed into SgdsCard's image slot\");\n }\n\n if (this.hasSlotController.test(\"image\") && this.hasSlotController.test(\"icon\")) {\n console.error(\"Both image and icon slots cannot be used together in SgdsCard\");\n }\n }\n\n render() {\n const tag = this.stretchedLink ? literal`a` : literal`div`;\n const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;\n\n return html`\n <${tag}\n class=\"card ${classMap({\n disabled: this.disabled\n })}\"\n tabindex=${cardTabIndex}\n >\n <div class=\"card-tinted-bg\"></div>\n \n <slot name=\"menu\"></slot>\n <div class=${classMap({\n \"card-image\": this.hasImageSlot,\n \"card-media\": this.hasIconSlot || this.hasUpperSlot\n })}>\n <slot name=\"upper\">\n <slot name=\"image\" @slotchange=${this.handleImgSlotChange}></slot>\n <slot name=\"icon\"></slot>\n </slot>\n </div>\n\n <div class=\"card-body\">\n <div class=\"card-header-container\">\n <div class=\"card-header\">\n <slot name=\"subtitle\"></slot>\n <h3 class=\"card-title\"><slot name=\"title\" @slotchange=${this.handleTitleSlotChange}></slot></h3>\n </div>\n <slot></slot>\n </div>\n <slot name=\"description\"></slot>\n <slot name=\"lower\"></slot>\n <slot name=\"footer\">\n <slot name=\"link\" @slotchange=${this.warnLinkSlotMisused}></slot>\n </slot>\n </div>\n </${tag}>\n `;\n }\n}\n\nexport default SgdsCard;\n"],"names":["cardStyle"],"mappings":";;;;;;;;AAUA;;;;;;;;;;;;;;AAcG;AACG,MAAO,QAAS,SAAQ,WAAW,CAAA;AAAzC,IAAA,WAAA,GAAA;;;QAS6C,IAAa,CAAA,aAAA,GAAsB,QAAQ,CAAC;;QAG5C,IAAe,CAAA,eAAA,GAAwB,SAAS,CAAC;;QAG/D,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;;QAGrB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;;QAGpB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AAcjC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,E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A,CAAA,CAAA,CAAA;AAGpB,UAAA,CAAA;AAA5B,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAAsB,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -78,7 +78,7 @@ function Ge(e){return(t,i)=>je(t,i,{async get(){return await this.updateComplete
78
78
  * @license
79
79
  * Copyright 2020 Google LLC
80
80
  * SPDX-License-Identifier: BSD-3-Clause
81
- */const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return L}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),L}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],At=["bottom","top"];function Lt(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:At;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ai(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Li=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...Lt(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);max-width:var(--sgds-dimension-320);min-width:var(--sgds-dimension-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,zi=we`.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)}`,Di=we`.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)}`,Ui=we`.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)}`;const Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Le,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Le.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),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(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(this))}async firstUpdated(e){super.firstUpdated(e),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(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_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(e,t,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;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 Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=st(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ai(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Li(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")})}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter(e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden"))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter(e=>!e.disabled&&!e.hidden)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class el extends(qi(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
81
+ */const st=()=>new nt;class nt{}const rt=new WeakMap;const ct=te(class extends ot{render(e){return L}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),L}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=rt.get(t);void 0===i&&(i=new WeakMap,rt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?rt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),dt=["top","right","bottom","left"],ht=Math.min,vt=Math.max,ut=Math.round,pt=Math.floor,gt=e=>({x:e,y:e}),ft={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function wt(e,t,i){return vt(e,ht(t,i))}function bt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Zt(e){return"y"===e?"height":"width"}const _t=new Set(["top","bottom"]);function Mt(e){return _t.has(xt(e))?"y":"x"}function Vt(e){return Ct(Mt(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=yt(e),a=Vt(e),o=Zt(a);let s="x"===a?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Et(s)),[s,Et(s)]}function Ht(e){return e.replace(/start|end/g,e=>mt[e])}const $t=["left","right"],St=["right","left"],Bt=["top","bottom"],At=["bottom","top"];function Lt(e,t,i,l){const a=yt(e);let o=function(e,t,i){switch(e){case"top":case"bottom":return i?t?St:$t:t?$t:St;case"left":case"right":return t?Bt:At;default:return[]}}(xt(e),"start"===i,l);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(Ht)))),o}function Et(e){return e.replace(/left|right|bottom|top/g,e=>ft[e])}function It(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){const{x:t,y:i,width:l,height:a}=e;return{width:l,height:a,top:i,left:t,right:t+l,bottom:i+a,x:t,y:i}}function Pt(e,t,i){let{reference:l,floating:a}=e;const o=Mt(t),s=Vt(t),n=Zt(s),r=xt(t),c="y"===o,d=l.x+l.width/2-a.width/2,h=l.y+l.height/2-a.height/2,v=l[n]/2-a[n]/2;let u;switch(r){case"top":u={x:d,y:l.y-a.height};break;case"bottom":u={x:d,y:l.y+l.height};break;case"right":u={x:l.x+l.width,y:h};break;case"left":u={x:l.x-a.width,y:h};break;default:u={x:l.x,y:l.y}}switch(yt(t)){case"start":u[s]-=v*(i&&c?-1:1);break;case"end":u[s]+=v*(i&&c?-1:1)}return u}async function Rt(e,t){var i;void 0===t&&(t={});const{x:l,y:a,platform:o,rects:s,elements:n,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:v=!1,padding:u=0}=bt(t,e),p=It(u),g=n[v?"floating"===h?"reference":"floating":h],f=Tt(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(g)))||i?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(n.floating)),boundary:c,rootBoundary:d,strategy:r})),m="floating"===h?{x:l,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(n.floating)),b=await(null==o.isElement?void 0:o.isElement(w))&&await(null==o.getScale?void 0:o.getScale(w))||{x:1,y:1},x=Tt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:n,rect:m,offsetParent:w,strategy:r}):m);return{top:(f.top-x.top+p.top)/b.y,bottom:(x.bottom-f.bottom+p.bottom)/b.y,left:(f.left-x.left+p.left)/b.x,right:(x.right-f.right+p.right)/b.x}}function Ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zt(e){return dt.some(t=>e[t]>=0)}const Dt=new Set(["left","top"]);function Ut(){return"undefined"!=typeof window}function Ft(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Wt(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qt(e){return!!Ut()&&(e instanceof Node||e instanceof Nt(e).Node)}function jt(e){return!!Ut()&&(e instanceof Element||e instanceof Nt(e).Element)}function Kt(e){return!!Ut()&&(e instanceof HTMLElement||e instanceof Nt(e).HTMLElement)}function Gt(e){return!(!Ut()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot)}const Jt=new Set(["inline","contents"]);function Xt(e){const{overflow:t,overflowX:i,overflowY:l,display:a}=ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!Jt.has(a)}const Yt=new Set(["table","td","th"]);function Qt(e){return Yt.has(Ft(e))}const ei=[":popover-open",":modal"];function ti(e){return ei.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ii=["transform","translate","scale","rotate","perspective"],li=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function oi(e){const t=si(),i=jt(e)?ci(e):e;return ii.some(e=>!!i[e]&&"none"!==i[e])||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||li.some(e=>(i.willChange||"").includes(e))||ai.some(e=>(i.contain||"").includes(e))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ni=new Set(["html","body","#document"]);function ri(e){return ni.has(Ft(e))}function ci(e){return Nt(e).getComputedStyle(e)}function di(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Ft(e))return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||Wt(e);return Gt(t)?t.host:t}function vi(e){const t=hi(e);return ri(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&Xt(t)?t:vi(t)}function ui(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const a=vi(e),o=a===(null==(l=e.ownerDocument)?void 0:l.body),s=Nt(a);if(o){const e=pi(s);return t.concat(s,s.visualViewport||[],Xt(a)?a:[],e&&i?ui(e):[])}return t.concat(a,ui(a,[],i))}function pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gi(e){const t=ci(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const a=Kt(e),o=a?e.offsetWidth:i,s=a?e.offsetHeight:l,n=ut(i)!==o||ut(l)!==s;return n&&(i=o,l=s),{width:i,height:l,$:n}}function fi(e){return jt(e)?e:e.contextElement}function mi(e){const t=fi(e);if(!Kt(t))return gt(1);const i=t.getBoundingClientRect(),{width:l,height:a,$:o}=gi(t);let s=(o?ut(i.width):i.width)/l,n=(o?ut(i.height):i.height)/a;return s&&Number.isFinite(s)||(s=1),n&&Number.isFinite(n)||(n=1),{x:s,y:n}}const wi=gt(0);function bi(e){const t=Nt(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function xi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const a=e.getBoundingClientRect(),o=fi(e);let s=gt(1);t&&(l?jt(l)&&(s=mi(l)):s=mi(e));const n=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Nt(e))&&t}(o,i,l)?bi(o):gt(0);let r=(a.left+n.x)/s.x,c=(a.top+n.y)/s.y,d=a.width/s.x,h=a.height/s.y;if(o){const e=Nt(o),t=l&&jt(l)?Nt(l):l;let i=e,a=pi(i);for(;a&&l&&t!==i;){const e=mi(a),t=a.getBoundingClientRect(),l=ci(a),o=t.left+(a.clientLeft+parseFloat(l.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(l.paddingTop))*e.y;r*=e.x,c*=e.y,d*=e.x,h*=e.y,r+=o,c+=s,i=Nt(a),a=pi(i)}}return Tt({width:d,height:h,x:r,y:c})}function yi(e,t){const i=di(e).scrollLeft;return t?t.left+i:xi(Wt(e)).left+i}function Ci(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-yi(e,i),y:i.top+t.scrollTop}}const Zi=new Set(["absolute","fixed"]);function _i(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Nt(e),l=Wt(e),a=i.visualViewport;let o=l.clientWidth,s=l.clientHeight,n=0,r=0;if(a){o=a.width,s=a.height;const e=si();(!e||e&&"fixed"===t)&&(n=a.offsetLeft,r=a.offsetTop)}const c=yi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,s=Math.abs(l.clientWidth-t.clientWidth-a);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:n,y:r}}(e,i);else if("document"===t)l=function(e){const t=Wt(e),i=di(e),l=e.ownerDocument.body,a=vt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),o=vt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let s=-i.scrollLeft+yi(e);const n=-i.scrollTop;return"rtl"===ci(l).direction&&(s+=vt(t.clientWidth,l.clientWidth)-a),{width:a,height:o,x:s,y:n}}(Wt(e));else if(jt(t))l=function(e,t){const i=xi(e,!0,"fixed"===t),l=i.top+e.clientTop,a=i.left+e.clientLeft,o=Kt(e)?mi(e):gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:l*o.y}}(t,i);else{const i=bi(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tt(l)}function Mi(e,t){const i=hi(e);return!(i===t||!jt(i)||ri(i))&&("fixed"===ci(i).position||Mi(i,t))}function Vi(e,t,i){const l=Kt(t),a=Wt(t),o="fixed"===i,s=xi(e,!0,o,t);let n={scrollLeft:0,scrollTop:0};const r=gt(0);function c(){r.x=yi(a)}if(l||!l&&!o)if(("body"!==Ft(t)||Xt(a))&&(n=di(t)),l){const e=xi(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else a&&c();o&&!l&&a&&c();const d=!a||l||o?gt(0):Ci(a,n);return{x:s.left+n.scrollLeft-r.x-d.x,y:s.top+n.scrollTop-r.y-d.y,width:s.width,height:s.height}}function ki(e){return"static"===ci(e).position}function Hi(e,t){if(!Kt(e)||"fixed"===ci(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Wt(e)===i&&(i=i.ownerDocument.body),i}function $i(e,t){const i=Nt(e);if(ti(e))return i;if(!Kt(e)){let t=hi(e);for(;t&&!ri(t);){if(jt(t)&&!ki(t))return t;t=hi(t)}return i}let l=Hi(e,t);for(;l&&Qt(l)&&ki(l);)l=Hi(l,t);return l&&ri(l)&&ki(l)&&!oi(l)?i:l||function(e){let t=hi(e);for(;Kt(t)&&!ri(t);){if(oi(t))return t;if(ti(t))return null;t=hi(t)}return null}(e)||i}const Si={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:a}=e;const o="fixed"===a,s=Wt(l),n=!!t&&ti(t.floating);if(l===s||n&&o)return i;let r={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),h=Kt(l);if((h||!h&&!o)&&(("body"!==Ft(l)||Xt(s))&&(r=di(l)),Kt(l))){const e=xi(l);c=mi(l),d.x=e.x+l.clientLeft,d.y=e.y+l.clientTop}const v=!s||h||o?gt(0):Ci(s,r);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-r.scrollLeft*c.x+d.x+v.x,y:i.y*c.y-r.scrollTop*c.y+d.y+v.y}},getDocumentElement:Wt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:a}=e;const o=[..."clippingAncestors"===i?ti(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=ui(e,[],!1).filter(e=>jt(e)&&"body"!==Ft(e)),a=null;const o="fixed"===ci(e).position;let s=o?hi(e):e;for(;jt(s)&&!ri(s);){const t=ci(s),i=oi(s);i||"fixed"!==t.position||(a=null),(o?!i&&!a:!i&&"static"===t.position&&a&&Zi.has(a.position)||Xt(s)&&!i&&Mi(e,s))?l=l.filter(e=>e!==s):a=t,s=hi(s)}return t.set(e,l),l}(t,this._c):[].concat(i),l],s=o[0],n=o.reduce((e,i)=>{const l=_i(t,i,a);return e.top=vt(l.top,e.top),e.right=ht(l.right,e.right),e.bottom=ht(l.bottom,e.bottom),e.left=vt(l.left,e.left),e},_i(t,s,a));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:$i,getElementRects:async function(e){const t=this.getOffsetParent||$i,i=this.getDimensions,l=await i(e.floating);return{reference:Vi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=gi(e);return{width:t,height:i}},getScale:mi,isElement:jt,isRTL:function(e){return"rtl"===ci(e).direction}};function Bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ai(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:r=!1}=l,c=fi(e),d=a||o?[...c?ui(c):[],...ui(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",i,{passive:!0}),o&&e.addEventListener("resize",i)});const h=c&&n?function(e,t){let i,l=null;const a=Wt(e);function o(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function s(n,r){void 0===n&&(n=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:v,height:u}=c;if(n||t(),!v||!u)return;const p={rootMargin:-pt(h)+"px "+-pt(a.clientWidth-(d+v))+"px "+-pt(a.clientHeight-(h+u))+"px "+-pt(d)+"px",threshold:vt(0,ht(1,r))||1};let g=!0;function f(t){const l=t[0].intersectionRatio;if(l!==r){if(!g)return s();l?s(!1,l):i=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==l||Bi(c,e.getBoundingClientRect())||s(),g=!1}try{l=new IntersectionObserver(f,{...p,root:a.ownerDocument})}catch(e){l=new IntersectionObserver(f,p)}l.observe(e)}(!0),o}(c,i):null;let v,u=-1,p=null;s&&(p=new ResizeObserver(e=>{let[l]=e;l&&l.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),i()}),c&&!r&&p.observe(c),p.observe(t));let g=r?xi(e):null;return r&&function t(){const l=xi(e);g&&!Bi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",i),o&&e.removeEventListener("resize",i)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,r&&cancelAnimationFrame(v)}}const Li=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:a,y:o,placement:s,middlewareData:n}=t,r=await async function(e,t){const{placement:i,platform:l,elements:a}=e,o=await(null==l.isRTL?void 0:l.isRTL(a.floating)),s=xt(i),n=yt(i),r="y"===Mt(i),c=Dt.has(s)?-1:1,d=o&&r?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return n&&"number"==typeof p&&(u="end"===n?-1*p:p),r?{x:u*d,y:v*c}:{x:v*c,y:u*d}}(t,e);return s===(null==(i=n.offset)?void 0:i.placement)&&null!=(l=n.arrow)&&l.alignmentOffset?{}:{x:a+r.x,y:o+r.y,data:{...r,placement:s}}}}},Ei=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:n={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...r}=bt(e,t),c={x:i,y:l},d=await Rt(t,r),h=Mt(xt(a)),v=Ct(h);let u=c[v],p=c[h];if(o){const e="y"===v?"bottom":"right";u=wt(u+d["y"===v?"top":"left"],u,u-d[e])}if(s){const e="y"===h?"bottom":"right";p=wt(p+d["y"===h?"top":"left"],p,p-d[e])}const g=n.fn({...t,[v]:u,[h]:p});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:o,[h]:s}}}}}},Ii=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:a,middlewareData:o,rects:s,initialPlacement:n,platform:r,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...f}=bt(e,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const m=xt(a),w=Mt(n),b=xt(n)===n,x=await(null==r.isRTL?void 0:r.isRTL(c.floating)),y=v||(b||!g?[Et(n)]:function(e){const t=Et(e);return[Ht(e),t,Ht(t)]}(n)),C="none"!==p;!v&&C&&y.push(...Lt(n,g,p,x));const Z=[n,...y],_=await Rt(t,f),M=[];let V=(null==(l=o.flip)?void 0:l.overflows)||[];if(d&&M.push(_[m]),h){const e=kt(a,s,x);M.push(_[e[0]],_[e[1]])}if(V=[...V,{placement:a,overflows:M}],!M.every(e=>e<=0)){var k,H;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=Z[e];if(t){if(!("alignment"===h&&w!==Mt(t))||V.every(e=>Mt(e.placement)!==w||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let i=null==(H=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:H.placement;if(!i)switch(u){case"bestFit":{var $;const e=null==($=V.filter(e=>{if(C){const t=Mt(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=n}if(a!==i)return{reset:{placement:i}}}return{}}}},Ti=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var i,l;const{placement:a,rects:o,platform:s,elements:n}=t,{apply:r=()=>{},...c}=bt(e,t),d=await Rt(t,c),h=xt(a),v=yt(a),u="y"===Mt(a),{width:p,height:g}=o.floating;let f,m;"top"===h||"bottom"===h?(f=h,m=v===(await(null==s.isRTL?void 0:s.isRTL(n.floating))?"start":"end")?"left":"right"):(m=h,f="end"===v?"top":"bottom");const w=g-d.top-d.bottom,b=p-d.left-d.right,x=ht(g-d[f],w),y=ht(p-d[m],b),C=!t.middlewareData.shift;let Z=x,_=y;if(null!=(i=t.middlewareData.shift)&&i.enabled.x&&(_=b),null!=(l=t.middlewareData.shift)&&l.enabled.y&&(Z=w),C&&!v){const e=vt(d.left,0),t=vt(d.right,0),i=vt(d.top,0),l=vt(d.bottom,0);u?_=p-2*(0!==e||0!==t?e+t:vt(d.left,d.right)):Z=g-2*(0!==i||0!==l?i+l:vt(d.top,d.bottom))}await r({...t,availableWidth:_,availableHeight:Z});const M=await s.getDimensions(n.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},Pi=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:i}=t,{strategy:l="referenceHidden",...a}=bt(e,t);switch(l){case"referenceHidden":{const e=Ot(await Rt(t,{...a,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zt(e)}}}case"escaped":{const e=Ot(await Rt(t,{...a,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:zt(e)}}}default:return{}}}}},Ri=(e,t,i)=>{const l=new Map,a={platform:Si,...i},o={...a.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:a="absolute",middleware:o=[],platform:s}=i,n=o.filter(Boolean),r=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:h}=Pt(c,l,r),v=l,u={},p=0;for(let i=0;i<n.length;i++){const{name:o,fn:g}=n[i],{x:f,y:m,data:w,reset:b}=await g({x:d,y:h,initialPlacement:l,placement:v,strategy:a,middlewareData:u,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=f?f:d,h=null!=m?m:h,u={...u,[o]:{...u[o],...w}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(v=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:d,y:h}=Pt(c,v,r))),i=-1)}return{x:d,y:h,placement:v,strategy:a,middlewareData:u}})(e,t,{...a,platform:o})};var Oi=we`:host([menuisopen]:not([disabled]):not([readonly])) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-192);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:var(--sgds-z-index-floating)}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,zi=we`.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)}`,Di=we`.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)}`,Ui=we`.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)}`;const Fi=(e="value")=>(t,i)=>{const l=t.constructor,a=l.prototype.attributeChangedCallback;l.prototype.attributeChangedCallback=function(t,o,s){var n;const r=l.getPropertyOptions(e);if(t===("string"==typeof r.attribute?r.attribute:e).toLowerCase()){const t=r.converter||Le,l=("function"==typeof t?t:null!==(n=null==t?void 0:t.fromAttribute)&&void 0!==n?n:Le.fromAttribute)(s,r.type);this[e]!==l&&(this[i]=l)}a.call(this,t,o,s)}};function Ni(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}class Wi{constructor(e,t){(this.host=e).addController(this),this._internals=e._internals||this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",e=>this.handleInvalid(e))}hostDisconnected(){this.host.removeEventListener("invalid",e=>this.handleInvalid(e))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),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(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const qi=t=>{class i extends t{constructor(...e){super(...e),this._isTouched=!1,this._internals=this.attachInternals()}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new Wi(this))}async firstUpdated(e){super.firstUpdated(e),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(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this._mixinShouldSkipSgdsValidation()||this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this._mixinShouldSkipSgdsValidation()||(this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1))}_mixinValidate(e){this._mixinShouldSkipSgdsValidation()||this.inputValidationController.validateInput(e)}_mixinSetFormValue(){const e=this.value;this._internals.setFormValue(e)}_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(e,t,i){if(!this._mixinShouldSkipSgdsValidation())return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([Ge("sgds-input")],i.prototype,"sgdsInput",void 0),e([Ge("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var ji=we`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;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 Ki extends Oe{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(l){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach(e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}Ki.styles=[ji],Ki.dependencies={},e([We({type:Boolean,reflect:!0})],Ki.prototype,"ssr",void 0);class Gi extends Ki{constructor(){super(...arguments),this.myDropdown=st(),this.dropdownMenuId=Ni("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=st(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ai(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),a=e.map(e=>{const a=i(e),o=l.indexOf(a);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>i(e)===i(t))));return a}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Li(8),this.noFlip?void 0:Ii(),Ei()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:a,y:o,strategy:s,placement:n}=await Ri(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",n),Object.assign(this.menuRef.value.style,{position:s,left:`${a}px`,top:`${o}px`})}}e([We({type:Boolean,state:!0})],Gi.prototype,"noFlip",void 0),e([We({type:Boolean,reflect:!0,state:!0})],Gi.prototype,"menuAlignRight",void 0),e([We({type:String,reflect:!0,state:!0})],Gi.prototype,"drop",void 0),e([We({type:Object})],Gi.prototype,"floatingOpts",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"menuIsOpen",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"disabled",void 0),e([We({type:Boolean,reflect:!0})],Gi.prototype,"readonly",void 0);class Ji extends Gi{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;const l=e.target;l.disabled||(this.emit("sgds-select",{detail:{item:l}}),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach(e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")})}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter(e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden"))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter(e=>!e.disabled&&!e.hidden)}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach(e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()})}}var Xi,Yi;Ji.styles=Gi.styles,e([(Xi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Xi)??null;if(null===i&&Yi&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Ke("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Xi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(Yi){const{get:a,set:o}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return je(e,t,{get(){let e=a.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return je(e,t,{get(){return l(this)}})})],Ji.prototype,"menu",void 0),e([qe()],Ji.prototype,"nextDropdownItemNo",void 0),e([qe()],Ji.prototype,"prevDropdownItemNo",void 0),e([We({type:Boolean,reflect:!0})],Ji.prototype,"hidden",void 0);var Qi=we`.empty-menu,.loading-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px);pointer-events:none}.loading-menu{align-items:center;display:flex;gap:var(--sgds-gap-xs)}`;class el extends(qi(Ji)){constructor(){super(),this.label="",this.hintText="",this.autofocus=!1,this.disabled=!1,this.required=!1,this.loading=!1,this.value="",this.displayValue="",this.defaultValue="",this.hasFeedback=!1,this.invalidFeedback="",this.invalid=!1,this.menuList=[],this.selectedItems=[],this.filteredList=[],this._isTouched=!1,this._controlId=Ni("input"),this._labelId=Ni("label"),this.floatingOpts={middleware:[Ti({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})]}}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",async e=>{var t;const i=this.constructor.childName,l=(null===(t=e.relatedTarget)||void 0===t?void 0:t.tagName.toLowerCase())===i;this.invalid=!l&&!this._mixinReportValidity()})}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_renderFeedback(){return this.invalid&&this.hasFeedback?S` <div class="invalid-feedback-container">
82
82
  <slot name="invalidIcon">
83
83
  <sgds-icon name="exclamation-circle-fill" size="md"></sgds-icon>
84
84
  </slot>