@datatechsolutions/tympan 0.3.0 → 0.3.1
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 +22 -4
- package/dist/elements-DCGBSGS8.js +14699 -0
- package/dist/elements-DCGBSGS8.js.map +1 -0
- package/dist/elements-react.d.ts +1378 -0
- package/dist/elements-react.js +3639 -0
- package/dist/elements-react.js.map +1 -0
- package/dist/elements.bundle.js +5 -0
- package/dist/elements.d.ts +13520 -0
- package/dist/elements.js +3 -0
- package/dist/flow.css +174 -3
- package/dist/flow.d.ts +86 -4
- package/dist/flow.js +199 -10
- package/dist/flow.js.map +1 -1
- package/dist/{index-C3WAwKdm.d.ts → index-6wR5ThnX.d.ts} +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/parse-Dq4x3Wet.js +345 -0
- package/dist/parse-Dq4x3Wet.js.map +1 -0
- package/dist/{src-Ds9ArSaP.js → src-C9whlpC7.js} +3 -342
- package/dist/src-C9whlpC7.js.map +1 -0
- package/dist/styles.css +6082 -2213
- package/docs/html-contract.md +644 -0
- package/package.json +25 -14
- package/src/avatars/GeneratedAvatar.tsx +41 -0
- package/src/avatars/avatarSvg.ts +252 -0
- package/src/avatars/avatars.test.tsx +268 -0
- package/src/avatars/index.ts +30 -0
- package/src/avatars/styles.ts +80 -0
- package/src/base.css +49 -0
- package/src/components/action-menu/ActionMenu.css +152 -0
- package/src/components/action-menu/ActionMenu.test.tsx +189 -0
- package/src/components/action-menu/ActionMenu.tsx +282 -0
- package/src/components/activity-feed/ActivityFeed.css +91 -0
- package/src/components/activity-feed/ActivityFeed.test.tsx +89 -0
- package/src/components/activity-feed/ActivityFeed.tsx +86 -0
- package/src/components/actor-chip/ActorChip.css +93 -0
- package/src/components/actor-chip/ActorChip.test.tsx +89 -0
- package/src/components/actor-chip/ActorChip.tsx +98 -0
- package/src/components/agent-output-card/AgentOutputCard.css +105 -0
- package/src/components/agent-output-card/AgentOutputCard.rtl.test.tsx +12 -0
- package/src/components/agent-output-card/AgentOutputCard.test.tsx +65 -0
- package/src/components/agent-output-card/AgentOutputCard.tsx +74 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.css +45 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.rtl.test.tsx +12 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.test.tsx +60 -0
- package/src/components/ambient-backdrop/AmbientBackdrop.tsx +11 -0
- package/src/components/app-frame/AppFrame.css +285 -0
- package/src/components/app-frame/AppFrame.test.tsx +127 -0
- package/src/components/app-frame/AppFrame.tsx +231 -0
- package/src/components/app-frame/AppFrameRail.css +321 -0
- package/src/components/app-frame/RailFrame.test.tsx +159 -0
- package/src/components/app-frame/RailFrame.tsx +140 -0
- package/src/components/app-frame/RailNav.tsx +118 -0
- package/src/components/app-frame/frameContext.ts +22 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.css +140 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.test.tsx +103 -0
- package/src/components/app-launcher-grid/AppLauncherGrid.tsx +201 -0
- package/src/components/app-navigation/AppNavigation.css +354 -0
- package/src/components/app-navigation/AppNavigation.test.tsx +129 -0
- package/src/components/app-navigation/AppNavigation.tsx +372 -0
- package/src/components/app-navigation/builders.ts +117 -0
- package/src/components/attention-list/AttentionList.css +90 -0
- package/src/components/attention-list/AttentionList.test.tsx +84 -0
- package/src/components/attention-list/AttentionList.tsx +82 -0
- package/src/components/auth-frame/AuthFrame.css +85 -0
- package/src/components/auth-frame/AuthFrame.rtl.test.tsx +14 -0
- package/src/components/auth-frame/AuthFrame.test.tsx +89 -0
- package/src/components/auth-frame/AuthFrame.tsx +35 -0
- package/src/components/avatar/Avatar.css +134 -0
- package/src/components/avatar/Avatar.test.tsx +98 -0
- package/src/components/avatar/Avatar.tsx +114 -0
- package/src/components/brand-loader/BrandLoader.css +78 -0
- package/src/components/brand-loader/BrandLoader.rtl.test.tsx +13 -0
- package/src/components/brand-loader/BrandLoader.test.tsx +83 -0
- package/src/components/brand-loader/BrandLoader.tsx +34 -0
- package/src/components/brand-mark/BrandMark.css +60 -0
- package/src/components/brand-mark/BrandMark.rtl.test.tsx +16 -0
- package/src/components/brand-mark/BrandMark.test.tsx +60 -0
- package/src/components/brand-mark/BrandMark.tsx +76 -0
- package/src/components/brand-panel/BrandPanel.css +100 -0
- package/src/components/brand-panel/BrandPanel.rtl.test.tsx +13 -0
- package/src/components/brand-panel/BrandPanel.test.tsx +59 -0
- package/src/components/brand-panel/BrandPanel.tsx +61 -0
- package/src/components/brand-wordmark/BrandWordmark.css +37 -0
- package/src/components/breadcrumbs/Breadcrumbs.css +158 -0
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +104 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +130 -0
- package/src/components/button/Button.css +214 -0
- package/src/components/button/Button.test.tsx +177 -0
- package/src/components/button/Button.tsx +205 -0
- package/src/components/cascade-grid/CascadeGrid.css +31 -0
- package/src/components/cascade-grid/CascadeGrid.rtl.test.tsx +20 -0
- package/src/components/cascade-grid/CascadeGrid.test.tsx +126 -0
- package/src/components/cascade-grid/CascadeGrid.tsx +98 -0
- package/src/components/category-tabs/CategoryTabs.css +108 -0
- package/src/components/category-tabs/CategoryTabs.test.tsx +118 -0
- package/src/components/category-tabs/CategoryTabs.tsx +94 -0
- package/src/components/chart/Chart.css +215 -0
- package/src/components/chart/Chart.rtl.test.tsx +42 -0
- package/src/components/chart/Chart.test.tsx +187 -0
- package/src/components/chart/Chart.tsx +502 -0
- package/src/components/chart/chartMath.ts +73 -0
- package/src/components/chart/plot.ts +53 -0
- package/src/components/chart/types.ts +72 -0
- package/src/components/checkbox/Checkbox.css +168 -0
- package/src/components/checkbox/Checkbox.test.tsx +97 -0
- package/src/components/checkbox/Checkbox.tsx +168 -0
- package/src/components/chip-group/ChipGroup.css +182 -0
- package/src/components/chip-group/ChipGroup.test.tsx +135 -0
- package/src/components/chip-group/ChipGroup.tsx +169 -0
- package/src/components/choice-card/ChoiceCard.css +141 -0
- package/src/components/choice-card/ChoiceCard.test.tsx +111 -0
- package/src/components/choice-card/ChoiceCard.tsx +139 -0
- package/src/components/choice-grid/ChoiceGrid.css +110 -0
- package/src/components/choice-grid/ChoiceGrid.test.tsx +85 -0
- package/src/components/choice-grid/ChoiceGrid.tsx +85 -0
- package/src/components/choice-tile/ChoiceTile.css +79 -0
- package/src/components/choice-tile/ChoiceTile.test.tsx +118 -0
- package/src/components/choice-tile/ChoiceTile.tsx +57 -0
- package/src/components/command-palette/CommandPalette.css +296 -0
- package/src/components/command-palette/CommandPalette.test.tsx +190 -0
- package/src/components/command-palette/CommandPalette.tsx +340 -0
- package/src/components/command-palette/model.ts +156 -0
- package/src/components/compact-confirm/CompactConfirm.css +136 -0
- package/src/components/compact-confirm/CompactConfirm.test.tsx +119 -0
- package/src/components/compact-confirm/CompactConfirm.tsx +91 -0
- package/src/components/confirm-service/ConfirmService.test.tsx +121 -0
- package/src/components/confirm-service/ConfirmService.tsx +152 -0
- package/src/components/consent-banner/ConsentBanner.css +73 -0
- package/src/components/consent-banner/ConsentBanner.rtl.test.tsx +12 -0
- package/src/components/consent-banner/ConsentBanner.test.tsx +86 -0
- package/src/components/consent-banner/ConsentBanner.tsx +66 -0
- package/src/components/contact-card/ContactCard.css +105 -0
- package/src/components/contact-card/ContactCard.rtl.test.tsx +17 -0
- package/src/components/contact-card/ContactCard.test.tsx +58 -0
- package/src/components/contact-card/ContactCard.tsx +99 -0
- package/src/components/copy-identifier/CopyIdentifier.css +90 -0
- package/src/components/copy-identifier/CopyIdentifier.test.tsx +103 -0
- package/src/components/copy-identifier/CopyIdentifier.tsx +89 -0
- package/src/components/count-badge/CountBadge.css +54 -0
- package/src/components/count-badge/CountBadge.test.tsx +81 -0
- package/src/components/count-badge/CountBadge.tsx +68 -0
- package/src/components/currency-field/CurrencyField.css +88 -0
- package/src/components/currency-field/CurrencyField.test.tsx +147 -0
- package/src/components/currency-field/CurrencyField.tsx +219 -0
- package/src/components/data-table/DataTable.css +362 -0
- package/src/components/data-table/DataTable.test.tsx +214 -0
- package/src/components/data-table/DataTable.tsx +396 -0
- package/src/components/date-field/DateField.css +126 -0
- package/src/components/date-field/DateField.test.tsx +143 -0
- package/src/components/date-field/DateField.tsx +235 -0
- package/src/components/delta-indicator/DeltaIndicator.css +58 -0
- package/src/components/delta-indicator/DeltaIndicator.rtl.test.tsx +19 -0
- package/src/components/delta-indicator/DeltaIndicator.test.tsx +69 -0
- package/src/components/delta-indicator/DeltaIndicator.tsx +88 -0
- package/src/components/details-popover/DetailsPopover.css +166 -0
- package/src/components/details-popover/DetailsPopover.test.tsx +92 -0
- package/src/components/details-popover/DetailsPopover.tsx +141 -0
- package/src/components/drawer/Drawer.css +188 -0
- package/src/components/drawer/Drawer.test.tsx +152 -0
- package/src/components/drawer/Drawer.tsx +121 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.css +66 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.rtl.test.tsx +17 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.test.tsx +86 -0
- package/src/components/edge-swipe-back/EdgeSwipeBack.tsx +104 -0
- package/src/components/empty-state/EmptyState.css +70 -0
- package/src/components/empty-state/EmptyState.test.tsx +77 -0
- package/src/components/empty-state/EmptyState.tsx +105 -0
- package/src/components/environment-banner/EnvironmentBanner.css +46 -0
- package/src/components/environment-banner/EnvironmentBanner.rtl.test.tsx +13 -0
- package/src/components/environment-banner/EnvironmentBanner.test.tsx +51 -0
- package/src/components/environment-banner/EnvironmentBanner.tsx +75 -0
- package/src/components/error-state/ErrorState.css +113 -0
- package/src/components/error-state/ErrorState.test.tsx +98 -0
- package/src/components/error-state/ErrorState.tsx +145 -0
- package/src/components/evidence-panel/EvidencePanel.css +126 -0
- package/src/components/evidence-panel/EvidencePanel.test.tsx +130 -0
- package/src/components/evidence-panel/EvidencePanel.tsx +120 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.css +136 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.rtl.test.tsx +13 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.test.tsx +91 -0
- package/src/components/feature-showcase-card/FeatureShowcaseCard.tsx +76 -0
- package/src/components/feature-tile/FeatureTile.css +111 -0
- package/src/components/feature-tile/FeatureTile.rtl.test.tsx +14 -0
- package/src/components/feature-tile/FeatureTile.test.tsx +78 -0
- package/src/components/feature-tile/FeatureTile.tsx +52 -0
- package/src/components/federated-sign-in/FederatedSignIn.css +23 -0
- package/src/components/federated-sign-in/FederatedSignIn.rtl.test.tsx +12 -0
- package/src/components/federated-sign-in/FederatedSignIn.test.tsx +74 -0
- package/src/components/federated-sign-in/FederatedSignIn.tsx +68 -0
- package/src/components/field/Field.css +99 -0
- package/src/components/field/Field.test.tsx +134 -0
- package/src/components/field/Field.tsx +228 -0
- package/src/components/filter-chips/FilterChips.css +145 -0
- package/src/components/filter-chips/FilterChips.test.tsx +121 -0
- package/src/components/filter-chips/FilterChips.tsx +134 -0
- package/src/components/filter-field/FilterField.css +11 -0
- package/src/components/filter-field/FilterField.test.tsx +92 -0
- package/src/components/filter-field/FilterField.tsx +43 -0
- package/src/components/filter-tile/FilterTile.css +145 -0
- package/src/components/filter-tile/FilterTile.test.tsx +69 -0
- package/src/components/filter-tile/FilterTile.tsx +87 -0
- package/src/components/flag-set-picker/FlagSetPicker.css +32 -0
- package/src/components/flag-set-picker/FlagSetPicker.test.tsx +75 -0
- package/src/components/flag-set-picker/FlagSetPicker.tsx +92 -0
- package/src/components/floating-action-bar/FloatingActionBar.css +375 -0
- package/src/components/floating-action-bar/FloatingActionBar.test.tsx +309 -0
- package/src/components/floating-action-bar/FloatingActionBar.tsx +655 -0
- package/src/components/floating-action-bar/barModel.ts +147 -0
- package/src/components/floating-action-button/FloatingActionButton.css +54 -0
- package/src/components/floating-action-button/FloatingActionButton.test.tsx +87 -0
- package/src/components/floating-action-button/FloatingActionButton.tsx +87 -0
- package/src/components/form-actions/FormActions.css +34 -0
- package/src/components/form-actions/FormActions.test.tsx +96 -0
- package/src/components/form-actions/FormActions.tsx +83 -0
- package/src/components/form-layout/FormLayout.css +148 -0
- package/src/components/form-layout/FormLayout.test.tsx +137 -0
- package/src/components/form-layout/FormLayout.tsx +177 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.css +92 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.rtl.test.tsx +12 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.test.tsx +70 -0
- package/src/components/glass-check-toggle/GlassCheckToggle.tsx +75 -0
- package/src/components/gradient-mark/GradientMark.css +45 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.css +80 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.test.tsx +92 -0
- package/src/components/grouped-disclosure-list/GroupedDisclosureList.tsx +105 -0
- package/src/components/heading/Heading.css +67 -0
- package/src/components/heading/Heading.test.tsx +93 -0
- package/src/components/heading/Heading.tsx +60 -0
- package/src/components/highlight-stat/HighlightStat.css +50 -0
- package/src/components/highlight-stat/HighlightStat.rtl.test.tsx +13 -0
- package/src/components/highlight-stat/HighlightStat.test.tsx +83 -0
- package/src/components/highlight-stat/HighlightStat.tsx +66 -0
- package/src/components/history-list/HistoryList.css +116 -0
- package/src/components/history-list/HistoryList.test.tsx +88 -0
- package/src/components/history-list/HistoryList.tsx +115 -0
- package/src/components/http-error-page/HttpErrorPage.css +70 -0
- package/src/components/http-error-page/HttpErrorPage.rtl.test.tsx +12 -0
- package/src/components/http-error-page/HttpErrorPage.test.tsx +51 -0
- package/src/components/http-error-page/HttpErrorPage.tsx +70 -0
- package/src/components/image-picker/ImagePicker.css +151 -0
- package/src/components/image-picker/ImagePicker.test.tsx +133 -0
- package/src/components/image-picker/ImagePicker.tsx +167 -0
- package/src/components/inline-notice/InlineNotice.css +101 -0
- package/src/components/inline-notice/InlineNotice.test.tsx +123 -0
- package/src/components/inline-notice/InlineNotice.tsx +98 -0
- package/src/components/insight-card/InsightCard.css +109 -0
- package/src/components/insight-card/InsightCard.rtl.test.tsx +14 -0
- package/src/components/insight-card/InsightCard.test.tsx +102 -0
- package/src/components/insight-card/InsightCard.tsx +185 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.css +163 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.rtl.test.tsx +13 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.test.tsx +123 -0
- package/src/components/legal-document-frame/LegalDocumentFrame.tsx +167 -0
- package/src/components/link/Link.css +76 -0
- package/src/components/link/Link.test.tsx +103 -0
- package/src/components/link/Link.tsx +87 -0
- package/src/components/list-panel/ListPanel.css +95 -0
- package/src/components/list-panel/ListPanel.test.tsx +128 -0
- package/src/components/list-panel/ListPanel.tsx +137 -0
- package/src/components/list-row/ListRow.css +81 -0
- package/src/components/list-row/ListRow.test.tsx +87 -0
- package/src/components/list-row/ListRow.tsx +68 -0
- package/src/components/listbox-select/ListboxSelect.css +263 -0
- package/src/components/listbox-select/ListboxSelect.test.tsx +157 -0
- package/src/components/listbox-select/ListboxSelect.tsx +178 -0
- package/src/components/live-report-view/LiveReportView.css +111 -0
- package/src/components/live-report-view/LiveReportView.rtl.test.tsx +14 -0
- package/src/components/live-report-view/LiveReportView.test.tsx +185 -0
- package/src/components/live-report-view/LiveReportView.tsx +135 -0
- package/src/components/live-report-view/runEvents.ts +103 -0
- package/src/components/live-report-view/useRunEventStream.ts +134 -0
- package/src/components/loader-presets/LoaderPresets.test.tsx +22 -0
- package/src/components/loader-presets/LoaderPresets.tsx +80 -0
- package/src/components/locale-picker/LocalePicker.css +91 -0
- package/src/components/locale-picker/LocalePicker.test.tsx +99 -0
- package/src/components/locale-picker/LocalePicker.tsx +128 -0
- package/src/components/long-press-menu/LongPressMenu.css +97 -0
- package/src/components/long-press-menu/LongPressMenu.test.tsx +106 -0
- package/src/components/long-press-menu/LongPressMenu.tsx +100 -0
- package/src/components/markdown-view/MarkdownView.css +93 -0
- package/src/components/markdown-view/MarkdownView.test.tsx +107 -0
- package/src/components/markdown-view/MarkdownView.tsx +96 -0
- package/src/components/markdown-view/parse.ts +152 -0
- package/src/components/metric-tile/MetricTile.css +104 -0
- package/src/components/metric-tile/MetricTile.rtl.test.tsx +12 -0
- package/src/components/metric-tile/MetricTile.test.tsx +70 -0
- package/src/components/metric-tile/MetricTile.tsx +59 -0
- package/src/components/modal-dialog/ModalDialog.css +165 -0
- package/src/components/modal-dialog/ModalDialog.test.tsx +158 -0
- package/src/components/modal-dialog/ModalDialog.tsx +112 -0
- package/src/components/month-field/MonthField.css +11 -0
- package/src/components/month-field/MonthField.test.tsx +101 -0
- package/src/components/month-field/MonthField.tsx +124 -0
- package/src/components/native-select/NativeSelect.css +246 -0
- package/src/components/native-select/NativeSelect.test.tsx +160 -0
- package/src/components/native-select/NativeSelect.tsx +234 -0
- package/src/components/navigation-flyout/NavigationFlyout.css +181 -0
- package/src/components/navigation-flyout/NavigationFlyout.test.tsx +111 -0
- package/src/components/navigation-flyout/NavigationFlyout.tsx +196 -0
- package/src/components/notification-center/NotificationCenter.css +187 -0
- package/src/components/notification-center/NotificationCenter.test.tsx +140 -0
- package/src/components/notification-center/NotificationCenter.tsx +229 -0
- package/src/components/one-time-code-field/OneTimeCodeField.css +62 -0
- package/src/components/one-time-code-field/OneTimeCodeField.test.tsx +150 -0
- package/src/components/one-time-code-field/OneTimeCodeField.tsx +176 -0
- package/src/components/page-dots/PageDots.css +90 -0
- package/src/components/page-dots/PageDots.test.tsx +87 -0
- package/src/components/page-dots/PageDots.tsx +95 -0
- package/src/components/page-header/PageHeader.css +271 -0
- package/src/components/page-header/PageHeader.test.tsx +185 -0
- package/src/components/page-header/PageHeader.tsx +194 -0
- package/src/components/pagination/Pagination.css +139 -0
- package/src/components/pagination/Pagination.test.tsx +104 -0
- package/src/components/pagination/Pagination.tsx +160 -0
- package/src/components/password-strength/PasswordStrength.css +85 -0
- package/src/components/password-strength/PasswordStrength.test.tsx +90 -0
- package/src/components/password-strength/PasswordStrength.tsx +109 -0
- package/src/components/phase-bar/PhaseBar.css +95 -0
- package/src/components/phase-bar/PhaseBar.test.tsx +67 -0
- package/src/components/phase-bar/PhaseBar.tsx +66 -0
- package/src/components/popover/Popover.css +130 -0
- package/src/components/popover/Popover.test.tsx +153 -0
- package/src/components/popover/Popover.tsx +110 -0
- package/src/components/product-mark/ProductMark.css +24 -0
- package/src/components/product-mark/ProductMark.test.tsx +48 -0
- package/src/components/product-mark/ProductMark.tsx +95 -0
- package/src/components/product-mark/marks.ts +115 -0
- package/src/components/product-mark/plate.ts +42 -0
- package/src/components/profile-avatar/ProfileAvatar.css +51 -0
- package/src/components/profile-avatar/ProfileAvatar.test.tsx +78 -0
- package/src/components/profile-avatar/ProfileAvatar.tsx +58 -0
- package/src/components/profile-summary/ProfileSummary.css +43 -0
- package/src/components/profile-summary/ProfileSummary.rtl.test.tsx +12 -0
- package/src/components/profile-summary/ProfileSummary.test.tsx +52 -0
- package/src/components/profile-summary/ProfileSummary.tsx +52 -0
- package/src/components/progress-bar/ProgressBar.css +100 -0
- package/src/components/progress-bar/ProgressBar.test.tsx +68 -0
- package/src/components/progress-bar/ProgressBar.tsx +76 -0
- package/src/components/proof-badge/ProofBadge.css +178 -0
- package/src/components/proof-badge/ProofBadge.test.tsx +95 -0
- package/src/components/proof-badge/ProofBadge.tsx +113 -0
- package/src/components/pull-to-refresh/PullToRefresh.css +99 -0
- package/src/components/pull-to-refresh/PullToRefresh.rtl.test.tsx +16 -0
- package/src/components/pull-to-refresh/PullToRefresh.test.tsx +117 -0
- package/src/components/pull-to-refresh/PullToRefresh.tsx +181 -0
- package/src/components/record-card/RecordCard.css +151 -0
- package/src/components/record-card/RecordCard.rtl.test.tsx +16 -0
- package/src/components/record-card/RecordCard.test.tsx +105 -0
- package/src/components/record-card/RecordCard.tsx +159 -0
- package/src/components/recovery-code-list/RecoveryCodeList.css +66 -0
- package/src/components/recovery-code-list/RecoveryCodeList.test.tsx +108 -0
- package/src/components/recovery-code-list/RecoveryCodeList.tsx +105 -0
- package/src/components/region-map/RegionMap.css +229 -0
- package/src/components/region-map/RegionMap.test.tsx +200 -0
- package/src/components/region-map/RegionMap.tsx +400 -0
- package/src/components/region-map/useRegionMapState.ts +92 -0
- package/src/components/region-theme/countryProfile.ts +110 -0
- package/src/components/region-theme/data/br-profile.ts +41 -0
- package/src/components/region-theme/data/br.ts +80 -0
- package/src/components/region-theme/format.ts +120 -0
- package/src/components/region-theme/geometry.ts +67 -0
- package/src/components/region-theme/index.ts +7 -0
- package/src/components/region-theme/regionTheme.test.tsx +200 -0
- package/src/components/region-theme/registry.ts +163 -0
- package/src/components/report-view/ReportView.css +323 -0
- package/src/components/report-view/ReportView.rtl.test.tsx +25 -0
- package/src/components/report-view/ReportView.test.tsx +141 -0
- package/src/components/report-view/ReportView.tsx +201 -0
- package/src/components/report-view/sections.tsx +281 -0
- package/src/components/report-view/types.ts +72 -0
- package/src/components/report-view/validateReport.ts +51 -0
- package/src/components/resizable-split/ResizableSplit.css +56 -0
- package/src/components/resizable-split/ResizableSplit.test.tsx +108 -0
- package/src/components/resizable-split/ResizableSplit.tsx +76 -0
- package/src/components/resizable-split/useSplitter.ts +72 -0
- package/src/components/reveal-number/RevealNumber.css +17 -0
- package/src/components/reveal-number/RevealNumber.rtl.test.tsx +13 -0
- package/src/components/reveal-number/RevealNumber.test.tsx +136 -0
- package/src/components/reveal-number/RevealNumber.tsx +115 -0
- package/src/components/route-progress/RouteProgress.css +54 -0
- package/src/components/route-progress/RouteProgress.rtl.test.tsx +16 -0
- package/src/components/route-progress/RouteProgress.test.tsx +62 -0
- package/src/components/route-progress/RouteProgress.tsx +63 -0
- package/src/components/ruled-grid/RuledGrid.css +86 -0
- package/src/components/ruled-grid/RuledGrid.rtl.test.tsx +13 -0
- package/src/components/ruled-grid/RuledGrid.test.tsx +92 -0
- package/src/components/ruled-grid/RuledGrid.tsx +73 -0
- package/src/components/safe-area-inset/SafeAreaInset.css +65 -0
- package/src/components/safe-area-inset/SafeAreaInset.rtl.test.tsx +17 -0
- package/src/components/safe-area-inset/SafeAreaInset.test.tsx +99 -0
- package/src/components/safe-area-inset/SafeAreaInset.tsx +101 -0
- package/src/components/schema-request-form/SchemaRequestForm.css +75 -0
- package/src/components/schema-request-form/SchemaRequestForm.test.tsx +138 -0
- package/src/components/schema-request-form/SchemaRequestForm.tsx +231 -0
- package/src/components/search-bar/SearchBar.css +117 -0
- package/src/components/search-bar/SearchBar.test.tsx +134 -0
- package/src/components/search-bar/SearchBar.tsx +176 -0
- package/src/components/section-heading/SectionHeading.css +68 -0
- package/src/components/section-heading/SectionHeading.test.tsx +65 -0
- package/src/components/section-heading/SectionHeading.tsx +61 -0
- package/src/components/section-panel/SectionPanel.css +207 -0
- package/src/components/section-panel/SectionPanel.test.tsx +122 -0
- package/src/components/section-panel/SectionPanel.tsx +139 -0
- package/src/components/sectioned-modal/SectionedModal.css +325 -0
- package/src/components/sectioned-modal/SectionedModal.test.tsx +138 -0
- package/src/components/sectioned-modal/SectionedModal.tsx +258 -0
- package/src/components/segmented-control/SegmentedControl.css +123 -0
- package/src/components/segmented-control/SegmentedControl.test.tsx +109 -0
- package/src/components/segmented-control/SegmentedControl.tsx +85 -0
- package/src/components/separator/Separator.css +61 -0
- package/src/components/separator/Separator.test.tsx +65 -0
- package/src/components/separator/Separator.tsx +46 -0
- package/src/components/settings-dialog/SettingsDialog.css +151 -0
- package/src/components/settings-dialog/SettingsDialog.test.tsx +155 -0
- package/src/components/settings-dialog/SettingsDialog.tsx +126 -0
- package/src/components/settings-dialog/settingsModel.ts +63 -0
- package/src/components/settings-dialog/settingsParts.tsx +149 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.css +78 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.rtl.test.tsx +12 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.test.tsx +91 -0
- package/src/components/showcase-backdrop/ShowcaseBackdrop.tsx +47 -0
- package/src/components/showcase-heading/ShowcaseHeading.css +65 -0
- package/src/components/showcase-heading/ShowcaseHeading.rtl.test.tsx +13 -0
- package/src/components/showcase-heading/ShowcaseHeading.test.tsx +79 -0
- package/src/components/showcase-heading/ShowcaseHeading.tsx +67 -0
- package/src/components/skeleton/Skeleton.css +120 -0
- package/src/components/skeleton/Skeleton.test.tsx +96 -0
- package/src/components/skeleton/Skeleton.tsx +168 -0
- package/src/components/skeleton-fill/SkeletonFill.css +67 -0
- package/src/components/skeleton-fill/SkeletonFill.rtl.test.tsx +12 -0
- package/src/components/skeleton-fill/SkeletonFill.test.tsx +61 -0
- package/src/components/skeleton-fill/SkeletonFill.tsx +48 -0
- package/src/components/skip-link/SkipLink.css +52 -0
- package/src/components/skip-link/SkipLink.test.tsx +90 -0
- package/src/components/skip-link/SkipLink.tsx +42 -0
- package/src/components/spinner/Spinner.css +134 -0
- package/src/components/spinner/Spinner.test.tsx +99 -0
- package/src/components/spinner/Spinner.tsx +100 -0
- package/src/components/stage-strip/StageStrip.css +126 -0
- package/src/components/stage-strip/StageStrip.test.tsx +82 -0
- package/src/components/stage-strip/StageStrip.tsx +100 -0
- package/src/components/stat-strip/StatStrip.css +90 -0
- package/src/components/stat-strip/StatStrip.test.tsx +75 -0
- package/src/components/stat-strip/StatStrip.tsx +62 -0
- package/src/components/stat-tile/StatTile.css +171 -0
- package/src/components/stat-tile/StatTile.rtl.test.tsx +14 -0
- package/src/components/stat-tile/StatTile.test.tsx +90 -0
- package/src/components/stat-tile/StatTile.tsx +129 -0
- package/src/components/state-switch/StateSwitch.css +113 -0
- package/src/components/state-switch/StateSwitch.test.tsx +102 -0
- package/src/components/state-switch/StateSwitch.tsx +73 -0
- package/src/components/status-pill/StatusPill.css +85 -0
- package/src/components/status-pill/StatusPill.test.tsx +91 -0
- package/src/components/status-pill/StatusPill.tsx +73 -0
- package/src/components/step-list/StepList.css +181 -0
- package/src/components/step-list/StepList.test.tsx +93 -0
- package/src/components/step-list/StepList.tsx +118 -0
- package/src/components/summary-row/SummaryRow.css +85 -0
- package/src/components/summary-row/SummaryRow.test.tsx +77 -0
- package/src/components/summary-row/SummaryRow.tsx +72 -0
- package/src/components/surface/Surface.css +157 -0
- package/src/components/surface/Surface.test.tsx +97 -0
- package/src/components/surface/Surface.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.css +131 -0
- package/src/components/swipe-row/SwipeRow.rtl.test.tsx +31 -0
- package/src/components/swipe-row/SwipeRow.test.tsx +124 -0
- package/src/components/swipe-row/SwipeRow.tsx +219 -0
- package/src/components/switch/Switch.css +182 -0
- package/src/components/switch/Switch.test.tsx +112 -0
- package/src/components/switch/Switch.tsx +125 -0
- package/src/components/tabs/Tabs.css +137 -0
- package/src/components/tabs/Tabs.test.tsx +127 -0
- package/src/components/tabs/Tabs.tsx +94 -0
- package/src/components/tag/Tag.css +146 -0
- package/src/components/tag/Tag.test.tsx +129 -0
- package/src/components/tag/Tag.tsx +168 -0
- package/src/components/tag-field/TagField.css +274 -0
- package/src/components/tag-field/TagField.test.tsx +156 -0
- package/src/components/tag-field/TagField.tsx +270 -0
- package/src/components/text/Text.css +84 -0
- package/src/components/text/Text.test.tsx +91 -0
- package/src/components/text/Text.tsx +84 -0
- package/src/components/text-area/TextArea.css +125 -0
- package/src/components/text-area/TextArea.test.tsx +97 -0
- package/src/components/text-area/TextArea.tsx +145 -0
- package/src/components/text-field/TextField.css +197 -0
- package/src/components/text-field/TextField.test.tsx +136 -0
- package/src/components/text-field/TextField.tsx +208 -0
- package/src/components/theme-palette/ThemePalette.css +262 -0
- package/src/components/theme-palette/ThemePalette.test.tsx +62 -0
- package/src/components/theme-palette/ThemePalette.tsx +377 -0
- package/src/components/theme-switcher/ThemeSwitcher.css +159 -0
- package/src/components/theme-switcher/ThemeSwitcher.test.tsx +71 -0
- package/src/components/theme-switcher/ThemeSwitcher.tsx +72 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.css +56 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.rtl.test.tsx +13 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.test.tsx +100 -0
- package/src/components/third-party-mark-slot/ThirdPartyMarkSlot.tsx +218 -0
- package/src/components/ticker-card/TickerCard.css +147 -0
- package/src/components/ticker-card/TickerCard.rtl.test.tsx +14 -0
- package/src/components/ticker-card/TickerCard.test.tsx +74 -0
- package/src/components/ticker-card/TickerCard.tsx +151 -0
- package/src/components/time-field/TimeField.css +69 -0
- package/src/components/time-field/TimeField.test.tsx +138 -0
- package/src/components/time-field/TimeField.tsx +205 -0
- package/src/components/toast/Toast.css +137 -0
- package/src/components/toast/Toast.test.tsx +269 -0
- package/src/components/toast/Toast.tsx +370 -0
- package/src/components/tone-tint/ToneTint.css +74 -0
- package/src/components/tone-tint/toneTint.test.tsx +74 -0
- package/src/components/tone-tint/toneTint.ts +57 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.css +104 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.test.tsx +75 -0
- package/src/components/toolbar-trigger/ToolbarTrigger.tsx +70 -0
- package/src/components/tweened-number/TweenedNumber.css +7 -0
- package/src/components/tweened-number/TweenedNumber.rtl.test.tsx +19 -0
- package/src/components/tweened-number/TweenedNumber.test.tsx +97 -0
- package/src/components/tweened-number/TweenedNumber.tsx +70 -0
- package/src/components/upgrade-gate/UpgradeGate.css +94 -0
- package/src/components/upgrade-gate/UpgradeGate.rtl.test.tsx +12 -0
- package/src/components/upgrade-gate/UpgradeGate.test.tsx +56 -0
- package/src/components/upgrade-gate/UpgradeGate.tsx +56 -0
- package/src/components/wheel-picker/WheelPicker.css +149 -0
- package/src/components/wheel-picker/WheelPicker.test.tsx +150 -0
- package/src/components/wheel-picker/WheelPicker.tsx +228 -0
- package/src/components/wizard-page/WizardPage.css +114 -0
- package/src/components/wizard-page/WizardPage.test.tsx +117 -0
- package/src/components/wizard-page/WizardPage.tsx +123 -0
- package/src/elements/action-menu/definition.ts +123 -0
- package/src/elements/action-menu/element.ts +604 -0
- package/src/elements/anatomy.ts +55 -0
- package/src/elements/avatar/definition.ts +161 -0
- package/src/elements/avatar/element.ts +112 -0
- package/src/elements/base.ts +244 -0
- package/src/elements/brand-wordmark/definition.ts +37 -0
- package/src/elements/brand-wordmark/element.ts +13 -0
- package/src/elements/breadcrumbs/definition.ts +85 -0
- package/src/elements/breadcrumbs/element.ts +231 -0
- package/src/elements/button/definition.ts +74 -0
- package/src/elements/button/element.ts +25 -0
- package/src/elements/checkbox/definition.ts +132 -0
- package/src/elements/checkbox/element.ts +59 -0
- package/src/elements/command-palette/definition.ts +60 -0
- package/src/elements/command-palette/element.ts +706 -0
- package/src/elements/currency-field/definition.ts +159 -0
- package/src/elements/currency-field/element.ts +265 -0
- package/src/elements/data-table/definition.ts +54 -0
- package/src/elements/data-table/element.ts +440 -0
- package/src/elements/definition.ts +196 -0
- package/src/elements/drawer/definition.ts +156 -0
- package/src/elements/drawer/element.ts +304 -0
- package/src/elements/elements.css +156 -0
- package/src/elements/gradient-mark/definition.ts +41 -0
- package/src/elements/gradient-mark/element.ts +27 -0
- package/src/elements/heading/definition.ts +64 -0
- package/src/elements/heading/element.ts +14 -0
- package/src/elements/index.ts +146 -0
- package/src/elements/inline-notice/definition.ts +167 -0
- package/src/elements/inline-notice/element.ts +36 -0
- package/src/elements/link/definition.ts +70 -0
- package/src/elements/link/element.ts +40 -0
- package/src/elements/markdown-view/definition.ts +35 -0
- package/src/elements/markdown-view/element.ts +183 -0
- package/src/elements/modal/definition.ts +175 -0
- package/src/elements/modal/element.ts +226 -0
- package/src/elements/native-select/definition.ts +143 -0
- package/src/elements/native-select/element.ts +34 -0
- package/src/elements/notification-center/definition.ts +236 -0
- package/src/elements/notification-center/element.ts +527 -0
- package/src/elements/page-header/definition.ts +151 -0
- package/src/elements/page-header/element.ts +37 -0
- package/src/elements/popover/definition.ts +137 -0
- package/src/elements/popover/element.ts +196 -0
- package/src/elements/popover/model.ts +141 -0
- package/src/elements/progress-bar/definition.ts +84 -0
- package/src/elements/progress-bar/element.ts +82 -0
- package/src/elements/react/TyActionMenu.ts +79 -0
- package/src/elements/react/TyAvatar.ts +129 -0
- package/src/elements/react/TyBrandWordmark.ts +51 -0
- package/src/elements/react/TyBreadcrumbs.ts +82 -0
- package/src/elements/react/TyButton.ts +98 -0
- package/src/elements/react/TyCheckbox.ts +92 -0
- package/src/elements/react/TyCommandPalette.ts +120 -0
- package/src/elements/react/TyCurrencyField.ts +126 -0
- package/src/elements/react/TyDataTable.ts +105 -0
- package/src/elements/react/TyDrawer.ts +99 -0
- package/src/elements/react/TyGradientMark.ts +52 -0
- package/src/elements/react/TyHeading.ts +65 -0
- package/src/elements/react/TyInlineNotice.ts +191 -0
- package/src/elements/react/TyLink.ts +65 -0
- package/src/elements/react/TyMarkdownView.ts +46 -0
- package/src/elements/react/TyModal.ts +118 -0
- package/src/elements/react/TyNativeSelect.ts +96 -0
- package/src/elements/react/TyNotificationCenter.ts +153 -0
- package/src/elements/react/TyPageHeader.ts +126 -0
- package/src/elements/react/TyPopover.ts +95 -0
- package/src/elements/react/TyProgressBar.ts +72 -0
- package/src/elements/react/TySectionHeading.ts +78 -0
- package/src/elements/react/TySegmentedControl.ts +64 -0
- package/src/elements/react/TySeparator.ts +51 -0
- package/src/elements/react/TySkeleton.ts +61 -0
- package/src/elements/react/TySkipLink.ts +39 -0
- package/src/elements/react/TySpinner.ts +55 -0
- package/src/elements/react/TyStatusPill.ts +66 -0
- package/src/elements/react/TySurface.ts +104 -0
- package/src/elements/react/TySwitch.ts +77 -0
- package/src/elements/react/TyTabs.ts +66 -0
- package/src/elements/react/TyTag.ts +71 -0
- package/src/elements/react/TyTagField.ts +90 -0
- package/src/elements/react/TyTextArea.ts +124 -0
- package/src/elements/react/TyTextField.ts +186 -0
- package/src/elements/react/TyThemePalette.ts +126 -0
- package/src/elements/react/TyToast.ts +57 -0
- package/src/elements/react/TyWheelPicker.ts +60 -0
- package/src/elements/react/index.ts +39 -0
- package/src/elements/register.ts +7 -0
- package/src/elements/section-heading/definition.ts +81 -0
- package/src/elements/section-heading/element.ts +15 -0
- package/src/elements/segmented-control/definition.ts +72 -0
- package/src/elements/segmented-control/element.ts +253 -0
- package/src/elements/separator/definition.ts +44 -0
- package/src/elements/separator/element.ts +13 -0
- package/src/elements/skeleton/definition.ts +91 -0
- package/src/elements/skeleton/element.ts +175 -0
- package/src/elements/skip-link/definition.ts +26 -0
- package/src/elements/skip-link/element.ts +75 -0
- package/src/elements/spinner/definition.ts +52 -0
- package/src/elements/spinner/element.ts +58 -0
- package/src/elements/status-pill/definition.ts +48 -0
- package/src/elements/status-pill/element.ts +50 -0
- package/src/elements/surface/definition.ts +93 -0
- package/src/elements/surface/element.ts +42 -0
- package/src/elements/switch/definition.ts +72 -0
- package/src/elements/switch/element.ts +65 -0
- package/src/elements/tabs/definition.ts +60 -0
- package/src/elements/tabs/element.ts +319 -0
- package/src/elements/tag/definition.ts +69 -0
- package/src/elements/tag/element.ts +35 -0
- package/src/elements/tag-field/definition.ts +51 -0
- package/src/elements/tag-field/element.ts +461 -0
- package/src/elements/text-area/definition.ts +137 -0
- package/src/elements/text-area/element.ts +113 -0
- package/src/elements/text-field/definition.ts +236 -0
- package/src/elements/text-field/element.ts +151 -0
- package/src/elements/theme-palette/definition.ts +52 -0
- package/src/elements/theme-palette/element.ts +372 -0
- package/src/elements/theme-palette/model.ts +140 -0
- package/src/elements/toast/definition.ts +42 -0
- package/src/elements/toast/element.ts +479 -0
- package/src/elements/wheel-picker/definition.ts +39 -0
- package/src/elements/wheel-picker/element.ts +407 -0
- package/src/flags/Flag.css +58 -0
- package/src/flags/Flag.tsx +70 -0
- package/src/flags/art/1x1/ad.ts +2 -0
- package/src/flags/art/1x1/ae.ts +2 -0
- package/src/flags/art/1x1/af.ts +2 -0
- package/src/flags/art/1x1/ag.ts +2 -0
- package/src/flags/art/1x1/ai.ts +2 -0
- package/src/flags/art/1x1/al.ts +2 -0
- package/src/flags/art/1x1/am.ts +2 -0
- package/src/flags/art/1x1/ao.ts +2 -0
- package/src/flags/art/1x1/aq.ts +2 -0
- package/src/flags/art/1x1/ar.ts +2 -0
- package/src/flags/art/1x1/arab.ts +2 -0
- package/src/flags/art/1x1/as.ts +2 -0
- package/src/flags/art/1x1/asean.ts +2 -0
- package/src/flags/art/1x1/at.ts +2 -0
- package/src/flags/art/1x1/au.ts +2 -0
- package/src/flags/art/1x1/aw.ts +2 -0
- package/src/flags/art/1x1/ax.ts +2 -0
- package/src/flags/art/1x1/az.ts +2 -0
- package/src/flags/art/1x1/ba.ts +2 -0
- package/src/flags/art/1x1/bb.ts +2 -0
- package/src/flags/art/1x1/bd.ts +2 -0
- package/src/flags/art/1x1/be.ts +2 -0
- package/src/flags/art/1x1/bf.ts +2 -0
- package/src/flags/art/1x1/bg.ts +2 -0
- package/src/flags/art/1x1/bh.ts +2 -0
- package/src/flags/art/1x1/bi.ts +2 -0
- package/src/flags/art/1x1/bj.ts +2 -0
- package/src/flags/art/1x1/bl.ts +2 -0
- package/src/flags/art/1x1/bm.ts +2 -0
- package/src/flags/art/1x1/bn.ts +2 -0
- package/src/flags/art/1x1/bo.ts +2 -0
- package/src/flags/art/1x1/bq.ts +2 -0
- package/src/flags/art/1x1/br.ts +2 -0
- package/src/flags/art/1x1/bs.ts +2 -0
- package/src/flags/art/1x1/bt.ts +2 -0
- package/src/flags/art/1x1/bv.ts +2 -0
- package/src/flags/art/1x1/bw.ts +2 -0
- package/src/flags/art/1x1/by.ts +2 -0
- package/src/flags/art/1x1/bz.ts +2 -0
- package/src/flags/art/1x1/ca.ts +2 -0
- package/src/flags/art/1x1/cc.ts +2 -0
- package/src/flags/art/1x1/cd.ts +2 -0
- package/src/flags/art/1x1/cefta.ts +2 -0
- package/src/flags/art/1x1/cf.ts +2 -0
- package/src/flags/art/1x1/cg.ts +2 -0
- package/src/flags/art/1x1/ch.ts +2 -0
- package/src/flags/art/1x1/ci.ts +2 -0
- package/src/flags/art/1x1/ck.ts +2 -0
- package/src/flags/art/1x1/cl.ts +2 -0
- package/src/flags/art/1x1/cm.ts +2 -0
- package/src/flags/art/1x1/cn.ts +2 -0
- package/src/flags/art/1x1/co.ts +2 -0
- package/src/flags/art/1x1/cp.ts +2 -0
- package/src/flags/art/1x1/cr.ts +2 -0
- package/src/flags/art/1x1/cu.ts +2 -0
- package/src/flags/art/1x1/cv.ts +2 -0
- package/src/flags/art/1x1/cw.ts +2 -0
- package/src/flags/art/1x1/cx.ts +2 -0
- package/src/flags/art/1x1/cy.ts +2 -0
- package/src/flags/art/1x1/cz.ts +2 -0
- package/src/flags/art/1x1/de.ts +2 -0
- package/src/flags/art/1x1/dg.ts +2 -0
- package/src/flags/art/1x1/dj.ts +2 -0
- package/src/flags/art/1x1/dk.ts +2 -0
- package/src/flags/art/1x1/dm.ts +2 -0
- package/src/flags/art/1x1/do.ts +2 -0
- package/src/flags/art/1x1/dz.ts +2 -0
- package/src/flags/art/1x1/eac.ts +2 -0
- package/src/flags/art/1x1/ec.ts +2 -0
- package/src/flags/art/1x1/ee.ts +2 -0
- package/src/flags/art/1x1/eg.ts +2 -0
- package/src/flags/art/1x1/eh.ts +2 -0
- package/src/flags/art/1x1/er.ts +2 -0
- package/src/flags/art/1x1/es-ct.ts +2 -0
- package/src/flags/art/1x1/es-ga.ts +2 -0
- package/src/flags/art/1x1/es-pv.ts +2 -0
- package/src/flags/art/1x1/es.ts +2 -0
- package/src/flags/art/1x1/et.ts +2 -0
- package/src/flags/art/1x1/eu.ts +2 -0
- package/src/flags/art/1x1/fi.ts +2 -0
- package/src/flags/art/1x1/fj.ts +2 -0
- package/src/flags/art/1x1/fk.ts +2 -0
- package/src/flags/art/1x1/fm.ts +2 -0
- package/src/flags/art/1x1/fo.ts +2 -0
- package/src/flags/art/1x1/fr.ts +2 -0
- package/src/flags/art/1x1/ga.ts +2 -0
- package/src/flags/art/1x1/gb-eng.ts +2 -0
- package/src/flags/art/1x1/gb-nir.ts +2 -0
- package/src/flags/art/1x1/gb-sct.ts +2 -0
- package/src/flags/art/1x1/gb-wls.ts +2 -0
- package/src/flags/art/1x1/gb.ts +2 -0
- package/src/flags/art/1x1/gd.ts +2 -0
- package/src/flags/art/1x1/ge.ts +2 -0
- package/src/flags/art/1x1/gf.ts +2 -0
- package/src/flags/art/1x1/gg.ts +2 -0
- package/src/flags/art/1x1/gh.ts +2 -0
- package/src/flags/art/1x1/gi.ts +2 -0
- package/src/flags/art/1x1/gl.ts +2 -0
- package/src/flags/art/1x1/gm.ts +2 -0
- package/src/flags/art/1x1/gn.ts +2 -0
- package/src/flags/art/1x1/gp.ts +2 -0
- package/src/flags/art/1x1/gq.ts +2 -0
- package/src/flags/art/1x1/gr.ts +2 -0
- package/src/flags/art/1x1/gs.ts +2 -0
- package/src/flags/art/1x1/gt.ts +2 -0
- package/src/flags/art/1x1/gu.ts +2 -0
- package/src/flags/art/1x1/gw.ts +2 -0
- package/src/flags/art/1x1/gy.ts +2 -0
- package/src/flags/art/1x1/hk.ts +2 -0
- package/src/flags/art/1x1/hm.ts +2 -0
- package/src/flags/art/1x1/hn.ts +2 -0
- package/src/flags/art/1x1/hr.ts +2 -0
- package/src/flags/art/1x1/ht.ts +2 -0
- package/src/flags/art/1x1/hu.ts +2 -0
- package/src/flags/art/1x1/ic.ts +2 -0
- package/src/flags/art/1x1/id.ts +2 -0
- package/src/flags/art/1x1/ie.ts +2 -0
- package/src/flags/art/1x1/il.ts +2 -0
- package/src/flags/art/1x1/im.ts +2 -0
- package/src/flags/art/1x1/in.ts +2 -0
- package/src/flags/art/1x1/io.ts +2 -0
- package/src/flags/art/1x1/iq.ts +2 -0
- package/src/flags/art/1x1/ir.ts +2 -0
- package/src/flags/art/1x1/is.ts +2 -0
- package/src/flags/art/1x1/it.ts +2 -0
- package/src/flags/art/1x1/je.ts +2 -0
- package/src/flags/art/1x1/jm.ts +2 -0
- package/src/flags/art/1x1/jo.ts +2 -0
- package/src/flags/art/1x1/jp.ts +2 -0
- package/src/flags/art/1x1/ke.ts +2 -0
- package/src/flags/art/1x1/kg.ts +2 -0
- package/src/flags/art/1x1/kh.ts +2 -0
- package/src/flags/art/1x1/ki.ts +2 -0
- package/src/flags/art/1x1/km.ts +2 -0
- package/src/flags/art/1x1/kn.ts +2 -0
- package/src/flags/art/1x1/kp.ts +2 -0
- package/src/flags/art/1x1/kr.ts +2 -0
- package/src/flags/art/1x1/kw.ts +2 -0
- package/src/flags/art/1x1/ky.ts +2 -0
- package/src/flags/art/1x1/kz.ts +2 -0
- package/src/flags/art/1x1/la.ts +2 -0
- package/src/flags/art/1x1/lb.ts +2 -0
- package/src/flags/art/1x1/lc.ts +2 -0
- package/src/flags/art/1x1/li.ts +2 -0
- package/src/flags/art/1x1/lk.ts +2 -0
- package/src/flags/art/1x1/lr.ts +2 -0
- package/src/flags/art/1x1/ls.ts +2 -0
- package/src/flags/art/1x1/lt.ts +2 -0
- package/src/flags/art/1x1/lu.ts +2 -0
- package/src/flags/art/1x1/lv.ts +2 -0
- package/src/flags/art/1x1/ly.ts +2 -0
- package/src/flags/art/1x1/ma.ts +2 -0
- package/src/flags/art/1x1/mc.ts +2 -0
- package/src/flags/art/1x1/md.ts +2 -0
- package/src/flags/art/1x1/me.ts +2 -0
- package/src/flags/art/1x1/mf.ts +2 -0
- package/src/flags/art/1x1/mg.ts +2 -0
- package/src/flags/art/1x1/mh.ts +2 -0
- package/src/flags/art/1x1/mk.ts +2 -0
- package/src/flags/art/1x1/ml.ts +2 -0
- package/src/flags/art/1x1/mm.ts +2 -0
- package/src/flags/art/1x1/mn.ts +2 -0
- package/src/flags/art/1x1/mo.ts +2 -0
- package/src/flags/art/1x1/mp.ts +2 -0
- package/src/flags/art/1x1/mq.ts +2 -0
- package/src/flags/art/1x1/mr.ts +2 -0
- package/src/flags/art/1x1/ms.ts +2 -0
- package/src/flags/art/1x1/mt.ts +2 -0
- package/src/flags/art/1x1/mu.ts +2 -0
- package/src/flags/art/1x1/mv.ts +2 -0
- package/src/flags/art/1x1/mw.ts +2 -0
- package/src/flags/art/1x1/mx.ts +2 -0
- package/src/flags/art/1x1/my.ts +2 -0
- package/src/flags/art/1x1/mz.ts +2 -0
- package/src/flags/art/1x1/na.ts +2 -0
- package/src/flags/art/1x1/nc.ts +2 -0
- package/src/flags/art/1x1/ne.ts +2 -0
- package/src/flags/art/1x1/nf.ts +2 -0
- package/src/flags/art/1x1/ng.ts +2 -0
- package/src/flags/art/1x1/ni.ts +2 -0
- package/src/flags/art/1x1/nl.ts +2 -0
- package/src/flags/art/1x1/no.ts +2 -0
- package/src/flags/art/1x1/np.ts +2 -0
- package/src/flags/art/1x1/nr.ts +2 -0
- package/src/flags/art/1x1/nu.ts +2 -0
- package/src/flags/art/1x1/nz.ts +2 -0
- package/src/flags/art/1x1/om.ts +2 -0
- package/src/flags/art/1x1/pa.ts +2 -0
- package/src/flags/art/1x1/pc.ts +2 -0
- package/src/flags/art/1x1/pe.ts +2 -0
- package/src/flags/art/1x1/pf.ts +2 -0
- package/src/flags/art/1x1/pg.ts +2 -0
- package/src/flags/art/1x1/ph.ts +2 -0
- package/src/flags/art/1x1/pk.ts +2 -0
- package/src/flags/art/1x1/pl.ts +2 -0
- package/src/flags/art/1x1/pm.ts +2 -0
- package/src/flags/art/1x1/pn.ts +2 -0
- package/src/flags/art/1x1/pr.ts +2 -0
- package/src/flags/art/1x1/ps.ts +2 -0
- package/src/flags/art/1x1/pt.ts +2 -0
- package/src/flags/art/1x1/pw.ts +2 -0
- package/src/flags/art/1x1/py.ts +2 -0
- package/src/flags/art/1x1/qa.ts +2 -0
- package/src/flags/art/1x1/re.ts +2 -0
- package/src/flags/art/1x1/ro.ts +2 -0
- package/src/flags/art/1x1/rs.ts +2 -0
- package/src/flags/art/1x1/ru.ts +2 -0
- package/src/flags/art/1x1/rw.ts +2 -0
- package/src/flags/art/1x1/sa.ts +2 -0
- package/src/flags/art/1x1/sb.ts +2 -0
- package/src/flags/art/1x1/sc.ts +2 -0
- package/src/flags/art/1x1/sd.ts +2 -0
- package/src/flags/art/1x1/se.ts +2 -0
- package/src/flags/art/1x1/sg.ts +2 -0
- package/src/flags/art/1x1/sh-ac.ts +2 -0
- package/src/flags/art/1x1/sh-hl.ts +2 -0
- package/src/flags/art/1x1/sh-ta.ts +2 -0
- package/src/flags/art/1x1/sh.ts +2 -0
- package/src/flags/art/1x1/si.ts +2 -0
- package/src/flags/art/1x1/sj.ts +2 -0
- package/src/flags/art/1x1/sk.ts +2 -0
- package/src/flags/art/1x1/sl.ts +2 -0
- package/src/flags/art/1x1/sm.ts +2 -0
- package/src/flags/art/1x1/sn.ts +2 -0
- package/src/flags/art/1x1/so.ts +2 -0
- package/src/flags/art/1x1/sr.ts +2 -0
- package/src/flags/art/1x1/ss.ts +2 -0
- package/src/flags/art/1x1/st.ts +2 -0
- package/src/flags/art/1x1/sv.ts +2 -0
- package/src/flags/art/1x1/sx.ts +2 -0
- package/src/flags/art/1x1/sy.ts +2 -0
- package/src/flags/art/1x1/sz.ts +2 -0
- package/src/flags/art/1x1/tc.ts +2 -0
- package/src/flags/art/1x1/td.ts +2 -0
- package/src/flags/art/1x1/tf.ts +2 -0
- package/src/flags/art/1x1/tg.ts +2 -0
- package/src/flags/art/1x1/th.ts +2 -0
- package/src/flags/art/1x1/tj.ts +2 -0
- package/src/flags/art/1x1/tk.ts +2 -0
- package/src/flags/art/1x1/tl.ts +2 -0
- package/src/flags/art/1x1/tm.ts +2 -0
- package/src/flags/art/1x1/tn.ts +2 -0
- package/src/flags/art/1x1/to.ts +2 -0
- package/src/flags/art/1x1/tr.ts +2 -0
- package/src/flags/art/1x1/tt.ts +2 -0
- package/src/flags/art/1x1/tv.ts +2 -0
- package/src/flags/art/1x1/tw.ts +2 -0
- package/src/flags/art/1x1/tz.ts +2 -0
- package/src/flags/art/1x1/ua.ts +2 -0
- package/src/flags/art/1x1/ug.ts +2 -0
- package/src/flags/art/1x1/um.ts +2 -0
- package/src/flags/art/1x1/un.ts +2 -0
- package/src/flags/art/1x1/us.ts +2 -0
- package/src/flags/art/1x1/uy.ts +2 -0
- package/src/flags/art/1x1/uz.ts +2 -0
- package/src/flags/art/1x1/va.ts +2 -0
- package/src/flags/art/1x1/vc.ts +2 -0
- package/src/flags/art/1x1/ve.ts +2 -0
- package/src/flags/art/1x1/vg.ts +2 -0
- package/src/flags/art/1x1/vi.ts +2 -0
- package/src/flags/art/1x1/vn.ts +2 -0
- package/src/flags/art/1x1/vu.ts +2 -0
- package/src/flags/art/1x1/wf.ts +2 -0
- package/src/flags/art/1x1/ws.ts +2 -0
- package/src/flags/art/1x1/xk.ts +2 -0
- package/src/flags/art/1x1/xx.ts +2 -0
- package/src/flags/art/1x1/ye.ts +2 -0
- package/src/flags/art/1x1/yt.ts +2 -0
- package/src/flags/art/1x1/za.ts +2 -0
- package/src/flags/art/1x1/zm.ts +2 -0
- package/src/flags/art/1x1/zw.ts +2 -0
- package/src/flags/art/4x3/ad.ts +2 -0
- package/src/flags/art/4x3/ae.ts +2 -0
- package/src/flags/art/4x3/af.ts +2 -0
- package/src/flags/art/4x3/ag.ts +2 -0
- package/src/flags/art/4x3/ai.ts +2 -0
- package/src/flags/art/4x3/al.ts +2 -0
- package/src/flags/art/4x3/am.ts +2 -0
- package/src/flags/art/4x3/ao.ts +2 -0
- package/src/flags/art/4x3/aq.ts +2 -0
- package/src/flags/art/4x3/ar.ts +2 -0
- package/src/flags/art/4x3/arab.ts +2 -0
- package/src/flags/art/4x3/as.ts +2 -0
- package/src/flags/art/4x3/asean.ts +2 -0
- package/src/flags/art/4x3/at.ts +2 -0
- package/src/flags/art/4x3/au.ts +2 -0
- package/src/flags/art/4x3/aw.ts +2 -0
- package/src/flags/art/4x3/ax.ts +2 -0
- package/src/flags/art/4x3/az.ts +2 -0
- package/src/flags/art/4x3/ba.ts +2 -0
- package/src/flags/art/4x3/bb.ts +2 -0
- package/src/flags/art/4x3/bd.ts +2 -0
- package/src/flags/art/4x3/be.ts +2 -0
- package/src/flags/art/4x3/bf.ts +2 -0
- package/src/flags/art/4x3/bg.ts +2 -0
- package/src/flags/art/4x3/bh.ts +2 -0
- package/src/flags/art/4x3/bi.ts +2 -0
- package/src/flags/art/4x3/bj.ts +2 -0
- package/src/flags/art/4x3/bl.ts +2 -0
- package/src/flags/art/4x3/bm.ts +2 -0
- package/src/flags/art/4x3/bn.ts +2 -0
- package/src/flags/art/4x3/bo.ts +2 -0
- package/src/flags/art/4x3/bq.ts +2 -0
- package/src/flags/art/4x3/br.ts +2 -0
- package/src/flags/art/4x3/bs.ts +2 -0
- package/src/flags/art/4x3/bt.ts +2 -0
- package/src/flags/art/4x3/bv.ts +2 -0
- package/src/flags/art/4x3/bw.ts +2 -0
- package/src/flags/art/4x3/by.ts +2 -0
- package/src/flags/art/4x3/bz.ts +2 -0
- package/src/flags/art/4x3/ca.ts +2 -0
- package/src/flags/art/4x3/cc.ts +2 -0
- package/src/flags/art/4x3/cd.ts +2 -0
- package/src/flags/art/4x3/cefta.ts +2 -0
- package/src/flags/art/4x3/cf.ts +2 -0
- package/src/flags/art/4x3/cg.ts +2 -0
- package/src/flags/art/4x3/ch.ts +2 -0
- package/src/flags/art/4x3/ci.ts +2 -0
- package/src/flags/art/4x3/ck.ts +2 -0
- package/src/flags/art/4x3/cl.ts +2 -0
- package/src/flags/art/4x3/cm.ts +2 -0
- package/src/flags/art/4x3/cn.ts +2 -0
- package/src/flags/art/4x3/co.ts +2 -0
- package/src/flags/art/4x3/cp.ts +2 -0
- package/src/flags/art/4x3/cr.ts +2 -0
- package/src/flags/art/4x3/cu.ts +2 -0
- package/src/flags/art/4x3/cv.ts +2 -0
- package/src/flags/art/4x3/cw.ts +2 -0
- package/src/flags/art/4x3/cx.ts +2 -0
- package/src/flags/art/4x3/cy.ts +2 -0
- package/src/flags/art/4x3/cz.ts +2 -0
- package/src/flags/art/4x3/de.ts +2 -0
- package/src/flags/art/4x3/dg.ts +2 -0
- package/src/flags/art/4x3/dj.ts +2 -0
- package/src/flags/art/4x3/dk.ts +2 -0
- package/src/flags/art/4x3/dm.ts +2 -0
- package/src/flags/art/4x3/do.ts +2 -0
- package/src/flags/art/4x3/dz.ts +2 -0
- package/src/flags/art/4x3/eac.ts +2 -0
- package/src/flags/art/4x3/ec.ts +2 -0
- package/src/flags/art/4x3/ee.ts +2 -0
- package/src/flags/art/4x3/eg.ts +2 -0
- package/src/flags/art/4x3/eh.ts +2 -0
- package/src/flags/art/4x3/er.ts +2 -0
- package/src/flags/art/4x3/es-ct.ts +2 -0
- package/src/flags/art/4x3/es-ga.ts +2 -0
- package/src/flags/art/4x3/es-pv.ts +2 -0
- package/src/flags/art/4x3/es.ts +2 -0
- package/src/flags/art/4x3/et.ts +2 -0
- package/src/flags/art/4x3/eu.ts +2 -0
- package/src/flags/art/4x3/fi.ts +2 -0
- package/src/flags/art/4x3/fj.ts +2 -0
- package/src/flags/art/4x3/fk.ts +2 -0
- package/src/flags/art/4x3/fm.ts +2 -0
- package/src/flags/art/4x3/fo.ts +2 -0
- package/src/flags/art/4x3/fr.ts +2 -0
- package/src/flags/art/4x3/ga.ts +2 -0
- package/src/flags/art/4x3/gb-eng.ts +2 -0
- package/src/flags/art/4x3/gb-nir.ts +2 -0
- package/src/flags/art/4x3/gb-sct.ts +2 -0
- package/src/flags/art/4x3/gb-wls.ts +2 -0
- package/src/flags/art/4x3/gb.ts +2 -0
- package/src/flags/art/4x3/gd.ts +2 -0
- package/src/flags/art/4x3/ge.ts +2 -0
- package/src/flags/art/4x3/gf.ts +2 -0
- package/src/flags/art/4x3/gg.ts +2 -0
- package/src/flags/art/4x3/gh.ts +2 -0
- package/src/flags/art/4x3/gi.ts +2 -0
- package/src/flags/art/4x3/gl.ts +2 -0
- package/src/flags/art/4x3/gm.ts +2 -0
- package/src/flags/art/4x3/gn.ts +2 -0
- package/src/flags/art/4x3/gp.ts +2 -0
- package/src/flags/art/4x3/gq.ts +2 -0
- package/src/flags/art/4x3/gr.ts +2 -0
- package/src/flags/art/4x3/gs.ts +2 -0
- package/src/flags/art/4x3/gt.ts +2 -0
- package/src/flags/art/4x3/gu.ts +2 -0
- package/src/flags/art/4x3/gw.ts +2 -0
- package/src/flags/art/4x3/gy.ts +2 -0
- package/src/flags/art/4x3/hk.ts +2 -0
- package/src/flags/art/4x3/hm.ts +2 -0
- package/src/flags/art/4x3/hn.ts +2 -0
- package/src/flags/art/4x3/hr.ts +2 -0
- package/src/flags/art/4x3/ht.ts +2 -0
- package/src/flags/art/4x3/hu.ts +2 -0
- package/src/flags/art/4x3/ic.ts +2 -0
- package/src/flags/art/4x3/id.ts +2 -0
- package/src/flags/art/4x3/ie.ts +2 -0
- package/src/flags/art/4x3/il.ts +2 -0
- package/src/flags/art/4x3/im.ts +2 -0
- package/src/flags/art/4x3/in.ts +2 -0
- package/src/flags/art/4x3/io.ts +2 -0
- package/src/flags/art/4x3/iq.ts +2 -0
- package/src/flags/art/4x3/ir.ts +2 -0
- package/src/flags/art/4x3/is.ts +2 -0
- package/src/flags/art/4x3/it.ts +2 -0
- package/src/flags/art/4x3/je.ts +2 -0
- package/src/flags/art/4x3/jm.ts +2 -0
- package/src/flags/art/4x3/jo.ts +2 -0
- package/src/flags/art/4x3/jp.ts +2 -0
- package/src/flags/art/4x3/ke.ts +2 -0
- package/src/flags/art/4x3/kg.ts +2 -0
- package/src/flags/art/4x3/kh.ts +2 -0
- package/src/flags/art/4x3/ki.ts +2 -0
- package/src/flags/art/4x3/km.ts +2 -0
- package/src/flags/art/4x3/kn.ts +2 -0
- package/src/flags/art/4x3/kp.ts +2 -0
- package/src/flags/art/4x3/kr.ts +2 -0
- package/src/flags/art/4x3/kw.ts +2 -0
- package/src/flags/art/4x3/ky.ts +2 -0
- package/src/flags/art/4x3/kz.ts +2 -0
- package/src/flags/art/4x3/la.ts +2 -0
- package/src/flags/art/4x3/lb.ts +2 -0
- package/src/flags/art/4x3/lc.ts +2 -0
- package/src/flags/art/4x3/li.ts +2 -0
- package/src/flags/art/4x3/lk.ts +2 -0
- package/src/flags/art/4x3/lr.ts +2 -0
- package/src/flags/art/4x3/ls.ts +2 -0
- package/src/flags/art/4x3/lt.ts +2 -0
- package/src/flags/art/4x3/lu.ts +2 -0
- package/src/flags/art/4x3/lv.ts +2 -0
- package/src/flags/art/4x3/ly.ts +2 -0
- package/src/flags/art/4x3/ma.ts +2 -0
- package/src/flags/art/4x3/mc.ts +2 -0
- package/src/flags/art/4x3/md.ts +2 -0
- package/src/flags/art/4x3/me.ts +2 -0
- package/src/flags/art/4x3/mf.ts +2 -0
- package/src/flags/art/4x3/mg.ts +2 -0
- package/src/flags/art/4x3/mh.ts +2 -0
- package/src/flags/art/4x3/mk.ts +2 -0
- package/src/flags/art/4x3/ml.ts +2 -0
- package/src/flags/art/4x3/mm.ts +2 -0
- package/src/flags/art/4x3/mn.ts +2 -0
- package/src/flags/art/4x3/mo.ts +2 -0
- package/src/flags/art/4x3/mp.ts +2 -0
- package/src/flags/art/4x3/mq.ts +2 -0
- package/src/flags/art/4x3/mr.ts +2 -0
- package/src/flags/art/4x3/ms.ts +2 -0
- package/src/flags/art/4x3/mt.ts +2 -0
- package/src/flags/art/4x3/mu.ts +2 -0
- package/src/flags/art/4x3/mv.ts +2 -0
- package/src/flags/art/4x3/mw.ts +2 -0
- package/src/flags/art/4x3/mx.ts +2 -0
- package/src/flags/art/4x3/my.ts +2 -0
- package/src/flags/art/4x3/mz.ts +2 -0
- package/src/flags/art/4x3/na.ts +2 -0
- package/src/flags/art/4x3/nc.ts +2 -0
- package/src/flags/art/4x3/ne.ts +2 -0
- package/src/flags/art/4x3/nf.ts +2 -0
- package/src/flags/art/4x3/ng.ts +2 -0
- package/src/flags/art/4x3/ni.ts +2 -0
- package/src/flags/art/4x3/nl.ts +2 -0
- package/src/flags/art/4x3/no.ts +2 -0
- package/src/flags/art/4x3/np.ts +2 -0
- package/src/flags/art/4x3/nr.ts +2 -0
- package/src/flags/art/4x3/nu.ts +2 -0
- package/src/flags/art/4x3/nz.ts +2 -0
- package/src/flags/art/4x3/om.ts +2 -0
- package/src/flags/art/4x3/pa.ts +2 -0
- package/src/flags/art/4x3/pc.ts +2 -0
- package/src/flags/art/4x3/pe.ts +2 -0
- package/src/flags/art/4x3/pf.ts +2 -0
- package/src/flags/art/4x3/pg.ts +2 -0
- package/src/flags/art/4x3/ph.ts +2 -0
- package/src/flags/art/4x3/pk.ts +2 -0
- package/src/flags/art/4x3/pl.ts +2 -0
- package/src/flags/art/4x3/pm.ts +2 -0
- package/src/flags/art/4x3/pn.ts +2 -0
- package/src/flags/art/4x3/pr.ts +2 -0
- package/src/flags/art/4x3/ps.ts +2 -0
- package/src/flags/art/4x3/pt.ts +2 -0
- package/src/flags/art/4x3/pw.ts +2 -0
- package/src/flags/art/4x3/py.ts +2 -0
- package/src/flags/art/4x3/qa.ts +2 -0
- package/src/flags/art/4x3/re.ts +2 -0
- package/src/flags/art/4x3/ro.ts +2 -0
- package/src/flags/art/4x3/rs.ts +2 -0
- package/src/flags/art/4x3/ru.ts +2 -0
- package/src/flags/art/4x3/rw.ts +2 -0
- package/src/flags/art/4x3/sa.ts +2 -0
- package/src/flags/art/4x3/sb.ts +2 -0
- package/src/flags/art/4x3/sc.ts +2 -0
- package/src/flags/art/4x3/sd.ts +2 -0
- package/src/flags/art/4x3/se.ts +2 -0
- package/src/flags/art/4x3/sg.ts +2 -0
- package/src/flags/art/4x3/sh-ac.ts +2 -0
- package/src/flags/art/4x3/sh-hl.ts +2 -0
- package/src/flags/art/4x3/sh-ta.ts +2 -0
- package/src/flags/art/4x3/sh.ts +2 -0
- package/src/flags/art/4x3/si.ts +2 -0
- package/src/flags/art/4x3/sj.ts +2 -0
- package/src/flags/art/4x3/sk.ts +2 -0
- package/src/flags/art/4x3/sl.ts +2 -0
- package/src/flags/art/4x3/sm.ts +2 -0
- package/src/flags/art/4x3/sn.ts +2 -0
- package/src/flags/art/4x3/so.ts +2 -0
- package/src/flags/art/4x3/sr.ts +2 -0
- package/src/flags/art/4x3/ss.ts +2 -0
- package/src/flags/art/4x3/st.ts +2 -0
- package/src/flags/art/4x3/sv.ts +2 -0
- package/src/flags/art/4x3/sx.ts +2 -0
- package/src/flags/art/4x3/sy.ts +2 -0
- package/src/flags/art/4x3/sz.ts +2 -0
- package/src/flags/art/4x3/tc.ts +2 -0
- package/src/flags/art/4x3/td.ts +2 -0
- package/src/flags/art/4x3/tf.ts +2 -0
- package/src/flags/art/4x3/tg.ts +2 -0
- package/src/flags/art/4x3/th.ts +2 -0
- package/src/flags/art/4x3/tj.ts +2 -0
- package/src/flags/art/4x3/tk.ts +2 -0
- package/src/flags/art/4x3/tl.ts +2 -0
- package/src/flags/art/4x3/tm.ts +2 -0
- package/src/flags/art/4x3/tn.ts +2 -0
- package/src/flags/art/4x3/to.ts +2 -0
- package/src/flags/art/4x3/tr.ts +2 -0
- package/src/flags/art/4x3/tt.ts +2 -0
- package/src/flags/art/4x3/tv.ts +2 -0
- package/src/flags/art/4x3/tw.ts +2 -0
- package/src/flags/art/4x3/tz.ts +2 -0
- package/src/flags/art/4x3/ua.ts +2 -0
- package/src/flags/art/4x3/ug.ts +2 -0
- package/src/flags/art/4x3/um.ts +2 -0
- package/src/flags/art/4x3/un.ts +2 -0
- package/src/flags/art/4x3/us.ts +2 -0
- package/src/flags/art/4x3/uy.ts +2 -0
- package/src/flags/art/4x3/uz.ts +2 -0
- package/src/flags/art/4x3/va.ts +2 -0
- package/src/flags/art/4x3/vc.ts +2 -0
- package/src/flags/art/4x3/ve.ts +2 -0
- package/src/flags/art/4x3/vg.ts +2 -0
- package/src/flags/art/4x3/vi.ts +2 -0
- package/src/flags/art/4x3/vn.ts +2 -0
- package/src/flags/art/4x3/vu.ts +2 -0
- package/src/flags/art/4x3/wf.ts +2 -0
- package/src/flags/art/4x3/ws.ts +2 -0
- package/src/flags/art/4x3/xk.ts +2 -0
- package/src/flags/art/4x3/xx.ts +2 -0
- package/src/flags/art/4x3/ye.ts +2 -0
- package/src/flags/art/4x3/yt.ts +2 -0
- package/src/flags/art/4x3/za.ts +2 -0
- package/src/flags/art/4x3/zm.ts +2 -0
- package/src/flags/art/4x3/zw.ts +2 -0
- package/src/flags/art/index.ts +552 -0
- package/src/flags/flags.test.tsx +140 -0
- package/src/flags/index.ts +7 -0
- package/src/flags/loadFlag.ts +29 -0
- package/src/flags/names.ts +65 -0
- package/src/flow/CLEAN-ROOM.md +110 -0
- package/src/flow/PROVENANCE.md +169 -0
- package/src/flow/README.md +117 -0
- package/src/flow/agents/AgentCreationWizard.tsx +633 -0
- package/src/flow/agents/AgentEditorDialog.tsx +751 -0
- package/src/flow/agents/agents.css +563 -0
- package/src/flow/agents/agents.test.tsx +207 -0
- package/src/flow/agents/index.ts +4 -0
- package/src/flow/agents/parts.tsx +171 -0
- package/src/flow/assistant/AssistantConversation.tsx +388 -0
- package/src/flow/assistant/AssistantVisualBlock.test.tsx +86 -0
- package/src/flow/assistant/AssistantVisualBlock.tsx +75 -0
- package/src/flow/assistant/ConversationShell.test.tsx +202 -0
- package/src/flow/assistant/ConversationShell.tsx +160 -0
- package/src/flow/assistant/LiveCanvasPanel.tsx +52 -0
- package/src/flow/assistant/MarkdownView.tsx +162 -0
- package/src/flow/assistant/ThreadHistory.tsx +156 -0
- package/src/flow/assistant/assistant.css +567 -0
- package/src/flow/assistant/index.ts +10 -0
- package/src/flow/assistant/threadDays.ts +44 -0
- package/src/flow/assistant/useAssistantSession.test.tsx +172 -0
- package/src/flow/assistant/useAssistantSession.ts +457 -0
- package/src/flow/assistant/visual.ts +205 -0
- package/src/flow/catalog/RenderCatalog.tsx +98 -0
- package/src/flow/catalog/catalog.test.tsx +162 -0
- package/src/flow/catalog/icons.ts +116 -0
- package/src/flow/catalog/kindCatalog.ts +175 -0
- package/src/flow/catalog/nodeState.ts +46 -0
- package/src/flow/catalog/palette.ts +116 -0
- package/src/flow/connectors/ConditionalConnector.css +274 -0
- package/src/flow/connectors/ConditionalConnector.tsx +288 -0
- package/src/flow/connectors/ConnectionPreviewLine.tsx +31 -0
- package/src/flow/connectors/ConnectorInsertMenu.tsx +103 -0
- package/src/flow/connectors/connectors.css +2 -0
- package/src/flow/connectors/connectors.test.tsx +218 -0
- package/src/flow/connectors/index.ts +4 -0
- package/src/flow/decision/DecisionNode.tsx +182 -0
- package/src/flow/decision/decision.css +1 -0
- package/src/flow/decision/index.ts +3 -0
- package/src/flow/decision/types.ts +60 -0
- package/src/flow/dialogs/DefinitionDialogs.test.tsx +177 -0
- package/src/flow/dialogs/DefinitionExportDialog.tsx +234 -0
- package/src/flow/dialogs/DefinitionImportDialog.tsx +303 -0
- package/src/flow/dialogs/FlowSettingsDialog.test.tsx +95 -0
- package/src/flow/dialogs/FlowSettingsDialog.tsx +242 -0
- package/src/flow/dialogs/NodeConfigDialog.test.tsx +151 -0
- package/src/flow/dialogs/NodeConfigDialog.tsx +208 -0
- package/src/flow/dialogs/dialogs.css +134 -0
- package/src/flow/dialogs/index.ts +5 -0
- package/src/flow/editor/AutosaveController.tsx +25 -0
- package/src/flow/editor/CanvasCommandBar.tsx +315 -0
- package/src/flow/editor/CanvasContextMenus.tsx +287 -0
- package/src/flow/editor/FlowEditor.test.tsx +282 -0
- package/src/flow/editor/FlowEditor.tsx +1214 -0
- package/src/flow/editor/FlowOutline.tsx +196 -0
- package/src/flow/editor/FlowPreview.tsx +149 -0
- package/src/flow/editor/FlowSwitcherBar.tsx +141 -0
- package/src/flow/editor/NodePalette.tsx +447 -0
- package/src/flow/editor/RunControls.tsx +85 -0
- package/src/flow/editor/SaveStatus.tsx +45 -0
- package/src/flow/editor/editor.css +573 -0
- package/src/flow/editor/editorTools.ts +135 -0
- package/src/flow/editor/focusOut.ts +23 -0
- package/src/flow/editor/index.ts +16 -0
- package/src/flow/editor/keyMap.ts +93 -0
- package/src/flow/editor/nodeBridge.tsx +66 -0
- package/src/flow/editor/parts.test.tsx +519 -0
- package/src/flow/editor/useEditorShortcuts.ts +122 -0
- package/src/flow/editor/useSelectionArrange.ts +135 -0
- package/src/flow/expressions/ComputeInsertPanel.tsx +123 -0
- package/src/flow/expressions/ComputeNodeForm.tsx +291 -0
- package/src/flow/expressions/ComputeTrial.tsx +105 -0
- package/src/flow/expressions/ExpressionBuilder.test.tsx +161 -0
- package/src/flow/expressions/ExpressionBuilder.tsx +71 -0
- package/src/flow/expressions/ExpressionField.tsx +157 -0
- package/src/flow/expressions/RuleEditor.tsx +645 -0
- package/src/flow/expressions/RuleNodeForm.tsx +165 -0
- package/src/flow/expressions/SimulationNodeForm.tsx +175 -0
- package/src/flow/expressions/TraceTree.test.tsx +120 -0
- package/src/flow/expressions/TraceTree.tsx +210 -0
- package/src/flow/expressions/builder/ItemList.tsx +72 -0
- package/src/flow/expressions/builder/leaves.tsx +94 -0
- package/src/flow/expressions/builder/shared.tsx +55 -0
- package/src/flow/expressions/builder/tree.tsx +221 -0
- package/src/flow/expressions/catalogContext.tsx +21 -0
- package/src/flow/expressions/computeDraft.ts +105 -0
- package/src/flow/expressions/exampleCatalog.ts +42 -0
- package/src/flow/expressions/expressions.css +520 -0
- package/src/flow/expressions/forms.test.tsx +325 -0
- package/src/flow/expressions/index.ts +15 -0
- package/src/flow/expressions/labels.ts +204 -0
- package/src/flow/expressions/model.ts +194 -0
- package/src/flow/expressions/ruleActions.ts +164 -0
- package/src/flow/expressions/ruleCondition.ts +98 -0
- package/src/flow/expressions/trace.ts +98 -0
- package/src/flow/forms/AgentNodeForm.css +29 -0
- package/src/flow/forms/AgentNodeForm.test.tsx +66 -0
- package/src/flow/forms/AgentNodeForm.tsx +177 -0
- package/src/flow/forms/DataSourceNodeForm.test.tsx +121 -0
- package/src/flow/forms/DataSourceNodeForm.tsx +519 -0
- package/src/flow/forms/DecisionNodeForm.test.tsx +72 -0
- package/src/flow/forms/DecisionNodeForm.tsx +302 -0
- package/src/flow/forms/GroupNodeForm.css +72 -0
- package/src/flow/forms/GroupNodeForm.test.tsx +55 -0
- package/src/flow/forms/GroupNodeForm.tsx +148 -0
- package/src/flow/forms/NewForms.css +256 -0
- package/src/flow/forms/NodeFormFooter.tsx +44 -0
- package/src/flow/forms/OutputSchemaBuilder.test.tsx +83 -0
- package/src/flow/forms/OutputSchemaBuilder.tsx +325 -0
- package/src/flow/forms/ReportOutputNodeForm.test.tsx +63 -0
- package/src/flow/forms/ReportOutputNodeForm.tsx +180 -0
- package/src/flow/forms/SchemaConfigForm.css +7 -0
- package/src/flow/forms/SchemaConfigForm.test.tsx +74 -0
- package/src/flow/forms/SchemaConfigForm.tsx +214 -0
- package/src/flow/forms/StartNodeForm.css +29 -0
- package/src/flow/forms/StartNodeForm.test.tsx +66 -0
- package/src/flow/forms/StartNodeForm.tsx +88 -0
- package/src/flow/forms/ToolServerListField.css +58 -0
- package/src/flow/forms/ToolServerListField.test.tsx +73 -0
- package/src/flow/forms/ToolServerListField.tsx +242 -0
- package/src/flow/forms/VariableListEditor.css +82 -0
- package/src/flow/forms/VariableListEditor.test.tsx +79 -0
- package/src/flow/forms/VariableListEditor.tsx +280 -0
- package/src/flow/forms/forms-shared.css +53 -0
- package/src/flow/forms/forms.css +9 -0
- package/src/flow/forms/index.ts +12 -0
- package/src/flow/forms/nameListModel.ts +61 -0
- package/src/flow/geometry/arrange.ts +74 -0
- package/src/flow/geometry/curve.ts +58 -0
- package/src/flow/geometry/geometry.test.ts +97 -0
- package/src/flow/geometry/guides.ts +49 -0
- package/src/flow/geometry/rect.ts +101 -0
- package/src/flow/geometry/viewport.ts +70 -0
- package/src/flow/index.ts +58 -0
- package/src/flow/internal/Announcer.tsx +63 -0
- package/src/flow/internal/DockedPanel.tsx +95 -0
- package/src/flow/internal/SectionedModal.tsx +117 -0
- package/src/flow/internal/builtInLabels.test.ts +16 -0
- package/src/flow/internal/confirm.tsx +73 -0
- package/src/flow/internal/format.ts +47 -0
- package/src/flow/internal/i18n.test.tsx +109 -0
- package/src/flow/internal/ids.ts +9 -0
- package/src/flow/internal/internal.css +152 -0
- package/src/flow/internal/labels.ts +101 -0
- package/src/flow/internal/messageFormat.ts +102 -0
- package/src/flow/internal/useControllable.ts +17 -0
- package/src/flow/layout/autoLayout.test.ts +56 -0
- package/src/flow/layout/autoLayout.ts +93 -0
- package/src/flow/layout/chainLayout.ts +66 -0
- package/src/flow/model/graph.ts +123 -0
- package/src/flow/model/types.ts +83 -0
- package/src/flow/nodes/AgentIdentity.tsx +145 -0
- package/src/flow/nodes/AgentNode.tsx +152 -0
- package/src/flow/nodes/AlignmentGuides.tsx +108 -0
- package/src/flow/nodes/ConnectionPorts.tsx +277 -0
- package/src/flow/nodes/DataSourceNode.tsx +179 -0
- package/src/flow/nodes/GenericNode.tsx +114 -0
- package/src/flow/nodes/GraphNodeCard.css +314 -0
- package/src/flow/nodes/GraphNodeCard.test.tsx +117 -0
- package/src/flow/nodes/GraphNodeCard.tsx +329 -0
- package/src/flow/nodes/GroupNode.tsx +231 -0
- package/src/flow/nodes/NodeRunIndicator.tsx +139 -0
- package/src/flow/nodes/NoteNode.tsx +134 -0
- package/src/flow/nodes/RuleNode.tsx +162 -0
- package/src/flow/nodes/flow-nodes.css +687 -0
- package/src/flow/nodes/groupLayout.ts +66 -0
- package/src/flow/nodes/index.ts +18 -0
- package/src/flow/nodes/nodeChrome.tsx +113 -0
- package/src/flow/nodes/nodes.css +3 -0
- package/src/flow/nodes/nodes.test.tsx +529 -0
- package/src/flow/nodes/ports.ts +127 -0
- package/src/flow/nodes/registry.tsx +262 -0
- package/src/flow/nodes/sourceMarks.tsx +52 -0
- package/src/flow/nodes/types.ts +85 -0
- package/src/flow/provenance/EditionCompare.tsx +292 -0
- package/src/flow/provenance/NumberTrace.tsx +208 -0
- package/src/flow/provenance/ProvenanceCertificate.tsx +263 -0
- package/src/flow/provenance/ProvenanceFilters.tsx +137 -0
- package/src/flow/provenance/ProvenanceGraph.css +1156 -0
- package/src/flow/provenance/ProvenanceGraph.test.tsx +361 -0
- package/src/flow/provenance/ProvenanceGraph.tsx +725 -0
- package/src/flow/provenance/ProvenanceInspector.tsx +201 -0
- package/src/flow/provenance/ProvenanceLegend.tsx +66 -0
- package/src/flow/provenance/ProvenanceNode.tsx +171 -0
- package/src/flow/provenance/ProvenanceShellParts.test.tsx +130 -0
- package/src/flow/provenance/ProvenanceTimeline.tsx +342 -0
- package/src/flow/provenance/ProvenanceTree.tsx +143 -0
- package/src/flow/provenance/ProvenanceViews.css +828 -0
- package/src/flow/provenance/ProvenanceViews.test.tsx +307 -0
- package/src/flow/provenance/index.ts +14 -0
- package/src/flow/provenance/labels.ts +418 -0
- package/src/flow/provenance/model.ts +381 -0
- package/src/flow/provenance/proofTypes.ts +93 -0
- package/src/flow/provenance/provenance.css +3 -0
- package/src/flow/report/ClaimTitle.tsx +15 -0
- package/src/flow/report/ProvenanceTag.test.tsx +37 -0
- package/src/flow/report/ProvenanceTag.tsx +58 -0
- package/src/flow/report/ReportView.test.tsx +59 -0
- package/src/flow/report/ReportView.tsx +359 -0
- package/src/flow/report/index.ts +4 -0
- package/src/flow/report/report.css +267 -0
- package/src/flow/run/ExecutionTimeline.tsx +478 -0
- package/src/flow/run/NumberInput.tsx +59 -0
- package/src/flow/run/RunDrawer.tsx +485 -0
- package/src/flow/run/RunInputDialog.tsx +149 -0
- package/src/flow/run/RunPanel.tsx +136 -0
- package/src/flow/run/RunPreviewPanel.tsx +269 -0
- package/src/flow/run/RunReplayDialog.tsx +278 -0
- package/src/flow/run/RunRewindDialog.tsx +197 -0
- package/src/flow/run/RunStatusMark.tsx +79 -0
- package/src/flow/run/RunTimePanel.test.tsx +55 -0
- package/src/flow/run/RunTimePanel.tsx +143 -0
- package/src/flow/run/RunViews.tsx +170 -0
- package/src/flow/run/ShortId.tsx +15 -0
- package/src/flow/run/VariableInspector.tsx +198 -0
- package/src/flow/run/VersionHistoryPanel.tsx +178 -0
- package/src/flow/run/execution.ts +187 -0
- package/src/flow/run/index.ts +18 -0
- package/src/flow/run/lineage.ts +123 -0
- package/src/flow/run/rewindPlan.ts +79 -0
- package/src/flow/run/run.css +749 -0
- package/src/flow/run/run.test.tsx +533 -0
- package/src/flow/run/runData.ts +124 -0
- package/src/flow/run/types.ts +53 -0
- package/src/flow/state/dialogStack.tsx +90 -0
- package/src/flow/state/editorState.test.tsx +110 -0
- package/src/flow/state/editorState.tsx +296 -0
- package/src/flow/state/graphEdits.ts +107 -0
- package/src/flow/state/store.ts +67 -0
- package/src/flow/steps/AddStepPicker.tsx +108 -0
- package/src/flow/steps/FlowSidePanel.tsx +318 -0
- package/src/flow/steps/IssueBar.tsx +58 -0
- package/src/flow/steps/ShapeChip.tsx +41 -0
- package/src/flow/steps/StepCard.tsx +139 -0
- package/src/flow/steps/StepListView.tsx +152 -0
- package/src/flow/steps/StepPalette.tsx +194 -0
- package/src/flow/steps/StepsContext.tsx +70 -0
- package/src/flow/steps/index.ts +15 -0
- package/src/flow/steps/researchSteps.ts +269 -0
- package/src/flow/steps/shapes.ts +46 -0
- package/src/flow/steps/stepLabels.ts +160 -0
- package/src/flow/steps/stepTools.ts +37 -0
- package/src/flow/steps/steps.css +962 -0
- package/src/flow/steps/steps.test.tsx +351 -0
- package/src/flow/steps/wiring.ts +123 -0
- package/src/flow/styles.css +23 -0
- package/src/flow/surface/CanvasSurface.test.tsx +148 -0
- package/src/flow/surface/CanvasSurface.tsx +674 -0
- package/src/flow/surface/OverviewMap.tsx +50 -0
- package/src/flow/surface/SurfaceContext.tsx +28 -0
- package/src/flow/surface/surface.css +200 -0
- package/src/flow/surface/types.ts +97 -0
- package/src/flow/surface/useElementSize.ts +29 -0
- package/src/flow/surface/useNodeMeasurement.ts +71 -0
- package/src/flow/toolbar/CanvasNodeSearch.tsx +110 -0
- package/src/flow/toolbar/CanvasToolbar.test.tsx +101 -0
- package/src/flow/toolbar/CanvasToolbar.tsx +114 -0
- package/src/flow/toolbar/canvasTools.ts +114 -0
- package/src/flow/toolbar/dockItems.test.tsx +47 -0
- package/src/flow/toolbar/dockItems.tsx +51 -0
- package/src/flow/toolbar/index.ts +5 -0
- package/src/flow/toolbar/toolbar.css +217 -0
- package/src/groups/auth-brand.css +18 -0
- package/src/groups/auth-brand.ts +17 -0
- package/src/groups/charts-geo.css +6 -0
- package/src/groups/charts-geo.ts +98 -0
- package/src/groups/data-a.css +13 -0
- package/src/groups/data-a.ts +14 -0
- package/src/groups/data-b.css +11 -0
- package/src/groups/data-b.ts +11 -0
- package/src/groups/forms-a.css +17 -0
- package/src/groups/forms-a.ts +15 -0
- package/src/groups/forms-b.css +14 -0
- package/src/groups/forms-b.ts +13 -0
- package/src/groups/overlays-nav.css +15 -0
- package/src/groups/overlays-nav.ts +16 -0
- package/src/groups/platform.css +7 -0
- package/src/groups/platform.ts +101 -0
- package/src/groups/shell.css +10 -0
- package/src/groups/shell.ts +10 -0
- package/src/groups/showcase.css +8 -0
- package/src/groups/showcase.ts +9 -0
- package/src/index.ts +65 -0
- package/src/internal/ThemeScope.tsx +28 -0
- package/src/internal/VisuallyHidden.tsx +10 -0
- package/src/internal/cx.ts +4 -0
- package/src/internal/data-a/announce.ts +38 -0
- package/src/internal/data-a/clipboard.ts +11 -0
- package/src/internal/data-b/signed.ts +34 -0
- package/src/internal/data-b/tween.ts +67 -0
- package/src/internal/dev.ts +12 -0
- package/src/internal/dom.ts +42 -0
- package/src/internal/forms-a/LiveNote.tsx +18 -0
- package/src/internal/forms-a/SearchInput.css +125 -0
- package/src/internal/forms-a/SearchInput.tsx +52 -0
- package/src/internal/forms-a/marks.tsx +18 -0
- package/src/internal/forms-a/shared.css +25 -0
- package/src/internal/forms-b/digits.ts +33 -0
- package/src/internal/forms-b/forms-b.css +341 -0
- package/src/internal/forms-b/parts.tsx +151 -0
- package/src/internal/haptics.ts +77 -0
- package/src/internal/icuCatalogue.ts +60 -0
- package/src/internal/inert.ts +15 -0
- package/src/internal/media.ts +35 -0
- package/src/internal/messages/auth-brand.ts +161 -0
- package/src/internal/messages/charts-geo.ts +289 -0
- package/src/internal/messages/core-es.ts +94 -0
- package/src/internal/messages/data-a.ts +199 -0
- package/src/internal/messages/data-b.ts +99 -0
- package/src/internal/messages/forms-a.ts +309 -0
- package/src/internal/messages/forms-b.ts +293 -0
- package/src/internal/messages/overlays-nav.ts +367 -0
- package/src/internal/messages/platform.ts +63 -0
- package/src/internal/messages/plural.ts +24 -0
- package/src/internal/messages/shell.ts +144 -0
- package/src/internal/messages/showcase.ts +12 -0
- package/src/internal/messages.ts +335 -0
- package/src/internal/overlays-nav/fuzzy.ts +115 -0
- package/src/internal/overlays-nav/hold.ts +53 -0
- package/src/internal/overlays-nav/recent.ts +73 -0
- package/src/internal/overlays-nav/state.ts +54 -0
- package/src/internal/platform/touchTrack.ts +49 -0
- package/src/internal/provider.tsx +64 -0
- package/src/internal/speech.ts +24 -0
- package/src/internal/theme.test.tsx +166 -0
- package/src/internal/theme.tsx +181 -0
- package/src/internal/types.ts +4 -0
- package/src/internal/variants.test.ts +14 -0
- package/src/internal/variants.ts +48 -0
- package/src/native-states.css +364 -0
- package/src/styles.css +56 -0
- package/src/utilities/api-error-model/apiErrors.test.ts +74 -0
- package/src/utilities/api-error-model/apiErrors.ts +192 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.test.tsx +72 -0
- package/src/utilities/entity-list-loader/useEntityListLoader.ts +107 -0
- package/src/utilities/formatters/formatters.locales.test.ts +30 -0
- package/src/utilities/formatters/formatters.test.tsx +86 -0
- package/src/utilities/formatters/formatters.ts +190 -0
- package/src/utilities/haptics/haptics.test.tsx +96 -0
- package/src/utilities/haptics/haptics.tsx +79 -0
- package/src/utilities/i18n-adapter/I18nAdapter.test.tsx +70 -0
- package/src/utilities/i18n-adapter/I18nAdapter.tsx +136 -0
- package/src/utilities/i18n-adapter/icu.numeric.test.ts +39 -0
- package/src/utilities/i18n-adapter/icu.ts +207 -0
- package/src/utilities/legacy-alias-map/LEGACY-ALIASES.md +65 -0
- package/src/utilities/legacy-alias-map/legacy-alias-map.test.ts +57 -0
- package/src/utilities/motion-foundation/motion.test.tsx +76 -0
- package/src/utilities/motion-foundation/motion.tsx +119 -0
- package/src/utilities/router-adapter/Routing.test.tsx +68 -0
- package/src/utilities/router-adapter/Routing.tsx +149 -0
- package/src/utilities/view-transition/animatedChange.test.ts +72 -0
- package/src/utilities/view-transition/animatedChange.ts +90 -0
- package/dist/src-Ds9ArSaP.js.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
function e(e,t){let n={...t};for(let[t,r]of Object.entries(e.props))n[t]===void 0&&r.default!==void 0&&(n[t]=r.default);return n}const t=e=>e!==void 0&&e!==!1&&e!==``;function n(e,n,r){if(!e)return!0;let i=e=>{let i=e.startsWith(`!`),a=i?e.slice(1):e,o;if(a.startsWith(`slot:`))o=r.has(a.slice(5));else if(a.includes(`:`)){let e=a.indexOf(`:`);o=String(n[a.slice(0,e)])===a.slice(e+1)}else o=t(n[a]);return i?!o:o};return e.every(e=>e.split(`|`).some(i))}function r(e,r,i,a){if(!n(e.when,r,i))return;if(`value`in e)return e.value;if(`idref`in e){let n=e.prop===void 0?void 0:r[e.prop];return t(n)?String(n):`${a}-${e.idref}`}if(`idrefs`in e){let o=[];for(let s of e.idrefs)if(`id`in s)n(s.when,r,i)&&o.push(`${a}-${s.id}`);else{let e=r[s.prop];t(e)&&o.push(String(e))}return o.length?o.join(` `):void 0}let o=r[e.prop];if(!(`kind`in e))return t(o)?String(o):void 0;switch(e.kind){case`flag`:case`boolean-attr`:return t(o)?``:void 0;case`bool`:return t(o)?`true`:void 0;case`map`:if(t(o))return e.values[String(o)];if(e.fallback){let n=r[e.fallback.prop];if(t(n))return e.fallback.values[String(n)]}return}}let i=0;const a=typeof HTMLElement>`u`?class{}:HTMLElement,o=e=>(e.class??``).split(/\s+/)[0]??``;var s=class extends a{static definition;static get observedAttributes(){return[...Object.values(this.definition.props).map(e=>e.attribute),`data-ty-instance`]}#e;#t=!1;#n=/* @__PURE__ */ new Map;get definition(){return this.constructor.definition}get instanceId(){return this.getAttribute(`data-ty-instance`)||this.id||(this.#e??=`ty-${++i}`)}get props(){let t={};for(let[e,n]of Object.entries(this.definition.props))if(n.type===`boolean`)t[e]=this.hasAttribute(n.attribute);else{let r=this.getAttribute(n.attribute);r!==null&&(t[e]=n.type===`number`?Number(r):r)}return e(this.definition,t)}get owned(){return this.#t}connectedCallback(){this.definition.kind===`enhancing`&&this.definition.anatomy&&(this.anatomyRoot()||this.#i(),this.sync()),this.connected()}disconnectedCallback(){this.disconnected()}attributeChangedCallback(){this.isConnected&&this.definition.kind===`enhancing`&&this.sync(),this.changed()}connected(){}disconnected(){}changed(){}anatomyRoot(){let e=this.definition.anatomy;if(!e)return null;for(let t of Array.from(this.children))if(t.classList.contains(o(e)))return t;return null}sync(){let e=this.definition.anatomy;if(!e)return;if(this.#t){this.#a(e);return}let t=this.props,n=this.#r(),i=(e,a)=>{for(let[i,o]of Object.entries(e.attrs??{})){if(c.has(i)&&`kind`in o&&o.kind===`boolean-attr`)continue;let e=r(o,t,n,this.instanceId);e===void 0?a.removeAttribute(i):a.getAttribute(i)!==e&&a.setAttribute(i,e)}let s=/* @__PURE__ */ new Set;for(let t of e.children??[]){if(!(`tag`in t)||!t.class)continue;let e=Array.from(a.children).find(e=>!s.has(e)&&e.classList.contains(o(t)));e&&(s.add(e),i(t,e))}},a=this.anatomyRoot();a&&i(e,a)}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}#r(){if(this.#t)return new Set([...this.#n].filter(([,e])=>e.some(u)).map(([e])=>e));let e=/* @__PURE__ */ new Set,t=(n,r)=>{if(`slot`in n){r&&Array.from(r.childNodes).some(u)&&e.add(n.slot);return}if(`tag`in n)for(let e of n.children??[])`slot`in e?t(e,r):r&&`tag`in e&&e.class&&t(e,Array.from(r.children).find(t=>t.classList.contains(o(e)))??null)};return this.definition.anatomy&&t(this.definition.anatomy,this.anatomyRoot()),e}#i(){for(let e of Array.from(this.childNodes)){let t=e instanceof Element&&e.hasAttribute(`slot`)?e.getAttribute(`slot`):`default`,n=this.#n.get(t)??[];n.push(e),this.#n.set(t,n)}this.#t=!0}#a(e){let t=this.props,i=this.#r(),a=(e,s,u)=>{if(!n(e.when,t,i))return[];if(`slot`in e)return this.#n.get(e.slot)??[];if(`text`in e){let n=t[e.text.prop];return n===void 0||n===!1||n===``?[]:[document.createTextNode(String(n))]}let d=u||e.tag===`svg`,f=s??(d?document.createElementNS(l,e.tag):document.createElement(e.tag));!s&&e.class&&f.setAttribute(`class`,e.class);for(let[n,a]of Object.entries(e.attrs??{})){let e=r(a,t,i,this.instanceId);if(s&&c.has(n)&&`kind`in a&&a.kind===`boolean-attr`){f[n]=e!==void 0;continue}e===void 0?f.removeAttribute(n):f.getAttribute(n)!==e&&f.setAttribute(n,e)}let p=/* @__PURE__ */ new Set,m=[];for(let t of e.children??[]){if(`slot`in t||`text`in t){m.push(...a(t,null,d));continue}let e=Array.from(f.children).find(e=>!p.has(e)&&e.localName===t.tag&&e.classList.contains(o(t)))??null;e&&p.add(e),m.push(...a(t,e,d))}for(m.forEach((e,t)=>{f.childNodes[t]!==e&&f.insertBefore(e,f.childNodes[t]??null)});f.childNodes.length>m.length;)f.lastChild.remove();return[f]},s=this.anatomyRoot(),u=a(e,s,!1)[0];u&&u!==s&&this.replaceChildren(u)}};const c=/* @__PURE__ */ new Set([`checked`,`selected`]),l=`http://www.w3.org/2000/svg`,u=e=>e.nodeType!==Node.TEXT_NODE||(e.textContent??``).trim()!==``;function d(e){let t=e.definition;if(!(typeof customElements>`u`||customElements.get(t.tag))){for(let[n,r]of Object.entries(t.props))Object.prototype.hasOwnProperty.call(e.prototype,n)||Object.defineProperty(e.prototype,n,{configurable:!0,get(){if(r.type===`boolean`)return this.hasAttribute(r.attribute);let e=this.getAttribute(r.attribute);return e===null?r.default:r.type===`number`?Number(e):e},set(e){r.type===`boolean`?this.toggleAttribute(r.attribute,!!e):e==null?this.removeAttribute(r.attribute):this.setAttribute(r.attribute,String(e))}});customElements.define(t.tag,e)}}const f={tag:`ty-wheel-picker`,name:`TyWheelPicker`,kind:`self-rendering`,doc:"Touch-friendly vertical scroller that picks one value from an ordered list by centring it in a selection band (drag or flick scrolls and snaps, a tap selects, the keyboard moves by row, page or ends). With `columns`, several wheels sit side by side for compound values (day, month, year), each with its own width share.",props:{options:{type:`string`,attribute:`options`,doc:`JSON array of the ordered choices: plain strings, or { "value", "label" } objects when the shown text differs from the reported value.`},value:{type:`string`,attribute:`value`,doc:`Selected value. A value no option holds centres the first row and reports nothing until the wheel moves; programmatic changes animate the wheel to the new row.`},label:{type:`string`,attribute:`label`,doc:"Accessible name of the wheel; with `columns`, of the whole group."},visibleRows:{type:`number`,default:5,attribute:`visible-rows`,doc:`Rows visible at once; an even number rounds up to the next odd one (minimum 3).`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Shown but not changeable: the wheel stays focusable, taps, scrolling and keys do not select.`},columns:{type:`string`,attribute:`columns`,doc:'Multi-column form: JSON array of { "label", "options", "value", "share"? }, one wheel per entry; `share` is its relative width. Wins over `options` and `value`.'},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the wheel (`data-testid`)."}},events:[{type:`ty-change`,kind:`custom`,detail:{value:`string`,column:`number`},reactProp:`onChange`,doc:"The wheel settled on a new value, or a row was activated (tap, arrows, PageUp/PageDown, Home/End, typeahead). `value` is the option's value, not its label; `column` is the wheel's index (0 for a single wheel)."}],examples:[]};function p(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function m(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)if(typeof n==`string`)t.push({id:n,text:n});else if(n&&typeof n==`object`&&`value`in n){let e=String(n.value),r=n.label;t.push({id:e,text:r==null?e:String(r)})}return t.filter(e=>e.id!==``)}function h(e){if(e)try{return JSON.parse(e)}catch{return}}const g=()=>typeof window<`u`&&!!window.matchMedia&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function _(){if(g())return;let e=navigator;if(!(e.userActivation&&e.userActivation.hasBeenActive===!1)&&typeof e.vibrate==`function`)try{e.vibrate.call(navigator,8)}catch{}}var ee=class extends s{static definition=f;#e=[];#t=``;#n=new AbortController;connected(){this.#o()}disconnected(){for(let e of this.#e)clearTimeout(e.settleTimer),clearTimeout(e.programTimer);this.#e=[],this.#n.abort(),this.#n=new AbortController}changed(){if(!this.isConnected||!this.#e.length)return;if(this.#i()!==this.#t){this.#o();return}let e=this.#e[0];if(e&&!this.#r()){let t=String(this.props.value??``);t!==e.current&&(e.current=t,this.#u(e,e.rows.findIndex(e=>e.id===t),!0))}}#r(){let e=h(this.getAttribute(`columns`)??void 0);if(!Array.isArray(e)||!e.length)return;let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;t.push({label:String(e.label??``),options:m(e.options),value:e.value===void 0||e.value===null?``:String(e.value),share:typeof e.share==`number`&&Number.isFinite(e.share)?e.share:void 0})}return t.length?t:void 0}#i(){let e=this.props;return[this.getAttribute(`options`)??``,this.getAttribute(`columns`)??``,String(e.label??``),String(e.visibleRows??``),e.disabled?`1`:`0`,String(e.testId??``)].join(``)}#a(){let e=Number(this.props.visibleRows??5);return Math.max(3,(Number.isFinite(e)?Math.floor(e):5)|1)}#o(){this.#t=this.#i();for(let e of this.#e)clearTimeout(e.settleTimer),clearTimeout(e.programTimer);this.#e=[];let e=this.#a(),t=this.#r();if(t){let n=p(`div`,`ty-wheel-group`,{role:`group`,"aria-label":String(this.props.label??``)});t.forEach((t,r)=>n.append(this.#s(t.options,t.value,t.label,r,e,!0,t.share))),this.replaceChildren(n)}else{let t=m(h(this.getAttribute(`options`)??void 0)),n=this.#s(t,String(this.props.value??``),String(this.props.label??``),0,e,!1,void 0),r=this.props.testId;r&&n.setAttribute(`data-testid`,String(r)),this.replaceChildren(n)}for(let e of this.#e)this.#u(e,e.rows.findIndex(t=>t.id===e.current),!1)}#s(e,t,n,r,i,a,o){let s=!!this.props.disabled,c=p(`div`,`ty-wheel`);if(c.style.setProperty(`--ty-wheel-rows`,String(i)),c.style.setProperty(`--ty-wheel-share`,String(o??1)),s&&c.setAttribute(`data-disabled`,``),a){let e=p(`span`,`ty-wheel__caption`,{"aria-hidden":`true`});e.textContent=n,c.append(e)}let l=p(`div`,`ty-wheel__viewport`);l.append(p(`span`,`ty-wheel__band`,{"aria-hidden":`true`}));let u=p(`div`,`ty-wheel__list`,{role:`listbox`,tabindex:`0`,"aria-label":n}),d={column:r,rows:e,current:t,centre:0,wheel:c,list:u,programmatic:!1,settleTimer:void 0,programTimer:void 0,moved:!1};return e.forEach((e,n)=>{let i=p(`div`,`ty-wheel__row`,{role:`option`,id:this.#c(r,n),"aria-selected":String(e.id===t)});e.id===t&&i.setAttribute(`data-selected`,``),i.textContent=e.text,u.append(i)}),l.append(u),c.append(l),u.addEventListener(`scroll`,()=>this.#p(d),{passive:!0}),u.addEventListener(`keydown`,e=>this.#h(d,e)),u.addEventListener(`click`,e=>this.#m(d,e)),u.addEventListener(`focus`,()=>{try{u.matches(`:focus-visible`)&&u.setAttribute(`data-focus-visible`,``)}catch{}}),u.addEventListener(`blur`,()=>u.removeAttribute(`data-focus-visible`)),this.#g(d),this.#e.push(d),c}#c(e,t){return`${this.instanceId}-wheel-${e}-option-${t}`}#l(e){return e.list.querySelector(`[role="option"]`)?.offsetHeight||44}#u(e,t,n){let r=Math.max(0,t);e.centre=r,this.#f(e);let i=r*this.#l(e),a=!n||g()?`instant`:`smooth`;e.programmatic=!0,clearTimeout(e.settleTimer),typeof e.list.scrollTo==`function`?e.list.scrollTo({top:i,behavior:a}):e.list.scrollTop=i,clearTimeout(e.programTimer),e.programTimer=setTimeout(()=>{e.programmatic=!1},400)}#d(e,t){let n=e.rows[t];if(!n)return;let r=n.id!==e.current;e.current=n.id,this.#u(e,t,!0),r&&this.emit(`ty-change`,{value:n.id,column:e.column})}#f(e){e.list.querySelectorAll(`[role="option"]`).forEach((t,n)=>{let r=e.rows[n]?.id===e.current;t.setAttribute(`aria-selected`,String(r)),r?t.setAttribute(`data-selected`,``):t.removeAttribute(`data-selected`),t.setAttribute(`data-distance`,String(Math.min(3,Math.abs(n-e.centre))))}),e.rows.length?e.list.setAttribute(`aria-activedescendant`,this.#c(e.column,e.centre)):e.list.removeAttribute(`aria-activedescendant`)}#p(e){let t=Math.min(e.rows.length-1,Math.max(0,Math.round(e.list.scrollTop/this.#l(e))));t!==e.centre&&(e.programmatic||_(),e.centre=t,this.#f(e)),!e.programmatic&&(clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{let n=e.rows[t];if(n&&n.id!==e.current){if(this.props.disabled)return;e.current=n.id,this.#f(e),_(),this.emit(`ty-change`,{value:n.id,column:e.column})}},120))}#m(e,t){let n=t.target?.closest?.(`[role="option"]`);if(!n||!e.list.contains(n))return;if(e.moved){e.moved=!1;return}if(this.props.disabled)return;let r=Array.prototype.indexOf.call(e.list.children,n);r>=0&&this.#d(e,r)}#h(e,t){if(!e.rows.length)return;let n=e.rows.findIndex(t=>t.id===e.current),r=e.rows.length-1,i=Math.max(0,n),a;switch(t.key){case`ArrowUp`:a=n<0?0:Math.max(0,i-1);break;case`ArrowDown`:a=n<0?0:Math.min(r,i+1);break;case`PageUp`:a=Math.max(0,i-this.#a());break;case`PageDown`:a=Math.min(r,i+this.#a());break;case`Home`:a=0;break;case`End`:a=r;break;default:if(t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey){let n=t.key.toLocaleLowerCase();for(let t=1;t<=e.rows.length;t++){let r=(i+t)%e.rows.length;if(e.rows[r].text.toLocaleLowerCase().startsWith(n)){a=r;break}}}}a!==void 0&&(t.preventDefault(),!this.props.disabled&&a!==n&&this.#d(e,a))}#g(e){let t=null;e.list.addEventListener(`pointerdown`,n=>{n.pointerType!==`touch`&&(t={y:n.clientY,top:e.list.scrollTop},e.moved=!1)}),window.addEventListener(`pointermove`,n=>{if(!t)return;let r=n.clientY-t.y;Math.abs(r)>4&&!e.moved&&(e.moved=!0,e.wheel.setAttribute(`data-dragging`,``)),e.moved&&(e.list.scrollTop=t.top-r)},{signal:this.#n.signal}),window.addEventListener(`pointerup`,()=>{t=null,e.wheel.removeAttribute(`data-dragging`)},{signal:this.#n.signal})}};const te={tag:`ty-toast`,name:`TyToast`,kind:`self-rendering`,doc:"Brief, non-blocking confirmation or warning after an action, shown in a fixed landmark region with one live-region politeness per tone (errors assertive, the rest polite). The element owns the queue and the history; toasts arrive through its imperative API (`show`, `success`/`error`/`warning`/`info`, `dismiss`, `history`), reachable through the host ref. Auto-dismiss pauses on hover, focus and a hidden window; errors and toasts with an action stay until dismissed.",props:{placement:{type:`enum`,values:[`top-end`,`top-center`,`bottom-center`],default:`top-end`,attribute:`placement`,doc:"Region position (`data-placement`); `bottom-center` is recommended below 640 px."},maxVisible:{type:`number`,default:3,attribute:`max-visible`,doc:`Toasts shown at once; the rest wait in the queue and appear as earlier ones dismiss.`},historyLimit:{type:`number`,default:50,attribute:`history-limit`,doc:`How many past toasts the history keeps (newest first); feeds the notification history.`},regionLabel:{type:`string`,default:`Notifications`,attribute:`region-label`,doc:`Accessible name of the region landmark (the I18nAdapter's toast.region in React).`},dismissLabel:{type:`string`,default:`Dismiss notification`,attribute:`dismiss-label`,doc:`Accessible name of each toast's dismiss button.`}},events:[{type:`ty-toast-dismiss`,kind:`custom`,detail:{id:`string`},reactProp:`onDismiss`,doc:"A toast was dismissed — timeout, dismiss button, Escape, swipe, its action, or a `dismiss(id)` call; the detail carries its id (the spec's `onDismiss`)."},{type:`ty-toast-action`,kind:`custom`,detail:{id:`string`},reactProp:`onAction`,doc:"A toast's action was pressed; its `onPress` ran too and the toast dismissed itself. Lets hosts that cannot pass a callback still react to the action."}],examples:[]},ne={success:5e3,info:5e3,warning:8e3,error:`persistent`},re=`http://www.w3.org/2000/svg`;let ie=0;function v(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function y(e,t){let n=document.createElementNS(re,`svg`);n.setAttribute(`class`,e),n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`2`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let[e,r]of t){let t=document.createElementNS(re,e);for(let[e,n]of Object.entries(r))t.setAttribute(e,n);n.append(t)}return n}const ae={success:()=>y(`ty-toast__icon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16 9-5.5 5.5L8 12`}]]),error:()=>y(`ty-toast__icon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]]),warning:()=>y(`ty-toast__icon`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]]),info:()=>y(`ty-toast__icon`,[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]])},oe=()=>y(`ty-icon`,[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]]);let se=!1;const ce=[`pointerdown`,`touchstart`,`keydown`,`mousedown`];function le(){se=!0;for(let e of ce)window.removeEventListener(e,le,!0)}if(typeof window<`u`)for(let e of ce)window.addEventListener(e,le,{capture:!0,passive:!0});function ue(){try{if(typeof navigator>`u`||typeof navigator.vibrate!=`function`)return;let e=navigator.userActivation;if(!(e&&typeof e.hasBeenActive==`boolean`&&e.hasBeenActive||se)||typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;navigator.vibrate(8)}catch{}}function de(e){if(e===void 0||e===!1||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}var fe=class extends s{static definition=te;#e=[];#t=[];#n=/* @__PURE__ */ new Map;#r=/* @__PURE__ */ new Set;#i=null;#a=null;#o=null;#s=/* @__PURE__ */ new Map;#c=null;#l=null;show(e){let t=e.tone??`info`,n=e.id??`ty-toast-${++ie}`,r=e.duration??(e.action?`persistent`:ne[t]),i={id:n,tone:t,title:e.title,message:e.message,action:e.action,duration:r,createdAt:Date.now()};this.#p(n),this.#e=this.#e.some(e=>e.id===n)?this.#e.map(e=>e.id===n?i:e):[...this.#e,i];let a=de(this.props.historyLimit)??50;return this.#t=[i,...this.#t.filter(e=>e.id!==n)].slice(0,Math.max(0,a)),ue(),this.#d(),n}success(e,t={}){return this.show({...t,title:e,tone:`success`})}error(e,t={}){return this.show({...t,title:e,tone:`error`})}warning(e,t={}){return this.show({...t,title:e,tone:`warning`})}info(e,t={}){return this.show({...t,title:e,tone:`info`})}dismiss(e){if(!this.#e.some(t=>t.id===e))return;this.#p(e);let t=!!this.#i&&this.#i.contains(document.activeElement),n=this.#u().length===1;if(this.#e=this.#e.filter(t=>t.id!==e),this.emit(`ty-toast-dismiss`,{id:e}),this.#d(),t&&n){let e=this.#c;setTimeout(()=>{e?.isConnected&&e.focus()},0)}}get history(){return this.#t}connected(){let e=v(`section`,`ty-toast-region`),t=v(`div`,`ty-toast-region__list`,{role:`alert`,"aria-live":`assertive`,"aria-atomic":`false`}),n=v(`div`,`ty-toast-region__list`,{role:`status`,"aria-live":`polite`,"aria-atomic":`false`});e.append(t,n),this.replaceChildren(e),this.#i=e,this.#a=t,this.#o=n,this.#s.clear(),e.addEventListener(`pointerenter`,this.#_),e.addEventListener(`pointerleave`,this.#v),e.addEventListener(`focusin`,this.#y),e.addEventListener(`focusout`,this.#b);let r=new AbortController;this.#l=r,document.addEventListener(`keydown`,this.#x,{signal:r.signal}),document.addEventListener(`visibilitychange`,this.#S,{signal:r.signal}),this.#d()}disconnected(){this.#l?.abort(),this.#l=null;for(let e of this.#n.values())e.handle&&clearTimeout(e.handle);this.#n.clear(),this.#r.clear(),this.#i=null,this.#a=null,this.#o=null,this.#s.clear(),this.#c=null}changed(){this.isConnected&&this.#d()}#u(){return this.#e.slice(0,Math.max(0,de(this.props.maxVisible)??3))}#d(){let e=this.#i;if(!e)return;let t=this.props;e.setAttribute(`aria-label`,String(t.regionLabel)),e.setAttribute(`data-placement`,String(t.placement));let n=String(t.dismissLabel),r=this.#u();for(let e of r)e.duration!==`persistent`&&!this.#n.has(e.id)&&this.#m(e.id,e.duration);let i=/* @__PURE__ */ new Set;for(let e of r){i.add(e.id);let t=this.#s.get(e.id);if(t&&t.record!==e){let n=t.node.contains(document.activeElement),r=this.#f(e);t.node.replaceWith(r),t={node:r,record:e},this.#s.set(e.id,t),n&&r.focus()}else t||(t={node:this.#f(e),record:e},this.#s.set(e.id,t));let r=t.node.querySelector(`.ty-toast__dismiss`);r&&(r.setAttribute(`aria-label`,n),r.setAttribute(`title`,n)),(e.tone===`error`?this.#a:this.#o).append(t.node)}for(let[e,t]of[...this.#s])i.has(e)||(t.node.remove(),this.#s.delete(e))}#f(e){let t=v(`div`,`ty-toast`,{"data-tone":e.tone,tabindex:`0`,role:`group`,"aria-labelledby":`${e.id}-title`});e.message&&t.setAttribute(`aria-describedby`,`${e.id}-message`),t.append(ae[e.tone]());let n=v(`div`,`ty-toast__body`),r=v(`p`,`ty-toast__title`,{id:`${e.id}-title`});if(r.textContent=e.title,n.append(r),e.message){let t=v(`p`,`ty-toast__message`,{id:`${e.id}-message`});t.textContent=e.message,n.append(t)}if(e.action){let t=v(`div`,`ty-toast__actions`),r=v(`button`,`ty-button`,{type:`button`,"data-variant":`secondary`,"data-size":`compact`}),i=v(`span`,`ty-button__label`);i.textContent=e.action.label,r.append(i),r.addEventListener(`click`,()=>{e.action?.onPress?.(),this.emit(`ty-toast-action`,{id:e.id}),this.dismiss(e.id)}),t.append(r),n.append(t)}let i=String(this.props.dismissLabel),a=v(`button`,`ty-button ty-toast__dismiss`,{type:`button`,"data-variant":`quiet`,"data-size":`compact`,"data-icon-only":``,"aria-label":i,title:i}),o=v(`span`,`ty-button__icon`,{"aria-hidden":`true`});o.append(oe()),a.append(o),a.addEventListener(`click`,()=>this.dismiss(e.id)),t.append(n,a),t.addEventListener(`keydown`,t=>{t.key===`Escape`&&(t.stopPropagation(),this.dismiss(e.id))});let s=null,c=0;t.addEventListener(`pointerdown`,e=>{let t=e;t.pointerType===`touch`&&(s={x:t.clientX,id:t.pointerId})}),t.addEventListener(`pointermove`,e=>{let n=e;s&&s.id===n.pointerId&&(c=Math.max(0,n.clientX-s.x),t.style.transform=c?`translateX(${c}px)`:``)});let l=()=>{s&&c>80&&this.dismiss(e.id),s=null,c=0,t.style.transform=``};return t.addEventListener(`pointerup`,l),t.addEventListener(`pointercancel`,l),t}#p(e){let t=this.#n.get(e);t?.handle&&clearTimeout(t.handle),this.#n.delete(e)}#m(e,t){let n={remaining:t,startedAt:Date.now()};this.#r.size===0&&(n.handle=setTimeout(()=>this.dismiss(e),t)),this.#n.set(e,n)}#h(e){let t=this.#r.size===0;if(this.#r.add(e),t)for(let e of this.#n.values())e.handle&&(clearTimeout(e.handle),e.handle=void 0,e.remaining=Math.max(0,e.remaining-(Date.now()-e.startedAt)))}#g(e){if(!(!this.#r.delete(e)||this.#r.size>0))for(let[e,t]of this.#n)t.startedAt=Date.now(),t.handle=setTimeout(()=>this.dismiss(e),t.remaining)}#_=()=>this.#h(`hover`);#v=()=>this.#g(`hover`);#y=e=>{this.#i?.contains(e.relatedTarget)||(e.relatedTarget instanceof HTMLElement&&(this.#c=e.relatedTarget),this.#h(`focus`))};#b=e=>{this.#i?.contains(e.relatedTarget)||this.#g(`focus`)};#x=e=>{if(e.key!==`F6`||!this.#i)return;let t=this.#i;t.contains(document.activeElement)?this.#c?.focus():t.querySelector(`.ty-toast`)&&(e.preventDefault(),this.#c=document.activeElement,t.querySelector(`.ty-toast`)?.focus())};#S=()=>{document.hidden?this.#h(`hidden`):this.#g(`hidden`)}};const pe={tag:`ty-tag-field`,name:`TyTagField`,kind:`self-rendering`,doc:'Short values typed into removable pills, optionally assisted by (or restricted to) a suggestion list. Enter or comma commits the draft (or the highlighted suggestion), Backspace on an empty entry removes the last pill; duplicates (case-insensitive), values past `max` and — with `allow-free-text="false"` — values outside `suggestions` are refused. With suggestions the entry is an APG combobox with list autocomplete (active descendant, wrap-around arrows).',props:{value:{type:`string`,attribute:`value`,doc:"JSON array of the committed values (controlled); the element asks for changes with `ty-change`, it never writes its own."},suggestions:{type:`string`,attribute:`suggestions`,doc:`JSON array of known values; turns the entry into a combobox.`},suggestionLabels:{type:`string`,attribute:`suggestion-labels`,doc:`JSON object of display text per value, used in the popup and on the pills.`},allowFreeText:{type:`string`,attribute:`allow-free-text`,doc:"`true` or `false`; unset: free text is allowed. `false`: only values present in `suggestions` are accepted (the `show-arrow` precedent for a default-true switch)."},max:{type:`number`,attribute:`max`,doc:`Maximum pills; the entry is disabled at the limit and re-enabled when one is removed.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Disables the entry and every remove control.`},tone:{type:`enum`,values:[`neutral`,`accent`],default:`neutral`,attribute:`tone`,doc:"Pill tint; `accent` fills with the theme accent."},categoryIndex:{type:`number`,attribute:`category-index`,doc:"A categorical token (1 to 8) as the pill tint, shown as a small colour square; normalised into range on upgrade, wins over `tone`."},label:{type:`string`,attribute:`label`,doc:"Visible label above the field, targeting the entry; if absent, `accessibleLabel` is required."},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name of the entry when there is no visible label.`},placeholder:{type:`string`,attribute:`placeholder`,doc:`Hint in the entry.`},helperText:{type:`string`,attribute:`helper-text`,doc:`Help text below the field, linked as the entry's description.`},errorText:{type:`string`,attribute:`error-text`,doc:`Marks the field invalid; shown below the helper text and linked as description.`},removeLabel:{type:`string`,default:`Remove {value}`,attribute:`remove-label`,doc:"Accessible name template of each remove control; `{value}` is the pill's display text."},chosenLabel:{type:`string`,default:`{field}: chosen values`,attribute:`chosen-label`,doc:"Accessible name template of the pill list; `{field}` is the label (or accessible label)."},suggestionsLabel:{type:`string`,default:`Suggestions`,attribute:`suggestions-label`,doc:`Accessible name of the suggestion popup.`},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the root (`data-testid`)."}},events:[{type:`ty-change`,kind:`custom`,detail:{value:`string`},reactProp:`onChange`,doc:"A value was added or removed; `value` is the next list as a JSON array. Controlled: the host writes it back to the `value` attribute."}],examples:[]},me=`http://www.w3.org/2000/svg`,he=(e,t)=>e.localeCompare(t,void 0,{sensitivity:`accent`})===0;function b(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function ge(){let e=document.createElementNS(me,`svg`);e.setAttribute(`class`,`ty-icon`),e.setAttribute(`viewBox`,`0 0 24 24`),e.setAttribute(`fill`,`none`),e.setAttribute(`stroke`,`currentColor`),e.setAttribute(`stroke-width`,`2`),e.setAttribute(`stroke-linecap`,`round`),e.setAttribute(`stroke-linejoin`,`round`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`focusable`,`false`);for(let t of[`M18 6 6 18`,`m6 6 12 12`]){let n=document.createElementNS(me,`path`);n.setAttribute(`d`,t),e.append(n)}return e}var _e=class extends s{static definition=pe;validate;#e=``;#t=!1;#n=null;#r=``;#i=``;#a=null;#o=null;#s=null;#c=null;#l=null;#u=null;#d=null;#f=null;#p=null;get field(){return this.#l}#m(e,t){if(typeof e!=`string`||e===``)return t;try{return JSON.parse(e)??t}catch{return t}}held(){let e=this.#m(this.props.value,[]);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}#h(){let e=this.#m(this.props.suggestions,[]);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}#g(){let e=this.#m(this.props.suggestionLabels,{});return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`))}#_(){return String(this.props.allowFreeText??`true`)!==`false`}#v(){return!!this.props.disabled}#y(e){let t=this.props.max;return t!==void 0&&e.length>=Number(t)}#b(){let e=this.held(),t=this.#g(),n=this.#e.trim().toLocaleLowerCase();return this.#h().flatMap(r=>{if(e.some(e=>he(e,r)))return[];let i=t[r]??r;return!n||r.toLocaleLowerCase().includes(n)||i.toLocaleLowerCase().includes(n)?[{id:r,text:i}]:[]})}#x(e){let t=e.trim();if(t===``)return null;let n=this.validate?this.validate(t):t;if(!n)return null;let r=this.held();if(r.some(e=>he(e,n))||this.#y(r))return null;let i=this.#h();return i.length>0&&!this.#_()&&!i.includes(n)?null:n}#S(){let e=this.instanceId;this.#o=b(`label`,`ty-tag-field__caption`),this.#s=b(`div`,`ty-tag-field__well`);let t=b(`span`,`ty-tag-field__chips`);this.#c=b(`span`,`ty-tag-field__chip-list`,{role:`list`}),t.append(this.#c),this.#l=b(`input`,`ty-tag-field__typing`,{id:`${e}-input`,type:`text`,autocomplete:`off`});let n=b(`span`,`ty-tag-field__typing-host`);n.append(this.#l),this.#s.append(t,n),this.#d=b(`ul`,`ty-tag-field__menu`,{id:`${e}-listbox`,role:`listbox`}),this.#u=b(`div`,`ty-tag-field__menu-layer`,{hidden:``}),this.#u.append(this.#d);let r=b(`div`,`ty-tag-field__frame`);r.append(this.#s,this.#u),this.#f=b(`p`,`ty-tag-field__note`,{id:`${e}-note`,hidden:``}),this.#p=b(`p`,`ty-tag-field__fault`,{id:`${e}-fault`,hidden:``}),this.#a=b(`div`,`ty-tag-field`),this.#a.append(this.#o,r,this.#f,this.#p),this.replaceChildren(this.#a)}#C(){this.#N();let{props:e}=this,t=this.#a,n=this.#l;if(!t||!n||!this.#o||!this.#s||!this.#c||!this.#u||!this.#d||!this.#f||!this.#p)return;let r=this.instanceId,i=this.held(),a=this.#g(),o=e=>a[e]??e,s=this.#v(),c=this.#y(i),l=this.#h().length>0,u=e.errorText?String(e.errorText):``,d=e.helperText?String(e.helperText):``,f=e.label?String(e.label):``,p=e.categoryIndex!==void 0&&Number.isFinite(Number(e.categoryIndex))?Number(e.categoryIndex):void 0;t.setAttribute(`data-tone`,p===void 0?String(e.tone):`category`),t.style.setProperty(`--ty-tag-field-tint`,p===void 0?``:`var(--ty-categorical-${p})`),t.toggleAttribute(`data-invalid`,!!u),e.testId?t.setAttribute(`data-testid`,String(e.testId)):t.removeAttribute(`data-testid`),this.#o.hidden=!f,this.#o.textContent=f,this.#o.htmlFor=`${r}-input`,this.#s.toggleAttribute(`data-disabled`,s),n.id=`${r}-input`,n.placeholder=e.placeholder?String(e.placeholder):``,n.disabled=s||c,u?n.setAttribute(`aria-invalid`,`true`):n.removeAttribute(`aria-invalid`),!f&&e.accessibleLabel?n.setAttribute(`aria-label`,String(e.accessibleLabel)):n.removeAttribute(`aria-label`),n.setAttribute(`aria-describedby`,[d&&`${r}-note`,u&&`${r}-fault`].filter(Boolean).join(` `)||``),n.getAttribute(`aria-describedby`)||n.removeAttribute(`aria-describedby`);let m=this.#b(),h=l&&this.#t&&m.length>0;if(l)n.setAttribute(`role`,`combobox`),n.setAttribute(`aria-expanded`,h?`true`:`false`),n.setAttribute(`aria-controls`,`${r}-listbox`),n.setAttribute(`aria-autocomplete`,`list`),h&&this.#n!==null&&m[this.#n]?n.setAttribute(`aria-activedescendant`,`${r}-option-${this.#n}`):n.removeAttribute(`aria-activedescendant`);else for(let e of[`role`,`aria-expanded`,`aria-controls`,`aria-autocomplete`,`aria-activedescendant`])n.removeAttribute(e);this.#f.hidden=!d,this.#f.textContent=d,this.#f.id=`${r}-note`,this.#p.hidden=!u,this.#p.textContent=u,this.#p.id=`${r}-fault`,this.#d.id=`${r}-listbox`,this.#d.setAttribute(`aria-label`,String(e.suggestionsLabel));let g=JSON.stringify([i,a,s,e.removeLabel,e.chosenLabel,f,e.accessibleLabel,r]);if(g!==this.#r){this.#r=g;let t=f||String(e.accessibleLabel??``),n=String(e.chosenLabel).replaceAll(`{field}`,t);this.#c.setAttribute(`aria-label`,t?n:n.replace(/^:\s*/,``));let r=String(e.removeLabel);this.#c.replaceChildren(...i.map(e=>{let t=b(`span`,`ty-tag-field__chip`,{role:`listitem`}),n=b(`span`,`ty-tag-field__chip-text`);n.textContent=o(e);let i=b(`button`,`ty-tag-field__drop`,{type:`button`,"aria-label":r.replaceAll(`{value}`,o(e)),"data-value":e});return i.disabled=s,i.append(ge()),t.append(n,i),t}))}let _=h?JSON.stringify([m,r]):``;_!==this.#i&&(this.#i=_,this.#d.replaceChildren(...h?m.map(e=>{let t=b(`li`,`ty-tag-field__choice`,{role:`option`,"data-value":e.id});return t.textContent=e.text,t}):[])),Array.from(this.#d.children).forEach((e,t)=>{let n=e;n.id||=`${r}-option-${t}`,n.setAttribute(`aria-selected`,this.#n===t?`true`:`false`),n.toggleAttribute(`data-focused`,this.#n===t)}),this.#u.hidden=!h}#w(e){this.emit(`ty-change`,{value:JSON.stringify(e)})}#T(e){let t=this.#x(e);t!==null&&(this.#w([...this.held(),t]),this.#e=``,this.#l&&(this.#l.value=``),this.#t=!1,this.#n=null,this.#C())}#E(e){if(this.#v())return;let t=this.held();t.includes(e)&&(this.#w(t.filter(t=>t!==e)),this.#l?.focus())}#D=e=>{if(e.target!==this.#l||this.#v())return;let t=this.#l,n=this.#b();switch(e.key){case`Enter`:case`,`:{e.preventDefault();let r=this.#t&&this.#n!==null?n[this.#n]:void 0;this.#T(r?r.id:t.value);return}case`Backspace`:{if(t.value!==``)return;let n=this.held();if(!n.length)return;e.preventDefault(),this.#w(n.slice(0,-1));return}case`ArrowDown`:case`ArrowUp`:{if(!this.#h().length||!n.length)return;e.preventDefault();let t=n.length;this.#n=e.key===`ArrowDown`?this.#n===null?0:(this.#n+1)%t:this.#n===null||this.#n===0?t-1:this.#n-1,this.#t=!0,this.#C();let r=this.#d?.children[this.#n];typeof r?.scrollIntoView==`function`&&r.scrollIntoView({block:`nearest`});return}case`Escape`:if(!this.#t)return;e.preventDefault(),this.#t=!1,this.#n=null,this.#C()}};#O=e=>{e.target===this.#l&&(this.#e=this.#l.value,this.#h().length&&(this.#t=!0),this.#n=this.#b().length?0:null,this.#C())};#k=e=>{e.target===this.#l&&this.#h().length&&(this.#t=!0,this.#n=this.#n??(this.#b().length?0:null),this.#C())};#A=e=>{let t=e.relatedTarget;t&&this.contains(t)||this.#t&&(this.#t=!1,this.#n=null,this.#C())};#j=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-tag-field__drop`);n&&this.contains(n)&&!n.disabled&&this.#E(n.getAttribute(`data-value`)??``),this.#l&&this.#h().length&&t.closest(`.ty-tag-field__well`)&&!this.#t&&(this.#t=!0,this.#n=this.#n??(this.#b().length?0:null),this.#C())};#M=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-tag-field__choice`);n&&this.contains(n)&&(e.preventDefault(),this.#T(n.getAttribute(`data-value`)??``))};connected(){this.#S(),this.#C(),this.addEventListener(`keydown`,this.#D),this.addEventListener(`input`,this.#O),this.addEventListener(`focusin`,this.#k),this.addEventListener(`focusout`,this.#A),this.addEventListener(`click`,this.#j),this.addEventListener(`mousedown`,this.#M)}disconnected(){this.removeEventListener(`keydown`,this.#D),this.removeEventListener(`input`,this.#O),this.removeEventListener(`focusin`,this.#k),this.removeEventListener(`focusout`,this.#A),this.removeEventListener(`click`,this.#j),this.removeEventListener(`mousedown`,this.#M)}changed(){this.isConnected&&this.#a&&(this.#N(),this.#C())}#N(){let e=this.getAttribute(`category-index`);if(e===null)return;let t=Number(e);if(!Number.isFinite(t)){this.removeAttribute(`category-index`);return}let n=String((Math.max(1,Math.round(t))-1)%8+1);n!==e&&this.setAttribute(`category-index`,n)}};const ve={tag:`ty-tabs`,name:`TyTabs`,kind:`enhancing`,doc:"Sibling views of one object, one panel at a time (the APG tabs pattern). The tab list is one tab stop: the arrow keys move along the `orientation` axis, wrapping and skipping disabled tabs, Home and End jump, and Left/Right follow the reading direction. `activation` decides whether moving focus also selects. Selection is controlled with `selected-key` or uncontrolled from `default-selected-key` (the first enabled tab when neither is set); a different selection is reported with `ty-selection-change`.",props:{selectedKey:{type:`string`,attribute:`selected-key`,doc:"Controlled selection: the selected tab's id. The element asks for a change with `ty-selection-change`; the host flips the attribute."},defaultSelectedKey:{type:`string`,attribute:`default-selected-key`,doc:`Initial selection of an uncontrolled list; the first enabled tab when unset.`},orientation:{type:`enum`,values:[`horizontal`,`vertical`],default:`horizontal`,attribute:`orientation`,doc:`Layout of the list and the arrow-key axis: Left/Right (following the reading direction), or Up/Down when vertical.`},activation:{type:`enum`,values:[`automatic`,`manual`],default:`automatic`,attribute:`activation`,doc:`Automatic selects on focus; manual needs Enter or Space on the focused tab.`},label:{type:`string`,attribute:`label`,doc:`Accessible name of the tab list (required).`},tabs:{type:`string`,attribute:`tabs`,doc:`JSON array of the tabs: [{ "id", "label", "count"?, "disabled"? }]. The count follows the label and joins the accessible name; a disabled tab cannot be selected and the arrow keys skip it. (The React component's decorative icon has no attribute form.)`},keepMounted:{type:`boolean`,attribute:`keep-mounted`,doc:`Keep inactive panels in the DOM (hidden) to preserve their state. The element always keeps them — their nodes belong to the host — so the attribute only tells a wrapper it may unmount.`}},events:[{type:`ty-selection-change`,kind:`custom`,detail:{key:`string`},reactProp:`onSelectionChange`,doc:"A different tab was selected (a click, or the keyboard per `activation`). Uncontrolled, the element has already applied it; controlled (`selected-key`), the host flips the attribute."}],slots:{default:{doc:"The panels: one element per tab, keyed by `data-panel` (the tab's id). The element wires the role, id, `aria-labelledby` and visibility; only the selected panel shows."}},anatomy:{tag:`div`,class:`ty-tabs`,attrs:{"data-orientation":{prop:`orientation`}},children:[{tag:`div`,class:`ty-tabs__list`,attrs:{role:{value:`tablist`},"aria-label":{prop:`label`},"aria-orientation":{prop:`orientation`},"data-orientation":{prop:`orientation`}}},{slot:`default`}]},examples:[{name:`horizontal`,props:{label:`Run sections`},slots:{}},{name:`vertical`,props:{label:`Run sections`,orientation:`vertical`},slots:{}},{name:`manual`,props:{label:`Run sections`,activation:`manual`},slots:{}}]},ye=e=>e.replace(/[^a-zA-Z0-9_-]/g,`-`),be=/* @__PURE__ */ new WeakMap;var xe=class extends s{static definition=ve;#e;#t;#n=null;connected(){this.addEventListener(`click`,this.#p),this.addEventListener(`keydown`,this.#m),this.addEventListener(`focusin`,this.#h),this.addEventListener(`focusout`,this.#g),this.#n=new MutationObserver(()=>this.#i()),this.#n.observe(this,{childList:!0,subtree:!0})}disconnected(){this.removeEventListener(`click`,this.#p),this.removeEventListener(`keydown`,this.#m),this.removeEventListener(`focusin`,this.#h),this.removeEventListener(`focusout`,this.#g),this.#n?.disconnect(),this.#n=null}sync(){let e=document.activeElement,t=e instanceof HTMLElement?this.#l(e):void 0;super.sync(),this.#i(),t&&!this.contains(document.activeElement)&&this.#c(t)?.focus()}#r(){let e=this.getAttribute(`tabs`);if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))throw Error(`not an array`);let n=[];for(let e of t){if(typeof e!=`object`||!e)continue;let{id:t,label:r,count:i,disabled:a}=e;typeof t==`string`&&t&&typeof r==`string`&&n.push({id:t,label:r,count:typeof i==`number`?i:void 0,disabled:a===!0})}return n}catch{return console.warn("ty-tabs: `tabs` must be a JSON array of { id, label, count?, disabled? }."),[]}}#i(){let e=this.anatomyRoot();if(!e)return;let t=e.querySelector(`.ty-tabs__list`);if(!(t instanceof HTMLElement))return;let n=this.props,r=this.#r(),i=this.hasAttribute(`selected-key`);if(!i&&this.#e===void 0){let e=n.defaultSelectedKey?String(n.defaultSelectedKey):void 0;this.#e=e&&r.some(t=>t.id===e)?e:r.find(e=>!e.disabled)?.id}let a=i&&n.selectedKey!==void 0?String(n.selectedKey):this.#e;a!==void 0&&!r.some(e=>e.id===a)&&(a=r.find(e=>!e.disabled)?.id,i||(this.#e=a)),this.#a(t,r);let o=this.#s(t),s=this.#t??a,c=r.some(e=>e.id===s&&!e.disabled)?s:a;for(let e of o){let t=e.dataset.tabKey,n=r.find(e=>e.id===t);e.setAttribute(`aria-selected`,t===a?`true`:`false`),e.toggleAttribute(`data-selected`,t===a),e.disabled=n.disabled===!0,e.toggleAttribute(`data-disabled`,n.disabled===!0),e.tabIndex=t===c&&n.disabled!==!0?0:-1}let l=/* @__PURE__ */ new Map;for(let t of Array.from(e.children))t instanceof HTMLElement&&t.hasAttribute(`data-panel`)&&l.set(t.getAttribute(`data-panel`),t);for(let[e,t]of l){t.classList.add(`ty-tabs__panel`),t.setAttribute(`role`,`tabpanel`),t.id||=`${this.instanceId}-panel-${ye(e)}`;let n=o.find(t=>t.dataset.tabKey===e);n&&(t.setAttribute(`aria-labelledby`,n.id),n.setAttribute(`aria-controls`,t.id));let r=e===a;t.hidden=!r,t.toggleAttribute(`data-inert`,!r),r?t.setAttribute(`tabindex`,`0`):t.removeAttribute(`tabindex`)}for(let e of o)l.has(e.dataset.tabKey)||e.removeAttribute(`aria-controls`)}#a(e,t){let n=/* @__PURE__ */ new Map;for(let t of Array.from(e.children))t instanceof HTMLButtonElement&&t.dataset.tabKey!==void 0&&n.set(t.dataset.tabKey,t);let r=[];for(let e of t){let t=n.get(e.id);t||(t=document.createElement(`button`),t.type=`button`,t.className=`ty-tabs__tab`,t.setAttribute(`role`,`tab`),t.dataset.tabKey=e.id),n.delete(e.id),t.id=`${this.instanceId}-tab-${ye(e.id)}`,this.#o(t,e),r.push(t)}for(let e of n.values())e.remove();r.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)})}#o(e,t){let n=typeof t.count==`number`,r=`${t.label} ${n?t.count:``}`;if(be.get(e)===r)return;be.set(e,r);let i=document.createElement(`span`);if(i.className=`ty-tabs__label`,i.textContent=t.label,!n){e.replaceChildren(i);return}let a=document.createElement(`span`);a.className=`ty-tabs__count`,a.textContent=String(t.count),e.replaceChildren(i,document.createTextNode(` `),a)}#s(e){let t=e??this.anatomyRoot()?.querySelector(`.ty-tabs__list`);return t instanceof HTMLElement?Array.from(t.children).filter(e=>e instanceof HTMLButtonElement&&e.dataset.tabKey!==void 0):[]}#c(e){return this.#s().find(t=>t.dataset.tabKey===e)}#l(e){let t=e?.closest(`.ty-tabs__tab`);return t instanceof HTMLElement&&this.contains(t)?t.dataset.tabKey:void 0}#u(){let e=this;for(;e;){let t=e.getAttribute(`dir`);if(t)return t.toLowerCase()===`rtl`;e=e.parentElement}return getComputedStyle(this).direction===`rtl`}#d(e){let t=this.#r().find(t=>t.id===e);if(t&&!t.disabled&&e!==(this.hasAttribute(`selected-key`)?String(this.props.selectedKey??``):this.#e)){if(this.hasAttribute(`selected-key`)){this.emit(`ty-selection-change`,{key:e});return}this.#e=e,this.#i(),this.emit(`ty-selection-change`,{key:e})}}#f(e){this.#t=e,this.#i();let t=this.#c(e);t?.focus(),t?.scrollIntoView?.({block:`nearest`,inline:`nearest`})}#p=e=>{let t=this.#l(e.target);t&&this.#d(t)};#m=e=>{let t=this.anatomyRoot()?.querySelector(`.ty-tabs__list`);if(!(t instanceof HTMLElement)||!t.contains(e.target))return;let n=String(this.props.orientation)===`vertical`,r=this.#u(),i=null;switch(e.key){case`ArrowRight`:n||(i=r?-1:1);break;case`ArrowLeft`:n||(i=r?1:-1);break;case`ArrowDown`:n&&(i=1);break;case`ArrowUp`:n&&(i=-1);break;case`Home`:i=`home`;break;case`End`:i=`end`;break;default:return}if(i===null)return;e.preventDefault();let a=this.#r().filter(e=>!e.disabled);if(!a.length)return;let o=this.#l(document.activeElement)??this.#e,s=Math.max(0,a.findIndex(e=>e.id===o)),c=i===`home`?a[0]:i===`end`?a[a.length-1]:a[(s+i+a.length)%a.length];this.#f(c.id),String(this.props.activation)===`automatic`&&this.#d(c.id)};#h=e=>{let t=this.#l(e.target);t&&t!==this.#t&&(this.#t=t,this.#i())};#g=e=>{let t=e.relatedTarget,n=this.anatomyRoot()?.querySelector(`.ty-tabs__list`);t&&n instanceof HTMLElement&&n.contains(t)||this.#t!==void 0&&(this.#t=void 0,this.#i())}};const Se={tag:`ty-skip-link`,name:`TySkipLink`,kind:`enhancing`,doc:"First focusable element of the page: jumps past the navigation straight to the main content (WCAG 2.4.1 Bypass Blocks). A native anchor to the target's fragment, visually hidden until focused — never `display: none`, so it stays in the accessibility tree. On activation the element moves focus to the target (a temporary negative tabindex when the target is not natively focusable) and scrolls it clear of the sticky top bar.",props:{targetId:{type:`string`,default:`main-content`,attribute:`target-id`,doc:"Id of the main content element; the anchor's href is its fragment (`#main-content`)."},label:{type:`string`,default:`Skip to main content`,attribute:`label`,doc:`Link text (the I18n adapter's default); translate through this attribute.`}},events:[{type:`click`,kind:`native`,reactProp:`onClick`,doc:`The native click of the anchor, before the focus move.`}],anatomy:{tag:`a`,class:`ty-skip-link`,attrs:{},children:[{text:{prop:`label`}}]},examples:[{name:`default`,props:{},slots:{}},{name:`translated`,props:{targetId:`conteudo`,label:`Ir para o conteúdo`},slots:{}}]};var Ce=class extends s{static definition=Se;#e=!1;sync(){super.sync(),this.#e&&this.#t()}connected(){this.addEventListener(`click`,this.#n),requestAnimationFrame(()=>{this.isConnected&&(this.#e=!0,this.#t())})}disconnected(){this.removeEventListener(`click`,this.#n)}#t(){let e=this.querySelector(`a`),t=`#${String(this.props.targetId)}`;e&&e.getAttribute(`href`)!==t&&e.setAttribute(`href`,t)}#n=e=>{let t=e.target,n=t&&typeof t.closest==`function`?t.closest(`a`):null;if(!n||!this.contains(n))return;let r=String(this.props.targetId);we(r)&&(e.preventDefault(),typeof history<`u`&&history.replaceState&&history.replaceState(history.state,``,`#${r}`))}};function we(e){let t=document.getElementById(e);return t?(!t.hasAttribute(`tabindex`)&&t.tabIndex<0&&(t.setAttribute(`tabindex`,`-1`),t.addEventListener(`blur`,()=>t.removeAttribute(`tabindex`),{once:!0})),t.focus({preventScroll:!0}),t.scrollIntoView?.({block:`start`}),!0):!1}const Te={tag:`ty-segmented-control`,name:`TySegmentedControl`,kind:`enhancing`,doc:"Exactly one of a small set (two to five) of mutually exclusive options, changed in place — a radio group painted as segments. The segments are composed by the element from `options` (JSON); selecting the selected segment again does nothing. With `value` the control is controlled (the host answers `ty-change`); without it the element keeps the selection and mirrors it into the `value` attribute.",props:{options:{type:`string`,attribute:`options`,doc:'The segments as a JSON array of `string` (both value and label) or `{ "value", "label", "icon"? }`; `icon` is the `d` of a 24×24 stroke path (lucide style).'},value:{type:`string`,attribute:`value`,doc:`The selected value (controlled). Unset, the element keeps the selection itself and mirrors it here.`},defaultValue:{type:`string`,attribute:`default-value`,doc:`The initially selected value when uncontrolled; the first option when unset.`},label:{type:`string`,attribute:`label`,doc:`Accessible name of the group (required).`},size:{type:`enum`,values:[`compact`,`regular`,`large`],default:`regular`,attribute:`size`,doc:`Visible height; the hit area stays at least 44 px on every size.`},fullWidth:{type:`boolean`,attribute:`full-width`,doc:`The segments share the available width equally; labels truncate with the full label as the accessible name.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`The whole control disabled; the group is exposed as disabled and nothing selects.`},iconOnly:{type:`boolean`,attribute:`icon-only`,doc:`Hide the labels visually; each label stays the segment's accessible name.`}},events:[{type:`ty-change`,kind:`custom`,detail:{value:`string`},reactProp:`onChange`,doc:"The selection changed; `value` is the new value. Only real changes fire it — re-selecting the selected segment does nothing."}],anatomy:{tag:`div`,class:`ty-segmented-control`,attrs:{role:{value:`radiogroup`},"aria-label":{prop:`label`},"aria-disabled":{prop:`disabled`,kind:`bool`},"data-size":{prop:`size`},"data-full-width":{prop:`fullWidth`,kind:`flag`},"data-icon-only":{prop:`iconOnly`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`}},children:[]},examples:[{name:`period-week`,props:{label:`Period`,options:`["Day","Week","Month"]`,value:`Week`},slots:{}},{name:`objects-compact`,props:{label:`View`,size:`compact`,defaultValue:`chart`,options:`[{"value":"table","label":"Table"},{"value":"chart","label":"Chart"}]`},slots:{}},{name:`full-width-large`,props:{label:`Mode`,size:`large`,fullWidth:!0,options:`["Preview","Code"]`},slots:{}},{name:`disabled`,props:{label:`Period`,disabled:!0,value:`Day`,options:`["Day","Week"]`},slots:{}},{name:`icon-only`,props:{label:`Layout`,iconOnly:!0,value:`grid`,options:`[{"value":"list","label":"List","icon":"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"},{"value":"grid","label":"Grid","icon":"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z"}]`},slots:{}}]},Ee=`http://www.w3.org/2000/svg`;var De=class extends s{static definition=Te;#e=!1;sync(){let e=document.activeElement,t=e instanceof HTMLElement&&this.contains(e)?e.getAttribute(`data-value`):null;if(super.sync(),this.#c(),t!==null){let e=document.activeElement;e instanceof Element&&e.closest(`.ty-segmented-control__segment`)!==null||this.#r(t)?.focus()}}connected(){this.#e=this.hasAttribute(`value`),this.addEventListener(`click`,this.#a),this.addEventListener(`keydown`,this.#o)}disconnected(){this.removeEventListener(`click`,this.#a),this.removeEventListener(`keydown`,this.#o)}#t(){let e=this.getAttribute(`options`);if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))throw Error(`not an array`);return t.flatMap(e=>{if(typeof e==`string`)return e?[{value:e,label:e}]:[];if(e&&typeof e==`object`){let{value:t,label:n,icon:r}=e;if(typeof t==`string`&&t&&typeof n==`string`)return[{value:t,label:n,...typeof r==`string`?{icon:r}:{}}]}return[]})}catch{return console.warn(`<ty-segmented-control>: options must be a JSON array of strings or { "value", "label", "icon"? } objects.`),[]}}#n(e){return this.getAttribute(`value`)??this.getAttribute(`default-value`)??e[0]?.value??``}#r(e){return this.querySelector(`.ty-segmented-control__segment[data-value="${CSS.escape(e)}"]`)}#i(e,t=!1){if(this.hasAttribute(`disabled`))return;let n=this.#t();if(n.some(t=>t.value===e)){if(e!==this.#n(n)){try{navigator.vibrate?.(8)}catch{}this.#e||this.setAttribute(`value`,e),this.emit(`ty-change`,{value:e})}t&&this.#r(e)?.focus()}}#a=e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`.ty-segmented-control__segment`);if(!t||!this.contains(t))return;let n=t.getAttribute(`data-value`);n!==null&&this.#i(n)};#o=e=>{if(this.hasAttribute(`disabled`)||!(e.target instanceof Element)||!e.target.closest(`.ty-segmented-control__segment`))return;let t=this.#t();if(!t.length)return;let n=this.#s(),r=null;switch(e.key){case`ArrowRight`:r=n?-1:1;break;case`ArrowLeft`:r=n?1:-1;break;case`ArrowDown`:r=1;break;case`ArrowUp`:r=-1}let i=this.#n(t),a=Math.max(0,t.findIndex(e=>e.value===i)),o;if(e.key===`Home`)o=0;else if(e.key===`End`)o=t.length-1;else if(r!==null)o=(a+r+t.length)%t.length;else return;e.preventDefault(),this.#i(t[o].value,!0)};#s(){let e=this.closest(`[dir]`)?.getAttribute(`dir`)??document.documentElement.getAttribute(`dir`);return e?e.toLowerCase()===`rtl`:getComputedStyle(this).direction===`rtl`}#c(){let e=this.anatomyRoot();if(!e)return;let t=this.#t(),n=this.#n(t),r=this.hasAttribute(`disabled`),i=this.hasAttribute(`icon-only`),a=this.hasAttribute(`full-width`),o=/* @__PURE__ */ new Set,s=[];for(let c of t){let t=Array.from(e.children).find(e=>!o.has(e)&&e.getAttribute(`data-value`)===c.value),l=t instanceof HTMLElement?t:this.#l();o.add(l),this.#u(l,c,n===c.value,r,i,a),s.push(l)}for(s.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)});e.children.length>s.length;)e.lastElementChild.remove()}#l(){let e=document.createElement(`button`);return e.type=`button`,e.setAttribute(`role`,`radio`),e.className=`ty-segmented-control__segment`,e}#u(e,t,n,r,i,a){e.setAttribute(`data-value`,t.value),e.setAttribute(`aria-checked`,String(n)),e.toggleAttribute(`data-selected`,n),r?(e.setAttribute(`disabled`,``),e.setAttribute(`data-disabled`,``),e.tabIndex=-1):(e.removeAttribute(`disabled`),e.removeAttribute(`data-disabled`),e.tabIndex=n?0:-1),a?e.setAttribute(`title`,t.label):e.removeAttribute(`title`),i?e.setAttribute(`aria-label`,t.label):e.removeAttribute(`aria-label`);let o=e.querySelector(`:scope > svg.ty-icon`);if(t.icon){o||(o=document.createElementNS(Ee,`svg`),o.setAttribute(`class`,`ty-icon`),o.setAttribute(`viewBox`,`0 0 24 24`),o.setAttribute(`fill`,`none`),o.setAttribute(`stroke`,`currentColor`),o.setAttribute(`stroke-width`,`2`),o.setAttribute(`stroke-linecap`,`round`),o.setAttribute(`stroke-linejoin`,`round`),o.setAttribute(`aria-hidden`,`true`),o.setAttribute(`focusable`,`false`),o.append(document.createElementNS(Ee,`path`)),e.prepend(o));let n=o.querySelector(`path`);n.getAttribute(`d`)!==t.icon&&n.setAttribute(`d`,t.icon)}else o?.remove();let s=e.querySelector(`:scope > span`);s||(s=document.createElement(`span`),e.append(s));let c=i?`ty-visually-hidden`:`ty-segmented-control__label`;s.getAttribute(`class`)!==c&&s.setAttribute(`class`,c),s.textContent!==t.label&&(s.textContent=t.label)}};const Oe={tag:`ty-section-heading`,name:`TySectionHeading`,kind:`enhancing`,doc:"Heads a section inside a page or a sheet: the title at the section level (h2 by default, h3 or h4 inside a sheet), an optional subtitle line (plain meta text, not a heading), an optional decorative leading icon, and a `trailing` slot for the section's own actions, a count, a toggle or a link. The title wraps by default; `truncate` clips it to one line with the full text as a tooltip. The heading id (`heading-id`, generated otherwise) lets the enclosing section name itself with `aria-labelledby`.",props:{title:{type:`string`,attribute:`title`,doc:"Section name; the heading text, and the tooltip when `truncate` clips it."},level:{type:`enum`,values:[`2`,`3`,`4`],default:`2`,attribute:`level`,doc:`Heading level (2, 3 or 4, as its attribute spelling); level 2 uses the h2 step, 3 and 4 the h3 step (§2.2).`},subtitle:{type:`string`,attribute:`subtitle`,doc:`Supporting line under the title; plain meta text in reading order, not a heading.`},truncate:{type:`boolean`,attribute:`truncate`,doc:`Clip the title to one line with an ellipsis; the full text stays accessible and becomes the tooltip. Wraps by default.`},headingId:{type:`string`,attribute:`heading-id`,doc:"Id of the heading element, so the enclosing section can be a region labelled by it; `<instance>-heading` when unset."}},events:[],slots:{icon:{doc:"A decorative leading icon (`aria-hidden`)."},trailing:{doc:`Section actions, a count, a toggle or a link; follows the title in DOM order and wraps under it when it does not fit.`},default:{doc:`Extra content under the heading row.`}},anatomy:{tag:`div`,class:`ty-section-heading`,attrs:{"data-level":{prop:`level`}},children:[{tag:`div`,class:`ty-section-heading__row`,children:[{tag:`span`,class:`ty-section-heading__icon`,when:[`slot:icon`],attrs:{"aria-hidden":{value:`true`}},children:[{slot:`icon`}]},{tag:`div`,class:`ty-section-heading__text`,children:[...[2,3,4].map(e=>({tag:`h${e}`,class:`ty-section-heading__title`,when:[`level:${e}`],attrs:{id:{idref:`heading`,prop:`headingId`},"data-truncate":{prop:`truncate`,kind:`flag`},title:{prop:`title`,when:[`truncate`]}},children:[{text:{prop:`title`}}]})),{tag:`p`,class:`ty-section-heading__subtitle`,when:[`subtitle`],children:[{text:{prop:`subtitle`}}]}]},{tag:`div`,class:`ty-section-heading__trailing`,when:[`slot:trailing`],children:[{slot:`trailing`}]}]},{tag:`div`,class:`ty-section-heading__extra`,when:[`slot:default`],children:[{slot:`default`}]}]},examples:[{name:`title`,props:{title:`Members`},slots:{}},{name:`level-3-subtitle`,props:{title:`API keys`,level:`3`,subtitle:`Keys of every integration`},slots:{}},{name:`icon-trailing`,props:{title:`Webhooks`},slots:{icon:`⚡`,trailing:`Add`}},{name:`truncate`,props:{title:`A section name that runs well past the width of its container`,truncate:!0},slots:{}},{name:`extra`,props:{title:`Filters`},slots:{trailing:`Clear all`,default:`Status: active`}}]};var ke=class extends s{static definition=Oe};const Ae={tag:`ty-progress-bar`,name:`TyProgressBar`,kind:`enhancing`,doc:'Determinate or indeterminate task progress (upload, batch run, profile completion). Not focusable; the host announces completion through a Toast or status message, not through the bar. Values outside the range are clamped on upgrade; the fill width changes with `--ty-dur-quick`, instantly under reduced motion, where the indeterminate sweep becomes a static partial fill with the label still stating "in progress".',props:{value:{type:`number`,default:0,attribute:`value`,doc:`Current value; clamped into the range on upgrade.`},minValue:{type:`number`,default:0,attribute:`min-value`,doc:`Start of the range.`},maxValue:{type:`number`,default:100,attribute:`max-value`,doc:`End of the range; reaching it is the complete state.`},label:{type:`string`,attribute:`label`,doc:"Visible and accessible name (required unless `accessibleLabel` is given)."},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:"Accessible name when there is no visible label (`aria-label`)."},valueLabel:{type:`string`,attribute:`value-label`,doc:`Custom value text, such as "3 of 8 steps"; the computed percentage when unset.`},showValue:{type:`string`,attribute:`show-value`,doc:'`true` or `false`; unset: the value text shows. An indeterminate bar always shows its "in progress" text.'},indeterminate:{type:`boolean`,attribute:`indeterminate`,doc:'Unknown progress: no `aria-valuenow` and no percentage, the value text states "in progress".'},inProgressLabel:{type:`string`,default:`In progress`,attribute:`in-progress-label`,doc:`Value text of an indeterminate bar; translate through this attribute.`},tone:{type:`enum`,values:[`accent`,`success`,`warning`,`danger`],default:`accent`,attribute:`tone`,doc:`Semantic tone of the fill; never the only signal (pair with value text or a status word).`},size:{type:`enum`,values:[`thin`,`regular`],default:`regular`,attribute:`size`,doc:`Track thickness.`}},events:[],anatomy:{tag:`div`,class:`ty-progress`,attrs:{role:{value:`progressbar`},"aria-labelledby":{idref:`label`,when:[`label`]},"aria-label":{prop:`accessibleLabel`,when:[`!label`]},"aria-valuemin":{prop:`minValue`},"aria-valuemax":{prop:`maxValue`},"aria-valuenow":{prop:`value`,when:[`!indeterminate`]},"aria-valuetext":{prop:`valueLabel`,when:[`!indeterminate`]},"data-tone":{prop:`tone`},"data-size":{prop:`size`},"data-indeterminate":{prop:`indeterminate`,kind:`flag`}},children:[{tag:`div`,class:`ty-progress__header`,when:[`label|indeterminate|!showValue:false`],children:[{tag:`span`,class:`ty-progress__label`,when:[`label`],attrs:{id:{idref:`label`}},children:[{text:{prop:`label`}}]},{tag:`span`,class:`ty-progress__value`,when:[`indeterminate|!showValue:false`]}]},{tag:`div`,class:`ty-progress__track`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`div`,class:`ty-progress__fill`}]}]},examples:[{name:`determinate`,props:{value:40,label:`Upload`},slots:{}},{name:`custom-value-label`,props:{value:3,maxValue:8,valueLabel:`3 of 8 steps`,label:`Setup`},slots:{}},{name:`indeterminate`,props:{indeterminate:!0,label:`Import`},slots:{}},{name:`complete-success-thin`,props:{value:100,label:`Upload`,tone:`success`,size:`thin`},slots:{}},{name:`unlabelled-hidden-value`,props:{value:20,accessibleLabel:`Storage used`,showValue:`false`},slots:{}}]};var je=class extends s{static definition=Ae;#e=!1;sync(){super.sync(),this.#e&&this.#t()}connected(){requestAnimationFrame(()=>{this.isConnected&&(this.#e=!0,this.#t())})}#t(){let e=this.anatomyRoot();if(!e)return;let t=this.props,n=!!t.indeterminate,r=Number(t.minValue??0),i=Number(t.maxValue??100),a=Math.min(Math.max(Number(t.value??0),r),i),o=i-r,s=o>0?Math.round((a-r)/o*100):100;if(n)e.removeAttribute(`aria-valuenow`);else{let n=String(a);e.getAttribute(`aria-valuenow`)!==n&&e.setAttribute(`aria-valuenow`,n);let r=t.valueLabel!==void 0&&t.valueLabel!==``?String(t.valueLabel):`${s}%`;e.getAttribute(`aria-valuetext`)!==r&&e.setAttribute(`aria-valuetext`,r)}e.toggleAttribute(`data-complete`,!n&&a>=i);let c=e.querySelector(`.ty-progress__value`);if(c){let e=n?String(t.inProgressLabel??`In progress`):t.valueLabel!==void 0&&t.valueLabel!==``?String(t.valueLabel):`${s}%`;c.textContent!==e&&(c.textContent=e)}let l=e.querySelector(`.ty-progress__fill`);if(l){let e=n?``:`${s}%`;l.style.inlineSize!==e&&(l.style.inlineSize=e)}}};const Me={tag:`ty-page-header`,name:`TyPageHeader`,kind:`enhancing`,doc:"The single top-of-page block that names the page: optional breadcrumbs, eyebrow, leading icon, title, reading summary, metadata row and page actions, plus a free slot below for tags, tabs or filters. `scale` picks the type step (`page` the h1 step, `display` for login and public pages, `section` inside a section); `heading-level` the document level. With `editable` the title is an input named by `title-label` and a visually hidden heading keeps the outline. Below 640 px the actions move under the summary and span the width (stylesheet).",props:{title:{type:`string`,attribute:`title`,doc:"Page title; the heading text. Not needed with `editable` (`value` carries the text)."},headingLevel:{type:`enum`,values:[`1`,`2`,`3`],default:`1`,attribute:`heading-level`,doc:`Heading level of the title (1, 2 or 3, as its attribute spelling); exactly one level-1 heading per page, which the header provides by default.`},scale:{type:`enum`,values:[`page`,`display`,`section`],default:`page`,attribute:`scale`,doc:"`page` uses the h1 step; `display` the display step (login, public page only); `section` the h3 step."},eyebrow:{type:`string`,attribute:`eyebrow`,doc:`Short uppercase context line above the title (the §2.2 eyebrow token).`},summary:{type:`string`,attribute:`summary`,doc:`One or two sentences (body-lg, max 60ch) saying what the screen shows.`},editable:{type:`boolean`,attribute:`editable`,doc:`The title is an input that looks like the title (editorial screens); a visually hidden heading of the same level keeps the document outline.`},value:{type:`string`,attribute:`value`,doc:`The editable title's text (controlled); the element mirrors it into the input (while the user types, the live value is the input's own).`},titlePlaceholder:{type:`string`,attribute:`title-placeholder`,doc:`Placeholder of the editable title (the empty state); also the hidden heading's text while empty.`},titleLabel:{type:`string`,default:`Page title`,attribute:`title-label`,doc:`Accessible name of the editable title input.`},headingId:{type:`string`,attribute:`heading-id`,doc:"Id of the title heading, for `aria-labelledby` of the page region; `<instance>-title` when unset."}},events:[{type:`input`,kind:`native`,detail:{value:`string`},reactProp:`onTitleChange`,doc:"Typing in the editable title; `value` is the whole text."}],slots:{breadcrumbs:{doc:`The breadcrumb navigation, rendered above the title.`},icon:{doc:"A decorative leading icon, in an accent-soft container (`aria-hidden`)."},meta:{doc:"The metadata row: `li.ty-page-header__meta-item` items of icon plus short text (owner, date, count); icons decorative, text in reading order."},actions:{doc:`Page actions, aligned to the end: at most one primary button plus secondary buttons (§2.10); below 640 px they move under the summary and span the width.`},error:{doc:`Host-provided validation message under the editable title; marks it invalid and is announced.`},default:{doc:`Extra content below the header (tags, tabs, filters).`}},anatomy:{tag:`div`,class:`ty-page-header`,attrs:{"data-scale":{prop:`scale`}},children:[{tag:`div`,class:`ty-page-header__breadcrumbs`,when:[`slot:breadcrumbs`],children:[{slot:`breadcrumbs`}]},{tag:`div`,class:`ty-page-header__row`,children:[{tag:`span`,class:`ty-page-header__icon`,when:[`slot:icon`],attrs:{"aria-hidden":{value:`true`}},children:[{slot:`icon`}]},{tag:`div`,class:`ty-page-header__text`,children:[{tag:`p`,class:`ty-page-header__eyebrow`,when:[`eyebrow`],children:[{text:{prop:`eyebrow`}}]},...[1,2,3].map(e=>({tag:`h${e}`,class:`ty-page-header__title`,when:[`!editable`,`headingLevel:${e}`],attrs:{id:{idref:`title`,prop:`headingId`}},children:[{text:{prop:`title`}}]})),...[1,2,3].map(e=>({tag:`h${e}`,class:`ty-heading ty-visually-hidden`,when:[`editable`,`headingLevel:${e}`],attrs:{id:{idref:`title`,prop:`headingId`}},children:[{text:{prop:`value`},when:[`value`]},{text:{prop:`titlePlaceholder`},when:[`!value`]}]})),{tag:`input`,class:`ty-page-header__title-input ty-page-header__title`,when:[`editable`],attrs:{"aria-label":{prop:`titleLabel`},placeholder:{prop:`titlePlaceholder`},"aria-invalid":{value:`true`,when:[`slot:error`]},"aria-describedby":{idrefs:[{id:`error`,when:[`slot:error`]}]},"data-invalid":{value:``,when:[`slot:error`]}}},{tag:`p`,class:`ty-page-header__error`,when:[`editable`,`slot:error`],attrs:{id:{idref:`error`}},children:[{slot:`error`}]},{tag:`p`,class:`ty-page-header__summary`,when:[`summary`],children:[{text:{prop:`summary`}}]},{tag:`ul`,class:`ty-page-header__meta`,when:[`slot:meta`],children:[{slot:`meta`}]}]},{tag:`div`,class:`ty-page-header__actions`,when:[`slot:actions`],children:[{slot:`actions`}]}]},{tag:`div`,class:`ty-page-header__extra`,when:[`slot:default`],children:[{slot:`default`}]}]},examples:[{name:`minimal`,props:{title:`Sources`},slots:{}},{name:`reading-summary`,props:{title:`Sources`,eyebrow:`Datasets`,summary:`Every dataset this workspace reads, and when each was last synced.`},slots:{meta:`Owner: Data team`}},{name:`breadcrumbs-actions`,props:{title:`Sources`},slots:{breadcrumbs:`Datasets`,actions:`Add source`,icon:`◈`}},{name:`section-scale`,props:{title:`Connection`,headingLevel:`2`,scale:`section`},slots:{default:`Status: connected`}},{name:`display`,props:{title:`Welcome to Alidade`,scale:`display`,summary:`Sign in to continue.`},slots:{}},{name:`editable`,props:{editable:!0,value:`Untitled report`,titlePlaceholder:`Name the report`,titleLabel:`Report title`},slots:{actions:`Share`}},{name:`editable-error`,props:{editable:!0,titlePlaceholder:`Name the report`,titleLabel:`Report title`},slots:{error:`A name is required.`}}]};var Ne=class extends s{static definition=Me;get titleInput(){return this.querySelector(`.ty-page-header__title-input`)}#e=()=>{let e=this.titleInput;if(!e)return;let t=this.getAttribute(`value`);t!==null&&e.value!==t&&(e.value=t)};connected(){this.#e()}changed(){this.isConnected&&this.#e()}};const x=(e,t)=>({tag:e,class:`ty-notification-center__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),Pe=(e,t=`ty-icon`)=>({tag:`svg`,class:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}),Fe=Pe([x(`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}),x(`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`})]),Ie=Pe([x(`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}),x(`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`}),x(`path`,{d:`m2 2 20 20`}),x(`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`})]),Le=Pe([x(`path`,{d:`M18 6 6 18`}),x(`path`,{d:`m6 6 12 12`})]),Re={tag:`ty-notification-center`,name:`TyNotificationCenter`,kind:`enhancing`,doc:"Bell button with an unseen count and the session's notification history in a modal drawer (review, dismiss one, clear all). The host owns the history and feeds it through `notices` (JSON, newest first); the element composes the badge and the entries, asks to open or close with `ty-open-change` (controlled: the host flips `open`), and reports a dismiss (`ty-dismiss`) or a clear (`ty-clear`) so the host can update its own state. Focus moves into the drawer on open, is trapped while open, Escape asks to close, and focus returns to the bell; after a dismissal focus lands on the next entry's dismiss button (or the previous one, or the heading when the list became empty).",props:{open:{type:`boolean`,attribute:`open`,doc:"Drawer shown (controlled). The anatomy stays mounted but `hidden` while closed, so nothing reaches the accessibility tree."},notices:{type:`string`,attribute:`notices`,doc:'The history as a JSON array, newest first: `[{ "id", "tone", "title", "message"?, "createdAt" }]`, `tone` one of `success`/`error`/`warning`/`info`, `createdAt` a Unix ms timestamp. Left unset (not `"[]"`) while the history is empty. The element renders at most `historyLimit` entries; it never raises toasts itself — the same call that shows a toast feeds this list.'},historyLimit:{type:`number`,default:50,attribute:`history-limit`,doc:`Cap of the rendered history (the newest survive).`},bellLabel:{type:`string`,default:`Notifications`,attribute:`bell-label`,doc:"Accessible name of the bell; with unseen entries the `unreadLabel` phrase is appended."},unreadLabel:{type:`string`,default:`{count} unread`,attribute:`unread-label`,doc:"Unseen phrase appended to the bell name and carried by the badge; `{count}` is replaced."},titleLabel:{type:`string`,default:`Notifications`,attribute:`title-label`,doc:`Heading of the drawer; also its accessible name (aria-labelledby).`},clearAllLabel:{type:`string`,default:`Clear all`,attribute:`clear-all-label`,doc:`Name of the clear-all button (shown only with entries).`},closeLabel:{type:`string`,default:`Close`,attribute:`close-label`,doc:`Accessible name of the close button.`},dismissLabel:{type:`string`,default:`Dismiss, {title}`,attribute:`dismiss-label`,doc:"Accessible name of an entry's dismiss button; `{title}` is replaced by the entry's title."},emptyLabel:{type:`string`,default:`There are no notifications in this session.`,attribute:`empty-label`,doc:`The empty view's sentence.`},clearedLabel:{type:`string`,default:`Notifications cleared`,attribute:`cleared-label`,doc:`Announced politely after clear all (no confirmation: history only).`},toneSuccess:{type:`string`,default:`Success`,attribute:`tone-success`,doc:`Tone word of a success entry.`},toneError:{type:`string`,default:`Error`,attribute:`tone-error`,doc:`Tone word of an error entry.`},toneWarning:{type:`string`,default:`Warning`,attribute:`tone-warning`,doc:`Tone word of a warning entry.`},toneInfo:{type:`string`,default:`Information`,attribute:`tone-info`,doc:`Tone word of an information entry.`},timeJustNow:{type:`string`,default:`just now`,attribute:`time-just-now`,doc:`Relative time of an entry less than a minute old.`},timeMinutesAgo:{type:`string`,default:`{count} minutes ago`,attribute:`time-minutes-ago`,doc:"Relative time of an entry minutes old; `{count}` is replaced."},timeHoursAgo:{type:`string`,default:`{count} hours ago`,attribute:`time-hours-ago`,doc:"Relative time of an entry hours old; `{count}` is replaced."},timeDaysAgo:{type:`string`,default:`{count} days ago`,attribute:`time-days-ago`,doc:"Relative time of an entry days old; `{count}` is replaced."}},events:[{type:`ty-open-change`,kind:`custom`,detail:{open:`boolean`},reactProp:`onOpenChange`,doc:"The element asks the host to change visibility — `open: true` on a bell press, `open: false` on Escape, the close button, a backdrop press or a second bell press. Controlled: the element does not toggle itself; the host flips `open`."},{type:`ty-dismiss`,kind:`custom`,detail:{id:`string`},reactProp:`onDismiss`,doc:`An entry's dismiss button was pressed. The element drops the entry from its rendered history at once; the host removes it from its own state.`},{type:`ty-clear`,kind:`custom`,reactProp:`onClear`,doc:"Clear all was pressed (no confirmation: history only). The element empties its rendered history and announces the `clearedLabel` politely; the host clears its own state."}],anatomy:{tag:`span`,class:`ty-notification-center`,attrs:{},children:[{tag:`span`,class:`ty-notification-center__bell`,attrs:{},children:[{tag:`button`,class:`ty-button ty-notification-center__trigger`,attrs:{type:{value:`button`},"aria-label":{prop:`bellLabel`},"aria-haspopup":{value:`dialog`},"aria-expanded":{prop:`open`,kind:`bool`},"aria-controls":{idref:`dialog`},"data-variant":{value:`quiet`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[Fe]}]}]},{tag:`div`,class:`ty-notification-center__backdrop`,attrs:{hidden:{value:``,when:[`!open`]}},children:[{tag:`div`,class:`ty-notification-center__drawer`,attrs:{},children:[{tag:`div`,class:`ty-notification-center__dialog`,attrs:{role:{value:`dialog`},"aria-modal":{value:`true`},tabindex:{value:`-1`},id:{idref:`dialog`},"aria-labelledby":{idref:`title`}},children:[{tag:`header`,class:`ty-notification-center__head`,attrs:{},children:[Fe,{tag:`h2`,class:`ty-notification-center__heading`,attrs:{id:{idref:`title`},tabindex:{value:`-1`}},children:[{text:{prop:`titleLabel`}}]},{tag:`button`,class:`ty-button ty-notification-center__clear`,attrs:{type:{value:`button`},hidden:{value:``,when:[`!notices`]},"data-variant":{value:`quiet`},"data-size":{value:`compact`}},children:[{text:{prop:`clearAllLabel`}}]},{tag:`button`,class:`ty-button ty-notification-center__close`,attrs:{type:{value:`button`},"aria-label":{prop:`closeLabel`},title:{prop:`closeLabel`},"data-variant":{value:`quiet`},"data-size":{value:`compact`},"data-shape":{value:`circle`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[Le]}]}]},{tag:`div`,class:`ty-notification-center__empty`,attrs:{hidden:{value:``,when:[`notices`]}},children:[Ie,{tag:`p`,class:`ty-notification-center__empty-text`,children:[{text:{prop:`emptyLabel`}}]}]},{tag:`ul`,class:`ty-notification-center__list`,attrs:{hidden:{value:``,when:[`!notices`]}}}]}]}]},{tag:`span`,class:`ty-visually-hidden ty-notification-center__status`,attrs:{role:{value:`status`}}}]},examples:[{name:`closed`,props:{},slots:{}},{name:`open-empty`,props:{open:!0},slots:{}},{name:`translated`,props:{open:!0,bellLabel:`Notificações`,titleLabel:`Notificações`,clearAllLabel:`Limpar tudo`,closeLabel:`Fechar`,emptyLabel:`Não há notificações nesta sessão.`},slots:{}}]},ze=`data-ty-notification-center-inert`,Be=`http://www.w3.org/2000/svg`,Ve=/* @__PURE__ */ new Set([`success`,`error`,`warning`,`info`]),He={success:`toneSuccess`,error:`toneError`,warning:`toneWarning`,info:`toneInfo`},Ue={success:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`}],[`path`,{d:`m9 11 3 3L22 4`}]],error:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],warning:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]],info:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]]},We=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];let S=0;const Ge=()=>{++S===1&&document.documentElement.setAttribute(`data-ty-notification-center-open`,``)},Ke=()=>{S>0&&--S===0&&document.documentElement.removeAttribute(`data-ty-notification-center-open`)};function C(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function qe(e,t){let n=document.createElementNS(Be,`svg`);n.setAttribute(`class`,t),n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`2`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let[t,r]of e){let e=document.createElementNS(Be,t);for(let[t,n]of Object.entries(r))e.setAttribute(t,n);n.append(e)}return n}var Je=class extends s{static definition=Re;#e=/* @__PURE__ */ new Set;#t=-1/0;#n=-1/0;#r=null;#i=[];#a=!1;#o=null;#s=[];#c=!1;#l=null;connected(){this.addEventListener(`keydown`,this.#A),this.addEventListener(`mousedown`,this.#j),this.addEventListener(`click`,this.#M),this.props.open&&this.#E()}disconnected(){this.removeEventListener(`keydown`,this.#A),this.removeEventListener(`mousedown`,this.#j),this.removeEventListener(`click`,this.#M),this.#D(!0)}changed(){this.isConnected&&(this.props.open?this.#E():this.#D(!0))}sync(){super.sync(),this.anatomyRoot()&&this.#h()}#u(){let e=this.getAttribute(`notices`);if(!e)return[];let t;try{t=JSON.parse(e)}catch{return console.warn("ty-notification-center: `notices` is not valid JSON."),[]}if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let{id:t,tone:r,title:i,message:a,createdAt:o}=e;typeof t!=`string`&&typeof t!=`number`||typeof i!=`string`||!i||n.push({id:String(t),tone:Ve.has(String(r))?String(r):`info`,title:i,message:typeof a==`string`&&a?a:void 0,createdAt:typeof o==`number`&&Number.isFinite(o)?o:0})}return n}#d(){let e=Number(this.props.historyLimit),t=Number.isFinite(e)&&e>=0?Math.floor(e):50;return this.#u().filter(e=>e.createdAt>this.#t&&!this.#e.has(e.id)).slice(0,t)}#f(e){return this.props.open?0:e.filter(e=>e.createdAt>this.#n).length}#p(e){return String(this.props.unreadLabel).replace(`{count}`,String(e))}#m(e){let t=this.props,n=Math.floor(Math.max(0,Date.now()-e)/6e4);if(n<1)return String(t.timeJustNow);if(n<60)return String(t.timeMinutesAgo).replace(`{count}`,String(n));let r=Math.floor(n/60);return r<24?String(t.timeHoursAgo).replace(`{count}`,String(r)):String(t.timeDaysAgo).replace(`{count}`,String(Math.floor(r/24)))}#h(){let e=this.props,t=this.#d(),n=this.#f(t),r=this.querySelector(`.ty-notification-center__trigger`);if(r){e.open?r.setAttribute(`aria-expanded`,`true`):r.removeAttribute(`aria-expanded`);let t=n>0?`${String(e.bellLabel)}, ${this.#p(n)}`:String(e.bellLabel);r.getAttribute(`aria-label`)!==t&&r.setAttribute(`aria-label`,t)}this.#g(n);let i=this.querySelector(`.ty-notification-center__clear`);i&&(i.hidden=t.length===0);let a=this.querySelector(`.ty-notification-center__empty`);a&&(a.hidden=t.length>0);let o=this.querySelector(`.ty-notification-center__list`);o&&(o.hidden=t.length===0,this.#y(o,t)),this.#r=n}#g(e){let t=this.querySelector(`.ty-notification-center__bell`);if(!t)return;let n=t.querySelector(`.ty-count-badge`);if(e<=0){n?.remove();return}n||(n=C(`span`,`ty-count-badge`,{"data-tone":`attention`}),n.append(C(`span`,`ty-count-badge__value`,{"aria-hidden":`true`}),C(`span`,`ty-visually-hidden`)),t.append(n)),n.querySelector(`.ty-count-badge__value`).textContent=e>99?`99+`:String(e),n.querySelector(`.ty-visually-hidden`).textContent=this.#p(e),this.#r!==null&&e>this.#r&&(n.setAttribute(`data-changed`,``),n.addEventListener(`animationend`,()=>n.removeAttribute(`data-changed`),{once:!0}))}#_(e){let t=this.props,n=C(`li`,`ty-notification-center__entry`,{"data-tone":e.tone});n.append(qe(Ue[e.tone],`ty-icon ty-notification-center__glyph`));let r=C(`div`,`ty-notification-center__text`),i=C(`p`,`ty-notification-center__tone`);i.textContent=String(t[He[e.tone]]);let a=C(`p`,`ty-notification-center__title`);if(a.textContent=e.title,r.append(i,a),e.message){let t=C(`p`,`ty-notification-center__message`);t.textContent=e.message,r.append(t)}let o=C(`p`,`ty-notification-center__time`);o.textContent=this.#m(e.createdAt),r.append(o);let s=C(`button`,`ty-button ty-notification-center__dismiss`,{type:`button`,"aria-label":String(t.dismissLabel).replace(`{title}`,e.title),"data-variant":`quiet`,"data-size":`compact`,"data-shape":`circle`,"data-icon-only":``}),c=C(`span`,`ty-button__icon`,{"aria-hidden":`true`});return c.append(qe(We,`ty-icon`)),s.append(c),n.append(r,s),n}#v(e,t){return e.children[t]?.querySelector(`.ty-notification-center__dismiss`)??null}#y(e,t){let n=document.activeElement,r=null;if(n&&e.contains(n)){let i=n.closest?.(`.ty-notification-center__entry`),a=i?Array.from(e.children).indexOf(i):-1,o=a>=0?this.#i[a]?.id:void 0;if(o!==void 0){let e=t.findIndex(e=>e.id===o);e>=0&&(r=e)}}if(e.replaceChildren(...t.map(e=>this.#_(e))),this.#i=t,this.#l!==null){let n=this.#l;this.#l=null,(n>=0&&t.length>0?this.#v(e,Math.min(n,t.length-1)):this.querySelector(`.ty-notification-center__heading`))?.focus()}else r!==null&&this.#v(e,r)?.focus()}#b(e){let t=this.#d()[e];t&&(this.#e.add(t.id),this.emit(`ty-dismiss`,{id:t.id}),this.#l=e,this.#h())}#x(){this.#t=Date.now(),this.#e.clear(),this.emit(`ty-clear`),this.#l=-1;let e=this.querySelector(`.ty-notification-center__status`);if(e){e.textContent=``;let t=String(this.props.clearedLabel);queueMicrotask(()=>{e.textContent=t})}this.#h()}#S(e){this.emit(`ty-open-change`,{open:e})}#C(){return this.querySelector(`.ty-notification-center__dialog`)}#w(){return this.querySelector(`.ty-notification-center__backdrop`)}#T(){let e=this.#C();return e?Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.closest(`[hidden]`)):[]}#E(){if(this.#a)return;this.#a=!0,this.#n=Date.now();let e=document.activeElement;this.#o=e instanceof HTMLElement&&!this.contains(e)?e:this.querySelector(`.ty-notification-center__trigger`),Ge(),this.#O(),requestAnimationFrame(()=>{if(this.isConnected&&this.props.open){this.#k();for(let e of this.querySelectorAll(`.ty-notification-center__backdrop, .ty-notification-center__drawer`))e.setAttribute(`data-entering`,``),e.addEventListener(`animationend`,()=>e.removeAttribute(`data-entering`),{once:!0})}})}#D(e){if(!this.#a)return;this.#a=!1,Ke();for(let e of this.#s)e.getAttribute(ze)!==null&&(e.removeAttribute(`inert`),e.removeAttribute(ze));this.#s=[];let t=this.#o;this.#o=null,e&&t?.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}#O(){let e=this;for(;e&&e!==document.body;){let t=e.parentElement;if(!t)break;for(let n of Array.from(t.children))n===e||n.hasAttribute(`inert`)||(n.setAttribute(`inert`,``),n.setAttribute(ze,``),this.#s.push(n));e=t}}#k(){let e=this.#C();if(!e)return;let t=document.activeElement;if(t instanceof HTMLElement&&e.contains(t))return;let n=this.querySelector(`.ty-notification-center__heading`);(this.#T()[0]??n??e).focus()}#A=e=>{let t=e.key;if(t===`Escape`){if(e.isComposing||!this.props.open)return;e.preventDefault(),e.stopPropagation(),this.#S(!1);return}if(t!==`Tab`||!this.props.open)return;let n=this.#C();if(!n)return;e.preventDefault(),e.stopPropagation();let r=this.#T(),i=e.shiftKey;if(!r.length){n.focus();return}let a=r.indexOf(document.activeElement);r[a===-1?i?r.length-1:0:(a+(i?-1:1)+r.length)%r.length].focus()};#j=e=>{this.#c=e.target===this.#w(),this.#c&&e.preventDefault()};#M=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-notification-center__trigger`);if(n&&this.contains(n)){this.#S(!this.props.open);return}let r=t.closest(`.ty-notification-center__close`);if(r&&this.contains(r)){this.#S(!1);return}let i=t.closest(`.ty-notification-center__clear`);if(i&&this.contains(i)){this.#x();return}let a=t.closest(`.ty-notification-center__dismiss`);if(a&&this.contains(a)){let e=this.querySelector(`.ty-notification-center__list`),t=a.closest(`.ty-notification-center__entry`),n=e&&t?Array.from(e.children).indexOf(t):-1;n>=0&&this.#b(n);return}t===this.#w()&&this.#c&&this.#S(!1),this.#c=!1}};const Ye={tag:`ty-markdown-view`,name:`TyMarkdownView`,kind:`self-rendering`,doc:"Safely renders a small, product-relevant subset of Markdown written by people or produced by models, without ever interpreting raw HTML: paragraphs, lists, headings (real `h2`–`h6`, offset by `headingBase`), fenced code blocks, and inline code, strong, emphasis and http(s) links; everything else is literal text. Static — links are the only focusable content, plus a code block that overflows (a labelled scroll region).",props:{text:{type:`string`,attribute:`text`,doc:`Markdown source (the supported subset; anything else renders as literal text). Empty renders nothing.`},headingBase:{type:`number`,default:3,attribute:`heading-base`,doc:`Level used for a Markdown level-1 heading (2 to 6); deeper levels follow, capped at 6.`},density:{type:`enum`,values:[`regular`,`compact`],default:`regular`,attribute:`density`,doc:`Spacing between blocks.`},codeBlockLabel:{type:`string`,default:`Code block`,attribute:`code-block-label`,doc:`Accessible name of a code block that overflows (a scroll region) when it has no language tag; translate through this attribute.`},codeBlockLanguageLabel:{type:`string`,default:`Code block, {language}`,attribute:`code-block-language-label`,doc:"Accessible name of an overflowing code block with a language tag; `{language}` is replaced by the tag."},newTabLabel:{type:`string`,default:`(opens in a new tab)`,attribute:`new-tab-label`,doc:`Screen-reader hint appended to every link (all links open in a new tab); translate through this attribute.`}},events:[],examples:[]},Xe=/^\s*```\s*([\w+#.-]*)\s*$/,Ze=/^(#{1,4})\s+(.+?)\s*#*\s*$/,Qe=/^\s*[-*]\s+(.*)$/,$e=/^\s*\d+[.)]\s+(.*)$/;function et(e){try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&/^https?:\/\//i.test(e.trim())}catch{return!1}}function w(e){let t=[],n=``,r=()=>{n&&t.push({kind:`text`,value:n}),n=``},i=0;for(;i<e.length;){let a=e.slice(i),o=e[i];if(o==="`"){let n=e.indexOf("`",i+1);if(n>i){r(),t.push({kind:`code`,value:e.slice(i+1,n)}),i=n+1;continue}}if(a.startsWith(`**`)){let n=e.indexOf(`**`,i+2);if(n>i+2){r(),t.push({kind:`strong`,children:w(e.slice(i+2,n))}),i=n+2;continue}}if((o===`*`||o===`_`)&&e[i+1]!==o&&e[i+1]!==` `){let n=e.indexOf(o,i+1);if(n>i+1&&e[n-1]!==` `){r(),t.push({kind:`em`,children:w(e.slice(i+1,n))}),i=n+1;continue}}if(o===`[`){let e=/^\[([^\]]+)\]\(([^)\s]+)\)/.exec(a);if(e){r();let[n,a=``,o=``]=e;et(o)?t.push({kind:`link`,href:o,children:w(a)}):t.push({kind:`text`,value:n}),i+=n.length;continue}}n+=o,i+=1}return r(),t}function tt(e){let t=e.replace(/\r\n?/g,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`),n=[],r=[],i=null,a=()=>{r.length&&n.push({kind:`paragraph`,content:w(r.join(` `))}),r=[]},o=()=>{i&&n.push({kind:`list`,ordered:i.ordered,items:i.items.map(w)}),i=null},s=()=>{a(),o()};for(let e=0;e<t.length;e++){let c=t[e],l=Xe.exec(c);if(l){s();let r=[];for(e+=1;e<t.length&&!Xe.test(t[e]);)r.push(t[e++]);n.push({kind:`code`,language:l[1]||void 0,value:r.join(`
|
|
4
|
+
`)});continue}if(!c.trim()){s();continue}let u=Ze.exec(c);if(u){s(),n.push({kind:`heading`,depth:u[1].length,content:w(u[2])});continue}let d=Qe.exec(c),f=d?null:$e.exec(c),p=d??f;if(p){a();let e=!!f;i&&i.ordered!==e&&o(),i??={ordered:e,items:[]},i.items.push(p[1]);continue}o(),r.push(c.trim())}return s(),n}const nt=`http://www.w3.org/2000/svg`;function T(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function rt(){let e=document.createElementNS(nt,`svg`);e.setAttribute(`class`,`ty-icon ty-mirror-rtl ty-link__external`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`focusable`,`false`),e.setAttribute(`width`,`24`),e.setAttribute(`height`,`24`),e.setAttribute(`viewBox`,`0 0 24 24`),e.setAttribute(`fill`,`none`),e.setAttribute(`stroke`,`currentColor`),e.setAttribute(`stroke-width`,`2`),e.setAttribute(`stroke-linecap`,`round`),e.setAttribute(`stroke-linejoin`,`round`);for(let t of[`M15 3h6v6`,`M10 14 21 3`,`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`]){let n=document.createElementNS(nt,`path`);n.setAttribute(`d`,t),e.append(n)}return e}function it(e,t){let n=Number(e);return Math.min(6,(Number.isFinite(n)?Math.min(6,Math.max(2,Math.floor(n))):3)+t-1)}var at=class extends s{static definition=Ye;connected(){this.#e()}changed(){this.isConnected&&this.#e()}#e(){let e=this.props,t=tt(typeof e.text==`string`?e.text:``);if(t.length===0){this.replaceChildren();return}let n=T(`div`,`ty-markdown`,{"data-density":String(e.density)});for(let r of t)n.append(this.#t(r,e.headingBase));this.replaceChildren(n),this.#a(n)}#t(e,t){if(e.kind===`heading`){let n=T(`h${it(t,e.depth)}`,`ty-markdown__heading`,{"data-depth":String(e.depth),dir:`auto`});return n.append(...this.#n(e.content)),n}if(e.kind===`list`){let t=T(e.ordered?`ol`:`ul`,`ty-markdown__list`);for(let n of e.items){let e=document.createElement(`li`);e.setAttribute(`dir`,`auto`),e.append(...this.#n(n)),t.append(e)}return t}if(e.kind===`code`)return this.#i(e);let n=T(`p`,`ty-markdown__paragraph`,{dir:`auto`});return n.append(...this.#n(e.content)),n}#n(e){return e.map(e=>{switch(e.kind){case`text`:return document.createTextNode(e.value);case`code`:{let t=T(`code`,`ty-markdown__code-span`);return t.textContent=e.value,t}case`strong`:{let t=document.createElement(`strong`);return t.append(...this.#n(e.children)),t}case`em`:{let t=document.createElement(`em`);return t.append(...this.#n(e.children)),t}case`link`:return this.#r(e)}})}#r(e){let t=T(`a`,`ty-link`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,"data-emphasis":`underlined`});t.append(...this.#n(e.children)),t.append(rt());let n=T(`span`,`ty-visually-hidden ty-link__hint`);return n.textContent=` ${String(this.props.newTabLabel)}`,t.append(n),t}#i(e){let t=T(`div`,`ty-markdown__code-block`);if(e.language){let n=T(`span`,`ty-markdown__language`,{"aria-hidden":`true`});n.textContent=e.language,t.append(n)}let n=T(`pre`,`ty-markdown__pre`,{dir:`ltr`});e.language&&n.setAttribute(`data-language`,e.language);let r=document.createElement(`code`);return r.textContent=e.value,n.append(r),t.append(n),t}#a(e){let t=this.props;for(let n of e.querySelectorAll(`pre.ty-markdown__pre`)){if(n.scrollWidth<=n.clientWidth)continue;let e=n.getAttribute(`data-language`),r=e?String(t.codeBlockLanguageLabel).replaceAll(`{language}`,e):String(t.codeBlockLabel);n.setAttribute(`tabindex`,`0`),n.setAttribute(`role`,`region`),n.setAttribute(`aria-label`,r)}}};const ot={tag:`ty-heading`,name:`TyHeading`,kind:`enhancing`,doc:'Section title whose document level (`level`, h1 to h6) and visual step (`appearance`: display, h1, h2, h3 or label) are set independently; unset, the step derives from the level. An optional `eyebrow` labels the section above the heading, outside the heading element. The heading id (`heading-id`, generated otherwise) lets a section or dialog reference it with `aria-labelledby`. `level="2" appearance="h3"` is the Subheading.',props:{level:{type:`enum`,values:[`1`,`2`,`3`,`4`,`5`,`6`],default:`1`,attribute:`level`,doc:`Document outline level (1 to 6, as its attribute spelling); one h1 per page, no skipped levels.`},appearance:{type:`enum`,values:[`display`,`h1`,`h2`,`h3`,`label`],attribute:`appearance`,doc:"Visual step from the type scale of §2.2, decoupled from `level`; derived from the level when unset (1 → h1, 2 → h2, 3+ → h3)."},eyebrow:{type:`string`,attribute:`eyebrow`,doc:`Small uppercase label rendered before, and outside, the heading element (the §2.2 eyebrow token); the heading text alone stays the accessible name.`},headingId:{type:`string`,attribute:`heading-id`,doc:"Stable id of the heading element, for `aria-labelledby` of the enclosing section or dialog; `<instance>-heading` when unset."}},events:[],slots:{default:{doc:`The heading text.`}},anatomy:{tag:`div`,class:`ty-heading-group`,children:[{tag:`p`,class:`ty-heading__eyebrow`,when:[`eyebrow`],children:[{text:{prop:`eyebrow`}}]},...[1,2,3,4,5,6].map(e=>({tag:`h${e}`,class:`ty-heading`,when:[`level:${e}`],attrs:{id:{idref:`heading`,prop:`headingId`},"data-appearance":{prop:`appearance`,kind:`map`,values:{display:`display`,h1:`h1`,h2:`h2`,h3:`h3`,label:`label`},fallback:{prop:`level`,values:{1:`h1`,2:`h2`,3:`h3`,4:`h3`,5:`h3`,6:`h3`}}}},children:[{slot:`default`}]}))]},examples:[{name:`page-title`,props:{},slots:{default:`Sources`}},{name:`level-3`,props:{level:`3`},slots:{default:`Field mapping`}},{name:`small-level-big-step`,props:{level:`2`,appearance:`h1`},slots:{default:`Workspace`}},{name:`eyebrow`,props:{level:`2`,eyebrow:`Datasets`},slots:{default:`Revenue by state`}},{name:`label-step`,props:{level:`4`,appearance:`label`},slots:{default:`Owner`}},{name:`subheading`,props:{level:`2`,appearance:`h3`},slots:{default:`Recent runs`}}]};var st=class extends s{static definition=ot};const ct={tag:`ty-data-table`,name:`TyDataTable`,kind:`self-rendering`,doc:"Records as rows and attributes as columns, with sorting, optional row selection, row navigation, loading and empty states, in three densities. Data arrives as JSON attributes; sort, selection and row activation are controlled: the element emits `ty-sort-change`, `ty-selection-change` and `ty-row-action`, and the host writes the new `sort-column`/`sort-direction`/`selected-keys` back.",props:{caption:{type:`string`,attribute:`caption`,doc:"Accessible name of the table (required); visually hidden unless `captionVisible`."},captionVisible:{type:`boolean`,attribute:`caption-visible`,doc:`Show the caption above the table; it always names the table.`},columns:{type:`string`,attribute:`columns`,doc:'JSON array of column definitions: { id, header, sortable?, align?: "start"|"end", numeric? }. `numeric` implies end alignment and tabular figures.'},rows:{type:`string`,attribute:`rows`,doc:'JSON array of rows: { id, cells: { "<columnId>": "<text>" }, href?, label? }. `href` makes the whole row the target (one link per row in the tab order); `label` names the row link.'},density:{type:`enum`,values:[`comfortable`,`standard`,`compact`],default:`standard`,attribute:`density`,doc:`Row height and cell padding: comfortable 52 px, standard 44 px, compact 36 px.`},sortColumn:{type:`string`,attribute:`sort-column`,doc:`The currently sorted column id (controlled).`},sortDirection:{type:`enum`,values:[`ascending`,`descending`],attribute:`sort-direction`,doc:"Direction of `sortColumn` (controlled); unset: no sort."},selectionMode:{type:`enum`,values:[`none`,`multiple`],default:`none`,attribute:`selection-mode`,doc:"`multiple` adds a checkbox column and a select-all header checkbox."},selectedKeys:{type:`string`,attribute:`selected-keys`,doc:`JSON array of the selected row ids (controlled).`},loading:{type:`boolean`,attribute:`loading`,doc:"Show skeleton rows instead of data; the table is `aria-busy` and a polite status announces `loadingLabel`."},loadingRowCount:{type:`number`,default:10,attribute:`loading-row-count`,doc:`Number of skeleton rows while loading.`},loadingLabel:{type:`string`,default:`Loading the list`,attribute:`loading-label`,doc:`Polite status announced while loading.`},emptyLabel:{type:`string`,default:`No rows to show`,attribute:`empty-label`,doc:`Title of the built-in empty state, shown in a single cell spanning all columns when not loading and rows are empty.`},emptyDescription:{type:`string`,attribute:`empty-description`,doc:`Optional description under the empty title.`},selectAllLabel:{type:`string`,default:`Select all rows`,attribute:`select-all-label`,doc:`Accessible name of the header checkbox.`},selectRowLabel:{type:`string`,default:`Select {label}`,attribute:`select-row-label`,doc:"Accessible name template of a row checkbox; `{label}` is the row label."},actionable:{type:`boolean`,attribute:`actionable`,doc:"Rows are activatable: Enter or a press on a row without `href` emits `ty-row-action` (the presence of the spec's `onRowAction`)."},stickyFirstColumn:{type:`string`,attribute:`sticky-first-column`,doc:"`true` or `false`; unset: the first column stays visible while scrolling horizontally."},showColumnLines:{type:`boolean`,attribute:`show-column-lines`,doc:`Vertical dividers between columns.`},maxBlockSize:{type:`string`,attribute:`max-block-size`,doc:`Maximum height of the scroll container, enabling the sticky header.`}},events:[{type:`ty-sort-change`,kind:`custom`,detail:{column:`string`,direction:`string`},reactProp:`onSortChange`,doc:"A sortable header cycled (none → ascending → descending → none). `direction` is `ascending`, `descending` or null when the sort cleared (the attribute reads an empty string for the cleared state). Controlled: the host writes `sort-column`/`sort-direction`."},{type:`ty-selection-change`,kind:`custom`,detail:{keys:`string`},reactProp:`onSelectionChange`,doc:"The selection changed (a row checkbox, the select-all header checkbox, or Space on a focused row); `keys` is a JSON array of the selected row ids. Controlled: the host writes `selected-keys`."},{type:`ty-row-action`,kind:`custom`,detail:{id:`string`},reactProp:`onRowAction`,doc:"A row without `href` was activated (Enter or a press)."}],examples:[]},lt=`http://www.w3.org/2000/svg`;function E(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function D(e,t){let n=document.createElementNS(lt,`svg`);n.setAttribute(`class`,e),n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`2`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let e of t){let t=document.createElementNS(lt,`path`);t.setAttribute(`d`,e),n.append(t)}return n}const ut={ascending:[`m5 12 7-7 7 7`,`M12 19V5`],descending:[`M12 5v14`,`m19 12-7 7-7-7`],none:[`m21 16-4 4-4-4`,`M17 20V4`,`m3 8 4-4 4 4`,`M7 4v16`]},dt=[`M20 6 9 17l-5-5`],ft=[`M5 12h14`],pt=[`M22 12h-6l-2 3h-4l-2-3H2`,`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`];function mt(e,t){return!t||e===null?`ascending`:e===`ascending`?`descending`:null}var ht=class extends s{static definition=ct;connected(){this.addEventListener(`click`,this.#g),this.addEventListener(`change`,this.#_),this.addEventListener(`keydown`,this.#v),this.#s()}disconnected(){this.removeEventListener(`click`,this.#g),this.removeEventListener(`change`,this.#_),this.removeEventListener(`keydown`,this.#v)}changed(){this.isConnected&&this.#s()}#e(){let e=this.#r(`columns`);return Array.isArray(e)?e.filter(e=>e&&typeof e.id==`string`):[]}#t(){let e=this.#r(`rows`);return Array.isArray(e)?e.filter(e=>e&&typeof e.id==`string`):[]}#n(){let e=this.#r(`selected-keys`);return new Set(Array.isArray(e)?e.filter(e=>typeof e==`string`):[])}#r(e){let t=this.getAttribute(e);if(t)try{return JSON.parse(t)}catch{console.warn(`ty-data-table: ${e} is not valid JSON.`);return}}#i(e){if(this.getAttribute(`sort-column`)!==e)return null;let t=this.getAttribute(`sort-direction`);return t===`ascending`||t===`descending`?t:null}#a(e,t){return e||this.hasAttribute(`actionable`)||t.some(e=>e.href)}#o(e,t){return e.label??e.cells[t[0]?.id??``]??e.id}#s(){let e=document.activeElement,t=e instanceof HTMLElement&&this.contains(e)?e.dataset.focusKey:void 0,n=this.props,r=this.#e(),i=this.#t(),a=this.#n(),o=String(n.selectionMode)===`multiple`,s=!!n.loading,c=this.#a(o,i),l=r.length+ +!!o,u=E(`div`,`ty-table-wrap`,{"data-density":String(n.density)});this.getAttribute(`sticky-first-column`)!==`false`&&u.setAttribute(`data-sticky-first`,``),n.showColumnLines&&u.setAttribute(`data-column-lines`,``),o&&u.setAttribute(`data-selectable`,``);let d=String(n.caption??``),f=`${this.instanceId}-caption`;if(n.captionVisible){let e=E(`div`,`ty-table__caption`,{id:f});e.textContent=d,u.append(e)}if(s){let e=E(`span`,`ty-visually-hidden`,{role:`status`});e.textContent=String(n.loadingLabel),u.append(e)}let p=E(`div`,`ty-table-scroll`),m=String(n.maxBlockSize??``);m&&(p.style.maxBlockSize=m);let h=E(`table`,`ty-table`);if(c&&h.setAttribute(`role`,`grid`),n.captionVisible)h.setAttribute(`aria-labelledby`,f);else{let e=E(`caption`,`ty-visually-hidden`);e.textContent=d,h.append(e)}s&&h.setAttribute(`aria-busy`,`true`),h.append(this.#c(r,o,i,a,s)),h.append(this.#l(r,i,a,o,s,c,l)),p.append(h),u.append(p),this.replaceChildren(u),t&&this.querySelector(`[data-focus-key="${t}"]`)?.focus()}#c(e,t,n,r,i){let a=E(`thead`,`ty-table__head`),o=E(`tr`,`ty-table__row ty-table__row--head`);if(t){let e=E(`th`,`ty-table__column ty-table__column--select`,{scope:`col`}),t=n.length>0&&n.every(e=>r.has(e.id)),a=!t&&n.some(e=>r.has(e.id)),s=this.#u(String(this.props.selectAllLabel),t,a,i||n.length===0);s.input.setAttribute(`data-select-all`,``),s.input.dataset.focusKey=`select:all`,e.append(s.shell),o.append(e)}for(let t of e){let e=this.#i(t.id),n=E(`th`,`ty-table__column`,{scope:`col`,"data-align":t.numeric||t.align===`end`?`end`:`start`});if(t.sortable){n.setAttribute(`aria-sort`,e??`none`);let r=E(`button`,`ty-table__sort`,{type:`button`,"data-column":t.id});r.dataset.focusKey=`sort:${t.id}`;let i=E(`span`);i.textContent=t.header,r.append(i,D(`ty-table__sort-icon`,ut[e??`none`])),n.append(r)}else n.textContent=t.header;o.append(n)}return a.append(o),a}#l(e,t,n,r,i,a,o){let s=E(`tbody`,`ty-table__body`);if(i){let t=Math.max(0,Math.floor(Number(this.props.loadingRowCount??10)));for(let n=0;n<t;n++){let t=E(`tr`,`ty-table__row`,{"data-loading":`true`,"aria-hidden":`true`});if(r){let e=E(`td`,`ty-table__cell ty-table__cell--select`);e.append(E(`span`,`ty-table__checkbox-box`,{"aria-hidden":`true`})),t.append(e)}for(let n of e){let e=E(`td`,`ty-table__cell`);e.append(E(`span`,`ty-skeleton`,{"data-shape":`line`,"data-width":n.numeric?`short`:`long`})),t.append(e)}s.append(t)}return s}if(t.length===0){let e=E(`tr`,`ty-table__row ty-table__row--empty`),t=E(`td`,`ty-table__cell ty-table__cell--empty`,{colspan:String(o)}),n=E(`div`,`ty-empty`,{"data-framing":`inline`});n.append(D(`ty-empty__icon`,pt));let r=E(`h4`,`ty-empty__title`);r.textContent=String(this.props.emptyLabel),n.append(r);let i=String(this.props.emptyDescription??``);if(i){let e=E(`p`,`ty-empty__description`);e.textContent=i,n.append(e)}return t.append(n),e.append(t),s.append(e),s}for(let i of t){let t=E(`tr`,`ty-table__row`,{"data-row-id":i.id});if(n.has(i.id)&&t.setAttribute(`data-selected`,``),(i.href||this.hasAttribute(`actionable`))&&t.setAttribute(`data-actionable`,``),a&&(t.setAttribute(`tabindex`,`0`),t.dataset.focusKey=`row:${i.id}`,r&&t.setAttribute(`aria-selected`,String(n.has(i.id)))),r){let r=E(`td`,`ty-table__cell ty-table__cell--select`),a=String(this.props.selectRowLabel).replace(`{label}`,this.#o(i,e)),o=this.#u(a,n.has(i.id),!1,!1);o.input.setAttribute(`data-row-id`,i.id),o.input.dataset.focusKey=`select:${i.id}`,r.append(o.shell),t.append(r)}e.forEach((n,r)=>{let a=n.numeric||n.align===`end`?`end`:`start`,o=i.cells[n.id]??``,s=E(r===0?`th`:`td`,r===0?`ty-table__cell ty-table__cell--row-header`:`ty-table__cell`,{"data-align":a});r===0&&s.setAttribute(`scope`,`row`),n.numeric&&s.setAttribute(`data-numeric`,``);let c=E(`span`,`ty-table__clamp`,{title:o});if(c.textContent=o,r===0&&i.href){let t=E(`a`,`ty-table__row-link`,{href:i.href,"aria-label":this.#o(i,e)});t.append(c),s.append(t)}else s.append(c);t.append(s)}),s.append(t)}return s}#u(e,t,n,r){let i=E(`label`,`ty-table__checkbox`),a=E(`input`,`ty-table__checkbox-input`,{type:`checkbox`,"aria-label":e});a.checked=t,a.indeterminate=n,a.disabled=r;let o=E(`span`,`ty-table__checkbox-box`,{"aria-hidden":`true`});return o.append(D(`ty-table__check`,dt),D(`ty-table__minus`,ft)),i.append(a,o),{shell:i,input:a}}#d(e){let t=mt(this.#i(e),this.getAttribute(`sort-column`)===e);this.emit(`ty-sort-change`,{column:e,direction:t})}#f(e){let t=this.#n();t.has(e)?t.delete(e):t.add(e),this.emit(`ty-selection-change`,{keys:JSON.stringify([...t])})}#p(){let e=this.#t(),t=this.#n(),n=e.length>0&&e.every(e=>t.has(e.id));this.emit(`ty-selection-change`,{keys:JSON.stringify(n?[]:e.map(e=>e.id))})}#m(e){if(this.#t().find(t=>t.id===e)?.href){this.querySelector(`tr[data-row-id="${CSS.escape(e)}"] .ty-table__row-link`)?.click();return}this.hasAttribute(`actionable`)&&this.emit(`ty-row-action`,{id:e})}#h(e){let t=e.closest(`tr.ty-table__row[data-row-id]`);return t instanceof HTMLElement&&this.contains(t)?t:null}#g=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`button.ty-table__sort`);if(n instanceof HTMLElement&&this.contains(n)){let e=n.getAttribute(`data-column`);e&&this.#d(e);return}if(t.closest(`a, button, input, label`))return;let r=this.#h(t);if(!r)return;let i=r.getAttribute(`data-row-id`);String(this.props.selectionMode)===`multiple`?this.#f(i):this.#m(i)};#_=e=>{let t=e.target;if(t instanceof HTMLInputElement&&t.classList.contains(`ty-table__checkbox-input`)){if(t.hasAttribute(`data-select-all`))this.#p();else{let e=t.getAttribute(`data-row-id`);e&&this.#f(e)}}};#v=e=>{let t=e.target;if(!(t instanceof Element))return;let n=this.#h(t);if(!n)return;let r=Array.from(this.querySelectorAll(`tr.ty-table__row[data-row-id]`)),i=r.indexOf(n),a=t=>{e.preventDefault(),r[Math.min(Math.max(t,0),r.length-1)]?.focus()};switch(e.key){case`ArrowDown`:return a(i+1);case`ArrowUp`:return a(i-1);case`Home`:return a(0);case`End`:return a(r.length-1);case`Enter`:if(t!==n)return;e.preventDefault(),this.#m(n.getAttribute(`data-row-id`));return;case` `:if(t!==n||String(this.props.selectionMode)!==`multiple`)return;e.preventDefault(),this.#f(n.getAttribute(`data-row-id`));return}}};const O=e=>/^\p{Nd}$/u.test(e);function gt(e){if(!O(e))return-1;let t=e.codePointAt(0),n=t;for(;O(String.fromCodePoint(n-1));)--n;return(t-n)%10}function _t(e){return e.replace(/\p{Nd}/gu,e=>String(gt(e)))}function vt(e){let t=new Intl.NumberFormat(e,{useGrouping:!1});return Array.from({length:10},(e,n)=>t.format(n))}function yt(e,t){return e.replace(/[0-9]/g,e=>t[Number(e)])}const bt=(e,t)=>({tag:e,class:`ty-currency-field__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),xt={tag:`ty-currency-field`,name:`TyCurrencyField`,kind:`enhancing`,doc:`Money or count entry with live grouping in the locale's separators; reports a plain canonical number (digits, an optional dot and decimals, never grouped). A native <input> inside, so typing, keyboard, autofill and form participation are the platform's; the element regroups the display on every edit, keeps the caret after the same digit, shows the currency symbol and names the currency to assistive technology.`,props:{value:{type:`string`,attribute:`value`,doc:`Canonical value: digits with an optional dot and decimals, never grouped ("1500000.5"); "" when empty. The element mirrors it into the control as grouped display text (while the user types, the live value is the control's own).`},defaultValue:{type:`string`,attribute:`default-value`,doc:`Initial canonical value of an uncontrolled field, applied once on connect; a form reset returns to it.`},currency:{type:`string`,attribute:`currency`,doc:`ISO 4217 code ("BRL"); the symbol is shown (visual only) and the currency name is announced as part of the description. Omit for plain counts.`},decimals:{type:`number`,default:2,attribute:`decimals`,doc:`Maximum fraction digits; 0 means integers only (the decimal separator is ignored and the mobile keyboard is numeric).`},locale:{type:`string`,attribute:`locale`,doc:`Locale that decides the group and decimal separators ("pt-BR"); the document language, then the browser locale, when unset. Changing it changes only the display, never the canonical value.`},size:{type:`enum`,values:[`small`,`medium`,`large`,`display`],default:`medium`,attribute:`size`,doc:"Type scale step; `display` uses the KPI numeral style."},currencyLabel:{type:`string`,default:`Currency: {currency}`,attribute:`currency-label`,doc:'Template of the visually hidden currency note; `{currency}` is filled with the locale\'s currency name ("Currency: Brazilian real").'},required:{type:`boolean`,attribute:`required`,doc:`Native required.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},readOnly:{type:`boolean`,attribute:`read-only`,doc:`Shown but not changeable.`},invalid:{type:`boolean`,attribute:`invalid`,doc:`Painted and announced as invalid without an error message (a surrounding field marks it).`},name:{type:`string`,attribute:`name`,doc:`Form field name.`},placeholder:{type:`string`,attribute:`placeholder`,doc:`Native placeholder.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},labelledBy:{type:`string`,attribute:`labelled-by`,doc:"`aria-labelledby` from a surrounding field (used when there is no visible label and no `accessibleLabel`)."},describedBy:{type:`string`,attribute:`described-by`,doc:"`aria-describedby` from a surrounding field, joined before the field's own parts."},controlId:{type:`string`,attribute:`control-id`,doc:"Explicit id of the control (a surrounding field's control id); `<instance>-input` otherwise."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the root (`data-testid`)."}},events:[{type:`ty-value-change`,kind:`custom`,detail:{value:`string`},reactProp:`onValueChange`,doc:'After every edit; `value` is the canonical number (digits, an optional dot and decimals, never grouped; "" when empty). The display text is never reported.'}],slots:{label:{doc:`The visible label, targeting the input.`},hint:{doc:`Help text above the group, announced as the description.`},error:{doc:`The error message; marks the field invalid and is announced.`}},anatomy:{tag:`div`,class:`ty-currency-field`,attrs:{"data-size":{prop:`size`},"data-invalid":{value:``,when:[`invalid|slot:error`]},"data-readonly":{prop:`readOnly`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`},"data-testid":{prop:`testId`}},children:[{tag:`div`,class:`ty-currency-field__field`,children:[{tag:`label`,class:`ty-fb-line`,when:[`slot:label`],attrs:{"data-line":{value:`label`},for:{idref:`input`,prop:`controlId`}},children:[{slot:`label`}]},{tag:`p`,class:`ty-fb-line`,when:[`slot:hint`],attrs:{"data-line":{value:`hint`},id:{idref:`hint`}},children:[{slot:`hint`}]},{tag:`div`,class:`ty-currency-field__box`,children:[{tag:`span`,class:`ty-currency-field__symbol`,when:[`currency`],attrs:{"aria-hidden":{value:`true`}}},{tag:`input`,class:`ty-currency-field__input`,attrs:{id:{idref:`input`,prop:`controlId`},type:{value:`text`},name:{prop:`name`},placeholder:{prop:`placeholder`},autocomplete:{value:`off`},disabled:{prop:`disabled`,kind:`boolean-attr`},readonly:{prop:`readOnly`,kind:`boolean-attr`},required:{prop:`required`,kind:`boolean-attr`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:label`]},"aria-labelledby":{prop:`labelledBy`,when:[`!slot:label`,`!accessibleLabel`]},"aria-describedby":{idrefs:[{prop:`describedBy`},{id:`hint`,when:[`slot:hint`]},{id:`currency`,when:[`currency`]},{id:`error`,when:[`slot:error`]}]},"aria-invalid":{value:`true`,when:[`invalid|slot:error`]}}}]},{tag:`span`,class:`ty-visually-hidden ty-currency-field__currency`,when:[`currency`],attrs:{id:{idref:`currency`}}},{tag:`p`,class:`ty-fb-line`,when:[`slot:error`],attrs:{"data-line":{value:`error`},id:{idref:`error`}},children:[((e,t=`ty-icon`)=>({tag:`svg`,class:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}))([bt(`circle`,{cx:`12`,cy:`12`,r:`10`}),bt(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),bt(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]),{tag:`span`,class:`ty-currency-field__error-text`,children:[{slot:`error`}]}]}]}]},examples:[{name:`count`,props:{decimals:0,locale:`pt-BR`,value:`3000`,name:`seats`},slots:{label:`Vagas`}},{name:`brl`,props:{currency:`BRL`,locale:`pt-BR`,value:`1500000.5`,name:`price`,placeholder:`0,00`},slots:{label:`Preço`,hint:`Em reais`}},{name:`usd`,props:{currency:`USD`,locale:`en-US`,value:`1500000.5`,name:`amount`},slots:{label:`Amount`}},{name:`display`,props:{size:`display`,currency:`BRL`,locale:`pt-BR`,value:`99.9`},slots:{label:`Total`}},{name:`error`,props:{value:`12`,required:!0},slots:{label:`Amount`,error:`Required`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Amount`,testId:`amount`},slots:{}}]},St=e=>{let t=new Intl.NumberFormat(e).formatToParts(1234567.5);return{group:t.find(e=>e.type===`group`)?.value??`,`,decimal:t.find(e=>e.type===`decimal`)?.value??`.`}},Ct=(e,t)=>{try{return new Intl.NumberFormat(t,{style:`currency`,currency:e}).formatToParts(0).find(e=>e.type===`currency`)?.value??e}catch{return e}},wt=(e,t)=>{try{return new Intl.DisplayNames(t,{type:`currency`}).of(e)??e}catch{return e}},Tt=(e,t,n)=>{let r={whole:``,mark:!1,fraction:``};for(let i of _t(e))i>=`0`&&i<=`9`?r.mark?r.fraction.length<n&&(r.fraction+=i):r.whole+=i:i===t&&n>0&&!r.mark&&(r.mark=!0);return r.whole=r.whole.replace(/^0+(?=\d)/,``),r.mark&&!r.whole&&(r.whole=`0`),r},Et=e=>e.whole===``&&!e.mark?``:e.fraction?`${e.whole}.${e.fraction}`:e.whole,Dt=(e,t)=>{let[n=``,r=``]=e.split(`.`);return{whole:n.replace(/\D/g,``),mark:e.includes(`.`)&&t>0,fraction:r.replace(/\D/g,``).slice(0,t)}},Ot=(e,t,n)=>{let r=e.whole.replace(/\B(?=(\d{3})+(?!\d))/g,t.group);return yt(e.mark?`${r}${t.decimal}${e.fraction}`:r,n)},kt=(e,t,n)=>{let r=0;for(let i of e.slice(0,t))(O(i)||i===n)&&r++;return r},At=(e,t,n)=>{if(t<=0)return 0;let r=0;for(let i=0;i<e.length;i++){let a=e[i];if((O(a)||a===n)&&r++,r===t)return i+1}return e.length};var jt=class extends s{static definition=xt;#e=!1;#t=null;#n=null;#r=null;#i=!1;#a=null;#o=null;#s=null;get field(){return this.querySelector(`input`)}#c(){let e=this.props.locale||document.documentElement.lang||(typeof navigator<`u`?navigator.language:``)||`en-US`;try{return new Intl.NumberFormat(e),e}catch{return`en-US`}}#l(){let e=this.#c();return this.#a!==e&&(this.#a=e,this.#o=St(e),this.#s=vt(e)),{sep:this.#o,digits:this.#s}}#u(){let e=Number(this.props.decimals);return Number.isFinite(e)&&e>=0?Math.floor(e):2}#d=()=>{let e=this.field;if(!e)return;let{sep:t,digits:n}=this.#l(),r=this.#u(),i=this.getAttribute(`value`);if(i!==null){let a=this.#t!==null&&i===this.#n&&r===this.#r?this.#t:Dt(i,r);this.#t=a,this.#n=i,this.#r=r;let o=Ot(a,t,n);e.value!==o&&(e.value=o);return}if(this.#e)return;this.#e=!0;let a=this.getAttribute(`default-value`);if(a===null)return;let o=Ot(Dt(a,r),t,n);e.defaultValue=o,e.value===``&&(e.value=o)};#f=()=>{let e=this.field;if(!e)return;let{sep:t,digits:n}=this.#l(),r=this.#u(),i=e.value,a=e.selectionStart??i.length,o=kt(i,a,t.decimal),s=Tt(i,t.decimal,r),c=i.split(t.decimal)[0].replace(/\D/g,``).length-s.whole.length;c>0&&(o=Math.max(0,o-c));let l=Et(s);this.#t=s,this.#n=l,this.#r=r;let u=Ot(s,t,n);e.value!==u&&(e.value=u);let d=At(e.value,o,t.decimal);(e.selectionStart!==d||e.selectionEnd!==d)&&e.setSelectionRange(d,d),this.emit(`ty-value-change`,{value:l})};#p=()=>{let e=this.props.currency;if(!e)return;let t=this.#c(),n=this.querySelector(`.ty-currency-field__symbol`);if(n){let r=Ct(e,t);n.textContent!==r&&(n.textContent=r)}let r=this.querySelector(`.ty-currency-field__currency`);if(r){let n=String(this.props.currencyLabel).replaceAll(`{currency}`,wt(e,t));r.textContent!==n&&(r.textContent=n)}};#m=()=>{let e=this.field;if(!e)return;let t=this.#u()===0?`numeric`:`decimal`;e.getAttribute(`inputmode`)!==t&&e.setAttribute(`inputmode`,t)};#h=e=>{e.target!==this.field||this.#i||this.#f()};#g=e=>{e.target===this.field&&(this.#i=!0)};#_=e=>{e.target===this.field&&(this.#i=!1,this.#f())};connected(){this.addEventListener(`input`,this.#h),this.addEventListener(`compositionstart`,this.#g),this.addEventListener(`compositionend`,this.#_),this.#m(),this.#p(),this.#d()}disconnected(){this.removeEventListener(`input`,this.#h),this.removeEventListener(`compositionstart`,this.#g),this.removeEventListener(`compositionend`,this.#_)}changed(){this.isConnected&&(this.#m(),this.#p(),this.#d())}};const Mt=/[\u0300-\u036f\u0591-\u05c7\u064b-\u065f\u0670\u06d6-\u06ed]/gu;function Nt(e,t){let n=Intl.Segmenter;return n?new n(t,{granularity:e}):null}function Pt(e,t){return(e.normalize(`NFKD`).replace(Mt,``)||e).normalize(`NFC`).toLocaleLowerCase(t)}function Ft(e,t){let n=/* @__PURE__ */ new Set([0]),r=Nt(`word`,t);if(r)for(let t of r.segment(e))t.isWordLike&&n.add(t.index);else for(let t of e.matchAll(/(?<=[\s\p{P}])\S/gu))n.add(t.index);let i=Nt(`grapheme`,t);return(i?[...i.segment(e)].map(e=>({segment:e.segment,index:e.index})):[...e].reduce((e,t)=>{let n=e[e.length-1];return e.push({segment:t,index:n?n.index+n.segment.length:0}),e},[])).map(e=>({key:Pt(e.segment,t),from:e.index,to:e.index+e.segment.length,wordStart:n.has(e.index)}))}const It=(e,t)=>t.flatMap(t=>Array.from({length:e[t].to-e[t].from},(n,r)=>e[t].from+r));function Lt(e,t,n){let r=Ft(e.trim(),n).map(e=>e.key);if(!r.length)return{score:0,at:[]};let i=Ft(t,n),a=i.map(e=>e.key);for(let e=0;e+r.length<=a.length;e++)if(r.every((t,n)=>a[e+n]===t)){let t=r.map((t,n)=>e+n);return{score:1e3+r.length*12+(i[e].wordStart?60:0)-e,at:It(i,t)}}let o=[],s=0;for(let e of r){let t=-1;for(let n=s;n<a.length;n++)if(a[n]===e&&(t<0&&(t=n),i[n].wordStart)){t=n;break}if(t<0)return null;o.push(t),s=t+1}let c=0;return o.forEach((e,t)=>{let n=o[t-1];c+=4,n!==void 0&&e===n+1&&(c+=16),i[e].wordStart&&(c+=6)}),{score:c-(o[0]??0),at:It(i,o)}}function Rt(e,t){let n=new Set(t),r=[];for(let t=0;t<e.length;t++){let i=n.has(t),a=r[r.length-1];a&&a.marked===i?a.text+=e[t]:r.push({text:e[t]??``,marked:i})}return r}function zt(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function Bt(e){let t;try{t=zt()?.getItem(e)}catch{return{}}if(!t)return{};try{let e=JSON.parse(t);if(!e||typeof e!=`object`||Array.isArray(e))return{};let n={};for(let[t,r]of Object.entries(e))Array.isArray(r)&&typeof r[0]==`number`&&typeof r[1]==`number`&&(n[t]=[r[0],r[1]]);return n}catch{return{}}}const Vt=e=>Object.entries(e).map(([e,[t,n]])=>({id:e,count:t,at:n}));function Ht(e){return Vt(Bt(e))}function Ut(e){return e.slice().sort((e,t)=>e.count===t.count?t.at-e.at:t.count-e.count)}function Wt(e,t,n=12,r=Date.now()){let i=Bt(e),[a]=i[t]??[0,0];i[t]=[a+1,r];let o=Vt(i).sort((e,t)=>t.at-e.at).slice(0,n),s=Object.fromEntries(o.map(e=>[e.id,[e.count,e.at]]));try{zt()?.setItem(e,JSON.stringify(s))}catch{}return o}const k=(e,t,n)=>({type:`string`,attribute:e,default:t,doc:n}),Gt={tag:`ty-command-palette`,name:`TyCommandPalette`,kind:`self-rendering`,doc:`Global search-and-commands dialog in the top layer: a combobox field over grouped, fuzzy-matched results with scopes, per-item actions, fallback actions and recents. The query, the highlight and the actions sub-list reset on each open.`,props:{open:{type:`boolean`,attribute:`open`,doc:"Shown (a modal dialog in the top layer). The element closes itself after a choice or the stepped-back Escape — removing the attribute and asking the host with `ty-close` — so a controlled host follows the attribute."},groups:{type:`string`,attribute:`groups`,doc:'JSON array of groups: `{ id, heading, scopeId?, items: [{ id, label, description?, icon?, iconPath?, keywords?, hint?, shortcut?, scopeId?, actions?: [{ id, label, icon?, iconPath?, shortcut? }] }] }`. `keywords` are matched but not shown; `icon` is a text glyph; `iconPath` is an SVG icon as 24×24 path data rendered in the standard icon frame — when both are present `iconPath` wins, and subpaths separated by " | " become one `<path>` each. Unparseable or missing: no groups.'},scopes:{type:`string`,attribute:`scopes`,doc:"JSON array of scopes: `[{ id, label, icon? }]`; empty means no scoping (no scope column, no scope keys)."},activeScope:{type:`string`,attribute:`active-scope`,doc:"The active scope id; unset: everything. The element reflects user changes back to this attribute and reports them with `ty-scope-change`."},loading:{type:`boolean`,attribute:`loading`,doc:`Shows skeleton rows and announces the loading label instead of results.`},fallbackActions:{type:`string`,attribute:`fallback-actions`,doc:"JSON array of actions offered when the query matches nothing: `[{ id, label, icon?, iconPath?, shortcut? }]`; `{query}` in a label is replaced by the query. `iconPath` is as in `groups` (an SVG icon wins over the `icon` text glyph)."},recentKey:{type:`string`,attribute:`recent-key`,doc:`Browser-storage key of the recent store; enables it. Records the chosen item id with a count and a time, tolerant of storage being unavailable.`},recentVisible:{type:`number`,default:5,attribute:`recent-visible`,doc:`Recents shown when the query is empty, most chosen first (ties: most recent).`},recentKeep:{type:`number`,default:12,attribute:`recent-keep`,doc:`Most recent ids the store keeps.`},label:k(`label`,`Search and commands`,`Accessible name of the dialog and the field.`),placeholder:k(`placeholder`,`Search or type a command`,`Field placeholder.`),emptyLabel:k(`empty-label`,`Type to search records, sources and screens.`,`Shown on an empty query with nothing to list.`),noResultsLabel:k(`no-results-label`,`Nothing matches “{query}”.`,`Shown and announced when the query matches nothing; {query} is replaced.`),loadingLabel:k(`loading-label`,`Loading results`,"Announced in the status region while `loading`."),removeScopeLabel:k(`remove-scope-label`,`Remove scope {scope}`,`Accessible name of the scope chip; {scope} is replaced by the scope label.`),actionsForLabel:k(`actions-for-label`,`Actions for {label}`,`Heading of the actions sub-list; {label} is replaced by the item label.`),recentLabel:k(`recent-label`,`Recent`,`Heading of the recent group.`),resultsLabel:k(`results-label`,`{count} results`,`Announced result count; {count} is replaced.`),scopesLabel:k(`scopes-label`,`Scopes`,`Accessible name of the scope column.`),fallbackLabel:k(`fallback-label`,`Other actions`,`Heading of the fallback group.`),hintNavigate:k(`hint-navigate`,`move`,`Footer hint beside ↑↓.`),hintSelect:k(`hint-select`,`open`,`Footer hint beside ↵.`),hintActions:k(`hint-actions`,`actions`,`Footer hint beside →.`),hintBack:k(`hint-back`,`back`,`Footer hint beside ←.`),hintClose:k(`hint-close`,`close`,`Footer hint beside esc.`)},events:[{type:`ty-select`,kind:`custom`,detail:{id:`string`,kind:`string`,itemId:`string`},reactProp:`onSelect`,doc:'A row was chosen: an item (`kind: "item"`, `id` the item id), a secondary action (`kind: "action"`, `id` the action id, `itemId` its item) or a fallback action (`kind: "fallback"`). `itemId` is empty except for actions. The palette then closes itself and asks the host with `ty-close`.'},{type:`ty-scope-change`,kind:`custom`,detail:{scope:`string`},reactProp:`onScopeChange`,doc:"The active scope changed (a scope button, the chip, Tab or Backspace); `scope` is the scope id, empty when cleared. The element reflects it to the `active-scope` attribute."},{type:`ty-close`,kind:`custom`,reactProp:`onClose`,doc:`The palette asks to close (the stepped-back Escape reaching the top level, a press outside, or after a choice). The element closes itself too.`}],examples:[]},Kt=`http://www.w3.org/2000/svg`;function A(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function j(e,t){let n=document.createElementNS(Kt,`svg`);e&&n.setAttribute(`class`,e),n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`2`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let e of t){let t=document.createElementNS(Kt,`path`);t.setAttribute(`d`,e),n.append(t)}return n}function qt(){let e=j(`ty-palette__search-icon`,[`m20 20-3.5-3.5`]),t=document.createElementNS(Kt,`circle`);return t.setAttribute(`cx`,`11`),t.setAttribute(`cy`,`11`),t.setAttribute(`r`,`7`),e.prepend(t),e}function M(e){if(typeof e!=`string`||!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}const N=(e,t,n)=>String(e??``).split(t).join(n),Jt=e=>e.replace(/[^a-zA-Z0-9_-]/g,`-`);function Yt(e,t,n,r){let i=Lt(e,t.label,r),a=i?i.score:-1/0;for(let i of[t.description,...t.keywords??[],n]){if(!i)continue;let t=Lt(e,i,r);t&&t.score-1>a&&(a=t.score-1)}return a===-1/0?null:{score:a,marks:i?.at??[]}}function Xt(e,t,n){if(!n.length){e.textContent=t;return}for(let r of Rt(t,n))if(r.marked){let t=A(`mark`,`ty-palette__mark`);t.textContent=r.text,e.append(t)}else e.append(r.text)}var Zt=class extends s{static definition=Gt;#e=null;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=``;#l=0;#u=null;#d=[];#f=[];get#p(){return this.getAttribute(`active-scope`)}connected(){this.#m()}disconnected(){this.#v(!1)}changed(){this.isConnected&&this.#m()}#m(){this.props.open&&!this.#e?this.#_():!this.props.open&&this.#e?this.#v(!1):this.#e&&this.#y()}#h(){return M(this.props.groups)}#g(){return M(this.props.scopes)}#_(){let e=this.props,t=this.instanceId,n=String(e.label),r=A(`dialog`,`ty-palette`,{"aria-label":n}),i=A(`div`,`ty-palette__dialog`),a=A(`div`,`ty-palette__field`),o=A(`input`,`ty-palette__input`,{role:`combobox`,"aria-label":n,"aria-autocomplete":`list`,"aria-expanded":`false`,"aria-controls":`${t}-list`,placeholder:String(e.placeholder),autocomplete:`off`,spellcheck:`false`,type:`text`});a.append(qt(),o);let s=A(`div`,`ty-palette__main`),c=A(`div`,`ty-palette__results`),l=A(`div`,`ty-palette__list`,{id:`${t}-list`,role:`listbox`,"aria-label":n});c.append(l),s.append(c);let u=A(`div`,`ty-palette__footer`,{"aria-hidden":`true`});for(let[t,n]of[[`↑↓`,e.hintNavigate],[`↵`,e.hintSelect],[`→`,e.hintActions],[`←`,e.hintBack],[`esc`,e.hintClose]]){let e=A(`span`),r=A(`kbd`,`ty-palette__kbd`);r.textContent=t,e.append(r,` ${String(n)}`),u.append(e)}let d=A(`span`,`ty-visually-hidden`,{role:`status`});i.append(a,s,u,d),r.append(i),o.addEventListener(`input`,()=>{this.#c=o.value,this.#l=0,this.#u=null,this.#E()}),o.addEventListener(`keydown`,this.#O),r.addEventListener(`cancel`,e=>{e.preventDefault(),this.#v(!0)}),r.addEventListener(`click`,e=>{e.target===r&&this.#v(!0)}),this.#e=r,this.#t=o,this.#n=a,this.#r=s,this.#i=null,this.#a=c,this.#o=l,this.#s=d,this.#c=``,this.#l=0,this.#u=null;let f=e.recentKey?String(e.recentKey):``;this.#d=f?Ht(f):[],this.replaceChildren(r),this.#y(),typeof r.showModal==`function`?r.showModal():r.setAttribute(`open`,``),o.focus()}#v(e){let t=this.#e;t&&(this.#e=null,this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null,this.#u=null,t.open&&typeof t.close==`function`&&t.close(),t.remove(),this.hasAttribute(`open`)&&this.removeAttribute(`open`),e&&this.emit(`ty-close`))}#y(){let e=this.props,t=String(e.label);this.#e?.setAttribute(`aria-label`,t),this.#t?.setAttribute(`aria-label`,t),this.#t?.setAttribute(`placeholder`,String(e.placeholder)),this.#o?.setAttribute(`aria-label`,t),this.#b(),this.#x(),this.#E()}#b(){let e=this.#n,t=this.#t;if(!e||!t)return;e.querySelector(`.ty-palette__chip`)?.remove();let n=this.#p;if(!n)return;let r=this.#g().find(e=>e.id===n)?.label;if(!r)return;let i=A(`button`,`ty-palette__chip`,{type:`button`,"aria-label":N(this.props.removeScopeLabel,`{scope}`,r)});i.append(r,j(void 0,[`M18 6 6 18`,`m6 6 12 12`])),i.addEventListener(`click`,()=>{this.#S(null),this.#t?.focus()}),e.insertBefore(i,t)}#x(){let e=this.#r;if(!e)return;let t=this.#g(),n=this.#i;if(!t.length){n&&(n.remove(),this.#i=null);return}n||(n=A(`div`,`ty-palette__scopes`,{role:`group`}),e.prepend(n),this.#i=n),n.setAttribute(`aria-label`,String(this.props.scopesLabel)),n.replaceChildren(...t.map(e=>{let t=A(`button`,`ty-palette__scope`,{type:`button`,"aria-pressed":String(this.#p===e.id),tabindex:`-1`});if(e.icon){let n=A(`span`,void 0,{"aria-hidden":`true`});n.textContent=e.icon,t.append(n)}return t.append(e.label),t.addEventListener(`click`,()=>this.#C(e.id)),t}))}#S(e){e?this.setAttribute(`active-scope`,e):this.removeAttribute(`active-scope`),this.emit(`ty-scope-change`,{scope:e??``})}#C(e){this.#w(this.#p===e?null:e)}#w(e){this.#S(e),this.#c=``,this.#u=null,this.#l=0,this.#t&&(this.#t.value=``),this.#E(),this.#t?.focus()}#T(){let e=this.props,t=this.#h(),n=this.#p,r=document.documentElement.lang||void 0,i=(e,t)=>n===null||(t.scopeId??e.scopeId??e.id)===n,a=(e,t,n=[])=>({key:`${t}${e.id}`,kind:`item`,id:e.id,itemId:``,label:e.label,description:e.description,icon:e.icon,iconPath:e.iconPath,hint:e.hint,shortcut:e.shortcut,marks:n,item:e});if(this.#u){let t=this.#u;return[{key:`sub`,heading:N(e.actionsForLabel,`{label}`,t.label),rows:(t.actions??[]).map(e=>({key:`action-${e.id}`,kind:`action`,id:e.id,itemId:t.id,label:e.label,icon:e.icon,iconPath:e.iconPath,shortcut:e.shortcut,marks:[]}))}]}let o=this.#c.trim(),s=[];if(!o){let n=/* @__PURE__ */ new Map;for(let e of t)for(let t of e.items)i(e,t)&&n.set(t.id,t);let r=Ut(this.#d).map(e=>n.get(e.id)).filter(e=>!!e).slice(0,Number(e.recentVisible??5)).map(e=>a(e,`recent-`));r.length&&s.push({key:`recent`,heading:String(e.recentLabel),rows:r});for(let e of t){let t=e.items.filter(t=>i(e,t)).map(t=>a(t,`${e.id}-`));t.length&&s.push({key:e.id,heading:e.heading,rows:t})}return s}let c=t.flatMap(e=>e.items.filter(t=>i(e,t)).map(t=>({it:t,g:e,hit:Yt(o,t,e.heading,r)}))).filter(e=>e.hit!==null).sort((e,t)=>t.hit.score-e.hit.score);for(let e of c){let t=s[s.length-1];t&&t.key===e.g.id?t.rows.push(a(e.it,`${e.g.id}-`,e.hit.marks)):s.push({key:e.g.id,heading:e.g.heading,rows:[a(e.it,`${e.g.id}-`,e.hit.marks)]})}if(!s.length){let t=M(e.fallbackActions);t.length&&s.push({key:`fallback`,heading:String(e.fallbackLabel),rows:t.map(e=>({key:`fallback-${e.id}`,kind:`fallback`,id:e.id,itemId:``,label:e.label.split(`{query}`).join(o),icon:e.icon,iconPath:e.iconPath,shortcut:e.shortcut,marks:[]}))})}return s}#E(){let e=this.#o,t=this.#t,n=this.#a;if(!e||!t||!n)return;let r=this.props,i=this.instanceId,a=!!r.loading,o=a?[]:this.#T();this.#f=o.flatMap(e=>e.rows),this.#l>=this.#f.length&&(this.#l=Math.max(0,this.#f.length-1));let s=this.#f.length?this.#f[this.#l]:void 0,c=n.querySelector(`.ty-palette__loading`);if(a&&!c){let e=A(`div`,`ty-palette__loading`,{"aria-hidden":`true`});for(let t=0;t<3;t++)e.append(A(`span`,`ty-skeleton`,{"data-shape":`line`}));n.prepend(e)}else!a&&c&&c.remove();e.replaceChildren(...o.map(e=>{let t=A(`div`,`ty-palette__group`,{role:`group`,"aria-labelledby":`${i}-${e.key}`}),n=A(`div`,`ty-palette__heading`,{id:`${i}-${e.key}`,role:`presentation`});n.textContent=e.heading,t.append(n);for(let n of e.rows){let e=n===s,r=A(`div`,`ty-palette__option`,{id:`${i}-${Jt(n.key)}`,role:`option`,"aria-selected":String(e),"data-kind":n.kind});if(e&&r.setAttribute(`data-highlighted`,``),n.iconPath){let e=A(`span`,`ty-palette__icon`,{"aria-hidden":`true`});e.append(j(`ty-icon`,n.iconPath.split(` | `))),r.append(e)}else if(n.icon){let e=A(`span`,`ty-palette__icon`,{"aria-hidden":`true`});e.textContent=n.icon,r.append(e)}let a=A(`span`,`ty-palette__text`),o=A(`span`,`ty-palette__label`);if(Xt(o,n.label,n.marks),a.append(o),n.description){let e=A(`span`,`ty-palette__description`);e.textContent=n.description,a.append(e)}if(r.append(a),n.hint){let e=A(`span`,`ty-palette__hint`);e.textContent=n.hint,r.append(e)}if(n.shortcut){let e=A(`kbd`,`ty-palette__kbd`);e.textContent=n.shortcut,r.append(e)}if(n.item?.actions?.length&&!this.#u){let e=A(`span`,`ty-palette__chevron`,{"aria-hidden":`true`});e.append(j(`ty-mirror-rtl`,[`m9 18 6-6-6-6`])),e.addEventListener(`click`,e=>{e.stopPropagation(),n.item&&(this.#u=n.item,this.#l=0,this.#E())}),r.append(e)}r.addEventListener(`pointermove`,()=>{let e=this.#f.indexOf(n);e!==-1&&e!==this.#l&&(this.#l=e,this.#E())}),r.addEventListener(`mousedown`,e=>e.preventDefault()),r.addEventListener(`click`,()=>this.#D(n)),t.append(r)}return t})),t.setAttribute(`aria-expanded`,String(this.#f.length>0)),s?t.setAttribute(`aria-activedescendant`,`${i}-${Jt(s.key)}`):t.removeAttribute(`aria-activedescendant`);let l=n.querySelector(`.ty-palette__empty`);if(!a&&!this.#f.length){let e=this.#c.trim()?N(r.noResultsLabel,`{query}`,this.#c.trim()):String(r.emptyLabel);if(l)l.textContent=e;else{let t=A(`p`,`ty-palette__empty`);t.textContent=e,n.append(t)}}else l?.remove();if(this.#s){let e=this.#c.trim();this.#s.textContent=a?String(r.loadingLabel):e?this.#f.length?N(r.resultsLabel,`{count}`,String(this.#f.length)):N(r.noResultsLabel,`{query}`,e):``}s&&document.getElementById(`${i}-${Jt(s.key)}`)?.scrollIntoView?.({block:`nearest`})}#D(e){let t=this.props.recentKey?String(this.props.recentKey):``;e.kind===`item`&&t&&Wt(t,e.id,Number(this.props.recentKeep??12)),this.emit(`ty-select`,{id:e.id,kind:e.kind,itemId:e.itemId}),this.#v(!0)}#O=e=>{let t=this.#f.length,n=this.#c.length===0,r=this.#g(),i=this.#p,a=n=>{e.preventDefault(),t&&(this.#l=(n+t)%t,this.#E())};switch(this.closest(`[dir]`)?.getAttribute(`dir`)===`rtl`?{ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`}[e.key]??e.key:e.key){case`ArrowDown`:return a(this.#l+1);case`ArrowUp`:return a(this.#l-1);case`Home`:return a(0);case`End`:return a(t-1);case`Enter`:{e.preventDefault();let t=this.#f[this.#l];t&&this.#D(t);return}case`ArrowRight`:{let t=this.#f[this.#l];!this.#u&&t?.item?.actions?.length?(e.preventDefault(),this.#u=t.item,this.#l=0,this.#E()):n&&!i&&r[0]&&(e.preventDefault(),this.#C(r[0].id));return}case`ArrowLeft`:this.#u&&(e.preventDefault(),this.#u=null,this.#l=0,this.#E());return;case`Tab`:{if(!r.length||e.shiftKey)return;let t=this.#c.trim().toLocaleLowerCase(),a=n?i?void 0:r[0]:r.find(e=>e.label.toLocaleLowerCase().startsWith(t));a&&(e.preventDefault(),this.#w(a.id));return}case`Backspace`:n&&i&&(e.preventDefault(),this.#S(null));return;case`Escape`:e.preventDefault(),e.stopPropagation(),this.#u?(this.#u=null,this.#l=0,this.#E()):i?this.#S(null):this.#v(!0);return}}};const Qt={tag:`ty-breadcrumbs`,name:`TyBreadcrumbs`,kind:`enhancing`,doc:'Shows where the current page sits in the hierarchy and goes up one or more levels. A trail at 640 px and above, a compact back link (with optional centred title and trailing actions) below. The last item is the current page — static text marked `aria-current="page"`, never a link; separators are decorative. Long labels truncate with an ellipsis, the full label kept in `title` and as the accessible name. Activating a link emits a cancelable `ty-navigate`: a host with a client-side router prevents the default and navigates through its adapter.',props:{items:{type:`string`,attribute:`items`,doc:'JSON array of `{ "label": string, "href": string }`, ancestors first and the current page last. Composed by the element on upgrade (the theme palette\'s `theme-labels` precedent).'},label:{type:`string`,default:`Breadcrumb`,attribute:`label`,doc:`Accessible name of the navigation landmark (the I18n adapter's default); translate through this attribute.`},mode:{type:`enum`,values:[`trail`,`compact`,`auto`],default:`auto`,attribute:`mode`,doc:"`auto` shows the trail at 640 px and above, the compact bar below; the element resolves it live."},rootHref:{type:`string`,attribute:`root-href`,doc:`Parent href of the compact back link when there is only one item.`},rootLabel:{type:`string`,attribute:`root-label`,doc:"Parent label of the compact back link when there is only one item (with `rootHref`)."},maxVisible:{type:`number`,attribute:`max-visible`,doc:"Collapses middle items into an overflow menu when the trail exceeds this many entries (the first and the last `maxVisible - 1` stay visible)."},backLabel:{type:`string`,default:`Back to {parent}`,attribute:`back-label`,doc:"Accessible-name template of the compact back link; `{parent}` is filled with the parent's label."},overflowLabel:{type:`string`,default:`Show hidden levels`,attribute:`overflow-label`,doc:`Accessible name of the overflow menu's toggle; translate through this attribute.`}},events:[{type:`ty-navigate`,kind:`custom`,detail:{href:`string`},reactProp:`onNavigate`,doc:"A trail, overflow or back link was activated; `href` is its destination. Cancelable: a host with a client-side router calls `preventDefault()` and navigates through its adapter; uncanceled, the native anchor navigates."}],slots:{center:{doc:`Replaces the centred title of the compact bar (the current page's label when empty).`},actions:{doc:`Trailing actions of the compact bar (narrow screens use it as a top bar).`}},anatomy:{tag:`nav`,class:`ty-breadcrumbs`,attrs:{"aria-label":{prop:`label`},"data-mode":{prop:`mode`}},children:[{tag:`ol`,class:`ty-breadcrumbs__list`,when:[`!mode:compact`]},{tag:`div`,class:`ty-breadcrumbs__bar`,when:[`mode:compact|mode:auto`],children:[{tag:`div`,class:`ty-breadcrumbs__back`},{tag:`div`,class:`ty-breadcrumbs__center`,when:[`slot:center|slot:actions`],children:[{slot:`center`,when:[`slot:center`]},{tag:`span`,class:`ty-breadcrumbs__title`,when:[`!slot:center`],attrs:{"aria-current":{value:`page`}}}]},{tag:`div`,class:`ty-breadcrumbs__actions`,when:[`slot:actions`],children:[{slot:`actions`}]}]}]},examples:[{name:`auto-empty`,props:{},slots:{}},{name:`trail-empty`,props:{mode:`trail`},slots:{}},{name:`compact-bar`,props:{mode:`compact`},slots:{center:`Sources`,actions:`Share`}}]};function $t(e,t){let n=e.map((e,t)=>({kind:`item`,item:e,index:t}));if(!t||e.length<=t||t<2)return n;let r=t-1;return[n[0],{kind:`overflow`,items:e.slice(1,e.length-r)},...n.slice(e.length-r)]}function en(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))throw Error(`not an array`);return t.filter(e=>typeof e==`object`&&!!e&&typeof e.label==`string`&&typeof e.href==`string`)}catch{return console.warn("ty-breadcrumbs: `items` is not a JSON array of { label, href }."),[]}}const tn=`http://www.w3.org/2000/svg`;function P(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function nn(e,t){let n=document.createElementNS(tn,`svg`);n.setAttribute(`class`,e),n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`2`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let[e,r]of t){let t=document.createElementNS(tn,e);for(let[e,n]of Object.entries(r))t.setAttribute(e,n);n.append(t)}return n}const rn=()=>nn(`ty-icon ty-mirror-rtl ty-breadcrumbs__separator`,[[`path`,{d:`m9 18 6-6-6-6`}]]),an=()=>nn(`ty-icon ty-mirror-rtl`,[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]]),on=()=>nn(`ty-icon`,[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`19`,cy:`12`,r:`1`}],[`circle`,{cx:`5`,cy:`12`,r:`1`}]]);var sn=class extends s{static definition=Qt;#e=!1;#t=null;sync(){super.sync(),this.#e&&this.#i()}connected(){this.addEventListener(`click`,this.#r),this.#t=typeof matchMedia>`u`?null:matchMedia(`(min-width: 640px)`),this.#t?.addEventListener(`change`,this.#n),requestAnimationFrame(()=>{this.isConnected&&(this.#e=!0,this.#i())})}disconnected(){this.removeEventListener(`click`,this.#r),this.#t?.removeEventListener(`change`,this.#n),this.#t=null}#n=()=>{this.#e&&this.#i()};#r=e=>{let t=e.target,n=t&&typeof t.closest==`function`?t.closest(`a[href]`):null;if(!n||!this.contains(n))return;let r=n.getAttribute(`href`);this.emit(`ty-navigate`,{href:r})||e.preventDefault()};#i(){let e=this.anatomyRoot();if(!e)return;let t=this.props,n=String(t.mode),r=n===`compact`||n===`auto`&&!(this.#t?.matches??!0),i=r?`compact`:`trail`;e.getAttribute(`data-mode`)!==i&&e.setAttribute(`data-mode`,i);let a=e.querySelector(`.ty-breadcrumbs__list`),o=e.querySelector(`.ty-breadcrumbs__bar`);a?.toggleAttribute(`hidden`,r),o?.toggleAttribute(`hidden`,!r);let s=en(this.getAttribute(`items`));!r&&a&&this.#a(a,s),r&&o&&this.#s(o,s)}#a(e,t){let n=$t(t,Number(this.props.maxVisible??0)||void 0),r=[];n.forEach((e,i)=>{let a=P(`li`,`ty-breadcrumbs__item`);if(e.kind===`overflow`)a.append(this.#o(e.items));else if(e.index===t.length-1){let t=P(`span`,`ty-breadcrumbs__current`,{"aria-current":`page`,title:e.item.label});t.textContent=e.item.label,a.append(t)}else{let t=P(`a`,`ty-link ty-breadcrumbs__link`,{href:e.item.href,"data-emphasis":`subtle`}),n=P(`span`,`ty-breadcrumbs__label`,{title:e.item.label});n.textContent=e.item.label,t.append(n),a.append(t)}i<n.length-1&&a.append(rn()),r.push(a)}),e.replaceChildren(...r)}#o(e){let t=P(`details`,`ty-breadcrumbs__overflow`),n=P(`summary`,`ty-breadcrumbs__overflow-toggle`,{"aria-label":String(this.props.overflowLabel)});n.append(on());let r=P(`ul`,`ty-breadcrumbs__overflow-list`);for(let t of e){let e=P(`li`,`ty-breadcrumbs__overflow-item`),n=P(`a`,`ty-link`,{href:t.href,"data-emphasis":`subtle`,title:t.label});n.textContent=t.label,e.append(n),r.append(e)}return t.append(n,r),t}#s(e,t){let n=this.props,r=e.querySelector(`.ty-breadcrumbs__back`);if(r){let e=t.length>1?t[t.length-2]:n.rootHref?{href:String(n.rootHref),label:String(n.rootLabel??``)}:void 0;if(!e)r.replaceChildren();else{let t=String(n.backLabel).replaceAll(`{parent}`,e.label),i=P(`a`,`ty-link`,{href:e.href,"data-emphasis":`subtle`,"data-standalone":``,"aria-label":t}),a=P(`span`,`ty-breadcrumbs__back-label`);a.textContent=e.label,i.append(an(),a),r.replaceChildren(i)}}let i=e.querySelector(`.ty-breadcrumbs__title`);if(i){let e=t[t.length-1]?.label??``;i.textContent!==e&&(i.textContent=e)}}};const cn={tag:`ty-brand-wordmark`,name:`TyBrandWordmark`,kind:`enhancing`,doc:"Two-tone product wordmark: the plain part (`text`) in ink and the accent part (`accent`) in the brand gradient (`background-clip: text`). Plain text for assistive tech as-is; `label` turns it into an img role with that name (a logo lockup).",props:{text:{type:`string`,attribute:`text`,doc:`The plain part of the wordmark, in ink.`},accent:{type:`string`,attribute:`accent`,doc:"The accent part of the wordmark, in the brand gradient; rendered right after `text`."},size:{type:`enum`,values:[`small`,`medium`,`large`],default:`medium`,attribute:`size`,doc:`Type step of the wordmark.`},label:{type:`string`,attribute:`label`,doc:`Accessible name as an img role (a logo lockup); left out, the wordmark is plain text read as-is.`},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the wordmark (`data-testid`)."}},events:[],anatomy:{tag:`span`,class:`ty-brand-wordmark`,attrs:{role:{value:`img`,when:[`label`]},"aria-label":{prop:`label`},"data-size":{prop:`size`},"data-testid":{prop:`testId`}},children:[{tag:`span`,class:`ty-brand-wordmark__text`,when:[`text`],children:[{text:{prop:`text`}}]},{tag:`span`,class:`ty-brand-wordmark__accent`,when:[`accent`],children:[{text:{prop:`accent`}}]}]},examples:[{name:`default`,props:{text:`North`,accent:`star`},slots:{}},{name:`small`,props:{text:`North`,accent:`star`,size:`small`},slots:{}},{name:`large-labelled`,props:{text:`North`,accent:`star`,size:`large`,label:`Northstar`},slots:{}},{name:`accent-only`,props:{accent:`Solo`},slots:{}}]};var ln=class extends s{static definition=cn};const F=(e,t)=>({tag:e,class:`ty-avatar__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),un=(e,t)=>({tag:`svg`,class:`ty-avatar__icon`,when:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}),dn=()=>[{tag:`img`,class:`ty-avatar__image`,when:[`src`,`decorative|pressable|href`],attrs:{src:{prop:`src`},alt:{value:``}}},{tag:`img`,class:`ty-avatar__image`,when:[`src`,`!decorative`,`!pressable`,`!href`],attrs:{src:{prop:`src`},alt:{prop:`name`}}},{tag:`span`,class:`ty-avatar__fallback`,attrs:{hidden:{value:``,when:[`src`]}},children:[un([F(`path`,{d:`M12 8V4H8`}),F(`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}),F(`path`,{d:`M2 14h2`}),F(`path`,{d:`M20 14h2`}),F(`path`,{d:`M15 13v2`}),F(`path`,{d:`M9 13v2`})],[`actorKind:agent`]),{tag:`span`,class:`ty-avatar__initials`,when:[`actorKind:person`,`fallbackText`],attrs:{"aria-hidden":{value:`true`}},children:[{text:{prop:`fallbackText`}}]},un([F(`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}),F(`circle`,{cx:`12`,cy:`7`,r:`4`})],[`actorKind:person`,`!fallbackText`])]}],fn=(e,t)=>({tag:`span`,class:`ty-avatar`,when:e.length?e:void 0,attrs:t?{"data-kind":{prop:`actorKind`},"data-size":{prop:`size`},"data-tint":{prop:`tint`},"data-image":{value:``,when:[`src`]},"aria-hidden":{value:`true`}}:{"data-kind":{prop:`actorKind`},"data-size":{prop:`size`},"data-tint":{prop:`tint`},"data-image":{value:``,when:[`src`]},"aria-hidden":{value:`true`,when:[`decorative`]},role:{value:`img`,when:[`!decorative`,`!src`]},"aria-label":{prop:`name`,when:[`!decorative`,`!src`]}},children:dn()}),pn={tag:`ty-avatar`,name:`TyAvatar`,kind:`enhancing`,doc:"Represents a person or an agent with a picture or fallback initials, optionally as a pressable control. Static, the frame is an image role named by `name` (hidden when `decorative`); pressable, it is a link (`href`) or a button (`pressable`) named by `actionLabel`, with a 44 px hit area at every size. The fallback (initials for a person, a bot mark for an agent, a user mark otherwise) shows while there is no picture and when the picture fails to load.",props:{src:{type:`string`,attribute:`src`,doc:`Image URL; on load error the fallback shows.`},fallbackText:{type:`string`,attribute:`fallback-text`,doc:`One or two characters shown when there is no image (derived by the host from a name); the element keeps the first two grapheme clusters.`},name:{type:`string`,attribute:`name`,doc:"Accessible name; required unless `decorative`. Initials are never read as letters while it is set."},decorative:{type:`boolean`,attribute:`decorative`,doc:`Hides the avatar from assistive tech when the name is already shown next to it.`},actorKind:{type:`enum`,values:[`person`,`agent`],default:`person`,attribute:`actor-kind`,doc:"`person`: circle with initials. `agent`: rounded square with a bot icon and a dashed border, never initials (§2.11)."},size:{type:`enum`,values:[`xsmall`,`small`,`regular`,`large`],default:`regular`,attribute:`size`,doc:`Size step.`},tint:{type:`enum`,values:[`accent`,`neutral`],default:`accent`,attribute:`tint`,doc:`Fallback background: accent-soft or neutral (§2.3).`},pressable:{type:`boolean`,attribute:`pressable`,doc:"The avatar is one press target (a button); set it when `onPress` is wired. Implied by `href`."},href:{type:`string`,attribute:`href`,doc:"Makes the avatar a link to this destination (wins over `pressable`)."},actionLabel:{type:`string`,default:`Open profile of {name}`,attribute:`action-label`,doc:"Accessible name of a pressable avatar; `{name}` is filled in. Translate through this attribute."}},events:[{type:`click`,kind:`native`,reactProp:`onPress`,doc:`The native click of the pressable avatar (its link or button).`}],anatomy:{tag:`span`,class:`ty-avatar-root`,attrs:{},children:[fn([`!pressable`,`!href`],!1),{tag:`a`,class:`ty-avatar-control`,when:[`href`],attrs:{href:{prop:`href`},"data-size":{prop:`size`}},children:[fn([],!0)]},{tag:`button`,class:`ty-avatar-control`,when:[`!href`,`pressable`],attrs:{type:{value:`button`},"data-size":{prop:`size`}},children:[fn([],!0)]}]},examples:[{name:`initials`,props:{name:`Natália Mesquita`,fallbackText:`NM`},slots:{}},{name:`image`,props:{src:`/avatars/natalia.png`,name:`Natália Mesquita`,fallbackText:`NM`},slots:{}},{name:`agent`,props:{actorKind:`agent`,name:`stage-counter`,size:`small`},slots:{}},{name:`decorative-neutral`,props:{decorative:!0,fallbackText:`NM`,tint:`neutral`},slots:{}},{name:`pressable`,props:{pressable:!0,name:`Natália Mesquita`,fallbackText:`NM`},slots:{}},{name:`link`,props:{href:`/users/natalia`,name:`Natália Mesquita`,src:`/avatars/natalia.png`},slots:{}},{name:`translated-action`,props:{pressable:!0,name:`Natália Mesquita`,fallbackText:`NM`,actionLabel:`Abrir perfil de {name}`},slots:{}}]};function mn(e,t){let n=Intl.Segmenter;if(!n)return Array.from(e).slice(0,t).join(``);let r=``,i=0;for(let{segment:a}of new n(void 0,{granularity:`grapheme`}).segment(e)){if(i===t)break;r+=a,i+=1}return r}var hn=class extends s{static definition=pn;#e=null;#t=e=>{let t=e.target;t instanceof HTMLImageElement&&this.contains(t)&&(this.#e=t.getAttribute(`src`),this.#n())};#n=()=>{let e=this.getAttribute(`src`),t=e!==null&&e===this.#e,n=this.hasAttribute(`decorative`),r=this.hasAttribute(`pressable`)||this.hasAttribute(`href`);for(let i of this.querySelectorAll(`.ty-avatar`)){let a=i.querySelector(`img`);if(a&&(a.toggleAttribute(`hidden`,t),a.hasAttribute(`alt`)||a.setAttribute(`alt`,``)),i.querySelector(`.ty-avatar__fallback`)?.toggleAttribute(`hidden`,e!==null&&!t),i.toggleAttribute(`data-image`,e!==null&&!t),!n&&!r&&(e===null||t)){i.setAttribute(`role`,`img`);let e=this.getAttribute(`name`);e&&i.setAttribute(`aria-label`,e)}else e!==null&&!t&&(i.removeAttribute(`role`),i.removeAttribute(`aria-label`))}};#r=()=>{let e=this.querySelector(`.ty-avatar-control`);if(!e)return;let t=String(this.props.actionLabel??``).replaceAll(`{name}`,this.getAttribute(`name`)??``).trim();t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)};#i=()=>{let e=this.getAttribute(`fallback-text`);if(e===null)return;let t=mn(e,2);for(let e of this.querySelectorAll(`.ty-avatar__initials`))e.textContent!==t&&(e.textContent=t)};connected(){!this.hasAttribute(`decorative`)&&!this.hasAttribute(`name`)&&console.warn("<ty-avatar>: `name` is required unless `decorative`."),this.addEventListener(`error`,this.#t,{capture:!0}),this.#n(),this.#r(),this.#i()}disconnected(){this.removeEventListener(`error`,this.#t,{capture:!0})}changed(){this.isConnected&&(this.#n(),this.#r(),this.#i())}};const gn=(e,t)=>({tag:e,class:`ty-action-menu__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),_n={tag:`ty-action-menu`,name:`TyActionMenu`,kind:`enhancing`,doc:"A list of commands opened from a trigger button (mode `trigger`, the APG Menu Button pattern) or at a pointer position over a target (mode `context`: secondary click, Shift+F10, the ContextMenu key, or a long press on touch). Opening moves focus to the first enabled item (ArrowUp from the trigger: the last); ArrowDown/ArrowUp move with wrapping, Home/End jump, typing a character moves to the next enabled item starting with it, Enter/Space activate, Escape closes and returns focus to the origin, Tab and an outside press close. Disabled items are skipped and announced as disabled. In context mode the surface is clamped so it never overflows the viewport. Visibility is controlled: the element asks with `ty-open-change`, the host flips `open`.",props:{open:{type:`boolean`,attribute:`open`,doc:"Shown (controlled). The anatomy stays mounted but `hidden` while closed, so nothing reaches the accessibility tree."},mode:{type:`enum`,values:[`trigger`,`context`],default:`trigger`,attribute:`mode`,doc:"`trigger`: opens from the trigger button; `context`: opens at a viewport point over the trigger slot's target."},label:{type:`string`,attribute:`label`,doc:`Accessible name of the menu (required by the spec).`},triggerLabel:{type:`string`,default:`More actions`,attribute:`trigger-label`,doc:`Accessible name of the built-in icon-only trigger (the React messages.moreActions default), used in trigger mode when the trigger slot is empty.`},items:{type:`string`,attribute:`items`,doc:'JSON array of entries in order: an item `{ id, label, icon?, iconPath?, tone?, disabled?, shortcut? }` (`icon` a decorative text glyph; `iconPath` an SVG icon as 24×24 path data rendered in the standard icon frame — when both are present `iconPath` wins, and subpaths separated by " | " become one `<path>` each; `tone` "danger" marks a destructive command, `shortcut` a displayed hint only), `{ "type": "separator" }`, or `{ "type": "section", "id", "title", "items": [...] }`. The element composes the rows on upgrade.'},position:{type:`string`,attribute:`position`,doc:`Context mode: the viewport point the menu opens at, "x,y" in CSS pixels (controlled); the last context-request point when unset. Clamped so the menu stays inside the viewport.`}},events:[{type:`ty-action`,kind:`custom`,detail:{id:`string`},reactProp:`onAction`,doc:`An item was activated (pointer, Enter or Space); the element then asks to close. A disabled item never fires.`},{type:`ty-open-change`,kind:`custom`,detail:{open:`boolean`},reactProp:`onOpenChange`,doc:"The element asks the host to change visibility — `open: true` on a trigger activation or a context request (secondary click, Shift+F10, the ContextMenu key, a long press), `open: false` on Escape, Tab, an outside press or after an action. Controlled: the element does not toggle itself; the host flips `open`."}],slots:{trigger:{doc:'Trigger mode: the host\'s own toggle — any single focusable element, wired with aria-haspopup="menu" and aria-expanded. Context mode: the target that receives the context request (secondary click, Shift+F10, long press). Empty in trigger mode: the built-in ellipsis button named by `triggerLabel`.'}},anatomy:{tag:`span`,class:`ty-action-menu__target`,attrs:{"data-mode":{prop:`mode`}},children:[{tag:`button`,class:`ty-button ty-action-menu__trigger`,when:[`!slot:trigger`,`mode:trigger`],attrs:{type:{value:`button`},"aria-label":{prop:`triggerLabel`},"aria-haspopup":{value:`menu`},"data-variant":{value:`quiet`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[gn(`circle`,{cx:`12`,cy:`12`,r:`1`}),gn(`circle`,{cx:`19`,cy:`12`,r:`1`}),gn(`circle`,{cx:`5`,cy:`12`,r:`1`})]}]}]},{slot:`trigger`,when:[`slot:trigger`]},{tag:`div`,class:`ty-action-menu`,attrs:{hidden:{value:``,when:[`!open`]},"data-mode":{prop:`mode`}},children:[{tag:`div`,class:`ty-action-menu__menu`,attrs:{id:{idref:`menu`},role:{value:`menu`},"aria-label":{prop:`label`},"aria-orientation":{value:`vertical`},tabindex:{value:`-1`}}}]}]},examples:[{name:`closed`,props:{label:`Item actions`},slots:{}},{name:`own-trigger`,props:{label:`Run actions`},slots:{trigger:`More`}},{name:`context`,props:{mode:`context`,label:`File actions`},slots:{trigger:`report.csv`}},{name:`translated`,props:{label:`Ações do item`,triggerLabel:`Mais ações`},slots:{}}]},vn=[0,4,8,12,16,24,32,48,64,96];function yn(e,t){return(vn[Math.trunc(e)]??8)+(t?6:0)}function bn(e,t){switch(e){case`top`:return`top`;case`end`:return t?`left`:`right`;case`start`:return t?`right`:`left`;default:return`bottom`}}const xn={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Sn=/* @__PURE__ */ new Set([`top`,`bottom`]);function Cn(e,t,n){switch(n){case`top`:return e.y-16;case`bottom`:return t.height-(e.y+e.height)-16;case`left`:return e.x-16;case`right`:return t.width-(e.x+e.width)-16}}function wn(e,t,n,r,i){let a=i+(Sn.has(r)?t.height:t.width),o=Cn(e,n,r);if(o>=a)return r;let s=xn[r];return Cn(e,n,s)>o?s:r}function I(e,t,n,r){switch(r){case`start`:return e;case`end`:return e+t-n;default:return e+(t-n)/2}}function Tn(e,t,n){let r=n-16-t;return Math.min(Math.max(e,16),Math.max(r,16))}function En(e,t){return Math.min(Math.max(e,14),Math.max(t-14,14))}function Dn(e,t,n,r,i,a){let o=wn(e,t,n,r,a),s,c;switch(o){case`top`:s=I(e.x,e.width,t.width,i),c=e.y-a-t.height;break;case`bottom`:s=I(e.x,e.width,t.width,i),c=e.y+e.height+a;break;case`left`:s=e.x-a-t.width,c=I(e.y,e.height,t.height,i);break;case`right`:s=e.x+e.width+a,c=I(e.y,e.height,t.height,i)}let l=Tn(s,t.width,n.width),u=Tn(c,t.height,n.height);return{x:l,y:u,side:o,arrow:Sn.has(o)?En(e.x+e.width/2-l,t.width):En(e.y+e.height/2-u,t.height)}}const On=`http://www.w3.org/2000/svg`;function L(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function kn(e){if(!e.trim())return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return console.warn("ty-action-menu: `items` is not valid JSON."),[]}}function An(e){let t=document.createElementNS(On,`svg`);t.setAttribute(`class`,`ty-icon`),t.setAttribute(`viewBox`,`0 0 24 24`),t.setAttribute(`fill`,`none`),t.setAttribute(`stroke`,`currentColor`),t.setAttribute(`stroke-width`,`2`),t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`stroke-linejoin`,`round`),t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`focusable`,`false`);for(let n of e.split(` | `)){let e=document.createElementNS(On,`path`);e.setAttribute(`d`,n),t.append(e)}return t}var jn=class extends s{static definition=_n;#e=[];#t=null;#n=null;#r=null;#i=`first`;#a=null;#o={x:0,y:0};#s=0;#c;#l=!0;sync(){super.sync(),this.isConnected&&this.#h()}connected(){this.addEventListener(`click`,this.#A),this.addEventListener(`keydown`,this.#j),this.addEventListener(`contextmenu`,this.#M),this.addEventListener(`pointerdown`,this.#N),this.addEventListener(`pointerup`,this.#P),this.addEventListener(`pointercancel`,this.#F),this.addEventListener(`pointermove`,this.#F),this.addEventListener(`pointerover`,this.#I),this.addEventListener(`pointerout`,this.#L),this.addEventListener(`focusin`,this.#R),this.addEventListener(`focusout`,this.#z),this.#u()}disconnected(){this.removeEventListener(`click`,this.#A),this.removeEventListener(`keydown`,this.#j),this.removeEventListener(`contextmenu`,this.#M),this.removeEventListener(`pointerdown`,this.#N),this.removeEventListener(`pointerup`,this.#P),this.removeEventListener(`pointercancel`,this.#F),this.removeEventListener(`pointermove`,this.#F),this.removeEventListener(`pointerover`,this.#I),this.removeEventListener(`pointerout`,this.#L),this.removeEventListener(`focusin`,this.#R),this.removeEventListener(`focusout`,this.#z),this.#w()}changed(){this.isConnected&&this.#u()}#u(){this.anatomyRoot()&&(this.#h(),this.#m(),this.props.open?this.#S():this.#C(!0))}#d(){let e=this.anatomyRoot();if(!e)return null;let t=e.querySelector(`.ty-action-menu__trigger`);if(t instanceof HTMLElement)return t;for(let t of Array.from(e.children))if(!t.classList.contains(`ty-action-menu`)&&t instanceof HTMLElement)return t;return null}#f(){return this.querySelector(`.ty-action-menu`)}#p(){return this.querySelector(`.ty-action-menu__menu`)}#m(){let e=this.#d();if(!e)return;e.setAttribute(`aria-haspopup`,`menu`),e.setAttribute(`aria-expanded`,this.props.open?`true`:`false`);let t=this.#p();t?.id&&e.setAttribute(`aria-controls`,t.id)}#h(){let e=this.#p();if(!e)return;let t=this.getAttribute(`items`)??``,n=kn(t);if(t===this.#t&&(e.childElementCount>0||n.length===0))return;let r=this.instanceId,i=[],a=[];for(let e of n){if(e.type===`separator`){a.push(L(`div`,`ty-action-menu__separator`,{role:`separator`}));continue}if(e.type===`section`){let t=L(`div`,`ty-action-menu__section`,{role:`group`,"aria-labelledby":`${r}-section-${e.id}`}),n=L(`div`,`ty-action-menu__section-title`,{id:`${r}-section-${e.id}`});n.textContent=String(e.title??``),t.append(n);for(let n of e.items??[])t.append(this.#g(n,i));a.push(t);continue}a.push(this.#g(e,i))}e.replaceChildren(...a),this.#e=i,this.#t=t}#g(e,t){let n=L(`div`,`ty-action-menu__item`,{role:`menuitem`,tabindex:`-1`});n.setAttribute(`data-tone`,e.tone??`default`);let r=!!e.disabled;if(r&&(n.setAttribute(`aria-disabled`,`true`),n.setAttribute(`data-disabled`,``)),e.iconPath){let t=L(`span`,`ty-action-menu__icon`,{"aria-hidden":`true`});t.append(An(e.iconPath)),n.append(t)}else if(e.icon){let t=L(`span`,`ty-action-menu__icon`,{"aria-hidden":`true`});t.textContent=e.icon,n.append(t)}let i=L(`span`,`ty-action-menu__label`);if(i.textContent=String(e.label??``),n.append(i),e.shortcut){let t=L(`kbd`,`ty-action-menu__shortcut`,{"aria-hidden":`true`});t.textContent=e.shortcut,n.append(t)}return t.push({id:String(e.id??``),label:String(e.label??``),disabled:r,el:n}),n}#_(){return this.#e.filter(e=>!e.disabled)}#v(e,t){this.props.open||(this.#i=e,this.#r=t,this.emit(`ty-open-change`,{open:!0}))}#y(e){this.props.open&&(this.#a=e,this.emit(`ty-open-change`,{open:!1}))}#b(e,t){this.#o=e;let n=document.activeElement;if(this.#r=t??(n instanceof HTMLElement&&this.contains(n)&&!this.#f()?.contains(n)?n:this.#d()),this.props.open&&this.#n){this.#E();return}this.#i=`first`,this.emit(`ty-open-change`,{open:!0})}#x(e){e.disabled||(this.emit(`ty-action`,{id:e.id}),this.#y(`action`))}#S(){if(this.#n)return;let e=new AbortController;if(this.#n=e,!this.#r){let e=document.activeElement;this.#r=e instanceof HTMLElement&&this.contains(e)&&!this.#f()?.contains(e)?e:this.#d()}document.addEventListener(`pointerdown`,e=>{this.contains(e.target)||this.#y(`outside`)},{signal:e.signal});let t=()=>this.#E();window.addEventListener(`resize`,t,{signal:e.signal}),window.addEventListener(`scroll`,t,{capture:!0,passive:!0,signal:e.signal}),this.#s=requestAnimationFrame(()=>{if(this.#s=0,!this.isConnected||!this.props.open)return;this.#h(),this.#E();let e=this.#f();e&&(e.setAttribute(`data-entering`,``),e.addEventListener(`animationend`,()=>e.removeAttribute(`data-entering`),{once:!0}));let t=this.#_(),n=this.#i;this.#i=`first`,t.length?(n===`last`?t[t.length-1]:t[0]).el.focus():this.#p()?.focus()})}#C(e){if(!this.#n)return;this.#w();let t=this.#a;this.#a=null;let n=this.#r;this.#r=null,e&&n?.isConnected&&t!==`outside`&&t!==`tab`&&requestAnimationFrame(()=>{n.isConnected&&n.focus()})}#w(){this.#n?.abort(),this.#n=null,this.#s&&cancelAnimationFrame(this.#s),this.#s=0,window.clearTimeout(this.#c);let e=this.#f();e&&(e.removeAttribute(`data-entering`),e.style.removeProperty(`position`),e.style.removeProperty(`left`),e.style.removeProperty(`top`))}#T(){let e=this.getAttribute(`position`);if(e){let[t,n]=e.split(`,`).map(e=>Number(e.trim()));if(Number.isFinite(t)&&Number.isFinite(n))return{x:t,y:n}}return this.#o}#E(){let e=this.#f();if(!e||!this.props.open)return;let t={width:e.offsetWidth,height:e.offsetHeight},n={width:window.innerWidth,height:window.innerHeight};if(e.style.position=`fixed`,this.props.mode===`context`){let r=this.#T();e.style.left=`${Math.round(Math.max(8,Math.min(r.x,n.width-t.width-8)))}px`,e.style.top=`${Math.round(Math.max(8,Math.min(r.y,n.height-t.height-8)))}px`;return}let r=this.#d();if(!r)return;let i=r.getBoundingClientRect(),a=Dn({x:i.x,y:i.y,width:i.width,height:i.height},t,n,`bottom`,`end`,8);e.style.left=`${Math.round(a.x)}px`,e.style.top=`${Math.round(a.y)}px`,e.dataset.side=a.side}#D(e){let t=this.#_();if(!t.length)return;let n=t.findIndex(e=>e.el===document.activeElement);t[n===-1?e===1?0:t.length-1:(n+e+t.length)%t.length].el.focus()}#O(e){let t=this.#_();(e?t[t.length-1]:t[0])?.el.focus()}#k(e){let t=this.#_();if(!t.length)return;let n=t.findIndex(e=>e.el===document.activeElement),r=e.toLowerCase();for(let e=1;e<=t.length;e++){let i=t[(n+e+t.length)%t.length];if(i.label.trim().toLowerCase().startsWith(r)){i.el.focus();return}}}#A=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=this.#f();if(n?.contains(t)){let e=t.closest(`.ty-action-menu__item`);if(e&&n.contains(e)){let t=this.#e.find(t=>t.el===e);t&&this.#x(t)}return}if(this.props.mode!==`trigger`)return;let r=this.#d();r&&(t===r||r.contains(t))&&(e.preventDefault(),this.props.open?this.#y(`trigger`):this.#v(`first`,r))};#j=e=>{let t=e;this.#l=!0;let n=t.target,r=this.#f();if(this.props.open&&r?.contains(n))switch(t.key){case`ArrowDown`:t.preventDefault(),this.#D(1);return;case`ArrowUp`:t.preventDefault(),this.#D(-1);return;case`Home`:t.preventDefault(),this.#O(!1);return;case`End`:t.preventDefault(),this.#O(!0);return;case`Enter`:case` `:{t.preventDefault();let e=this.#e.find(e=>e.el===document.activeElement);e&&this.#x(e);return}case`Escape`:t.preventDefault(),t.stopPropagation(),this.#y(`escape`);return;case`Tab`:this.#y(`tab`);return;default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&(t.preventDefault(),this.#k(t.key));return}if(this.props.mode===`context`&&(t.shiftKey&&t.key===`F10`||t.key===`ContextMenu`)){t.preventDefault();let e=t.target instanceof HTMLElement?t.target:this.#d(),n=e?.getBoundingClientRect();this.#b({x:n?.left??0,y:n?.bottom??0},e);return}if(this.props.mode===`trigger`&&(t.key===`ArrowDown`||t.key===`ArrowUp`)){let e=this.#d();e&&(n===e||e.contains(n))&&(t.preventDefault(),this.#v(t.key===`ArrowUp`?`last`:`first`,e))}};#M=e=>{if(this.props.mode!==`context`||(e.preventDefault(),this.#f()?.contains(e.target)))return;let t=e;this.#b({x:t.clientX,y:t.clientY})};#N=e=>{this.#l=!1;let t=e,n=t.target,r=typeof n?.closest==`function`?n.closest(`.ty-action-menu__item`):null;if(r&&this.#f()?.contains(r)&&r.setAttribute(`data-pressed`,``),this.props.mode!==`context`||t.pointerType!==`touch`||this.#f()?.contains(t.target))return;let i={x:t.clientX,y:t.clientY};window.clearTimeout(this.#c),this.#c=window.setTimeout(()=>this.#b(i),500)};#P=()=>{this.#F();for(let e of this.#f()?.querySelectorAll(`.ty-action-menu__item[data-pressed]`)??[])e.removeAttribute(`data-pressed`)};#F=()=>{window.clearTimeout(this.#c)};#I=e=>{let t=e.target,n=typeof t?.closest==`function`?t.closest(`.ty-action-menu__item`):null;n&&this.#f()?.contains(n)&&n.setAttribute(`data-hovered`,``)};#L=e=>{let t=e.target,n=typeof t?.closest==`function`?t.closest(`.ty-action-menu__item`):null;n&&(n.removeAttribute(`data-hovered`),n.removeAttribute(`data-pressed`))};#R=e=>{let t=e.target,n=typeof t?.closest==`function`?t.closest(`.ty-action-menu__item`):null;if(n&&this.#f()?.contains(n)){for(let e of this.#f().querySelectorAll(`.ty-action-menu__item[data-focused]`))e.removeAttribute(`data-focused`),e.removeAttribute(`data-focus-visible`);n.setAttribute(`data-focused`,``),this.#l&&n.setAttribute(`data-focus-visible`,``)}};#z=e=>{let t=e.target,n=typeof t?.closest==`function`?t.closest(`.ty-action-menu__item`):null;n&&(n.removeAttribute(`data-focused`),n.removeAttribute(`data-focus-visible`))}};const Mn={tag:`ty-button`,name:`TyButton`,kind:`enhancing`,doc:`Triggers one action. A native <button> inside, so focus, keyboard activation and form submission are the platform's.`,props:{variant:{type:`enum`,values:[`primary`,`secondary`,`quiet`,`danger`],default:`secondary`,attribute:`variant`,doc:`Visual weight; at most one primary per view.`},size:{type:`enum`,values:[`compact`,`regular`,`large`],default:`regular`,attribute:`size`,doc:`Height step.`},shape:{type:`enum`,values:[`rounded`,`pill`,`circle`],default:`rounded`,attribute:`shape`,doc:"`circle` only for icon-only buttons."},iconOnly:{type:`boolean`,attribute:`icon-only`,doc:"Hides the label; `accessibleLabel` is then required."},fullWidth:{type:`boolean`,attribute:`full-width`,doc:`Stretches to the container width.`},busy:{type:`boolean`,attribute:`busy`,doc:"Shows the busy indicator and blocks presses (`aria-busy`, `aria-disabled`)."},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},type:{type:`enum`,values:[`button`,`submit`,`reset`],default:`button`,attribute:`type`,doc:"Native button type; `submit` submits the enclosing form."},name:{type:`string`,attribute:`name`,doc:`Form field name sent with a submit.`},value:{type:`string`,attribute:`value`,doc:`Form field value sent with a submit.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label; also the tooltip of an icon-only button.`},pressed:{type:`string`,attribute:`pressed`,doc:"A toggle button's state, `true` or `false` (`aria-pressed`); left out for an ordinary button."},expanded:{type:`string`,attribute:`expanded`,doc:"`true` or `false` while the button shows or hides a popup or region (`aria-expanded`)."},controls:{type:`string`,attribute:`controls`,doc:"Id of the element the button controls (`aria-controls`)."},haspopup:{type:`string`,attribute:`haspopup`,doc:"The kind of popup the button opens (`aria-haspopup`: `menu`, `dialog`, `listbox`, …)."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the native button (`data-testid`)."}},events:[{type:`click`,kind:`native`,reactProp:`onClick`,doc:`The native click (not fired while busy or disabled).`}],slots:{default:{doc:`The label.`},icon:{doc:`A leading icon (decorative).`},"trailing-icon":{doc:`A trailing icon (decorative).`}},anatomy:{tag:`button`,class:`ty-button`,attrs:{type:{prop:`type`},name:{prop:`name`},value:{prop:`value`},disabled:{prop:`disabled`,kind:`boolean-attr`},"aria-busy":{prop:`busy`,kind:`bool`},"aria-disabled":{prop:`busy`,kind:`bool`},"aria-label":{prop:`accessibleLabel`},"aria-pressed":{prop:`pressed`},"aria-expanded":{prop:`expanded`},"aria-controls":{prop:`controls`},"aria-haspopup":{prop:`haspopup`},"data-testid":{prop:`testId`},title:{prop:`accessibleLabel`,when:[`iconOnly`]},"data-variant":{prop:`variant`},"data-size":{prop:`size`},"data-shape":{prop:`shape`},"data-icon-only":{prop:`iconOnly`,kind:`flag`},"data-full-width":{prop:`fullWidth`,kind:`flag`},"data-busy":{prop:`busy`,kind:`flag`}},children:[{tag:`span`,class:`ty-button__busy`,attrs:{"aria-hidden":{value:`true`}},when:[`busy`]},{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},when:[`!busy`,`slot:icon`],children:[{slot:`icon`}]},{tag:`span`,class:`ty-button__label`,when:[`!iconOnly`],children:[{slot:`default`}]},{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},when:[`!iconOnly`,`slot:trailing-icon`],children:[{slot:`trailing-icon`}]}]},examples:[{name:`secondary`,props:{},slots:{default:`Cancel`}},{name:`primary-large`,props:{variant:`primary`,size:`large`},slots:{default:`Save`}},{name:`submit`,props:{variant:`primary`,type:`submit`,name:`intent`,value:`publish`},slots:{default:`Publish`}},{name:`busy`,props:{variant:`primary`,busy:!0},slots:{default:`Saving`}},{name:`danger-disabled`,props:{variant:`danger`,disabled:!0},slots:{default:`Delete`}},{name:`icon-only`,props:{variant:`quiet`,iconOnly:!0,shape:`circle`,accessibleLabel:`Close`},slots:{icon:`×`}},{name:`full-width-pill`,props:{fullWidth:!0,shape:`pill`},slots:{default:`Continue`,"trailing-icon":`→`}},{name:`toggle`,props:{variant:`quiet`,pressed:`false`,expanded:`false`,controls:`panel`,haspopup:`dialog`,testId:`toggle`},slots:{default:`Filters`}}]};var Nn=class extends s{static definition=Mn;#e=e=>{this.hasAttribute(`busy`)&&(e.preventDefault(),e.stopImmediatePropagation())};connected(){this.addEventListener(`click`,this.#e,{capture:!0})}disconnected(){this.removeEventListener(`click`,this.#e,{capture:!0})}};const Pn={tag:`ty-checkbox`,name:`TyCheckbox`,kind:`enhancing`,doc:`A labelled choice that submits with its form. A native checkbox inside a <label> row, so labelling, keyboard (Space) and form participation are the platform's. The indicator holds both marks; CSS shows the check while the input is :checked, the minus while it is :indeterminate, so every renderer (and the page before upgrade) shows the right state.`,props:{checked:{type:`boolean`,attribute:`checked`,doc:`On.`},indeterminate:{type:`boolean`,attribute:`indeterminate`,doc:'Mixed state for "select all" rows (the input\'s `indeterminate` property); cleared by the next toggle.'},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},required:{type:`boolean`,attribute:`required`,doc:`Native required; the form will not submit while off.`},name:{type:`string`,attribute:`name`,doc:`Form field name; the value is sent while on.`},value:{type:`string`,attribute:`value`,doc:`Form value sent while on (the browser sends "on" without one).`},appearance:{type:`enum`,values:[`tile`,`bare`],default:`tile`,attribute:`appearance`,doc:"`tile` draws a surface around the row; `bare` is indicator plus text."},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the native checkbox (`data-testid`)."}},events:[{type:`change`,kind:`native`,detail:{checked:`boolean`},reactProp:`onChange`,doc:"The native change of the checkbox; `checked` is the new state."}],slots:{default:{doc:`The visible label.`},description:{doc:`A secondary line, announced as the description.`},error:{doc:"The error message; marks the checkbox invalid (`aria-invalid`, `aria-errormessage`)."}},anatomy:{tag:`div`,class:`ty-checkbox`,attrs:{"data-appearance":{prop:`appearance`}},children:[{tag:`label`,class:`ty-checkbox__row`,attrs:{"data-selected":{prop:`checked`,kind:`flag`},"data-indeterminate":{prop:`indeterminate`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`}},children:[{tag:`input`,class:`ty-visually-hidden`,attrs:{type:{value:`checkbox`},name:{prop:`name`},value:{prop:`value`},checked:{prop:`checked`,kind:`boolean-attr`},disabled:{prop:`disabled`,kind:`boolean-attr`},required:{prop:`required`,kind:`boolean-attr`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:default`]},"aria-labelledby":{idref:`label`,when:[`slot:default`]},"aria-describedby":{idref:`description`,when:[`slot:description`]},"aria-invalid":{value:`true`,when:[`slot:error`]},"aria-errormessage":{idref:`error`,when:[`slot:error`]},"data-testid":{prop:`testId`}}},{tag:`span`,class:`ty-checkbox__indicator`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[{tag:`path`,class:`ty-checkbox__check`,attrs:{d:{value:`M20 6 9 17l-5-5`}}},{tag:`path`,class:`ty-checkbox__minus`,attrs:{d:{value:`M5 12h14`}}}]}]},{tag:`span`,class:`ty-checkbox__text`,when:[`slot:default|slot:description`],children:[{tag:`span`,class:`ty-checkbox__label`,attrs:{id:{idref:`label`}},when:[`slot:default`],children:[{slot:`default`}]},{tag:`span`,class:`ty-checkbox__description`,attrs:{id:{idref:`description`}},when:[`slot:description`],children:[{slot:`description`}]}]}]},{tag:`p`,class:`ty-checkbox__error`,attrs:{id:{idref:`error`},"aria-live":{value:`polite`}},when:[`slot:error`],children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[{tag:`path`,class:`ty-checkbox__error-glyph`,attrs:{d:{value:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 8v4M12 16h.01`}}}]},{tag:`span`,class:`ty-checkbox__error-text`,children:[{slot:`error`}]}]}]},examples:[{name:`off`,props:{},slots:{default:`Notify me`}},{name:`on-with-description`,props:{checked:!0,name:`notify`,value:`email`},slots:{default:`Notify me`,description:`By email`}},{name:`bare`,props:{appearance:`bare`,testId:`newsletter`},slots:{default:`Newsletter`}},{name:`indeterminate`,props:{indeterminate:!0},slots:{default:`Select all`}},{name:`invalid-required`,props:{required:!0},slots:{default:`I accept the terms`,error:`Required`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Notifications`},slots:{}}]};var Fn=class extends s{static definition=Pn;#e=null;get input(){return this.querySelector(`.ty-checkbox__row > input`)}#t=e=>{let t=this.input;e.target===t&&t&&(this.toggleAttribute(`checked`,t.checked),this.hasAttribute(`indeterminate`)&&(this.removeAttribute(`indeterminate`),t.indeterminate=!1))};#n=()=>{setTimeout(()=>{let e=this.input;e&&this.toggleAttribute(`checked`,e.checked)})};#r(){let e=this.input;e&&(e.indeterminate=this.hasAttribute(`indeterminate`))}connected(){this.addEventListener(`change`,this.#t),this.#e=this.input?.form??null,this.#e?.addEventListener(`reset`,this.#n),this.#r()}disconnected(){this.removeEventListener(`change`,this.#t),this.#e?.removeEventListener(`reset`,this.#n),this.#e=null}changed(){this.#r()}};const In=(e,t)=>({tag:e,class:`ty-drawer__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),Ln={tag:`ty-drawer`,name:`TyDrawer`,kind:`enhancing`,doc:"Modal panel sliding in from an edge of the viewport for a secondary task: a backdrop, a panel anchored to the bottom (sheet) or end (side panel) edge, a header with the title and an always-present close button, an optional grab handle, a scrolling body and a bottom safe-area inset. Controlled through `open`; the element asks to close with `ty-open-change` (Escape, close button, an allowed backdrop press, a drag past the threshold) and the host flips `open`. Focus moves into the panel on open, is trapped while open, and returns to the invoking element on close; the page behind is inert and does not scroll.",props:{open:{type:`boolean`,attribute:`open`,doc:"Shown (controlled). The anatomy stays mounted but `hidden` while closed, so nothing reaches the accessibility tree."},placement:{type:`enum`,values:[`bottom`,`end`],default:`bottom`,attribute:`placement`,doc:"The edge the panel attaches to; `end` follows the reading direction."},width:{type:`enum`,values:[`medium`,`large`,`wide`],default:`medium`,attribute:`width`,doc:`Maximum width step of an end-placed panel.`},maxHeight:{type:`string`,attribute:`max-height`,doc:"Maximum height of a bottom-placed panel (a CSS length, e.g. `85dvh`); applied to the panel on upgrade."},showHandle:{type:`string`,attribute:`show-handle`,doc:"`true` or `false`; unset: the grab handle shows on bottom placement."},dismissible:{type:`string`,attribute:`dismissible`,doc:"`true` or `false`; unset (or `true`): a backdrop press and a drag past the threshold dismiss. Escape and the close button always work."},closeLabel:{type:`string`,default:`Close`,attribute:`close-label`,doc:`Accessible name of the close button.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name of the dialog when the title slot is empty.`},panelTestId:{type:`string`,attribute:`panel-test-id`,doc:"Test hook on the panel (`data-testid`)."},backdropTestId:{type:`string`,attribute:`backdrop-test-id`,doc:"Test hook on the backdrop (`data-testid`)."}},events:[{type:`ty-open-change`,kind:`custom`,detail:{open:`boolean`},reactProp:`onOpenChange`,doc:"The element asks the host to change visibility — `open: false` on Escape, the close button, an allowed backdrop press or a drag past the threshold. Controlled: the element does not close itself; the host flips `open`."}],slots:{title:{doc:"The visible heading; also the accessible name (`accessibleLabel` when empty)."},default:{doc:`The body; scrolls when long.`}},anatomy:{tag:`div`,class:`ty-drawer__backdrop`,attrs:{hidden:{value:``,when:[`!open`]},"data-placement":{prop:`placement`},"data-testid":{prop:`backdropTestId`}},children:[{tag:`div`,class:`ty-drawer`,attrs:{"data-placement":{prop:`placement`},"data-width":{prop:`width`}},children:[{tag:`div`,class:`ty-drawer__dialog`,attrs:{role:{value:`dialog`},"aria-modal":{value:`true`},tabindex:{value:`-1`},"aria-labelledby":{idref:`title`,when:[`slot:title`]},"aria-label":{prop:`accessibleLabel`,when:[`!slot:title`]},"data-testid":{prop:`panelTestId`}},children:[{tag:`header`,class:`ty-drawer__header`,children:[{tag:`span`,class:`ty-drawer__handle`,when:[`placement:bottom`,`!showHandle:false`],attrs:{"aria-hidden":{value:`true`}}},{tag:`h2`,class:`ty-drawer__title`,when:[`slot:title`],attrs:{id:{idref:`title`}},children:[{slot:`title`}]},{tag:`button`,class:`ty-button ty-drawer__close`,attrs:{type:{value:`button`},"aria-label":{prop:`closeLabel`},title:{prop:`closeLabel`},"data-variant":{value:`quiet`},"data-size":{value:`compact`},"data-shape":{value:`circle`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[((e,t=`ty-icon`)=>({tag:`svg`,class:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}))([In(`path`,{d:`M18 6 6 18`}),In(`path`,{d:`m6 6 12 12`})])]}]}]},{tag:`div`,class:`ty-drawer__body`,when:[`slot:default`],children:[{slot:`default`}]},{tag:`div`,class:`ty-drawer__inset`,when:[`placement:bottom`],attrs:{"aria-hidden":{value:`true`}}}]}]}]},examples:[{name:`closed`,props:{},slots:{}},{name:`bottom`,props:{open:!0},slots:{title:`Language`,default:`Pick a locale.`}},{name:`end-wide`,props:{open:!0,placement:`end`,width:`wide`},slots:{title:`Run details`,default:`Timeline.`}},{name:`no-handle`,props:{open:!0,showHandle:`false`},slots:{title:`Filters`,default:`Filter rows.`}},{name:`not-dismissible`,props:{open:!0,dismissible:`false`},slots:{title:`Required step`,default:`Finish the form.`}},{name:`max-height`,props:{open:!0,maxHeight:`60dvh`},slots:{title:`Shortcuts`,default:`Keys.`}}]},Rn=`data-ty-drawer-inert`;let R=0;const zn=()=>{++R===1&&document.documentElement.setAttribute(`data-ty-drawer-open`,``)},Bn=()=>{R>0&&--R===0&&document.documentElement.removeAttribute(`data-ty-drawer-open`)};var Vn=class extends s{static definition=Ln;#e=!1;#t=null;#n=[];#r=!1;#i=null;connected(){this.addEventListener(`keydown`,this.#g),this.addEventListener(`mousedown`,this.#_),this.addEventListener(`click`,this.#v),this.addEventListener(`pointerdown`,this.#y),this.addEventListener(`pointermove`,this.#b),this.addEventListener(`pointerup`,this.#x),this.addEventListener(`pointercancel`,this.#x),requestAnimationFrame(()=>this.#l()),this.props.open&&this.#u()}disconnected(){this.removeEventListener(`keydown`,this.#g),this.removeEventListener(`mousedown`,this.#_),this.removeEventListener(`click`,this.#v),this.removeEventListener(`pointerdown`,this.#y),this.removeEventListener(`pointermove`,this.#b),this.removeEventListener(`pointerup`,this.#x),this.removeEventListener(`pointercancel`,this.#x),this.#d(!0)}changed(){this.isConnected&&(requestAnimationFrame(()=>this.#l()),this.props.open?this.#u():this.#d(!0))}get#a(){return this.getAttribute(`dismissible`)!==`false`}#o(){return this.querySelector(`.ty-drawer__backdrop`)}#s(){return this.querySelector(`.ty-drawer`)}#c(){return this.querySelector(`.ty-drawer__dialog`)}#l(){let e=this.#s();if(!e)return;let t=this.props.placement===`bottom`?String(this.props.maxHeight??``):``;e.style.maxBlockSize!==t&&(e.style.maxBlockSize=t)}#u(){if(this.#e)return;this.#e=!0;let e=document.activeElement;this.#t=e instanceof HTMLElement&&!this.contains(e)?e:null,zn(),this.#f(),requestAnimationFrame(()=>{if(this.isConnected&&this.props.open){this.#m();for(let e of this.querySelectorAll(`.ty-drawer__backdrop, .ty-drawer`))e.setAttribute(`data-entering`,``),e.addEventListener(`animationend`,()=>e.removeAttribute(`data-entering`),{once:!0})}})}#d(e){if(!this.#e)return;this.#e=!1,this.#S(),Bn();for(let e of this.#n)e.getAttribute(Rn)!==null&&(e.removeAttribute(`inert`),e.removeAttribute(Rn));this.#n=[];let t=this.#t;this.#t=null,e&&t?.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}#f(){let e=this;for(;e&&e!==document.body;){let t=e.parentElement;if(!t)break;for(let n of Array.from(t.children))n===e||n.hasAttribute(`inert`)||(n.setAttribute(`inert`,``),n.setAttribute(Rn,``),this.#n.push(n));e=t}}#p(){let e=this.#s();return e?Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.closest(`[hidden]`)):[]}#m(){let e=this.#c();if(!e)return;let t=document.activeElement;if(t instanceof HTMLElement&&e.contains(t))return;let n=e.querySelector(`[data-autofocus]`);if(n){n.focus();return}(this.#p()[0]??e).focus()}#h(){this.emit(`ty-open-change`,{open:!1})}#g=e=>{let t=e.key;if(t===`Escape`){if(e.isComposing)return;e.preventDefault(),e.stopPropagation(),this.#h();return}if(t!==`Tab`)return;let n=this.#p(),r=this.#c();if(!r)return;e.preventDefault(),e.stopPropagation();let i=e.shiftKey;if(!n.length){r.focus();return}let a=n.indexOf(document.activeElement);n[a===-1?i?n.length-1:0:(a+(i?-1:1)+n.length)%n.length].focus()};#_=e=>{this.#r=e.target===this.#o(),this.#r&&e.preventDefault()};#v=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-drawer__close`);if(n&&this.contains(n)){this.#h();return}t===this.#o()&&this.#r&&this.#a&&this.#h(),this.#r=!1};#y=e=>{let t=e;if(!this.props.open||!this.#a||this.props.placement!==`bottom`||t.button!==void 0&&t.button>0)return;let n=this.querySelector(`.ty-drawer__header`),r=t.target;n&&r&&typeof r.closest==`function`&&(r.closest(`.ty-drawer__header`)!==n||r.closest(`button`)||(this.#i={y:t.clientY,t:t.timeStamp||performance.now()},n.setPointerCapture?.(t.pointerId)))};#b=e=>{let t=this.#i;if(!t)return;let n=this.#s(),r=this.#o(),i=Math.max(0,e.clientY-t.y);n&&(n.style.transition=`none`,n.style.transform=i>0?`translateY(${i}px)`:``,n.toggleAttribute(`data-dragging`,i>0)),r&&(r.style.opacity=String(Math.max(.2,1-i/400)))};#x=e=>{let t=this.#i;if(!t)return;let n=e,r=e.type===`pointercancel`,i=Math.max(0,n.clientY-t.y),a=Math.max(1,(n.timeStamp||performance.now())-t.t);this.#S(),!r&&(i>=120||i/a>=.6)&&this.#h()};#S(){this.#i=null;let e=this.#s();e&&(e.style.transition=``,e.style.transform=``,e.removeAttribute(`data-dragging`));let t=this.#o();t&&(t.style.opacity=``)}};const Hn={tag:`ty-gradient-mark`,name:`TyGradientMark`,kind:`enhancing`,doc:"App-icon style badge: a rounded square filled with the brand gradient, holding an arbitrary glyph (the default slot). Named by `label` (an img role) or decorative without one. The gradient and corner radius default to token values and can be overridden per instance with CSS values.",props:{label:{type:`string`,attribute:`label`,doc:"Accessible name; set it and the badge is an img role, leave it out and the badge is decorative (`aria-hidden`)."},size:{type:`enum`,values:[`small`,`medium`,`large`],default:`medium`,attribute:`size`,doc:`Badge size step (24 / 32 / 48 px from the spacing scale).`},gradient:{type:`string`,attribute:`gradient`,doc:"CSS gradient image of the badge (e.g. `linear-gradient(135deg, #e11d48, #7c3aed)`); the default is the token brand gradient (`--ty-info` → `--ty-brand` → `--ty-brand-strong`). Applied as the `--ty-gradient-mark-gradient` custom property when the element upgrades."},radius:{type:`string`,attribute:`radius`,doc:"CSS corner-radius override (a length or `50%` for a circle); the default is a squircle scaled from the size. Applied as the `--ty-gradient-mark-radius` custom property when the element upgrades."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the badge (`data-testid`)."}},events:[],slots:{default:{doc:"The glyph inside the badge (an icon or an initial); decorative — the badge is named by `label`."}},anatomy:{tag:`span`,class:`ty-gradient-mark`,attrs:{role:{value:`img`,when:[`label`]},"aria-label":{prop:`label`},"aria-hidden":{value:`true`,when:[`!label`]},"data-size":{prop:`size`},"data-testid":{prop:`testId`}},children:[{tag:`span`,class:`ty-gradient-mark__glyph`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:default`],children:[{slot:`default`}]}]},examples:[{name:`default`,props:{label:`Northstar`},slots:{default:`N`}},{name:`small`,props:{label:`Northstar`,size:`small`},slots:{default:`N`}},{name:`large`,props:{label:`Northstar`,size:`large`},slots:{default:`N`}},{name:`decorative`,props:{},slots:{default:`◆`}},{name:`no-glyph`,props:{label:`Northstar`},slots:{}}]};var Un=class extends s{static definition=Hn;sync(){super.sync();let e=this.anatomyRoot();e&&(this.#e(e,`gradient`,`--ty-gradient-mark-gradient`),this.#e(e,`radius`,`--ty-gradient-mark-radius`))}#e(e,t,n){let r=this.getAttribute(t);r===null||r===``?e.style.removeProperty(n):e.style.setProperty(n,r)}};const Wn=[`danger`,`warning`,`info`,`success`],Gn=[`p`,`h2`,`h3`,`h4`],Kn=e=>e[0].toUpperCase()+e.slice(1),qn=e=>Wn.map(t=>({tag:`span`,class:`ty-visually-hidden`,when:e?[`!slot:title`,`tone:${t}`]:[`tone:${t}`],children:[{text:{prop:`toneWord${Kn(t)}`}}]})),z=(e,t)=>({tag:e,class:`ty-notice__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),B=(e,t)=>({tag:`svg`,class:`ty-icon`,when:[`!slot:icon`,`tone:${e}`],attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:t}),V=z(`circle`,{cx:`12`,cy:`12`,r:`10`}),Jn={tag:`ty-inline-notice`,name:`TyInlineNotice`,kind:`enhancing`,doc:'Short message about the state of a form, section or page. Assertive tones (danger and warning unless `urgency` says otherwise) are `role="alert"`, polite ones `role="status"`; a visually hidden tone word precedes the message. Dismissal is the host\'s: the element emits `ty-dismiss` and moves focus to the next logical element.',props:{tone:{type:`enum`,values:Wn,default:`info`,attribute:`tone`,doc:`Semantic tone; colours the surface and picks the default icon and tone word.`},align:{type:`enum`,values:[`start`,`centre`],default:`start`,attribute:`align`,doc:"`centre` only for short single-message confirmations."},urgency:{type:`enum`,values:[`polite`,`assertive`,`none`],attribute:`urgency`,doc:"How the notice is announced when it appears; unset: assertive for danger and warning, polite otherwise. `none` (no live role) for notices present on page load."},titleAs:{type:`enum`,values:Gn,default:`p`,attribute:`title-as`,doc:`Element for the title; a plain strong paragraph unless configured.`},dismissible:{type:`boolean`,attribute:`dismissible`,doc:"Shows the dismiss button; the host removes the notice on `ty-dismiss`."},dismissLabel:{type:`string`,attribute:`dismiss-label`,default:`Dismiss`,doc:`Accessible name of the dismiss button.`},toneWordDanger:{type:`string`,attribute:`tone-word-danger`,default:`Error: `,doc:`Visually hidden word announced before a danger notice.`},toneWordWarning:{type:`string`,attribute:`tone-word-warning`,default:`Warning: `,doc:`Visually hidden word announced before a warning notice.`},toneWordInfo:{type:`string`,attribute:`tone-word-info`,default:`Information: `,doc:`Visually hidden word announced before an info notice.`},toneWordSuccess:{type:`string`,attribute:`tone-word-success`,default:`Success: `,doc:`Visually hidden word announced before a success notice.`}},events:[{type:`ty-dismiss`,kind:`custom`,reactProp:`onDismiss`,doc:`The dismiss button was pressed; the host removes the notice. Focus has moved to the next logical element.`}],slots:{default:{doc:`The message body.`},title:{doc:`Short heading above the message.`},icon:{doc:`Overrides the tone's icon (decorative).`},actions:{doc:`Buttons or links below the message (up to two).`}},anatomy:{tag:`div`,class:`ty-notice`,attrs:{role:{prop:`urgency`,kind:`map`,values:{assertive:`alert`,polite:`status`},fallback:{prop:`tone`,values:{danger:`alert`,warning:`alert`,info:`status`,success:`status`}}},"data-tone":{prop:`tone`},"data-align":{prop:`align`}},children:[{tag:`span`,class:`ty-notice__icon`,attrs:{"aria-hidden":{value:`true`}},children:[B(`danger`,[V,z(`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}),z(`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`})]),B(`warning`,[z(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),z(`path`,{d:`M12 9v4`}),z(`path`,{d:`M12 17h.01`})]),B(`info`,[V,z(`path`,{d:`M12 16v-4`}),z(`path`,{d:`M12 8h.01`})]),B(`success`,[V,z(`path`,{d:`m16 9-5.5 5.5L8 12`})]),{slot:`icon`,when:[`slot:icon`]}]},{tag:`div`,class:`ty-notice__body`,children:[...Gn.map(e=>({tag:e,class:`ty-notice__title`,when:[`slot:title`,`titleAs:${e}`],children:[...qn(!1),{slot:`title`}]})),{tag:`div`,class:`ty-notice__message`,children:[...qn(!0),{slot:`default`}]},{tag:`div`,class:`ty-notice__actions`,when:[`slot:actions`],children:[{slot:`actions`}]}]},{tag:`button`,class:`ty-button ty-notice__dismiss`,when:[`dismissible`],attrs:{type:{value:`button`},"data-variant":{value:`quiet`},"data-size":{value:`compact`},"data-icon-only":{value:``},"aria-label":{prop:`dismissLabel`}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[z(`path`,{d:`M18 6 6 18`}),z(`path`,{d:`m6 6 12 12`})]}]}]}]},examples:[{name:`info`,props:{},slots:{default:`Unseal the vault to run workflows that use credentials.`}},{name:`danger-title`,props:{tone:`danger`},slots:{title:`Vault sealed`,default:`Unseal it to run workflows that use credentials.`}},{name:`warning-heading`,props:{tone:`warning`,titleAs:`h3`},slots:{title:`Two sources unavailable`,default:`Results may be incomplete.`}},{name:`success-dismissible`,props:{tone:`success`,dismissible:!0},slots:{default:`Version 12 is live.`}},{name:`centred-actions`,props:{align:`centre`,urgency:`none`},slots:{default:`Nothing to review.`,actions:`Help`}},{name:`custom-icon`,props:{},slots:{icon:`★`,default:`Starred runs appear first.`}}]};var Yn=class extends s{static definition=Jn;#e=e=>{let t=e.target?.closest?.(`.ty-notice__dismiss`);if(!t||!this.contains(t))return;let n=Array.from(document.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)),r=n.find(e=>!this.contains(e)&&this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)??[...n].reverse().find(e=>!this.contains(e))??null;this.emit(`ty-dismiss`),r&&setTimeout(()=>r.isConnected&&r.focus(),0)};connected(){this.addEventListener(`click`,this.#e)}disconnected(){this.removeEventListener(`click`,this.#e)}};const H={tag:`ty-link`,name:`TyLink`,kind:`enhancing`,doc:`Moves to another location. A native <a> inside, so focus, keyboard activation and opening in a new context are the platform's; an external destination opens in a new context with a safe rel, an icon and a screen-reader hint.`,props:{href:{type:`string`,attribute:`href`,doc:`Destination. The element is a navigation link; an inline action without one is a plain <button class="ty-link" data-action="">`},emphasis:{type:`enum`,values:[`underlined`,`subtle`],default:`underlined`,attribute:`emphasis`,doc:"`subtle` hides the underline at rest (only where the context makes the link obvious)."},external:{type:`boolean`,attribute:`external`,doc:'Opens in a new context with `rel="noopener noreferrer"`, an icon and a screen-reader hint. Inferred on upgrade from absolute URLs to another origin; hosts render it explicitly.'},current:{type:`boolean`,attribute:`current`,doc:'Marks the link as the current page (`aria-current="page"`).'},standalone:{type:`boolean`,attribute:`standalone`,doc:`Standalone links (lists, footers) get a 44 px tall hit area; inline prose links do not.`},newTabLabel:{type:`string`,attribute:`new-tab-label`,default:`(opens in a new tab)`,doc:`Screen-reader hint appended to an external link's name on upgrade; translate through this attribute.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:"Accessible name when the visible text is not enough (`aria-label`)."},describedBy:{type:`string`,attribute:`described-by`,doc:"Id of an element describing the link (`aria-describedby`)."}},events:[{type:`click`,kind:`native`,reactProp:`onClick`,doc:`The native click of the anchor.`}],slots:{default:{doc:`The link text.`}},anatomy:{tag:`a`,class:`ty-link`,attrs:{href:{prop:`href`},target:{value:`_blank`,when:[`external`]},rel:{value:`noopener noreferrer`,when:[`external`]},"aria-current":{value:`page`,when:[`current`]},"aria-label":{prop:`accessibleLabel`},"aria-describedby":{prop:`describedBy`},"data-emphasis":{prop:`emphasis`},"data-standalone":{prop:`standalone`,kind:`flag`}},children:[{slot:`default`},{tag:`svg`,class:`ty-icon ty-mirror-rtl ty-link__external`,when:[`external`],attrs:{"aria-hidden":{value:`true`},focusable:{value:`false`},width:{value:`24`},height:{value:`24`},viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`}},children:[{tag:`path`,attrs:{d:{value:`M15 3h6v6`}}},{tag:`path`,attrs:{d:{value:`M10 14 21 3`}}},{tag:`path`,attrs:{d:{value:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}}]},{tag:`span`,class:`ty-visually-hidden ty-link__hint`,when:[`external`]}]},examples:[{name:`inline`,props:{href:`/runs`},slots:{default:`Runs`}},{name:`subtle-standalone`,props:{href:`/runs/01HX`,emphasis:`subtle`,standalone:!0},slots:{default:`Details`}},{name:`external`,props:{href:`https://example.org/report`,external:!0},slots:{default:`Report`}},{name:`current`,props:{href:`/overview`,current:!0},slots:{default:`Overview`}},{name:`translated-hint`,props:{href:`https://example.org/relatorio`,external:!0,newTabLabel:`(abre em nova aba)`,describedBy:`report-hint`},slots:{default:`Relatório`}}]};function Xn(e){if(!/^https?:\/\//i.test(e))return!1;try{let t=typeof window<`u`?window.location.origin:``;return new URL(e).origin!==t}catch{return!1}}var Zn=class extends s{static definition=H;get props(){let e=super.props;return!this.hasAttribute(`external`)&&typeof e.href==`string`&&(e.external=Xn(e.href)),e}sync(){super.sync();let e=this.querySelector(`.ty-link__hint`);if(!e)return;let t=` ${this.getAttribute(`new-tab-label`)??String(H.props.newTabLabel.default)}`;e.textContent!==t&&(e.textContent=t)}};const Qn=(e,t)=>({tag:e,class:`ty-modal-dialog__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),$n={tag:`ty-modal`,name:`TyModal`,kind:`enhancing`,doc:"Focused modal window for a decision or a short form: a backdrop and a panel (title, optional description, scrolling body, actions row, optional close button). Controlled through `open`; the element asks to close with `ty-open-change` (Escape, the close button, an allowed backdrop press) and the host flips `open`. Focus moves into the panel on open, is trapped while open, and returns to the invoking element on close; the page behind is inert and does not scroll.",props:{isOpen:{type:`boolean`,attribute:`open`,doc:"Shown (controlled). The anatomy stays mounted but `hidden` while closed, so nothing reaches the accessibility tree."},width:{type:`enum`,values:[`narrow`,`regular`,`wide`,`xwide`],default:`regular`,attribute:`width`,doc:`Maximum panel width step.`},role:{type:`enum`,values:[`dialog`,`alertdialog`],default:`dialog`,attribute:`dialog-role`,doc:"`alertdialog` for destructive or blocking confirmations: the backdrop never dismisses it and the close button is hidden, unless the props below say otherwise."},dismissOnBackdrop:{type:`string`,attribute:`dismiss-on-backdrop`,doc:"`true` or `false`; unset: the backdrop dismisses a `dialog`, never an `alertdialog`."},showCloseButton:{type:`string`,attribute:`show-close-button`,doc:"`true` or `false`; unset: shown on a `dialog`, hidden on an `alertdialog`."},initialFocus:{type:`enum`,values:[`first`,`title`],default:`first`,attribute:`initial-focus`,doc:"Where focus lands on open; a `[data-autofocus]` control inside wins either way. Unset on an `alertdialog`: the first action (the least destructive, by convention)."},busy:{type:`boolean`,attribute:`busy`,doc:"An action is pending: closing (Escape, the backdrop, the close button) is disabled and the panel is `aria-busy`."},closeLabel:{type:`string`,default:`Close`,attribute:`close-label`,doc:`Accessible name of the close button.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:"Accessible name of the panel when the title slot is empty and no `labelledBy` is given."},labelledBy:{type:`string`,attribute:`labelled-by`,doc:"`aria-labelledby` of the panel (a host that renders its own title element), joined before the title slot's heading."},describedBy:{type:`string`,attribute:`described-by`,doc:"`aria-describedby` of the panel, joined before the description slot's paragraph."},panelTestId:{type:`string`,attribute:`panel-test-id`,doc:"Test hook on the panel (`data-testid`)."},backdropTestId:{type:`string`,attribute:`backdrop-test-id`,doc:"Test hook on the backdrop (`data-testid`)."}},events:[{type:`ty-open-change`,kind:`custom`,detail:{open:`boolean`},reactProp:`onOpenChange`,doc:"The element asks the host to change visibility — `open: false` on Escape, the close button or an allowed backdrop press. Controlled: the element does not close itself; the host flips `isOpen`."}],slots:{title:{doc:"The accessible name, rendered as the panel's heading (required by the spec; `accessibleLabel` or `labelledBy` names the panel when it is empty)."},description:{doc:`Accessible description under the header.`},default:{doc:`The body; scrolls when long while the header and the actions stay visible.`},actions:{doc:"The actions row (primary last on the end side). Pressing an action runs its own handler; the dialog stays open unless the host flips `isOpen`."}},anatomy:{tag:`div`,class:`ty-modal-dialog__backdrop`,attrs:{hidden:{value:``,when:[`!isOpen`]},"data-testid":{prop:`backdropTestId`}},children:[{tag:`div`,class:`ty-modal-dialog`,attrs:{"data-width":{prop:`width`}},children:[{tag:`div`,class:`ty-modal-dialog__panel`,attrs:{role:{prop:`role`},"aria-modal":{value:`true`},tabindex:{value:`-1`},"aria-labelledby":{idrefs:[{prop:`labelledBy`},{id:`title`,when:[`slot:title`]}]},"aria-describedby":{idrefs:[{prop:`describedBy`},{id:`description`,when:[`slot:description`]}]},"aria-label":{prop:`accessibleLabel`,when:[`!slot:title`,`!labelledBy`]},"data-busy":{prop:`busy`,kind:`flag`},"data-testid":{prop:`panelTestId`}},children:[{tag:`div`,class:`ty-modal-dialog__inner`,attrs:{"aria-busy":{prop:`busy`,kind:`bool`}},children:[{tag:`header`,class:`ty-modal-dialog__header`,when:[`slot:title|showCloseButton:true|!role:alertdialog`,`slot:title|!showCloseButton:false`],children:[{tag:`h2`,class:`ty-modal-dialog__title`,when:[`slot:title`],attrs:{id:{idref:`title`},tabindex:{value:`-1`}},children:[{slot:`title`}]},{tag:`button`,class:`ty-button ty-modal-dialog__close`,when:[`!showCloseButton:false`,`showCloseButton:true|!role:alertdialog`],attrs:{type:{value:`button`},"aria-label":{prop:`closeLabel`},title:{prop:`closeLabel`},disabled:{prop:`busy`,kind:`boolean-attr`},"data-variant":{value:`quiet`},"data-size":{value:`compact`},"data-shape":{value:`circle`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[((e,t=`ty-icon`)=>({tag:`svg`,class:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}))([Qn(`path`,{d:`M18 6 6 18`}),Qn(`path`,{d:`m6 6 12 12`})])]}]}]},{tag:`p`,class:`ty-modal-dialog__description`,when:[`slot:description`],attrs:{id:{idref:`description`}},children:[{slot:`description`}]},{tag:`div`,class:`ty-modal-dialog__body`,when:[`slot:default`],children:[{slot:`default`}]},{tag:`footer`,class:`ty-modal-dialog__actions`,when:[`slot:actions`],children:[{slot:`actions`}]}]}]}]}]},examples:[{name:`closed`,props:{},slots:{}},{name:`open`,props:{isOpen:!0},slots:{title:`Delete file?`,default:`This cannot be undone.`,actions:`Delete`}},{name:`open-description`,props:{isOpen:!0},slots:{title:`Invite member`,description:`They get an email with a link.`,default:`Form fields`,actions:`Invite`}},{name:`alertdialog`,props:{isOpen:!0,role:`alertdialog`},slots:{title:`Discard changes?`,default:`Your edits are not saved.`,actions:`Discard`}},{name:`wide-busy`,props:{isOpen:!0,width:`wide`,busy:!0},slots:{title:`Publishing`,default:`Uploading the bundle.`}},{name:`no-close-button`,props:{isOpen:!0,showCloseButton:`false`},slots:{title:`Terms of service`,default:`Scroll to the end.`,actions:`Accept`}}]},U=`data-ty-modal-inert`;let W=0;const er=()=>{++W===1&&document.documentElement.setAttribute(`data-ty-modal-open`,``)},tr=()=>{W>0&&--W===0&&document.documentElement.removeAttribute(`data-ty-modal-open`)};var nr=class extends s{static definition=$n;#e=!1;#t=null;#n=[];#r=!1;connected(){this.addEventListener(`keydown`,this.#f),this.addEventListener(`mousedown`,this.#p),this.addEventListener(`click`,this.#m),this.props.isOpen&&this.#a()}disconnected(){this.removeEventListener(`keydown`,this.#f),this.removeEventListener(`mousedown`,this.#p),this.removeEventListener(`click`,this.#m),this.#o(!0)}changed(){this.isConnected&&(this.props.isOpen?this.#a():this.#o(!0))}get#i(){let e=this.getAttribute(`dismiss-on-backdrop`);return e===null?this.props.role!==`alertdialog`:e!==`false`}#a(){if(this.#e)return;this.#e=!0;let e=document.activeElement;this.#t=e instanceof HTMLElement&&!this.contains(e)?e:null,er(),this.#s(),requestAnimationFrame(()=>{if(this.isConnected&&this.props.isOpen){this.#u();for(let e of this.querySelectorAll(`.ty-modal-dialog__backdrop, .ty-modal-dialog`))e.setAttribute(`data-entering`,``),e.addEventListener(`animationend`,()=>e.removeAttribute(`data-entering`),{once:!0})}})}#o(e){if(!this.#e)return;this.#e=!1,tr();for(let e of this.#n)e.getAttribute(U)!==null&&(e.removeAttribute(`inert`),e.removeAttribute(U));this.#n=[];let t=this.#t;this.#t=null,e&&t?.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}#s(){let e=this;for(;e&&e!==document.body;){let t=e.parentElement;if(!t)break;for(let n of Array.from(t.children))n===e||n.hasAttribute(`inert`)||(n.setAttribute(`inert`,``),n.setAttribute(U,``),this.#n.push(n));e=t}}#c(){return this.querySelector(`.ty-modal-dialog__panel`)}#l(){let e=this.#c();return e?Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.closest(`[hidden]`)):[]}#u(){let e=this.#c();if(!e)return;let t=document.activeElement;if(t instanceof HTMLElement&&e.contains(t))return;let n=e.querySelector(`[data-autofocus]`);if(n){n.focus();return}if(this.props.initialFocus===`title`){e.querySelector(`.ty-modal-dialog__title`)?.focus();return}let r=this.#l();if(this.props.role===`alertdialog`&&!this.hasAttribute(`initial-focus`)){let t=e.querySelector(`.ty-modal-dialog__actions button:not([disabled])`);if(t){t.focus();return}}(r[0]??e).focus()}#d(){this.props.busy||this.emit(`ty-open-change`,{open:!1})}#f=e=>{let t=e.key;if(t===`Escape`){if(e.isComposing||this.props.busy)return;e.preventDefault(),e.stopPropagation(),this.#d();return}if(t!==`Tab`)return;let n=this.#l(),r=this.#c();if(!r)return;e.preventDefault(),e.stopPropagation();let i=e.shiftKey;if(!n.length){r.focus();return}let a=n.indexOf(document.activeElement);n[a===-1?i?n.length-1:0:(a+(i?-1:1)+n.length)%n.length].focus()};#p=e=>{this.#r=e.target===this.querySelector(`.ty-modal-dialog__backdrop`),this.#r&&e.preventDefault()};#m=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-modal-dialog__close`);if(n&&this.contains(n)){this.#d();return}t===this.querySelector(`.ty-modal-dialog__backdrop`)&&this.#r&&this.#i&&this.#d(),this.#r=!1}};const G=(e,t)=>({tag:e,class:`ty-popover__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),rr={tag:`ty-popover`,name:`TyPopover`,kind:`enhancing`,doc:"Non-modal floating panel anchored to a trigger, for short explanations or arbitrary small content (help text, a mini form, a brand menu). The trigger is the host's own focusable element in the trigger slot — or the built-in info button when the slot is empty and `triggerLabel` names it. The element wires aria-expanded on the trigger, places the panel with the shared placement model (side preference, collision flip, viewport clamp, arrow inset), and asks to close with `ty-open-change` on Escape, an outside press, or focus leaving the panel; the host flips `open`. Not a focus trap — content that needs one is a dialog, not a popover.",props:{open:{type:`boolean`,attribute:`open`,doc:"Shown (controlled). The anatomy stays mounted but `hidden` while closed, so nothing reaches the accessibility tree."},triggerLabel:{type:`string`,attribute:`trigger-label`,doc:`Accessible name of the built-in info trigger (required when the trigger slot is empty).`},title:{type:`string`,attribute:`title`,doc:`Heading at the top of the panel; also its accessible name.`},placement:{type:`enum`,values:[`top`,`end`,`bottom`,`start`],default:`bottom`,attribute:`placement`,doc:"Preferred side; `start`/`end` follow the reading direction. Flips when there is no room."},align:{type:`enum`,values:[`start`,`center`,`end`],default:`center`,attribute:`align`,doc:`Alignment along the chosen side.`},offset:{type:`string`,default:`2`,attribute:`offset`,doc:`Gap between trigger and panel as a step of the spacing scale (0–9); the arrow's inset is added to it.`},showArrow:{type:`string`,attribute:`show-arrow`,doc:"`true` or `false`; unset: the arrow shows."},panelTestId:{type:`string`,attribute:`panel-test-id`,doc:"Test hook on the panel (`data-testid`)."},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:"Accessible name of the panel when `title` is empty."}},events:[{type:`ty-open-change`,kind:`custom`,detail:{open:`boolean`},reactProp:`onOpenChange`,doc:"The element asks the host to change visibility — `open: false` on Escape, an outside press or focus leaving the panel, `open: true` on a trigger activation. Controlled: the element does not toggle itself; the host flips `open`."}],slots:{trigger:{doc:`The host's own toggle — any single focusable element; wired to the panel (aria-expanded, activation). Empty: the built-in info button.`},default:{doc:`The panel body.`}},anatomy:{tag:`div`,class:`ty-popover__anchor`,attrs:{},children:[{tag:`button`,class:`ty-button ty-popover__trigger`,when:[`!slot:trigger`],attrs:{type:{value:`button`},"aria-label":{prop:`triggerLabel`},"aria-haspopup":{value:`dialog`},"data-variant":{value:`quiet`},"data-size":{value:`compact`},"data-shape":{value:`circle`},"data-icon-only":{value:``}},children:[{tag:`span`,class:`ty-button__icon`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[G(`circle`,{cx:`12`,cy:`12`,r:`10`}),G(`path`,{d:`M12 16v-4`}),G(`path`,{d:`M12 8h.01`})]}]}]},{slot:`trigger`,when:[`slot:trigger`]},{tag:`div`,class:`ty-popover`,attrs:{hidden:{value:``,when:[`!open`]},role:{value:`dialog`},"data-placement":{prop:`placement`},"data-testid":{prop:`panelTestId`}},children:[{tag:`div`,class:`ty-popover__arrow`,when:[`!showArrow:false`],attrs:{"aria-hidden":{value:`true`}}},{tag:`div`,class:`ty-popover__dialog`,children:[{tag:`h3`,class:`ty-popover__title`,when:[`title`],children:[{text:{prop:`title`}}]},{tag:`div`,class:`ty-popover__content`,when:[`slot:default`],children:[{slot:`default`}]}]}]}]},examples:[{name:`closed`,props:{triggerLabel:`Details`},slots:{}},{name:`info-open`,props:{open:!0,triggerLabel:`About this`,title:`What this means`},slots:{default:`A short explanation.`}},{name:`own-trigger`,props:{open:!0,placement:`top`,align:`start`},slots:{trigger:`Open`,default:`Anchored above, aligned to the start.`}},{name:`no-arrow`,props:{open:!0,triggerLabel:`Where`,title:`Somewhere`,showArrow:`false`},slots:{default:`Without a pointer.`}},{name:`offset-4`,props:{open:!0,triggerLabel:`Gap`,title:`Further away`,offset:`4`},slots:{default:`A wider gap.`}}]};var ir=class extends s{static definition=rr;#e=null;#t=0;connected(){super.connected?.(),this.addEventListener(`click`,this.#a),this.addEventListener(`keydown`,this.#o),this.props.open&&this.#s()}disconnected(){super.disconnected?.(),this.removeEventListener(`click`,this.#a),this.removeEventListener(`keydown`,this.#o),this.#c()}changed(){this.isConnected&&(this.#i(),this.props.open?this.#s():this.#c())}#n(){let e=this.querySelector(`slot[name="trigger"]`)?.assignedElements({flatten:!0})[0]??this.querySelector(`.ty-popover__trigger`);return e instanceof HTMLElement?e:null}#r(){return this.querySelector(`.ty-popover`)}#i(){let e=this.#n(),t=this.#r();if(!e||!t)return;if(e.setAttribute(`aria-haspopup`,`dialog`),e.setAttribute(`aria-expanded`,this.props.open?`true`:`false`),!t.getAttribute(`aria-label`)){let e=String(this.props.title||this.props.accessibleLabel||``);e&&t.setAttribute(`aria-label`,e)}let n=t.id||=`ty-popover-panel-${crypto.randomUUID().slice(0,8)}`;e.setAttribute(`aria-controls`,n)}#a=e=>{let t=this.#n();t&&this.#u(e.target,t)&&(e.preventDefault(),this.requestOpen(!this.props.open))};#o=e=>{e.key===`Escape`&&this.props.open&&(e.stopPropagation(),this.requestOpen(!1))};requestOpen(e){this.emit(`ty-open-change`,{open:e})}#s(){if(this.#e)return;let e=new AbortController;this.#e=e,document.addEventListener(`pointerdown`,e=>{this.contains(e.target)||this.requestOpen(!1)},{signal:e.signal}),this.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t&&this.contains(t)||this.requestOpen(!1)},{signal:e.signal});let t=()=>this.#l();window.addEventListener(`resize`,t,{signal:e.signal}),window.addEventListener(`scroll`,t,{capture:!0,passive:!0,signal:e.signal}),requestAnimationFrame(()=>{if(!this.isConnected||!this.props.open)return;this.#l();let e=this.#r();e&&(e.setAttribute(`data-entering`,``),e.addEventListener(`animationend`,()=>e.removeAttribute(`data-entering`),{once:!0}))})}#c(){this.#e?.abort(),this.#e=null,this.#t&&cancelAnimationFrame(this.#t),this.#t=0;let e=this.#r();e&&e.style.removeProperty(`inset`)}#l(){let e=this.#n(),t=this.#r();if(!e||!t)return;let n=e.getBoundingClientRect(),r={x:n.x,y:n.y,width:n.width,height:n.height},i=getComputedStyle(t),a={width:t.offsetWidth+Number.parseFloat(i.marginLeft||`0`)+Number.parseFloat(i.marginRight||`0`),height:t.offsetHeight+Number.parseFloat(i.marginTop||`0`)+Number.parseFloat(i.marginBottom||`0`)},o={width:document.documentElement.clientWidth,height:window.innerHeight},s=getComputedStyle(this).direction===`rtl`,c=bn(String(this.props.placement||`bottom`),s),l=yn(Number(this.props.offset??2),this.getAttribute(`show-arrow`)!==`false`),u=Dn(r,a,o,c,String(this.props.align||`center`),l);this.#t=requestAnimationFrame(()=>{t.style.position=`fixed`,t.style.left=`${Math.round(u.x)}px`,t.style.top=`${Math.round(u.y)}px`,t.style.maxWidth=`${Math.max(0,o.width-32)}px`;let e=t.querySelector(`.ty-popover__arrow`);e&&(e.dataset.side=u.side),t.dataset.side=u.side})}#u(e,t){let n=e;for(;n;){if(n===t)return!0;if(n=n.parentElement??(n instanceof HTMLSlotElement,null),!n&&e instanceof Node){let t=e.assignedSlot;t&&(n=t)}}return!1}};const ar={tag:`ty-native-select`,name:`TyNativeSelect`,kind:`enhancing`,doc:`One value from a short list with the platform select. A native <select> inside, so the picker on touch devices, keyboard, screen-reader support and form participation are the platform's. The options are the host's children.`,props:{value:{type:`string`,attribute:`value`,doc:`The selected value; the element mirrors it into the control (while the user chooses, the live value is the control's own).`},placeholder:{type:`string`,attribute:`placeholder`,doc:`Text of the empty, disabled first option, shown while nothing is selected.`},name:{type:`string`,attribute:`name`,doc:`Form field name; the selected value is sent.`},required:{type:`boolean`,attribute:`required`,doc:`Native required; the form will not submit while the empty option is the selection.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},invalid:{type:`boolean`,attribute:`invalid`,doc:`Painted and announced as invalid without an error message (a surrounding field marks it).`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},labelledBy:{type:`string`,attribute:`labelled-by`,doc:"`aria-labelledby` from a surrounding field (used when there is no visible label and no `accessibleLabel`)."},describedBy:{type:`string`,attribute:`described-by`,doc:"`aria-describedby` from a surrounding field, joined before the select's own parts."},controlId:{type:`string`,attribute:`control-id`,doc:"Explicit id of the control (a surrounding field's control id); `<instance>-control` otherwise."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the native select (`data-testid`)."}},events:[{type:`change`,kind:`native`,detail:{value:`string`},reactProp:`onChange`,doc:"The native change of the select; `value` is the new value."}],slots:{default:{doc:"The `<option>` and `<optgroup>` children."},label:{doc:`The visible label above the control.`},hint:{doc:`Help text between the label and the control, announced as the description.`},error:{doc:`The error message; marks the control invalid and is announced.`}},anatomy:{tag:`div`,class:`ty-native-select`,attrs:{"data-invalid":{value:``,when:[`invalid|slot:error`]},"data-disabled":{prop:`disabled`,kind:`flag`}},children:[{tag:`label`,class:`ty-native-select__label`,when:[`slot:label`],attrs:{for:{idref:`control`,prop:`controlId`}},children:[{slot:`label`}]},{tag:`p`,class:`ty-native-select__hint`,when:[`slot:hint`],attrs:{id:{idref:`hint`}},children:[{slot:`hint`}]},{tag:`div`,class:`ty-native-select__frame`,children:[{tag:`select`,class:`ty-native-select__control`,attrs:{id:{idref:`control`,prop:`controlId`},name:{prop:`name`},required:{prop:`required`,kind:`boolean-attr`},disabled:{prop:`disabled`,kind:`boolean-attr`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:label`]},"aria-labelledby":{prop:`labelledBy`,when:[`!slot:label`,`!accessibleLabel`]},"aria-describedby":{idrefs:[{prop:`describedBy`},{id:`hint`,when:[`slot:hint`]},{id:`error`,when:[`slot:error`]}]},"aria-invalid":{value:`true`,when:[`invalid|slot:error`]},"data-testid":{prop:`testId`}},children:[{tag:`option`,class:`ty-native-select__placeholder`,when:[`placeholder`],attrs:{label:{prop:`placeholder`},value:{value:``},disabled:{value:`true`}}},{slot:`default`}]},{tag:`svg`,class:`ty-icon ty-native-select__chevron`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[{tag:`path`,class:`ty-native-select__chevron-path`,attrs:{d:{value:`m6 9 6 6 6-6`}}}]}]},{tag:`p`,class:`ty-native-select__error`,when:[`slot:error`],attrs:{id:{idref:`error`},role:{value:`alert`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:[{tag:`path`,class:`ty-native-select__error-glyph`,attrs:{d:{value:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20ZM12 8v4M12 16h.01`}}}]},{tag:`span`,class:`ty-native-select__error-text`,children:[{slot:`error`}]}]}]},examples:[{name:`labelled-placeholder`,props:{name:`region`,placeholder:`Choose a region…`},slots:{label:`Region`,default:`us-east-1`}},{name:`hint-required-value`,props:{name:`region`,required:!0,value:`us-east-1`},slots:{label:`Region`,hint:`Where the workflow runs`,default:`us-east-1`}},{name:`invalid-error`,props:{name:`region`},slots:{label:`Region`,error:`Pick a region`,default:`us-east-1`}},{name:`field-wired`,props:{controlId:`field-3-control`,describedBy:`field-3-description field-3-error`,invalid:!0,required:!0,name:`region`,testId:`region`,accessibleLabel:`Region`},slots:{error:`Required`,default:`us-east-1`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Region`},slots:{default:`us-east-1`}}]};var or=class extends s{static definition=ar;get select(){return this.querySelector(`select`)}#e=()=>{let e=this.select,t=this.getAttribute(`value`);e&&t!==null&&e.value!==t&&(e.value=t)};connected(){this.#e()}changed(){this.isConnected&&this.#e()}};const sr={tag:`ty-separator`,name:`TySeparator`,kind:`enhancing`,doc:'Thin rule between groups of content, optionally with a short caption centred on it ("or"). Decorative by default (`aria-hidden`); `semantic` exposes the non-focusable separator role. A captioned rule keeps the caption readable as plain text and the strokes decorative, so it never carries the role.',props:{orientation:{type:`enum`,values:[`horizontal`,`vertical`],default:`horizontal`,attribute:`orientation`,doc:`Direction of the rule; vertical takes the height of its row.`},emphasis:{type:`enum`,values:[`regular`,`soft`],default:`regular`,attribute:`emphasis`,doc:"Line strength: `--ty-line` or the fainter `--ty-line-soft`."},semantic:{type:`boolean`,attribute:`semantic`,doc:"Exposes the separator role (with `aria-orientation`); decorative otherwise."},spacing:{type:`enum`,values:[`none`,`regular`,`roomy`],default:`regular`,attribute:`spacing`,doc:`Margin step from the spacing scale.`}},events:[],slots:{caption:{doc:`Short text centred on the rule, such as "or"; readable plain text between the two decorative strokes.`}},anatomy:{tag:`div`,class:`ty-separator`,attrs:{role:{value:`separator`,when:[`semantic`,`!slot:caption`]},"aria-orientation":{prop:`orientation`,when:[`semantic`,`!slot:caption`]},"aria-hidden":{value:`true`,when:[`!semantic`,`!slot:caption`]},"data-orientation":{prop:`orientation`},"data-emphasis":{prop:`emphasis`},"data-spacing":{prop:`spacing`},"data-captioned":{value:``,when:[`slot:caption`]}},children:[{tag:`span`,class:`ty-separator__line`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:caption`]},{tag:`span`,class:`ty-separator__caption`,when:[`slot:caption`],children:[{slot:`caption`}]},{tag:`span`,class:`ty-separator__line`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:caption`]}]},examples:[{name:`decorative`,props:{},slots:{}},{name:`semantic`,props:{semantic:!0},slots:{}},{name:`semantic-vertical`,props:{semantic:!0,orientation:`vertical`},slots:{}},{name:`soft-roomy`,props:{emphasis:`soft`,spacing:`roomy`},slots:{}},{name:`caption`,props:{},slots:{caption:`or`}}]};var cr=class extends s{static definition=sr};const lr={tag:`ty-skeleton`,name:`TySkeleton`,kind:`enhancing`,doc:"Content-shaped placeholder, hidden from assistive technology; with `label`, one polite status announces the loading and the region is marked busy. Presets (stats, cards, section-heading, filters, analysis) are composed by the element on upgrade.",props:{shape:{type:`enum`,values:[`line`,`heading`,`circle`,`rect`],default:`line`,attribute:`shape`,doc:`Block form: a text line, a heading line, a circle (avatar) or a rectangle (media, a chart).`},width:{type:`string`,attribute:`width`,doc:'Named width (`short`, `medium`, `long`, `full`) or any CSS length; full width when unset. A custom length resolves on upgrade (`data-width="custom"` and an inline size).'},lines:{type:`number`,default:1,attribute:`lines`,doc:"Stacked text lines for the `line` and `heading` shapes, widths varied automatically (the last is short)."},preset:{type:`enum`,values:[`stats`,`cards`,`section-heading`,`filters`,`analysis`],attribute:`preset`,doc:`A composed skeleton instead of blocks; the element composes it on upgrade.`},count:{type:`number`,attribute:`count`,doc:`Repetitions of the preset (tiles, pills, items); the preset's default when unset.`},columns:{type:`number`,attribute:`columns`,doc:`Grid columns of a tiled preset (1 to 4); the preset's default when unset.`},label:{type:`string`,attribute:`label`,doc:"Announced once in a visually-hidden status while loading, the region marked `aria-busy` (the PageLoadingState pattern); unset, the skeleton is purely decorative and the host announces."}},events:[],anatomy:{tag:`span`,class:`ty-skeleton-root`,attrs:{"aria-busy":{prop:`label`,kind:`bool`}},children:[{tag:`span`,class:`ty-skeleton-content`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`span`,class:`ty-skeleton-lines`,when:[`!preset`,`shape:line|shape:heading`],children:[{tag:`span`,class:`ty-skeleton`,attrs:{"data-shape":{prop:`shape`},"data-width":{prop:`width`}}}]},{tag:`span`,class:`ty-skeleton`,when:[`!preset`,`shape:circle|shape:rect`],attrs:{"data-shape":{prop:`shape`},"data-width":{prop:`width`}}},{tag:`span`,class:`ty-skeleton-preset`,when:[`preset`],attrs:{"data-preset":{prop:`preset`}}}]},{tag:`span`,class:`ty-visually-hidden`,attrs:{role:{value:`status`}},when:[`label`],children:[{text:{prop:`label`}}]}]},examples:[{name:`line`,props:{},slots:{}},{name:`heading-short`,props:{shape:`heading`,width:`short`},slots:{}},{name:`circle`,props:{shape:`circle`},slots:{}},{name:`rect-medium`,props:{shape:`rect`,width:`medium`},slots:{}},{name:`announced`,props:{label:`Loading the catalogue`},slots:{}}]},ur=/* @__PURE__ */ new Set([`short`,`medium`,`long`,`full`]),dr=[`long`,`full`,`medium`];function K(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}const q=(e,t)=>Math.max(0,Math.floor(e??t));var fr=class extends s{static definition=lr;sync(){super.sync();let e=this.anatomyRoot();if(!e)return;let t=this.props,n=t.preset?String(t.preset):void 0;if(n){let r=e.querySelector(`.ty-skeleton-preset`);r&&r.replaceChildren(...this.#a(n,pr(t.count),pr(t.columns)));return}let r=t.width?String(t.width):void 0,i=String(t.shape);if(i===`line`||i===`heading`){let n=e.querySelector(`.ty-skeleton-lines`);if(!n)return;let i=q(pr(t.lines),1)||1;if(i>1)this.#t(n,i);else{for(;n.children.length>1;)n.lastElementChild.remove();let e=n.firstElementChild;e instanceof HTMLElement&&this.#e(e,r)}}else{let t=e.querySelector(`.ty-skeleton-content > .ty-skeleton`);t instanceof HTMLElement&&this.#e(t,r)}}#e(e,t){t&&!ur.has(t)?(e.setAttribute(`data-width`,`custom`),e.style.inlineSize=t):e.style.inlineSize&&(e.style.inlineSize=``)}#t(e,t){for(let n=0;n<t;n++){let r=n===t-1?`short`:dr[n%dr.length],i=e.children[n];(!(i instanceof HTMLElement)||!i.classList.contains(`ty-skeleton`))&&(i=K(`span`,`ty-skeleton`),e.append(i)),i.setAttribute(`data-shape`,`line`),i.setAttribute(`data-width`,r),i instanceof HTMLElement&&(i.style.inlineSize=``)}for(;e.children.length>t;)e.lastElementChild.remove()}#n(e){let t=K(`span`,`ty-skeleton-lines`);return this.#t(t,e),t}#r(e,t=`full`){let n=K(`span`,`ty-skeleton`,{"data-shape":e});return ur.has(t)?n.setAttribute(`data-width`,t):(n.setAttribute(`data-width`,`custom`),n.style.inlineSize=t),n}#i(e,t){let n=K(`span`,`ty-skeleton-grid`,{"data-preset":e});return n.style.setProperty(`--ty-skeleton-columns`,String(t)),n}#a(e,t,n){switch(e){case`stats`:{let e=q(t,4),r=this.#i(`stats`,n??e);for(let t=0;t<e;t++){let e=K(`span`,`ty-skeleton-tile`,{"data-part":`stat`});e.append(this.#r(`circle`),this.#r(`heading`,`medium`),this.#r(`line`,`short`)),r.append(e)}return[r]}case`cards`:{let e=q(t,6),r=this.#i(`cards`,n??3);for(let t=0;t<e;t++){let e=K(`span`,`ty-skeleton-tile`,{"data-part":`card`});e.append(this.#r(`heading`,`long`),this.#n(2),this.#r(`line`,`short`)),r.append(e)}return[r]}case`section-heading`:{let e=K(`span`,`ty-skeleton-row`,{"data-preset":`section-heading`}),t=K(`span`,`ty-skeleton-lines`);return t.append(this.#r(`heading`,`medium`),this.#r(`line`,`long`)),e.append(this.#r(`circle`),t),[e]}case`filters`:{let e=q(t,5),n=K(`span`,`ty-skeleton-row`,{"data-preset":`filters`});for(let t=0;t<e;t++)n.append(K(`span`,`ty-skeleton ty-skeleton--pill`,{"data-shape":`pill`}));return[n]}case`analysis`:{let e=q(t,3),n=K(`span`,`ty-skeleton-tile`,{"data-preset":`analysis`});n.append(this.#r(`heading`,`medium`));for(let t=0;t<e;t++){let e=K(`span`,`ty-skeleton-row`,{"data-part":`item`});e.append(this.#r(`circle`),this.#n(2)),n.append(e)}return[n]}default:return console.warn(`ty-skeleton: unknown preset "${e}".`),[]}}};function pr(e){if(e===void 0||e===!1||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}const mr={tag:`ty-spinner`,name:`TySpinner`,kind:`enhancing`,doc:"Indeterminate work indicator: an indeterminate progressbar named by `label`, drawn as a CSS ring or three pulsing dots (never announced). Under reduced motion the animation stops (the stylesheet) and the element reveals the label as text.",props:{label:{type:`string`,default:`Loading`,attribute:`label`,doc:`Accessible name; the visible caption should say the same.`},size:{type:`enum`,values:[`small`,`medium`,`large`],default:`medium`,attribute:`size`,doc:"Diameter step (`small` follows the text size)."},shape:{type:`enum`,values:[`ring`,`dots`],default:`ring`,attribute:`shape`,doc:`The drawing: a border-arc ring or three pulsing dots.`},tone:{type:`enum`,values:[`inherit`,`accent`,`on-accent`,`neutral`],default:`inherit`,attribute:`tone`,doc:"Colour; `inherit` takes the current text colour."}},events:[],slots:{default:{doc:"The visible label next to the indicator (keep it the same text as `label`; it is decorative, the progressbar is named by `label`)."}},anatomy:{tag:`span`,class:`ty-spinner`,attrs:{role:{value:`progressbar`},"aria-label":{prop:`label`},"data-size":{prop:`size`},"data-shape":{prop:`shape`},"data-tone":{prop:`tone`}},children:[{tag:`span`,class:`ty-spinner__ring`,attrs:{"aria-hidden":{value:`true`}},when:[`shape:ring`]},{tag:`span`,class:`ty-spinner__dots`,attrs:{"aria-hidden":{value:`true`}},when:[`shape:dots`],children:[{tag:`span`,class:`ty-spinner__dot`},{tag:`span`,class:`ty-spinner__dot`},{tag:`span`,class:`ty-spinner__dot`}]},{tag:`span`,class:`ty-spinner__label`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:default`],children:[{slot:`default`}]}]},examples:[{name:`ring`,props:{},slots:{}},{name:`dots-labelled`,props:{shape:`dots`,label:`Saving`},slots:{default:`Saving`}},{name:`large-accent`,props:{size:`large`,tone:`accent`,label:`Indexing`},slots:{}},{name:`small-on-accent`,props:{size:`small`,tone:`on-accent`,label:`Uploading`},slots:{}},{name:`dots-neutral`,props:{shape:`dots`,tone:`neutral`},slots:{}}]};var hr=class extends s{static definition=mr;#e=null;#t=null;#n=()=>this.#r();connected(){this.#e=typeof matchMedia>`u`?null:matchMedia(`(prefers-reduced-motion: reduce)`),this.#e?.addEventListener(`change`,this.#n),this.#r()}disconnected(){this.#e?.removeEventListener(`change`,this.#n),this.#e=null}changed(){this.#r()}#r(){let e=this.anatomyRoot();if(!e)return;let t=this.#e?.matches??!1;if(e.toggleAttribute(`data-reduced-motion`,t),!this.owned)return;let n=e.querySelector(`:scope > .ty-spinner__label`)!==null;t&&!n?(this.#t?.isConnected||(this.#t=document.createElement(`span`),this.#t.className=`ty-spinner__label`,this.#t.setAttribute(`aria-hidden`,`true`)),this.#t.textContent=String(this.props.label??``),e.append(this.#t)):!t&&this.#t&&(this.#t.remove(),this.#t=null)}};const gr={tag:`ty-status-pill`,name:`TyStatusPill`,kind:`enhancing`,doc:"Current state of an item as icon, word and semantic tone. Nothing interactive inside; a known `status` takes its tone and busy state from the element's status map unless `tone` overrides.",props:{status:{type:`string`,attribute:`status`,doc:"The status key (`data-status`); the built-in map colours the common ones (`pending`, `approved`, `processing`, …) while `tone` is absent."},tone:{type:`enum`,values:[`neutral`,`info`,`success`,`warning`,`danger`],attribute:`tone`,doc:"The semantic tone (`data-tone`); left out, the status map decides (server renderings pass it themselves)."},size:{type:`enum`,values:[`small`,`regular`],default:`regular`,attribute:`size`,doc:`Pill size.`},busy:{type:`boolean`,attribute:`busy`,doc:`In-progress: the icon spins (static under reduced motion).`},announce:{type:`boolean`,attribute:`announce`,doc:'Announce changes politely (`role="status"`); off by default, so tables of pills create no live regions.'},label:{type:`string`,attribute:`label`,doc:`Plain-HTML label text; the default slot (what frameworks render) wins, then the status map's label, then the status key.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:'Accessible name of the pill (`aria-label`), e.g. "Status: Running" on an announced badge.'},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the pill (`data-testid`)."}},events:[],slots:{default:{doc:`The status word.`},icon:{doc:`The status icon (decorative); spins while busy.`}},anatomy:{tag:`span`,class:`ty-status`,attrs:{role:{value:`status`,when:[`announce`]},"aria-label":{prop:`accessibleLabel`},"data-tone":{prop:`tone`},"data-size":{prop:`size`},"data-busy":{prop:`busy`,kind:`flag`},"data-status":{prop:`status`},"data-testid":{prop:`testId`}},children:[{tag:`span`,class:`ty-status__icon`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:icon`],children:[{slot:`icon`}]},{tag:`span`,class:`ty-status__label`,children:[{slot:`default`}]}]},examples:[{name:`success`,props:{status:`active`,tone:`success`},slots:{default:`Active`,icon:`✓`}},{name:`busy-info`,props:{status:`processing`,tone:`info`,busy:!0},slots:{default:`Processing`,icon:`↻`}},{name:`small-warning`,props:{status:`pending`,tone:`warning`,size:`small`},slots:{default:`Pending`}},{name:`announced-danger`,props:{status:`error`,tone:`danger`,announce:!0,accessibleLabel:`Status: Error`,testId:`status-badge-error`},slots:{default:`Error`}},{name:`unknown-neutral`,props:{status:`archived`},slots:{default:`archived`}}]},_r={pending:{tone:`warning`,label:`Pending`},approved:{tone:`success`,label:`Approved`},rejected:{tone:`danger`,label:`Rejected`},active:{tone:`success`,label:`Active`},inactive:{tone:`neutral`,label:`Inactive`},processing:{tone:`info`,busy:!0,label:`Processing`},error:{tone:`danger`,label:`Error`},success:{tone:`success`,label:`Success`}};var vr=class extends s{static definition=gr;sync(){super.sync();let e=this.anatomyRoot();if(!e)return;let t=this.getAttribute(`status`)??``,n=_r[t];if(n&&!this.hasAttribute(`tone`)&&e.setAttribute(`data-tone`,n.tone),n?.busy&&e.setAttribute(`data-busy`,``),!n&&t&&!this.hasAttribute(`label`)&&console.warn(`ty-status-pill: unknown status "${t}"; showing it as a neutral pill.`),this.owned){let r=e.querySelector(`.ty-status__label`);r&&!(r.textContent??``).trim()&&(r.textContent=this.getAttribute(`label`)||n?.label||t)}}};const yr={tag:`ty-surface`,name:`TySurface`,kind:`enhancing`,doc:"Bounded container at a chosen elevation. A titled surface is a region named by its title; a pressable one forwards presses anywhere on it to the single primary control in the title (a link with `href`, a button otherwise).",props:{elevation:{type:`enum`,values:[`sheet`,`raised`,`floating`,`flat`],default:`sheet`,attribute:`elevation`,doc:`Level 1 (sheet glass), 2 (raised card), 3 (floating) or 0 (flat).`},padding:{type:`enum`,values:[`none`,`regular`,`roomy`],default:`regular`,attribute:`padding`,doc:`Internal padding step.`},titleLevel:{type:`enum`,values:[`h2`,`h3`,`h4`],default:`h3`,attribute:`title-level`,doc:`Heading level of the title.`},pressable:{type:`boolean`,attribute:`pressable`,doc:"The whole surface is one press target that forwards to the title's primary control; set it when `onclick` is wired. Implied by `href`."},href:{type:`string`,attribute:`href`,doc:`Makes the surface a whole-card link: the title's primary control is an anchor and its hit area stretches over the card.`},selected:{type:`boolean`,attribute:`selected`,doc:`A chosen card (accent-soft state).`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Pressable surfaces only: inert primary control, no forwarding.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name of the region when there is no visible title.`}},events:[{type:`click`,kind:`native`,reactProp:`onClick`,doc:`A press of the primary control (directly, or forwarded from anywhere on the surface).`}],slots:{default:{doc:`The body.`},title:{doc:`The header title (a heading). Required on a pressable surface: it holds the primary control.`},description:{doc:`A secondary line under the title.`},footer:{doc:`The footer region, usually actions.`}},anatomy:{tag:`section`,class:`ty-surface`,attrs:{"aria-labelledby":{idref:`title`,when:[`slot:title`]},"aria-label":{prop:`accessibleLabel`,when:[`!slot:title`]},"data-elevation":{prop:`elevation`},"data-padding":{prop:`padding`},"data-pressable":{value:``,when:[`pressable|href`]},"data-selected":{prop:`selected`,kind:`flag`},"data-disabled":{value:``,when:[`pressable|href`,`disabled`]}},children:[{tag:`header`,class:`ty-surface__header`,when:[`slot:title|slot:description`],children:[{tag:`h2`,class:`ty-surface__title`,attrs:{id:{idref:`title`}},when:[`slot:title`,`titleLevel:h2`],children:[{tag:`a`,class:`ty-surface__primary`,when:[`href`],attrs:{href:{prop:`href`,when:[`!disabled`]},"aria-disabled":{prop:`disabled`,kind:`bool`}},children:[{slot:`title`}]},{tag:`button`,class:`ty-surface__primary`,when:[`!href`,`pressable`],attrs:{type:{value:`button`},disabled:{prop:`disabled`,kind:`boolean-attr`}},children:[{slot:`title`}]},{slot:`title`,when:[`!href`,`!pressable`]}]},{tag:`h3`,class:`ty-surface__title`,attrs:{id:{idref:`title`}},when:[`slot:title`,`titleLevel:h3`],children:[{tag:`a`,class:`ty-surface__primary`,when:[`href`],attrs:{href:{prop:`href`,when:[`!disabled`]},"aria-disabled":{prop:`disabled`,kind:`bool`}},children:[{slot:`title`}]},{tag:`button`,class:`ty-surface__primary`,when:[`!href`,`pressable`],attrs:{type:{value:`button`},disabled:{prop:`disabled`,kind:`boolean-attr`}},children:[{slot:`title`}]},{slot:`title`,when:[`!href`,`!pressable`]}]},{tag:`h4`,class:`ty-surface__title`,attrs:{id:{idref:`title`}},when:[`slot:title`,`titleLevel:h4`],children:[{tag:`a`,class:`ty-surface__primary`,when:[`href`],attrs:{href:{prop:`href`,when:[`!disabled`]},"aria-disabled":{prop:`disabled`,kind:`bool`}},children:[{slot:`title`}]},{tag:`button`,class:`ty-surface__primary`,when:[`!href`,`pressable`],attrs:{type:{value:`button`},disabled:{prop:`disabled`,kind:`boolean-attr`}},children:[{slot:`title`}]},{slot:`title`,when:[`!href`,`!pressable`]}]},{tag:`div`,class:`ty-surface__description`,when:[`slot:description`],children:[{slot:`description`}]}]},{tag:`div`,class:`ty-surface__body`,when:[`slot:default`],children:[{slot:`default`}]},{tag:`footer`,class:`ty-surface__footer`,when:[`slot:footer`],children:[{slot:`footer`}]}]},examples:[{name:`sheet`,props:{},slots:{title:`Runs`,description:`Last 24 hours`,default:`Body`}},{name:`raised-roomy`,props:{elevation:`raised`,padding:`roomy`},slots:{default:`Body`}},{name:`flat-none-footer`,props:{elevation:`flat`,padding:`none`},slots:{default:`Body`,footer:`Actions`}},{name:`pressable`,props:{pressable:!0},slots:{title:`Open workflow`,default:`Body`}},{name:`link-selected`,props:{href:`/runs/1`,selected:!0},slots:{title:`Nightly sync`,default:`Body`}},{name:`pressable-disabled`,props:{pressable:!0,disabled:!0},slots:{title:`Archived`,default:`Body`}},{name:`title-level`,props:{titleLevel:`h2`},slots:{title:`Settings`}}]};var br=class extends s{static definition=yr;get primary(){return this.querySelector(`.ty-surface__primary`)}#e(){return this.hasAttribute(`pressable`)||this.hasAttribute(`href`)}#t=e=>{let t=this.primary;if(!this.#e()||this.hasAttribute(`disabled`)||!t||!(e.target instanceof Element)||t.contains(e.target))return;let n=e.target.closest(`a[href],button,input,select,textarea,summary,[role="button"],[role="link"],[role="checkbox"],[role="switch"],[tabindex]:not([tabindex="-1"])`);n&&this.contains(n)||typeof window<`u`&&window.getSelection?.()?.toString()||t.click()};connected(){this.#e()&&!this.primary&&console.warn(`<ty-surface>: a pressable surface needs a title, which becomes its primary control.`),this.addEventListener(`click`,this.#t)}disconnected(){this.removeEventListener(`click`,this.#t)}};const xr={tag:`ty-switch`,name:`TySwitch`,kind:`enhancing`,doc:`On/off setting with immediate effect. A native checkbox with role="switch" inside a <label>, so labelling, keyboard and form participation are the platform's; Enter toggles as well as Space.`,props:{checked:{type:`boolean`,attribute:`checked`,doc:`On.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},readOnly:{type:`boolean`,attribute:`read-only`,doc:"Shown but not changeable (`aria-readonly`)."},name:{type:`string`,attribute:`name`,doc:`Form field name; the value is sent while on.`},value:{type:`string`,attribute:`value`,doc:`Form value sent while on (the browser sends "on" without one).`},size:{type:`enum`,values:[`small`,`regular`,`large`],default:`regular`,attribute:`size`,doc:`Track size.`},layout:{type:`enum`,values:[`inline`,`tile`],default:`inline`,attribute:`layout`,doc:"`tile`: text at the start, control at the end, the whole row is the target."},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the native checkbox (`data-testid`)."}},events:[{type:`change`,kind:`native`,detail:{checked:`boolean`},reactProp:`onChange`,doc:"The native change of the checkbox; `checked` is the new state."}],slots:{default:{doc:`The visible label.`},description:{doc:`A secondary line, announced as the description.`}},anatomy:{tag:`label`,class:`ty-switch`,attrs:{"data-layout":{prop:`layout`},"data-size":{prop:`size`},"data-selected":{prop:`checked`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`},"data-readonly":{prop:`readOnly`,kind:`flag`}},children:[{tag:`input`,class:`ty-visually-hidden`,attrs:{type:{value:`checkbox`},role:{value:`switch`},name:{prop:`name`},value:{prop:`value`},checked:{prop:`checked`,kind:`boolean-attr`},disabled:{prop:`disabled`,kind:`boolean-attr`},"aria-readonly":{prop:`readOnly`,kind:`bool`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:default`]},"aria-labelledby":{idref:`label`,when:[`slot:default`]},"aria-describedby":{idref:`description`,when:[`slot:description`]},"data-testid":{prop:`testId`}}},{tag:`span`,class:`ty-switch__track`,attrs:{"aria-hidden":{value:`true`}},children:[{tag:`span`,class:`ty-switch__thumb`}]},{tag:`span`,class:`ty-switch__text`,when:[`slot:default|slot:description`],children:[{tag:`span`,class:`ty-switch__label`,attrs:{id:{idref:`label`}},when:[`slot:default`],children:[{slot:`default`}]},{tag:`span`,class:`ty-switch__description`,attrs:{id:{idref:`description`}},when:[`slot:description`],children:[{slot:`description`}]}]}]},examples:[{name:`off`,props:{},slots:{default:`Autosave`}},{name:`on-with-description`,props:{checked:!0,name:`autosave`},slots:{default:`Autosave`,description:`Save every change`}},{name:`tile-large`,props:{layout:`tile`,size:`large`,value:`yes`,testId:`notifications`},slots:{default:`Notifications`}},{name:`read-only`,props:{checked:!0,readOnly:!0},slots:{default:`Managed by your organization`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Dark mode`},slots:{}}]};var Sr=class extends s{static definition=xr;#e=null;get input(){return this.querySelector(`input[role="switch"]`)}#t(){return this.hasAttribute(`disabled`)||this.hasAttribute(`read-only`)}#n=e=>{let t=this.input;t&&e.key===`Enter`&&e.target===t&&!this.#t()&&(e.preventDefault(),t.click())};#r=e=>{e.target===this.input&&this.hasAttribute(`read-only`)&&e.preventDefault()};#i=e=>{let t=this.input;e.target===t&&t&&this.toggleAttribute(`checked`,t.checked)};#a=()=>{setTimeout(()=>{let e=this.input;e&&this.toggleAttribute(`checked`,e.checked)})};connected(){this.addEventListener(`keydown`,this.#n),this.addEventListener(`click`,this.#r),this.addEventListener(`change`,this.#i),this.#e=this.input?.form??null,this.#e?.addEventListener(`reset`,this.#a)}disconnected(){this.removeEventListener(`keydown`,this.#n),this.removeEventListener(`click`,this.#r),this.removeEventListener(`change`,this.#i),this.#e?.removeEventListener(`reset`,this.#a),this.#e=null}};const Cr={tag:`ty-tag`,name:`TyTag`,kind:`enhancing`,doc:`Small label for static metadata (a badge or chip), optionally removable; the remove button is a native <button>. An interactive tag (pressable or a link) is a plain styled native — <button class="ty-tag" data-interactive> or <a class="ty-tag" href> — not this element (see docs/html-contract.md).`,props:{tone:{type:`enum`,values:[`neutral`,`accent`],default:`neutral`,attribute:`tone`,doc:"`accent` fills with the theme accent."},categoryIndex:{type:`number`,attribute:`category-index`,doc:`A categorical token (1 to 8) shown as a small colour square; normalised into range on upgrade.`},size:{type:`enum`,values:[`small`,`regular`,`large`],default:`regular`,attribute:`size`,doc:"Text step; `small` never goes below the meta size."},removable:{type:`boolean`,attribute:`removable`,doc:`Shows the remove button at the end.`},removeLabel:{type:`string`,attribute:`remove-label`,doc:`Accessible name of the remove button; must include the tag text (defaults to "Remove <text>" on upgrade).`},live:{type:`boolean`,attribute:`live`,doc:'A polite live region (`role="status"`) for a tag whose text updates dynamically.'},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the tag (`data-testid`)."}},events:[{type:`click`,kind:`native`,reactProp:`onClick`,doc:`The remove button's native click (wired on that button).`}],slots:{default:{doc:`The text; truncates with an ellipsis.`},icon:{doc:`A leading icon (decorative); wins over the category square.`}},anatomy:{tag:`span`,class:`ty-tag`,attrs:{role:{value:`status`,when:[`live`]},"aria-live":{value:`polite`,when:[`live`]},"data-tone":{prop:`tone`},"data-size":{prop:`size`},"data-removable":{prop:`removable`,kind:`flag`},"data-testid":{prop:`testId`}},children:[{tag:`span`,class:`ty-tag__icon`,attrs:{"aria-hidden":{value:`true`}},when:[`slot:icon`],children:[{slot:`icon`}]},{tag:`span`,class:`ty-tag__swatch`,attrs:{"aria-hidden":{value:`true`},"data-category":{prop:`categoryIndex`}},when:[`!slot:icon`,`categoryIndex`]},{tag:`span`,class:`ty-tag__text`,children:[{slot:`default`}]},{tag:`button`,class:`ty-tag__remove`,attrs:{type:{value:`button`},"aria-label":{prop:`removeLabel`}},when:[`removable`],children:[{tag:`svg`,class:`ty-icon`,attrs:{"aria-hidden":{value:`true`},focusable:{value:`false`},viewBox:{value:`0 0 12 12`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`1.5`},"stroke-linecap":{value:`round`}},children:[{tag:`path`,attrs:{d:{value:`M2.5 2.5l7 7M9.5 2.5l-7 7`}}}]}]}]},examples:[{name:`neutral`,props:{},slots:{default:`postgres`}},{name:`accent-small-icon`,props:{tone:`accent`,size:`small`,testId:`env`},slots:{default:`production`,icon:`◆`}},{name:`category`,props:{categoryIndex:3},slots:{default:`Stage 3`}},{name:`removable`,props:{removable:!0,removeLabel:`Remove São Paulo`},slots:{default:`São Paulo`}},{name:`live-large`,props:{live:!0,size:`large`},slots:{default:`Running`}}]};var wr=class extends s{static definition=Cr;sync(){super.sync();let e=this.querySelector(`.ty-tag__remove`);if(e&&!e.hasAttribute(`aria-label`)){let t=this.querySelector(`.ty-tag__text`)?.textContent?.trim()??``;e.setAttribute(`aria-label`,`Remove ${t}`.trim())}}changed(){let e=this.getAttribute(`category-index`);if(e===null)return;let t=Number(e);if(!Number.isFinite(t)){this.removeAttribute(`category-index`);return}let n=String((Math.max(1,Math.round(t))-1)%8+1);n!==e&&this.setAttribute(`category-index`,n)}};const Tr={tag:`ty-text-area`,name:`TyTextArea`,kind:`enhancing`,doc:`Multi-line text entry. A native <textarea> inside, so input, keyboard and form participation are the platform's; the element adds the character counter, the over-limit state and auto-grow.`,props:{value:{type:`string`,attribute:`value`,doc:`Controlled text; the element mirrors it into the textarea (while the user types, the live value is the textarea's own).`},defaultValue:{type:`string`,attribute:`default-value`,doc:`Initial text of an uncontrolled area, applied once on connect; a form reset returns to it.`},rows:{type:`number`,default:3,attribute:`rows`,doc:`Initial visible lines.`},autoGrow:{type:`boolean`,attribute:`auto-grow`,doc:"Grows with the content up to `maxRows`, then scrolls."},maxRows:{type:`number`,attribute:`max-rows`,doc:"Growth limit of `autoGrow`; past it the area scrolls (`data-scrolling`)."},resize:{type:`enum`,values:[`vertical`,`none`],default:`vertical`,attribute:`resize`,doc:"The native resize handle; `autoGrow` always disables it."},maxLength:{type:`number`,attribute:`max-length`,doc:`Counted for the counter and the over-limit state; typing is not cut off.`},showCounter:{type:`boolean`,attribute:`show-counter`,doc:"A character counter under the area (needs `maxLength`)."},counterLabel:{type:`string`,default:`{count} of {max} characters`,attribute:`counter-label`,doc:"Counter template; `{count}` and `{max}` are filled in."},overLimitLabel:{type:`string`,default:`{count} of {max} characters, {over} over the limit`,attribute:`over-limit-label`,doc:"Counter template past the limit; `{over}` is the excess."},monospace:{type:`boolean`,attribute:`monospace`,doc:`Mono family for code, keys or JSON.`},required:{type:`boolean`,attribute:`required`,doc:`Native required.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},readOnly:{type:`boolean`,attribute:`read-only`,doc:`Shown but not changeable.`},invalid:{type:`boolean`,attribute:`invalid`,doc:`Painted and announced as invalid without an error message (a surrounding field marks it).`},name:{type:`string`,attribute:`name`,doc:`Form field name.`},placeholder:{type:`string`,attribute:`placeholder`,doc:`Native placeholder.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},labelledBy:{type:`string`,attribute:`labelled-by`,doc:"`aria-labelledby` from a surrounding field (used when there is no visible label and no `accessibleLabel`)."},describedBy:{type:`string`,attribute:`described-by`,doc:"`aria-describedby` from a surrounding field, joined before the area's own parts."},controlId:{type:`string`,attribute:`control-id`,doc:"Explicit id of the control (a surrounding field's control id); `<instance>-input` otherwise."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the root (`data-testid`)."}},events:[{type:`input`,kind:`native`,detail:{value:`string`},reactProp:`onChange`,doc:"The native input of the textarea; `value` is the whole text."}],slots:{label:{doc:`The visible label, targeting the area.`},hint:{doc:`Help text under the area, announced as the description.`},error:{doc:`The error message; marks the area invalid and is announced.`}},anatomy:{tag:`div`,class:`ty-text-area`,attrs:{"data-resize":{prop:`resize`},"data-monospace":{prop:`monospace`,kind:`flag`},"data-auto-grow":{prop:`autoGrow`,kind:`flag`},"data-invalid":{value:``,when:[`invalid|slot:error`]},"data-readonly":{prop:`readOnly`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`},"data-testid":{prop:`testId`}},children:[{tag:`label`,class:`ty-text-area__label`,when:[`slot:label`],attrs:{for:{idref:`input`,prop:`controlId`}},children:[{slot:`label`}]},{tag:`p`,class:`ty-text-area__hint`,when:[`slot:hint`],attrs:{id:{idref:`hint`}},children:[{slot:`hint`}]},{tag:`textarea`,class:`ty-text-area__input`,attrs:{id:{idref:`input`,prop:`controlId`},rows:{prop:`rows`},name:{prop:`name`},placeholder:{prop:`placeholder`},disabled:{prop:`disabled`,kind:`boolean-attr`},readonly:{prop:`readOnly`,kind:`boolean-attr`},required:{prop:`required`,kind:`boolean-attr`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:label`]},"aria-labelledby":{prop:`labelledBy`,when:[`!slot:label`,`!accessibleLabel`]},"aria-describedby":{idrefs:[{prop:`describedBy`},{id:`hint`,when:[`slot:hint`]},{id:`error`,when:[`slot:error`]},{id:`counter`,when:[`showCounter`,`maxLength`]}]},"aria-invalid":{value:`true`,when:[`invalid|slot:error`]}}},{tag:`p`,class:`ty-text-area__error`,when:[`slot:error`],attrs:{id:{idref:`error`}},children:[{tag:`svg`,class:`ty-icon`,attrs:{"aria-hidden":{value:`true`},focusable:{value:`false`},width:{value:`24`},height:{value:`24`},viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`}},children:[{tag:`circle`,attrs:{cx:{value:`12`},cy:{value:`12`},r:{value:`10`}}},{tag:`line`,attrs:{x1:{value:`12`},y1:{value:`8`},x2:{value:`12`},y2:{value:`12`}}},{tag:`line`,attrs:{x1:{value:`12`},y1:{value:`16`},x2:{value:`12.01`},y2:{value:`16`}}}]},{tag:`span`,children:[{slot:`error`}]}]},{tag:`p`,class:`ty-text-area__counter`,when:[`showCounter`,`maxLength`],attrs:{id:{idref:`counter`}}}]},examples:[{name:`labelled`,props:{},slots:{label:`Notes`}},{name:`hint-and-placeholder`,props:{name:`notes`,placeholder:`Write a summary`},slots:{label:`Notes`,hint:`Shown on the canvas`}},{name:`error`,props:{value:`Draft`},slots:{label:`Abstract`,error:`Required`}},{name:`counter`,props:{value:`Hello`,maxLength:500,showCounter:!0},slots:{label:`Bio`}},{name:`monospace-read-only`,props:{monospace:!0,resize:`none`,readOnly:!0,value:`{ "a": 1 }`},slots:{label:`JSON`}},{name:`auto-grow`,props:{autoGrow:!0,maxRows:6,rows:2},slots:{label:`Log`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Notes`,describedBy:`external-hint`,testId:`notes`},slots:{}}]};var Er=class extends s{static definition=Tr;#e=!1;get area(){return this.querySelector(`textarea`)}#t=()=>{let e=this.area;if(!e)return;let t=this.getAttribute(`value`);if(t!==null)e.value!==t&&(e.value=t);else if(!this.#e){this.#e=!0;let t=this.getAttribute(`default-value`);t!==null&&(e.defaultValue=t,e.value===``&&(e.value=t))}};#n=()=>{let e=this.anatomyRoot(),t=this.area;if(!e||!t)return;let n=this.props.maxLength,r=t.value.length,i=n!==void 0&&r>n,a=e.querySelector(`.ty-text-area__counter`);if(a&&n!==void 0){let e=String(i?this.props.overLimitLabel:this.props.counterLabel).replaceAll(`{count}`,String(r)).replaceAll(`{max}`,String(n)).replaceAll(`{over}`,String(r-n));a.textContent!==e&&(a.textContent=e),a.toggleAttribute(`data-over-limit`,i)}let o=i||this.hasAttribute(`invalid`)||e.querySelector(`.ty-text-area__error`)!==null;e.toggleAttribute(`data-invalid`,o),o?t.setAttribute(`aria-invalid`,`true`):t.removeAttribute(`aria-invalid`)};#r=()=>{let e=this.area;if(!e||!this.hasAttribute(`auto-grow`))return;let t=Number(this.props.rows??3),n=this.props.maxRows,r=e.value.split(`
|
|
5
|
+
`).length,i=0,a=parseFloat(getComputedStyle(e).lineHeight);if(a&&!Number.isNaN(a)){let t=e.rows;e.rows=1,i=Math.ceil((e.scrollHeight-.5)/a),e.rows=t}let o=Math.max(t,r,i),s=n===void 0?o:Math.min(o,n);e.rows!==s&&(e.rows=s),this.anatomyRoot()?.toggleAttribute(`data-scrolling`,n!==void 0&&o>n)};#i=e=>{e.target===this.area&&(this.#n(),this.#r())};connected(){this.addEventListener(`input`,this.#i),this.#t(),requestAnimationFrame(()=>{this.#n(),this.#r()})}disconnected(){this.removeEventListener(`input`,this.#i)}changed(){this.isConnected&&(this.#t(),this.#n(),this.#r())}};const J=(e,t)=>({tag:e,class:`ty-text-field__glyph`,attrs:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{value:t}]))}),Y=(e,t=`ty-icon`)=>({tag:`svg`,class:t,attrs:{viewBox:{value:`0 0 24 24`},fill:{value:`none`},stroke:{value:`currentColor`},"stroke-width":{value:`2`},"stroke-linecap":{value:`round`},"stroke-linejoin":{value:`round`},"aria-hidden":{value:`true`},focusable:{value:`false`}},children:e}),Dr={tag:`ty-text-field`,name:`TyTextField`,kind:`enhancing`,doc:"Single-line text entry: plain, search and password. A native <input> inside, so typing, keyboard, autofill and form participation are the platform's; the element adds the clear action (search mode, or `clearable`), the reveal action (password mode), the character counter and the over-limit state.",props:{mode:{type:`enum`,values:[`text`,`search`,`password`],default:`text`,attribute:`mode`,doc:"`search` adds the magnifier and the clear action (Escape clears); `password` adds the reveal action."},inputType:{type:`enum`,values:[`text`,`email`,`url`,`tel`,`number`],attribute:`input-type`,doc:'Native type for `mode="text"` (`text` when unset); `mode` wins when both are set.'},value:{type:`string`,attribute:`value`,doc:`Controlled text; the element mirrors it into the input (while the user types, the live value is the input's own).`},defaultValue:{type:`string`,attribute:`default-value`,doc:`Initial text of an uncontrolled field, applied once on connect; a form reset returns to it.`},appearance:{type:`enum`,values:[`outlined`,`filled`],default:`outlined`,attribute:`appearance`,doc:`Surface treatment of the group.`},clearable:{type:`boolean`,attribute:`clearable`,doc:`The clear action outside search mode (search always has it); shown while the field is non-empty and editable.`},clearLabel:{type:`string`,default:`Clear`,attribute:`clear-label`,doc:`Accessible name of the clear action.`},showPasswordLabel:{type:`string`,default:`Show password`,attribute:`show-password-label`,doc:`Accessible name of the reveal action while the password is hidden.`},hidePasswordLabel:{type:`string`,default:`Hide password`,attribute:`hide-password-label`,doc:`Accessible name of the reveal action while the password is shown.`},maxLength:{type:`number`,attribute:`max-length`,doc:`Counted for the counter and the over-limit state; typing is not cut off.`},showCounter:{type:`boolean`,attribute:`show-counter`,doc:"A character counter under the field (needs `maxLength`)."},counterLabel:{type:`string`,default:`{count} of {max} characters`,attribute:`counter-label`,doc:"Counter template; `{count}` and `{max}` are filled in."},overLimitLabel:{type:`string`,default:`{count} of {max} characters, {over} over the limit`,attribute:`over-limit-label`,doc:"Counter template past the limit; `{over}` is the excess."},required:{type:`boolean`,attribute:`required`,doc:`Native required.`},disabled:{type:`boolean`,attribute:`disabled`,doc:`Native disabled.`},readOnly:{type:`boolean`,attribute:`read-only`,doc:`Shown but not changeable.`},invalid:{type:`boolean`,attribute:`invalid`,doc:`Painted and announced as invalid without an error message (a surrounding field marks it).`},name:{type:`string`,attribute:`name`,doc:`Form field name.`},placeholder:{type:`string`,attribute:`placeholder`,doc:`Native placeholder.`},autoComplete:{type:`string`,attribute:`autocomplete`,doc:`Native autocomplete hint.`},accessibleLabel:{type:`string`,attribute:`accessible-label`,doc:`Accessible name when there is no visible label.`},labelledBy:{type:`string`,attribute:`labelled-by`,doc:"`aria-labelledby` from a surrounding field (used when there is no visible label and no `accessibleLabel`)."},describedBy:{type:`string`,attribute:`described-by`,doc:"`aria-describedby` from a surrounding field, joined before the field's own parts."},controlId:{type:`string`,attribute:`control-id`,doc:"Explicit id of the control (a surrounding field's control id); `<instance>-input` otherwise."},testId:{type:`string`,attribute:`test-id`,doc:"Test hook on the root (`data-testid`)."}},events:[{type:`input`,kind:`native`,detail:{value:`string`},reactProp:`onChange`,doc:"The native input of the field; `value` is the whole text."},{type:`ty-clear`,kind:`custom`,reactProp:`onClear`,doc:`The clear action ran (its button, or Escape in search mode); the value is already empty and focus is back on the input.`}],slots:{label:{doc:`The visible label, targeting the input.`},hint:{doc:`Help text above the group, announced as the description.`},error:{doc:`The error message; marks the field invalid and is announced.`},success:{doc:`Confirmation of a valid value; only without an error, and hidden while over the limit.`},leading:{doc:`A decorative leading icon; wins over the search magnifier.`}},anatomy:{tag:`div`,class:`ty-text-field`,attrs:{"data-appearance":{prop:`appearance`},"data-mode":{prop:`mode`},"data-invalid":{value:``,when:[`invalid|slot:error`]},"data-readonly":{prop:`readOnly`,kind:`flag`},"data-disabled":{prop:`disabled`,kind:`flag`},"data-testid":{prop:`testId`}},children:[{tag:`label`,class:`ty-text-field__label`,when:[`slot:label`],attrs:{for:{idref:`input`,prop:`controlId`}},children:[{slot:`label`}]},{tag:`p`,class:`ty-text-field__hint`,when:[`slot:hint`],attrs:{id:{idref:`hint`}},children:[{slot:`hint`}]},{tag:`div`,class:`ty-text-field__group`,children:[{tag:`span`,class:`ty-text-field__leading`,when:[`slot:leading`],attrs:{"aria-hidden":{value:`true`}},children:[{slot:`leading`}]},{tag:`span`,class:`ty-text-field__leading`,when:[`mode:search`,`!slot:leading`],attrs:{"aria-hidden":{value:`true`}},children:[Y([J(`circle`,{cx:`11`,cy:`11`,r:`8`}),J(`path`,{d:`m21 21-4.34-4.34`})])]},{tag:`input`,class:`ty-text-field__input`,attrs:{id:{idref:`input`,prop:`controlId`},type:{prop:`inputType`,kind:`map`,values:{text:`text`,email:`email`,url:`url`,tel:`tel`,number:`number`},fallback:{prop:`mode`,values:{text:`text`,search:`search`,password:`password`}}},name:{prop:`name`},placeholder:{prop:`placeholder`},autocomplete:{prop:`autoComplete`},disabled:{prop:`disabled`,kind:`boolean-attr`},readonly:{prop:`readOnly`,kind:`boolean-attr`},required:{prop:`required`,kind:`boolean-attr`},"aria-label":{prop:`accessibleLabel`,when:[`!slot:label`]},"aria-labelledby":{prop:`labelledBy`,when:[`!slot:label`,`!accessibleLabel`]},"aria-describedby":{idrefs:[{prop:`describedBy`},{id:`hint`,when:[`slot:hint`]},{id:`error`,when:[`slot:error`]},{id:`success`,when:[`slot:success`,`!slot:error`]},{id:`counter`,when:[`showCounter`,`maxLength`]}]},"aria-invalid":{value:`true`,when:[`invalid|slot:error`]}}},{tag:`button`,class:`ty-text-field__clear ty-text-field__action`,when:[`clearable|mode:search`],attrs:{type:{value:`button`},"aria-label":{prop:`clearLabel`}},children:[Y([J(`path`,{d:`M18 6 6 18`}),J(`path`,{d:`m6 6 12 12`})])]},{tag:`button`,class:`ty-text-field__reveal ty-text-field__action`,when:[`mode:password`],attrs:{type:{value:`button`},"aria-label":{prop:`showPasswordLabel`},"aria-pressed":{value:`false`},disabled:{prop:`disabled`,kind:`boolean-attr`}},children:[Y([{tag:`g`,class:`ty-text-field__eye`,children:[J(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}),J(`circle`,{cx:`12`,cy:`12`,r:`3`})]},{tag:`g`,class:`ty-text-field__eye-off`,children:[J(`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}),J(`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}),J(`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}),J(`path`,{d:`m2 2 20 20`})]}])]},{...Y([J(`circle`,{cx:`12`,cy:`12`,r:`10`}),J(`path`,{d:`m16 9-5.5 5.5L8 12`})],`ty-icon ty-text-field__success-mark`),when:[`slot:success`,`!slot:error`]}]},{tag:`p`,class:`ty-text-field__error`,when:[`slot:error`],attrs:{id:{idref:`error`}},children:[Y([J(`circle`,{cx:`12`,cy:`12`,r:`10`}),J(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),J(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]),{tag:`span`,class:`ty-text-field__error-text`,children:[{slot:`error`}]}]},{tag:`p`,class:`ty-text-field__success`,when:[`slot:success`,`!slot:error`],attrs:{id:{idref:`success`}},children:[{slot:`success`}]},{tag:`p`,class:`ty-text-field__counter`,when:[`showCounter`,`maxLength`],attrs:{id:{idref:`counter`}}}]},examples:[{name:`labelled`,props:{},slots:{label:`Name`}},{name:`hint-and-placeholder`,props:{name:`name`,placeholder:`Ada Lovelace`,autoComplete:`name`},slots:{label:`Name`,hint:`As on your badge`}},{name:`email-filled-leading`,props:{inputType:`email`,appearance:`filled`,name:`email`,autoComplete:`email`},slots:{label:`Email`,leading:`✉`}},{name:`search`,props:{mode:`search`,name:`q`,value:`brazil`,placeholder:`Search states`},slots:{label:`Search`}},{name:`password`,props:{mode:`password`,name:`password`,autoComplete:`current-password`,required:!0},slots:{label:`Password`,hint:`At least 12 characters`}},{name:`error`,props:{value:`ab`,required:!0},slots:{label:`Code`,error:`Too short`}},{name:`counter`,props:{value:`Hello`,maxLength:20,showCounter:!0},slots:{label:`Title`}},{name:`success`,props:{inputType:`email`,value:`ada@example.org`},slots:{label:`Email`,success:`Looks right`}},{name:`disabled-unlabelled`,props:{disabled:!0,accessibleLabel:`Name`,describedBy:`external-hint`,testId:`name`},slots:{}}]};var Or=class extends s{static definition=Dr;#e=!1;#t=!1;get field(){return this.querySelector(`input`)}#n=()=>{let e=this.field;if(!e)return;let t=this.getAttribute(`value`);if(t!==null)e.value!==t&&(e.value=t);else if(!this.#e){this.#e=!0;let t=this.getAttribute(`default-value`);t!==null&&(e.defaultValue=t,e.value===``&&(e.value=t))}};#r=()=>{let e=this.anatomyRoot(),t=this.field;if(!e||!t)return;let n=this.props.maxLength,r=t.value.length,i=n!==void 0&&r>n,a=e.querySelector(`.ty-text-field__counter`);if(a&&n!==void 0){let e=String(i?this.props.overLimitLabel:this.props.counterLabel).replaceAll(`{count}`,String(r)).replaceAll(`{max}`,String(n)).replaceAll(`{over}`,String(r-n));a.textContent!==e&&(a.textContent=e),a.toggleAttribute(`data-over-limit`,i)}let o=i||this.hasAttribute(`invalid`)||e.querySelector(`.ty-text-field__error`)!==null;e.toggleAttribute(`data-invalid`,o),o?t.setAttribute(`aria-invalid`,`true`):t.removeAttribute(`aria-invalid`);for(let t of e.querySelectorAll(`.ty-text-field__success, .ty-text-field__success-mark`))t.toggleAttribute(`hidden`,i);let s=e.querySelector(`.ty-text-field__clear`);s&&s.toggleAttribute(`hidden`,r===0||this.hasAttribute(`disabled`)||this.hasAttribute(`read-only`))};#i=()=>{if(this.props.mode!==`password`)return;let e=this.field,t=this.querySelector(`.ty-text-field__reveal`),n=this.#t?`text`:`password`;if(e&&e.getAttribute(`type`)!==n&&e.setAttribute(`type`,n),t){t.setAttribute(`aria-pressed`,this.#t?`true`:`false`);let e=String(this.#t?this.props.hidePasswordLabel:this.props.showPasswordLabel);t.getAttribute(`aria-label`)!==e&&t.setAttribute(`aria-label`,e)}};#a=()=>{let e=this.field;if(!e||e.disabled||e.readOnly||e.value===``)return;let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set;t?t.call(e,``):e.value=``,e.dispatchEvent(new Event(`input`,{bubbles:!0})),this.emit(`ty-clear`),e.focus()};#o=e=>{e.target===this.field&&this.#r()};#s=e=>{let t=e.target;if(!t||typeof t.closest!=`function`)return;let n=t.closest(`.ty-text-field__clear`);if(n&&this.contains(n)){this.#a();return}let r=t.closest(`.ty-text-field__reveal`);r&&this.contains(r)&&!r.disabled&&(this.#t=!this.#t,this.#i())};#c=e=>{e.key===`Escape`&&e.target===this.field&&this.props.mode===`search`&&this.#a()};connected(){this.addEventListener(`input`,this.#o),this.addEventListener(`click`,this.#s),this.addEventListener(`keydown`,this.#c),this.#n(),this.#i(),requestAnimationFrame(()=>this.#r())}disconnected(){this.removeEventListener(`input`,this.#o),this.removeEventListener(`click`,this.#s),this.removeEventListener(`keydown`,this.#c)}changed(){this.isConnected&&(this.#n(),this.#i(),this.#r())}};const X=(e,t,n)=>({type:`string`,attribute:e,default:t,doc:n}),kr={tag:`ty-theme-palette`,name:`TyThemePalette`,kind:`self-rendering`,doc:`Theme, mode and density picker in the command palette's look; a native <dialog> in the top layer while open.`,props:{open:{type:`boolean`,attribute:`open`,doc:`Shown (a modal dialog in the top layer).`},apply:{type:`boolean`,attribute:`apply`,doc:`Apply the stored choice (or the defaults) to the document as soon as the element connects, and again when a default changes.`},storageKey:X(`storage-key`,`ty-theme`,`localStorage key of the choice ({ theme, mode, density } JSON, as ThemeProvider stores it).`),defaultTheme:X(`default-theme`,`tympan`,`Theme when nothing is stored (a host passes its organization default here).`),defaultMode:{type:`enum`,values:[`system`,`light`,`dark`],default:`system`,attribute:`default-mode`,doc:`Mode when nothing is stored.`},defaultDensity:{type:`enum`,values:[`compact`,`default`,`comfortable`],default:`default`,attribute:`default-density`,doc:`Density when nothing is stored.`},themes:{type:`string`,attribute:`themes`,doc:`Comma-separated theme names to offer; all of them when empty.`},printStylesheet:{type:`string`,attribute:`print-stylesheet`,doc:`URL of print-themes.css, linked while a print theme is applied.`},loadFonts:{type:`boolean`,attribute:`load-fonts`,doc:`Link the font stylesheet a theme names (off: no request to a font host).`},themeLabels:{type:`string`,attribute:`theme-labels`,doc:`JSON object of translated theme names, by theme name.`},label:X(`label`,`Appearance`,`Accessible name of the dialog and the field.`),placeholder:X(`placeholder`,`Search themes, modes and densities`,`Field placeholder.`),emptyLabel:X(`empty-label`,`No matches`,`Shown when nothing matches.`),resultsLabel:X(`results-label`,`{count} results`,`Announced result count; {count} is replaced.`),groupPresets:X(`group-presets`,`Themes`,`Heading of the built-in themes.`),groupPrint:X(`group-print`,`Print styles`,`Heading of the print themes.`),groupMode:X(`group-mode`,`Mode`,`Heading of the colour modes.`),groupDensity:X(`group-density`,`Density`,`Heading of the densities.`),modeSystem:X(`mode-system`,`System`,`Label of the system colour mode.`),modeLight:X(`mode-light`,`Light`,`Label of the light mode.`),modeDark:X(`mode-dark`,`Dark`,`Label of the dark mode.`),densityCompact:X(`density-compact`,`Compact`,`Label of the compact density.`),densityDefault:X(`density-default`,`Default`,`Label of the default density.`),densityComfortable:X(`density-comfortable`,`Comfortable`,`Label of the comfortable density.`),currentLabel:X(`current-label`,`Current`,`Marks the row in use.`),hintNavigate:X(`hint-navigate`,`move`,`Footer hint beside ↑↓.`),hintSelect:X(`hint-select`,`choose`,`Footer hint beside ↵.`),hintClose:X(`hint-close`,`close`,`Footer hint beside esc.`)},events:[{type:`ty-theme-change`,kind:`custom`,detail:{theme:`string`,mode:`string`,density:`string`},reactProp:`onThemeChange`,doc:`A row was chosen and applied; the detail is the whole appearance.`},{type:`ty-close`,kind:`custom`,reactProp:`onClose`,doc:`The palette asks to close (Escape, a press outside, or after a choice). The element closes itself too.`}],examples:[]};var Ar=[{name:`tympan`,label:`Tympan`,kind:`preset`,fontsUrl:null},{name:`fakhir`,label:`Fakhir`,kind:`preset`,fontsUrl:null},{name:`astrlabe`,label:`Astrlabe`,kind:`preset`,fontsUrl:null},{name:`astrlabe-controle`,label:`Astrlabe · Sala de Controle`,kind:`preset`,fontsUrl:null},{name:`neutral`,label:`Neutral`,kind:`preset`,fontsUrl:null},{name:`high-contrast`,label:`High contrast`,kind:`preset`,fontsUrl:null},{name:`print-dashboard`,label:`Dashboard editorial`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-graficos-1900`,label:`Gráficos de exposição (1900)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-cartao-postal`,label:`Cartão-postal desenhado à mão`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,600;1,6..72,300;1,6..72,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-caderno`,label:`Caderno de campo`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=Courier+Prime:wght@400;700&display=swap`},{name:`print-isotype`,label:`Isotype`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-cordel`,label:`Cordel`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Alegreya:ital,wght@0,400;0,500;0,700;1,400&family=Courier+Prime&display=swap`},{name:`print-riso`,label:`Risografia`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,400..800&family=Archivo:ital,wdth,wght@0,62..125,400;0,62..125,600;1,62..125,400&family=Space+Mono&display=swap`},{name:`print-jornal`,label:`Editorial de jornal`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-prancheta`,label:`Prancheta (cianotipia)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=IBM+Plex+Sans+Condensed:ital,wght@0,400;0,500;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-prancheta-clara`,label:`Prancheta clara`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=IBM+Plex+Sans+Condensed:ital,wght@0,400;0,500;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-aquarela`,label:`Aquarela`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=Crimson+Pro:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-minimo-de-tinta`,label:`Mínimo de tinta`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-suico`,label:`Estilo Suíço`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-concretismo`,label:`Concretismo`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap`},{name:`print-semanario`,label:`Semanário de economia`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap`},{name:`print-infografico-ilustrado`,label:`Infográfico ilustrado`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400&display=swap`},{name:`print-diagrama-modernista`,label:`Diagrama modernista`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;600;700&family=Jost:ital,wght@0,400;0,500;0,600;1,400&display=swap`},{name:`print-papel-salmao`,label:`Papel salmão`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Gelasio:ital,wght@0,400;0,500;0,600;1,400&display=swap`},{name:`print-dados-br`,label:`Dados à brasileira`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=IBM+Plex+Mono:wght@400;500&display=swap`},{name:`print-fluxo-historico`,label:`Fluxo histórico (séc. XIX)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&display=swap`},{name:`print-blocos-coloridos`,label:`Blocos coloridos`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500&family=Lato:ital,wght@0,400;0,700;1,400&display=swap`},{name:`print-construtivismo`,label:`Construtivismo russo`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=PT+Sans:ital,wght@0,400;0,700;1,400&display=swap`},{name:`print-bauhaus`,label:`Bauhaus`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap`},{name:`print-brutalista`,label:`Brutalista (dossiê)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-divulgacao`,label:`Revista de divulgação`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Archivo+Black&family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400&display=swap`},{name:`print-proporcao-modular`,label:`Proporção modular`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Stardos+Stencil:wght@400;700&family=Work+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap`},{name:`print-sinalizacao`,label:`Sinalização de aeroporto`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600;700&display=swap`},{name:`print-pictogramas`,label:`Pictogramas esportivos`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-mapa-de-metro`,label:`Mapa de metrô`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap`},{name:`print-jornal-1959`,label:`Jornal modernista (1959)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap`},{name:`print-azulejo-modernista`,label:`Azulejo modernista`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-tropicalia`,label:`Tropicália`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Shrikhand&family=Work+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-atlas-oficial`,label:`Atlas oficial (cartografia)`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&display=swap`},{name:`print-grade-holandesa`,label:`Grade holandesa`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Hanken+Grotesk:wght@400;500;600;700;800&display=swap`},{name:`print-papel-recortado`,label:`Papel recortado`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Londrina+Solid:wght@400;900&family=Work+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`},{name:`print-pop-art`,label:`Pop art`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Bangers&family=Nunito+Sans:wght@400;600;700;800&display=swap`},{name:`print-cientifico`,label:`Figura de periódico científico`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap`},{name:`print-art-nouveau`,label:`Art nouveau`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Federo&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap`},{name:`print-memphis`,label:`Memphis`,kind:`print`,fontsUrl:`https://fonts.googleapis.com/css2?family=Bungee&family=Rubik:ital,wght@0,400;0,500;0,700;1,400&display=swap`}];const jr=[`system`,`light`,`dark`],Mr=[`compact`,`default`,`comfortable`],Nr=Ar,Pr=e=>jr.includes(e),Fr=e=>Mr.includes(e),Ir=e=>Nr.some(t=>t.name===e);function Lr(e,t){try{let n=JSON.parse(e?.getItem(t)??`{}`),r={};return Ir(n.theme)&&(r.theme=n.theme),Pr(n.mode)&&(r.mode=n.mode),Fr(n.density)&&(r.density=n.density),r}catch{return{}}}function Rr(e,t,n){try{e?.setItem(t,JSON.stringify(n))}catch{}}function zr(e,t){return{theme:e.theme??(Ir(t.theme)?t.theme:`tympan`),mode:e.mode??t.mode,density:e.density??t.density}}const Br=e=>e.toLocaleLowerCase().normalize(`NFD`).replace(/\p{Diacritic}/gu,``);function Z(e,t,n=[]){let r=Br(t.trim());if(!r)return[];let i=Br(e).indexOf(r);return i>=0?Array.from({length:r.length},(e,t)=>i+t):n.some(e=>Br(e).includes(r))?[]:null}function Vr(e,t,n,r){let i=[],a=(e,t)=>{t.length&&i.push({group:e,heading:n.groups[e],rows:t})},o=i=>Nr.filter(e=>e.kind===i&&(!r||r.has(e.name))).flatMap(r=>{let a=n.themes[r.name]??r.label,o=Z(a,e,[r.name]);return o?[{key:`theme:${r.name}`,group:i,value:r.name,label:a,hint:r.name,current:r.name===t.theme,marks:o}]:[]});return a(`preset`,o(`preset`)),a(`print`,o(`print`)),a(`mode`,jr.flatMap(r=>{let i=Z(n.modes[r],e,[r]);return i?[{key:`mode:${r}`,group:`mode`,value:r,label:n.modes[r],current:r===t.mode,marks:i}]:[]})),a(`density`,Mr.flatMap(r=>{let i=Z(n.densities[r],e,[r]);return i?[{key:`density:${r}`,group:`density`,value:r,label:n.densities[r],current:r===t.density,marks:i}]:[]})),i}function Hr(e){switch(e.group){case`preset`:case`print`:return{theme:e.value};case`mode`:return{mode:e.value};case`density`:return{density:e.value}}}const Ur=`http://www.w3.org/2000/svg`;function Wr(){try{return window.localStorage}catch{return}}function Q(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function Gr(){let e=document.createElementNS(Ur,`svg`);e.setAttribute(`class`,`ty-palette__search-icon`),e.setAttribute(`viewBox`,`0 0 24 24`),e.setAttribute(`fill`,`none`),e.setAttribute(`stroke`,`currentColor`),e.setAttribute(`stroke-width`,`2`),e.setAttribute(`aria-hidden`,`true`);let t=document.createElementNS(Ur,`circle`);t.setAttribute(`cx`,`11`),t.setAttribute(`cy`,`11`),t.setAttribute(`r`,`7`);let n=document.createElementNS(Ur,`path`);return n.setAttribute(`d`,`m20 20-3.5-3.5`),e.append(t,n),e}var Kr=class extends s{static definition=kr;#e=null;#t=null;#n=null;#r=null;#i=null;#a=``;#o=0;#s=[];#c=``;get appearance(){let e=this.props;return zr(Lr(Wr(),String(e.storageKey)),{theme:String(e.defaultTheme),mode:String(e.defaultMode),density:String(e.defaultDensity)})}select(e){let t=String(this.props.storageKey),n={...Lr(Wr(),t),...e};Rr(Wr(),t,n);let r=this.appearance;this.#u(r),this.emit(`ty-theme-change`,{...r})}connected(){this.#l()}disconnected(){this.#h(!1)}changed(){this.isConnected&&this.#l()}#l(){let e=this.props;if(e.apply){let t=`${e.defaultTheme}|${e.defaultMode}|${e.defaultDensity}|${e.storageKey}`;t!==this.#c&&(this.#c=t,this.#u(this.appearance))}e.open&&!this.#e?this.#m():!e.open&&this.#e?this.#h(!1):this.#e&&this.#v()}#u(e){let t=document.documentElement;t.setAttribute(`data-ty-theme`,e.theme),t.setAttribute(`data-ty-mode`,e.mode),t.setAttribute(`data-ty-density`,e.density);let n=Nr.find(t=>t.name===e.theme),r=this.getAttribute(`print-stylesheet`);this.#d(`ty-print-themes`,n?.kind===`print`&&r?r:null),this.#d(`ty-theme-fonts`,this.hasAttribute(`load-fonts`)?n?.fontsUrl??null:null)}#d(e,t){let n=document.getElementById(e);if(!t){n?.remove();return}if(n){n.getAttribute(`href`)!==t&&n.setAttribute(`href`,t);return}let r=Q(`link`,void 0,{id:e,rel:`stylesheet`,href:t});document.head.append(r)}#f(){let e=this.props,t={};try{t=JSON.parse(String(e.themeLabels??`{}`))}catch{t={}}return{groups:{preset:String(e.groupPresets),print:String(e.groupPrint),mode:String(e.groupMode),density:String(e.groupDensity)},modes:{system:String(e.modeSystem),light:String(e.modeLight),dark:String(e.modeDark)},densities:{compact:String(e.densityCompact),default:String(e.densityDefault),comfortable:String(e.densityComfortable)},themes:t}}#p(){let e=String(this.props.themes??``).split(`,`).map(e=>e.trim()).filter(Boolean);return e.length?new Set(e):void 0}#m(){let e=this.props,t=this.instanceId,n=Q(`dialog`,`ty-palette`,{"aria-label":String(e.label),"data-ty-palette":``}),r=Q(`div`,`ty-palette__dialog`),i=Q(`div`,`ty-palette__field`),a=Q(`input`,`ty-palette__input`,{role:`combobox`,"aria-label":String(e.label),"aria-autocomplete":`list`,"aria-controls":`${t}-list`,placeholder:String(e.placeholder),autocomplete:`off`,spellcheck:`false`,type:`text`});i.append(Gr(),a);let o=Q(`div`,`ty-palette__main`),s=Q(`div`,`ty-palette__results`),c=Q(`div`,`ty-palette__list`,{id:`${t}-list`,role:`listbox`,"aria-label":String(e.label)}),l=Q(`p`,`ty-palette__empty`);l.hidden=!0,s.append(c,l),o.append(s);let u=Q(`div`,`ty-palette__footer`,{"aria-hidden":`true`});for(let[t,n]of[[`↑↓`,e.hintNavigate],[`↵`,e.hintSelect],[`esc`,e.hintClose]]){let e=Q(`span`),r=Q(`kbd`,`ty-palette__kbd`);r.textContent=t,e.append(r,` ${String(n)}`),u.append(e)}let d=Q(`span`,`ty-visually-hidden`,{role:`status`});r.append(i,o,u,d),n.append(r),a.addEventListener(`input`,()=>{this.#a=a.value,this.#o=0,this.#v()}),a.addEventListener(`keydown`,e=>this.#g(e)),n.addEventListener(`cancel`,e=>{e.preventDefault(),this.#h(!0)}),n.addEventListener(`click`,e=>{e.target===n&&this.#h(!0)}),this.#e=n,this.#t=a,this.#n=c,this.#i=l,this.#r=d,this.#a=``,this.#o=0,this.replaceChildren(n),this.#v(),typeof n.showModal==`function`?n.showModal():n.setAttribute(`open`,``),a.focus()}#h(e){let t=this.#e;t&&(this.#e=null,this.#t=null,this.#n=null,t.open&&typeof t.close==`function`&&t.close(),t.remove(),this.hasAttribute(`open`)&&this.removeAttribute(`open`),e&&this.emit(`ty-close`))}#g(e){let t=this.#s.length,n=n=>{e.preventDefault(),t&&(this.#o=(n+t)%t,this.#v())};switch(e.key){case`ArrowDown`:return n(this.#o+1);case`ArrowUp`:return n(this.#o-1);case`Home`:return n(0);case`End`:return n(t-1);case`Enter`:{e.preventDefault();let t=this.#s[this.#o];t&&this.#_(t);return}case`Escape`:e.preventDefault(),e.stopPropagation(),this.#a?(this.#a=``,this.#t&&(this.#t.value=``),this.#o=0,this.#v()):this.#h(!0);return}}#_(e){this.select(Hr(e)),this.#h(!0)}#v(){let e=this.#n,t=this.#t;if(!e||!t)return;let n=this.props,r=this.instanceId,i=this.appearance,a=Vr(this.#a,i,this.#f(),this.#p());this.#s=a.flatMap(e=>e.rows),this.#o>=this.#s.length&&(this.#o=Math.max(0,this.#s.length-1));let o=this.#s[this.#o];e.replaceChildren(...a.map(e=>{let t=Q(`div`,`ty-palette__group`,{role:`group`,"aria-labelledby":`${r}-${e.group}`}),i=Q(`div`,`ty-palette__heading`,{id:`${r}-${e.group}`,role:`presentation`});i.textContent=e.heading,t.append(i);for(let i of e.rows){let e=i===o,a=Q(`div`,`ty-palette__option`,{id:`${r}-${i.key.replace(`:`,`-`)}`,role:`option`,"aria-selected":String(e),"data-kind":i.group});e&&a.setAttribute(`data-highlighted`,``),i.current&&a.setAttribute(`data-current`,``);let s=Q(`span`,`ty-palette__icon`,{"aria-hidden":`true`}),c=Q(`span`,`ty-palette__swatch`);(i.group===`preset`||i.group===`print`)&&c.setAttribute(`data-ty-theme`,i.value),i.group===`mode`&&i.value!==`system`&&c.setAttribute(`data-ty-mode`,i.value),i.group===`density`&&c.setAttribute(`data-density-swatch`,i.value),s.append(c);let l=Q(`span`,`ty-palette__text`),u=Q(`span`,`ty-palette__label`);if(qr(u,i.label,i.marks),l.append(u),a.append(s,l),i.current){let e=Q(`span`,`ty-palette__hint`);e.textContent=String(n.currentLabel),a.append(e)}else if(i.hint&&i.hint!==i.label){let e=Q(`span`,`ty-palette__hint`);e.textContent=i.hint,a.append(e)}a.addEventListener(`pointermove`,()=>{let e=this.#s.indexOf(i);e!==this.#o&&(this.#o=e,this.#v())}),a.addEventListener(`mousedown`,e=>e.preventDefault()),a.addEventListener(`click`,()=>this.#_(i)),t.append(a)}return t})),t.setAttribute(`aria-expanded`,String(this.#s.length>0)),o?t.setAttribute(`aria-activedescendant`,`${r}-${o.key.replace(`:`,`-`)}`):t.removeAttribute(`aria-activedescendant`),this.#i&&(this.#i.hidden=this.#s.length>0,this.#i.textContent=String(n.emptyLabel)),this.#r&&(this.#r.textContent=this.#a.trim()?String(n.resultsLabel).replace(`{count}`,String(this.#s.length)):``),o&&document.getElementById(`${r}-${o.key.replace(`:`,`-`)}`)?.scrollIntoView?.({block:`nearest`})}};function qr(e,t,n){if(!n.length){e.textContent=t;return}let r=n[0],i=n[n.length-1]+1;r>0&&e.append(t.slice(0,r));let a=Q(`mark`,`ty-palette__mark`);a.textContent=t.slice(r,i),e.append(a),i<t.length&&e.append(t.slice(i))}const Jr=/* @__PURE__ */ new Set([`input`,`br`,`hr`,`img`,`meta`,`link`]);function $(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function Yr(t,i,a,o){if(!t.anatomy)return``;let s=e(t,i),c=new Set(Object.entries(a).filter(([,e])=>e!==``).map(([e])=>e)),l=e=>{if(!n(e.when,s,c))return``;if(`slot`in e)return a[e.slot]??``;if(`text`in e){let t=s[e.text.prop];return t===void 0||t===!1||t===``?``:$(String(t))}let t=[];e.class&&t.push(`class="${$(e.class)}"`);for(let[n,i]of Object.entries(e.attrs??{})){let e=r(i,s,c,o);e!==void 0&&t.push(e===``?n:`${n}="${$(e)}"`)}let i=`<${e.tag}${t.length?` ${t.join(` `)}`:``}>`;return Jr.has(e.tag)?i:`${i}${(e.children??[]).map(l).join(``)}</${e.tag}>`};return l(t.anatomy)}function Xr(t,n,r,i){let a=e(t,n),o=[`data-ty-instance="${$(i)}"`];for(let[e,n]of Object.entries(t.props)){let t=a[e];t!==void 0&&t!==!1&&t!==``&&o.push(n.type===`boolean`?n.attribute:`${n.attribute}="${$(String(t))}"`)}return`<${t.tag}${o.length?` ${o.join(` `)}`:``}>${Yr(t,n,r,i)}</${t.tag}>`}function Zr(){d(jn),d(hn),d(ln),d(sn),d(Zt),d(jt),d(ht),d(st),d(at),d(Je),d(Ne),d(je),d(ke),d(De),d(Ce),d(xe),d(_e),d(fe),d(ee),d(Nn),d(Fn),d(Vn),d(Un),d(Yn),d(Zn),d(nr),d(ir),d(or),d(cr),d(fr),d(hr),d(vr),d(br),d(Sr),d(wr),d(Er),d(Or),d(Kr)}Zr();export{jn as TyActionMenuElement,hn as TyAvatarElement,ln as TyBrandWordmarkElement,sn as TyBreadcrumbsElement,Nn as TyButtonElement,Fn as TyCheckboxElement,Zt as TyCommandPaletteElement,jt as TyCurrencyFieldElement,ht as TyDataTableElement,Vn as TyDrawerElement,s as TyElement,Un as TyGradientMarkElement,st as TyHeadingElement,Yn as TyInlineNoticeElement,Zn as TyLinkElement,at as TyMarkdownViewElement,nr as TyModalElement,or as TyNativeSelectElement,Je as TyNotificationCenterElement,Ne as TyPageHeaderElement,ir as TyPopoverElement,je as TyProgressBarElement,ke as TySectionHeadingElement,De as TySegmentedControlElement,cr as TySeparatorElement,fr as TySkeletonElement,Ce as TySkipLinkElement,hr as TySpinnerElement,vr as TyStatusPillElement,br as TySurfaceElement,Sr as TySwitchElement,xe as TyTabsElement,wr as TyTagElement,_e as TyTagFieldElement,Er as TyTextAreaElement,Or as TyTextFieldElement,Kr as TyThemePaletteElement,fe as TyToastElement,ee as TyWheelPickerElement,cn as brandWordmarkDefinition,Mn as buttonDefinition,Pn as checkboxDefinition,d as defineTympanElement,Zr as defineTympanElements,Ln as drawerDefinition,Hn as gradientMarkDefinition,Jn as inlineNoticeDefinition,H as linkDefinition,$n as modalDefinition,ar as nativeSelectDefinition,Yr as renderAnatomy,Xr as renderElement,sr as separatorDefinition,lr as skeletonDefinition,mr as spinnerDefinition,gr as statusPillDefinition,yr as surfaceDefinition,xr as switchDefinition,Cr as tagDefinition,Tr as textAreaDefinition,Dr as textFieldDefinition,kr as themePaletteDefinition};
|