@ni/fast-foundation 0.0.2
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.
- package/README.md +58 -0
- package/dist/dts/accordion/accordion.d.ts +65 -0
- package/dist/dts/accordion/accordion.template.d.ts +8 -0
- package/dist/dts/accordion/index.d.ts +2 -0
- package/dist/dts/accordion-item/accordion-item.d.ts +76 -0
- package/dist/dts/accordion-item/accordion-item.template.d.ts +8 -0
- package/dist/dts/accordion-item/index.d.ts +2 -0
- package/dist/dts/anchor/anchor.d.ts +128 -0
- package/dist/dts/anchor/anchor.template.d.ts +8 -0
- package/dist/dts/anchor/index.d.ts +2 -0
- package/dist/dts/anchored-region/anchored-region-config.d.ts +117 -0
- package/dist/dts/anchored-region/anchored-region.d.ts +389 -0
- package/dist/dts/anchored-region/anchored-region.template.d.ts +8 -0
- package/dist/dts/anchored-region/index.d.ts +3 -0
- package/dist/dts/avatar/avatar.d.ts +62 -0
- package/dist/dts/avatar/avatar.template.d.ts +8 -0
- package/dist/dts/avatar/index.d.ts +2 -0
- package/dist/dts/badge/badge.d.ts +36 -0
- package/dist/dts/badge/badge.template.d.ts +8 -0
- package/dist/dts/badge/index.d.ts +2 -0
- package/dist/dts/breadcrumb/breadcrumb.d.ts +27 -0
- package/dist/dts/breadcrumb/breadcrumb.template.d.ts +8 -0
- package/dist/dts/breadcrumb/index.d.ts +2 -0
- package/dist/dts/breadcrumb-item/breadcrumb-item.d.ts +36 -0
- package/dist/dts/breadcrumb-item/breadcrumb-item.template.d.ts +8 -0
- package/dist/dts/breadcrumb-item/index.d.ts +2 -0
- package/dist/dts/button/button.d.ts +167 -0
- package/dist/dts/button/button.form-associated.d.ts +16 -0
- package/dist/dts/button/button.template.d.ts +8 -0
- package/dist/dts/button/index.d.ts +2 -0
- package/dist/dts/calendar/calendar.d.ts +178 -0
- package/dist/dts/calendar/calendar.template.d.ts +58 -0
- package/dist/dts/calendar/date-formatter.d.ts +124 -0
- package/dist/dts/calendar/index.d.ts +3 -0
- package/dist/dts/card/card.d.ts +10 -0
- package/dist/dts/card/card.template.d.ts +8 -0
- package/dist/dts/card/index.d.ts +2 -0
- package/dist/dts/checkbox/checkbox.d.ts +58 -0
- package/dist/dts/checkbox/checkbox.form-associated.d.ts +16 -0
- package/dist/dts/checkbox/checkbox.template.d.ts +8 -0
- package/dist/dts/checkbox/index.d.ts +2 -0
- package/dist/dts/combobox/combobox.d.ts +341 -0
- package/dist/dts/combobox/combobox.form-associated.d.ts +16 -0
- package/dist/dts/combobox/combobox.options.d.ts +15 -0
- package/dist/dts/combobox/combobox.template.d.ts +8 -0
- package/dist/dts/combobox/index.d.ts +3 -0
- package/dist/dts/data-grid/data-grid-cell.d.ts +62 -0
- package/dist/dts/data-grid/data-grid-cell.template.d.ts +9 -0
- package/dist/dts/data-grid/data-grid-row.d.ts +119 -0
- package/dist/dts/data-grid/data-grid-row.template.d.ts +10 -0
- package/dist/dts/data-grid/data-grid.d.ts +218 -0
- package/dist/dts/data-grid/data-grid.options.d.ts +49 -0
- package/dist/dts/data-grid/data-grid.template.d.ts +10 -0
- package/dist/dts/data-grid/index.d.ts +6 -0
- package/dist/dts/design-system/component-presentation.d.ts +66 -0
- package/dist/dts/design-system/design-system.d.ts +104 -0
- package/dist/dts/design-system/index.d.ts +3 -0
- package/dist/dts/design-system/registration-context.d.ts +106 -0
- package/dist/dts/design-token/custom-property-manager.d.ts +35 -0
- package/dist/dts/design-token/design-token.d.ts +139 -0
- package/dist/dts/design-token/interfaces.d.ts +31 -0
- package/dist/dts/di/di.d.ts +858 -0
- package/dist/dts/di/index.d.ts +1 -0
- package/dist/dts/dialog/dialog.d.ts +153 -0
- package/dist/dts/dialog/dialog.template.d.ts +8 -0
- package/dist/dts/dialog/index.d.ts +2 -0
- package/dist/dts/directives/reflect-attributes.d.ts +18 -0
- package/dist/dts/disclosure/disclosure.d.ts +59 -0
- package/dist/dts/disclosure/disclosure.template.d.ts +8 -0
- package/dist/dts/disclosure/index.d.ts +2 -0
- package/dist/dts/divider/divider.d.ts +28 -0
- package/dist/dts/divider/divider.options.d.ts +19 -0
- package/dist/dts/divider/divider.template.d.ts +8 -0
- package/dist/dts/divider/index.d.ts +2 -0
- package/dist/dts/flipper/flipper.d.ts +57 -0
- package/dist/dts/flipper/flipper.options.d.ts +13 -0
- package/dist/dts/flipper/flipper.template.d.ts +8 -0
- package/dist/dts/flipper/index.d.ts +2 -0
- package/dist/dts/form-associated/form-associated.d.ts +177 -0
- package/dist/dts/form-associated/index.d.ts +1 -0
- package/dist/dts/foundation-element/foundation-element.d.ts +120 -0
- package/dist/dts/foundation-element/index.d.ts +1 -0
- package/dist/dts/horizontal-scroll/horizontal-scroll.d.ts +242 -0
- package/dist/dts/horizontal-scroll/horizontal-scroll.template.d.ts +7 -0
- package/dist/dts/horizontal-scroll/index.d.ts +2 -0
- package/dist/dts/index-rollup.d.ts +2 -0
- package/dist/dts/index.d.ts +53 -0
- package/dist/dts/interfaces.d.ts +4 -0
- package/dist/dts/listbox/index.d.ts +3 -0
- package/dist/dts/listbox/listbox.d.ts +314 -0
- package/dist/dts/listbox/listbox.element.d.ts +223 -0
- package/dist/dts/listbox/listbox.template.d.ts +8 -0
- package/dist/dts/listbox-option/index.d.ts +2 -0
- package/dist/dts/listbox-option/listbox-option.d.ts +176 -0
- package/dist/dts/listbox-option/listbox-option.template.d.ts +8 -0
- package/dist/dts/menu/index.d.ts +2 -0
- package/dist/dts/menu/menu.d.ts +78 -0
- package/dist/dts/menu/menu.template.d.ts +8 -0
- package/dist/dts/menu-item/index.d.ts +2 -0
- package/dist/dts/menu-item/menu-item.d.ts +160 -0
- package/dist/dts/menu-item/menu-item.options.d.ts +29 -0
- package/dist/dts/menu-item/menu-item.template.d.ts +10 -0
- package/dist/dts/number-field/index.d.ts +2 -0
- package/dist/dts/number-field/number-field.d.ts +227 -0
- package/dist/dts/number-field/number-field.form-associated.d.ts +16 -0
- package/dist/dts/number-field/number-field.template.d.ts +8 -0
- package/dist/dts/patterns/aria-global.d.ts +189 -0
- package/dist/dts/patterns/index.d.ts +2 -0
- package/dist/dts/patterns/start-end.d.ts +65 -0
- package/dist/dts/picker/index.d.ts +10 -0
- package/dist/dts/picker/picker-list-item.d.ts +38 -0
- package/dist/dts/picker/picker-list-item.template.d.ts +8 -0
- package/dist/dts/picker/picker-list.d.ts +8 -0
- package/dist/dts/picker/picker-list.template.d.ts +8 -0
- package/dist/dts/picker/picker-menu-option.d.ts +37 -0
- package/dist/dts/picker/picker-menu-option.template.d.ts +8 -0
- package/dist/dts/picker/picker-menu.d.ts +46 -0
- package/dist/dts/picker/picker-menu.template.d.ts +8 -0
- package/dist/dts/picker/picker.d.ts +390 -0
- package/dist/dts/picker/picker.form-associated.d.ts +16 -0
- package/dist/dts/picker/picker.template.d.ts +8 -0
- package/dist/dts/progress/base-progress.d.ts +71 -0
- package/dist/dts/progress/index.d.ts +2 -0
- package/dist/dts/progress/progress.template.d.ts +8 -0
- package/dist/dts/progress-ring/index.d.ts +1 -0
- package/dist/dts/progress-ring/progress-ring.template.d.ts +8 -0
- package/dist/dts/radio/index.d.ts +2 -0
- package/dist/dts/radio/radio.d.ts +70 -0
- package/dist/dts/radio/radio.form-associated.d.ts +16 -0
- package/dist/dts/radio/radio.template.d.ts +8 -0
- package/dist/dts/radio-group/index.d.ts +2 -0
- package/dist/dts/radio-group/radio-group.d.ts +101 -0
- package/dist/dts/radio-group/radio-group.template.d.ts +8 -0
- package/dist/dts/search/index.d.ts +2 -0
- package/dist/dts/search/search.d.ts +162 -0
- package/dist/dts/search/search.form-associated.d.ts +16 -0
- package/dist/dts/search/search.template.d.ts +8 -0
- package/dist/dts/select/index.d.ts +3 -0
- package/dist/dts/select/select.d.ts +289 -0
- package/dist/dts/select/select.form-associated.d.ts +16 -0
- package/dist/dts/select/select.options.d.ts +13 -0
- package/dist/dts/select/select.template.d.ts +8 -0
- package/dist/dts/skeleton/index.d.ts +2 -0
- package/dist/dts/skeleton/skeleton.d.ts +47 -0
- package/dist/dts/skeleton/skeleton.template.d.ts +8 -0
- package/dist/dts/slider/index.d.ts +2 -0
- package/dist/dts/slider/slider-utilities.d.ts +5 -0
- package/dist/dts/slider/slider.d.ts +230 -0
- package/dist/dts/slider/slider.form-associated.d.ts +16 -0
- package/dist/dts/slider/slider.template.d.ts +8 -0
- package/dist/dts/slider-label/index.d.ts +2 -0
- package/dist/dts/slider-label/slider-label.d.ts +81 -0
- package/dist/dts/slider-label/slider-label.template.d.ts +8 -0
- package/dist/dts/switch/index.d.ts +2 -0
- package/dist/dts/switch/switch.d.ts +60 -0
- package/dist/dts/switch/switch.form-associated.d.ts +16 -0
- package/dist/dts/switch/switch.template.d.ts +8 -0
- package/dist/dts/tab/index.d.ts +2 -0
- package/dist/dts/tab/tab.d.ts +17 -0
- package/dist/dts/tab/tab.template.d.ts +8 -0
- package/dist/dts/tab-panel/index.d.ts +2 -0
- package/dist/dts/tab-panel/tab-panel.d.ts +10 -0
- package/dist/dts/tab-panel/tab-panel.template.d.ts +8 -0
- package/dist/dts/tabs/index.d.ts +2 -0
- package/dist/dts/tabs/tabs.d.ts +140 -0
- package/dist/dts/tabs/tabs.template.d.ts +8 -0
- package/dist/dts/test-utilities/fixture.d.ts +89 -0
- package/dist/dts/test-utilities/timeout.d.ts +4 -0
- package/dist/dts/text-area/index.d.ts +2 -0
- package/dist/dts/text-area/text-area.d.ts +149 -0
- package/dist/dts/text-area/text-area.form-associated.d.ts +16 -0
- package/dist/dts/text-area/text-area.options.d.ts +27 -0
- package/dist/dts/text-area/text-area.template.d.ts +8 -0
- package/dist/dts/text-field/index.d.ts +2 -0
- package/dist/dts/text-field/text-field.d.ts +166 -0
- package/dist/dts/text-field/text-field.form-associated.d.ts +16 -0
- package/dist/dts/text-field/text-field.options.d.ts +31 -0
- package/dist/dts/text-field/text-field.template.d.ts +8 -0
- package/dist/dts/toolbar/index.d.ts +2 -0
- package/dist/dts/toolbar/toolbar.d.ts +167 -0
- package/dist/dts/toolbar/toolbar.template.d.ts +9 -0
- package/dist/dts/tooltip/index.d.ts +2 -0
- package/dist/dts/tooltip/tooltip.d.ts +239 -0
- package/dist/dts/tooltip/tooltip.options.d.ts +69 -0
- package/dist/dts/tooltip/tooltip.template.d.ts +8 -0
- package/dist/dts/tree-item/index.d.ts +2 -0
- package/dist/dts/tree-item/tree-item.d.ts +141 -0
- package/dist/dts/tree-item/tree-item.template.d.ts +8 -0
- package/dist/dts/tree-view/index.d.ts +2 -0
- package/dist/dts/tree-view/tree-view.d.ts +99 -0
- package/dist/dts/tree-view/tree-view.template.d.ts +8 -0
- package/dist/dts/utilities/apply-mixins.d.ts +6 -0
- package/dist/dts/utilities/composed-contains.d.ts +12 -0
- package/dist/dts/utilities/composed-parent.d.ts +10 -0
- package/dist/dts/utilities/direction.d.ts +7 -0
- package/dist/dts/utilities/index.d.ts +8 -0
- package/dist/dts/utilities/intersection-service.d.ts +30 -0
- package/dist/dts/utilities/match-media-stylesheet-behavior.d.ts +124 -0
- package/dist/dts/utilities/property-stylesheet-behavior.d.ts +38 -0
- package/dist/dts/utilities/resize-observer.d.ts +31 -0
- package/dist/dts/utilities/root-active-element.d.ts +1 -0
- package/dist/dts/utilities/style/disabled.d.ts +5 -0
- package/dist/dts/utilities/style/display.d.ts +17 -0
- package/dist/dts/utilities/style/focus.d.ts +8 -0
- package/dist/dts/utilities/style/index.d.ts +3 -0
- package/dist/dts/utilities/whitespace-filter.d.ts +9 -0
- package/dist/esm/accordion/accordion.js +185 -0
- package/dist/esm/accordion/accordion.template.js +11 -0
- package/dist/esm/accordion/index.js +2 -0
- package/dist/esm/accordion-item/accordion-item.js +72 -0
- package/dist/esm/accordion-item/accordion-item.template.js +49 -0
- package/dist/esm/accordion-item/index.js +2 -0
- package/dist/esm/anchor/anchor.js +85 -0
- package/dist/esm/anchor/anchor.template.js +47 -0
- package/dist/esm/anchor/index.js +2 -0
- package/dist/esm/anchored-region/anchored-region-config.js +59 -0
- package/dist/esm/anchored-region/anchored-region.js +964 -0
- package/dist/esm/anchored-region/anchored-region.template.js +12 -0
- package/dist/esm/anchored-region/index.js +3 -0
- package/dist/esm/avatar/avatar.js +39 -0
- package/dist/esm/avatar/avatar.template.js +23 -0
- package/dist/esm/avatar/index.js +2 -0
- package/dist/esm/badge/badge.js +40 -0
- package/dist/esm/badge/badge.template.js +12 -0
- package/dist/esm/badge/index.js +2 -0
- package/dist/esm/breadcrumb/breadcrumb.js +70 -0
- package/dist/esm/breadcrumb/breadcrumb.template.js +14 -0
- package/dist/esm/breadcrumb/index.js +2 -0
- package/dist/esm/breadcrumb-item/breadcrumb-item.js +23 -0
- package/dist/esm/breadcrumb-item/breadcrumb-item.template.js +24 -0
- package/dist/esm/breadcrumb-item/index.js +2 -0
- package/dist/esm/button/button.form-associated.js +15 -0
- package/dist/esm/button/button.js +183 -0
- package/dist/esm/button/button.template.js +51 -0
- package/dist/esm/button/index.js +2 -0
- package/dist/esm/calendar/calendar.js +280 -0
- package/dist/esm/calendar/calendar.template.js +191 -0
- package/dist/esm/calendar/date-formatter.js +144 -0
- package/dist/esm/calendar/index.js +3 -0
- package/dist/esm/card/card.js +10 -0
- package/dist/esm/card/card.template.js +8 -0
- package/dist/esm/card/index.js +2 -0
- package/dist/esm/checkbox/checkbox.form-associated.js +15 -0
- package/dist/esm/checkbox/checkbox.js +75 -0
- package/dist/esm/checkbox/checkbox.template.js +35 -0
- package/dist/esm/checkbox/index.js +2 -0
- package/dist/esm/combobox/combobox.form-associated.js +15 -0
- package/dist/esm/combobox/combobox.js +587 -0
- package/dist/esm/combobox/combobox.options.js +10 -0
- package/dist/esm/combobox/combobox.template.js +66 -0
- package/dist/esm/combobox/index.js +3 -0
- package/dist/esm/data-grid/data-grid-cell.js +229 -0
- package/dist/esm/data-grid/data-grid-cell.template.js +23 -0
- package/dist/esm/data-grid/data-grid-row.js +203 -0
- package/dist/esm/data-grid/data-grid-row.template.js +47 -0
- package/dist/esm/data-grid/data-grid.js +440 -0
- package/dist/esm/data-grid/data-grid.options.js +31 -0
- package/dist/esm/data-grid/data-grid.template.js +36 -0
- package/dist/esm/data-grid/index.js +6 -0
- package/dist/esm/design-system/component-presentation.js +86 -0
- package/dist/esm/design-system/design-system.js +207 -0
- package/dist/esm/design-system/index.js +3 -0
- package/dist/esm/design-system/registration-context.js +1 -0
- package/dist/esm/design-token/custom-property-manager.js +216 -0
- package/dist/esm/design-token/design-token.js +657 -0
- package/dist/esm/design-token/interfaces.js +1 -0
- package/dist/esm/di/di.js +1341 -0
- package/dist/esm/di/index.js +1 -0
- package/dist/esm/dialog/dialog.js +280 -0
- package/dist/esm/dialog/dialog.template.js +30 -0
- package/dist/esm/dialog/index.js +2 -0
- package/dist/esm/directives/reflect-attributes.js +88 -0
- package/dist/esm/disclosure/disclosure.js +72 -0
- package/dist/esm/disclosure/disclosure.template.js +20 -0
- package/dist/esm/disclosure/index.js +2 -0
- package/dist/esm/divider/divider.js +39 -0
- package/dist/esm/divider/divider.options.js +14 -0
- package/dist/esm/divider/divider.template.js +8 -0
- package/dist/esm/divider/index.js +2 -0
- package/dist/esm/flipper/flipper.js +65 -0
- package/dist/esm/flipper/flipper.options.js +8 -0
- package/dist/esm/flipper/flipper.template.js +30 -0
- package/dist/esm/flipper/index.js +2 -0
- package/dist/esm/form-associated/form-associated.js +464 -0
- package/dist/esm/form-associated/index.js +1 -0
- package/dist/esm/foundation-element/foundation-element.js +132 -0
- package/dist/esm/foundation-element/index.js +1 -0
- package/dist/esm/horizontal-scroll/horizontal-scroll.js +380 -0
- package/dist/esm/horizontal-scroll/horizontal-scroll.template.js +62 -0
- package/dist/esm/horizontal-scroll/index.js +2 -0
- package/dist/esm/index-rollup.js +2 -0
- package/dist/esm/index.js +54 -0
- package/dist/esm/interfaces.js +1 -0
- package/dist/esm/listbox/index.js +3 -0
- package/dist/esm/listbox/listbox.element.js +448 -0
- package/dist/esm/listbox/listbox.js +528 -0
- package/dist/esm/listbox/listbox.template.js +27 -0
- package/dist/esm/listbox-option/index.js +2 -0
- package/dist/esm/listbox-option/listbox-option.js +200 -0
- package/dist/esm/listbox-option/listbox-option.template.js +25 -0
- package/dist/esm/menu/index.js +2 -0
- package/dist/esm/menu/menu.js +290 -0
- package/dist/esm/menu/menu.template.js +15 -0
- package/dist/esm/menu-item/index.js +2 -0
- package/dist/esm/menu-item/menu-item.js +251 -0
- package/dist/esm/menu-item/menu-item.options.js +26 -0
- package/dist/esm/menu-item/menu-item.template.js +78 -0
- package/dist/esm/number-field/index.js +2 -0
- package/dist/esm/number-field/number-field.form-associated.js +15 -0
- package/dist/esm/number-field/number-field.js +288 -0
- package/dist/esm/number-field/number-field.template.js +84 -0
- package/dist/esm/patterns/aria-global.js +70 -0
- package/dist/esm/patterns/index.js +2 -0
- package/dist/esm/patterns/start-end.js +84 -0
- package/dist/esm/picker/index.js +10 -0
- package/dist/esm/picker/picker-list-item.js +71 -0
- package/dist/esm/picker/picker-list-item.template.js +17 -0
- package/dist/esm/picker/picker-list.js +8 -0
- package/dist/esm/picker/picker-list.template.js +13 -0
- package/dist/esm/picker/picker-menu-option.js +61 -0
- package/dist/esm/picker/picker-menu-option.template.js +16 -0
- package/dist/esm/picker/picker-menu.js +59 -0
- package/dist/esm/picker/picker-menu.template.js +29 -0
- package/dist/esm/picker/picker.form-associated.js +15 -0
- package/dist/esm/picker/picker.js +759 -0
- package/dist/esm/picker/picker.template.js +97 -0
- package/dist/esm/progress/base-progress.js +69 -0
- package/dist/esm/progress/index.js +2 -0
- package/dist/esm/progress/progress.template.js +31 -0
- package/dist/esm/progress-ring/index.js +1 -0
- package/dist/esm/progress-ring/progress-ring.template.js +45 -0
- package/dist/esm/radio/index.js +2 -0
- package/dist/esm/radio/radio.form-associated.js +15 -0
- package/dist/esm/radio/radio.js +108 -0
- package/dist/esm/radio/radio.template.js +31 -0
- package/dist/esm/radio-group/index.js +2 -0
- package/dist/esm/radio-group/radio-group.js +390 -0
- package/dist/esm/radio-group/radio-group.template.js +29 -0
- package/dist/esm/search/index.js +2 -0
- package/dist/esm/search/search.form-associated.js +15 -0
- package/dist/esm/search/search.js +157 -0
- package/dist/esm/search/search.template.js +93 -0
- package/dist/esm/select/index.js +3 -0
- package/dist/esm/select/select.form-associated.js +15 -0
- package/dist/esm/select/select.js +490 -0
- package/dist/esm/select/select.options.js +8 -0
- package/dist/esm/select/select.template.js +72 -0
- package/dist/esm/skeleton/index.js +2 -0
- package/dist/esm/skeleton/skeleton.js +35 -0
- package/dist/esm/skeleton/skeleton.template.js +20 -0
- package/dist/esm/slider/index.js +2 -0
- package/dist/esm/slider/slider-utilities.js +11 -0
- package/dist/esm/slider/slider.form-associated.js +15 -0
- package/dist/esm/slider/slider.js +452 -0
- package/dist/esm/slider/slider.template.js +40 -0
- package/dist/esm/slider-label/index.js +2 -0
- package/dist/esm/slider-label/slider-label.js +158 -0
- package/dist/esm/slider-label/slider-label.template.js +24 -0
- package/dist/esm/switch/index.js +2 -0
- package/dist/esm/switch/switch.form-associated.js +15 -0
- package/dist/esm/switch/switch.js +79 -0
- package/dist/esm/switch/switch.template.js +37 -0
- package/dist/esm/tab/index.js +2 -0
- package/dist/esm/tab/tab.js +15 -0
- package/dist/esm/tab/tab.template.js +10 -0
- package/dist/esm/tab-panel/index.js +2 -0
- package/dist/esm/tab-panel/tab-panel.js +10 -0
- package/dist/esm/tab-panel/tab-panel.template.js +10 -0
- package/dist/esm/tabs/index.js +2 -0
- package/dist/esm/tabs/tabs.js +375 -0
- package/dist/esm/tabs/tabs.template.js +26 -0
- package/dist/esm/test-utilities/fixture.js +90 -0
- package/dist/esm/test-utilities/timeout.js +13 -0
- package/dist/esm/text-area/index.js +2 -0
- package/dist/esm/text-area/text-area.form-associated.js +15 -0
- package/dist/esm/text-area/text-area.js +146 -0
- package/dist/esm/text-area/text-area.options.js +22 -0
- package/dist/esm/text-area/text-area.template.js +64 -0
- package/dist/esm/text-field/index.js +2 -0
- package/dist/esm/text-field/text-field.form-associated.js +15 -0
- package/dist/esm/text-field/text-field.js +183 -0
- package/dist/esm/text-field/text-field.options.js +26 -0
- package/dist/esm/text-field/text-field.template.js +70 -0
- package/dist/esm/toolbar/index.js +2 -0
- package/dist/esm/toolbar/toolbar.js +271 -0
- package/dist/esm/toolbar/toolbar.template.js +37 -0
- package/dist/esm/tooltip/index.js +2 -0
- package/dist/esm/tooltip/tooltip.js +512 -0
- package/dist/esm/tooltip/tooltip.options.js +63 -0
- package/dist/esm/tooltip/tooltip.template.js +32 -0
- package/dist/esm/tree-item/index.js +2 -0
- package/dist/esm/tree-item/tree-item.js +150 -0
- package/dist/esm/tree-item/tree-item.template.js +52 -0
- package/dist/esm/tree-view/index.js +2 -0
- package/dist/esm/tree-view/tree-view.js +268 -0
- package/dist/esm/tree-view/tree-view.template.js +18 -0
- package/dist/esm/utilities/apply-mixins.js +20 -0
- package/dist/esm/utilities/composed-contains.js +22 -0
- package/dist/esm/utilities/composed-parent.js +23 -0
- package/dist/esm/utilities/direction.js +10 -0
- package/dist/esm/utilities/index.js +8 -0
- package/dist/esm/utilities/intersection-service.js +91 -0
- package/dist/esm/utilities/match-media-stylesheet-behavior.js +140 -0
- package/dist/esm/utilities/property-stylesheet-behavior.js +52 -0
- package/dist/esm/utilities/resize-observer.js +5 -0
- package/dist/esm/utilities/root-active-element.js +8 -0
- package/dist/esm/utilities/style/disabled.js +5 -0
- package/dist/esm/utilities/style/display.js +14 -0
- package/dist/esm/utilities/style/focus.js +9 -0
- package/dist/esm/utilities/style/index.js +3 -0
- package/dist/esm/utilities/whitespace-filter.js +13 -0
- package/dist/fast-foundation.d.ts +9744 -0
- package/dist/fast-foundation.js +19097 -0
- package/dist/fast-foundation.min.js +19 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(t){return{}}}();void 0===t.trustedTypes&&(t.trustedTypes={createPolicy:(t,e)=>e});const e={configurable:!1,enumerable:!1,writable:!1};void 0===t.FAST&&Reflect.defineProperty(t,"FAST",Object.assign({value:Object.create(null)},e));const i=t.FAST;if(void 0===i.getById){const t=Object.create(null);Reflect.defineProperty(i,"getById",Object.assign({value(e,i){let s=t[e];return void 0===s&&(s=i?t[e]=i():null),s}},e))}const s=Object.freeze([]);function o(){const t=new WeakMap;return function(e){let i=t.get(e);if(void 0===i){let s=Reflect.getPrototypeOf(e);for(;void 0===i&&null!==s;)i=t.get(s),s=Reflect.getPrototypeOf(s);i=void 0===i?[]:i.slice(0),t.set(e,i)}return i}}const n=t.FAST.getById(1,()=>{const e=[],i=[];function s(){if(i.length)throw i.shift()}function o(t){try{t.call()}catch(t){i.push(t),setTimeout(s,0)}}function n(){let t=0;for(;t<e.length;)if(o(e[t]),t++,t>1024){for(let i=0,s=e.length-t;i<s;i++)e[i]=e[i+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(i){e.length<1&&t.requestAnimationFrame(n),e.push(i)},process:n})}),r=t.trustedTypes.createPolicy("fast-html",{createHTML:t=>t});let a=r;const l="fast-"+Math.random().toString(36).substring(2,8),h=l+"{",d="}"+l,c=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(t){if(a!==r)throw new Error("The HTML policy can only be set once.");a=t},createHTML:t=>a.createHTML(t),isMarker:t=>t&&8===t.nodeType&&t.data.startsWith(l),extractDirectiveIndexFromMarker:t=>parseInt(t.data.replace(l+":","")),createInterpolationPlaceholder:t=>`${h}${t}${d}`,createCustomAttributePlaceholder(t,e){return`${t}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder:t=>`\x3c!--${l}:${t}--\x3e`,queueUpdate:n.enqueue,processUpdates:n.process,nextUpdate:()=>new Promise(n.enqueue),setAttribute(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)},setBooleanAttribute(t,e,i){i?t.setAttribute(e,""):t.removeAttribute(e)},removeChildNodes(t){for(let e=t.firstChild;null!==e;e=t.firstChild)t.removeChild(e)},createTemplateWalker:t=>document.createTreeWalker(t,133,null,!1)});class u{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return void 0===this.spillover?this.sub1===t||this.sub2===t:-1!==this.spillover.indexOf(t)}subscribe(t){const e=this.spillover;if(void 0===e){if(this.has(t))return;if(void 0===this.sub1)return void(this.sub1=t);if(void 0===this.sub2)return void(this.sub2=t);this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else{-1===e.indexOf(t)&&e.push(t)}}unsubscribe(t){const e=this.spillover;if(void 0===e)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}notify(t){const e=this.spillover,i=this.source;if(void 0===e){const e=this.sub1,s=this.sub2;void 0!==e&&e.handleChange(i,t),void 0!==s&&s.handleChange(i,t)}else for(let s=0,o=e.length;s<o;++s)e[s].handleChange(i,t)}}class p{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;const i=this.subscribers[t];void 0!==i&&i.notify(t),null===(e=this.sourceSubscribers)||void 0===e||e.notify(t)}subscribe(t,e){var i;if(e){let i=this.subscribers[e];void 0===i&&(this.subscribers[e]=i=new u(this.source)),i.subscribe(t)}else this.sourceSubscribers=null!==(i=this.sourceSubscribers)&&void 0!==i?i:new u(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var i;if(e){const i=this.subscribers[e];void 0!==i&&i.unsubscribe(t)}else null===(i=this.sourceSubscribers)||void 0===i||i.unsubscribe(t)}}const m=i.getById(2,()=>{const t=/(:|&&|\|\||if)/,e=new WeakMap,i=c.queueUpdate;let s=void 0,n=t=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function r(t){let i=t.$fastController||e.get(t);return void 0===i&&(Array.isArray(t)?i=n(t):e.set(t,i=new p(t))),i}const a=o();class l{constructor(t){this.name=t,this.field="_"+t,this.callback=t+"Changed"}getValue(t){return void 0!==s&&s.watch(t,this.name),t[this.field]}setValue(t,e){const i=this.field,s=t[i];if(s!==e){t[i]=e;const o=t[this.callback];"function"==typeof o&&o.call(t,s,e),r(t).notify(this.name)}}}class h extends u{constructor(t,e,i=!1){super(t,e),this.binding=t,this.isVolatileBinding=i,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(t,e){this.needsRefresh&&null!==this.last&&this.disconnect();const i=s;s=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(t,e);return s=i,o}disconnect(){if(null!==this.last){let t=this.first;for(;void 0!==t;)t.notifier.unsubscribe(this,t.propertyName),t=t.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(t,e){const i=this.last,o=r(t),n=null===i?this.first:{};if(n.propertySource=t,n.propertyName=e,n.notifier=o,o.subscribe(this,e),null!==i){if(!this.needsRefresh){let e;s=void 0,e=i.propertySource[i.propertyName],s=this,t===e&&(this.needsRefresh=!0)}i.next=n}this.last=n}handleChange(){this.needsQueue&&(this.needsQueue=!1,i(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let t=this.first;return{next:()=>{const e=t;return void 0===e?{value:void 0,done:!0}:(t=t.next,{value:e,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(t){n=t},getNotifier:r,track(t,e){void 0!==s&&s.watch(t,e)},trackVolatile(){void 0!==s&&(s.needsRefresh=!0)},notify(t,e){r(t).notify(e)},defineProperty(t,e){"string"==typeof e&&(e=new l(e)),a(t).push(e),Reflect.defineProperty(t,e.name,{enumerable:!0,get:function(){return e.getValue(this)},set:function(t){e.setValue(this,t)}})},getAccessors:a,binding(t,e,i=this.isVolatileBinding(t)){return new h(t,e,i)},isVolatileBinding:e=>t.test(e.toString())})});function v(t,e){m.defineProperty(t,e)}function f(t,e,i){return Object.assign({},i,{get:function(){return m.trackVolatile(),i.get.apply(this)}})}const g=i.getById(3,()=>{let t=null;return{get:()=>t,set(e){t=e}}});class b{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return g.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){g.set(t)}}m.defineProperty(b.prototype,"index"),m.defineProperty(b.prototype,"length");const y=Object.seal(new b);class C{constructor(){this.targetIndex=0}}class x extends C{constructor(){super(...arguments),this.createPlaceholder=c.createInterpolationPlaceholder}}class w extends C{constructor(t,e,i){super(),this.name=t,this.behavior=e,this.options=i}createPlaceholder(t){return c.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}}function $(t,e){this.source=t,this.context=e,null===this.bindingObserver&&(this.bindingObserver=m.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(t,e))}function k(t,e){this.source=t,this.context=e,this.target.addEventListener(this.targetName,this)}function I(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function E(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}function T(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function O(t){c.setAttribute(this.target,this.targetName,t)}function S(t){c.setBooleanAttribute(this.target,this.targetName,t)}function R(t){if(null==t&&(t=""),t.create){this.target.textContent="";let e=this.target.$fastView;void 0===e?e=t.create():this.target.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),e=t.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=t)}else{const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=t}}function A(t){this.target[this.targetName]=t}function D(t){const e=this.classVersions||Object.create(null),i=this.target;let s=this.version||0;if(null!=t&&t.length){const o=t.split(/\s+/);for(let t=0,n=o.length;t<n;++t){const n=o[t];""!==n&&(e[n]=s,i.classList.add(n))}}if(this.classVersions=e,this.version=s+1,0!==s){s-=1;for(const t in e)e[t]===s&&i.classList.remove(t)}}class F extends x{constructor(t){super(),this.binding=t,this.bind=$,this.unbind=I,this.updateTarget=O,this.isBindingVolatile=m.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,void 0!==t)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=A,"innerHTML"===this.cleanedTargetName){const t=this.binding;this.binding=(e,i)=>c.createHTML(t(e,i))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=S;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=k,this.unbind=T;break;default:this.cleanedTargetName=t,"class"===t&&(this.updateTarget=D)}}targetAtContent(){this.updateTarget=R,this.unbind=E}createBehavior(t){return new L(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class L{constructor(t,e,i,s,o,n,r){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=i,this.bind=s,this.unbind=o,this.updateTarget=n,this.targetName=r}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){b.setEvent(t);const e=this.binding(this.source,this.context);b.setEvent(null),!0!==e&&t.preventDefault()}}let P=null;class M{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){P=this}static borrow(t){const e=P||new M;return e.directives=t,e.reset(),P=null,e}}function V(t){if(1===t.length)return t[0];let e;const i=t.length,s=t.map(t=>"string"==typeof t?()=>t:(e=t.targetName||e,t.binding)),o=new F((t,e)=>{let o="";for(let n=0;n<i;++n)o+=s[n](t,e);return o});return o.targetName=e,o}const H=d.length;function z(t,e){const i=e.split(h);if(1===i.length)return null;const s=[];for(let e=0,o=i.length;e<o;++e){const o=i[e],n=o.indexOf(d);let r;if(-1===n)r=o;else{const e=parseInt(o.substring(0,n));s.push(t.directives[e]),r=o.substring(n+H)}""!==r&&s.push(r)}return s}function N(t,e,i=!1){const s=e.attributes;for(let o=0,n=s.length;o<n;++o){const r=s[o],a=r.value,l=z(t,a);let h=null;null===l?i&&(h=new F(()=>a),h.targetName=r.name):h=V(l),null!==h&&(e.removeAttributeNode(r),o--,n--,t.addFactory(h))}}function B(t,e,i){const s=z(t,e.textContent);if(null!==s){let o=e;for(let n=0,r=s.length;n<r;++n){const r=s[n],a=0===n?e:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof r?a.textContent=r:(a.textContent=" ",t.captureContentBinding(r)),o=a,t.targetIndex++,a!==e&&i.nextNode()}t.targetIndex--}}function U(t,e){const i=t.content;document.adoptNode(i);const s=M.borrow(e);N(s,t,!0);const o=s.behaviorFactories;s.reset();const n=c.createTemplateWalker(i);let r;for(;r=n.nextNode();)switch(s.targetIndex++,r.nodeType){case 1:N(s,r);break;case 3:B(s,r,n);break;case 8:c.isMarker(r)&&s.addFactory(e[c.extractDirectiveIndexFromMarker(r)])}let a=0;(c.isMarker(i.firstChild)||1===i.childNodes.length&&e.length)&&(i.insertBefore(document.createComment(""),i.firstChild),a=-1);const l=s.behaviorFactories;return s.release(),{fragment:i,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}const q=document.createRange();class j{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const i=t.parentNode;let s,o=this.firstChild;for(;o!==e;)s=o.nextSibling,i.insertBefore(o,t),o=s;i.insertBefore(e,t)}}remove(){const t=this.fragment,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.appendChild(s),s=i;t.appendChild(e)}dispose(){const t=this.firstChild.parentNode,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.removeChild(s),s=i;t.removeChild(e);const o=this.behaviors,n=this.source;for(let t=0,e=o.length;t<e;++t)o[t].unbind(n)}bind(t,e){const i=this.behaviors;if(this.source!==t)if(null!==this.source){const s=this.source;this.source=t,this.context=e;for(let o=0,n=i.length;o<n;++o){const n=i[o];n.unbind(s),n.bind(t,e)}}else{this.source=t,this.context=e;for(let s=0,o=i.length;s<o;++s)i[s].bind(t,e)}}unbind(){if(null===this.source)return;const t=this.behaviors,e=this.source;for(let i=0,s=t.length;i<s;++i)t[i].unbind(e);this.source=null}static disposeContiguousBatch(t){if(0!==t.length){q.setStartBefore(t[0].firstChild),q.setEndAfter(t[t.length-1].lastChild),q.deleteContents();for(let e=0,i=t.length;e<i;++e){const i=t[e],s=i.behaviors,o=i.source;for(let t=0,e=s.length;t<e;++t)s[t].unbind(o)}}}}class _{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(null===this.fragment){let t;const e=this.html;if("string"==typeof e){t=document.createElement("template"),t.innerHTML=c.createHTML(e);const i=t.content.firstElementChild;null!==i&&"TEMPLATE"===i.tagName&&(t=i)}else t=e;const i=U(t,this.directives);this.fragment=i.fragment,this.viewBehaviorFactories=i.viewBehaviorFactories,this.hostBehaviorFactories=i.hostBehaviorFactories,this.targetOffset=i.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const e=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,s=new Array(this.behaviorCount),o=c.createTemplateWalker(e);let n=0,r=this.targetOffset,a=o.nextNode();for(let t=i.length;n<t;++n){const t=i[n],e=t.targetIndex;for(;null!==a;){if(r===e){s[n]=t.createBehavior(a);break}a=o.nextNode(),r++}}if(this.hasHostBehaviors){const e=this.hostBehaviorFactories;for(let i=0,o=e.length;i<o;++i,++n)s[n]=e[i].createBehavior(t)}return new j(e,s)}render(t,e,i){"string"==typeof e&&(e=document.getElementById(e)),void 0===i&&(i=e);const s=this.create(i);return s.bind(t,y),s.appendTo(e),s}}const W=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function K(t,...e){const i=[];let s="";for(let o=0,n=t.length-1;o<n;++o){const n=t[o];let r=e[o];if(s+=n,r instanceof _){const t=r;r=()=>t}if("function"==typeof r&&(r=new F(r)),r instanceof x){const t=W.exec(n);null!==t&&(r.targetName=t[2])}r instanceof C?(s+=r.createPlaceholder(i.length),i.push(r)):s+=r}return s+=t[t.length-1],new _(s,i)}class Y{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=null===this.behaviors?t:this.behaviors.concat(t),this}}function X(t){return t.map(t=>t instanceof Y?X(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function G(t){return t.map(t=>t instanceof Y?t.behaviors:null).reduce((t,e)=>null===e?t:(null===t&&(t=[]),t.concat(e)),null)}Y.create=(()=>{if(c.supportsAdoptedStyleSheets){const t=new Map;return e=>new et(e,t)}return t=>new st(t)})();const Q=Symbol("prependToAdoptedStyleSheets");function Z(t){const e=[],i=[];return t.forEach(t=>(t[Q]?e:i).push(t)),{prepend:e,append:i}}let J=(t,e)=>{const{prepend:i,append:s}=Z(e);t.adoptedStyleSheets=[...i,...t.adoptedStyleSheets,...s]},tt=(t,e)=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter(t=>-1===e.indexOf(t))};if(c.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),J=(t,e)=>{const{prepend:i,append:s}=Z(e);t.adoptedStyleSheets.splice(0,0,...i),t.adoptedStyleSheets.push(...s)},tt=(t,e)=>{for(const i of e){const e=t.adoptedStyleSheets.indexOf(i);-1!==e&&t.adoptedStyleSheets.splice(e,1)}}}catch(t){}class et extends Y{get styleSheets(){if(void 0===this._styleSheets){const t=this.styles,e=this.styleSheetCache;this._styleSheets=X(t).map(t=>{if(t instanceof CSSStyleSheet)return t;let i=e.get(t);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(t),e.set(t,i)),i})}return this._styleSheets}constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=G(t)}addStylesTo(t){J(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){tt(t,this.styleSheets),super.removeStylesFrom(t)}}let it=0;class st extends Y{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=G(t),this.styleSheets=X(t),this.styleClass="fast-style-class-"+ ++it}addStylesTo(t){const e=this.styleSheets,i=this.styleClass;t=this.normalizeTarget(t);for(let s=0;s<e.length;s++){const o=document.createElement("style");o.innerHTML=e[s],o.className=i,t.append(o)}super.addStylesTo(t)}removeStylesFrom(t){const e=(t=this.normalizeTarget(t)).querySelectorAll("."+this.styleClass);for(let i=0,s=e.length;i<s;++i)t.removeChild(e[i]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}}const ot=Object.freeze({locate:o()}),nt={toView:t=>t?"true":"false",fromView:t=>null!=t&&"false"!==t&&!1!==t&&0!==t},rt={toView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e.toString()},fromView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e}};class at{constructor(t,e,i=e.toLowerCase(),s="reflect",o){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=i,this.mode=s,this.converter=o,this.fieldName="_"+e,this.callbackName=e+"Changed",this.hasCallback=this.callbackName in t.prototype,"boolean"===s&&void 0===o&&(this.converter=nt)}setValue(t,e){const i=t[this.fieldName],s=this.converter;void 0!==s&&(e=s.fromView(e)),i!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](i,e),t.$fastController.notify(this.name))}getValue(t){return m.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,i=this.guards;i.has(t)||"fromView"===e||c.queueUpdate(()=>{i.add(t);const s=t[this.fieldName];switch(e){case"reflect":const e=this.converter;c.setAttribute(t,this.attribute,void 0!==e?e.toView(s):s);break;case"boolean":c.setBooleanAttribute(t,this.attribute,s)}i.delete(t)})}static collect(t,...e){const i=[];e.push(ot.locate(t));for(let s=0,o=e.length;s<o;++s){const o=e[s];if(void 0!==o)for(let e=0,s=o.length;e<s;++e){const s=o[e];"string"==typeof s?i.push(new at(t,s)):i.push(new at(t,s.property,s.attribute,s.mode,s.converter))}}return i}}function lt(t,e){let i;function s(t,e){arguments.length>1&&(i.property=e),ot.locate(t.constructor).push(i)}return arguments.length>1?(i={},void s(t,e)):(i=void 0===t?{}:t,s)}const ht={mode:"open"},dt={},ct=i.getById(4,()=>{const t=new Map;return Object.freeze({register:e=>!t.has(e.type)&&(t.set(e.type,e),!0),getByType:e=>t.get(e)})});class ut{get isDefined(){return!!ct.getByType(this.type)}constructor(t,e=t.definition){"string"==typeof e&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;const i=at.collect(t,e.attributes),s=new Array(i.length),o={},n={};for(let t=0,e=i.length;t<e;++t){const e=i[t];s[t]=e.attribute,o[e.name]=e,n[e.attribute]=e}this.attributes=i,this.observedAttributes=s,this.propertyLookup=o,this.attributeLookup=n,this.shadowOptions=void 0===e.shadowOptions?ht:null===e.shadowOptions?void 0:Object.assign(Object.assign({},ht),e.shadowOptions),this.elementOptions=void 0===e.elementOptions?dt:Object.assign(Object.assign({},dt),e.elementOptions),this.styles=void 0===e.styles?void 0:Array.isArray(e.styles)?Y.create(e.styles):e.styles instanceof Y?e.styles:Y.create([e.styles])}define(t=customElements){const e=this.type;if(ct.register(this)){const t=this.attributes,i=e.prototype;for(let e=0,s=t.length;e<s;++e)m.defineProperty(i,t[e]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}}ut.forType=ct.getByType;const pt=new WeakMap,mt={bubbles:!0,composed:!0,cancelable:!0};function vt(t){return t.shadowRoot||pt.get(t)||null}class ft extends p{get isConnected(){return m.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,m.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=t,this.needsInitialization||null===t||this.addStyles(t))}constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;const i=e.shadowOptions;if(void 0!==i){const e=t.attachShadow(i);"closed"===i.mode&&pt.set(t,e)}const s=m.getAccessors(t);if(s.length>0){const e=this.boundObservables=Object.create(null);for(let i=0,o=s.length;i<o;++i){const o=s[i].name,n=t[o];void 0!==n&&(delete t[o],e[o]=n)}}}addStyles(t){const e=vt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){const i=t.behaviors;t.addStylesTo(e),null!==i&&this.addBehaviors(i)}}removeStyles(t){const e=vt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){const i=t.behaviors;t.removeStylesFrom(e),null!==i&&this.removeBehaviors(i)}}addBehaviors(t){const e=this.behaviors||(this.behaviors=new Map),i=t.length,s=[];for(let o=0;o<i;++o){const i=t[o];e.has(i)?e.set(i,e.get(i)+1):(e.set(i,1),s.push(i))}if(this._isConnected){const t=this.element;for(let e=0;e<s.length;++e)s[e].bind(t,y)}}removeBehaviors(t,e=!1){const i=this.behaviors;if(null===i)return;const s=t.length,o=[];for(let n=0;n<s;++n){const s=t[n];if(i.has(s)){const t=i.get(s)-1;0===t||e?i.delete(s)&&o.push(s):i.set(s,t)}}if(this._isConnected){const t=this.element;for(let e=0;e<o.length;++e)o[e].unbind(t)}}onConnectedCallback(){if(this._isConnected)return;const t=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(t,y);const e=this.behaviors;if(null!==e)for(const[i]of e)i.bind(t,y);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const t=this.view;null!==t&&t.unbind();const e=this.behaviors;if(null!==e){const t=this.element;for(const[i]of e)i.unbind(t)}}onAttributeChangedCallback(t,e,i){const s=this.definition.attributeLookup[t];void 0!==s&&s.onAttributeChangedCallback(this.element,i)}emit(t,e,i){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},mt),i)))}finishInitialization(){const t=this.element,e=this.boundObservables;if(null!==e){const i=Object.keys(e);for(let s=0,o=i.length;s<o;++s){const o=i[s];t[o]=e[o]}this.boundObservables=null}const i=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){const e=this.element,i=vt(e)||e;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||c.removeChildNodes(i),t&&(this.view=t.render(e,i,e))}static forCustomElement(t){const e=t.$fastController;if(void 0!==e)return e;const i=ut.forType(t.constructor);if(void 0===i)throw new Error("Missing FASTElement definition.");return t.$fastController=new ft(t,i)}}function gt(t){return class extends t{constructor(){super(),ft.forCustomElement(this)}$emit(t,e,i){return this.$fastController.emit(t,e,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,i){this.$fastController.onAttributeChangedCallback(t,e,i)}}}const bt=Object.assign(gt(HTMLElement),{from:t=>gt(t),define:(t,e)=>new ut(t,e).define().type});function yt(t){return function(e){new ut(e,t).define()}}class Ct{createCSS(){return""}createBehavior(){}}function xt(t,e){const i=[];let s="";const o=[];for(let n=0,r=t.length-1;n<r;++n){s+=t[n];let r=e[n];if(r instanceof Ct){const t=r.createBehavior();r=r.createCSS(),t&&o.push(t)}r instanceof Y||r instanceof CSSStyleSheet?(""!==s.trim()&&(i.push(s),s=""),i.push(r)):s+=r}return s+=t[t.length-1],""!==s.trim()&&i.push(s),{styles:i,behaviors:o}}function wt(t,...e){const{styles:i,behaviors:s}=xt(t,e),o=Y.create(i);return s.length&&o.withBehaviors(...s),o}class $t extends Ct{constructor(t,e){super(),this.behaviors=e,this.css="";const i=t.reduce((t,e)=>("string"==typeof e?this.css+=e:t.push(e),t),[]);i.length&&(this.styles=Y.create(i))}createBehavior(){return this}createCSS(){return this.css}bind(t){this.styles&&t.$fastController.addStyles(this.styles),this.behaviors.length&&t.$fastController.addBehaviors(this.behaviors)}unbind(t){this.styles&&t.$fastController.removeStyles(this.styles),this.behaviors.length&&t.$fastController.removeBehaviors(this.behaviors)}}function kt(t,...e){const{styles:i,behaviors:s}=xt(t,e);return new $t(i,s)}function It(t,e,i){return{index:t,removed:e,addedCount:i}}function Et(t,e,i,o,n,r){let a=0,l=0;const h=Math.min(i-e,r-n);if(0===e&&0===n&&(a=function(t,e,i){for(let s=0;s<i;++s)if(t[s]!==e[s])return s;return i}(t,o,h)),i===t.length&&r===o.length&&(l=function(t,e,i){let s=t.length,o=e.length,n=0;for(;n<i&&t[--s]===e[--o];)n++;return n}(t,o,h-a)),n+=a,r-=l,(i-=l)-(e+=a)==0&&r-n==0)return s;if(e===i){const t=It(e,[],0);for(;n<r;)t.removed.push(o[n++]);return[t]}if(n===r)return[It(e,[],i-e)];const d=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i];const o=[];for(;e>0||i>0;){if(0===e){o.push(2),i--;continue}if(0===i){o.push(3),e--;continue}const n=t[e-1][i-1],r=t[e-1][i],a=t[e][i-1];let l;l=r<a?r<n?r:n:a<n?a:n,l===n?(n===s?o.push(0):(o.push(1),s=n),e--,i--):l===r?(o.push(3),e--,s=r):(o.push(2),i--,s=a)}return o.reverse(),o}(function(t,e,i,s,o,n){const r=n-o+1,a=i-e+1,l=new Array(r);let h,d;for(let t=0;t<r;++t)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;++t)l[0][t]=t;for(let i=1;i<r;++i)for(let n=1;n<a;++n)t[e+n-1]===s[o+i-1]?l[i][n]=l[i-1][n-1]:(h=l[i-1][n]+1,d=l[i][n-1]+1,l[i][n]=h<d?h:d);return l}(t,e,i,o,n,r)),c=[];let u=void 0,p=e,m=n;for(let t=0;t<d.length;++t)switch(d[t]){case 0:void 0!==u&&(c.push(u),u=void 0),p++,m++;break;case 1:void 0===u&&(u=It(p,[],0)),u.addedCount++,p++,u.removed.push(o[m]),m++;break;case 2:void 0===u&&(u=It(p,[],0)),u.addedCount++,p++;break;case 3:void 0===u&&(u=It(p,[],0)),u.removed.push(o[m]),m++}return void 0!==u&&c.push(u),c}const Tt=Array.prototype.push;function Ot(t,e,i,s){const o=It(e,i,s);let n=!1,r=0;for(let e=0;e<t.length;e++){const i=t[e];if(i.index+=r,n)continue;const s=(a=o.index,l=o.index+o.removed.length,h=i.index,d=i.index+i.addedCount,l<h||d<a?-1:l===h||d===a?0:a<h?l<d?l-h:d-h:d<l?d-a:l-a);if(s>=0){t.splice(e,1),e--,r-=i.addedCount-i.removed.length,o.addedCount+=i.addedCount-s;const a=o.removed.length+i.removed.length-s;if(o.addedCount||a){let t=i.removed;if(o.index<i.index){const e=o.removed.slice(0,i.index-o.index);Tt.apply(e,t),t=e}if(o.index+o.removed.length>i.index+i.addedCount){const e=o.removed.slice(i.index+i.addedCount-o.index);Tt.apply(t,e)}o.removed=t,i.index<o.index&&(o.index=i.index)}else n=!0}else if(o.index<i.index){n=!0,t.splice(e,0,o),e++;const s=o.addedCount-o.removed.length;i.index+=s,r+=s}}var a,l,h,d;n||t.push(o)}function St(t,e){let i=[];const s=function(t){const e=[];for(let i=0,s=t.length;i<s;i++){const s=t[i];Ot(e,s.index,s.removed,s.addedCount)}return e}(e);for(let e=0,o=s.length;e<o;++e){const o=s[e];1!==o.addedCount||1!==o.removed.length?i=i.concat(Et(t,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==t[o.index]&&i.push(o)}return i}let Rt=!1;function At(t,e){let i=t.index;const s=e.length;return i>s?i=s-t.addedCount:i<0&&(i=s+t.removed.length+i-t.addedCount),i<0&&(i=0),t.index=i,t}class Dt extends u{constructor(t){super(t),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(t,"$fastController",{value:this,enumerable:!1})}subscribe(t){this.flush(),super.subscribe(t)}addSplice(t){void 0===this.splices?this.splices=[t]:this.splices.push(t),this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}reset(t){this.oldCollection=t,this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}flush(){const t=this.splices,e=this.oldCollection;if(void 0===t&&void 0===e)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===e?St(this.source,t):Et(this.source,0,this.source.length,e,0,e.length);this.notify(i)}}function Ft(){if(Rt)return;Rt=!0,m.setArrayObserverFactory(t=>new Dt(t));const t=Array.prototype;if(t.$fastPatch)return;Reflect.defineProperty(t,"$fastPatch",{value:1,enumerable:!1});const e=t.pop,i=t.push,s=t.reverse,o=t.shift,n=t.sort,r=t.splice,a=t.unshift;t.pop=function(){const t=this.length>0,i=e.apply(this,arguments),s=this.$fastController;return void 0!==s&&t&&s.addSplice(It(this.length,[i],0)),i},t.push=function(){const t=i.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(It(this.length-arguments.length,[],arguments.length),this)),t},t.reverse=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=s.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.shift=function(){const t=this.length>0,e=o.apply(this,arguments),i=this.$fastController;return void 0!==i&&t&&i.addSplice(It(0,[e],0)),e},t.sort=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=n.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.splice=function(){const t=r.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(It(+arguments[0],t,arguments.length>2?arguments.length-2:0),this)),t},t.unshift=function(){const t=a.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(It(0,[],arguments.length),this)),t}}class Lt{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}}function Pt(t){return new w("fast-ref",Lt,t)}const Mt=t=>"function"==typeof t,Vt=()=>null;function Ht(t){return void 0===t?Vt:Mt(t)?t:()=>t}function zt(t,e,i){const s=Mt(t)?t:()=>t,o=Ht(e),n=Ht(i);return(t,e)=>s(t,e)?o(t,e):n(t,e)}const Nt=Object.freeze({positioning:!1,recycle:!0});function Bt(t,e,i,s){t.bind(e[i],s)}function Ut(t,e,i,s){const o=Object.create(s);o.index=i,o.length=e.length,t.bind(e[i],o)}class qt{constructor(t,e,i,s,o,n){this.location=t,this.itemsBinding=e,this.templateBinding=s,this.options=n,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Bt,this.itemsBindingObserver=m.binding(e,this,i),this.templateBindingObserver=m.binding(s,this,o),n.positioning&&(this.bindView=Ut)}bind(t,e){this.source=t,this.originalContext=e,this.childContext=Object.create(e),this.childContext.parent=t,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(t,this.originalContext),this.template=this.templateBindingObserver.observe(t,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(t,e){t===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):t===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(e)}observeItems(t=!1){if(!this.items)return void(this.items=s);const e=this.itemsObserver,i=this.itemsObserver=m.getNotifier(this.items),o=e!==i;o&&null!==e&&e.unsubscribe(this),(o||t)&&i.subscribe(this)}updateViews(t){const e=this.childContext,i=this.views,s=this.bindView,o=this.items,n=this.template,r=this.options.recycle,a=[];let l=0,h=0;for(let d=0,c=t.length;d<c;++d){const c=t[d],u=c.removed;let p=0,m=c.index;const v=m+c.addedCount,f=i.splice(c.index,u.length),g=h=a.length+f.length;for(;m<v;++m){const t=i[m],d=t?t.firstChild:this.location;let c;r&&h>0?(p<=g&&f.length>0?(c=f[p],p++):(c=a[l],l++),h--):c=n.create(),i.splice(m,0,c),s(c,o,m,e),c.insertBefore(d)}f[p]&&a.push(...f.slice(p))}for(let t=l,e=a.length;t<e;++t)a[t].dispose();if(this.options.positioning)for(let t=0,e=i.length;t<e;++t){const s=i[t].context;s.length=e,s.index=t}}refreshAllViews(t=!1){const e=this.items,i=this.childContext,s=this.template,o=this.location,n=this.bindView;let r=e.length,a=this.views,l=a.length;if(0!==r&&!t&&this.options.recycle||(j.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(r);for(let t=0;t<r;++t){const r=s.create();n(r,e,t,i),a[t]=r,r.insertBefore(o)}}else{let t=0;for(;t<r;++t)if(t<l){n(a[t],e,t,i)}else{const r=s.create();n(r,e,t,i),a.push(r),r.insertBefore(o)}const h=a.splice(t,l-t);for(t=0,r=h.length;t<r;++t)h[t].dispose()}}unbindAllViews(){const t=this.views;for(let e=0,i=t.length;e<i;++e)t[e].unbind()}}class jt extends C{constructor(t,e,i){super(),this.itemsBinding=t,this.templateBinding=e,this.options=i,this.createPlaceholder=c.createBlockPlaceholder,Ft(),this.isItemsBindingVolatile=m.isVolatileBinding(t),this.isTemplateBindingVolatile=m.isVolatileBinding(e)}createBehavior(t){return new qt(t,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function _t(t,e,i=Nt){return new jt(t,"function"==typeof e?e:()=>e,Object.assign(Object.assign({},Nt),i))}function Wt(t){return t?function(e,i,s){return 1===e.nodeType&&e.matches(t)}:function(t,e,i){return 1===t.nodeType}}class Kt{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){const e=this.options.property;this.shouldUpdate=m.getAccessors(t).some(t=>t.name===e),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(s),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return void 0!==this.options.filter&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}}class Yt extends Kt{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function Xt(t){return"string"==typeof t&&(t={property:t}),new w("fast-slotted",Yt,t)}class Gt extends Kt{constructor(t,e){super(t,e),this.observer=null,e.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function Qt(t){return"string"==typeof t&&(t={property:t}),new w("fast-children",Gt,t)}class Zt{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const Jt=(t,e)=>K`<span part="end" ${Pt("endContainer")} class=${t=>e.end?"end":void 0}><slot name="end" ${Pt("end")} @slotchange="${t=>t.handleEndContentChange()}">${e.end||""}</slot></span>`,te=(t,e)=>K`<span part="start" ${Pt("startContainer")} class="${t=>e.start?"start":void 0}"><slot name="start" ${Pt("start")} @slotchange="${t=>t.handleStartContentChange()}">${e.start||""}</slot></span>`,ee=K`<span part="end" ${Pt("endContainer")}><slot name="end" ${Pt("end")} @slotchange="${t=>t.handleEndContentChange()}"></slot></span>`,ie=K`<span part="start" ${Pt("startContainer")}><slot name="start" ${Pt("start")} @slotchange="${t=>t.handleStartContentChange()}"></slot></span>`,se=(t,e)=>K`<template class="${t=>t.expanded?"expanded":""}"><div class="heading" part="heading" role="heading" aria-level="${t=>t.headinglevel}"><button class="button" part="button" ${Pt("expandbutton")} aria-expanded="${t=>t.expanded}" aria-controls="${t=>t.id}-panel" id="${t=>t.id}" @click="${(t,e)=>t.clickHandler(e.event)}"><span class="heading-content" part="heading-content"><slot name="heading"></slot></span></button>${te(0,e)} ${Jt(0,e)}<span class="icon" part="icon" aria-hidden="true"><slot name="expanded-icon" part="expanded-icon">${e.expandedIcon||""}</slot><slot name="collapsed-icon" part="collapsed-icon">${e.collapsedIcon||""}</slot><span></div><div class="region" part="region" id="${t=>t.id}-panel" role="region" aria-labelledby="${t=>t.id}"><slot></slot></div></template>`
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */;function oe(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}const ne=new Map;"metadata"in Reflect||(Reflect.metadata=function(t,e){return function(i){Reflect.defineMetadata(t,e,i)}},Reflect.defineMetadata=function(t,e,i){let s=ne.get(i);void 0===s&&ne.set(i,s=new Map),s.set(t,e)},Reflect.getOwnMetadata=function(t,e){const i=ne.get(e);if(void 0!==i)return i.get(t)});class re{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,Ue(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){const{container:i,key:s}=this;return this.container=this.key=void 0,i.registerResolver(s,new Re(s,t,e))}}function ae(t){const e=t.slice(),i=Object.keys(t),s=i.length;let o;for(let n=0;n<s;++n)o=i[n],Ge(o)||(e[o]=t[o]);return e}const le=Object.freeze({none(t){throw Error(t.toString()+" not registered, did you forget to add @singleton()?")},singleton:t=>new Re(t,1,t),transient:t=>new Re(t,2,t)}),he=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:le.singleton})}),de=new Map;function ce(t){return e=>Reflect.getOwnMetadata(t,e)}let ue=null;const pe=Object.freeze({createContainer:t=>new Ne(null,Object.assign({},he.default,t)),findResponsibleContainer(t){const e=t.$$container$$;return e&&e.responsibleForOwnerRequests?e:pe.findParentContainer(t)},findParentContainer(t){const e=new CustomEvent(He,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return t.dispatchEvent(e),e.detail.container||pe.getOrCreateDOMContainer()},getOrCreateDOMContainer:(t,e)=>t?t.$$container$$||new Ne(t,Object.assign({},he.default,e,{parentLocator:pe.findParentContainer})):ue||(ue=new Ne(null,Object.assign({},he.default,e,{parentLocator:()=>null}))),getDesignParamtypes:ce("design:paramtypes"),getAnnotationParamtypes:ce("di:paramtypes"),getOrCreateAnnotationParamTypes(t){let e=this.getAnnotationParamtypes(t);return void 0===e&&Reflect.defineMetadata("di:paramtypes",e=[],t),e},getDependencies(t){let e=de.get(t);if(void 0===e){const i=t.inject;if(void 0===i){const i=pe.getDesignParamtypes(t),s=pe.getAnnotationParamtypes(t);if(void 0===i)if(void 0===s){const i=Object.getPrototypeOf(t);e="function"==typeof i&&i!==Function.prototype?ae(pe.getDependencies(i)):[]}else e=ae(s);else if(void 0===s)e=ae(i);else{e=ae(i);let t,o=s.length;for(let i=0;i<o;++i)t=s[i],void 0!==t&&(e[i]=t);const n=Object.keys(s);let r;o=n.length;for(let t=0;t<o;++t)r=n[t],Ge(r)||(e[r]=s[r])}}else e=ae(i);de.set(t,e)}return e},defineProperty(t,e,i,s=!1){const o="$di_"+e;Reflect.defineProperty(t,e,{get:function(){let t=this[o];if(void 0===t){const n=this instanceof HTMLElement?pe.findResponsibleContainer(this):pe.getOrCreateDOMContainer();if(t=n.get(i),this[o]=t,s&&this instanceof bt){const s=this.$fastController,n=()=>{pe.findResponsibleContainer(this).get(i)!==this[o]&&(this[o]=t,s.notify(e))};s.subscribe({handleChange:n},"isConnected")}}return t}})},createInterface(t,e){const i="function"==typeof t?t:e,s="string"==typeof t?t:t&&"friendlyName"in t&&t.friendlyName||We,o="string"!=typeof t&&(t&&"respectConnection"in t&&t.respectConnection||!1),n=function(t,e,i){if(null==t||void 0!==new.target)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(e)pe.defineProperty(t,e,n,o);else{pe.getOrCreateAnnotationParamTypes(t)[i]=n}};return n.$isInterface=!0,n.friendlyName=null==s?"(anonymous)":s,null!=i&&(n.register=function(t,e){return i(new re(t,null!=e?e:n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject:(...t)=>function(e,i,s){if("number"==typeof s){const i=pe.getOrCreateAnnotationParamTypes(e),o=t[0];void 0!==o&&(i[s]=o)}else if(i)pe.defineProperty(e,i,t[0]);else{const i=s?pe.getOrCreateAnnotationParamTypes(s.value):pe.getOrCreateAnnotationParamTypes(e);let o;for(let e=0;e<t.length;++e)o=t[e],void 0!==o&&(i[e]=o)}},transient:t=>(t.register=function(e){return qe.transient(t,t).register(e)},t.registerInRequestor=!1,t),singleton:(t,e=Ce)=>(t.register=function(e){return qe.singleton(t,t).register(e)},t.registerInRequestor=e.scoped,t)}),me=pe.createInterface("Container"),ve=me;function fe(t){return function(e){const i=function(t,e,s){pe.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return t(e,i,s)},i}}const ge=pe.inject;function be(t){return pe.transient(t)}function ye(t){return null==t?be:be(t)}const Ce={scoped:!1};function xe(t){return"function"==typeof t?pe.singleton(t):function(e){return pe.singleton(e,t)}}const we=($e=(t,e,i,s)=>i.getAll(t,s),function(t,e){e=!!e;const i=function(t,e,s){pe.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return $e(t,i,s,e)},i});var $e;const ke=fe((t,e,i)=>()=>i.get(t)),Ie=fe((t,e,i)=>i.has(t,!0)?i.get(t):void 0);function Ee(t,e,i){pe.inject(Ee)(t,e,i)}Ee.$isResolver=!0,Ee.resolve=()=>{};const Te=fe((t,e,i)=>{const s=Se(t,e),o=new Re(t,0,s);return i.registerResolver(t,o),s}),Oe=fe((t,e,i)=>Se(t,e));function Se(t,e){return e.getFactory(t).construct(e)}class Re{constructor(t,e,i){this.key=t,this.strategy=e,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error("Cyclic dependency found: "+this.state.name);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state;case 2:{const i=t.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){var e,i,s;switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return null!==(s=null===(i=null===(e=t.getResolver(this.state))||void 0===e?void 0:e.getFactory)||void 0===i?void 0:i.call(e,t))&&void 0!==s?s:null;default:return null}}}function Ae(t){return this.get(t)}function De(t,e){return e(t)}class Fe{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let i;return i=void 0===e?new this.Type(...this.dependencies.map(Ae,t)):new this.Type(...this.dependencies.map(Ae,t),...e),null==this.transformers?i:this.transformers.reduce(De,i)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}}const Le={$isResolver:!0,resolve:(t,e)=>e};function Pe(t){return"function"==typeof t.register}function Me(t){return function(t){return Pe(t)&&"boolean"==typeof t.registerInRequestor}(t)&&t.registerInRequestor}const Ve=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),He="__DI_LOCATE_PARENT__",ze=new Map;class Ne{get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,null!==t&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(me,Le),t instanceof Node&&t.addEventListener(He,t=>{t.composedPath()[0]!==this.owner&&(t.detail.container=this,t.stopImmediatePropagation())})}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let e,i,s,o,n;const r=this.context;for(let a=0,l=t.length;a<l;++a)if(e=t[a],Ke(e))if(Pe(e))e.register(this,r);else if(void 0!==e.prototype)qe.singleton(e,e).register(this);else for(i=Object.keys(e),o=0,n=i.length;o<n;++o)s=e[i[o]],Ke(s)&&(Pe(s)?s.register(this,r):this.register(s));return--this.registerDepth,this}registerResolver(t,e){je(t);const i=this.resolvers,s=i.get(t);return null==s?i.set(t,e):s instanceof Re&&4===s.strategy?s.state.push(e):i.set(t,new Re(t,4,[s,e])),e}registerTransformer(t,e){const i=this.getResolver(t);if(null==i)return!1;if(i.getFactory){const t=i.getFactory(this);return null!=t&&(t.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(je(t),void 0!==t.resolve)return t;let i,s=this;for(;null!=s;){if(i=s.resolvers.get(t),null!=i)return i;if(null==s.parent){const i=Me(t)?this:s;return e?this.jitRegister(t,i):null}s=s.parent}return null}has(t,e=!1){return!!this.resolvers.has(t)||!(!e||null==this.parent)&&this.parent.has(t,!0)}get(t){if(je(t),t.$isResolver)return t.resolve(this,this);let e,i=this;for(;null!=i;){if(e=i.resolvers.get(t),null!=e)return e.resolve(i,this);if(null==i.parent){const s=Me(t)?this:i;return e=this.jitRegister(t,s),e.resolve(i,this)}i=i.parent}throw new Error("Unable to resolve key: "+String(t))}getAll(t,e=!1){je(t);const i=this;let o,n=i;if(e){let e=s;for(;null!=n;)o=n.resolvers.get(t),null!=o&&(e=e.concat(_e(o,n,i))),n=n.parent;return e}for(;null!=n;){if(o=n.resolvers.get(t),null!=o)return _e(o,n,i);if(n=n.parent,null==n)return s}return s}getFactory(t){let e=ze.get(t);if(void 0===e){if(Ye(t))throw new Error(t.name+" is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.");ze.set(t,e=new Fe(t,pe.getDependencies(t)))}return e}registerFactory(t,e){ze.set(t,e)}createChild(t){return new Ne(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if("function"!=typeof t)throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(Ve.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(Pe(t)){const i=t.register(e);if(!(i instanceof Object)||null==i.resolve){const i=e.resolvers.get(t);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(t.$isInterface)throw new Error("Attempted to jitRegister an interface: "+t.friendlyName);{const i=this.config.defaultResolver(t,e);return e.resolvers.set(t,i),i}}}const Be=new WeakMap;function Ue(t){return function(e,i,s){if(Be.has(s))return Be.get(s);const o=t(e,i,s);return Be.set(s,o),o}}const qe=Object.freeze({instance:(t,e)=>new Re(t,0,e),singleton:(t,e)=>new Re(t,1,e),transient:(t,e)=>new Re(t,2,e),callback:(t,e)=>new Re(t,3,e),cachedCallback:(t,e)=>new Re(t,3,Ue(e)),aliasTo:(t,e)=>new Re(e,5,t)});function je(t){if(null==t)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function _e(t,e,i){if(t instanceof Re&&4===t.strategy){const s=t.state;let o=s.length;const n=new Array(o);for(;o--;)n[o]=s[o].resolve(e,i);return n}return[t.resolve(e,i)]}const We="(anonymous)";function Ke(t){return"object"==typeof t&&null!==t||"function"==typeof t}const Ye=function(){const t=new WeakMap;let e=!1,i="",s=0;return function(o){return e=t.get(o),void 0===e&&(i=o.toString(),s=i.length,e=s>=29&&s<=100&&125===i.charCodeAt(s-1)&&i.charCodeAt(s-2)<=32&&93===i.charCodeAt(s-3)&&101===i.charCodeAt(s-4)&&100===i.charCodeAt(s-5)&&111===i.charCodeAt(s-6)&&99===i.charCodeAt(s-7)&&32===i.charCodeAt(s-8)&&101===i.charCodeAt(s-9)&&118===i.charCodeAt(s-10)&&105===i.charCodeAt(s-11)&&116===i.charCodeAt(s-12)&&97===i.charCodeAt(s-13)&&110===i.charCodeAt(s-14)&&88===i.charCodeAt(s-15),t.set(o,e)),e}}(),Xe={};function Ge(t){switch(typeof t){case"number":return t>=0&&(0|t)===t;case"string":{const e=Xe[t];if(void 0!==e)return e;const i=t.length;if(0===i)return Xe[t]=!1;let s=0;for(let e=0;e<i;++e)if(s=t.charCodeAt(e),0===e&&48===s&&i>1||s<48||s>57)return Xe[t]=!1;return Xe[t]=!0}default:return!1}}function Qe(t){return t.toLowerCase()+":presentation"}const Ze=new Map,Je=Object.freeze({define(t,e,i){const s=Qe(t);void 0===Ze.get(s)?Ze.set(s,e):Ze.set(s,!1),i.register(qe.instance(s,e))},forTag(t,e){const i=Qe(t),s=Ze.get(i);if(!1===s){return pe.findResponsibleContainer(e).get(i)}return s||null}});class ti{constructor(t,e){this.template=t||null,this.styles=void 0===e?null:Array.isArray(e)?Y.create(e):e instanceof Y?e:Y.create([e])}applyTo(t){const e=t.$fastController;null===e.template&&(e.template=this.template),null===e.styles&&(e.styles=this.styles)}}class ei extends bt{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Je.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new si(this===ei?class extends ei{}:this,t,e)}}function ii(t,e,i){return"function"==typeof t?t(e,i):t}oe([v],ei.prototype,"template",void 0),oe([v],ei.prototype,"styles",void 0);class si{constructor(t,e,i){this.type=t,this.elementDefinition=e,this.overrideDefinition=i,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(t,e){const i=this.definition,s=this.overrideDefinition,o=`${i.prefix||e.elementPrefix}-${i.baseName}`;e.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:t=>{const e=new ti(ii(i.template,t,i),ii(i.styles,t,i));t.definePresentation(e);let o=ii(i.shadowOptions,t,i);t.shadowRootMode&&(o?s.shadowOptions||(o.mode=t.shadowRootMode):null!==o&&(o={mode:t.shadowRootMode})),t.defineElement({elementOptions:ii(i.elementOptions,t,i),shadowOptions:o,attributes:ii(i.attributes,t,i)})}})}}function oi(t,...e){const i=ot.locate(t);e.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(i=>{"constructor"!==i&&Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i))});ot.locate(e).forEach(t=>i.push(t))})}class ni extends ei{constructor(){super(...arguments),this.headinglevel=2,this.expanded=!1,this.clickHandler=t=>{this.expanded=!this.expanded,this.change()},this.change=()=>{this.$emit("change")}}}oe([lt({attribute:"heading-level",mode:"fromView",converter:rt})],ni.prototype,"headinglevel",void 0),oe([lt({mode:"boolean"})],ni.prototype,"expanded",void 0),oe([lt],ni.prototype,"id",void 0),oi(ni,Zt);const ri=(t,e)=>K`<template><slot ${Xt({property:"accordionItems",filter:Wt()})}></slot><slot name="item" part="item" ${Xt("accordionItems")}></slot></template>`,ai="horizontal",li="vertical";function hi(...t){return t.every(t=>t instanceof HTMLElement)}let di;var ci;!function(t){t[t.alt=18]="alt",t[t.arrowDown=40]="arrowDown",t[t.arrowLeft=37]="arrowLeft",t[t.arrowRight=39]="arrowRight",t[t.arrowUp=38]="arrowUp",t[t.back=8]="back",t[t.backSlash=220]="backSlash",t[t.break=19]="break",t[t.capsLock=20]="capsLock",t[t.closeBracket=221]="closeBracket",t[t.colon=186]="colon",t[t.colon2=59]="colon2",t[t.comma=188]="comma",t[t.ctrl=17]="ctrl",t[t.delete=46]="delete",t[t.end=35]="end",t[t.enter=13]="enter",t[t.equals=187]="equals",t[t.equals2=61]="equals2",t[t.equals3=107]="equals3",t[t.escape=27]="escape",t[t.forwardSlash=191]="forwardSlash",t[t.function1=112]="function1",t[t.function10=121]="function10",t[t.function11=122]="function11",t[t.function12=123]="function12",t[t.function2=113]="function2",t[t.function3=114]="function3",t[t.function4=115]="function4",t[t.function5=116]="function5",t[t.function6=117]="function6",t[t.function7=118]="function7",t[t.function8=119]="function8",t[t.function9=120]="function9",t[t.home=36]="home",t[t.insert=45]="insert",t[t.menu=93]="menu",t[t.minus=189]="minus",t[t.minus2=109]="minus2",t[t.numLock=144]="numLock",t[t.numPad0=96]="numPad0",t[t.numPad1=97]="numPad1",t[t.numPad2=98]="numPad2",t[t.numPad3=99]="numPad3",t[t.numPad4=100]="numPad4",t[t.numPad5=101]="numPad5",t[t.numPad6=102]="numPad6",t[t.numPad7=103]="numPad7",t[t.numPad8=104]="numPad8",t[t.numPad9=105]="numPad9",t[t.numPadDivide=111]="numPadDivide",t[t.numPadDot=110]="numPadDot",t[t.numPadMinus=109]="numPadMinus",t[t.numPadMultiply=106]="numPadMultiply",t[t.numPadPlus=107]="numPadPlus",t[t.openBracket=219]="openBracket",t[t.pageDown=34]="pageDown",t[t.pageUp=33]="pageUp",t[t.period=190]="period",t[t.print=44]="print",t[t.quote=222]="quote",t[t.scrollLock=145]="scrollLock",t[t.shift=16]="shift",t[t.space=32]="space",t[t.tab=9]="tab",t[t.tilde=192]="tilde",t[t.windowsLeft=91]="windowsLeft",t[t.windowsOpera=219]="windowsOpera",t[t.windowsRight=92]="windowsRight"}(ci||(ci={}));const ui={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp"};var pi;function mi(t,e,i){return Math.min(Math.max(i,t),e)}function vi(t,e,i=0){return[e,i]=[e,i].sort((t,e)=>t-e),e<=t&&t<i}!function(t){t.ltr="ltr",t.rtl="rtl"}(pi||(pi={}));let fi=0;function gi(t=""){return`${t}${fi++}`}const bi={single:"single",multi:"multi"};class yi extends ei{constructor(){super(...arguments),this.expandmode=bi.multi,this.activeItemIndex=0,this.change=()=>{this.$emit("change",this.activeid)},this.setItems=()=>{var t;if(0!==this.accordionItems.length&&(this.accordionIds=this.getItemIds(),this.accordionItems.forEach((t,e)=>{t instanceof ni&&(t.addEventListener("change",this.activeItemChange),this.isSingleExpandMode()&&(this.activeItemIndex!==e?t.expanded=!1:t.expanded=!0));const i=this.accordionIds[e];t.setAttribute("id","string"!=typeof i?"accordion-"+(e+1):i),this.activeid=this.accordionIds[this.activeItemIndex],t.addEventListener("keydown",this.handleItemKeyDown),t.addEventListener("focus",this.handleItemFocus)}),this.isSingleExpandMode())){(null!==(t=this.findExpandedItem())&&void 0!==t?t:this.accordionItems[0]).setAttribute("aria-disabled","true")}},this.removeItemListeners=t=>{t.forEach((t,e)=>{t.removeEventListener("change",this.activeItemChange),t.removeEventListener("keydown",this.handleItemKeyDown),t.removeEventListener("focus",this.handleItemFocus)})},this.activeItemChange=t=>{if(t.defaultPrevented||t.target!==t.currentTarget)return;t.preventDefault();const e=t.target;this.activeid=e.getAttribute("id"),this.isSingleExpandMode()&&(this.resetItems(),e.expanded=!0,e.setAttribute("aria-disabled","true"),this.accordionItems.forEach(t=>{t.hasAttribute("disabled")||t.id===this.activeid||t.removeAttribute("aria-disabled")})),this.activeItemIndex=Array.from(this.accordionItems).indexOf(e),this.change()},this.handleItemKeyDown=t=>{if(t.target===t.currentTarget)switch(this.accordionIds=this.getItemIds(),t.key){case"ArrowUp":t.preventDefault(),this.adjust(-1);break;case"ArrowDown":t.preventDefault(),this.adjust(1);break;case"Home":this.activeItemIndex=0,this.focusItem();break;case"End":this.activeItemIndex=this.accordionItems.length-1,this.focusItem()}},this.handleItemFocus=t=>{if(t.target===t.currentTarget){const e=t.target,i=this.activeItemIndex=Array.from(this.accordionItems).indexOf(e);this.activeItemIndex!==i&&-1!==i&&(this.activeItemIndex=i,this.activeid=this.accordionIds[this.activeItemIndex])}}}accordionItemsChanged(t,e){this.$fastController.isConnected&&(this.removeItemListeners(t),this.setItems())}findExpandedItem(){for(let t=0;t<this.accordionItems.length;t++)if("true"===this.accordionItems[t].getAttribute("expanded"))return this.accordionItems[t];return null}resetItems(){this.accordionItems.forEach((t,e)=>{t.expanded=!1})}getItemIds(){return this.accordionItems.map(t=>t.getAttribute("id"))}isSingleExpandMode(){return this.expandmode===bi.single}adjust(t){var e,i,s;this.activeItemIndex=(e=0,i=this.accordionItems.length-1,(s=this.activeItemIndex+t)<e?i:s>i?e:s),this.focusItem()}focusItem(){const t=this.accordionItems[this.activeItemIndex];t instanceof ni&&t.expandbutton.focus()}}oe([lt({attribute:"expand-mode"})],yi.prototype,"expandmode",void 0),oe([v],yi.prototype,"accordionItems",void 0);const Ci=(t,e)=>K`<a class="control" part="control" download="${t=>t.download}" href="${t=>t.href}" hreflang="${t=>t.hreflang}" ping="${t=>t.ping}" referrerpolicy="${t=>t.referrerpolicy}" rel="${t=>t.rel}" target="${t=>t.target}" type="${t=>t.type}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-expanded="${t=>t.ariaExpanded}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${Pt("control")}>${te(0,e)}<span class="content" part="content"><slot ${Xt("defaultSlottedContent")}></slot></span>${Jt(0,e)}</a>`;class xi{}oe([lt({attribute:"aria-atomic"})],xi.prototype,"ariaAtomic",void 0),oe([lt({attribute:"aria-busy"})],xi.prototype,"ariaBusy",void 0),oe([lt({attribute:"aria-controls"})],xi.prototype,"ariaControls",void 0),oe([lt({attribute:"aria-current"})],xi.prototype,"ariaCurrent",void 0),oe([lt({attribute:"aria-describedby"})],xi.prototype,"ariaDescribedby",void 0),oe([lt({attribute:"aria-details"})],xi.prototype,"ariaDetails",void 0),oe([lt({attribute:"aria-disabled"})],xi.prototype,"ariaDisabled",void 0),oe([lt({attribute:"aria-errormessage"})],xi.prototype,"ariaErrormessage",void 0),oe([lt({attribute:"aria-flowto"})],xi.prototype,"ariaFlowto",void 0),oe([lt({attribute:"aria-haspopup"})],xi.prototype,"ariaHaspopup",void 0),oe([lt({attribute:"aria-hidden"})],xi.prototype,"ariaHidden",void 0),oe([lt({attribute:"aria-invalid"})],xi.prototype,"ariaInvalid",void 0),oe([lt({attribute:"aria-keyshortcuts"})],xi.prototype,"ariaKeyshortcuts",void 0),oe([lt({attribute:"aria-label"})],xi.prototype,"ariaLabel",void 0),oe([lt({attribute:"aria-labelledby"})],xi.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-live"})],xi.prototype,"ariaLive",void 0),oe([lt({attribute:"aria-owns"})],xi.prototype,"ariaOwns",void 0),oe([lt({attribute:"aria-relevant"})],xi.prototype,"ariaRelevant",void 0),oe([lt({attribute:"aria-roledescription"})],xi.prototype,"ariaRoledescription",void 0);class wi extends ei{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(t=this.$fastController.definition.shadowOptions)||void 0===t?void 0:t.delegatesFocus)&&(this.focus=()=>{var t;null===(t=this.control)||void 0===t||t.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}oe([lt],wi.prototype,"download",void 0),oe([lt],wi.prototype,"href",void 0),oe([lt],wi.prototype,"hreflang",void 0),oe([lt],wi.prototype,"ping",void 0),oe([lt],wi.prototype,"referrerpolicy",void 0),oe([lt],wi.prototype,"rel",void 0),oe([lt],wi.prototype,"target",void 0),oe([lt],wi.prototype,"type",void 0),oe([v],wi.prototype,"defaultSlottedContent",void 0);class $i{}oe([lt({attribute:"aria-expanded"})],$i.prototype,"ariaExpanded",void 0),oi($i,xi),oi(wi,Zt,$i);const ki=(t,e)=>K`<template class="${t=>t.initialLayoutComplete?"loaded":""}">${zt(t=>t.initialLayoutComplete,K`<slot></slot>`)}</template>`,Ii=t=>{const e=t.closest("[dir]");return null!==e&&"rtl"===e.dir?pi.rtl:pi.ltr};class Ei extends ei{constructor(){super(...arguments),this.anchor="",this.viewport="",this.horizontalPositioningMode="uncontrolled",this.horizontalDefaultPosition="unset",this.horizontalViewportLock=!1,this.horizontalInset=!1,this.horizontalScaling="content",this.verticalPositioningMode="uncontrolled",this.verticalDefaultPosition="unset",this.verticalViewportLock=!1,this.verticalInset=!1,this.verticalScaling="content",this.fixedPlacement=!1,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.initialLayoutComplete=!1,this.resizeDetector=null,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.pendingPositioningUpdate=!1,this.pendingReset=!1,this.currentDirection=pi.ltr,this.regionVisible=!1,this.forceUpdate=!1,this.updateThreshold=.5,this.update=()=>{this.pendingPositioningUpdate||this.requestPositionUpdates()},this.startObservers=()=>{this.stopObservers(),null!==this.anchorElement&&(this.requestPositionUpdates(),null!==this.resizeDetector&&(this.resizeDetector.observe(this.anchorElement),this.resizeDetector.observe(this)))},this.requestPositionUpdates=()=>{null===this.anchorElement||this.pendingPositioningUpdate||(Ei.intersectionService.requestPosition(this,this.handleIntersection),Ei.intersectionService.requestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&Ei.intersectionService.requestPosition(this.viewportElement,this.handleIntersection),this.pendingPositioningUpdate=!0)},this.stopObservers=()=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,Ei.intersectionService.cancelRequestPosition(this,this.handleIntersection),null!==this.anchorElement&&Ei.intersectionService.cancelRequestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&Ei.intersectionService.cancelRequestPosition(this.viewportElement,this.handleIntersection)),null!==this.resizeDetector&&this.resizeDetector.disconnect()},this.getViewport=()=>"string"!=typeof this.viewport||""===this.viewport?document.documentElement:document.getElementById(this.viewport),this.getAnchor=()=>document.getElementById(this.anchor),this.handleIntersection=t=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,this.applyIntersectionEntries(t)&&this.updateLayout())},this.applyIntersectionEntries=t=>{const e=t.find(t=>t.target===this),i=t.find(t=>t.target===this.anchorElement),s=t.find(t=>t.target===this.viewportElement);return void 0!==e&&void 0!==s&&void 0!==i&&(!!(!this.regionVisible||this.forceUpdate||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect||this.isRectDifferent(this.anchorRect,i.boundingClientRect)||this.isRectDifferent(this.viewportRect,s.boundingClientRect)||this.isRectDifferent(this.regionRect,e.boundingClientRect))&&(this.regionRect=e.boundingClientRect,this.anchorRect=i.boundingClientRect,this.viewportElement===document.documentElement?this.viewportRect=new DOMRectReadOnly(s.boundingClientRect.x+document.documentElement.scrollLeft,s.boundingClientRect.y+document.documentElement.scrollTop,s.boundingClientRect.width,s.boundingClientRect.height):this.viewportRect=s.boundingClientRect,this.updateRegionOffset(),this.forceUpdate=!1,!0))},this.updateRegionOffset=()=>{this.anchorRect&&this.regionRect&&(this.baseHorizontalOffset=this.baseHorizontalOffset+(this.anchorRect.left-this.regionRect.left)+(this.translateX-this.baseHorizontalOffset),this.baseVerticalOffset=this.baseVerticalOffset+(this.anchorRect.top-this.regionRect.top)+(this.translateY-this.baseVerticalOffset))},this.isRectDifferent=(t,e)=>Math.abs(t.top-e.top)>this.updateThreshold||Math.abs(t.right-e.right)>this.updateThreshold||Math.abs(t.bottom-e.bottom)>this.updateThreshold||Math.abs(t.left-e.left)>this.updateThreshold,this.handleResize=t=>{this.update()},this.reset=()=>{this.pendingReset&&(this.pendingReset=!1,null===this.anchorElement&&(this.anchorElement=this.getAnchor()),null===this.viewportElement&&(this.viewportElement=this.getViewport()),this.currentDirection=Ii(this),this.startObservers())},this.updateLayout=()=>{let t=void 0,e=void 0;if("uncontrolled"!==this.horizontalPositioningMode){const t=this.getPositioningOptions(this.horizontalInset);if("center"===this.horizontalDefaultPosition)e="center";else if("unset"!==this.horizontalDefaultPosition){let t=this.horizontalDefaultPosition;if("start"===t||"end"===t){const e=Ii(this);if(e!==this.currentDirection)return this.currentDirection=e,void this.initialize();t=this.currentDirection===pi.ltr?"start"===t?"left":"right":"start"===t?"right":"left"}switch(t){case"left":e=this.horizontalInset?"insetStart":"start";break;case"right":e=this.horizontalInset?"insetEnd":"end"}}const i=void 0!==this.horizontalThreshold?this.horizontalThreshold:void 0!==this.regionRect?this.regionRect.width:0,s=void 0!==this.anchorRect?this.anchorRect.left:0,o=void 0!==this.anchorRect?this.anchorRect.right:0,n=void 0!==this.anchorRect?this.anchorRect.width:0,r=void 0!==this.viewportRect?this.viewportRect.left:0,a=void 0!==this.viewportRect?this.viewportRect.right:0;(void 0===e||"locktodefault"!==this.horizontalPositioningMode&&this.getAvailableSpace(e,s,o,n,r,a)<i)&&(e=this.getAvailableSpace(t[0],s,o,n,r,a)>this.getAvailableSpace(t[1],s,o,n,r,a)?t[0]:t[1])}if("uncontrolled"!==this.verticalPositioningMode){const e=this.getPositioningOptions(this.verticalInset);if("center"===this.verticalDefaultPosition)t="center";else if("unset"!==this.verticalDefaultPosition)switch(this.verticalDefaultPosition){case"top":t=this.verticalInset?"insetStart":"start";break;case"bottom":t=this.verticalInset?"insetEnd":"end"}const i=void 0!==this.verticalThreshold?this.verticalThreshold:void 0!==this.regionRect?this.regionRect.height:0,s=void 0!==this.anchorRect?this.anchorRect.top:0,o=void 0!==this.anchorRect?this.anchorRect.bottom:0,n=void 0!==this.anchorRect?this.anchorRect.height:0,r=void 0!==this.viewportRect?this.viewportRect.top:0,a=void 0!==this.viewportRect?this.viewportRect.bottom:0;(void 0===t||"locktodefault"!==this.verticalPositioningMode&&this.getAvailableSpace(t,s,o,n,r,a)<i)&&(t=this.getAvailableSpace(e[0],s,o,n,r,a)>this.getAvailableSpace(e[1],s,o,n,r,a)?e[0]:e[1])}const i=this.getNextRegionDimension(e,t),s=this.horizontalPosition!==e||this.verticalPosition!==t;if(this.setHorizontalPosition(e,i),this.setVerticalPosition(t,i),this.updateRegionStyle(),!this.initialLayoutComplete)return this.initialLayoutComplete=!0,void this.requestPositionUpdates();this.regionVisible||(this.regionVisible=!0,this.style.removeProperty("pointer-events"),this.style.removeProperty("opacity"),this.classList.toggle("loaded",!0),this.$emit("loaded",this,{bubbles:!1})),this.updatePositionClasses(),s&&this.$emit("positionchange",this,{bubbles:!1})},this.updateRegionStyle=()=>{this.style.width=this.regionWidth,this.style.height=this.regionHeight,this.style.transform=`translate(${this.translateX}px, ${this.translateY}px)`},this.updatePositionClasses=()=>{this.classList.toggle("top","start"===this.verticalPosition),this.classList.toggle("bottom","end"===this.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.verticalPosition),this.classList.toggle("vertical-center","center"===this.verticalPosition),this.classList.toggle("left","start"===this.horizontalPosition),this.classList.toggle("right","end"===this.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.horizontalPosition),this.classList.toggle("horizontal-center","center"===this.horizontalPosition)},this.setHorizontalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.horizontalScaling){case"anchor":case"fill":i=this.horizontalViewportLock?this.viewportRect.width:e.width,this.regionWidth=i+"px";break;case"content":i=this.regionRect.width,this.regionWidth="unset"}let s=0;switch(t){case"start":this.translateX=this.baseHorizontalOffset-i,this.horizontalViewportLock&&this.anchorRect.left>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.right));break;case"insetStart":this.translateX=this.baseHorizontalOffset-i+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.right));break;case"insetEnd":this.translateX=this.baseHorizontalOffset,this.horizontalViewportLock&&this.anchorRect.left<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.left));break;case"end":this.translateX=this.baseHorizontalOffset+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.left));break;case"center":if(s=(this.anchorRect.width-i)/2,this.translateX=this.baseHorizontalOffset+s,this.horizontalViewportLock){const t=this.anchorRect.left+s,e=this.anchorRect.right-s;t<this.viewportRect.left&&!(e>this.viewportRect.right)?this.translateX=this.translateX-(t-this.viewportRect.left):e>this.viewportRect.right&&!(t<this.viewportRect.left)&&(this.translateX=this.translateX-(e-this.viewportRect.right))}}this.horizontalPosition=t},this.setVerticalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.verticalScaling){case"anchor":case"fill":i=this.verticalViewportLock?this.viewportRect.height:e.height,this.regionHeight=i+"px";break;case"content":i=this.regionRect.height,this.regionHeight="unset"}let s=0;switch(t){case"start":this.translateY=this.baseVerticalOffset-i,this.verticalViewportLock&&this.anchorRect.top>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.bottom));break;case"insetStart":this.translateY=this.baseVerticalOffset-i+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.bottom));break;case"insetEnd":this.translateY=this.baseVerticalOffset,this.verticalViewportLock&&this.anchorRect.top<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.top));break;case"end":this.translateY=this.baseVerticalOffset+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.top));break;case"center":if(s=(this.anchorRect.height-i)/2,this.translateY=this.baseVerticalOffset+s,this.verticalViewportLock){const t=this.anchorRect.top+s,e=this.anchorRect.bottom-s;t<this.viewportRect.top&&!(e>this.viewportRect.bottom)?this.translateY=this.translateY-(t-this.viewportRect.top):e>this.viewportRect.bottom&&!(t<this.viewportRect.top)&&(this.translateY=this.translateY-(e-this.viewportRect.bottom))}}this.verticalPosition=t},this.getPositioningOptions=t=>t?["insetStart","insetEnd"]:["start","end"],this.getAvailableSpace=(t,e,i,s,o,n)=>{const r=e-o,a=n-(e+s);switch(t){case"start":return r;case"insetStart":return r+s;case"insetEnd":return a+s;case"end":return a;case"center":return 2*Math.min(r,a)+s}},this.getNextRegionDimension=(t,e)=>{const i={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0};return void 0!==t&&"fill"===this.horizontalScaling?i.width=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(i.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==e&&"fill"===this.verticalScaling?i.height=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(i.height=void 0!==this.anchorRect?this.anchorRect.height:0),i},this.startAutoUpdateEventListeners=()=>{window.addEventListener("resize",this.update,{passive:!0}),window.addEventListener("scroll",this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(t,e){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===t&&this.stopAutoUpdateEventListeners(),"auto"===e&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),c.queueUpdate(()=>this.reset()),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}Ei.intersectionService=new class{constructor(){this.intersectionDetector=null,this.observedElements=new Map,this.requestPosition=(t,e)=>{var i;null!==this.intersectionDetector&&(this.observedElements.has(t)?null===(i=this.observedElements.get(t))||void 0===i||i.push(e):(this.observedElements.set(t,[e]),this.intersectionDetector.observe(t)))},this.cancelRequestPosition=(t,e)=>{const i=this.observedElements.get(t);if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}},this.initializeIntersectionDetector=()=>{t.IntersectionObserver&&(this.intersectionDetector=new IntersectionObserver(this.handleIntersection,{root:null,rootMargin:"0px",threshold:[0,1]}))},this.handleIntersection=t=>{if(null===this.intersectionDetector)return;const e=[],i=[];t.forEach(t=>{var s;null===(s=this.intersectionDetector)||void 0===s||s.unobserve(t.target);const o=this.observedElements.get(t.target);void 0!==o&&(o.forEach(s=>{let o=e.indexOf(s);-1===o&&(o=e.length,e.push(s),i.push([])),i[o].push(t)}),this.observedElements.delete(t.target))}),e.forEach((t,e)=>{t(i[e])})},this.initializeIntersectionDetector()}},oe([lt],Ei.prototype,"anchor",void 0),oe([lt],Ei.prototype,"viewport",void 0),oe([lt({attribute:"horizontal-positioning-mode"})],Ei.prototype,"horizontalPositioningMode",void 0),oe([lt({attribute:"horizontal-default-position"})],Ei.prototype,"horizontalDefaultPosition",void 0),oe([lt({attribute:"horizontal-viewport-lock",mode:"boolean"})],Ei.prototype,"horizontalViewportLock",void 0),oe([lt({attribute:"horizontal-inset",mode:"boolean"})],Ei.prototype,"horizontalInset",void 0),oe([lt({attribute:"horizontal-threshold"})],Ei.prototype,"horizontalThreshold",void 0),oe([lt({attribute:"horizontal-scaling"})],Ei.prototype,"horizontalScaling",void 0),oe([lt({attribute:"vertical-positioning-mode"})],Ei.prototype,"verticalPositioningMode",void 0),oe([lt({attribute:"vertical-default-position"})],Ei.prototype,"verticalDefaultPosition",void 0),oe([lt({attribute:"vertical-viewport-lock",mode:"boolean"})],Ei.prototype,"verticalViewportLock",void 0),oe([lt({attribute:"vertical-inset",mode:"boolean"})],Ei.prototype,"verticalInset",void 0),oe([lt({attribute:"vertical-threshold"})],Ei.prototype,"verticalThreshold",void 0),oe([lt({attribute:"vertical-scaling"})],Ei.prototype,"verticalScaling",void 0),oe([lt({attribute:"fixed-placement",mode:"boolean"})],Ei.prototype,"fixedPlacement",void 0),oe([lt({attribute:"auto-update-mode"})],Ei.prototype,"autoUpdateMode",void 0),oe([v],Ei.prototype,"anchorElement",void 0),oe([v],Ei.prototype,"viewportElement",void 0),oe([v],Ei.prototype,"initialLayoutComplete",void 0);const Ti={horizontalDefaultPosition:"center",horizontalPositioningMode:"locktodefault",horizontalInset:!1,horizontalScaling:"anchor"},Oi=Object.assign(Object.assign({},Ti),{verticalDefaultPosition:"top",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"}),Si=Object.assign(Object.assign({},Ti),{verticalDefaultPosition:"bottom",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"}),Ri=Object.assign(Object.assign({},Ti),{verticalPositioningMode:"dynamic",verticalInset:!1,verticalScaling:"content"}),Ai=Object.assign(Object.assign({},Oi),{verticalScaling:"fill"}),Di=Object.assign(Object.assign({},Si),{verticalScaling:"fill"}),Fi=Object.assign(Object.assign({},Ri),{verticalScaling:"fill"}),Li=(t,e)=>K`<div class="backplate ${t=>t.shape}" part="backplate" style="${t=>t.fill?`background-color: var(--avatar-fill-${t.fill});`:void 0}"><a class="link" part="link" href="${t=>t.link?t.link:void 0}" style="${t=>t.color?`color: var(--avatar-color-${t.color});`:void 0}"><slot name="media" part="media">${e.media||""}</slot><slot class="content" part="content"><slot></a></div><slot name="badge" part="badge"></slot>`;class Pi extends ei{connectedCallback(){super.connectedCallback(),this.shape||(this.shape="circle")}}oe([lt],Pi.prototype,"fill",void 0),oe([lt],Pi.prototype,"color",void 0),oe([lt],Pi.prototype,"link",void 0),oe([lt],Pi.prototype,"shape",void 0);const Mi=(t,e)=>K`<template class="${t=>t.circular?"circular":""}"><div class="control" part="control" style="${t=>t.generateBadgeStyle()}"><slot></slot></div></template>`;class Vi extends ei{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const t=`background-color: var(--badge-fill-${this.fill});`,e=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?t:this.color&&!this.fill?e:`${e} ${t}`}}}oe([lt({attribute:"fill"})],Vi.prototype,"fill",void 0),oe([lt({attribute:"color"})],Vi.prototype,"color",void 0),oe([lt({mode:"boolean"})],Vi.prototype,"circular",void 0);const Hi=(t,e)=>K`<div role="listitem" class="listitem" part="listitem">${zt(t=>t.href&&t.href.length>0,K` ${Ci(0,e)} `)} ${zt(t=>!t.href,K` ${te(0,e)}<slot></slot>${Jt(0,e)} `)} ${zt(t=>t.separator,K`<span class="separator" part="separator" aria-hidden="true"><slot name="separator">${e.separator||""}</slot></span>`)}</div>`;class zi extends wi{constructor(){super(...arguments),this.separator=!0}}oe([v],zi.prototype,"separator",void 0),oi(zi,Zt,$i);const Ni=(t,e)=>K`<template role="navigation"><div role="list" class="list" part="list"><slot ${Xt({property:"slottedBreadcrumbItems",filter:Wt()})}></slot></div></template>`;class Bi extends ei{slottedBreadcrumbItemsChanged(){if(this.$fastController.isConnected){if(void 0===this.slottedBreadcrumbItems||0===this.slottedBreadcrumbItems.length)return;const t=this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length-1];this.slottedBreadcrumbItems.forEach(e=>{const i=e===t;this.setItemSeparator(e,i),this.setAriaCurrent(e,i)})}}setItemSeparator(t,e){t instanceof zi&&(t.separator=!e)}findChildWithHref(t){var e,i;return t.childElementCount>0?t.querySelector("a[href]"):(null===(e=t.shadowRoot)||void 0===e?void 0:e.childElementCount)?null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("a[href]"):null}setAriaCurrent(t,e){const i=this.findChildWithHref(t);null===i&&t.hasAttribute("href")&&t instanceof zi?e?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current"):null!==i&&(e?i.setAttribute("aria-current","page"):i.removeAttribute("aria-current"))}}oe([v],Bi.prototype,"slottedBreadcrumbItems",void 0);const Ui=(t,e)=>K`<button class="control" part="control" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" form="${t=>t.formId}" formaction="${t=>t.formaction}" formenctype="${t=>t.formenctype}" formmethod="${t=>t.formmethod}" formnovalidate="${t=>t.formnovalidate}" formtarget="${t=>t.formtarget}" name="${t=>t.name}" type="${t=>t.type}" value="${t=>t.value}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-expanded="${t=>t.ariaExpanded}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-pressed="${t=>t.ariaPressed}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${Pt("control")}>${te(0,e)}<span class="content" part="content"><slot ${Xt("defaultSlottedContent")}></slot></span>${Jt(0,e)}</button>`,qi="ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype,ji=new WeakMap;function _i(t){const e=class extends t{static get formAssociated(){return qi}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const t=this.proxy.labels,e=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=t?e.concat(Array.from(t)):e;return Object.freeze(i)}return s}valueChanged(t,e){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),c.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),c.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!qi)return null;let t=ji.get(this);return t||(t=this.attachInternals(),ji.set(this,t)),t}constructor(...t){super(...t),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(t=>this.proxy.removeEventListener(t,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(t,e,i){this.elementInternals?this.elementInternals.setValidity(t,e,i):"string"==typeof e&&this.proxy.setCustomValidity(e)}formDisabledCallback(t){this.disabled=t}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var t;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(t=>this.proxy.addEventListener(t,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot","form-associated-proxy"),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name","form-associated-proxy")),null===(t=this.shadowRoot)||void 0===t||t.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var t;this.removeChild(this.proxy),null===(t=this.shadowRoot)||void 0===t||t.removeChild(this.proxySlot)}validate(t){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,t)}setFormValue(t,e){this.elementInternals&&this.elementInternals.setFormValue(t,e||t)}_keypressHandler(t){switch(t.key){case"Enter":if(this.form instanceof HTMLFormElement){const t=this.form.querySelector("[type=submit]");null==t||t.click()}}}stopPropagation(t){t.stopPropagation()}};return lt({mode:"boolean"})(e.prototype,"disabled"),lt({mode:"fromView",attribute:"value"})(e.prototype,"initialValue"),lt({attribute:"current-value"})(e.prototype,"currentValue"),lt(e.prototype,"name"),lt({mode:"boolean"})(e.prototype,"required"),v(e.prototype,"value"),e}function Wi(t){class e extends(_i(t)){}class i extends e{checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(t,e){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==t&&this.$emit("change"),this.validate()}currentCheckedChanged(t,e){this.checked=this.currentChecked}constructor(...t){super(t),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}updateForm(){const t=this.checked?this.value:null;this.setFormValue(t,t)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return lt({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),lt({attribute:"current-checked",converter:nt})(i.prototype,"currentChecked"),v(i.prototype,"defaultChecked"),v(i.prototype,"checked"),i}class Ki extends ei{}class Yi extends(_i(Ki)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Xi extends Yi{constructor(){super(...arguments),this.handleClick=t=>{var e;this.disabled&&(null===(e=this.defaultSlottedContent)||void 0===e?void 0:e.length)<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const t=this.proxy.isConnected;t||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{var t;null===(t=this.form)||void 0===t||t.reset()},this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(t=this.$fastController.definition.shadowOptions)||void 0===t?void 0:t.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),"submit"===e&&this.addEventListener("click",this.handleSubmission),"submit"===t&&this.removeEventListener("click",this.handleSubmission),"reset"===e&&this.addEventListener("click",this.handleFormReset),"reset"===t&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var t;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const e=Array.from(null===(t=this.control)||void 0===t?void 0:t.children);e&&e.forEach(t=>{t.addEventListener("click",this.handleClick)})}disconnectedCallback(){var t;super.disconnectedCallback();const e=Array.from(null===(t=this.control)||void 0===t?void 0:t.children);e&&e.forEach(t=>{t.removeEventListener("click",this.handleClick)})}}oe([lt({mode:"boolean"})],Xi.prototype,"autofocus",void 0),oe([lt({attribute:"form"})],Xi.prototype,"formId",void 0),oe([lt],Xi.prototype,"formaction",void 0),oe([lt],Xi.prototype,"formenctype",void 0),oe([lt],Xi.prototype,"formmethod",void 0),oe([lt({mode:"boolean"})],Xi.prototype,"formnovalidate",void 0),oe([lt],Xi.prototype,"formtarget",void 0),oe([lt],Xi.prototype,"type",void 0),oe([v],Xi.prototype,"defaultSlottedContent",void 0);class Gi{}oe([lt({attribute:"aria-expanded"})],Gi.prototype,"ariaExpanded",void 0),oe([lt({attribute:"aria-pressed"})],Gi.prototype,"ariaPressed",void 0),oi(Gi,xi),oi(Xi,Zt,Gi);class Qi{constructor(t){if(this.dayFormat="numeric",this.weekdayFormat="long",this.monthFormat="long",this.yearFormat="numeric",this.date=new Date,t)for(const e in t){const i=t[e];"date"===e?this.date=this.getDateObject(i):this[e]=i}}getDateObject(t){if("string"==typeof t){const e=t.split(/[/-]/);return e.length<3?new Date:new Date(parseInt(e[2],10),parseInt(e[0],10)-1,parseInt(e[1],10))}if("day"in t&&"month"in t&&"year"in t){const{day:e,month:i,year:s}=t;return new Date(s,i-1,e)}return t}getDate(t=this.date,e={weekday:this.weekdayFormat,month:this.monthFormat,day:this.dayFormat,year:this.yearFormat},i=this.locale){const s=this.getDateObject(t);if(!s.getTime())return"";const o=Object.assign({timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},e);return new Intl.DateTimeFormat(i,o).format(s)}getDay(t=this.date.getDate(),e=this.dayFormat,i=this.locale){return this.getDate({month:1,day:t,year:2020},{day:e},i)}getMonth(t=this.date.getMonth()+1,e=this.monthFormat,i=this.locale){return this.getDate({month:t,day:2,year:2020},{month:e},i)}getYear(t=this.date.getFullYear(),e=this.yearFormat,i=this.locale){return this.getDate({month:2,day:2,year:t},{year:e},i)}getWeekday(t=0,e=this.weekdayFormat,i=this.locale){const s=`1-${t+1}-2017`;return this.getDate(s,{weekday:e},i)}getWeekdays(t=this.weekdayFormat,e=this.locale){return Array(7).fill(null).map((i,s)=>this.getWeekday(s,t,e))}}class Zi extends ei{constructor(){super(...arguments),this.dateFormatter=new Qi,this.readonly=!1,this.locale="en-US",this.month=(new Date).getMonth()+1,this.year=(new Date).getFullYear(),this.dayFormat="numeric",this.weekdayFormat="short",this.monthFormat="long",this.yearFormat="numeric",this.minWeeks=0,this.disabledDates="",this.selectedDates="",this.oneDayInMs=864e5}localeChanged(){this.dateFormatter.locale=this.locale}dayFormatChanged(){this.dateFormatter.dayFormat=this.dayFormat}weekdayFormatChanged(){this.dateFormatter.weekdayFormat=this.weekdayFormat}monthFormatChanged(){this.dateFormatter.monthFormat=this.monthFormat}yearFormatChanged(){this.dateFormatter.yearFormat=this.yearFormat}getMonthInfo(t=this.month,e=this.year){const i=t=>new Date(t.getFullYear(),t.getMonth(),1).getDay(),s=t=>{const e=new Date(t.getFullYear(),t.getMonth()+1,1);return new Date(e.getTime()-this.oneDayInMs).getDate()},o=new Date(e,t-1),n=new Date(e,t),r=new Date(e,t-2);return{length:s(o),month:t,start:i(o),year:e,previous:{length:s(r),month:r.getMonth()+1,start:i(r),year:r.getFullYear()},next:{length:s(n),month:n.getMonth()+1,start:i(n),year:n.getFullYear()}}}getDays(t=this.getMonthInfo(),e=this.minWeeks){e=e>10?10:e;const{start:i,length:s,previous:o,next:n}=t,r=[];let a=1-i;for(;a<s+1||r.length<e||r[r.length-1].length%7!=0;){const{month:e,year:i}=a<1?o:a>s?n:t,l=a<1?o.length+a:a>s?a-s:a,h=`${e}-${l}-${i}`,d={day:l,month:e,year:i,disabled:this.dateInString(h,this.disabledDates),selected:this.dateInString(h,this.selectedDates)},c=r[r.length-1];0===r.length||c.length%7==0?r.push([d]):c.push(d),a++}return r}dateInString(t,e){const i=e.split(",").map(t=>t.trim());return t="string"==typeof t?t:`${t.getMonth()+1}-${t.getDate()}-${t.getFullYear()}`,i.some(e=>e===t)}getDayClassNames(t,e){const{day:i,month:s,year:o,disabled:n,selected:r}=t;return["day",e===`${s}-${i}-${o}`&&"today",this.month!==s&&"inactive",n&&"disabled",r&&"selected"].filter(Boolean).join(" ")}getWeekdayText(){const t=this.dateFormatter.getWeekdays().map(t=>({text:t}));if("long"!==this.weekdayFormat){const e=this.dateFormatter.getWeekdays("long");t.forEach((t,i)=>{t.abbr=e[i]})}return t}handleDateSelect(t,e){t.preventDefault,this.$emit("dateselected",e)}handleKeydown(t,e){return"Enter"===t.key&&this.handleDateSelect(t,e),!0}}oe([lt({mode:"boolean"})],Zi.prototype,"readonly",void 0),oe([lt],Zi.prototype,"locale",void 0),oe([lt({converter:rt})],Zi.prototype,"month",void 0),oe([lt({converter:rt})],Zi.prototype,"year",void 0),oe([lt({attribute:"day-format",mode:"fromView"})],Zi.prototype,"dayFormat",void 0),oe([lt({attribute:"weekday-format",mode:"fromView"})],Zi.prototype,"weekdayFormat",void 0),oe([lt({attribute:"month-format",mode:"fromView"})],Zi.prototype,"monthFormat",void 0),oe([lt({attribute:"year-format",mode:"fromView"})],Zi.prototype,"yearFormat",void 0),oe([lt({attribute:"min-weeks",converter:rt})],Zi.prototype,"minWeeks",void 0),oe([lt({attribute:"disabled-dates"})],Zi.prototype,"disabledDates",void 0),oe([lt({attribute:"selected-dates"})],Zi.prototype,"selectedDates",void 0);const Ji={none:"none",default:"default",sticky:"sticky"},ts={default:"default",columnHeader:"columnheader",rowHeader:"rowheader"},es={default:"default",header:"header",stickyHeader:"sticky-header"};class is extends ei{constructor(){super(...arguments),this.rowType=es.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){null!==this.rowData&&this.isActiveRow&&(this.refocusOnLoad=!0)}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),null===this.cellsRepeatBehavior&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new jt(t=>t.columnDefinitions,t=>t.activeCellItemTemplate,{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener("focusout",this.handleFocusout),this.removeEventListener("keydown",this.handleKeydown)}handleFocusout(t){this.contains(t.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(t){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(t.target),this.$emit("row-focused",this)}handleKeydown(t){if(t.defaultPrevented)return;let e=0;switch(t.key){case"ArrowLeft":e=Math.max(0,this.focusColumnIndex-1),this.cellElements[e].focus(),t.preventDefault();break;case"ArrowRight":e=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[e].focus(),t.preventDefault();break;case"Home":t.ctrlKey||(this.cellElements[0].focus(),t.preventDefault());break;case"End":t.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),t.preventDefault())}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===es.default&&void 0!==this.cellItemTemplate?this.cellItemTemplate:this.rowType===es.default&&void 0===this.cellItemTemplate?this.defaultCellItemTemplate:void 0!==this.headerCellItemTemplate?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}}oe([lt({attribute:"grid-template-columns"})],is.prototype,"gridTemplateColumns",void 0),oe([lt({attribute:"row-type"})],is.prototype,"rowType",void 0),oe([v],is.prototype,"rowData",void 0),oe([v],is.prototype,"columnDefinitions",void 0),oe([v],is.prototype,"cellItemTemplate",void 0),oe([v],is.prototype,"headerCellItemTemplate",void 0),oe([v],is.prototype,"rowIndex",void 0),oe([v],is.prototype,"isActiveRow",void 0),oe([v],is.prototype,"activeCellItemTemplate",void 0),oe([v],is.prototype,"defaultCellItemTemplate",void 0),oe([v],is.prototype,"defaultHeaderCellItemTemplate",void 0),oe([v],is.prototype,"cellElements",void 0);const ss=(t,e)=>{const i=function(t){const e=t.tagFor(is);return K`<${e} :rowData="${t=>t}" :cellItemTemplate="${(t,e)=>e.parent.cellItemTemplate}" :headerCellItemTemplate="${(t,e)=>e.parent.headerCellItemTemplate}"></${e}>`}(t),s=t.tagFor(is);return K`<template role="grid" tabindex="0" :rowElementTag="${()=>s}" :defaultRowItemTemplate="${i}" ${Qt({property:"rowElements",filter:Wt("[role=row]")})}><slot></slot></template>`};class os extends ei{static generateTemplateColumns(t){let e="";return t.forEach(t=>{e=`${e}${""===e?"":" "}1fr`}),e}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){null===this.columnDefinitions&&this.rowsData.length>0&&(this.columnDefinitions=os.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){null!==this.columnDefinitions?(this.generatedGridTemplateColumns=os.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())):this.generatedGridTemplateColumns=""}headerCellItemTemplateChanged(){this.$fastController.isConnected&&null!==this.generatedHeader&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}constructor(){super(),this.noTabbing=!1,this.generateHeader=Ji.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(t,e,i)=>{if(0===this.rowElements.length)return this.focusRowIndex=0,void(this.focusColumnIndex=0);const s=Math.max(0,Math.min(this.rowElements.length-1,t)),o=this.rowElements[s].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),n=o[Math.max(0,Math.min(o.length-1,e))];i&&this.scrollHeight!==this.clientHeight&&(s<this.focusRowIndex&&this.scrollTop>0||s>this.focusRowIndex&&this.scrollTop<this.scrollHeight-this.clientHeight)&&n.scrollIntoView({block:"center",inline:"center"}),n.focus()},this.onChildListChange=(t,e)=>{t&&t.length&&(t.forEach(t=>{t.addedNodes.forEach(t=>{1===t.nodeType&&"row"===t.getAttribute("role")&&(t.columnDefinitions=this.columnDefinitions)})}),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,c.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let t=this.gridTemplateColumns;if(void 0===t){if(""===this.generatedGridTemplateColumns&&this.rowElements.length>0){const t=this.rowElements[0];this.generatedGridTemplateColumns=new Array(t.cellElements.length).fill("1fr").join(" ")}t=this.generatedGridTemplateColumns}this.rowElements.forEach((e,i)=>{const s=e;s.rowIndex=i,s.gridTemplateColumns=t,this.columnDefinitionsStale&&(s.columnDefinitions=this.columnDefinitions)}),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}connectedCallback(){super.connectedCallback(),void 0===this.rowItemTemplate&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new jt(t=>t.rowsData,t=>t.rowItemTemplate,{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener("focus",this.handleFocus),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("focusout",this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),c.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener("focus",this.handleFocus),this.removeEventListener("keydown",this.handleKeydown),this.removeEventListener("focusout",this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(t){this.isUpdatingFocus=!0;const e=t.target;this.focusRowIndex=this.rowElements.indexOf(e),this.focusColumnIndex=e.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(t){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(t){null!==t.relatedTarget&&this.contains(t.relatedTarget)||this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(t){if(t.defaultPrevented)return;let e;const i=this.rowElements.length-1,s=this.offsetHeight+this.scrollTop,o=this.rowElements[i];switch(t.key){case"ArrowUp":t.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case"ArrowDown":t.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case"PageUp":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(0===this.focusRowIndex)return void this.focusOnCell(0,this.focusColumnIndex,!1);for(e=this.focusRowIndex-1;e>=0;e--){const t=this.rowElements[e];if(t.offsetTop<this.scrollTop){this.scrollTop=t.offsetTop+t.clientHeight-this.clientHeight;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case"PageDown":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(this.focusRowIndex>=i||o.offsetTop+o.offsetHeight<=s)return void this.focusOnCell(i,this.focusColumnIndex,!1);for(e=this.focusRowIndex+1;e<=i;e++){const t=this.rowElements[e];if(t.offsetTop+t.offsetHeight>s){let e=0;this.generateHeader===Ji.sticky&&null!==this.generatedHeader&&(e=this.generatedHeader.clientHeight),this.scrollTop=t.offsetTop-e;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case"Home":t.ctrlKey&&(t.preventDefault(),this.focusOnCell(0,0,!0));break;case"End":t.ctrlKey&&null!==this.columnDefinitions&&(t.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0))}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||!1===this.pendingFocusUpdate&&(this.pendingFocusUpdate=!0,c.queueUpdate(()=>this.updateFocus()))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(null!==this.generatedHeader&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==Ji.none&&this.rowsData.length>0){const t=document.createElement(this.rowElementTag);return this.generatedHeader=t,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===Ji.sticky?es.stickyHeader:es.header,void(null===this.firstChild&&null===this.rowsPlaceholder||this.insertBefore(t,null!==this.firstChild?this.firstChild:this.rowsPlaceholder))}}}os.generateColumns=t=>Object.getOwnPropertyNames(t).map((t,e)=>({columnDataKey:t,gridColumn:""+e})),oe([lt({attribute:"no-tabbing",mode:"boolean"})],os.prototype,"noTabbing",void 0),oe([lt({attribute:"generate-header"})],os.prototype,"generateHeader",void 0),oe([lt({attribute:"grid-template-columns"})],os.prototype,"gridTemplateColumns",void 0),oe([v],os.prototype,"rowsData",void 0),oe([v],os.prototype,"columnDefinitions",void 0),oe([v],os.prototype,"rowItemTemplate",void 0),oe([v],os.prototype,"cellItemTemplate",void 0),oe([v],os.prototype,"headerCellItemTemplate",void 0),oe([v],os.prototype,"focusRowIndex",void 0),oe([v],os.prototype,"focusColumnIndex",void 0),oe([v],os.prototype,"defaultRowItemTemplate",void 0),oe([v],os.prototype,"rowElementTag",void 0),oe([v],os.prototype,"rowElements",void 0);const ns=K`<template>${t=>null===t.rowData||null===t.columnDefinition||null===t.columnDefinition.columnDataKey?null:t.rowData[t.columnDefinition.columnDataKey]}</template>`,rs=K`<template>${t=>null===t.columnDefinition?null:void 0===t.columnDefinition.title?t.columnDefinition.columnDataKey:t.columnDefinition.title}</template>`;class as extends ei{constructor(){super(...arguments),this.cellType=ts.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(t,e){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){var t;super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("focusout",this.handleFocusout),this.addEventListener("keydown",this.handleKeydown),this.style.gridColumn=""+(void 0===(null===(t=this.columnDefinition)||void 0===t?void 0:t.gridColumn)?0:this.columnDefinition.gridColumn),this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("focusout",this.handleFocusout),this.removeEventListener("keydown",this.handleKeydown),this.disconnectCellView()}handleFocusin(t){if(!this.isActiveCell){switch(this.isActiveCell=!0,this.cellType){case ts.columnHeader:if(null!==this.columnDefinition&&!0!==this.columnDefinition.headerCellInternalFocusQueue&&"function"==typeof this.columnDefinition.headerCellFocusTargetCallback){const t=this.columnDefinition.headerCellFocusTargetCallback(this);null!==t&&t.focus()}break;default:if(null!==this.columnDefinition&&!0!==this.columnDefinition.cellInternalFocusQueue&&"function"==typeof this.columnDefinition.cellFocusTargetCallback){const t=this.columnDefinition.cellFocusTargetCallback(this);null!==t&&t.focus()}}this.$emit("cell-focused",this)}}handleFocusout(t){this===document.activeElement||this.contains(document.activeElement)||(this.isActiveCell=!1)}handleKeydown(t){if(!(t.defaultPrevented||null===this.columnDefinition||this.cellType===ts.default&&!0!==this.columnDefinition.cellInternalFocusQueue||this.cellType===ts.columnHeader&&!0!==this.columnDefinition.headerCellInternalFocusQueue))switch(t.key){case"Enter":case"F2":if(this.contains(document.activeElement)&&document.activeElement!==this)return;switch(this.cellType){case ts.columnHeader:if(void 0!==this.columnDefinition.headerCellFocusTargetCallback){const e=this.columnDefinition.headerCellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}break;default:if(void 0!==this.columnDefinition.cellFocusTargetCallback){const e=this.columnDefinition.cellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}}break;case"Escape":this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),t.preventDefault())}}updateCellView(){if(this.disconnectCellView(),null!==this.columnDefinition)switch(this.cellType){case ts.columnHeader:void 0!==this.columnDefinition.headerCellTemplate?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=rs.render(this,this);break;case void 0:case ts.rowHeader:case ts.default:void 0!==this.columnDefinition.cellTemplate?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=ns.render(this,this)}}disconnectCellView(){null!==this.customCellView&&(this.customCellView.dispose(),this.customCellView=null)}}oe([lt({attribute:"cell-type"})],as.prototype,"cellType",void 0),oe([lt({attribute:"grid-column"})],as.prototype,"gridColumn",void 0),oe([v],as.prototype,"rowData",void 0),oe([v],as.prototype,"columnDefinition",void 0);const ls=(t,e)=>K`<template role="row" class="${t=>"default"!==t.rowType?t.rowType:""}" :defaultCellItemTemplate="${function(t){const e=t.tagFor(as);return K`<${e} cell-type="${t=>t.isRowHeader?"rowheader":void 0}" grid-column="${(t,e)=>e.index+1}" :rowData="${(t,e)=>e.parent.rowData}" :columnDefinition="${t=>t}"></${e}>`}(t)}" :defaultHeaderCellItemTemplate="${function(t){const e=t.tagFor(as);return K`<${e} cell-type="columnheader" grid-column="${(t,e)=>e.index+1}" :columnDefinition="${t=>t}"></${e}>`}(t)}" ${Qt({property:"cellElements",filter:Wt('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')})}><slot ${Xt("slottedCellElements")}></slot></template>`,hs=(t,e)=>K`<template tabindex="-1" role="${t=>t.cellType&&"default"!==t.cellType?t.cellType:"gridcell"}" class=" ${t=>"columnheader"===t.cellType?"column-header":"rowheader"===t.cellType?"row-header":""} "><slot></slot></template>`,ds=K`<div class="title" part="title" aria-label="${t=>t.dateFormatter.getDate(`${t.month}-2-${t.year}`,{month:"long",year:"numeric"})}"><span part="month">${t=>t.dateFormatter.getMonth(t.month)}</span><span part="year">${t=>t.dateFormatter.getYear(t.year)}</span></div>`,cs=t=>{const e=t.tagFor(as);return K`<${e} class="week-day" part="week-day" tabindex="-1" grid-column="${(t,e)=>e.index+1}" abbr="${t=>t.abbr}">${t=>t.text}</${e}>`},us=(t,e)=>{const i=t.tagFor(as);return K`<${i} class="${(t,i)=>i.parentContext.parent.getDayClassNames(t,e)}" part="day" tabindex="-1" role="gridcell" grid-column="${(t,e)=>e.index+1}" @click="${(t,e)=>e.parentContext.parent.handleDateSelect(e.event,t)}" @keydown="${(t,e)=>e.parentContext.parent.handleKeydown(e.event,t)}" aria-label="${(t,e)=>e.parentContext.parent.dateFormatter.getDate(`${t.month}-${t.day}-${t.year}`,{month:"long",day:"numeric"})}"><div class="date" part="${t=>e===`${t.month}-${t.day}-${t.year}`?"today":"date"}">${(t,e)=>e.parentContext.parent.dateFormatter.getDay(t.day)}</div><slot name="${t=>t.month}-${t=>t.day}-${t=>t.year}"></slot></${i}>`},ps=(t,e)=>{const i=t.tagFor(is);return K`<${i} class="week" part="week" role="row" role-type="default" grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr">${_t(t=>t,us(t,e),{positioning:!0})}</${i}>`},ms=(t,e)=>{const i=t.tagFor(os),s=t.tagFor(is);return K`<${i} class="days interact" part="days" generate-header="none"><${s} class="week-days" part="week-days" role="row" row-type="header" grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr">${_t(t=>t.getWeekdayText(),cs(t),{positioning:!0})}</${s}>${_t(t=>t.getDays(),ps(t,e))}</${i}>`},vs=t=>K`<div class="days" part="days"><div class="week-days" part="week-days">${_t(t=>t.getWeekdayText(),K`<div class="week-day" part="week-day" abbr="${t=>t.abbr}">${t=>t.text}</div>`)}</div>${_t(t=>t.getDays(),K`<div class="week">${_t(t=>t,K`<div class="${(e,i)=>i.parentContext.parent.getDayClassNames(e,t)}" part="day" aria-label="${(t,e)=>e.parentContext.parent.dateFormatter.getDate(`${t.month}-${t.day}-${t.year}`,{month:"long",day:"numeric"})}"><div class="date" part="${e=>t===`${e.month}-${e.day}-${e.year}`?"today":"date"}">${(t,e)=>e.parentContext.parent.dateFormatter.getDay(t.day)}</div><slot name="${t=>t.month}-${t=>t.day}-${t=>t.year}"></slot></div>`)}</div>`)}</div>`,fs=(t,e)=>{var i;const s=new Date,o=`${s.getMonth()+1}-${s.getDate()}-${s.getFullYear()}`;return K`<template>${ie} ${e.title instanceof Function?e.title(t,e):null!==(i=e.title)&&void 0!==i?i:""}<slot></slot>${zt(t=>t.readonly,vs(o),ms(t,o))} ${ee}</template>`},gs=(t,e)=>K`<slot></slot>`;class bs extends ei{}const ys=(t,e)=>K`<template role="checkbox" aria-checked="${t=>t.checked}" aria-required="${t=>t.required}" aria-disabled="${t=>t.disabled}" aria-readonly="${t=>t.readOnly}" tabindex="${t=>t.disabled?null:0}" @keypress="${(t,e)=>t.keypressHandler(e.event)}" @click="${(t,e)=>t.clickHandler(e.event)}" class="${t=>t.readOnly?"readonly":""} ${t=>t.checked?"checked":""} ${t=>t.indeterminate?"indeterminate":""}"><div part="control" class="control"><slot name="checked-indicator">${e.checkedIndicator||""}</slot><slot name="indeterminate-indicator">${e.indeterminateIndicator||""}</slot></div><label part="label" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt("defaultSlottedNodes")}></slot></label></template>`;class Cs extends ei{}class xs extends(Wi(Cs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class ws extends xs{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=t=>{if(!this.readOnly)switch(t.key){case" ":this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked}},this.clickHandler=t=>{this.disabled||this.readOnly||(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}}function $s(t){return hi(t)&&("option"===t.getAttribute("role")||t instanceof HTMLOptionElement)}oe([lt({attribute:"readonly",mode:"boolean"})],ws.prototype,"readOnly",void 0),oe([v],ws.prototype,"defaultSlottedNodes",void 0),oe([v],ws.prototype,"indeterminate",void 0);class ks extends ei{checkedChanged(t,e){this.ariaChecked="boolean"!=typeof e?null:e?"true":"false"}contentChanged(t,e){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(t,e){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var t;return null!==(t=this.value)&&void 0!==t?t:this.text}get text(){var t,e;return null!==(e=null===(t=this.textContent)||void 0===t?void 0:t.replace(/\s+/g," ").trim())&&void 0!==e?e:""}set value(t){const e=""+(null!=t?t:"");this._value=e,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=e),m.notify(this,"value")}get value(){var t;return m.track(this,"value"),null!==(t=this._value)&&void 0!==t?t:this.text}get form(){return this.proxy?this.proxy.form:null}constructor(t,e,i,s){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,t&&(this.textContent=t),e&&(this.initialValue=e),i&&(this.defaultSelected=i),s&&(this.selected=s),this.proxy=new Option(""+this.textContent,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}}oe([v],ks.prototype,"checked",void 0),oe([v],ks.prototype,"content",void 0),oe([v],ks.prototype,"defaultSelected",void 0),oe([lt({mode:"boolean"})],ks.prototype,"disabled",void 0),oe([lt({attribute:"selected",mode:"boolean"})],ks.prototype,"selectedAttribute",void 0),oe([v],ks.prototype,"selected",void 0),oe([lt({attribute:"value",mode:"fromView"})],ks.prototype,"initialValue",void 0);class Is{}oe([v],Is.prototype,"ariaChecked",void 0),oe([v],Is.prototype,"ariaPosInSet",void 0),oe([v],Is.prototype,"ariaSelected",void 0),oe([v],Is.prototype,"ariaSetSize",void 0),oi(Is,xi),oi(ks,Zt,Is);class Es extends ei{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var t;return null!==(t=this.selectedOptions[0])&&void 0!==t?t:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every(t=>t.disabled)}get length(){var t,e;return null!==(e=null===(t=this.options)||void 0===t?void 0:t.length)&&void 0!==e?e:0}get options(){return m.track(this,"options"),this._options}set options(t){this._options=t,m.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(t){this.typeaheadExpired=t}clickHandler(t){const e=t.target.closest("option,[role=option]");if(e&&!e.disabled)return this.selectedIndex=this.options.indexOf(e),!0}focusAndScrollOptionIntoView(t=this.firstSelectedOption){this.contains(document.activeElement)&&null!==t&&(t.focus(),requestAnimationFrame(()=>{t.scrollIntoView({block:"nearest"})}))}focusinHandler(t){this.shouldSkipFocus||t.target!==t.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const t=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),e=new RegExp("^"+t,"gi");return this.options.filter(t=>t.text.trim().match(e))}getSelectableIndex(t=this.selectedIndex,e){const i=t>e?-1:t<e?1:0,s=t+i;let o=null;switch(i){case-1:o=this.options.reduceRight((t,e,i)=>!t&&!e.disabled&&i<s?e:t,o);break;case 1:o=this.options.reduce((t,e,i)=>!t&&!e.disabled&&i>s?e:t,o)}return this.options.indexOf(o)}handleChange(t,e){switch(e){case"selected":Es.slottedOptionFilter(t)&&(this.selectedIndex=this.options.indexOf(t)),this.setSelectedOptions()}}handleTypeAhead(t){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,Es.TYPE_AHEAD_TIMEOUT_MS),t.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${t}`)}keydownHandler(t){if(this.disabled)return!0;this.shouldSkipFocus=!1;const e=t.key;switch(e){case"Home":t.shiftKey||(t.preventDefault(),this.selectFirstOption());break;case"ArrowDown":t.shiftKey||(t.preventDefault(),this.selectNextOption());break;case"ArrowUp":t.shiftKey||(t.preventDefault(),this.selectPreviousOption());break;case"End":t.preventDefault(),this.selectLastOption();break;case"Tab":return this.focusAndScrollOptionIntoView(),!0;case"Enter":case"Escape":return!0;case" ":if(this.typeaheadExpired)return!0;default:return 1===e.length&&this.handleTypeAhead(""+e),!0}}mousedownHandler(t){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null}selectedIndexChanged(t,e){var i;if(this.hasSelectableOptions){if((null===(i=this.options[this.selectedIndex])||void 0===i?void 0:i.disabled)&&"number"==typeof t){const i=this.getSelectableIndex(t,e),s=i>-1?i:t;return this.selectedIndex=s,void(e===s&&this.selectedIndexChanged(e,s))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(t,e){var i;const s=e.filter(Es.slottedOptionFilter);null===(i=this.options)||void 0===i||i.forEach(t=>{const e=m.getNotifier(t);e.unsubscribe(this,"selected"),t.selected=s.includes(t),e.subscribe(this,"selected")})}selectFirstOption(){var t,e;this.disabled||(this.selectedIndex=null!==(e=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>!t.disabled))&&void 0!==e?e:-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(t,e){let i=t.length;for(;i--;)if(e(t[i],i,t))return i;return-1}(this.options,t=>!t.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var t,e;this.selectedIndex=null!==(e=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.defaultSelected))&&void 0!==e?e:-1}setSelectedOptions(){var t,e,i;(null===(t=this.options)||void 0===t?void 0:t.length)&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=null!==(i=null===(e=this.firstSelectedOption)||void 0===e?void 0:e.id)&&void 0!==i?i:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(t,e){this.options=e.reduce((t,e)=>($s(e)&&t.push(e),t),[]);const i=""+this.options.length;this.options.forEach((t,e)=>{t.id||(t.id=gi("option-")),t.ariaPosInSet=""+(e+1),t.ariaSetSize=i}),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(t,e){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches();if(t.length){const e=this.options.indexOf(t[0]);e>-1&&(this.selectedIndex=e)}this.typeaheadExpired=!1}}}Es.slottedOptionFilter=t=>$s(t)&&!t.hidden,Es.TYPE_AHEAD_TIMEOUT_MS=1e3,oe([lt({mode:"boolean"})],Es.prototype,"disabled",void 0),oe([v],Es.prototype,"selectedIndex",void 0),oe([v],Es.prototype,"selectedOptions",void 0),oe([v],Es.prototype,"slottedOptions",void 0),oe([v],Es.prototype,"typeaheadBuffer",void 0);class Ts{}oe([v],Ts.prototype,"ariaActiveDescendant",void 0),oe([v],Ts.prototype,"ariaDisabled",void 0),oe([v],Ts.prototype,"ariaExpanded",void 0),oe([v],Ts.prototype,"ariaMultiSelectable",void 0),oi(Ts,xi),oi(Es,Ts);const Os={above:"above",below:"below"};class Ss extends Es{}class Rs extends(_i(Ss)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const As={inline:"inline",list:"list",both:"both",none:"none"};class Ds extends Rs{constructor(){super(...arguments),this._value="",this.filteredOptions=[],this.filter="",this.forcedPosition=!1,this.listboxId=gi("listbox-"),this.maxHeight=0,this.open=!1}formResetCallback(){super.formResetCallback(),this.setDefaultSelectedOption(),this.updateValue()}validate(){super.validate(this.control)}get isAutocompleteInline(){return this.autocomplete===As.inline||this.isAutocompleteBoth}get isAutocompleteList(){return this.autocomplete===As.list||this.isAutocompleteBoth}get isAutocompleteBoth(){return this.autocomplete===As.both}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),void c.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}get options(){return m.track(this,"options"),this.filteredOptions.length?this.filteredOptions:this._options}set options(t){this._options=t,m.notify(this,"options")}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}get value(){return m.track(this,"value"),this._value}set value(t){var e,i,s;const o=""+this._value;if(this.$fastController.isConnected&&this.options){const o=this.options.findIndex(e=>e.text.toLowerCase()===t.toLowerCase()),n=null===(e=this.options[this.selectedIndex])||void 0===e?void 0:e.text,r=null===(i=this.options[o])||void 0===i?void 0:i.text;this.selectedIndex=n!==r?o:this.selectedIndex,t=(null===(s=this.firstSelectedOption)||void 0===s?void 0:s.text)||t}o!==t&&(this._value=t,super.valueChanged(o,t),m.notify(this,"value"))}clickHandler(t){const e=t.target.closest("option,[role=option]");if(!this.disabled&&!(null==e?void 0:e.disabled)){if(this.open){if(t.composedPath()[0]===this.control)return;e&&(this.selectedOptions=[e],this.control.value=e.text,this.clearSelectionRange(),this.updateValue(!0))}return this.open=!this.open,this.open&&this.control.focus(),!0}}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.value&&(this.initialValue=this.value)}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}filterOptions(){this.autocomplete&&this.autocomplete!==As.none||(this.filter="");const t=this.filter.toLowerCase();this.filteredOptions=this._options.filter(t=>t.text.toLowerCase().startsWith(this.filter.toLowerCase())),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(t=>{t.hidden=!this.filteredOptions.includes(t)}))}focusAndScrollOptionIntoView(){this.contains(document.activeElement)&&(this.control.focus(),this.firstSelectedOption&&requestAnimationFrame(()=>{var t;null===(t=this.firstSelectedOption)||void 0===t||t.scrollIntoView({block:"nearest"})}))}focusoutHandler(t){if(this.syncValue(),!this.open)return!0;const e=t.relatedTarget;this.isSameNode(e)?this.focus():this.options&&this.options.includes(e)||(this.open=!1)}inputHandler(t){if(this.filter=this.control.value,this.filterOptions(),this.isAutocompleteInline||(this.selectedIndex=this.options.map(t=>t.text).indexOf(this.control.value)),t.inputType.includes("deleteContent")||!this.filter.length)return!0;this.isAutocompleteList&&!this.open&&(this.open=!0),this.isAutocompleteInline&&(this.filteredOptions.length?(this.selectedOptions=[this.filteredOptions[0]],this.selectedIndex=this.options.indexOf(this.firstSelectedOption),this.setInlineSelection()):this.selectedIndex=-1)}keydownHandler(t){const e=t.key;if(t.ctrlKey||t.shiftKey)return!0;switch(e){case"Enter":this.syncValue(),this.isAutocompleteInline&&(this.filter=this.value),this.open=!1,this.clearSelectionRange();break;case"Escape":if(this.isAutocompleteInline||(this.selectedIndex=-1),this.open){this.open=!1;break}this.value="",this.control.value="",this.filter="",this.filterOptions();break;case"Tab":if(this.setInputToSelection(),!this.open)return!0;t.preventDefault(),this.open=!1;break;case"ArrowUp":case"ArrowDown":if(this.filterOptions(),!this.open){this.open=!0;break}this.filteredOptions.length>0&&super.keydownHandler(t),this.isAutocompleteInline&&this.setInlineSelection();break;default:return!0}}keyupHandler(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"Backspace":case"Delete":case"Home":case"End":this.filter=this.control.value,this.selectedIndex=-1,this.filterOptions()}}selectedIndexChanged(t,e){if(this.$fastController.isConnected){if((e=mi(-1,this.options.length-1,e))!==this.selectedIndex)return void(this.selectedIndex=e);super.selectedIndexChanged(t,e)}}selectPreviousOption(){!this.disabled&&this.selectedIndex>=0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){if(this.$fastController.isConnected&&this.options){const t=this.options.findIndex(t=>null!==t.getAttribute("selected")||t.selected);this.selectedIndex=t,!this.dirtyValue&&this.firstSelectedOption&&(this.value=this.firstSelectedOption.text),this.setSelectedOptions()}}setInputToSelection(){this.firstSelectedOption&&(this.control.value=this.firstSelectedOption.text,this.control.focus())}setInlineSelection(){this.firstSelectedOption&&(this.setInputToSelection(),this.control.setSelectionRange(this.filter.length,this.control.value.length,"backward"))}syncValue(){var t;const e=this.selectedIndex>-1?null===(t=this.firstSelectedOption)||void 0===t?void 0:t.text:this.control.value;this.updateValue(this.value!==e)}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Os.above:Os.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Os.above?~~t.top:~~e}selectedOptionsChanged(t,e){this.$fastController.isConnected&&this._options.forEach(t=>{t.selected=e.includes(t)})}slottedOptionsChanged(t,e){super.slottedOptionsChanged(t,e),this.updateValue()}updateValue(t){var e;this.$fastController.isConnected&&(this.value=(null===(e=this.firstSelectedOption)||void 0===e?void 0:e.text)||this.control.value,this.control.value=this.value),t&&this.$emit("change")}clearSelectionRange(){const t=this.control.value.length;this.control.setSelectionRange(t,t)}}oe([lt({attribute:"autocomplete",mode:"fromView"})],Ds.prototype,"autocomplete",void 0),oe([v],Ds.prototype,"maxHeight",void 0),oe([lt({attribute:"open",mode:"boolean"})],Ds.prototype,"open",void 0),oe([lt],Ds.prototype,"placeholder",void 0),oe([lt({attribute:"position"})],Ds.prototype,"positionAttribute",void 0),oe([v],Ds.prototype,"position",void 0);class Fs{}oe([v],Fs.prototype,"ariaAutoComplete",void 0),oe([v],Fs.prototype,"ariaControls",void 0),oi(Fs,Ts),oi(Ds,Zt,Fs);const Ls=(t,e)=>K`<template aria-disabled="${t=>t.ariaDisabled}" autocomplete="${t=>t.autocomplete}" class="${t=>t.open?"open":""} ${t=>t.disabled?"disabled":""} ${t=>t.position}" ?open="${t=>t.open}" tabindex="${t=>t.disabled?null:"0"}" @click="${(t,e)=>t.clickHandler(e.event)}" @focusout="${(t,e)=>t.focusoutHandler(e.event)}" @keydown="${(t,e)=>t.keydownHandler(e.event)}"><div class="control" part="control">${te(0,e)}<slot name="control"><input aria-activedescendant="${t=>t.open?t.ariaActiveDescendant:null}" aria-autocomplete="${t=>t.ariaAutoComplete}" aria-controls="${t=>t.ariaControls}" aria-disabled="${t=>t.ariaDisabled}" aria-expanded="${t=>t.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${t=>t.placeholder}" role="combobox" type="text" ?disabled="${t=>t.disabled}" :value="${t=>t.value}" @input="${(t,e)=>t.inputHandler(e.event)}" @keyup="${(t,e)=>t.keyupHandler(e.event)}" ${Pt("control")} /><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${e.indicator||""}</slot></div></slot>${Jt(0,e)}</div><div class="listbox" id="${t=>t.listboxId}" part="listbox" role="listbox" ?disabled="${t=>t.disabled}" ?hidden="${t=>!t.open}" ${Pt("listbox")}><slot ${Xt({filter:Es.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`;function Ps(t){const e=t.parentElement;if(e)return e;{const e=t.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function Ms(t,e){let i=e;for(;null!==i;){if(i===t)return!0;i=Ps(i)}return!1}const Vs=document.createElement("div");class Hs{setProperty(t,e){c.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){c.queueUpdate(()=>this.target.removeProperty(t))}}class zs extends Hs{constructor(){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}}class Ns extends Hs{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:t}=this.style;if(t){const e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}}class Bs{targetChanged(){if(null!==this.target)for(const[t,e]of this.store.entries())this.target.setProperty(t,e)}constructor(t){this.store=new Map,this.target=null;const e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),m.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}setProperty(t,e){this.store.set(t,e),c.queueUpdate(()=>{null!==this.target&&this.target.setProperty(t,e)})}removeProperty(t){this.store.delete(t),c.queueUpdate(()=>{null!==this.target&&this.target.removeProperty(t)})}handleChange(t,e){const{sheet:i}=this.style;if(i){const t=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[t].style}else this.target=null}}oe([v],Bs.prototype,"target",void 0);class Us{constructor(t){this.target=t.style}setProperty(t,e){c.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){c.queueUpdate(()=>this.target.removeProperty(t))}}class qs{setProperty(t,e){qs.properties[t]=e;for(const i of qs.roots.values())Ws.getOrCreate(qs.normalizeRoot(i)).setProperty(t,e)}removeProperty(t){delete qs.properties[t];for(const e of qs.roots.values())Ws.getOrCreate(qs.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){const{roots:e}=qs;if(!e.has(t)){e.add(t);const i=Ws.getOrCreate(this.normalizeRoot(t));for(const t in qs.properties)i.setProperty(t,qs.properties[t])}}static unregisterRoot(t){const{roots:e}=qs;if(e.has(t)){e.delete(t);const i=Ws.getOrCreate(qs.normalizeRoot(t));for(const t in qs.properties)i.removeProperty(t)}}static normalizeRoot(t){return t===Vs?document:t}}qs.roots=new Set,qs.properties={};const js=new WeakMap,_s=c.supportsAdoptedStyleSheets?class extends Hs{constructor(t){super();const e=new CSSStyleSheet;e[Q]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(Y.create([e]))}}:Bs,Ws=Object.freeze({getOrCreate(t){if(js.has(t))return js.get(t);let e;return t===Vs?e=new qs:t instanceof Document?e=c.supportsAdoptedStyleSheets?new zs:new Ns:e=t instanceof bt?new _s(t):new Us(t),js.set(t,e),e}});class Ks extends Ct{get appliedTo(){return[...this._appliedTo]}static from(t){return new Ks({name:"string"==typeof t?t:t.name,cssCustomPropertyName:"string"==typeof t?t:void 0===t.cssCustomPropertyName?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return"string"==typeof t.cssCustomProperty}static isDerivedDesignTokenValue(t){return"function"==typeof t}static getTokenById(t){return Ks.tokensById.get(t)}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,null!==t.cssCustomPropertyName&&(this.cssCustomProperty="--"+t.cssCustomPropertyName,this.cssVar=`var(${this.cssCustomProperty})`),this.id=Ks.uniqueId(),Ks.tokensById.set(this.id,this)}createCSS(){return this.cssVar||""}getValueFor(t){const e=Zs.getOrCreate(t).get(this);if(void 0!==e)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof Ks&&(e=this.alias(e)),Zs.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),Zs.existsFor(t)&&Zs.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(Vs,t),this}subscribe(t,e){const i=this.getOrCreateSubscriberSet(e);e&&!Zs.existsFor(e)&&Zs.getOrCreate(e),i.has(t)||i.add(t)}unsubscribe(t,e){const i=this.subscribers.get(e||this);i&&i.has(t)&&i.delete(t)}notify(t){const e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach(t=>t.handleChange(e)),this.subscribers.has(t)&&this.subscribers.get(t).forEach(t=>t.handleChange(e))}alias(t){return e=>t.getValueFor(e)}}Ks.uniqueId=(()=>{let t=0;return()=>(t++,t.toString(16))})(),Ks.tokensById=new Map;class Ys{constructor(t,e,i){this.source=t,this.token=e,this.node=i,this.dependencies=new Set,this.observer=m.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,y))}catch(t){console.error(t)}}}class Xs{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),m.getNotifier(this).notify(t.id))}get(t){return m.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),m.getNotifier(this).notify(t.id)}all(){return this.values.entries()}}const Gs=new WeakMap,Qs=new WeakMap;class Zs{static getOrCreate(t){return Gs.get(t)||new Zs(t)}static existsFor(t){return Gs.has(t)}static findParent(t){if(Vs!==t.target){let e=Ps(t.target);for(;null!==e;){if(Gs.has(e))return Gs.get(e);e=Ps(e)}return Zs.getOrCreate(Vs)}return null}static findClosestAssignedNode(t,e){let i=e;do{if(i.has(t))return i;i=i.parent?i.parent:i.target!==Vs?Zs.getOrCreate(Vs):null}while(null!==i);return null}get parent(){return Qs.get(this)||null}updateCSSTokenReflection(t,e){if(Ks.isCSSDesignToken(e)){const i=this.parent,s=this.isReflecting(e);if(i){const o=i.get(e),n=t.get(e);o===n||s?o===n&&s&&this.stopReflectToCSS(e):this.reflectToCSS(e)}else s||this.reflectToCSS(e)}}constructor(t){this.target=t,this.store=new Xs,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(t,e)=>{const i=Ks.getTokenById(e);i&&(i.notify(this.target),this.updateCSSTokenReflection(t,i))}},Gs.set(t,this),m.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof bt?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}has(t){return this.assignedValues.has(t)}get(t){const e=this.store.get(t);if(void 0!==e)return e;const i=this.getRaw(t);return void 0!==i?(this.hydrate(t,i),this.get(t)):void 0}getRaw(t){var e;return this.assignedValues.has(t)?this.assignedValues.get(t):null===(e=Zs.findClosestAssignedNode(t,this))||void 0===e?void 0:e.getRaw(t)}set(t,e){Ks.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),Ks.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);const e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){const t=Zs.findParent(this);t&&t.appendChild(this);for(const t of this.assignedValues.keys())t.notify(this.target)}unbind(){if(this.parent){Qs.get(this).removeChild(this)}for(const t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&Qs.get(t).removeChild(t);const e=this.children.filter(e=>t.contains(e));Qs.set(t,this),this.children.push(t),e.forEach(e=>t.appendChild(e)),m.getNotifier(this.store).subscribe(t);for(const[e,i]of this.store.all())t.hydrate(e,this.bindingObservers.has(e)?this.getRaw(e):i),t.updateCSSTokenReflection(t.store,e)}removeChild(t){const e=this.children.indexOf(t);if(-1!==e&&this.children.splice(e,1),m.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;const i=Qs.delete(t);for(const[e]of this.store.all())t.hydrate(e,t.getRaw(e)),t.updateCSSTokenReflection(t.store,e);return i}contains(t){return Ms(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),Zs.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),Zs.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){const i=Ks.getTokenById(e);i&&(this.hydrate(i,this.getRaw(i)),this.updateCSSTokenReflection(this.store,i))}hydrate(t,e){if(!this.has(t)){const i=this.bindingObservers.get(t);Ks.isDerivedDesignTokenValue(e)?i?i.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(i&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){const i=new Ys(e,t,this);return this.bindingObservers.set(t,i),i}tearDownBindingObserver(t){return!!this.bindingObservers.has(t)&&(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0)}}Zs.cssCustomPropertyReflector=new class{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){const{token:e,target:i}=t;this.add(e,i)}add(t,e){Ws.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(Zs.getOrCreate(e).get(t)))}remove(t,e){Ws.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&"function"==typeof t.createCSS?t.createCSS():t}},oe([v],Zs.prototype,"children",void 0);const Js=Object.freeze({create:function(t){return Ks.from(t)},notifyConnection:t=>!(!t.isConnected||!Zs.existsFor(t))&&(Zs.getOrCreate(t).bind(),!0),notifyDisconnection:t=>!(t.isConnected||!Zs.existsFor(t))&&(Zs.getOrCreate(t).unbind(),!0),registerRoot(t=Vs){qs.registerRoot(t)},unregisterRoot(t=Vs){qs.unregisterRoot(t)}}),to=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),eo=new Map,io=new Map;let so=null;const oo=pe.createInterface(t=>t.cachedCallback(t=>(null===so&&(so=new ro(null,t)),so))),no=Object.freeze({tagFor:t=>io.get(t),responsibleFor(t){const e=t.$$designSystem$$;if(e)return e;return pe.findResponsibleContainer(t).get(oo)},getOrCreate(t){if(!t)return null===so&&(so=pe.getOrCreateDOMContainer().get(oo)),so;const e=t.$$designSystem$$;if(e)return e;const i=pe.getOrCreateDOMContainer(t);if(i.has(oo,!1))return i.get(oo);{const e=new ro(t,i);return i.register(qe.instance(oo,e)),e}}});class ro{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>to.definitionCallbackOnly,null!==t&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){const e=this.container,i=[],s=this.disambiguate,o=this.shadowRootMode,n={elementPrefix:this.prefix,tryDefineElement(t,n,r){const a=function(t,e,i){return"string"==typeof t?{name:t,type:e,callback:i}:t}(t,n,r),{name:l,callback:h,baseClass:d}=a;let{type:c}=a,u=l,p=eo.get(u),m=!0;for(;p;){const t=s(u,c,p);switch(t){case to.ignoreDuplicate:return;case to.definitionCallbackOnly:m=!1,p=void 0;break;default:u=t,p=eo.get(u)}}m&&((io.has(c)||c===ei)&&(c=class extends c{}),eo.set(u,c),io.set(c,u),d&&io.set(d,u)),i.push(new ao(e,u,c,o,h,m))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&Js.registerRoot(this.designTokenRoot)),e.registerWithContext(n,...t);for(const t of i)t.callback(t),t.willDefine&&null!==t.definition&&t.definition.define();return this}}class ao{constructor(t,e,i,s,o,n){this.container=t,this.name=e,this.type=i,this.shadowRootMode=s,this.callback=o,this.willDefine=n,this.definition=null}definePresentation(t){Je.define(this.name,t,this.container)}defineElement(t){this.definition=new ut(this.type,Object.assign(Object.assign({},t),{name:this.name}))}tagFor(t){return no.tagFor(t)}}const lo=(t,e)=>K`<div class="positioning-region" part="positioning-region">${zt(t=>t.modal,K`<div class="overlay" part="overlay" role="presentation" @click="${t=>t.dismiss()}"></div>`)}<div role="dialog" tabindex="-1" class="control" part="control" aria-modal="${t=>t.modal}" aria-describedby="${t=>t.ariaDescribedby}" aria-labelledby="${t=>t.ariaLabelledby}" aria-label="${t=>t.ariaLabel}" ${Pt("dialog")}><slot></slot></div></div>`
|
|
16
|
+
/*!
|
|
17
|
+
* tabbable 5.3.3
|
|
18
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
19
|
+
*/;var ho=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],co=ho.join(","),uo="undefined"==typeof Element,po=uo?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,mo=!uo&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},vo=function(t){return"INPUT"===t.tagName},fo=function(t){return function(t){return vo(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||mo(t),s=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=s(window.CSS.escape(t.name));else try{e=s(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},go=function(t){var e=t.getBoundingClientRect(),i=e.width,s=e.height;return 0===i&&0===s},bo=function(t,e){return!(e.disabled||function(t){return vo(t)&&"hidden"===t.type}(e)||function(t,e){var i=e.displayCheck,s=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=po.call(t,"details>summary:first-of-type")?t.parentElement:t;if(po.call(o,"details:not([open]) *"))return!0;var n=mo(t).host,r=(null==n?void 0:n.ownerDocument.contains(n))||t.ownerDocument.contains(t);if(i&&"full"!==i){if("non-zero-area"===i)return go(t)}else{if("function"==typeof s){for(var a=t;t;){var l=t.parentElement,h=mo(t);if(l&&!l.shadowRoot&&!0===s(l))return go(t);t=t.assignedSlot?t.assignedSlot:l||h===t.ownerDocument?l:h.host}t=a}if(r)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var s=e.children.item(i);if("LEGEND"===s.tagName)return!!po.call(e,"fieldset[disabled] *")||!s.contains(t)}return!0}e=e.parentElement}return!1}(e))},yo=function(t,e){return!(fo(e)||function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex}(e)<0||!bo(t,e))},Co=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==po.call(t,co)&&yo(e,t)},xo=ho.concat("iframe").join(","),wo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==po.call(t,xo)&&bo(e,t)};class $o extends ei{constructor(){super(...arguments),this.modal=!0,this.hidden=!1,this.trapFocus=!0,this.trapFocusChanged=()=>{this.$fastController.isConnected&&this.updateTrapFocus()},this.isTrappingFocus=!1,this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&!this.hidden)switch(t.key){case"Escape":this.dismiss(),t.preventDefault();break;case"Tab":this.handleTabKeyDown(t)}},this.handleDocumentFocus=t=>{!t.defaultPrevented&&this.shouldForceFocus(t.target)&&(this.focusFirstElement(),t.preventDefault())},this.handleTabKeyDown=t=>{if(!this.trapFocus||this.hidden)return;const e=this.getTabQueueBounds();return 0!==e.length?1===e.length?(e[0].focus(),void t.preventDefault()):void(t.shiftKey&&t.target===e[0]?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(e[0].focus(),t.preventDefault())):void 0},this.getTabQueueBounds=()=>$o.reduceTabbableItems([],this),this.focusFirstElement=()=>{const t=this.getTabQueueBounds();t.length>0?t[0].focus():this.dialog instanceof HTMLElement&&this.dialog.focus()},this.shouldForceFocus=t=>this.isTrappingFocus&&!this.contains(t),this.shouldTrapFocus=()=>this.trapFocus&&!this.hidden,this.updateTrapFocus=t=>{const e=void 0===t?this.shouldTrapFocus():t;e&&!this.isTrappingFocus?(this.isTrappingFocus=!0,document.addEventListener("focusin",this.handleDocumentFocus),c.queueUpdate(()=>{this.shouldForceFocus(document.activeElement)&&this.focusFirstElement()})):!e&&this.isTrappingFocus&&(this.isTrappingFocus=!1,document.removeEventListener("focusin",this.handleDocumentFocus))}}dismiss(){this.$emit("dismiss"),this.$emit("cancel")}show(){this.hidden=!1}hide(){this.hidden=!0,this.$emit("close")}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleDocumentKeydown),this.notifier=m.getNotifier(this),this.notifier.subscribe(this,"hidden"),this.updateTrapFocus()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeydown),this.updateTrapFocus(!1),this.notifier.unsubscribe(this,"hidden")}handleChange(t,e){switch(e){case"hidden":this.updateTrapFocus()}}static reduceTabbableItems(t,e){return"-1"===e.getAttribute("tabindex")?t:Co(e)||$o.isFocusableFastElement(e)&&$o.hasTabbableShadow(e)?(t.push(e),t):e.childElementCount?t.concat(Array.from(e.children).reduce($o.reduceTabbableItems,[])):t}static isFocusableFastElement(t){var e,i;return!!(null===(i=null===(e=t.$fastController)||void 0===e?void 0:e.definition.shadowOptions)||void 0===i?void 0:i.delegatesFocus)}static hasTabbableShadow(t){var e,i;return Array.from(null!==(i=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelectorAll("*"))&&void 0!==i?i:[]).some(t=>Co(t))}}oe([lt({mode:"boolean"})],$o.prototype,"modal",void 0),oe([lt({mode:"boolean"})],$o.prototype,"hidden",void 0),oe([lt({attribute:"trap-focus",mode:"boolean"})],$o.prototype,"trapFocus",void 0),oe([lt({attribute:"aria-describedby"})],$o.prototype,"ariaDescribedby",void 0),oe([lt({attribute:"aria-labelledby"})],$o.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-label"})],$o.prototype,"ariaLabel",void 0);const ko=new MutationObserver(t=>{for(const e of t)Io.getOrCreateFor(e.target).notify(e.attributeName)});class Io extends u{subscribe(t){super.subscribe(t),this.watchedAttributes.has(t.attributes)||(this.watchedAttributes.add(t.attributes),this.observe())}constructor(t){super(t),this.watchedAttributes=new Set,Io.subscriberCache.set(t,this)}unsubscribe(t){super.unsubscribe(t),this.watchedAttributes.has(t.attributes)&&(this.watchedAttributes.delete(t.attributes),this.observe())}static getOrCreateFor(t){return this.subscriberCache.get(t)||new Io(t)}observe(){const t=[];for(const e of this.watchedAttributes.values())for(let i=0;i<e.length;i++)t.push(e[i]);ko.observe(this.source,{attributeFilter:t})}}Io.subscriberCache=new WeakMap;class Eo{constructor(t,e){this.target=t,this.attributes=Object.freeze(e)}bind(t){if(Io.getOrCreateFor(t).subscribe(this),t.hasAttributes())for(let e=0;e<t.attributes.length;e++)this.handleChange(t,t.attributes[e].name)}unbind(t){Io.getOrCreateFor(t).unsubscribe(this)}handleChange(t,e){this.attributes.includes(e)&&c.setAttribute(this.target,e,t.getAttribute(e))}}function To(...t){return new w("fast-reflect-attr",Eo,t)}const Oo=(t,e)=>K`<details class="disclosure" ${Pt("details")}><summary class="invoker" role="button" aria-controls="disclosure-content" aria-expanded="${t=>t.expanded}"><slot name="start"></slot><slot name="title">${t=>t.title}</slot><slot name="end"></slot></summary><div id="disclosure-content"><slot></slot></div></details>`;class So extends ei{connectedCallback(){super.connectedCallback(),this.setup()}disconnectedCallback(){super.disconnectedCallback(),this.details.removeEventListener("toggle",this.onToggle)}show(){this.details.open=!0}hide(){this.details.open=!1}toggle(){this.details.open=!this.details.open}setup(){this.onToggle=this.onToggle.bind(this),this.details.addEventListener("toggle",this.onToggle),this.expanded&&this.show()}onToggle(){this.expanded=this.details.open,this.$emit("toggle")}}oe([lt({mode:"boolean"})],So.prototype,"expanded",void 0),oe([lt],So.prototype,"title",void 0);const Ro=(t,e)=>K`<template role="${t=>t.role}" aria-orientation="${t=>t.orientation}"></template>`,Ao={separator:"separator",presentation:"presentation"};class Do extends ei{constructor(){super(...arguments),this.role=Ao.separator,this.orientation=ai}}oe([lt],Do.prototype,"role",void 0),oe([lt],Do.prototype,"orientation",void 0);const Fo={next:"next",previous:"previous"},Lo=(t,e)=>K`<template role="button" aria-disabled="${t=>!!t.disabled||void 0}" tabindex="${t=>t.hiddenFromAT?-1:0}" class="${t=>t.direction} ${t=>t.disabled?"disabled":""}" @keyup="${(t,e)=>t.keyupHandler(e.event)}">${zt(t=>t.direction===Fo.next,K`<span part="next" class="next"><slot name="next">${e.next||""}</slot></span>`)} ${zt(t=>t.direction===Fo.previous,K`<span part="previous" class="previous"><slot name="previous">${e.previous||""}</slot></span>`)}</template>`;class Po extends ei{constructor(){super(...arguments),this.hiddenFromAT=!0,this.direction=Fo.next}keyupHandler(t){if(!this.hiddenFromAT){const e=t.key;"Enter"!==e&&"Space"!==e||this.$emit("click",t),"Escape"===e&&this.blur()}}}oe([lt({mode:"boolean"})],Po.prototype,"disabled",void 0),oe([lt({attribute:"aria-hidden",converter:nt})],Po.prototype,"hiddenFromAT",void 0),oe([lt],Po.prototype,"direction",void 0);const Mo=(t,e)=>K`<template aria-checked="${t=>t.ariaChecked}" aria-disabled="${t=>t.ariaDisabled}" aria-posinset="${t=>t.ariaPosInSet}" aria-selected="${t=>t.ariaSelected}" aria-setsize="${t=>t.ariaSetSize}" class="${t=>[t.checked&&"checked",t.selected&&"selected",t.disabled&&"disabled"].filter(Boolean).join(" ")}" role="option">${te(0,e)}<span class="content" part="content"><slot ${Xt("content")}></slot></span>${Jt(0,e)}</template>`;class Vo extends Es{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var t;return null===(t=this.options)||void 0===t?void 0:t.filter(t=>t.checked)}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(t,e){var i,s;this.ariaActiveDescendant=null!==(s=null===(i=this.options[e])||void 0===i?void 0:i.id)&&void 0!==s?s:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const t=this.activeOption;t&&(t.checked=!0)}checkFirstOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach((t,e)=>{t.checked=vi(e,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((t,e)=>{t.checked=vi(e,this.rangeStartIndex,this.options.length)})):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((t,e)=>{t.checked=vi(e,this.rangeStartIndex,this.activeIndex+1)})):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),1===this.checkedOptions.length&&(this.rangeStartIndex+=1),this.options.forEach((t,e)=>{t.checked=vi(e,this.activeIndex,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(t){var e;if(!this.multiple)return super.clickHandler(t);const i=null===(e=t.target)||void 0===e?void 0:e.closest("[role=option]");return i&&!i.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(i),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(t){if(!this.multiple)return super.focusinHandler(t);this.shouldSkipFocus||t.target!==t.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(t){this.multiple&&this.uncheckAllOptions()}keydownHandler(t){if(!this.multiple)return super.keydownHandler(t);if(this.disabled)return!0;const{key:e,shiftKey:i}=t;switch(this.shouldSkipFocus=!1,e){case"Home":return void this.checkFirstOption(i);case"ArrowDown":return void this.checkNextOption(i);case"ArrowUp":return void this.checkPreviousOption(i);case"End":return void this.checkLastOption(i);case"Tab":return this.focusAndScrollOptionIntoView(),!0;case"Escape":return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case" ":if(t.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===e.length&&this.handleTypeAhead(""+e),!0}}mousedownHandler(t){if(t.offsetX>=0&&t.offsetX<=this.scrollWidth)return super.mousedownHandler(t)}multipleChanged(t,e){var i;this.ariaMultiSelectable=e?"true":null,null===(i=this.options)||void 0===i||i.forEach(t=>{t.checked=!e&&void 0}),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter(t=>t.selected),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(t,e){var i;const s=Math.max(0,parseInt(null!==(i=null==e?void 0:e.toFixed())&&void 0!==i?i:"",10));s!==e&&c.queueUpdate(()=>{this.size=s})}toggleSelectedForAllCheckedOptions(){const t=this.checkedOptions.filter(t=>!t.disabled),e=!t.every(t=>t.selected);t.forEach(t=>t.selected=e),this.selectedIndex=this.options.indexOf(t[t.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(t,e){if(this.multiple){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches(),e=this.options.indexOf(t[0]);e>-1&&(this.activeIndex=e,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(t,e)}uncheckAllOptions(t=!1){this.options.forEach(t=>t.checked=!this.multiple&&void 0),t||(this.rangeStartIndex=-1)}}oe([v],Vo.prototype,"activeIndex",void 0),oe([lt({mode:"boolean"})],Vo.prototype,"multiple",void 0),oe([lt({converter:rt})],Vo.prototype,"size",void 0);const Ho=(t,e)=>K`<template aria-activedescendant="${t=>t.ariaActiveDescendant}" aria-multiselectable="${t=>t.ariaMultiSelectable}" class="listbox" role="listbox" tabindex="${t=>t.disabled?null:"0"}" @click="${(t,e)=>t.clickHandler(e.event)}" @focusin="${(t,e)=>t.focusinHandler(e.event)}" @keydown="${(t,e)=>t.keydownHandler(e.event)}" @mousedown="${(t,e)=>t.mousedownHandler(e.event)}"><slot ${Xt({filter:Vo.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></template>`;class zo extends ei{constructor(){super(...arguments),this.optionElements=[]}menuElementsChanged(){this.updateOptions()}headerElementsChanged(){this.updateOptions()}footerElementsChanged(){this.updateOptions()}updateOptions(){this.optionElements.splice(0,this.optionElements.length),this.addSlottedListItems(this.headerElements),this.addSlottedListItems(this.menuElements),this.addSlottedListItems(this.footerElements),this.$emit("optionsupdated",{bubbles:!1})}addSlottedListItems(t){void 0!==t&&t.forEach(t=>{1===t.nodeType&&"listitem"===t.getAttribute("role")&&(t.id=t.id||gi("option-"),this.optionElements.push(t))})}}oe([v],zo.prototype,"menuElements",void 0),oe([v],zo.prototype,"headerElements",void 0),oe([v],zo.prototype,"footerElements",void 0),oe([v],zo.prototype,"suggestionsAvailableText",void 0);const No=K`<template>${t=>t.value}</template>`;class Bo extends ei{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectView()}handleClick(t){return t.defaultPrevented||this.handleInvoked(),!1}handleInvoked(){this.$emit("pickeroptioninvoked")}updateView(){var t,e;this.disconnectView(),this.customView=null!==(e=null===(t=this.contentsTemplate)||void 0===t?void 0:t.render(this,this))&&void 0!==e?e:No.render(this,this)}disconnectView(){var t;null===(t=this.customView)||void 0===t||t.dispose(),this.customView=void 0}}oe([lt({attribute:"value"})],Bo.prototype,"value",void 0),oe([v],Bo.prototype,"contentsTemplate",void 0);class Uo extends ei{}const qo=K`<template>${t=>t.value}</template>`;class jo extends ei{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){this.disconnectView(),super.disconnectedCallback()}handleKeyDown(t){return!t.defaultPrevented&&("Enter"!==t.key||(this.handleInvoke(),!1))}handleClick(t){return t.defaultPrevented||this.handleInvoke(),!1}handleInvoke(){this.$emit("pickeriteminvoked")}updateView(){var t,e;this.disconnectView(),this.customView=null!==(e=null===(t=this.contentsTemplate)||void 0===t?void 0:t.render(this,this))&&void 0!==e?e:qo.render(this,this)}disconnectView(){var t;null===(t=this.customView)||void 0===t||t.dispose(),this.customView=void 0}}oe([lt({attribute:"value"})],jo.prototype,"value",void 0),oe([v],jo.prototype,"contentsTemplate",void 0);const _o=(t,e)=>{const i=t.tagFor(Ei),s=t.tagFor(zo),o=t.tagFor(Uo),n=t.tagFor(Uo);return K`<template :selectedListTag="${()=>o}" :menuTag="${()=>s}" :defaultListItemTemplate="${function(t){const e=t.tagFor(jo);return K`<${e} value="${t=>t}" :contentsTemplate="${(t,e)=>e.parent.listItemContentsTemplate}"></${e}>`}(t)}" :defaultMenuOptionTemplate="${function(t){const e=t.tagFor(Bo);return K`<${e} value="${t=>t}" :contentsTemplate="${(t,e)=>e.parent.menuOptionContentsTemplate}"></${e}>`}(t)}" @focusin="${(t,e)=>t.handleFocusIn(e.event)}" @focusout="${(t,e)=>t.handleFocusOut(e.event)}" @keydown="${(t,e)=>t.handleKeyDown(e.event)}" @pickeriteminvoked="${(t,e)=>t.handleItemInvoke(e.event)}" @pickeroptioninvoked="${(t,e)=>t.handleOptionInvoke(e.event)}"><slot name="list-region"></slot>${zt(t=>t.flyoutOpen,K`<${i} class="region" part="region" auto-update-mode="${t=>t.menuConfig.autoUpdateMode}" fixed-placement="${t=>t.menuConfig.fixedPlacement}" vertical-positioning-mode="${t=>t.menuConfig.verticalPositioningMode}" vertical-default-position="${t=>t.menuConfig.verticalDefaultPosition}" vertical-scaling="${t=>t.menuConfig.verticalScaling}" vertical-inset="${t=>t.menuConfig.verticalInset}" vertical-viewport-lock="${t=>t.menuConfig.verticalViewportLock}" horizontal-positioning-mode="${t=>t.menuConfig.horizontalPositioningMode}" horizontal-default-position="${t=>t.menuConfig.horizontalDefaultPosition}" horizontal-scaling="${t=>t.menuConfig.horizontalScaling}" horizontal-inset="${t=>t.menuConfig.horizontalInset}" horizontal-viewport-lock="${t=>t.menuConfig.horizontalViewportLock}" @loaded="${(t,e)=>t.handleRegionLoaded(e.event)}" ${Pt("region")}>${zt(t=>!t.showNoOptions&&!t.showLoading,K`<slot name="menu-region"></slot>`)} ${zt(t=>t.showNoOptions&&!t.showLoading,K`<div class="no-options-display" part="no-options-display"><slot name="no-options-region">${t=>t.noSuggestionsText}</slot></div>`)} ${zt(t=>t.showLoading,K`<div class="loading-display" part="loading-display"><slot name="loading-region"><${n} part="loading-progress" class="loading-progress slot="loading-region"></${n}>${t=>t.loadingText}</slot></div>`)}</${i}>`)}</template>`};class Wo extends ei{}class Ko extends(_i(Wo)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Yo=K`<input slot="input-region" role="combobox" type="text" autocapitalize="off" autocomplete="off" haspopup="list" aria-label="${t=>t.label}" aria-labelledby="${t=>t.labelledBy}" placeholder="${t=>t.placeholder}" ${Pt("inputElement")}></input>`;class Xo extends Ko{constructor(){super(...arguments),this.selection="",this.filterSelected=!0,this.filterQuery=!0,this.noSuggestionsText="No suggestions available",this.suggestionsAvailableText="Suggestions available",this.loadingText="Loading suggestions",this.menuPlacement="bottom-fill",this.showLoading=!1,this.optionsList=[],this.filteredOptionsList=[],this.flyoutOpen=!1,this.menuFocusIndex=-1,this.showNoOptions=!1,this.selectedItems=[],this.inputElementView=null,this.handleTextInput=t=>{this.query=this.inputElement.value},this.handleInputClick=t=>{t.preventDefault(),this.toggleFlyout(!0)},this.setRegionProps=()=>{this.flyoutOpen&&(null!==this.region&&void 0!==this.region?this.region.anchorElement=this.inputElement:c.queueUpdate(this.setRegionProps))},this.configLookup={top:Oi,bottom:Si,tallest:Ri,"top-fill":Ai,"bottom-fill":Di,"tallest-fill":Fi}}selectionChanged(){this.$fastController.isConnected&&(this.handleSelectionChange(),this.proxy instanceof HTMLInputElement&&(this.proxy.value=this.selection,this.validate()))}optionsChanged(){this.optionsList=this.options.split(",").map(t=>t.trim()).filter(t=>""!==t)}menuPlacementChanged(){this.$fastController.isConnected&&this.updateMenuConfig()}showLoadingChanged(){this.$fastController.isConnected&&c.queueUpdate(()=>{this.setFocusedOption(0)})}listItemTemplateChanged(){this.updateListItemTemplate()}defaultListItemTemplateChanged(){this.updateListItemTemplate()}menuOptionTemplateChanged(){this.updateOptionTemplate()}defaultMenuOptionTemplateChanged(){this.updateOptionTemplate()}optionsListChanged(){this.updateFilteredOptions()}queryChanged(){this.$fastController.isConnected&&(this.inputElement.value!==this.query&&(this.inputElement.value=this.query),this.updateFilteredOptions(),this.$emit("querychange",{bubbles:!1}))}filteredOptionsListChanged(){this.$fastController.isConnected&&(this.showNoOptions=0===this.filteredOptionsList.length&&0===this.menuElement.querySelectorAll('[role="listitem"]').length,this.setFocusedOption(this.showNoOptions?-1:0))}flyoutOpenChanged(){this.flyoutOpen?(c.queueUpdate(this.setRegionProps),this.$emit("menuopening",{bubbles:!1})):this.$emit("menuclosing",{bubbles:!1})}showNoOptionsChanged(){this.$fastController.isConnected&&c.queueUpdate(()=>{this.setFocusedOption(0)})}connectedCallback(){super.connectedCallback(),this.listElement=document.createElement(this.selectedListTag),this.appendChild(this.listElement),this.itemsPlaceholderElement=document.createComment(""),this.listElement.append(this.itemsPlaceholderElement),this.inputElementView=Yo.render(this,this.listElement);const t=this.menuTag.toUpperCase();this.menuElement=Array.from(this.children).find(e=>e.tagName===t),void 0===this.menuElement&&(this.menuElement=document.createElement(this.menuTag),this.appendChild(this.menuElement)),""===this.menuElement.id&&(this.menuElement.id=gi("listbox-")),this.menuId=this.menuElement.id,this.optionsPlaceholder=document.createComment(""),this.menuElement.append(this.optionsPlaceholder),this.updateMenuConfig(),c.queueUpdate(()=>this.initialize())}disconnectedCallback(){super.disconnectedCallback(),this.toggleFlyout(!1),this.inputElement.removeEventListener("input",this.handleTextInput),this.inputElement.removeEventListener("click",this.handleInputClick),null!==this.inputElementView&&(this.inputElementView.dispose(),this.inputElementView=null)}focus(){this.inputElement.focus()}initialize(){this.updateListItemTemplate(),this.updateOptionTemplate(),this.itemsRepeatBehavior=new jt(t=>t.selectedItems,t=>t.activeListItemTemplate,{positioning:!0}).createBehavior(this.itemsPlaceholderElement),this.inputElement.addEventListener("input",this.handleTextInput),this.inputElement.addEventListener("click",this.handleInputClick),this.$fastController.addBehaviors([this.itemsRepeatBehavior]),this.menuElement.suggestionsAvailableText=this.suggestionsAvailableText,this.menuElement.addEventListener("optionsupdated",this.handleMenuOptionsUpdated),this.optionsRepeatBehavior=new jt(t=>t.filteredOptionsList,t=>t.activeMenuOptionTemplate,{positioning:!0}).createBehavior(this.optionsPlaceholder),this.$fastController.addBehaviors([this.optionsRepeatBehavior]),this.handleSelectionChange()}toggleFlyout(t){if(this.flyoutOpen!==t){if(t&&document.activeElement===this.inputElement)return this.flyoutOpen=t,void c.queueUpdate(()=>{void 0!==this.menuElement?this.setFocusedOption(0):this.disableMenu()});this.flyoutOpen=!1,this.disableMenu()}}handleMenuOptionsUpdated(t){t.preventDefault(),this.flyoutOpen&&this.setFocusedOption(0)}handleKeyDown(t){if(t.defaultPrevented)return!1;switch(t.key){case"ArrowDown":if(this.flyoutOpen){const t=this.flyoutOpen?Math.min(this.menuFocusIndex+1,this.menuElement.optionElements.length-1):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case"ArrowUp":if(this.flyoutOpen){const t=this.flyoutOpen?Math.max(this.menuFocusIndex-1,0):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case"Escape":return this.toggleFlyout(!1),!1;case"Enter":return-1!==this.menuFocusIndex&&this.menuElement.optionElements.length>this.menuFocusIndex&&this.menuElement.optionElements[this.menuFocusIndex].click(),!1;case"ArrowRight":return document.activeElement===this.inputElement||(this.incrementFocusedItem(1),!1);case"ArrowLeft":return 0!==this.inputElement.selectionStart||(this.incrementFocusedItem(-1),!1);case"Delete":case"Backspace":{if(null===document.activeElement)return!0;if(document.activeElement===this.inputElement)return 0!==this.inputElement.selectionStart||(this.selection=this.selectedItems.slice(0,this.selectedItems.length-1).toString(),this.toggleFlyout(!1),!1);const t=Array.from(this.listElement.children),e=t.indexOf(document.activeElement);return!(e>-1)||(this.selection=this.selectedItems.splice(e,1).toString(),c.queueUpdate(()=>{t[Math.min(t.length,e)].focus()}),!1)}}return this.toggleFlyout(!0),!0}handleFocusIn(t){return!1}handleFocusOut(t){return void 0!==this.menuElement&&this.menuElement.contains(t.relatedTarget)||this.toggleFlyout(!1),!1}handleSelectionChange(){this.selectedItems.toString()!==this.selection&&(this.selectedItems=""===this.selection?[]:this.selection.split(","),this.updateFilteredOptions(),c.queueUpdate(()=>{this.checkMaxItems()}),this.$emit("selectionchange",{bubbles:!1}))}handleRegionLoaded(t){c.queueUpdate(()=>{this.setFocusedOption(0),this.$emit("menuloaded",{bubbles:!1})})}checkMaxItems(){if(void 0!==this.inputElement)if(void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected){if(document.activeElement===this.inputElement){const t=Array.from(this.listElement.querySelectorAll("[role='listitem']"));t[t.length-1].focus()}this.inputElement.hidden=!0}else this.inputElement.hidden=!1}handleItemInvoke(t){if(t.defaultPrevented)return!1;if(t.target instanceof jo){const e=Array.from(this.listElement.querySelectorAll("[role='listitem']")).indexOf(t.target);if(-1!==e){const t=this.selectedItems.slice();t.splice(e,1),this.selection=t.toString(),c.queueUpdate(()=>this.incrementFocusedItem(0))}return!1}return!0}handleOptionInvoke(t){return!t.defaultPrevented&&(!(t.target instanceof Bo)||(void 0!==t.target.value&&(this.selection=`${this.selection}${""===this.selection?"":","}${t.target.value}`),this.inputElement.value="",this.query="",this.inputElement.focus(),this.toggleFlyout(!1),!1))}incrementFocusedItem(t){if(0===this.selectedItems.length)return void this.inputElement.focus();const e=Array.from(this.listElement.querySelectorAll("[role='listitem']"));if(null!==document.activeElement){let i=e.indexOf(document.activeElement);-1===i&&(i=e.length);const s=Math.min(e.length,Math.max(0,i+t));s===e.length?void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected?e[s-1].focus():this.inputElement.focus():e[s].focus()}}disableMenu(){var t,e,i;this.menuFocusIndex=-1,this.menuFocusOptionId=void 0,null===(t=this.inputElement)||void 0===t||t.removeAttribute("aria-activedescendant"),null===(e=this.inputElement)||void 0===e||e.removeAttribute("aria-owns"),null===(i=this.inputElement)||void 0===i||i.removeAttribute("aria-expanded")}setFocusedOption(t){if(!this.flyoutOpen||-1===t||this.showNoOptions||this.showLoading)return void this.disableMenu();if(0===this.menuElement.optionElements.length)return;this.menuElement.optionElements.forEach(t=>{t.setAttribute("aria-selected","false")}),this.menuFocusIndex=t,this.menuFocusIndex>this.menuElement.optionElements.length-1&&(this.menuFocusIndex=this.menuElement.optionElements.length-1),this.menuFocusOptionId=this.menuElement.optionElements[this.menuFocusIndex].id,this.inputElement.setAttribute("aria-owns",this.menuId),this.inputElement.setAttribute("aria-expanded","true"),this.inputElement.setAttribute("aria-activedescendant",this.menuFocusOptionId);const e=this.menuElement.optionElements[this.menuFocusIndex];e.setAttribute("aria-selected","true"),this.menuElement.scrollTo(0,e.offsetTop)}updateListItemTemplate(){var t;this.activeListItemTemplate=null!==(t=this.listItemTemplate)&&void 0!==t?t:this.defaultListItemTemplate}updateOptionTemplate(){var t;this.activeMenuOptionTemplate=null!==(t=this.menuOptionTemplate)&&void 0!==t?t:this.defaultMenuOptionTemplate}updateFilteredOptions(){this.filteredOptionsList=this.optionsList.slice(0),this.filterSelected&&(this.filteredOptionsList=this.filteredOptionsList.filter(t=>-1===this.selectedItems.indexOf(t))),this.filterQuery&&""!==this.query&&void 0!==this.query&&(this.filteredOptionsList=this.filteredOptionsList.filter(t=>-1!==t.indexOf(this.query)))}updateMenuConfig(){let t=this.configLookup[this.menuPlacement];null===t&&(t=Di),this.menuConfig=Object.assign(Object.assign({},t),{autoUpdateMode:"auto",fixedPlacement:!0,horizontalViewportLock:!1,verticalViewportLock:!1})}}oe([lt({attribute:"selection"})],Xo.prototype,"selection",void 0),oe([lt({attribute:"options"})],Xo.prototype,"options",void 0),oe([lt({attribute:"filter-selected",mode:"boolean"})],Xo.prototype,"filterSelected",void 0),oe([lt({attribute:"filter-query",mode:"boolean"})],Xo.prototype,"filterQuery",void 0),oe([lt({attribute:"max-selected"})],Xo.prototype,"maxSelected",void 0),oe([lt({attribute:"no-suggestions-text"})],Xo.prototype,"noSuggestionsText",void 0),oe([lt({attribute:"suggestions-available-text"})],Xo.prototype,"suggestionsAvailableText",void 0),oe([lt({attribute:"loading-text"})],Xo.prototype,"loadingText",void 0),oe([lt({attribute:"label"})],Xo.prototype,"label",void 0),oe([lt({attribute:"labelledby"})],Xo.prototype,"labelledBy",void 0),oe([lt({attribute:"placeholder"})],Xo.prototype,"placeholder",void 0),oe([lt({attribute:"menu-placement"})],Xo.prototype,"menuPlacement",void 0),oe([v],Xo.prototype,"showLoading",void 0),oe([v],Xo.prototype,"listItemTemplate",void 0),oe([v],Xo.prototype,"defaultListItemTemplate",void 0),oe([v],Xo.prototype,"activeListItemTemplate",void 0),oe([v],Xo.prototype,"menuOptionTemplate",void 0),oe([v],Xo.prototype,"defaultMenuOptionTemplate",void 0),oe([v],Xo.prototype,"activeMenuOptionTemplate",void 0),oe([v],Xo.prototype,"listItemContentsTemplate",void 0),oe([v],Xo.prototype,"menuOptionContentsTemplate",void 0),oe([v],Xo.prototype,"optionsList",void 0),oe([v],Xo.prototype,"query",void 0),oe([v],Xo.prototype,"filteredOptionsList",void 0),oe([v],Xo.prototype,"flyoutOpen",void 0),oe([v],Xo.prototype,"menuId",void 0),oe([v],Xo.prototype,"selectedListTag",void 0),oe([v],Xo.prototype,"menuTag",void 0),oe([v],Xo.prototype,"menuFocusIndex",void 0),oe([v],Xo.prototype,"menuFocusOptionId",void 0),oe([v],Xo.prototype,"showNoOptions",void 0),oe([v],Xo.prototype,"menuConfig",void 0),oe([v],Xo.prototype,"selectedItems",void 0);const Go=(t,e)=>K`<template role="list" slot="menu-region"><div class="options-display" part="options-display"><div class="header-region" part="header-region"><slot name="header-region" ${Xt("headerElements")}></slot></div><slot ${Xt("menuElements")}></slot><div class="footer-region" part="footer-region"><slot name="footer-region" ${Xt("footerElements")}></slot></div><div role="alert" aria-live="polite" part="suggestions-available-alert" class="suggestions-available-alert">${t=>t.suggestionsAvailableText}</div></div></template>`,Qo=(t,e)=>K`<template role="listitem" tabindex="-1" @click="${(t,e)=>t.handleClick(e.event)}"><slot></slot></template>`,Zo=(t,e)=>K`<template slot="list-region" role="list" class="picker-list"><slot></slot><slot name="input-region"></slot></template>`,Jo=(t,e)=>K`<template role="listitem" tabindex="0" @click="${(t,e)=>t.handleClick(e.event)}" @keydown="${(t,e)=>t.handleKeyDown(e.event)}"><slot></slot></template>`,tn={menuitem:"menuitem",menuitemcheckbox:"menuitemcheckbox",menuitemradio:"menuitemradio"},en={[tn.menuitem]:"menuitem",[tn.menuitemcheckbox]:"menuitemcheckbox",[tn.menuitemradio]:"menuitemradio"};class sn extends ei{constructor(){super(...arguments),this.role=tn.menuitem,this.hasSubmenu=!1,this.currentDirection=pi.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=t=>{if(t.defaultPrevented)return!1;switch(t.key){case"Enter":case" ":return this.invoke(),!1;case"ArrowRight":return this.expandAndFocus(),!1;case"ArrowLeft":if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=t=>(t.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=t=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=t=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case tn.menuitemcheckbox:this.checked=!this.checked;break;case tn.menuitem:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case tn.menuitemradio:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find(t=>"menu"===t.getAttribute("role")),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(t){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=Ii(this),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(t,e){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),c.queueUpdate(()=>{this.updateSubmenu()}),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter(t=>!t.hasAttribute("hidden"))}}oe([lt({mode:"boolean"})],sn.prototype,"disabled",void 0),oe([lt({mode:"boolean"})],sn.prototype,"expanded",void 0),oe([v],sn.prototype,"startColumnCount",void 0),oe([lt],sn.prototype,"role",void 0),oe([lt({mode:"boolean"})],sn.prototype,"checked",void 0),oe([v],sn.prototype,"submenuRegion",void 0),oe([v],sn.prototype,"hasSubmenu",void 0),oe([v],sn.prototype,"currentDirection",void 0),oe([v],sn.prototype,"submenu",void 0),oi(sn,Zt);const on=(t,e)=>K`<template role="${t=>t.role}" aria-haspopup="${t=>t.hasSubmenu?"menu":void 0}" aria-checked="${t=>t.role!==tn.menuitem?t.checked:void 0}" aria-disabled="${t=>t.disabled}" aria-expanded="${t=>t.expanded}" @keydown="${(t,e)=>t.handleMenuItemKeyDown(e.event)}" @click="${(t,e)=>t.handleMenuItemClick(e.event)}" @mouseover="${(t,e)=>t.handleMouseOver(e.event)}" @mouseout="${(t,e)=>t.handleMouseOut(e.event)}" class="${t=>t.disabled?"disabled":""} ${t=>t.expanded?"expanded":""} ${t=>"indent-"+t.startColumnCount}">${zt(t=>t.role===tn.menuitemcheckbox,K`<div part="input-container" class="input-container"><span part="checkbox" class="checkbox"><slot name="checkbox-indicator">${e.checkboxIndicator||""}</slot></span></div>`)} ${zt(t=>t.role===tn.menuitemradio,K`<div part="input-container" class="input-container"><span part="radio" class="radio"><slot name="radio-indicator">${e.radioIndicator||""}</slot></span></div>`)}</div>${te(0,e)}<span class="content" part="content"><slot></slot></span>${Jt(0,e)} ${zt(t=>t.hasSubmenu,K`<div part="expand-collapse-glyph-container" class="expand-collapse-glyph-container"><span part="expand-collapse" class="expand-collapse"><slot name="expand-collapse-indicator">${e.expandCollapseGlyph||""}</slot></span></div>`)} ${zt(t=>t.expanded,K`<${t.tagFor(Ei)} :anchorElement="${t=>t}" vertical-positioning-mode="dynamic" vertical-default-position="bottom" vertical-inset="true" horizontal-positioning-mode="dynamic" horizontal-default-position="end" class="submenu-region" dir="${t=>t.currentDirection}" @loaded="${t=>t.submenuLoaded()}" ${Pt("submenuRegion")} part="submenu-region"><slot name="submenu"></slot></${t.tagFor(Ei)}>`)}</template>`,nn=(t,e)=>K`<template slot="${t=>t.slot?t.slot:t.isNestedMenu()?"submenu":void 0}" role="menu" @keydown="${(t,e)=>t.handleMenuKeyDown(e.event)}" @focusout="${(t,e)=>t.handleFocusOut(e.event)}"><slot ${Xt("items")}></slot></template>`;class rn extends ei{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&hi(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=t=>{if(!this.contains(t.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const t=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[t].setAttribute("tabindex","0"),this.focusIndex=t}},this.handleItemFocus=t=>{const e=t.target;void 0!==this.menuItems&&e!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0"))},this.handleExpandedChanged=t=>{if(t.defaultPrevented||null===t.target||void 0===this.menuItems||this.menuItems.indexOf(t.target)<0)return;t.preventDefault();const e=t.target;null===this.expandedItem||e!==this.expandedItem||!1!==e.expanded?e.expanded&&(null!==this.expandedItem&&this.expandedItem!==e&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=e,this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>{void 0!==this.menuItems&&this.menuItems.forEach(t=>{t.removeEventListener("expanded-change",this.handleExpandedChanged),t.removeEventListener("focus",this.handleItemFocus)})},this.setItems=()=>{const t=this.domChildren();this.removeItemListeners(),this.menuItems=t;const e=this.menuItems.filter(this.isMenuItemElement);e.length&&(this.focusIndex=0);const i=e.reduce((t,e)=>{const i=function(t){const e=t.getAttribute("role"),i=t.querySelector("[slot=start]");return e!==tn.menuitem&&null===i||e===tn.menuitem&&null!==i?1:e!==tn.menuitem&&null!==i?2:0}(e);return t>i?t:i},0);e.forEach((t,e)=>{t.setAttribute("tabindex",0===e?"0":"-1"),t.addEventListener("expanded-change",this.handleExpandedChanged),t.addEventListener("focus",this.handleItemFocus),(t instanceof sn||"startColumnCount"in t)&&(t.startColumnCount=i)})},this.changeHandler=t=>{if(void 0===this.menuItems)return;const e=t.target,i=this.menuItems.indexOf(e);if(-1!==i&&"menuitemradio"===e.role&&!0===e.checked){for(let t=i-1;t>=0;--t){const e=this.menuItems[t],i=e.getAttribute("role");if(i===tn.menuitemradio&&(e.checked=!1),"separator"===i)break}const t=this.menuItems.length-1;for(let e=i+1;e<=t;++e){const t=this.menuItems[e],i=t.getAttribute("role");if(i===tn.menuitemradio&&(t.checked=!1),"separator"===i)break}}},this.isMenuItemElement=t=>hi(t)&&rn.focusableElementRoles.hasOwnProperty(t.getAttribute("role")),this.isFocusableElement=t=>this.isMenuItemElement(t)}itemsChanged(t,e){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}connectedCallback(){super.connectedCallback(),c.queueUpdate(()=>{this.setItems()}),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(t){if(!t.defaultPrevented&&void 0!==this.menuItems)switch(t.key){case"ArrowDown":return void this.setFocus(this.focusIndex+1,1);case"ArrowUp":return void this.setFocus(this.focusIndex-1,-1);case"End":return void this.setFocus(this.menuItems.length-1,-1);case"Home":return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter(t=>!t.hasAttribute("hidden"))}setFocus(t,e){if(void 0!==this.menuItems)for(;t>=0&&t<this.menuItems.length;){const i=this.menuItems[t];if(this.isFocusableElement(i)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=t,i.setAttribute("tabindex","0"),i.focus();break}t+=e}}}rn.focusableElementRoles=en,oe([v],rn.prototype,"items",void 0);const an=(t,e)=>K`<template class="${t=>t.readOnly?"readonly":""}"><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt("defaultSlottedNodes")}></slot></label><div class="root" part="root">${te(0,e)}<input class="control" part="control" id="control" @input="${t=>t.handleTextInput()}" @change="${t=>t.handleChange()}" @keydown="${(t,e)=>t.handleKeyDown(e.event)}" @blur="${(t,e)=>t.handleBlur()}" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" size="${t=>t.size}" type="text" inputmode="numeric" min="${t=>t.min}" max="${t=>t.max}" step="${t=>t.step}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${Pt("control")} />${zt(t=>!t.hideStep&&!t.readOnly&&!t.disabled,K`<div class="controls" part="controls"><div class="step-up" part="step-up" @click="${t=>t.stepUp()}"><slot name="step-up-glyph">${e.stepUpGlyph||""}</slot></div><div class="step-down" part="step-down" @click="${t=>t.stepDown()}"><slot name="step-down-glyph">${e.stepDownGlyph||""}</slot></div></div>`)} ${Jt(0,e)}</div></template>`;class ln extends ei{}class hn extends(_i(ln)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const dn={email:"email",password:"password",tel:"tel",text:"text",url:"url"};class cn extends hn{constructor(){super(...arguments),this.type=dn.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&c.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}oe([lt({attribute:"readonly",mode:"boolean"})],cn.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],cn.prototype,"autofocus",void 0),oe([lt],cn.prototype,"placeholder",void 0),oe([lt],cn.prototype,"type",void 0),oe([lt],cn.prototype,"list",void 0),oe([lt({converter:rt})],cn.prototype,"maxlength",void 0),oe([lt({converter:rt})],cn.prototype,"minlength",void 0),oe([lt],cn.prototype,"pattern",void 0),oe([lt({converter:rt})],cn.prototype,"size",void 0),oe([lt({mode:"boolean"})],cn.prototype,"spellcheck",void 0),oe([v],cn.prototype,"defaultSlottedNodes",void 0);class un{}oi(un,xi),oi(cn,Zt,un);class pn extends ei{}class mn extends(_i(pn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class vn extends mn{constructor(){super(...arguments),this.hideStep=!1,this.step=1,this.isUserInput=!1}maxChanged(t,e){var i;this.max=Math.max(e,null!==(i=this.min)&&void 0!==i?i:e);const s=Math.min(this.min,this.max);void 0!==this.min&&this.min!==s&&(this.min=s),this.value=this.getValidValue(this.value)}minChanged(t,e){var i;this.min=Math.min(e,null!==(i=this.max)&&void 0!==i?i:e);const s=Math.max(this.min,this.max);void 0!==this.max&&this.max!==s&&(this.max=s),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){this.value=this.getValidValue(e),e===this.value&&(this.control&&!this.isUserInput&&(this.control.value=this.value),super.valueChanged(t,this.value),void 0===t||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}getValidValue(t){var e,i;let s=parseFloat(parseFloat(t).toPrecision(12));return isNaN(s)?s="":(s=Math.min(s,null!==(e=this.max)&&void 0!==e?e:s),s=Math.max(s,null!==(i=this.min)&&void 0!==i?i:s).toString()),s}stepUp(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:t+this.step;this.value=e.toString()}stepDown(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:t-this.step;this.value=e.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.control.value=this.value,this.autofocus&&c.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,""),this.isUserInput=!0,this.value=this.control.value}handleChange(){this.$emit("change")}handleKeyDown(t){switch(t.key){case"ArrowUp":return this.stepUp(),!1;case"ArrowDown":return this.stepDown(),!1}return!0}handleBlur(){this.control.value=this.value}}oe([lt({attribute:"readonly",mode:"boolean"})],vn.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],vn.prototype,"autofocus",void 0),oe([lt({attribute:"hide-step",mode:"boolean"})],vn.prototype,"hideStep",void 0),oe([lt],vn.prototype,"placeholder",void 0),oe([lt],vn.prototype,"list",void 0),oe([lt({converter:rt})],vn.prototype,"maxlength",void 0),oe([lt({converter:rt})],vn.prototype,"minlength",void 0),oe([lt({converter:rt})],vn.prototype,"size",void 0),oe([lt({converter:rt})],vn.prototype,"step",void 0),oe([lt({converter:rt})],vn.prototype,"max",void 0),oe([lt({converter:rt})],vn.prototype,"min",void 0),oe([v],vn.prototype,"defaultSlottedNodes",void 0),oi(vn,Zt,un);const fn=(t,e)=>K`<template role="progressbar" aria-valuenow="${t=>t.value}" aria-valuemin="${t=>t.min}" aria-valuemax="${t=>t.max}" class="${t=>t.paused?"paused":""}">${zt(t=>"number"==typeof t.value,K`<svg class="progress" part="progress" viewBox="0 0 16 16" slot="determinate"><circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle><circle class="determinate" part="determinate" style="stroke-dasharray: ${t=>44*t.percentComplete/100}px ${44}px" cx="8px" cy="8px" r="7px"></circle></svg>`,K`<slot name="indeterminate" slot="indeterminate">${e.indeterminateIndicator||""}</slot>`)}</template>`;class gn extends ei{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const t="number"==typeof this.min?this.min:0,e="number"==typeof this.max?this.max:100,i="number"==typeof this.value?this.value:0,s=e-t;this.percentComplete=0===s?0:Math.fround((i-t)/s*100)}}oe([lt({converter:rt})],gn.prototype,"value",void 0),oe([lt({converter:rt})],gn.prototype,"min",void 0),oe([lt({converter:rt})],gn.prototype,"max",void 0),oe([lt({mode:"boolean"})],gn.prototype,"paused",void 0),oe([v],gn.prototype,"percentComplete",void 0);const bn=(t,e)=>K`<template role="progressbar" aria-valuenow="${t=>t.value}" aria-valuemin="${t=>t.min}" aria-valuemax="${t=>t.max}" class="${t=>t.paused?"paused":""}">${zt(t=>"number"==typeof t.value,K`<div class="progress" part="progress" slot="determinate"><div class="determinate" part="determinate" style="width: ${t=>t.percentComplete}%"></div></div>`,K`<div class="progress" part="progress" slot="indeterminate"><slot class="indeterminate" name="indeterminate">${e.indeterminateIndicator1||""} ${e.indeterminateIndicator2||""}</slot></div>`)}</template>`,yn=(t,e)=>K`<template role="radiogroup" aria-disabled="${t=>t.disabled}" aria-readonly="${t=>t.readOnly}" @click="${(t,e)=>t.clickHandler(e.event)}" @keydown="${(t,e)=>t.keydownHandler(e.event)}" @focusout="${(t,e)=>t.focusOutHandler(e.event)}"><slot name="label"></slot><div class="positioning-region ${t=>t.orientation===ai?"horizontal":"vertical"}" part="positioning-region"><slot ${Xt({property:"slottedRadioButtons",filter:Wt("[role=radio]")})}></slot></div></template>`;class Cn extends ei{constructor(){super(...arguments),this.orientation=ai,this.radioChangeHandler=t=>{const e=t.target;e.checked&&(this.slottedRadioButtons.forEach(t=>{t!==e&&(t.checked=!1,this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"))}),this.selectedRadio=e,this.value=e.value,e.setAttribute("tabindex","0"),this.focusedRadio=e),t.stopPropagation()},this.moveToRadioByIndex=(t,e)=>{const i=t[e];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach(t=>{t!==i&&t.setAttribute("tabindex","-1")}):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{var t;null===(t=this.nextElementSibling)||void 0===t||t.focus()},this.moveLeftOffGroup=()=>{var t;null===(t=this.previousElementSibling)||void 0===t||t.focus()},this.focusOutHandler=t=>{const e=this.slottedRadioButtons,i=t.target,s=null!==i?e.indexOf(i):0,o=this.focusedRadio?e.indexOf(this.focusedRadio):-1;return(0===o&&s===o||o===e.length-1&&o===s)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),e.forEach(t=>{t!==this.selectedRadio&&t.setAttribute("tabindex","-1")}))):(this.focusedRadio=e[0],this.focusedRadio.setAttribute("tabindex","0"),e.forEach(t=>{t!==this.focusedRadio&&t.setAttribute("tabindex","-1")}))),!0},this.clickHandler=t=>{const e=t.target;if(e){const t=this.slottedRadioButtons;e.checked||0===t.indexOf(e)?(e.setAttribute("tabindex","0"),this.selectedRadio=e):(e.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=e}t.preventDefault()},this.shouldMoveOffGroupToTheRight=(t,e,i)=>t===e.length&&this.isInsideToolbar&&"ArrowRight"===i,this.shouldMoveOffGroupToTheLeft=(t,e)=>(this.focusedRadio?t.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&"ArrowLeft"===e,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,e,t.key))this.moveRightOffGroup();else for(i===e.length&&(i=0);i<e.length&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;if(i+1>=e.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)-1:0,i=i<0?e.length-1:i,this.shouldMoveOffGroupToTheLeft(e,t.key))this.moveLeftOffGroup();else for(;i>=0&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;i-1<0?i=e.length-1:i-=1}},this.keydownHandler=t=>{const e=t.key;if(e in ui&&this.isInsideFoundationToolbar)return!0;switch(e){case"Enter":this.checkFocusedRadio();break;case"ArrowRight":case"ArrowDown":this.direction===pi.ltr?this.moveRight(t):this.moveLeft(t);break;case"ArrowLeft":case"ArrowUp":this.direction===pi.ltr?this.moveLeft(t):this.moveRight(t);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach(t=>{this.readOnly?t.readOnly=!0:t.readOnly=!1})}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach(t=>{this.disabled?t.disabled=!0:t.disabled=!1})}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach(t=>{t.setAttribute("name",this.name)})}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach(t=>{t.value===this.value&&(t.checked=!0,this.selectedRadio=t)}),this.$emit("change")}slottedRadioButtonsChanged(t,e){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){var t;return null!==(t=this.parentToolbar)&&void 0!==t&&t}get isInsideFoundationToolbar(){var t;return!!(null===(t=this.parentToolbar)||void 0===t?void 0:t.$fastController)}connectedCallback(){super.connectedCallback(),this.direction=Ii(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach(t=>{t.removeEventListener("change",this.radioChangeHandler)})}setupRadioButtons(){const t=this.slottedRadioButtons.filter(t=>t.hasAttribute("checked")),e=t?t.length:0;if(e>1){t[e-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach(t=>{void 0!==this.name&&t.setAttribute("name",this.name),this.disabled&&(t.disabled=!0),this.readOnly&&(t.readOnly=!0),this.value&&this.value===t.value?(this.selectedRadio=t,this.focusedRadio=t,t.checked=!0,t.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"),t.checked=!1),t.addEventListener("change",this.radioChangeHandler)}),void 0===this.value&&this.slottedRadioButtons.length>0){const t=this.slottedRadioButtons.filter(t=>t.hasAttribute("checked")),e=null!==t?t.length:0;if(e>0&&!i){const i=t[e-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}oe([lt({attribute:"readonly",mode:"boolean"})],Cn.prototype,"readOnly",void 0),oe([lt({attribute:"disabled",mode:"boolean"})],Cn.prototype,"disabled",void 0),oe([lt],Cn.prototype,"name",void 0),oe([lt],Cn.prototype,"value",void 0),oe([lt],Cn.prototype,"orientation",void 0),oe([v],Cn.prototype,"childItems",void 0),oe([v],Cn.prototype,"slottedRadioButtons",void 0);const xn=(t,e)=>K`<template role="radio" class="${t=>t.checked?"checked":""} ${t=>t.readOnly?"readonly":""}" aria-checked="${t=>t.checked}" aria-required="${t=>t.required}" aria-disabled="${t=>t.disabled}" aria-readonly="${t=>t.readOnly}" @keypress="${(t,e)=>t.keypressHandler(e.event)}" @click="${(t,e)=>t.clickHandler(e.event)}"><div part="control" class="control"><slot name="checked-indicator">${e.checkedIndicator||""}</slot></div><label part="label" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt("defaultSlottedNodes")}></slot></label></template>`;class wn extends ei{}class $n extends(Wi(wn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class kn extends $n{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){var t;this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=null!==(t=this.defaultChecked)&&void 0!==t&&t,this.dirtyChecked=!1))}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{switch(t.key){case" ":return void(this.checked||this.readOnly||(this.checked=!0))}return!0},this.proxy.setAttribute("type","radio")}connectedCallback(){var t,e;super.connectedCallback(),this.validate(),"radiogroup"!==(null===(t=this.parentElement)||void 0===t?void 0:t.getAttribute("role"))&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=null!==(e=this.defaultChecked)&&void 0!==e&&e,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(t){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}oe([lt({attribute:"readonly",mode:"boolean"})],kn.prototype,"readOnly",void 0),oe([v],kn.prototype,"name",void 0),oe([v],kn.prototype,"defaultSlottedNodes",void 0);class In extends ei{constructor(){super(...arguments),this.framesPerSecond=60,this.updatingItems=!1,this.speed=600,this.easing="ease-in-out",this.flippersHiddenFromAT=!1,this.scrolling=!1,this.resizeDetector=null}get frameTime(){return 1e3/this.framesPerSecond}scrollingChanged(t,e){if(this.scrollContainer){const t=1==this.scrolling?"scrollstart":"scrollend";this.$emit(t,this.scrollContainer.scrollLeft)}}get isRtl(){return this.scrollItems.length>1&&this.scrollItems[0].offsetLeft>this.scrollItems[1].offsetLeft}connectedCallback(){super.connectedCallback(),this.initializeResizeDetector()}disconnectedCallback(){this.disconnectResizeDetector(),super.disconnectedCallback()}scrollItemsChanged(t,e){e&&!this.updatingItems&&c.queueUpdate(()=>this.setStops())}disconnectResizeDetector(){this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.resized.bind(this)),this.resizeDetector.observe(this)}updateScrollStops(){this.updatingItems=!0;const t=this.scrollItems.reduce((t,e)=>e instanceof HTMLSlotElement?t.concat(e.assignedElements()):(t.push(e),t),[]);this.scrollItems=t,this.updatingItems=!1}setStops(){this.updateScrollStops();const{scrollContainer:t}=this,{scrollLeft:e}=t,{width:i,left:s}=t.getBoundingClientRect();this.width=i;let o=0,n=this.scrollItems.map((t,i)=>{const{left:n,width:r}=t.getBoundingClientRect(),a=Math.round(n+e-s),l=Math.round(a+r);return this.isRtl?-l:(o=l,0===i?0:a)}).concat(o);n=this.fixScrollMisalign(n),n.sort((t,e)=>Math.abs(t)-Math.abs(e)),this.scrollStops=n,this.setFlippers()}validateStops(t=!0){const e=()=>!!this.scrollStops.find(t=>t>0);return!e()&&t&&this.setStops(),e()}fixScrollMisalign(t){if(this.isRtl&&t.some(t=>t>0)){t.sort((t,e)=>e-t);const e=t[0];t=t.map(t=>t-e)}return t}setFlippers(){var t,e;const i=this.scrollContainer.scrollLeft;if(null===(t=this.previousFlipperContainer)||void 0===t||t.classList.toggle("disabled",0===i),this.scrollStops){const t=Math.abs(this.scrollStops[this.scrollStops.length-1]);null===(e=this.nextFlipperContainer)||void 0===e||e.classList.toggle("disabled",this.validateStops(!1)&&Math.abs(i)+this.width>=t)}}scrollInView(t,e=0,i){var s;if("number"!=typeof t&&t&&(t=this.scrollItems.findIndex(e=>e===t||e.contains(t))),void 0!==t){i=null!=i?i:e;const{scrollContainer:o,scrollStops:n,scrollItems:r}=this,{scrollLeft:a}=this.scrollContainer,{width:l}=o.getBoundingClientRect(),h=n[t],{width:d}=r[t].getBoundingClientRect(),c=h+d,u=a+e>h;if(u||a+l-i<c){const t=null!==(s=[...n].sort((t,e)=>u?e-t:t-e).find(t=>u?t+e<h:t+l-(null!=i?i:0)>c))&&void 0!==s?s:0;this.scrollToPosition(t)}}}keyupHandler(t){switch(t.key){case"ArrowLeft":this.scrollToPrevious();break;case"ArrowRight":this.scrollToNext()}}scrollToPrevious(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex((e,i)=>e>=t&&(this.isRtl||i===this.scrollStops.length-1||this.scrollStops[i+1]>t)),i=Math.abs(this.scrollStops[e+1]);let s=this.scrollStops.findIndex(t=>Math.abs(t)+this.width>i);(s>=e||-1===s)&&(s=e>0?e-1:0),this.scrollToPosition(this.scrollStops[s],t)}scrollToNext(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex(e=>Math.abs(e)>=Math.abs(t)),i=this.scrollStops.findIndex(e=>Math.abs(t)+this.width<=Math.abs(e));let s=e;i>e+2?s=i-2:e<this.scrollStops.length-2&&(s=e+1),this.scrollToPosition(this.scrollStops[s],t)}scrollToPosition(t,e=this.scrollContainer.scrollLeft){var i;if(this.scrolling)return;this.scrolling=!0;const s=null!==(i=this.duration)&&void 0!==i?i:Math.abs(t-e)/this.speed+"s";this.content.style.setProperty("transition-duration",s);const o=parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration")),n=e=>{e&&e.target!==e.currentTarget||(this.content.style.setProperty("transition-duration","0s"),this.content.style.removeProperty("transform"),this.scrollContainer.style.setProperty("scroll-behavior","auto"),this.scrollContainer.scrollLeft=t,this.setFlippers(),this.content.removeEventListener("transitionend",n),this.scrolling=!1)};if(0===o)return void n();this.content.addEventListener("transitionend",n);const r=this.scrollContainer.scrollWidth-this.scrollContainer.clientWidth;let a=this.scrollContainer.scrollLeft-Math.min(t,r);this.isRtl&&(a=this.scrollContainer.scrollLeft+Math.min(Math.abs(t),r)),this.content.style.setProperty("transition-property","transform"),this.content.style.setProperty("transition-timing-function",this.easing),this.content.style.setProperty("transform",`translateX(${a}px)`)}resized(){this.resizeTimeout&&(this.resizeTimeout=clearTimeout(this.resizeTimeout)),this.resizeTimeout=setTimeout(()=>{this.width=this.scrollContainer.offsetWidth,this.setFlippers()},this.frameTime)}scrolled(){this.scrollTimeout&&(this.scrollTimeout=clearTimeout(this.scrollTimeout)),this.scrollTimeout=setTimeout(()=>{this.setFlippers()},this.frameTime)}}oe([lt({converter:rt})],In.prototype,"speed",void 0),oe([lt],In.prototype,"duration",void 0),oe([lt],In.prototype,"easing",void 0),oe([lt({attribute:"flippers-hidden-from-at",converter:nt})],In.prototype,"flippersHiddenFromAT",void 0),oe([v],In.prototype,"scrolling",void 0),oe([v],In.prototype,"scrollItems",void 0),oe([lt({attribute:"view"})],In.prototype,"view",void 0);const En=(t,e)=>{var i,s;return K`<template class="horizontal-scroll" @keyup="${(t,e)=>t.keyupHandler(e.event)}">${te(0,e)}<div class="scroll-area" part="scroll-area"><div class="scroll-view" part="scroll-view" @scroll="${t=>t.scrolled()}" ${Pt("scrollContainer")}><div class="content-container" part="content-container" ${Pt("content")}><slot ${Xt({property:"scrollItems",filter:Wt()})}></slot></div></div>${zt(t=>"mobile"!==t.view,K`<div class="scroll scroll-prev" part="scroll-prev" ${Pt("previousFlipperContainer")}><div class="scroll-action" part="scroll-action-previous"><slot name="previous-flipper">${e.previousFlipper instanceof Function?e.previousFlipper(t,e):null!==(i=e.previousFlipper)&&void 0!==i?i:""}</slot></div></div><div class="scroll scroll-next" part="scroll-next" ${Pt("nextFlipperContainer")}><div class="scroll-action" part="scroll-action-next"><slot name="next-flipper">${e.nextFlipper instanceof Function?e.nextFlipper(t,e):null!==(s=e.nextFlipper)&&void 0!==s?s:""}</slot></div></div>`)}</div>${Jt(0,e)}</template>`};function Tn(t,e,i){return t.nodeType!==Node.TEXT_NODE||"string"==typeof t.nodeValue&&!!t.nodeValue.trim().length}const On=(t,e)=>K`<template class=" ${t=>t.readOnly?"readonly":""} "><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt({property:"defaultSlottedNodes",filter:Tn})}></slot></label><div class="root" part="root" ${Pt("root")}>${te(0,e)}<div class="input-wrapper" part="input-wrapper"><input class="control" part="control" id="control" @input="${t=>t.handleTextInput()}" @change="${t=>t.handleChange()}" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" pattern="${t=>t.pattern}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" size="${t=>t.size}" ?spellcheck="${t=>t.spellcheck}" :value="${t=>t.value}" type="search" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${Pt("control")} /><slot name="close-button"><button class="clear-button ${t=>t.value?"":"clear-button__hidden"}" part="clear-button" tabindex="-1" @click=${t=>t.handleClearInput()}><slot name="close-glyph"><svg width="9" height="9" viewBox="0 0 9 9" xmlns="http://www.w3.org/2000/svg"><path d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z" /></svg></slot></button></slot></div>${Jt(0,e)}</div></template>`;class Sn extends ei{}class Rn extends(_i(Sn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class An extends Rn{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.validate(),this.autofocus&&c.queueUpdate(()=>{this.focus()})}validate(){super.validate(this.control)}handleTextInput(){this.value=this.control.value}handleClearInput(){this.value="",this.control.focus(),this.handleChange()}handleChange(){this.$emit("change")}}oe([lt({attribute:"readonly",mode:"boolean"})],An.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],An.prototype,"autofocus",void 0),oe([lt],An.prototype,"placeholder",void 0),oe([lt],An.prototype,"list",void 0),oe([lt({converter:rt})],An.prototype,"maxlength",void 0),oe([lt({converter:rt})],An.prototype,"minlength",void 0),oe([lt],An.prototype,"pattern",void 0),oe([lt({converter:rt})],An.prototype,"size",void 0),oe([lt({mode:"boolean"})],An.prototype,"spellcheck",void 0),oe([v],An.prototype,"defaultSlottedNodes",void 0);class Dn{}oi(Dn,xi),oi(An,Zt,Dn);class Fn extends Vo{}class Ln extends(_i(Fn)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class Pn extends Ln{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=gi("listbox-"),this.maxHeight=0}openChanged(t,e){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void c.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return m.track(this,"value"),this._value}set value(t){var e,i,s,o,n,r,a;const l=""+this._value;if(null===(e=this._options)||void 0===e?void 0:e.length){const e=this._options.findIndex(e=>e.value===t),l=null!==(s=null===(i=this._options[this.selectedIndex])||void 0===i?void 0:i.value)&&void 0!==s?s:null,h=null!==(n=null===(o=this._options[e])||void 0===o?void 0:o.value)&&void 0!==n?n:null;-1!==e&&l===h||(t="",this.selectedIndex=e),t=null!==(a=null===(r=this.firstSelectedOption)||void 0===r?void 0:r.value)&&void 0!==a?a:t}l!==t&&(this._value=t,super.valueChanged(l,t),m.notify(this,"value"),this.updateDisplayValue())}updateValue(t){var e,i;this.$fastController.isConnected&&(this.value=null!==(i=null===(e=this.firstSelectedOption)||void 0===e?void 0:e.value)&&void 0!==i?i:""),t&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(t,e){super.selectedIndexChanged(t,e),this.updateValue()}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Os.above:Os.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Os.above?~~t.top:~~e}get displayValue(){var t,e;return m.track(this,"displayValue"),null!==(e=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.text)&&void 0!==e?e:""}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(t){if(!this.disabled){if(this.open){const e=t.target.closest("option,[role=option]");if(e&&e.disabled)return}return super.clickHandler(t),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(t){var e;if(super.focusoutHandler(t),!this.open)return!0;const i=t.relatedTarget;this.isSameNode(i)?this.focus():(null===(e=this.options)||void 0===e?void 0:e.includes(i))||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(t,e){super.handleChange(t,e),"value"===e&&this.updateValue()}slottedOptionsChanged(t,e){this.options.forEach(t=>{m.getNotifier(t).unsubscribe(this,"value")}),super.slottedOptionsChanged(t,e),this.options.forEach(t=>{m.getNotifier(t).subscribe(this,"value")}),this.setProxyOptions(),this.updateValue()}mousedownHandler(t){var e;return t.offsetX>=0&&t.offsetX<=(null===(e=this.listbox)||void 0===e?void 0:e.scrollWidth)?super.mousedownHandler(t):this.collapsible}multipleChanged(t,e){super.multipleChanged(t,e),this.proxy&&(this.proxy.multiple=e)}selectedOptionsChanged(t,e){var i;super.selectedOptionsChanged(t,e),null===(i=this.options)||void 0===i||i.forEach((t,e)=>{var i;const s=null===(i=this.proxy)||void 0===i?void 0:i.options.item(e);s&&(s.selected=t.selected)})}setDefaultSelectedOption(){var t;const e=null!==(t=this.options)&&void 0!==t?t:Array.from(this.children).filter(Es.slottedOptionFilter),i=null==e?void 0:e.findIndex(t=>t.hasAttribute("selected")||t.selected||t.value===this.value);this.selectedIndex=-1===i?0:i}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach(t=>{const e=t.proxy||(t instanceof HTMLOptionElement?t.cloneNode():null);e&&this.proxy.options.add(e)}))}keydownHandler(t){super.keydownHandler(t);const e=t.key||t.key.charCodeAt(0);switch(e){case" ":t.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case"Home":case"End":t.preventDefault();break;case"Enter":t.preventDefault(),this.open=!this.open;break;case"Escape":this.collapsible&&this.open&&(t.preventDefault(),this.open=!1);break;case"Tab":return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!("ArrowDown"===e||"ArrowUp"===e)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}updateDisplayValue(){this.collapsible&&m.notify(this,"displayValue")}}oe([lt({attribute:"open",mode:"boolean"})],Pn.prototype,"open",void 0),oe([f],Pn.prototype,"collapsible",null),oe([v],Pn.prototype,"control",void 0),oe([lt({attribute:"position"})],Pn.prototype,"positionAttribute",void 0),oe([v],Pn.prototype,"position",void 0),oe([v],Pn.prototype,"maxHeight",void 0);class Mn{}oe([v],Mn.prototype,"ariaControls",void 0),oi(Mn,Ts),oi(Pn,Zt,Mn);const Vn=(t,e)=>K`<template class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}" aria-activedescendant="${t=>t.ariaActiveDescendant}" aria-controls="${t=>t.ariaControls}" aria-disabled="${t=>t.ariaDisabled}" aria-expanded="${t=>t.ariaExpanded}" aria-haspopup="${t=>t.collapsible?"listbox":null}" aria-multiselectable="${t=>t.ariaMultiSelectable}" ?open="${t=>t.open}" role="combobox" tabindex="${t=>t.disabled?null:"0"}" @click="${(t,e)=>t.clickHandler(e.event)}" @focusin="${(t,e)=>t.focusinHandler(e.event)}" @focusout="${(t,e)=>t.focusoutHandler(e.event)}" @keydown="${(t,e)=>t.keydownHandler(e.event)}" @mousedown="${(t,e)=>t.mousedownHandler(e.event)}">${zt(t=>t.collapsible,K`<div class="control" part="control" ?disabled="${t=>t.disabled}" ${Pt("control")}>${te(0,e)}<slot name="button-container"><div class="selected-value" part="selected-value"><slot name="selected-value">${t=>t.displayValue}</slot></div><div aria-hidden="true" class="indicator" part="indicator"><slot name="indicator">${e.indicator||""}</slot></div></slot>${Jt(0,e)}</div>`)}<div class="listbox" id="${t=>t.listboxId}" part="listbox" role="listbox" ?disabled="${t=>t.disabled}" ?hidden="${t=>!!t.collapsible&&!t.open}" ${Pt("listbox")}><slot ${Xt({filter:Es.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`,Hn=(t,e)=>K`<template class="${t=>"circle"===t.shape?"circle":"rect"}" pattern="${t=>t.pattern}" ?shimmer="${t=>t.shimmer}">${zt(t=>!0===t.shimmer,K`<span class="shimmer"></span>`)}<object type="image/svg+xml" data="${t=>t.pattern}" role="presentation"><img class="pattern" src="${t=>t.pattern}" /></object><slot></slot></template>`;class zn extends ei{constructor(){super(...arguments),this.shape="rect"}}oe([lt],zn.prototype,"fill",void 0),oe([lt],zn.prototype,"shape",void 0),oe([lt],zn.prototype,"pattern",void 0),oe([lt({mode:"boolean"})],zn.prototype,"shimmer",void 0);const Nn=(t,e)=>K`<template aria-disabled="${t=>t.disabled}" class="${t=>t.sliderOrientation||ai} ${t=>t.disabled?"disabled":""}"><div ${Pt("root")} part="root" class="root" style="${t=>t.positionStyle}"><div class="container">${zt(t=>!t.hideMark,K`<div class="mark"></div>`)}<div class="label"><slot></slot></div></div></div></template>`;function Bn(t,e,i,s){let o=mi(0,1,(t-e)/(i-e));return s===pi.rtl&&(o=1-o),o}const Un={min:0,max:0,direction:pi.ltr,orientation:ai,disabled:!1};class qn extends ei{constructor(){super(...arguments),this.hideMark=!1,this.sliderDirection=pi.ltr,this.getSliderConfiguration=()=>{if(this.isSliderConfig(this.parentNode)){const t=this.parentNode,{min:e,max:i,direction:s,orientation:o,disabled:n}=t;void 0!==n&&(this.disabled=n),this.sliderDirection=s||pi.ltr,this.sliderOrientation=o||ai,this.sliderMaxPosition=i,this.sliderMinPosition=e}else this.sliderDirection=Un.direction||pi.ltr,this.sliderOrientation=Un.orientation,this.sliderMaxPosition=Un.max,this.sliderMinPosition=Un.min},this.positionAsStyle=()=>{const t=this.sliderDirection?this.sliderDirection:pi.ltr,e=Bn(Number(this.position),Number(this.sliderMinPosition),Number(this.sliderMaxPosition));let i=Math.round(100*(1-e)),s=Math.round(100*e);return Number.isNaN(s)&&Number.isNaN(i)&&(i=50,s=50),this.sliderOrientation===ai?t===pi.rtl?`right: ${s}%; left: ${i}%;`:`left: ${s}%; right: ${i}%;`:`top: ${s}%; bottom: ${i}%;`}}positionChanged(){this.positionStyle=this.positionAsStyle()}sliderOrientationChanged(){}connectedCallback(){super.connectedCallback(),this.getSliderConfiguration(),this.positionStyle=this.positionAsStyle(),this.notifier=m.getNotifier(this.parentNode),this.notifier.subscribe(this,"orientation"),this.notifier.subscribe(this,"direction"),this.notifier.subscribe(this,"max"),this.notifier.subscribe(this,"min")}disconnectedCallback(){super.disconnectedCallback(),this.notifier.unsubscribe(this,"orientation"),this.notifier.unsubscribe(this,"direction"),this.notifier.unsubscribe(this,"max"),this.notifier.unsubscribe(this,"min")}handleChange(t,e){switch(e){case"direction":this.sliderDirection=t.direction;break;case"orientation":this.sliderOrientation=t.orientation;break;case"max":this.sliderMaxPosition=t.max;break;case"min":this.sliderMinPosition=t.min}this.positionStyle=this.positionAsStyle()}isSliderConfig(t){return void 0!==t.max&&void 0!==t.min}}oe([v],qn.prototype,"positionStyle",void 0),oe([lt],qn.prototype,"position",void 0),oe([lt({attribute:"hide-mark",mode:"boolean"})],qn.prototype,"hideMark",void 0),oe([lt({attribute:"disabled",mode:"boolean"})],qn.prototype,"disabled",void 0),oe([v],qn.prototype,"sliderOrientation",void 0),oe([v],qn.prototype,"sliderMinPosition",void 0),oe([v],qn.prototype,"sliderMaxPosition",void 0),oe([v],qn.prototype,"sliderDirection",void 0);const jn=(t,e)=>K`<template role="slider" class="${t=>t.readOnly?"readonly":""} ${t=>t.orientation||ai}" tabindex="${t=>t.disabled?null:0}" aria-valuetext="${t=>t.valueTextFormatter(t.value)}" aria-valuenow="${t=>t.value}" aria-valuemin="${t=>t.min}" aria-valuemax="${t=>t.max}" aria-disabled="${t=>!!t.disabled||void 0}" aria-readonly="${t=>!!t.readOnly||void 0}" aria-orientation="${t=>t.orientation}" class="${t=>t.orientation}"><div part="positioning-region" class="positioning-region"><div ${Pt("track")} part="track-container" class="track"><slot name="track"></slot><div part="track-start" class="track-start" style="${t=>t.position}"><slot name="track-start"></slot></div></div><slot></slot><div ${Pt("thumb")} part="thumb-container" class="thumb-container" style="${t=>t.position}"><slot name="thumb">${e.thumb||""}</slot></div></div></template>`;class _n extends ei{}class Wn extends(_i(_n)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Kn={singleValue:"single-value"};class Yn extends Wn{constructor(){super(...arguments),this.direction=pi.ltr,this.isDragging=!1,this.trackWidth=0,this.trackMinWidth=0,this.trackHeight=0,this.trackLeft=0,this.trackMinHeight=0,this.valueTextFormatter=()=>null,this.min=0,this.max=10,this.step=1,this.orientation=ai,this.mode=Kn.singleValue,this.keypressHandler=t=>{if(!this.readOnly)if("Home"===t.key)t.preventDefault(),this.value=""+this.min;else if("End"===t.key)t.preventDefault(),this.value=""+this.max;else if(!t.shiftKey)switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.increment();break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.decrement()}},this.setupTrackConstraints=()=>{const t=this.track.getBoundingClientRect();this.trackWidth=this.track.clientWidth,this.trackMinWidth=this.track.clientLeft,this.trackHeight=t.bottom,this.trackMinHeight=t.top,this.trackLeft=this.getBoundingClientRect().left,0===this.trackWidth&&(this.trackWidth=1)},this.setupListeners=(t=!1)=>{const e=(t?"remove":"add")+"EventListener";this[e]("keydown",this.keypressHandler),this[e]("mousedown",this.handleMouseDown),this.thumb[e]("mousedown",this.handleThumbMouseDown,{passive:!0}),this.thumb[e]("touchstart",this.handleThumbMouseDown,{passive:!0}),t&&(this.handleMouseDown(null),this.handleThumbMouseDown(null))},this.initialValue="",this.handleThumbMouseDown=t=>{if(t){if(this.readOnly||this.disabled||t.defaultPrevented)return;t.target.focus()}const e=(null!==t?"add":"remove")+"EventListener";window[e]("mouseup",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove,{passive:!0}),window[e]("touchmove",this.handleMouseMove,{passive:!0}),window[e]("touchend",this.handleWindowMouseUp),this.isDragging=null!==t},this.handleMouseMove=t=>{if(this.readOnly||this.disabled||t.defaultPrevented)return;const e=window.TouchEvent&&t instanceof TouchEvent?t.touches[0]:t,i=this.orientation===ai?e.pageX-document.documentElement.scrollLeft-this.trackLeft:e.pageY-document.documentElement.scrollTop;this.value=""+this.calculateNewValue(i)},this.calculateNewValue=t=>{const e=Bn(t,this.orientation===ai?this.trackMinWidth:this.trackMinHeight,this.orientation===ai?this.trackWidth:this.trackHeight,this.direction),i=(this.max-this.min)*e+this.min;return this.convertToConstrainedValue(i)},this.handleWindowMouseUp=t=>{this.stopDragging()},this.stopDragging=()=>{this.isDragging=!1,this.handleMouseDown(null),this.handleThumbMouseDown(null)},this.handleMouseDown=t=>{const e=(null!==t?"add":"remove")+"EventListener";if((null===t||!this.disabled&&!this.readOnly)&&(window[e]("mouseup",this.handleWindowMouseUp),window.document[e]("mouseleave",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove),t)){t.preventDefault(),this.setupTrackConstraints(),t.target.focus();const e=this.orientation===ai?t.pageX-document.documentElement.scrollLeft-this.trackLeft:t.pageY-document.documentElement.scrollTop;this.value=""+this.calculateNewValue(e)}},this.convertToConstrainedValue=t=>{isNaN(t)&&(t=this.min);let e=t-this.min;const i=e-Math.round(e/this.step)*(this.stepMultiplier*this.step)/this.stepMultiplier;return e=i>=Number(this.step)/2?e-i+Number(this.step):e-i,e+this.min}}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){super.valueChanged(t,e),this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction),this.$emit("change")}minChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.min=""+this.min),this.validate()}maxChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.max=""+this.max),this.validate()}stepChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.step=""+this.step),this.updateStepMultiplier(),this.validate()}orientationChanged(){this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","range"),this.direction=Ii(this),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupListeners(),this.setupDefaultValue(),this.setThumbPositionForOrientation(this.direction)}disconnectedCallback(){this.setupListeners(!0)}increment(){const t=this.direction!==pi.rtl&&this.orientation!==li?Number(this.value)+Number(this.step):Number(this.value)-Number(this.step),e=this.convertToConstrainedValue(t),i=e<Number(this.max)?""+e:""+this.max;this.value=i}decrement(){const t=this.direction!==pi.rtl&&this.orientation!==li?Number(this.value)-Number(this.step):Number(this.value)+Number(this.step),e=this.convertToConstrainedValue(t),i=e>Number(this.min)?""+e:""+this.min;this.value=i}setThumbPositionForOrientation(t){const e=100*(1-Bn(Number(this.value),Number(this.min),Number(this.max),t));this.orientation===ai?this.position=this.isDragging?`right: ${e}%; transition: none;`:`right: ${e}%; transition: all 0.2s ease;`:this.position=this.isDragging?`bottom: ${e}%; transition: none;`:`bottom: ${e}%; transition: all 0.2s ease;`}updateStepMultiplier(){const t=this.step+"",e=this.step%1?t.length-t.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,e)}get midpoint(){return""+this.convertToConstrainedValue((this.max+this.min)/2)}setupDefaultValue(){if("string"==typeof this.value)if(0===this.value.length)this.initialValue=this.midpoint;else{const t=parseFloat(this.value);!Number.isNaN(t)&&(t<this.min||t>this.max)&&(this.value=this.midpoint)}}}oe([lt({attribute:"readonly",mode:"boolean"})],Yn.prototype,"readOnly",void 0),oe([v],Yn.prototype,"direction",void 0),oe([v],Yn.prototype,"isDragging",void 0),oe([v],Yn.prototype,"position",void 0),oe([v],Yn.prototype,"trackWidth",void 0),oe([v],Yn.prototype,"trackMinWidth",void 0),oe([v],Yn.prototype,"trackHeight",void 0),oe([v],Yn.prototype,"trackLeft",void 0),oe([v],Yn.prototype,"trackMinHeight",void 0),oe([v],Yn.prototype,"valueTextFormatter",void 0),oe([lt({converter:rt})],Yn.prototype,"min",void 0),oe([lt({converter:rt})],Yn.prototype,"max",void 0),oe([lt({converter:rt})],Yn.prototype,"step",void 0),oe([lt],Yn.prototype,"orientation",void 0),oe([lt],Yn.prototype,"mode",void 0);const Xn=(t,e)=>K`<template role="switch" aria-checked="${t=>t.checked}" aria-disabled="${t=>t.disabled}" aria-readonly="${t=>t.readOnly}" tabindex="${t=>t.disabled?null:0}" @keypress="${(t,e)=>t.keypressHandler(e.event)}" @click="${(t,e)=>t.clickHandler(e.event)}" class="${t=>t.checked?"checked":""}"><label part="label" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt("defaultSlottedNodes")}></slot></label><div part="switch" class="switch"><slot name="switch">${e.switch||""}</slot></div><span class="status-message" part="status-message"><span class="checked-message" part="checked-message"><slot name="checked-message"></slot></span><span class="unchecked-message" part="unchecked-message"><slot name="unchecked-message"></slot></span></span></template>`;class Gn extends ei{}class Qn extends(Wi(Gn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Zn extends Qn{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly),this.readOnly?this.classList.add("readonly"):this.classList.remove("readonly")}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{if(!this.readOnly)switch(t.key){case"Enter":case" ":this.checked=!this.checked}},this.clickHandler=t=>{this.disabled||this.readOnly||(this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}checkedChanged(t,e){super.checkedChanged(t,e),this.checked?this.classList.add("checked"):this.classList.remove("checked")}}oe([lt({attribute:"readonly",mode:"boolean"})],Zn.prototype,"readOnly",void 0),oe([v],Zn.prototype,"defaultSlottedNodes",void 0);const Jn=(t,e)=>K`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`;class tr extends ei{}const er=(t,e)=>K`<template slot="tab" role="tab" aria-disabled="${t=>t.disabled}"><slot></slot></template>`;class ir extends ei{}oe([lt({mode:"boolean"})],ir.prototype,"disabled",void 0);const sr=(t,e)=>K`<template class="${t=>t.orientation}">${te(0,e)}<div class="tablist" part="tablist" role="tablist"><slot class="tab" name="tab" part="tab" ${Xt("tabs")}></slot>${zt(t=>t.showActiveIndicator,K`<div ${Pt("activeIndicatorRef")} class="activeIndicator" part="activeIndicator"></div>`)}</div>${Jt(0,e)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${Xt("tabpanels")}></slot></div></template>`,or={vertical:"vertical",horizontal:"horizontal"};class nr extends ei{constructor(){super(...arguments),this.orientation=or.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=t=>"true"===t.getAttribute("aria-disabled"),this.isHiddenElement=t=>t.hasAttribute("hidden"),this.isFocusableElement=t=>!this.isDisabledElement(t)&&!this.isHiddenElement(t),this.setTabs=()=>{const t=this.isHorizontal()?"gridColumn":"gridRow";this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach((e,i)=>{if("tab"===e.slot){const t=this.activeTabIndex===i&&this.isFocusableElement(e);this.activeindicator&&this.isFocusableElement(e)&&(this.showActiveIndicator=!0);const s=this.tabIds[i],o=this.tabpanelIds[i];e.setAttribute("id",s),e.setAttribute("aria-selected",t?"true":"false"),e.setAttribute("aria-controls",o),e.addEventListener("click",this.handleTabClick),e.addEventListener("keydown",this.handleTabKeyDown),e.setAttribute("tabindex",t?"0":"-1"),t&&(this.activetab=e,this.activeid=s)}e.style.gridColumn="",e.style.gridRow="",e.style[t]=""+(i+1),this.isHorizontal()?e.classList.remove("vertical"):e.classList.add("vertical")})},this.setTabPanels=()=>{this.tabpanels.forEach((t,e)=>{const i=this.tabIds[e],s=this.tabpanelIds[e];t.setAttribute("id",s),t.setAttribute("aria-labelledby",i),this.activeTabIndex!==e?t.setAttribute("hidden",""):t.removeAttribute("hidden")})},this.handleTabClick=t=>{const e=t.currentTarget;1===e.nodeType&&this.isFocusableElement(e)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(e),this.setComponent())},this.handleTabKeyDown=t=>{if(this.isHorizontal())switch(t.key){case"ArrowLeft":t.preventDefault(),this.adjustBackward(t);break;case"ArrowRight":t.preventDefault(),this.adjustForward(t)}else switch(t.key){case"ArrowUp":t.preventDefault(),this.adjustBackward(t);break;case"ArrowDown":t.preventDefault(),this.adjustForward(t)}switch(t.key){case"Home":t.preventDefault(),this.adjust(-this.activeTabIndex);break;case"End":t.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.adjustForward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)+1:1,i===e.length&&(i=0);i<e.length&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}if(this.activetab&&i===e.indexOf(this.activetab))break;i+1>=e.length?i=0:i+=1}},this.adjustBackward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)-1:0,i=i<0?e.length-1:i;i>=0&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}i-1<0?i=e.length-1:i-=1}},this.moveToTabByIndex=(t,e)=>{const i=t[e];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=e,i.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(t,e){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex(e=>e.id===t),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map(t=>{var e;return null!==(e=t.getAttribute("id"))&&void 0!==e?e:"tab-"+gi()})}getTabPanelIds(){return this.tabpanels.map(t=>{var e;return null!==(e=t.getAttribute("id"))&&void 0!==e?e:"panel-"+gi()})}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===or.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const t=this.isHorizontal()?"gridColumn":"gridRow",e=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",s=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=""+(this.activeTabIndex+1);const o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=""+(this.prevActiveTabIndex+1);const n=o-s;this.activeIndicatorRef.style.transform=`${e}(${n}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",()=>{this.ticking=!1,this.activeIndicatorRef.style[t]=""+(this.activeTabIndex+1),this.activeIndicatorRef.style.transform=e+"(0px)",this.activeIndicatorRef.classList.remove("activeIndicatorTransition")})}adjust(t){const e=this.tabs.filter(t=>this.isFocusableElement(t)),i=e.indexOf(this.activetab),s=mi(0,e.length-1,i+t),o=this.tabs.indexOf(e[s]);o>-1&&this.moveToTabByIndex(this.tabs,o)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}oe([lt],nr.prototype,"orientation",void 0),oe([lt],nr.prototype,"activeid",void 0),oe([v],nr.prototype,"tabs",void 0),oe([v],nr.prototype,"tabpanels",void 0),oe([lt({mode:"boolean"})],nr.prototype,"activeindicator",void 0),oe([v],nr.prototype,"activeIndicatorRef",void 0),oe([v],nr.prototype,"showActiveIndicator",void 0),oi(nr,Zt);class rr extends ei{}class ar extends(_i(rr)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}const lr={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};class hr extends ar{constructor(){super(...arguments),this.resize=lr.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}oe([lt({mode:"boolean"})],hr.prototype,"readOnly",void 0),oe([lt],hr.prototype,"resize",void 0),oe([lt({mode:"boolean"})],hr.prototype,"autofocus",void 0),oe([lt({attribute:"form"})],hr.prototype,"formId",void 0),oe([lt],hr.prototype,"list",void 0),oe([lt({converter:rt})],hr.prototype,"maxlength",void 0),oe([lt({converter:rt})],hr.prototype,"minlength",void 0),oe([lt],hr.prototype,"name",void 0),oe([lt],hr.prototype,"placeholder",void 0),oe([lt({converter:rt,mode:"fromView"})],hr.prototype,"cols",void 0),oe([lt({converter:rt,mode:"fromView"})],hr.prototype,"rows",void 0),oe([lt({mode:"boolean"})],hr.prototype,"spellcheck",void 0),oe([v],hr.prototype,"defaultSlottedNodes",void 0),oi(hr,un);const dr=(t,e)=>K`<template class=" ${t=>t.readOnly?"readonly":""} ${t=>t.resize!==lr.none?"resize-"+t.resize:""}"><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt("defaultSlottedNodes")}></slot></label><textarea part="control" class="control" id="control" ?autofocus="${t=>t.autofocus}" cols="${t=>t.cols}" ?disabled="${t=>t.disabled}" form="${t=>t.form}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" name="${t=>t.name}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" rows="${t=>t.rows}" ?spellcheck="${t=>t.spellcheck}" :value="${t=>t.value}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" @input="${(t,e)=>t.handleTextInput()}" @change="${t=>t.handleChange()}" ${Pt("control")}></textarea></template>`,cr=(t,e)=>K`<template class=" ${t=>t.readOnly?"readonly":""} "><label part="label" for="control" class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"><slot ${Xt({property:"defaultSlottedNodes",filter:Tn})}></slot></label><div class="root" part="root">${te(0,e)}<input class="control" part="control" id="control" @input="${t=>t.handleTextInput()}" @change="${t=>t.handleChange()}" ?autofocus="${t=>t.autofocus}" ?disabled="${t=>t.disabled}" list="${t=>t.list}" maxlength="${t=>t.maxlength}" minlength="${t=>t.minlength}" pattern="${t=>t.pattern}" placeholder="${t=>t.placeholder}" ?readonly="${t=>t.readOnly}" ?required="${t=>t.required}" size="${t=>t.size}" ?spellcheck="${t=>t.spellcheck}" :value="${t=>t.value}" type="${t=>t.type}" aria-atomic="${t=>t.ariaAtomic}" aria-busy="${t=>t.ariaBusy}" aria-controls="${t=>t.ariaControls}" aria-current="${t=>t.ariaCurrent}" aria-describedby="${t=>t.ariaDescribedby}" aria-details="${t=>t.ariaDetails}" aria-disabled="${t=>t.ariaDisabled}" aria-errormessage="${t=>t.ariaErrormessage}" aria-flowto="${t=>t.ariaFlowto}" aria-haspopup="${t=>t.ariaHaspopup}" aria-hidden="${t=>t.ariaHidden}" aria-invalid="${t=>t.ariaInvalid}" aria-keyshortcuts="${t=>t.ariaKeyshortcuts}" aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-live="${t=>t.ariaLive}" aria-owns="${t=>t.ariaOwns}" aria-relevant="${t=>t.ariaRelevant}" aria-roledescription="${t=>t.ariaRoledescription}" ${Pt("control")} />${Jt(0,e)}</div></template>`,ur=(t,e)=>K`<template aria-label="${t=>t.ariaLabel}" aria-labelledby="${t=>t.ariaLabelledby}" aria-orientation="${t=>t.orientation}" orientation="${t=>t.orientation}" role="toolbar" @mousedown="${(t,e)=>t.mouseDownHandler(e.event)}" @focusin="${(t,e)=>t.focusinHandler(e.event)}" @keydown="${(t,e)=>t.keydownHandler(e.event)}" ${Qt({property:"childItems",attributeFilter:["disabled","hidden"],filter:Wt(),subtree:!0})}><slot name="label"></slot><div class="positioning-region" part="positioning-region">${te(0,e)}<slot ${Xt({filter:Wt(),property:"slottedItems"})}></slot>${Jt(0,e)}</div></template>`;const pr=Object.freeze({[ui.ArrowUp]:{[li]:-1},[ui.ArrowDown]:{[li]:1},[ui.ArrowLeft]:{[ai]:{[pi.ltr]:-1,[pi.rtl]:1}},[ui.ArrowRight]:{[ai]:{[pi.ltr]:1,[pi.rtl]:-1}}});class mr extends ei{constructor(){super(...arguments),this._activeIndex=0,this.direction=pi.ltr,this.orientation=ai}get activeIndex(){return m.track(this,"activeIndex"),this._activeIndex}set activeIndex(t){this.$fastController.isConnected&&(this._activeIndex=mi(0,this.focusableElements.length-1,t),m.notify(this,"activeIndex"))}slottedItemsChanged(){this.$fastController.isConnected&&this.reduceFocusableElements()}mouseDownHandler(t){var e;const i=null===(e=this.focusableElements)||void 0===e?void 0:e.findIndex(e=>e.contains(t.target));return i>-1&&this.activeIndex!==i&&this.setFocusedElement(i),!0}childItemsChanged(t,e){this.$fastController.isConnected&&this.reduceFocusableElements()}connectedCallback(){super.connectedCallback(),this.direction=Ii(this)}focusinHandler(t){const e=t.relatedTarget;e&&!this.contains(e)&&this.setFocusedElement()}getDirectionalIncrementer(t){var e,i,s,o,n;return null!==(n=null!==(s=null===(i=null===(e=pr[t])||void 0===e?void 0:e[this.orientation])||void 0===i?void 0:i[this.direction])&&void 0!==s?s:null===(o=pr[t])||void 0===o?void 0:o[this.orientation])&&void 0!==n?n:0}keydownHandler(t){const e=t.key;if(!(e in ui)||t.defaultPrevented||t.shiftKey)return!0;const i=this.getDirectionalIncrementer(e);if(!i)return!t.target.closest("[role=radiogroup]");const s=this.activeIndex+i;return this.focusableElements[s]&&t.preventDefault(),this.setFocusedElement(s),!0}get allSlottedItems(){return[...this.start.assignedElements(),...this.slottedItems,...this.end.assignedElements()]}reduceFocusableElements(){var t;const e=null===(t=this.focusableElements)||void 0===t?void 0:t[this.activeIndex];this.focusableElements=this.allSlottedItems.reduce(mr.reduceFocusableItems,[]);const i=this.focusableElements.indexOf(e);this.activeIndex=Math.max(0,i),this.setFocusableElements()}setFocusedElement(t=this.activeIndex){this.activeIndex=t,this.setFocusableElements(),this.focusableElements[this.activeIndex]&&this.contains(function(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.activeElement:document.activeElement}(this))&&this.focusableElements[this.activeIndex].focus()}static reduceFocusableItems(t,e){var i,s,o,n;const r="radio"===e.getAttribute("role"),a=null===(s=null===(i=e.$fastController)||void 0===i?void 0:i.definition.shadowOptions)||void 0===s?void 0:s.delegatesFocus,l=Array.from(null!==(n=null===(o=e.shadowRoot)||void 0===o?void 0:o.querySelectorAll("*"))&&void 0!==n?n:[]).some(t=>wo(t));return e.hasAttribute("disabled")||e.hasAttribute("hidden")||!(wo(e)||r||a||l)?e.childElementCount?t.concat(Array.from(e.children).reduce(mr.reduceFocusableItems,[])):t:(t.push(e),t)}setFocusableElements(){this.$fastController.isConnected&&this.focusableElements.length>0&&this.focusableElements.forEach((t,e)=>{t.tabIndex=this.activeIndex===e?0:-1})}}oe([v],mr.prototype,"direction",void 0),oe([lt],mr.prototype,"orientation",void 0),oe([v],mr.prototype,"slottedItems",void 0),oe([v],mr.prototype,"slottedLabel",void 0),oe([v],mr.prototype,"childItems",void 0);class vr{}oe([lt({attribute:"aria-labelledby"})],vr.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-label"})],vr.prototype,"ariaLabel",void 0),oi(vr,xi),oi(mr,Zt,vr);const fr=(t,e)=>K` ${zt(t=>t.tooltipVisible,K`<${t.tagFor(Ei)} fixed-placement="true" auto-update-mode="${t=>t.autoUpdateMode}" vertical-positioning-mode="${t=>t.verticalPositioningMode}" vertical-default-position="${t=>t.verticalDefaultPosition}" vertical-inset="${t=>t.verticalInset}" vertical-scaling="${t=>t.verticalScaling}" horizontal-positioning-mode="${t=>t.horizontalPositioningMode}" horizontal-default-position="${t=>t.horizontalDefaultPosition}" horizontal-scaling="${t=>t.horizontalScaling}" horizontal-inset="${t=>t.horizontalInset}" vertical-viewport-lock="${t=>t.horizontalViewportLock}" horizontal-viewport-lock="${t=>t.verticalViewportLock}" dir="${t=>t.currentDirection}" ${Pt("region")}><div class="tooltip" part="tooltip" role="tooltip"><slot></slot></div></${t.tagFor(Ei)}>`)} `,gr={top:"top",right:"right",bottom:"bottom",left:"left",start:"start",end:"end",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",topStart:"top-start",topEnd:"top-end",bottomStart:"bottom-start",bottomEnd:"bottom-end"};class br extends ei{constructor(){super(...arguments),this.anchor="",this.delay=300,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.horizontalInset="false",this.verticalInset="false",this.horizontalScaling="content",this.verticalScaling="content",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition=void 0,this.tooltipVisible=!1,this.currentDirection=pi.ltr,this.showDelayTimer=null,this.hideDelayTimer=null,this.isAnchorHoveredFocused=!1,this.isRegionHovered=!1,this.handlePositionChange=t=>{this.classList.toggle("top","start"===this.region.verticalPosition),this.classList.toggle("bottom","end"===this.region.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.region.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.region.verticalPosition),this.classList.toggle("center-vertical","center"===this.region.verticalPosition),this.classList.toggle("left","start"===this.region.horizontalPosition),this.classList.toggle("right","end"===this.region.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.region.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.region.horizontalPosition),this.classList.toggle("center-horizontal","center"===this.region.horizontalPosition)},this.handleRegionMouseOver=t=>{this.isRegionHovered=!0},this.handleRegionMouseOut=t=>{this.isRegionHovered=!1,this.startHideDelayTimer()},this.handleAnchorMouseOver=t=>{this.tooltipVisible?this.isAnchorHoveredFocused=!0:this.startShowDelayTimer()},this.handleAnchorMouseOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.handleAnchorFocusIn=t=>{this.startShowDelayTimer()},this.handleAnchorFocusOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.startHideDelayTimer=()=>{this.clearHideDelayTimer(),this.tooltipVisible&&(this.hideDelayTimer=window.setTimeout(()=>{this.updateTooltipVisibility()},60))},this.clearHideDelayTimer=()=>{null!==this.hideDelayTimer&&(clearTimeout(this.hideDelayTimer),this.hideDelayTimer=null)},this.startShowDelayTimer=()=>{this.isAnchorHoveredFocused||(this.delay>1?null===this.showDelayTimer&&(this.showDelayTimer=window.setTimeout(()=>{this.startHover()},this.delay)):this.startHover())},this.startHover=()=>{this.isAnchorHoveredFocused=!0,this.updateTooltipVisibility()},this.clearShowDelayTimer=()=>{null!==this.showDelayTimer&&(clearTimeout(this.showDelayTimer),this.showDelayTimer=null)},this.getAnchor=()=>{const t=this.getRootNode();return t instanceof ShadowRoot?t.getElementById(this.anchor):document.getElementById(this.anchor)},this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&this.tooltipVisible)switch(t.key){case"Escape":this.isAnchorHoveredFocused=!1,this.updateTooltipVisibility(),this.$emit("dismiss")}},this.updateTooltipVisibility=()=>{if(!1===this.visible)this.hideTooltip();else{if(!0===this.visible)return void this.showTooltip();if(this.isAnchorHoveredFocused||this.isRegionHovered)return void this.showTooltip();this.hideTooltip()}},this.showTooltip=()=>{this.tooltipVisible||(this.currentDirection=Ii(this),this.tooltipVisible=!0,document.addEventListener("keydown",this.handleDocumentKeydown),c.queueUpdate(this.setRegionProps))},this.hideTooltip=()=>{this.tooltipVisible&&(this.clearHideDelayTimer(),null!==this.region&&void 0!==this.region&&(this.region.removeEventListener("positionchange",this.handlePositionChange),this.region.viewportElement=null,this.region.anchorElement=null,this.region.removeEventListener("mouseover",this.handleRegionMouseOver),this.region.removeEventListener("mouseout",this.handleRegionMouseOut)),document.removeEventListener("keydown",this.handleDocumentKeydown),this.tooltipVisible=!1)},this.setRegionProps=()=>{this.tooltipVisible&&(this.region.viewportElement=this.viewportElement,this.region.anchorElement=this.anchorElement,this.region.addEventListener("positionchange",this.handlePositionChange),this.region.addEventListener("mouseover",this.handleRegionMouseOver,{passive:!0}),this.region.addEventListener("mouseout",this.handleRegionMouseOut,{passive:!0}))}}visibleChanged(){this.$fastController.isConnected&&(this.updateTooltipVisibility(),this.updateLayout())}anchorChanged(){this.$fastController.isConnected&&(this.anchorElement=this.getAnchor())}positionChanged(){this.$fastController.isConnected&&this.updateLayout()}anchorElementChanged(t){if(this.$fastController.isConnected){if(null!=t&&(t.removeEventListener("mouseover",this.handleAnchorMouseOver),t.removeEventListener("mouseout",this.handleAnchorMouseOut),t.removeEventListener("focusin",this.handleAnchorFocusIn),t.removeEventListener("focusout",this.handleAnchorFocusOut)),null!==this.anchorElement&&void 0!==this.anchorElement){this.anchorElement.addEventListener("mouseover",this.handleAnchorMouseOver,{passive:!0}),this.anchorElement.addEventListener("mouseout",this.handleAnchorMouseOut,{passive:!0}),this.anchorElement.addEventListener("focusin",this.handleAnchorFocusIn,{passive:!0}),this.anchorElement.addEventListener("focusout",this.handleAnchorFocusOut,{passive:!0});const t=this.anchorElement.id;null!==this.anchorElement.parentElement&&this.anchorElement.parentElement.querySelectorAll(":hover").forEach(e=>{e.id===t&&this.startShowDelayTimer()})}null!==this.region&&void 0!==this.region&&this.tooltipVisible&&(this.region.anchorElement=this.anchorElement),this.updateLayout()}}viewportElementChanged(){null!==this.region&&void 0!==this.region&&(this.region.viewportElement=this.viewportElement),this.updateLayout()}connectedCallback(){super.connectedCallback(),this.anchorElement=this.getAnchor(),this.updateTooltipVisibility()}disconnectedCallback(){this.hideTooltip(),this.clearShowDelayTimer(),this.clearHideDelayTimer(),super.disconnectedCallback()}updateLayout(){switch(this.verticalPositioningMode="locktodefault",this.horizontalPositioningMode="locktodefault",this.position){case gr.top:case gr.bottom:this.verticalDefaultPosition=this.position,this.horizontalDefaultPosition="center";break;case gr.right:case gr.left:case gr.start:case gr.end:this.verticalDefaultPosition="center",this.horizontalDefaultPosition=this.position;break;case gr.topLeft:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="left";break;case gr.topRight:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="right";break;case gr.bottomLeft:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="left";break;case gr.bottomRight:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="right";break;case gr.topStart:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="start";break;case gr.topEnd:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="end";break;case gr.bottomStart:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="start";break;case gr.bottomEnd:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="end";break;default:this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition="center"}}}oe([lt({mode:"boolean"})],br.prototype,"visible",void 0),oe([lt],br.prototype,"anchor",void 0),oe([lt],br.prototype,"delay",void 0),oe([lt],br.prototype,"position",void 0),oe([lt({attribute:"auto-update-mode"})],br.prototype,"autoUpdateMode",void 0),oe([lt({attribute:"horizontal-viewport-lock"})],br.prototype,"horizontalViewportLock",void 0),oe([lt({attribute:"vertical-viewport-lock"})],br.prototype,"verticalViewportLock",void 0),oe([v],br.prototype,"anchorElement",void 0),oe([v],br.prototype,"viewportElement",void 0),oe([v],br.prototype,"verticalPositioningMode",void 0),oe([v],br.prototype,"horizontalPositioningMode",void 0),oe([v],br.prototype,"horizontalInset",void 0),oe([v],br.prototype,"verticalInset",void 0),oe([v],br.prototype,"horizontalScaling",void 0),oe([v],br.prototype,"verticalScaling",void 0),oe([v],br.prototype,"verticalDefaultPosition",void 0),oe([v],br.prototype,"horizontalDefaultPosition",void 0),oe([v],br.prototype,"tooltipVisible",void 0),oe([v],br.prototype,"currentDirection",void 0);const yr=(t,e)=>K`<template role="treeitem" slot="${t=>t.isNestedItem()?"item":void 0}" tabindex="-1" class="${t=>t.expanded?"expanded":""} ${t=>t.selected?"selected":""} ${t=>t.nested?"nested":""} ${t=>t.disabled?"disabled":""}" aria-expanded="${t=>t.childItems&&t.childItemLength()>0?t.expanded:void 0}" aria-selected="${t=>t.selected}" aria-disabled="${t=>t.disabled}" @focusin="${(t,e)=>t.handleFocus(e.event)}" @focusout="${(t,e)=>t.handleBlur(e.event)}" ${Qt({property:"childItems",filter:Wt()})}><div class="positioning-region" part="positioning-region"><div class="content-region" part="content-region">${zt(t=>t.childItems&&t.childItemLength()>0,K`<div aria-hidden="true" class="expand-collapse-button" part="expand-collapse-button" @click="${(t,e)=>t.handleExpandCollapseButtonClick(e.event)}" ${Pt("expandCollapseButton")}><slot name="expand-collapse-glyph">${e.expandCollapseGlyph||""}</slot></div>`)} ${te(0,e)}<slot></slot>${Jt(0,e)}</div></div>${zt(t=>t.childItems&&t.childItemLength()>0&&(t.expanded||t.renderCollapsedChildren),K`<div role="group" class="items" part="items"><slot name="item" ${Xt("items")}></slot></div>`)}</template>`;function Cr(t){return hi(t)&&"treeitem"===t.getAttribute("role")}class xr extends ei{constructor(){super(...arguments),this.expanded=!1,this.focusable=!1,this.isNestedItem=()=>Cr(this.parentElement),this.handleExpandCollapseButtonClick=t=>{this.disabled||t.defaultPrevented||(this.expanded=!this.expanded)},this.handleFocus=t=>{this.setAttribute("tabindex","0")},this.handleBlur=t=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(t,e){this.$fastController.isConnected&&this.items.forEach(t=>{Cr(t)&&(t.nested=!0)})}static focusItem(t){t.focusable=!0,t.focus()}childItemLength(){const t=this.childItems.filter(t=>Cr(t));return t?t.length:0}}oe([lt({mode:"boolean"})],xr.prototype,"expanded",void 0),oe([lt({mode:"boolean"})],xr.prototype,"selected",void 0),oe([lt({mode:"boolean"})],xr.prototype,"disabled",void 0),oe([v],xr.prototype,"focusable",void 0),oe([v],xr.prototype,"childItems",void 0),oe([v],xr.prototype,"items",void 0),oe([v],xr.prototype,"nested",void 0),oe([v],xr.prototype,"renderCollapsedChildren",void 0),oi(xr,Zt);const wr=(t,e)=>K`<template role="tree" ${Pt("treeView")} @keydown="${(t,e)=>t.handleKeyDown(e.event)}" @focusin="${(t,e)=>t.handleFocus(e.event)}" @focusout="${(t,e)=>t.handleBlur(e.event)}" @click="${(t,e)=>t.handleClick(e.event)}" @selected-change="${(t,e)=>t.handleSelectedChange(e.event)}"><slot ${Xt("slottedTreeItems")}></slot></template>`;class $r extends ei{constructor(){super(...arguments),this.currentFocused=null,this.handleFocus=t=>{if(!(this.slottedTreeItems.length<1))return t.target===this?(null===this.currentFocused&&(this.currentFocused=this.getValidFocusableItem()),void(null!==this.currentFocused&&xr.focusItem(this.currentFocused))):void(this.contains(t.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=t.target))},this.handleBlur=t=>{t.target instanceof HTMLElement&&(null===t.relatedTarget||!this.contains(t.relatedTarget))&&this.setAttribute("tabindex","0")},this.handleKeyDown=t=>{if(t.defaultPrevented)return;if(this.slottedTreeItems.length<1)return!0;const e=this.getVisibleNodes();switch(t.key){case"Home":return void(e.length&&xr.focusItem(e[0]));case"End":return void(e.length&&xr.focusItem(e[e.length-1]));case"ArrowLeft":if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof xr&&e.childItemLength()>0&&e.expanded?e.expanded=!1:e instanceof xr&&e.parentElement instanceof xr&&xr.focusItem(e.parentElement)}return!1;case"ArrowRight":if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof xr&&e.childItemLength()>0&&!e.expanded?e.expanded=!0:e instanceof xr&&e.childItemLength()>0&&this.focusNextNode(1,t.target)}return;case"ArrowDown":return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(1,t.target));case"ArrowUp":return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(-1,t.target));case"Enter":return void this.handleClick(t)}return!0},this.handleSelectedChange=t=>{if(t.defaultPrevented)return;if(!(t.target instanceof Element&&Cr(t.target)))return!0;const e=t.target;e.selected?(this.currentSelected&&this.currentSelected!==e&&(this.currentSelected.selected=!1),this.currentSelected=e):e.selected||this.currentSelected!==e||(this.currentSelected=null)},this.setItems=()=>{const t=this.treeView.querySelector("[aria-selected='true']");this.currentSelected=t,null!==this.currentFocused&&this.contains(this.currentFocused)||(this.currentFocused=this.getValidFocusableItem()),this.nested=this.checkForNestedItems();this.getVisibleNodes().forEach(t=>{Cr(t)&&(t.nested=this.nested)})},this.isFocusableElement=t=>Cr(t),this.isSelectedElement=t=>t.selected}slottedTreeItemsChanged(){this.$fastController.isConnected&&this.setItems()}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),c.queueUpdate(()=>{this.setItems()})}handleClick(t){if(t.defaultPrevented)return;if(!(t.target instanceof Element&&Cr(t.target)))return!0;const e=t.target;e.disabled||(e.selected=!e.selected)}focusNextNode(t,e){const i=this.getVisibleNodes();if(!i)return;const s=i[i.indexOf(e)+t];hi(s)&&xr.focusItem(s)}getValidFocusableItem(){const t=this.getVisibleNodes();let e=t.findIndex(this.isSelectedElement);return-1===e&&(e=t.findIndex(this.isFocusableElement)),-1!==e?t[e]:null}checkForNestedItems(){return this.slottedTreeItems.some(t=>Cr(t)&&t.querySelector("[role='treeitem']"))}getVisibleNodes(){return function(t,e){if(!t||!e||!hi(t))return;return Array.from(t.querySelectorAll(e)).filter(t=>null!==t.offsetParent)}(this,"[role='treeitem']")||[]}}oe([lt({attribute:"render-collapsed-nodes"})],$r.prototype,"renderCollapsedNodes",void 0),oe([v],$r.prototype,"currentSelected",void 0),oe([v],$r.prototype,"slottedTreeItems",void 0);class kr{constructor(t){this.listenerCache=new WeakMap,this.query=t}bind(t){const{query:e}=this,i=this.constructListener(t);i.bind(e)(),e.addListener(i),this.listenerCache.set(t,i)}unbind(t){const e=this.listenerCache.get(t);e&&(this.query.removeListener(e),this.listenerCache.delete(t))}}class Ir extends kr{constructor(t,e){super(t),this.styles=e}static with(t){return e=>new Ir(t,e)}constructListener(t){let e=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!e?(t.$fastController.addStyles(i),e=s):!s&&e&&(t.$fastController.removeStyles(i),e=s)}}unbind(t){super.unbind(t),t.$fastController.removeStyles(this.styles)}}const Er=Ir.with(window.matchMedia("(forced-colors)")),Tr=Ir.with(window.matchMedia("(prefers-color-scheme: dark)")),Or=Ir.with(window.matchMedia("(prefers-color-scheme: light)"));class Sr{constructor(t,e,i){this.propertyName=t,this.value=e,this.styles=i}bind(t){m.getNotifier(t).subscribe(this,this.propertyName),this.handleChange(t,this.propertyName)}unbind(t){m.getNotifier(t).unsubscribe(this,this.propertyName),t.$fastController.removeStyles(this.styles)}handleChange(t,e){t[e]===this.value?t.$fastController.addStyles(this.styles):t.$fastController.removeStyles(this.styles)}}const Rr="not-allowed",Ar=":host([hidden]){display:none}";function Dr(t){return`${Ar}:host{display:${t}}`}const Fr=function(){if("boolean"==typeof di)return di;if("undefined"==typeof window||!window.document||!window.document.createElement)return di=!1,di;const t=document.createElement("style"),e=function(){const t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}();null!==e&&t.setAttribute("nonce",e),document.head.appendChild(t);try{t.sheet.insertRule("foo:focus-visible {color:inherit}",0),di=!0}catch(t){di=!1}finally{document.head.removeChild(t)}return di}()?"focus-visible":"focus";export{t as $global,xi as ARIAGlobalStatesAndProperties,yi as Accordion,bi as AccordionExpandMode,ni as AccordionItem,wi as Anchor,Ei as AnchoredRegion,w as AttachedBehaviorHTMLDirective,ot as AttributeConfiguration,at as AttributeDefinition,Pi as Avatar,Vi as Badge,gn as BaseProgress,L as BindingBehavior,Bi as Breadcrumb,zi as BreadcrumbItem,Xi as Button,Ct as CSSDirective,Zi as Calendar,ds as CalendarTitleTemplate,bs as Card,Wi as CheckableFormAssociated,ws as Checkbox,Gt as ChildrenBehavior,Ds as Combobox,As as ComboboxAutocomplete,Je as ComponentPresentation,me as Container,he as ContainerConfiguration,Ne as ContainerImpl,ft as Controller,pe as DI,c as DOM,os as DataGrid,as as DataGridCell,ts as DataGridCellTypes,is as DataGridRow,es as DataGridRowTypes,Qi as DateFormatter,ti as DefaultComponentPresentation,le as DefaultResolver,Gi as DelegatesARIAButton,Fs as DelegatesARIACombobox,$i as DelegatesARIALink,Ts as DelegatesARIAListbox,Is as DelegatesARIAListboxOption,Dn as DelegatesARIASearch,Mn as DelegatesARIASelect,un as DelegatesARIATextbox,vr as DelegatesARIAToolbar,no as DesignSystem,Js as DesignToken,$o as Dialog,So as Disclosure,Do as Divider,Ao as DividerRole,to as ElementDisambiguation,Y as ElementStyles,b as ExecutionContext,i as FAST,bt as FASTElement,ut as FASTElementDefinition,Fe as FactoryImpl,Po as Flipper,Fo as FlipperDirection,Si as FlyoutPosBottom,Di as FlyoutPosBottomFill,Ri as FlyoutPosTallest,Fi as FlyoutPosTallestFill,Oi as FlyoutPosTop,Ai as FlyoutPosTopFill,_i as FormAssociated,ei as FoundationElement,si as FoundationElementRegistry,Ji as GenerateHeaderOptions,F as HTMLBindingDirective,C as HTMLDirective,j as HTMLView,In as HorizontalScroll,Es as Listbox,Vo as ListboxElement,ks as ListboxOption,kr as MatchMediaBehavior,Ir as MatchMediaStyleSheetBehavior,rn as Menu,sn as MenuItem,tn as MenuItemRole,vn as NumberField,m as Observable,Xo as Picker,Uo as PickerList,jo as PickerListItem,zo as PickerMenu,Bo as PickerMenuOption,p as PropertyChangeNotifier,Sr as PropertyStyleSheetBehavior,kn as Radio,Cn as RadioGroup,Lt as RefBehavior,qe as Registration,qt as RepeatBehavior,jt as RepeatDirective,re as ResolverBuilder,Re as ResolverImpl,An as Search,Pn as Select,Os as SelectPosition,ve as ServiceLocator,zn as Skeleton,Yn as Slider,qn as SliderLabel,Kn as SliderMode,Yt as SlottedBehavior,Zt as StartEnd,u as SubscriberSet,Zn as Switch,ir as Tab,tr as TabPanel,nr as Tabs,or as TabsOrientation,x as TargetedHTMLDirective,hr as TextArea,lr as TextAreaResize,cn as TextField,dn as TextFieldType,mr as Toolbar,br as Tooltip,gr as TooltipPosition,xr as TreeItem,$r as TreeView,_ as ViewTemplate,se as accordionItemTemplate,ri as accordionTemplate,we as all,Ci as anchorTemplate,ki as anchoredRegionTemplate,oi as applyMixins,lt as attr,Li as avatarTemplate,Mi as badgeTemplate,nt as booleanConverter,Hi as breadcrumbItemTemplate,Ni as breadcrumbTemplate,Ui as buttonTemplate,us as calendarCellTemplate,ps as calendarRowTemplate,fs as calendarTemplate,cs as calendarWeekdayTemplate,gs as cardTemplate,ys as checkboxTemplate,Qt as children,Ls as comboboxTemplate,U as compileTemplate,Ms as composedContains,Ps as composedParent,o as createMetadataLocator,wt as css,kt as cssPartial,yt as customElement,Tr as darkModeStylesheetBehavior,hs as dataGridCellTemplate,ls as dataGridRowTemplate,ss as dataGridTemplate,y as defaultExecutionContext,lo as dialogTemplate,Rr as disabledCursor,Oo as disclosureTemplate,Dr as display,Ro as dividerTemplate,Wt as elements,s as emptyArray,Ft as enableArrayObservation,Jt as endSlotTemplate,ee as endTemplate,Lo as flipperTemplate,Fr as focusVisible,Er as forcedColorsStylesheetBehavior,Ii as getDirection,Ar as hidden,En as horizontalScrollTemplate,K as html,Ee as ignore,ge as inject,ms as interactiveCalendarGridTemplate,$s as isListboxOption,Cr as isTreeItemElement,ke as lazy,Or as lightModeStylesheetBehavior,Mo as listboxOptionTemplate,Ho as listboxTemplate,on as menuItemTemplate,nn as menuTemplate,Te as newInstanceForScope,Oe as newInstanceOf,vs as noninteractiveCalendarTemplate,rt as nullableNumberConverter,an as numberFieldTemplate,v as observable,Ie as optional,Jo as pickerListItemTemplate,Zo as pickerListTemplate,Qo as pickerMenuOptionTemplate,Go as pickerMenuTemplate,_o as pickerTemplate,Q as prependToAdoptedStyleSheetsSymbol,fn as progressRingTemplate,bn as progressTemplate,yn as radioGroupTemplate,xn as radioTemplate,Pt as ref,To as reflectAttributes,_t as repeat,en as roleForMenuItem,On as searchTemplate,Vn as selectTemplate,xe as singleton,Hn as skeletonTemplate,Nn as sliderLabelTemplate,jn as sliderTemplate,Xt as slotted,te as startSlotTemplate,ie as startTemplate,qi as supportsElementInternals,Xn as switchTemplate,Jn as tabPanelTemplate,er as tabTemplate,sr as tabsTemplate,dr as textAreaTemplate,cr as textFieldTemplate,ur as toolbarTemplate,fr as tooltipTemplate,ye as transient,yr as treeItemTemplate,wr as treeViewTemplate,je as validateKey,f as volatile,zt as when,Tn as whitespaceFilter};
|