@aceshooting/lyra-ui 32.1.0 → 33.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +247 -1576
  2. package/README.md +15 -2
  3. package/custom-elements.slim.json +1 -0
  4. package/dist/accent-roles.css +1 -0
  5. package/dist/cli/migrate-wa.mjs +50 -48
  6. package/dist/cli/migration-contract.json.gz +0 -0
  7. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +1 -1
  8. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +10 -0
  9. package/dist/components/conversation/code-block/code-block-base.class.d.ts +3 -1
  10. package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
  11. package/dist/components/conversation/code-block/code-block-core.class.d.ts +1 -1
  12. package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
  13. package/dist/components/conversation/code-block/code-block.class.d.ts +3 -2
  14. package/dist/components/conversation/code-block/code-block.class.js +1 -1
  15. package/dist/components/conversation/code-block/code-grammar-registry.d.ts +35 -0
  16. package/dist/components/conversation/code-block/code-grammar-registry.js +1 -0
  17. package/dist/components/conversation/model-select/model-select.class.d.ts +8 -7
  18. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +1 -1
  19. package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +1 -1
  20. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +8 -7
  21. package/dist/components/data/table/table-support.d.ts +2 -3
  22. package/dist/components/data/table/table.class.d.ts +2 -1
  23. package/dist/components/data/timeline/timeline.class.d.ts +17 -6
  24. package/dist/components/data/timeline/timeline.class.js +2 -2
  25. package/dist/components/data/timeline/timeline.styles.js +1 -1
  26. package/dist/components/forms/catalog-picker-base.d.ts +14 -1
  27. package/dist/components/forms/checkbox/checkbox.class.js +1 -1
  28. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +4 -5
  29. package/dist/components/forms/checkbox-group/checkbox-group.styles.js +1 -1
  30. package/dist/components/forms/code-editor/code-editor.class.d.ts +14 -5
  31. package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
  32. package/dist/components/forms/color-picker/color-picker.class.d.ts +18 -7
  33. package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
  34. package/dist/components/forms/combobox/combobox-option-html.js +1 -0
  35. package/dist/components/forms/combobox/combobox.class.d.ts +30 -9
  36. package/dist/components/forms/combobox/combobox.class.js +110 -21
  37. package/dist/components/forms/combobox/combobox.styles.js +1 -1
  38. package/dist/components/forms/country-picker/country-picker.class.d.ts +4 -5
  39. package/dist/components/forms/currency-picker/currency-picker.class.d.ts +4 -5
  40. package/dist/components/forms/date-picker/date-input.class.d.ts +14 -5
  41. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  42. package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +10 -0
  43. package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
  44. package/dist/components/forms/icon-button/icon-button.class.d.ts +2 -1
  45. package/dist/components/forms/input/input-shared.d.ts +14 -5
  46. package/dist/components/forms/input/time-input.class.d.ts +15 -6
  47. package/dist/components/forms/input/time-input.styles.js +1 -1
  48. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +8 -7
  49. package/dist/components/forms/otp-input/otp-input.class.d.ts +4 -5
  50. package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
  51. package/dist/components/forms/phone-input/phone-input.class.d.ts +14 -5
  52. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  53. package/dist/components/forms/radio/radio-group.class.d.ts +4 -5
  54. package/dist/components/forms/radio/radio-group.styles.js +1 -1
  55. package/dist/components/forms/radio/radio.class.js +2 -2
  56. package/dist/components/forms/select/select.class.d.ts +5 -6
  57. package/dist/components/forms/signature-pad/signature-pad.class.d.ts +4 -5
  58. package/dist/components/forms/signature-pad/signature-pad.styles.js +1 -1
  59. package/dist/components/forms/slider/slider.class.d.ts +6 -5
  60. package/dist/components/forms/slider/slider.styles.js +1 -1
  61. package/dist/components/forms/textarea/textarea.class.d.ts +14 -5
  62. package/dist/components/forms/time-zone-picker/time-zone-picker.class.d.ts +4 -5
  63. package/dist/components/forms/token-input/token-input.class.d.ts +10 -10
  64. package/dist/components/forms/token-input/token-input.class.js +1 -1
  65. package/dist/components/forms/token-input/token-input.styles.js +1 -1
  66. package/dist/components/forms/unit-picker/unit-picker.class.d.ts +4 -5
  67. package/dist/components/layout/command-palette/command-palette.class.d.ts +1 -1
  68. package/dist/components/layout/menu/menu.class.d.ts +1 -1
  69. package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.d.ts +1 -1
  70. package/dist/components/layout/segmented/segmented.class.d.ts +2 -2
  71. package/dist/components/layout/stepper/step.class.d.ts +14 -1
  72. package/dist/components/layout/stepper/step.class.js +2 -2
  73. package/dist/components/lr-map-anchor.d.ts +1 -1
  74. package/dist/components/media/file-input/file-input.class.d.ts +2 -1
  75. package/dist/components/media/file-input/file-input.class.js +1 -1
  76. package/dist/components/media/file-input/file-input.styles.js +1 -1
  77. package/dist/components/media/lightbox/lightbox-item.class.d.ts +10 -0
  78. package/dist/components/media/lightbox/lightbox-item.class.js +1 -1
  79. package/dist/components/media/lightbox/lightbox-source.js +1 -1
  80. package/dist/components/media/lightbox/lightbox-types.d.ts +4 -1
  81. package/dist/components/media/lightbox/lightbox.class.d.ts +42 -19
  82. package/dist/components/media/lightbox/lightbox.class.js +4 -3
  83. package/dist/components/media/lightbox/lightbox.styles.js +1 -1
  84. package/dist/components/media/map/map-anchor-avoid.js +1 -1
  85. package/dist/components/media/map/map-anchor-options.d.ts +9 -0
  86. package/dist/components/media/map/map.class.d.ts +19 -5
  87. package/dist/components/media/map/map.class.js +3 -3
  88. package/dist/components/overlays/context-menu/context-menu.class.d.ts +1 -1
  89. package/dist/components/overlays/dialog/dialog.class.d.ts +19 -3
  90. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  91. package/dist/components/overlays/dialog/dialog.styles.js +1 -1
  92. package/dist/components/overlays/drawer/drawer.class.d.ts +8 -2
  93. package/dist/components/overlays/drawer/drawer.class.js +1 -1
  94. package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -1
  95. package/dist/components/overlays/overlay/overlay.styles.js +1 -1
  96. package/dist/components/overlays/overlay/popover.class.d.ts +1 -1
  97. package/dist/components/overlays/overlay/popover.class.js +1 -1
  98. package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -0
  99. package/dist/components/overlays/overlay/tooltip.class.js +2 -2
  100. package/dist/components/overlays/toast/toast-item.class.d.ts +2 -2
  101. package/dist/components/overlays/toast/toast-item.styles.js +1 -1
  102. package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +1 -1
  103. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +1 -1
  104. package/dist/components/utility/copy-button/copy-button.class.d.ts +2 -1
  105. package/dist/components/utility/copy-button/copy-button.class.js +1 -1
  106. package/dist/components/utility/export-button/export-button.class.d.ts +1 -1
  107. package/dist/components/utility/icon/icon-library-bootstrap.d.ts +50 -0
  108. package/dist/components/utility/icon/icon-library-bootstrap.js +1 -0
  109. package/dist/components/utility/icon/icon-library-font-awesome.d.ts +68 -0
  110. package/dist/components/utility/icon/icon-library-font-awesome.js +1 -0
  111. package/dist/components/utility/known-date/known-date.class.d.ts +10 -0
  112. package/dist/components/utility/mention-popover/mention-popover.class.d.ts +1 -1
  113. package/dist/components/utility/number-ticker/number-ticker.class.d.ts +10 -2
  114. package/dist/components/utility/number-ticker/number-ticker.class.js +1 -1
  115. package/dist/components/utility/tour/tour.class.d.ts +1 -1
  116. package/dist/framework-types.d.ts +1 -1
  117. package/dist/internal/accessibility-visibility.js +1 -1
  118. package/dist/internal/autoloader-manifest.js +1 -1
  119. package/dist/internal/declarative-overlay-action.js +1 -0
  120. package/dist/internal/default-strings/forms.generated.js +1 -1
  121. package/dist/internal/document-token-css.generated.js +10 -0
  122. package/dist/internal/document-tokens.generated.js +2 -11
  123. package/dist/internal/document-tokens.js +2 -2
  124. package/dist/internal/dom-guards.js +1 -1
  125. package/dist/internal/external-label-association.js +1 -0
  126. package/dist/internal/focus-navigation.js +1 -1
  127. package/dist/internal/form-control/chrome.styles.js +1 -1
  128. package/dist/internal/form-control-labels.js +1 -1
  129. package/dist/internal/localization-runtime.js +1 -1
  130. package/dist/internal/localization-types.d.ts +1 -1
  131. package/dist/internal/localization.js +1 -1
  132. package/dist/internal/lyra-element.d.ts +12 -3
  133. package/dist/internal/lyra-element.js +2 -2
  134. package/dist/internal/package-metadata.js +1 -1
  135. package/dist/internal/theme-observation.js +1 -1
  136. package/dist/lyra.d.ts +1 -1
  137. package/dist/lyra.js +1 -1
  138. package/dist/ssr.d.ts +1 -1
  139. package/dist/styles/tokens-root.css +1 -1
  140. package/dist/styles/utilities.css +1 -1
  141. package/dist/theme-core.css +1 -1
  142. package/dist/theme.css +1 -1
  143. package/llms/components/lr-button.md +4 -0
  144. package/llms/components/lr-card.md +2 -0
  145. package/llms/components/lr-checkbox-group.md +2 -2
  146. package/llms/components/lr-citation-badge.md +1 -1
  147. package/llms/components/lr-code-block-core.md +3 -1
  148. package/llms/components/lr-code-block.md +14 -0
  149. package/llms/components/lr-code-editor.md +2 -2
  150. package/llms/components/lr-color-picker.md +4 -4
  151. package/llms/components/lr-combobox.md +21 -5
  152. package/llms/components/lr-context-menu.md +1 -1
  153. package/llms/components/lr-copy-button.md +4 -3
  154. package/llms/components/lr-country-picker.md +2 -2
  155. package/llms/components/lr-currency-picker.md +2 -2
  156. package/llms/components/lr-date-input.md +1 -1
  157. package/llms/components/lr-date-picker.md +1 -1
  158. package/llms/components/lr-dialog.md +30 -2
  159. package/llms/components/lr-drawer.md +7 -1
  160. package/llms/components/lr-entity-chip.md +1 -1
  161. package/llms/components/lr-export-button.md +1 -1
  162. package/llms/components/lr-file-input.md +1 -1
  163. package/llms/components/lr-icon.md +96 -0
  164. package/llms/components/lr-input.md +2 -2
  165. package/llms/components/lr-lightbox.md +43 -17
  166. package/llms/components/lr-locale-picker.md +2 -2
  167. package/llms/components/lr-map.md +16 -1
  168. package/llms/components/lr-mention-popover.md +1 -1
  169. package/llms/components/lr-menu.md +1 -1
  170. package/llms/components/lr-model-select.md +4 -4
  171. package/llms/components/lr-native-time-input.md +2 -2
  172. package/llms/components/lr-number-input.md +2 -2
  173. package/llms/components/lr-number-ticker.md +7 -2
  174. package/llms/components/lr-otp-input.md +2 -2
  175. package/llms/components/lr-phone-input.md +2 -2
  176. package/llms/components/lr-popover.md +1 -1
  177. package/llms/components/lr-radio-group.md +2 -2
  178. package/llms/components/lr-segmented.md +1 -1
  179. package/llms/components/lr-select.md +3 -3
  180. package/llms/components/lr-selection-toolbar.md +1 -1
  181. package/llms/components/lr-signature-pad.md +2 -2
  182. package/llms/components/lr-slider.md +1 -1
  183. package/llms/components/lr-step.md +7 -1
  184. package/llms/components/lr-textarea.md +2 -2
  185. package/llms/components/lr-time-input.md +3 -3
  186. package/llms/components/lr-time-zone-picker.md +2 -2
  187. package/llms/components/lr-timeline.md +12 -5
  188. package/llms/components/lr-toast.md +1 -1
  189. package/llms/components/lr-token-input.md +10 -9
  190. package/llms/components/lr-tool-call-chip.md +1 -1
  191. package/llms/components/lr-tooltip.md +5 -0
  192. package/llms/components/lr-unit-picker.md +2 -2
  193. package/llms/components/lr-usage-badge.md +1 -1
  194. package/llms/components/lr-voice-picker.md +4 -3
  195. package/llms/index.md +128 -128
  196. package/llms/migration.md +87 -8
  197. package/llms/peers.md +2 -2
  198. package/llms/shared/events-and-types.md +1 -1
  199. package/llms/shared/forms-and-accessibility.md +4 -1
  200. package/llms/shared/frameworks-and-ssr.md +47 -1
  201. package/llms/shared/imports-and-registration.md +8 -1
  202. package/llms/shared/localization-and-rtl.md +5 -0
  203. package/llms/shared/native-styles-and-utilities.md +85 -8
  204. package/llms/shared/styles-and-tokens.md +58 -4
  205. package/llms/shared/testing-and-utilities.md +9 -0
  206. package/llms/shared.md +217 -16
  207. package/locales.json +1 -1
  208. package/package.json +15 -6
  209. package/registrations.json +1 -1
  210. package/skills/compose-lyra-interfaces/SKILL.md +1 -1
  211. package/skills/lyra-ui/SKILL.md +1 -1
  212. package/skills/lyra-ui/commands/migrate.md +1 -1
@@ -1 +1 @@
1
- import{composedParentElement,deepActiveElementIn}from"./active-element.js";import{asciiWhitespaceTokens}from"./ascii-whitespace.js";import{cachedImageMapImageFor,isHtmlElement,isSvgElement,isShadowRootNode}from"./dom-guards.js";import{hasFocusExcludingAttributes,isNativeAction,rendersAsFocusTarget,styleExcludesFocusSubtree}from"./focus-candidates.js";const DEFAULT_FOCUS_MAX_DEPTH=256,DEFAULT_FOCUS_MAX_NODES=1e4,MAX_CONFIGURED_FOCUS_LIMIT=1e5,ARIA_WIDGET_ROLES=new Set(["button","checkbox","combobox","grid","gridcell","link","listbox","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","option","radio","radiogroup","scrollbar","searchbox","separator","slider","spinbutton","switch","tab","tablist","textbox","tree","treegrid","treeitem"]),ARIA_NON_WIDGET_ROLES=new Set(["alert","alertdialog","application","article","banner","blockquote","caption","cell","code","columnheader","comment","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","group","heading","img","image","insertion","list","listitem","log","main","marquee","mark","math","meter","navigation","none","note","paragraph","presentation","progressbar","region","row","rowgroup","rowheader","search","sectionfooter","sectionheader","status","strong","subscript","suggestion","superscript","table","tabpanel","term","time","timer","toolbar","tooltip"]);function finiteFocusLimit(value,fallback){return Number.isFinite(value)?Math.min(MAX_CONFIGURED_FOCUS_LIMIT,Math.max(0,Math.floor(value))):fallback}function createFocusTraversalContext(options){return{browserTabOrder:options.browserTabOrder===!0,elementStates:new Map,imageMapImages:new Map,maxDepth:finiteFocusLimit(options.maxDepth,DEFAULT_FOCUS_MAX_DEPTH),maxNodes:finiteFocusLimit(options.maxNodes,DEFAULT_FOCUS_MAX_NODES),reasons:new Set,workUnits:0}}function renderedElementState(element,imageMapImage,browserTabOrder){let style;try{style=element.ownerDocument.defaultView?.getComputedStyle(element)}catch{}return{display:style?.display,subtreeUnavailable:hasFocusExcludingAttributes(element,browserTabOrder)||!imageMapImage&&styleExcludesFocusSubtree(style),visibility:style?.visibility}}function consumeFocusWork(context){return context.workUnits>=context.maxNodes?(context.reasons.add("nodes"),!1):(context.workUnits+=1,!0)}function cachedRenderedElementState(context,element){let state=context.elementStates.get(element);return state||(state=renderedElementState(element,cachedImageMapImage(context,element),context.browserTabOrder),context.elementStates.set(element,state)),state}function cachedImageMapImage(context,element){return cachedImageMapImageFor(context.imageMapImages,element,()=>consumeFocusWork(context))}function isClosedDetailsBranch(details,branch,context){if(details.localName!=="details"||details.hasAttribute("open")||branch===null)return!1;for(const child of details.children){if(!consumeFocusWork(context))return!0;if(child.localName==="summary")return child!==branch}return!0}function composedAncestorsAvailable(element,context){let branch=element,ancestor=composedParentElement(element),depth=0;for(;ancestor;){if(!consumeFocusWork(context)||cachedRenderedElementState(context,ancestor).subtreeUnavailable||isClosedDetailsBranch(ancestor,branch,context))return!1;if(depth+=1,depth>context.maxDepth)return context.reasons.add("depth"),!1;branch=ancestor,ancestor=composedParentElement(ancestor)}return!0}function isRenderedFocusCandidate(context,element,state){const imageMapImage=cachedImageMapImage(context,element);if(isHtmlElement(element)&&element.localName==="area"&&!imageMapImage)return!1;if(imageMapImage){const imageState=cachedRenderedElementState(context,imageMapImage);return composedAncestorsAvailable(imageMapImage,context)&&!imageState.subtreeUnavailable&&isRenderedFocusCandidate(context,imageMapImage,imageState)}return element.isConnected?rendersAsFocusTarget(element,state.visibility,!context.browserTabOrder):!1}function hasAriaWidgetRole(element){for(const token of asciiWhitespaceTokens(element.getAttribute("role"))){const role=token.toLowerCase();if(ARIA_WIDGET_ROLES.has(role))return!0;if(ARIA_NON_WIDGET_ROLES.has(role))return!1}return!1}function isBrowserFocusElement(element){return isHtmlElement(element)||isSvgElement(element)}function isSemanticActionElement(element){return isBrowserFocusElement(element)&&(isNativeAction(element)||hasAriaWidgetRole(element))}function isActionableElement(element){return isSemanticActionElement(element)||isBrowserFocusElement(element)&&element.hasAttribute("tabindex")&&element.tabIndex>=0}function isComposedFocusAvailable(element,options={}){if(!isBrowserFocusElement(element))return!1;const context=createFocusTraversalContext(options);if(!consumeFocusWork(context)||!composedAncestorsAvailable(element,context))return!1;const state=cachedRenderedElementState(context,element);return state.subtreeUnavailable||element.matches(":disabled")?!1:isRenderedFocusCandidate(context,element,state)}function composedContains(container,candidate,maxDepth=DEFAULT_FOCUS_MAX_DEPTH){let current=candidate,depth=0;for(;current;){if(current===container)return!0;if(depth>=maxDepth)return!1;current=composedParentElement(current),depth+=1}return!1}function isComposedFocusRepairTargetList(value){return Array.isArray(value)}function resolveComposedFocusRepairTargets(source){const resolved=typeof source=="function"?source():source;if(!resolved)return[];if(!isComposedFocusRepairTargetList(resolved))return[resolved];const targets=[];for(const target of resolved)target&&targets.push(target);return targets}function nearestExternalFocusTarget(owner){const targets=collectComposedFocusTargets(owner.ownerDocument.documentElement,{mode:"programmatic"}).elements,owned=targets.map((target,index)=>composedContains(owner,target)?index:-1).filter(index=>index>=0);if(owned.length===0)return null;const first=owned[0],last=owned[owned.length-1];return targets.slice(last+1).find(target=>!composedContains(owner,target))??targets.slice(0,first).reverse().find(target=>!composedContains(owner,target))??null}function captureComposedFocusRepair(owner,candidate){const activeElement=deepActiveElementIn(owner.ownerDocument);if(!activeElement||!composedContains(owner,activeElement))return null;const resolved=typeof candidate=="function"?candidate():candidate;return!resolved||resolved.ownerDocument!==owner.ownerDocument?null:{activeElement,candidate:resolved,document:owner.ownerDocument,owner}}function applyComposedFocusRepair(snapshot,candidateOverride){const{document:ownerDocument,owner}=snapshot,targetSource=arguments.length<2?snapshot.candidate:candidateOverride,candidates=resolveComposedFocusRepairTargets(targetSource);if(candidates.length===0)return!1;const current=deepActiveElementIn(ownerDocument),lostWithBranch=current===null||current===ownerDocument.body||current===ownerDocument.documentElement;return current!==snapshot.activeElement&&!composedContains(owner,current)&&!lostWithBranch?!1:focusFirstAvailable(candidates.filter(candidate=>candidate.ownerDocument===ownerDocument))}function repairUnavailableControlFocus(control,fallbacks){const ownerDocument=control.ownerDocument,current=deepActiveElementIn(ownerDocument);if(current===control&&!control.matches(":disabled")||current&&current!==control&&current!==ownerDocument.body&&current!==ownerDocument.documentElement)return!1;for(const candidate of fallbacks){if(!candidate?.isConnected||candidate.ownerDocument!==ownerDocument||candidate.matches(":disabled"))continue;let branch=candidate;for(let depth=0;branch&&depth<=DEFAULT_FOCUS_MAX_DEPTH&&!hasFocusExcludingAttributes(branch);depth++)branch=composedParentElement(branch);if(!(branch||!rendersAsFocusTarget(candidate,ownerDocument.defaultView?.getComputedStyle(candidate).visibility))&&(candidate.focus(),deepActiveElementIn(ownerDocument)===candidate))return!0}return!1}function focusFirstAvailable(targets){for(const candidate of resolveComposedFocusRepairTargets(targets)){if(!isComposedFocusAvailable(candidate))continue;candidate.focus();const focused=deepActiveElementIn(candidate.ownerDocument);if(focused===candidate||composedContains(candidate,focused))return!0}return!1}function repairComposedFocus(owner,fallbackTargets){const activeElement=deepActiveElementIn(owner.ownerDocument);if(!activeElement||!composedContains(owner,activeElement))return!1;const candidates=resolveComposedFocusRepairTargets(fallbackTargets),[candidate]=candidates;return candidate?applyComposedFocusRepair({activeElement,candidate,document:owner.ownerDocument,owner},candidates):!1}function nextHostUpdateOpportunity(){return new Promise(resolve=>{queueMicrotask(()=>{requestAnimationFrame(()=>resolve())})})}function deferComposedFocusRepair(owner,bridge,resolveTarget){const snapshot=captureComposedFocusRepair(owner,bridge);snapshot&&nextHostUpdateOpportunity().then(()=>{let target;try{target=resolveTarget()}catch{target=null}applyComposedFocusRepair(snapshot,target?[target]:[])})}function traverseComposedElements(root,options,include){const context=createFocusTraversalContext(options),{maxDepth,maxNodes}=context,elements=[],stack=[],visited=new Set,navigationScope={entries:[],nextOrder:0};if(maxNodes===0)return context.reasons.add("nodes"),{elements,navigationScope,reasons:context.reasons,visitedElements:0};const schedule=(element,depth,ancestorsAvailable,scope,workCharged=!1)=>{if(depth>maxDepth){context.reasons.add("depth");return}stack.push({ancestorsAvailable,depth,element,kind:"element",scope,workCharged})},scheduleChildren=(children,depth,ancestorsAvailable,scope)=>{if(children.length!==0){if(depth>maxDepth){context.reasons.add("depth");return}stack.push({ancestorsAvailable,children,depth,index:0,kind:"children",scope})}},scheduleSlotChildren=(slot,depth,ancestorsAvailable,scope)=>{if(depth>maxDepth){context.reasons.add("depth");return}const slotRoot=slot.getRootNode(),candidates=slotRoot.nodeType===11&&"host"in slotRoot?slotRoot.host.childNodes:[];stack.push({ancestorsAvailable,candidates,depth,fallback:slot.children,foundAssigned:!1,index:0,kind:"slot",scope,slot})},scheduleComposedChildren=(element,depth,ancestorsAvailable,scope)=>{if(element.localName==="slot"&&isHtmlElement(element)){scheduleSlotChildren(element,depth,ancestorsAvailable,scope);return}if(element.localName==="details"&&!element.hasAttribute("open")){for(const child of element.children){if(!consumeFocusWork(context))return;if(child.localName==="summary"){schedule(child,depth,ancestorsAvailable,scope,!0);return}}return}scheduleChildren(element.shadowRoot?.children??element.children,depth,ancestorsAvailable,scope)};if(isShadowRootNode(root)){const shadowRoot=root,ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(shadowRoot.host,context),hostStateAvailable=consumeFocusWork(context)&&!cachedRenderedElementState(context,shadowRoot.host).subtreeUnavailable;scheduleChildren(shadowRoot.children,0,ancestorsAvailable&&hostStateAvailable,navigationScope)}else if(options.includeRoot===!1){const ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(root,context),ownAvailable=consumeFocusWork(context)&&!cachedRenderedElementState(context,root).subtreeUnavailable;scheduleComposedChildren(root,0,ancestorsAvailable&&ownAvailable,navigationScope)}else{const ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(root,context);schedule(root,0,ancestorsAvailable,navigationScope)}for(;stack.length>0;){const work=stack.pop();if(work.kind==="slot"){if(work.index>=work.candidates.length){work.foundAssigned||scheduleChildren(work.fallback,work.depth,work.ancestorsAvailable,work.scope);continue}if(!consumeFocusWork(context)){stack.length=0;break}const node=work.candidates[work.index],assigned=!!(node&&node.assignedSlot===work.slot);stack.push({...work,foundAssigned:work.foundAssigned||assigned,index:work.index+1}),node?.nodeType===1&&assigned&&schedule(node,work.depth,work.ancestorsAvailable,work.scope,!0);continue}if(work.kind==="children"){if(work.index>=work.children.length)continue;const element=work.children[work.index];stack.push({...work,index:work.index+1}),element&&schedule(element,work.depth,work.ancestorsAvailable,work.scope);continue}if(visited.has(work.element))continue;if(!work.workCharged&&!consumeFocusWork(context)){stack.length=0;break}visited.add(work.element);const state=cachedRenderedElementState(context,work.element),available=work.ancestorsAvailable&&!state.subtreeUnavailable,included=include(work.element,available,state,context);if(included&&elements.push(work.element),!available)continue;if(work.element.shadowRoot||work.element.localName==="slot"&&isHtmlElement(work.element)){const childScope={entries:[],nextOrder:0};work.scope.entries.push({childScope,delegatesFocus:!!work.element.shadowRoot?.delegatesFocus,order:work.scope.nextOrder++,suppressSequentialDescendants:work.element.hasAttribute("tabindex")&&work.element.tabIndex<0,target:included&&isBrowserFocusElement(work.element)?work.element:void 0}),scheduleComposedChildren(work.element,work.depth+1,!0,childScope);continue}included&&isBrowserFocusElement(work.element)&&work.scope.entries.push({order:work.scope.nextOrder++,target:work.element}),scheduleComposedChildren(work.element,work.depth+1,!0,work.scope)}return{elements,navigationScope,reasons:context.reasons,visitedElements:visited.size}}function isOverflowingTabStop(element){const view=element.ownerDocument.defaultView;if(!view)return!1;const{overflowX,overflowY}=view.getComputedStyle(element);return overflowX==="scroll"||overflowY==="scroll"||overflowY==="auto"&&element.scrollHeight>element.clientHeight?!0:overflowX==="auto"&&element.scrollWidth>element.clientWidth}function isTabbableCandidate(element){return element.hasAttribute("tabindex")?element.tabIndex>=0?!0:isHtmlElement(element)&&!isNativeAction(element)&&isOverflowingTabStop(element):isHtmlElement(element)&&element.hasAttribute("contenteditable")&&element.isContentEditable?!element.parentElement?.isContentEditable:isNativeAction(element)}function collapseRadioGroups(elements){const byRoot=new Map;for(const element of elements){if(!isHtmlElement(element)||element.localName!=="input")continue;const input=element;if(input.type!=="radio"||input.name==="")continue;const root=input.getRootNode();let byForm=byRoot.get(root);byForm||(byForm=new Map,byRoot.set(root,byForm));let byName=byForm.get(input.form);byName||(byName=new Map,byForm.set(input.form,byName));const group=byName.get(input.name);group?input.checked&&!group.checked&&(group.checked=input):byName.set(input.name,{checked:input.checked?input:void 0,first:input})}const tabStops=new Set;for(const byForm of byRoot.values())for(const byName of byForm.values())for(const group of byName.values())tabStops.add(group.checked??group.first);return elements.filter(element=>{if(!isHtmlElement(element)||element.localName!=="input")return!0;const input=element;return input.type!=="radio"||input.name===""||tabStops.has(input)})}function navigationEntryTabIndex(entry){return entry.target&&entry.target.tabIndex>0?entry.target.tabIndex:0}function flattenNavigationScope(scope,mode,retainedTargets){const orderedEntries=candidate=>mode==="tabbable"?[...candidate.entries].sort((first,second)=>{const firstTabIndex=navigationEntryTabIndex(first),secondTabIndex=navigationEntryTabIndex(second);return firstTabIndex>0!=secondTabIndex>0?firstTabIndex>0?-1:1:firstTabIndex>0&&firstTabIndex!==secondTabIndex?firstTabIndex-secondTabIndex:first.order-second.order}):candidate.entries,flattened=[],work=[{kind:"scope",scope}];for(;work.length>0;){const current=work.pop();if(current.kind==="target"){flattened.push(current.target);continue}const entries=orderedEntries(current.scope);for(let index=entries.length-1;index>=0;index-=1){const entry=entries[index];entry.childScope&&(mode!=="tabbable"||!entry.suppressSequentialDescendants)&&work.push({kind:"scope",scope:entry.childScope}),entry.target&&retainedTargets.has(entry.target)&&!entry.delegatesFocus&&work.push({kind:"target",target:entry.target})}}return flattened}function collectComposedFocusTargets(root,options={}){const mode=options.mode??"tabbable",traversed=traverseComposedElements(root,options,(candidate,available,state,context)=>!available||!isBrowserFocusElement(candidate)||candidate.matches(":disabled")||!isRenderedFocusCandidate(context,candidate,state)?!1:mode==="programmatic"?candidate.hasAttribute("tabindex")||isActionableElement(candidate):(candidate.hasAttribute("tabindex")||isActionableElement(candidate))&&isTabbableCandidate(candidate)),included=traversed.elements.filter(isBrowserFocusElement),retained=new Set(included),orderedElements=flattenNavigationScope(traversed.navigationScope,mode,retained);return{elements:mode==="tabbable"?collapseRadioGroups(orderedElements):orderedElements,truncated:traversed.reasons.size>0,truncationReasons:[...traversed.reasons],visitedElements:traversed.visitedElements}}function collectComposedAutofocusElements(root,options={}){const traversed=traverseComposedElements(root,options,(element,available)=>available&&isHtmlElement(element)&&element.hasAttribute("autofocus"));return{elements:traversed.elements,truncated:traversed.reasons.size>0,truncationReasons:[...traversed.reasons],visitedElements:traversed.visitedElements}}export{applyComposedFocusRepair,captureComposedFocusRepair,collectComposedAutofocusElements,collectComposedFocusTargets,deferComposedFocusRepair,focusFirstAvailable,isActionableElement,isComposedFocusAvailable,isSemanticActionElement,nearestExternalFocusTarget,nextHostUpdateOpportunity,repairComposedFocus,repairUnavailableControlFocus};
1
+ import{composedParentElement,deepActiveElementIn}from"./active-element.js";import{asciiWhitespaceTokens}from"./ascii-whitespace.js";import{cachedImageMapImageFor,consumeBoundedNodeWork as consumeFocusWork,isClosedDetailsBranchBounded,isHtmlElement,isSvgElement,isShadowRootNode}from"./dom-guards.js";import{hasFocusExcludingAttributes,isNativeAction,rendersAsFocusTarget,styleExcludesFocusSubtree}from"./focus-candidates.js";const DEFAULT_FOCUS_MAX_DEPTH=256,DEFAULT_FOCUS_MAX_NODES=1e4,MAX_CONFIGURED_FOCUS_LIMIT=1e5,ARIA_WIDGET_ROLES=new Set(["button","checkbox","combobox","grid","gridcell","link","listbox","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","option","radio","radiogroup","scrollbar","searchbox","separator","slider","spinbutton","switch","tab","tablist","textbox","tree","treegrid","treeitem"]),ARIA_NON_WIDGET_ROLES=new Set(["alert","alertdialog","application","article","banner","blockquote","caption","cell","code","columnheader","comment","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","group","heading","img","image","insertion","list","listitem","log","main","marquee","mark","math","meter","navigation","none","note","paragraph","presentation","progressbar","region","row","rowgroup","rowheader","search","sectionfooter","sectionheader","status","strong","subscript","suggestion","superscript","table","tabpanel","term","time","timer","toolbar","tooltip"]);function finiteFocusLimit(value,fallback){return Number.isFinite(value)?Math.min(MAX_CONFIGURED_FOCUS_LIMIT,Math.max(0,Math.floor(value))):fallback}function createFocusTraversalContext(options){return{browserTabOrder:options.browserTabOrder===!0,elementStates:new Map,imageMapImages:new Map,maxDepth:finiteFocusLimit(options.maxDepth,DEFAULT_FOCUS_MAX_DEPTH),maxNodes:finiteFocusLimit(options.maxNodes,DEFAULT_FOCUS_MAX_NODES),reasons:new Set,workUnits:0}}function renderedElementState(element,imageMapImage,browserTabOrder){let style;try{style=element.ownerDocument.defaultView?.getComputedStyle(element)}catch{}return{display:style?.display,subtreeUnavailable:hasFocusExcludingAttributes(element,browserTabOrder)||!imageMapImage&&styleExcludesFocusSubtree(style),visibility:style?.visibility}}function cachedRenderedElementState(context,element){let state=context.elementStates.get(element);return state||(state=renderedElementState(element,cachedImageMapImage(context,element),context.browserTabOrder),context.elementStates.set(element,state)),state}function cachedImageMapImage(context,element){return cachedImageMapImageFor(context.imageMapImages,element,()=>consumeFocusWork(context))}function composedAncestorsAvailable(element,context){let branch=element,ancestor=composedParentElement(element),depth=0;for(;ancestor;){if(!consumeFocusWork(context)||cachedRenderedElementState(context,ancestor).subtreeUnavailable||isClosedDetailsBranchBounded(ancestor,branch,()=>consumeFocusWork(context)))return!1;if(depth+=1,depth>context.maxDepth)return context.reasons.add("depth"),!1;branch=ancestor,ancestor=composedParentElement(ancestor)}return!0}function isRenderedFocusCandidate(context,element,state){const imageMapImage=cachedImageMapImage(context,element);if(isHtmlElement(element)&&element.localName==="area"&&!imageMapImage)return!1;if(imageMapImage){const imageState=cachedRenderedElementState(context,imageMapImage);return composedAncestorsAvailable(imageMapImage,context)&&!imageState.subtreeUnavailable&&isRenderedFocusCandidate(context,imageMapImage,imageState)}return element.isConnected?rendersAsFocusTarget(element,state.visibility,!context.browserTabOrder):!1}function hasAriaWidgetRole(element){for(const token of asciiWhitespaceTokens(element.getAttribute("role"))){const role=token.toLowerCase();if(ARIA_WIDGET_ROLES.has(role))return!0;if(ARIA_NON_WIDGET_ROLES.has(role))return!1}return!1}function isBrowserFocusElement(element){return isHtmlElement(element)||isSvgElement(element)}function isSemanticActionElement(element){return isBrowserFocusElement(element)&&(isNativeAction(element)||hasAriaWidgetRole(element))}function isActionableElement(element){return isSemanticActionElement(element)||isBrowserFocusElement(element)&&element.hasAttribute("tabindex")&&element.tabIndex>=0}function isComposedFocusAvailable(element,options={}){if(!isBrowserFocusElement(element))return!1;const context=createFocusTraversalContext(options);if(!consumeFocusWork(context)||!composedAncestorsAvailable(element,context))return!1;const state=cachedRenderedElementState(context,element);return state.subtreeUnavailable||element.matches(":disabled")?!1:isRenderedFocusCandidate(context,element,state)}function composedContains(container,candidate,maxDepth=DEFAULT_FOCUS_MAX_DEPTH){let current=candidate,depth=0;for(;current;){if(current===container)return!0;if(depth>=maxDepth)return!1;current=composedParentElement(current),depth+=1}return!1}function isComposedFocusRepairTargetList(value){return Array.isArray(value)}function resolveComposedFocusRepairTargets(source){const resolved=typeof source=="function"?source():source;if(!resolved)return[];if(!isComposedFocusRepairTargetList(resolved))return[resolved];const targets=[];for(const target of resolved)target&&targets.push(target);return targets}function nearestExternalFocusTarget(owner){const targets=collectComposedFocusTargets(owner.ownerDocument.documentElement,{mode:"programmatic"}).elements,owned=targets.map((target,index)=>composedContains(owner,target)?index:-1).filter(index=>index>=0);if(owned.length===0)return null;const first=owned[0],last=owned[owned.length-1];return targets.slice(last+1).find(target=>!composedContains(owner,target))??targets.slice(0,first).reverse().find(target=>!composedContains(owner,target))??null}function captureComposedFocusRepair(owner,candidate){const activeElement=deepActiveElementIn(owner.ownerDocument);if(!activeElement||!composedContains(owner,activeElement))return null;const resolved=typeof candidate=="function"?candidate():candidate;return!resolved||resolved.ownerDocument!==owner.ownerDocument?null:{activeElement,candidate:resolved,document:owner.ownerDocument,owner}}function applyComposedFocusRepair(snapshot,candidateOverride){const{document:ownerDocument,owner}=snapshot,targetSource=arguments.length<2?snapshot.candidate:candidateOverride,candidates=resolveComposedFocusRepairTargets(targetSource);if(candidates.length===0)return!1;const current=deepActiveElementIn(ownerDocument),lostWithBranch=current===null||current===ownerDocument.body||current===ownerDocument.documentElement;return current!==snapshot.activeElement&&!composedContains(owner,current)&&!lostWithBranch?!1:focusFirstAvailable(candidates.filter(candidate=>candidate.ownerDocument===ownerDocument))}function repairUnavailableControlFocus(control,fallbacks){const ownerDocument=control.ownerDocument,current=deepActiveElementIn(ownerDocument);if(current===control&&!control.matches(":disabled")||current&&current!==control&&current!==ownerDocument.body&&current!==ownerDocument.documentElement)return!1;for(const candidate of fallbacks){if(!candidate?.isConnected||candidate.ownerDocument!==ownerDocument||candidate.matches(":disabled"))continue;let branch=candidate;for(let depth=0;branch&&depth<=DEFAULT_FOCUS_MAX_DEPTH&&!hasFocusExcludingAttributes(branch);depth++)branch=composedParentElement(branch);if(!(branch||!rendersAsFocusTarget(candidate,ownerDocument.defaultView?.getComputedStyle(candidate).visibility))&&(candidate.focus(),deepActiveElementIn(ownerDocument)===candidate))return!0}return!1}function focusFirstAvailable(targets){for(const candidate of resolveComposedFocusRepairTargets(targets)){if(!isComposedFocusAvailable(candidate))continue;candidate.focus();const focused=deepActiveElementIn(candidate.ownerDocument);if(focused===candidate||composedContains(candidate,focused))return!0}return!1}function repairComposedFocus(owner,fallbackTargets){const activeElement=deepActiveElementIn(owner.ownerDocument);if(!activeElement||!composedContains(owner,activeElement))return!1;const candidates=resolveComposedFocusRepairTargets(fallbackTargets),[candidate]=candidates;return candidate?applyComposedFocusRepair({activeElement,candidate,document:owner.ownerDocument,owner},candidates):!1}function nextHostUpdateOpportunity(){return new Promise(resolve=>{queueMicrotask(()=>{requestAnimationFrame(()=>resolve())})})}function deferComposedFocusRepair(owner,bridge,resolveTarget){const snapshot=captureComposedFocusRepair(owner,bridge);snapshot&&nextHostUpdateOpportunity().then(()=>{let target;try{target=resolveTarget()}catch{target=null}applyComposedFocusRepair(snapshot,target?[target]:[])})}function traverseComposedElements(root,options,include){const context=createFocusTraversalContext(options),{maxDepth,maxNodes}=context,elements=[],stack=[],visited=new Set,navigationScope={entries:[],nextOrder:0};if(maxNodes===0)return context.reasons.add("nodes"),{elements,navigationScope,reasons:context.reasons,visitedElements:0};const schedule=(element,depth,ancestorsAvailable,scope,workCharged=!1)=>{if(depth>maxDepth){context.reasons.add("depth");return}stack.push({ancestorsAvailable,depth,element,kind:"element",scope,workCharged})},scheduleChildren=(children,depth,ancestorsAvailable,scope)=>{if(children.length!==0){if(depth>maxDepth){context.reasons.add("depth");return}stack.push({ancestorsAvailable,children,depth,index:0,kind:"children",scope})}},scheduleSlotChildren=(slot,depth,ancestorsAvailable,scope)=>{if(depth>maxDepth){context.reasons.add("depth");return}const slotRoot=slot.getRootNode(),candidates=slotRoot.nodeType===11&&"host"in slotRoot?slotRoot.host.childNodes:[];stack.push({ancestorsAvailable,candidates,depth,fallback:slot.children,foundAssigned:!1,index:0,kind:"slot",scope,slot})},scheduleComposedChildren=(element,depth,ancestorsAvailable,scope)=>{if(element.localName==="slot"&&isHtmlElement(element)){scheduleSlotChildren(element,depth,ancestorsAvailable,scope);return}if(element.localName==="details"&&!element.hasAttribute("open")){for(const child of element.children){if(!consumeFocusWork(context))return;if(child.localName==="summary"){schedule(child,depth,ancestorsAvailable,scope,!0);return}}return}scheduleChildren(element.shadowRoot?.children??element.children,depth,ancestorsAvailable,scope)};if(isShadowRootNode(root)){const shadowRoot=root,ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(shadowRoot.host,context),hostStateAvailable=consumeFocusWork(context)&&!cachedRenderedElementState(context,shadowRoot.host).subtreeUnavailable;scheduleChildren(shadowRoot.children,0,ancestorsAvailable&&hostStateAvailable,navigationScope)}else if(options.includeRoot===!1){const ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(root,context),ownAvailable=consumeFocusWork(context)&&!cachedRenderedElementState(context,root).subtreeUnavailable;scheduleComposedChildren(root,0,ancestorsAvailable&&ownAvailable,navigationScope)}else{const ancestorsAvailable=options.skipRootAncestorValidation||composedAncestorsAvailable(root,context);schedule(root,0,ancestorsAvailable,navigationScope)}for(;stack.length>0;){const work=stack.pop();if(work.kind==="slot"){if(work.index>=work.candidates.length){work.foundAssigned||scheduleChildren(work.fallback,work.depth,work.ancestorsAvailable,work.scope);continue}if(!consumeFocusWork(context)){stack.length=0;break}const node=work.candidates[work.index],assigned=!!(node&&node.assignedSlot===work.slot);stack.push({...work,foundAssigned:work.foundAssigned||assigned,index:work.index+1}),node?.nodeType===1&&assigned&&schedule(node,work.depth,work.ancestorsAvailable,work.scope,!0);continue}if(work.kind==="children"){if(work.index>=work.children.length)continue;const element=work.children[work.index];stack.push({...work,index:work.index+1}),element&&schedule(element,work.depth,work.ancestorsAvailable,work.scope);continue}if(visited.has(work.element))continue;if(!work.workCharged&&!consumeFocusWork(context)){stack.length=0;break}visited.add(work.element);const state=cachedRenderedElementState(context,work.element),available=work.ancestorsAvailable&&!state.subtreeUnavailable,included=include(work.element,available,state,context);if(included&&elements.push(work.element),!available)continue;if(work.element.shadowRoot||work.element.localName==="slot"&&isHtmlElement(work.element)){const childScope={entries:[],nextOrder:0};work.scope.entries.push({childScope,delegatesFocus:!!work.element.shadowRoot?.delegatesFocus,order:work.scope.nextOrder++,suppressSequentialDescendants:work.element.hasAttribute("tabindex")&&work.element.tabIndex<0,target:included&&isBrowserFocusElement(work.element)?work.element:void 0}),scheduleComposedChildren(work.element,work.depth+1,!0,childScope);continue}included&&isBrowserFocusElement(work.element)&&work.scope.entries.push({order:work.scope.nextOrder++,target:work.element}),scheduleComposedChildren(work.element,work.depth+1,!0,work.scope)}return{elements,navigationScope,reasons:context.reasons,visitedElements:visited.size}}function isOverflowingTabStop(element){const view=element.ownerDocument.defaultView;if(!view)return!1;const{overflowX,overflowY}=view.getComputedStyle(element);return overflowX==="scroll"||overflowY==="scroll"||overflowY==="auto"&&element.scrollHeight>element.clientHeight?!0:overflowX==="auto"&&element.scrollWidth>element.clientWidth}function isTabbableCandidate(element){return element.hasAttribute("tabindex")?element.tabIndex>=0?!0:isHtmlElement(element)&&!isNativeAction(element)&&isOverflowingTabStop(element):isHtmlElement(element)&&element.hasAttribute("contenteditable")&&element.isContentEditable?!element.parentElement?.isContentEditable:isNativeAction(element)}function collapseRadioGroups(elements){const byRoot=new Map;for(const element of elements){if(!isHtmlElement(element)||element.localName!=="input")continue;const input=element;if(input.type!=="radio"||input.name==="")continue;const root=input.getRootNode();let byForm=byRoot.get(root);byForm||(byForm=new Map,byRoot.set(root,byForm));let byName=byForm.get(input.form);byName||(byName=new Map,byForm.set(input.form,byName));const group=byName.get(input.name);group?input.checked&&!group.checked&&(group.checked=input):byName.set(input.name,{checked:input.checked?input:void 0,first:input})}const tabStops=new Set;for(const byForm of byRoot.values())for(const byName of byForm.values())for(const group of byName.values())tabStops.add(group.checked??group.first);return elements.filter(element=>{if(!isHtmlElement(element)||element.localName!=="input")return!0;const input=element;return input.type!=="radio"||input.name===""||tabStops.has(input)})}function navigationEntryTabIndex(entry){return entry.target&&entry.target.tabIndex>0?entry.target.tabIndex:0}function flattenNavigationScope(scope,mode,retainedTargets){const orderedEntries=candidate=>mode==="tabbable"?[...candidate.entries].sort((first,second)=>{const firstTabIndex=navigationEntryTabIndex(first),secondTabIndex=navigationEntryTabIndex(second);return firstTabIndex>0!=secondTabIndex>0?firstTabIndex>0?-1:1:firstTabIndex>0&&firstTabIndex!==secondTabIndex?firstTabIndex-secondTabIndex:first.order-second.order}):candidate.entries,flattened=[],work=[{kind:"scope",scope}];for(;work.length>0;){const current=work.pop();if(current.kind==="target"){flattened.push(current.target);continue}const entries=orderedEntries(current.scope);for(let index=entries.length-1;index>=0;index-=1){const entry=entries[index];entry.childScope&&(mode!=="tabbable"||!entry.suppressSequentialDescendants)&&work.push({kind:"scope",scope:entry.childScope}),entry.target&&retainedTargets.has(entry.target)&&!entry.delegatesFocus&&work.push({kind:"target",target:entry.target})}}return flattened}function collectComposedFocusTargets(root,options={}){const mode=options.mode??"tabbable",traversed=traverseComposedElements(root,options,(candidate,available,state,context)=>!available||!isBrowserFocusElement(candidate)||candidate.matches(":disabled")||!isRenderedFocusCandidate(context,candidate,state)?!1:mode==="programmatic"?candidate.hasAttribute("tabindex")||isActionableElement(candidate):(candidate.hasAttribute("tabindex")||isActionableElement(candidate))&&isTabbableCandidate(candidate)),included=traversed.elements.filter(isBrowserFocusElement),retained=new Set(included),orderedElements=flattenNavigationScope(traversed.navigationScope,mode,retained);return{elements:mode==="tabbable"?collapseRadioGroups(orderedElements):orderedElements,truncated:traversed.reasons.size>0,truncationReasons:[...traversed.reasons],visitedElements:traversed.visitedElements}}function collectComposedAutofocusElements(root,options={}){const traversed=traverseComposedElements(root,options,(element,available)=>available&&isHtmlElement(element)&&element.hasAttribute("autofocus"));return{elements:traversed.elements,truncated:traversed.reasons.size>0,truncationReasons:[...traversed.reasons],visitedElements:traversed.visitedElements}}export{applyComposedFocusRepair,captureComposedFocusRepair,collectComposedAutofocusElements,collectComposedFocusTargets,deferComposedFocusRepair,focusFirstAvailable,isActionableElement,isComposedFocusAvailable,isSemanticActionElement,nearestExternalFocusTarget,nextHostUpdateOpportunity,repairComposedFocus,repairUnavailableControlFocus};
@@ -1 +1 @@
1
- import{css}from"lit";import{formControlLabelDisplay,formControlLabelTypography,formControlSupportingText}from"../form-control.styles.js";const formControlLabelPlacement=/* @__PURE__ */(()=>css`:host([label-placement=start]) [part~=form-control]{--_lr-label-column:var(--lr-form-control-label-inline-size,30%);--_lr-label-gap:var(--lr-form-control-label-gap,var(--lr-space-m));--_lr-label-collapse:var(--lr-form-control-label-collapse-inline-size,var(--lr-size-20rem));align-items:flex-start;column-gap:var(--_lr-label-gap);flex-flow:wrap;display:flex}:host([label-placement=start]) [part~=form-control]>:not([part~=form-control-label]){flex:1 1 0;min-inline-size:0}:host([label-placement=start]) [part~=form-control]>[part~=form-control-label]{flex:0 0 clamp(var(--_lr-label-column),(var(--_lr-label-collapse) - 100%) * 9999,100%);box-sizing:border-box;margin-block-end:clamp(0px,(var(--_lr-label-collapse) - 100%) * 9999,var(--lr-form-control-label-block-gap,var(--lr-space-xs)));padding-block-start:clamp(0px,(100% - var(--_lr-label-collapse)) * 9999,max(0px,(var(--lr-form-control-height,var(--lr-size-2-5rem)) - 1lh) / 2))}:host([label-placement=start]) [part~=form-control]>:is([part~=hint],[part~=error],[data-form-control-row]){box-sizing:border-box;flex:0 0 100%}:host([label-placement=start]:not([label-display=hidden])) [part~=form-control]:has(>[part~=form-control-label]:not([hidden]))>:is([part~=hint],[part~=error],[data-form-control-row]){padding-inline-start:clamp(0px,(100% - var(--_lr-label-collapse)) * 9999,var(--_lr-label-column) + var(--_lr-label-gap))}`)(),formControlChrome=/* @__PURE__ */(()=>css` [part~=form-control-label]{display:block;margin-block-end:var(--lr-form-control-label-block-gap,var(--lr-space-xs));${formControlLabelTypography()}}[part~=form-control-label][hidden]{display:none}${formControlSupportingText} ${formControlLabelDisplay} `)();export{formControlChrome,formControlLabelPlacement};
1
+ import{css}from"lit";import{formControlLabelDisplay,formControlLabelTypography,formControlSupportingText}from"../form-control.styles.js";const formControlLabelPlacement=/* @__PURE__ */(()=>css`:host([label-placement=start]) [part~=form-control]{--_lr-label-column:var(--lr-form-control-label-inline-size,30%);--_lr-label-gap:var(--lr-form-control-label-gap,var(--lr-space-m));--_lr-label-collapse:var(--lr-form-control-label-collapse-inline-size,var(--lr-size-20rem));align-items:flex-start;column-gap:var(--_lr-label-gap);flex-flow:wrap;display:flex}:host([label-placement=start]) [part~=form-control]>:not([part~=form-control-label]){flex:1 1 0;min-inline-size:0}:host([label-placement=start]) [part~=form-control]>[part~=form-control-label]{flex:0 0 var(--_lr-label-column);box-sizing:border-box;min-inline-size:clamp(0px,(var(--_lr-label-collapse) - 100%) * 9999,100%);max-inline-size:100%;margin-block-end:clamp(0px,(var(--_lr-label-collapse) - 100%) * 9999,var(--lr-form-control-label-gap,var(--lr-space-xs)));padding-block-start:clamp(0px,(100% - var(--_lr-label-collapse)) * 9999,max(0px,(var(--lr-form-control-height,var(--lr-size-2-5rem)) - 1lh) / 2))}:host([label-placement=start]) [part~=form-control]>:is([part~=hint],[part~=error],[data-form-control-row]){box-sizing:border-box;flex:0 0 100%}:host([label-placement=start]:not([label-display=hidden])) [part~=form-control]:has(>[part~=form-control-label]:not([hidden]))>:is([part~=hint],[part~=error],[data-form-control-row]){padding-inline-start:clamp(0px,(100% - var(--_lr-label-collapse)) * 9999,var(--_lr-label-column) + var(--_lr-label-gap))}`)(),formControlChrome=/* @__PURE__ */(()=>css` [part~=form-control-label]{display:block;margin-block-end:var(--lr-form-control-label-gap,var(--lr-space-xs));${formControlLabelTypography()}}[part~=form-control-label][hidden]{display:none}${formControlSupportingText} ${formControlLabelDisplay} `)();export{formControlChrome,formControlLabelPlacement};
@@ -1 +1 @@
1
- import{isAriaTrue}from"./aria-values.js";import{deepActiveElementIn}from"./active-element.js";import{hasFocusExcludingAttributes,styleExcludesFocusSubtree}from"./focus-candidates.js";import{firstFormControlFocusTarget}from"./form-control-focus-target.js";import{registerFormControlLabelSupport}from"./lyra-element.js";import{isShadowRootNode}from"./dom-guards.js";const EXTERNAL_LABEL_ACTIVATION=Symbol("lr-external-label-activation"),EXTERNAL_LABEL_HOST_SEMANTICS=Symbol("lr-external-label-host-semantics"),attachedInternals=new WeakMap;function captureFormInternals(host,internals){attachedInternals.set(host,internals)}const COMPOSITE_ROLE_SELECTOR='[role="radiogroup"],[role="group"],[role="grid"],[role="tree"]',SEMANTIC_TARGET_SELECTOR=['input:not([type="hidden"]):not([tabindex="-1"])','textarea:not([tabindex="-1"])','select:not([tabindex="-1"])','button:not([tabindex="-1"])','[role]:not([tabindex="-1"])'].join(","),ACTIVATING_ROLES=new Set(["checkbox","switch","radio","menuitemcheckbox","menuitemradio"]),MAX_ASSOCIATION_CANDIDATES_PER_MUTATION=2048,MAX_ASSOCIATION_REFRESHES_PER_TASK=256,associationRootObservations=new WeakMap;function isLabelElement(node){return node!==null&&"nodeType"in node&&node.nodeType===1&&"localName"in node&&node.localName==="label"}function isHtmlElement(node){return node.nodeType===1&&"focus"in node&&"style"in node}function isCurrentlyAssociatedLabel(label,host){const root=host.getRootNode();if(label.getRootNode()!==root)return!1;if(!label.hasAttribute("for")){const control="control"in label?label.control:void 0;return control==null?label.contains(host):control===host}const id=label.htmlFor;return id===""?!1:"getElementById"in root&&typeof root.getElementById=="function"?root.getElementById(id)===host:!("querySelectorAll"in root)||typeof root.querySelectorAll!="function"?!1:[...root.querySelectorAll("[id]")].find(candidate=>candidate.id===id)===host}function addSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id)??new Set;subscribers.add(subscription),observation.subscriptionsById.set(subscription.id,subscribers)}function removeSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id);subscribers?.delete(subscription),subscribers?.size===0&&observation.subscriptionsById.delete(subscription.id)}function updateSubscriptionId(observation,subscription){const id=subscription.host.id;id!==subscription.id&&(removeSubscriptionById(observation,subscription),subscription.id=id,addSubscriptionById(observation,subscription))}function addImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label)??new Set;subscriptions.add(subscription),observation.implicitSubscriptionsByLabel.set(label,subscriptions)}function removeImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label);subscriptions?.delete(subscription),subscriptions?.size===0&&observation.implicitSubscriptionsByLabel.delete(label)}function updateImplicitSubscriptions(observation,subscription,labels){const next=labels.filter(label=>!label.hasAttribute("for"));for(const label of subscription.implicitLabels)next.includes(label)||removeImplicitSubscription(observation,label,subscription);for(const label of next)subscription.implicitLabels.includes(label)||addImplicitSubscription(observation,label,subscription);subscription.implicitLabels=next}function hasAssociationRefreshes(observation){return observation.pending.size>0||observation.fallbackIterator!==void 0}function cancelAssociationContinuation(observation){observation.cancelContinuation?.(),observation.cancelContinuation=void 0}function scheduleAssociationContinuation(observation){if(!hasAssociationRefreshes(observation)||observation.cancelContinuation!==void 0)return;const callback=()=>{observation.cancelContinuation=void 0,drainAssociationRefreshes(observation)};if(observation.ownerWindow){const handle=observation.ownerWindow.setTimeout(callback,0);observation.cancelContinuation=()=>observation.ownerWindow?.clearTimeout(handle)}else{const handle=globalThis.setTimeout(callback,0);observation.cancelContinuation=()=>globalThis.clearTimeout(handle)}}function refreshAssociationSubscription(observation,subscription){subscription.active&&(subscription.listener(),observation.fallbackIterator&&(subscription.fallbackGeneration=observation.fallbackGeneration))}function drainTargetedAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;scheduleAssociationContinuation(observation)}function drainAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;for(;remaining>0&&observation.fallbackIterator;){const next=observation.fallbackIterator.next();if(next.done){observation.fallbackIterator=void 0;break}next.value.active&&next.value.fallbackGeneration!==observation.fallbackGeneration&&(next.value.listener(),next.value.fallbackGeneration=observation.fallbackGeneration),remaining--}scheduleAssociationContinuation(observation)}function notifyAssociationSubscriptions(observation,subscriptions,fallbackAll=!1){if(fallbackAll){const continuationPending=observation.cancelContinuation!==void 0;observation.pending.clear(),observation.fallbackGeneration++,observation.fallbackIterator=observation.subscriptions.values();for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);continuationPending?drainTargetedAssociationRefreshes(observation):drainAssociationRefreshes(observation);return}for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);drainTargetedAssociationRefreshes(observation)}function isLabelableElement(element){return element.localName==="input"?element.type!=="hidden":element.localName==="button"||element.localName==="meter"||element.localName==="output"||element.localName==="progress"||element.localName==="select"||element.localName==="textarea"?!0:element.localName.includes("-")&&element.constructor.formAssociated===!0}function collectAssociationElement(element,result){const id=element.getAttribute("id");return id&&result.ids.add(id),isLabelElement(element)&&element.hasAttribute("for")&&element.htmlFor&&result.ids.add(element.htmlFor),isLabelableElement(element)}function nextAssociationNode(root,current){if(current.firstChild)return current.firstChild;let cursor=current;for(;cursor&&cursor!==root;){if(cursor.nextSibling)return cursor.nextSibling;cursor=cursor.parentNode}return null}function collectAssociationCandidates(node,result){let containsLabelable=!1,current=node;for(;current;){if(result.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){result.truncated=!0;break}result.work++,current.nodeType===1&&(containsLabelable=collectAssociationElement(current,result)||containsLabelable),current=nextAssociationNode(node,current)}return containsLabelable}function containingLabel(node){if(isLabelElement(node))return node;const label=(node.nodeType===1?node:node.parentElement)?.closest("label");return isLabelElement(label??null)?label:null}function containingImplicitLabel(node){const label=containingLabel(node);return label&&!label.hasAttribute("for")?label:null}function collectFirstImplicitSubscription(observation,label,candidates,affected){let current=label.firstChild;for(;current;){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;return}if(candidates.work++,current.nodeType===1&&(isLabelableElement(current)||observation.subscriptionsByHost.has(current))){const subscription=observation.subscriptionsByHost.get(current);subscription&&affected.add(subscription);return}current=nextAssociationNode(label,current)}}function affectedAssociationSubscriptions(observation,mutations){const affected=new Set,candidates={ids:new Set,implicitLabels:new Set,truncated:!1,work:0},addIndexedCandidates=()=>{for(const id of candidates.ids)for(const subscription of observation.subscriptionsById.get(id)??[])affected.add(subscription);for(const label of candidates.implicitLabels)for(const subscription of observation.implicitSubscriptionsByLabel.get(label)??[])affected.add(subscription)};for(const mutation of mutations){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;break}candidates.work++;const label=containingLabel(mutation.target);if(label&&(label.hasAttribute("for")?label.htmlFor&&candidates.ids.add(label.htmlFor):candidates.implicitLabels.add(label)),mutation.type==="characterData")continue;if(mutation.type==="attributes"){const target=mutation.target;if(mutation.attributeName==="id"){const oldId=mutation.oldValue??"",id=target.getAttribute("id")??"";oldId&&candidates.ids.add(oldId),id&&candidates.ids.add(id);const hostSubscription=observation.subscriptionsByHost.get(target);hostSubscription&&(affected.add(hostSubscription),updateSubscriptionId(observation,hostSubscription))}else if(mutation.attributeName==="for"&&isLabelElement(target)){const oldFor=mutation.oldValue;oldFor&&candidates.ids.add(oldFor),target.htmlFor&&candidates.ids.add(target.htmlFor);for(const subscription of observation.implicitSubscriptionsByLabel.get(target)??[])affected.add(subscription);target.hasAttribute("for")||candidates.implicitLabels.add(target)}else if(mutation.attributeName==="type"&&target.localName==="input"){const label2=containingImplicitLabel(target);label2&&candidates.implicitLabels.add(label2)}continue}let changedLabelableShape=!1;for(const node of mutation.addedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break;if(!candidates.truncated){for(const node of mutation.removedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break}if(changedLabelableShape){const label2=containingImplicitLabel(mutation.target);label2&&candidates.implicitLabels.add(label2)}if(candidates.truncated)break}if(addIndexedCandidates(),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};for(const label of candidates.implicitLabels)if(collectFirstImplicitSubscription(observation,label,candidates,affected),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};return{subscriptions:affected,fallbackAll:!1}}function observeExternalLabelAssociations(host,listener){const root=host.getRootNode();let observation=associationRootObservations.get(root);if(!observation){const Observer=host.ownerDocument.defaultView?.MutationObserver,subscriptions=new Set,subscriptionsById=new Map,implicitSubscriptionsByLabel=new WeakMap,subscriptionsByHost=new WeakMap,pending=new Set,holder={},observer=Observer===void 0?void 0:new Observer(mutations=>{const current=holder.observation;if(!current)return;const affected=affectedAssociationSubscriptions(current,mutations);notifyAssociationSubscriptions(current,affected.subscriptions,affected.fallbackAll)});observer?.observe(root,{attributes:!0,attributeFilter:["for","id","type"],attributeOldValue:!0,childList:!0,characterData:!0,subtree:!0}),observation={subscriptions,subscriptionsById,implicitSubscriptionsByLabel,subscriptionsByHost,pending,observer,ownerWindow:host.ownerDocument.defaultView,fallbackGeneration:0},holder.observation=observation,associationRootObservations.set(root,observation)}const subscription={host,listener,id:host.id,implicitLabels:[],fallbackGeneration:-1,active:!0};return observation.subscriptions.add(subscription),observation.subscriptionsByHost.set(host,subscription),addSubscriptionById(observation,subscription),{update(labels){subscription.active&&(updateSubscriptionId(observation,subscription),updateImplicitSubscriptions(observation,subscription,labels))},disconnect(){if(!subscription.active)return;subscription.active=!1,observation.pending.delete(subscription),observation.subscriptions.delete(subscription),observation.subscriptionsByHost.delete(host);for(const label of subscription.implicitLabels)removeImplicitSubscription(observation,label,subscription);subscription.implicitLabels=[],removeSubscriptionById(observation,subscription);const current=associationRootObservations.get(root);!current||current.subscriptions.size>0||(current.observer?.disconnect(),cancelAssociationContinuation(current),current.pending.clear(),current.fallbackIterator=void 0,associationRootObservations.delete(root))}}}function isComposedDescendant(host,candidate){let current=candidate;for(;current;){if(current===host)return!0;if(current.parentNode){current=current.parentNode;continue}current=isShadowRootNode(current)?current.host:null}return!1}function resolveExternalLabels(host){const native=attachedInternals.get(host)?.labels;if(native)return Array.from(native).filter(isLabelElement).filter(label=>isCurrentlyAssociatedLabel(label,host));const labels=[],ancestor=host.closest("label");ancestor&&isCurrentlyAssociatedLabel(ancestor,host)&&labels.push(ancestor);const root=host.getRootNode();if(host.id&&"querySelectorAll"in root)for(const found of root.querySelectorAll("label[for]"))isLabelElement(found)&&isCurrentlyAssociatedLabel(found,host)&&!labels.includes(found)&&labels.push(found);return labels}const LABEL_TEXT_MAX_DEPTH=256,LABEL_TEXT_MAX_NODES=4096,NON_CONTENT_ELEMENTS=new Set(["script","style","template"]);function labelText(label,exclude){let remaining=LABEL_TEXT_MAX_NODES;const read=(node,depth)=>{if(node===exclude||depth>LABEL_TEXT_MAX_DEPTH||--remaining<0)return"";if(node.nodeType===Node.TEXT_NODE)return node.textContent??"";let children=node.childNodes;if(node.nodeType===Node.ELEMENT_NODE){const element=node;if(NON_CONTENT_ELEMENTS.has(element.localName))return"";if(element!==label){if(hasFocusExcludingAttributes(element,!0)||isAriaTrue(element.getAttribute("aria-hidden"))||styleExcludesFocusSubtree(element.ownerDocument.defaultView?.getComputedStyle(element)))return"";const ariaLabel=element.getAttribute("aria-label")?.trim();if(ariaLabel)return ariaLabel;const alternative=element.localName==="img"||element.localName==="area"?element.getAttribute("alt")?.trim():void 0;if(alternative)return alternative}if(element.shadowRoot)children=element.shadowRoot.childNodes;else if(element.localName==="slot"){const assigned=element.assignedNodes({flatten:!0});assigned.length>0&&(children=assigned)}}else if(node.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)return"";let text="";for(let index=0;index<children.length;index+=1)text+=read(children[index],depth+1);return text};return read(label,0)}function resolveExternalLabelText(labels,host){return labels.map(label=>labelText(label,host).trim()).filter(text=>text!=="").join(" ")}class ExternalLabelController{constructor(host){this.host=host,this.labels=[],this.activating=!1,this.onLabelClick=event=>{if(this.activating||this.barred)return;const source=event.currentTarget;if(!source||!isLabelElement(source)||!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}event.composedPath().includes(this.host)||queueMicrotask(()=>{if(event.defaultPrevented||!this.host.isConnected||this.barred)return;if(!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}const focusTarget=this.resolveFocusTarget(),activation=this.resolveActivation(focusTarget);this.activating=!0;try{this.host.focus(),isComposedDescendant(this.host,deepActiveElementIn(this.host.ownerDocument))||focusTarget?.focus(),activation==="activate"&&focusTarget?.click()}finally{this.activating=!1}})}}hostConnected(){this.associationRootSubscription?.disconnect(),this.associationRootSubscription=observeExternalLabelAssociations(this.host,()=>this.refresh()),this.refresh()}hostUpdated(){this.refresh()}hostDisconnected(){this.release(),this.associationRootSubscription?.disconnect(),this.associationRootSubscription=void 0;for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=[]}refresh(){const next=resolveExternalLabels(this.host);if(next.length!==this.labels.length||next.some((label,index)=>label!==this.labels[index])){for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=next;for(const label of this.labels)label.addEventListener("click",this.onLabelClick)}this.associationRootSubscription?.update(next),this.apply()}get barred(){return typeof this.host.matches=="function"&&this.host.matches(":disabled")?!0:!!(this.host.effectiveDisabled??this.host.disabled)}resolveNameTarget(focusTarget){if(this.hostSemanticOwner)return this.host;const root=this.ownRoot;if(!root)return focusTarget;if(focusTarget){for(const composite of root.querySelectorAll(COMPOSITE_ROLE_SELECTOR))if(isHtmlElement(composite)&&isComposedDescendant(composite,focusTarget))return composite}if(focusTarget&&focusTarget.getRootNode()===root)return focusTarget;const owned=focusTarget?this.outermostOwnedAncestor(focusTarget):null;if(owned)return owned;const semantic=root.querySelector(SEMANTIC_TARGET_SELECTOR);return semantic&&isHtmlElement(semantic)?semantic:focusTarget}outermostOwnedAncestor(node){const root=this.ownRoot;let owned=null,current=node;for(;current&&current!==this.host;)isHtmlElement(current)&&(current.getRootNode()===root||current.parentNode===this.host)&&(owned=current),current.parentNode?current=current.parentNode:current=isShadowRootNode(current)?current.host:null;return owned}get ownRoot(){const root=this.host.renderRoot;return isShadowRootNode(root)?root:this.host.shadowRoot}resolveFocusTarget(){return this.hostSemanticOwner?this.host:firstFormControlFocusTarget(this.host)}get hostSemanticOwner(){const candidate=this.host;return typeof candidate[EXTERNAL_LABEL_HOST_SEMANTICS]=="function"?candidate:null}hostHasAuthoredName(owner){return owner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"has-authored-name"})===!0}resolveActivation(focusTarget){const declared=this.host[EXTERNAL_LABEL_ACTIVATION];if(typeof declared=="function")return declared.call(this.host);if(!focusTarget||focusTarget.getRootNode()!==this.ownRoot)return"focus";const role=focusTarget.getAttribute("role");return role&&ACTIVATING_ROLES.has(role)?"activate":"focus"}apply(){const hostOwner=this.hostSemanticOwner;if(hostOwner&&this.hostHasAuthoredName(hostOwner)||!hostOwner&&this.host.hasAttribute("aria-label")){this.release();return}const name=resolveExternalLabelText(this.labels,this.host);if(name===""){this.release();return}const settled=this.applied;if(settled&&settled.name===name&&settled.target.isConnected&&settled.target.getAttribute("aria-label")===name)return;const target=this.resolveNameTarget(this.resolveFocusTarget());target&&(this.applied&&this.applied.target!==target&&this.release(),this.applied||(this.applied={target,name,had:target.hasAttribute("aria-label"),previous:target.getAttribute("aria-label")}),target===this.host&&hostOwner?hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"apply",name}):target.getAttribute("aria-label")!==name&&target.setAttribute("aria-label",name),this.applied.name=name)}release(){const applied=this.applied;if(this.applied=void 0,!applied)return;const{target,name,had,previous}=applied,hostOwner=target===this.host?this.hostSemanticOwner:null;if(hostOwner){hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"release",appliedName:name,hadPrevious:had,previous});return}target.getAttribute("aria-label")===name&&(had?target.setAttribute("aria-label",previous??""):target.removeAttribute("aria-label"))}}function installFormControlInternalsCapture(){registerFormControlLabelSupport(captureFormInternals)}let supportInstalled=!1;function installFormControlLabelSupport(){supportInstalled||(supportInstalled=!0,registerFormControlLabelSupport(captureFormInternals,host=>new ExternalLabelController(host)))}export{EXTERNAL_LABEL_HOST_SEMANTICS,ExternalLabelController,captureFormInternals,installFormControlInternalsCapture,installFormControlLabelSupport,isCurrentlyAssociatedLabel,observeExternalLabelAssociations,resolveExternalLabelText,resolveExternalLabels};
1
+ import{isAriaTrue}from"./aria-values.js";import{deepActiveElementIn}from"./active-element.js";import{hasFocusExcludingAttributes,styleExcludesFocusSubtree}from"./focus-candidates.js";import{firstFormControlFocusTarget}from"./form-control-focus-target.js";import{registerFormControlLabelSupport}from"./lyra-element.js";import{isShadowRootNode}from"./dom-guards.js";const EXTERNAL_LABEL_ACTIVATION=Symbol("lr-external-label-activation"),EXTERNAL_LABEL_HOST_SEMANTICS=Symbol("lr-external-label-host-semantics"),attachedInternals=new WeakMap;function captureFormInternals(host,internals){attachedInternals.set(host,internals)}const COMPOSITE_ROLE_SELECTOR='[role="radiogroup"],[role="group"],[role="grid"],[role="tree"]',SEMANTIC_TARGET_SELECTOR=['input:not([type="hidden"]):not([tabindex="-1"])','textarea:not([tabindex="-1"])','select:not([tabindex="-1"])','button:not([tabindex="-1"])','[role]:not([tabindex="-1"])'].join(","),ACTIVATING_ROLES=new Set(["checkbox","switch","radio","menuitemcheckbox","menuitemradio"]);function isLabelElement(node){return node!==null&&"nodeType"in node&&node.nodeType===1&&"localName"in node&&node.localName==="label"}function isHtmlElement(node){return node.nodeType===1&&"focus"in node&&"style"in node}function isCurrentlyAssociatedLabel(label,host){const root=host.getRootNode();if(label.getRootNode()!==root)return!1;if(!label.hasAttribute("for")){const control="control"in label?label.control:void 0;return control==null?label.contains(host):control===host}const id=label.htmlFor;return id===""?!1:"getElementById"in root&&typeof root.getElementById=="function"?root.getElementById(id)===host:!("querySelectorAll"in root)||typeof root.querySelectorAll!="function"?!1:[...root.querySelectorAll("[id]")].find(candidate=>candidate.id===id)===host}function containingLabel(node){if(isLabelElement(node))return node;const label=(node.nodeType===1?node:node.parentElement)?.closest("label");return isLabelElement(label??null)?label:null}let indexedLabelAssociation,indexedLabelAssociationLoad;const importIndexedLabelAssociationChunk=()=>import("./external-label-association.js");let importIndexedLabelAssociation=importIndexedLabelAssociationChunk;const MAX_LEAN_ASSOCIATION_RECORDS=2048,ASSOCIATION_OBSERVER_OPTIONS={attributes:!0,attributeFilter:["for","id","type"],attributeOldValue:!0,childList:!0,characterData:!0,subtree:!0},leanAssociationRoots=new Map;function mayAssociateLabel(entry,records){let ids;const isControlId=id=>!!id&&(ids??=new Set([...entry.subscriptions].map(({host})=>host.id))).has(id);for(const record of records){if(containingLabel(record.target))return!0;if(record.type==="attributes"){if(record.attributeName==="id"&&(isControlId(record.oldValue)||isControlId(record.target.getAttribute("id"))))return!0;continue}for(const nodes of[record.addedNodes,record.removedNodes])for(const node of nodes){if(node.nodeType!==1)continue;const element=node;if(isLabelElement(element)||element.querySelector("label")||isControlId(element.getAttribute("id")))return!0;for(const identified of element.querySelectorAll("[id]"))if(isControlId(identified.getAttribute("id")))return!0}}return!1}function queueLeanAssociationRecords(entry,records){if(!entry.pending){if(!mayAssociateLabel(entry,records))return;entry.pending=[]}entry.pending.length+records.length>MAX_LEAN_ASSOCIATION_RECORDS?entry.overflow=!0:entry.pending.push(...records),loadExternalLabelAssociation()}function migrateLeanAssociationRoot(entry,indexed){leanAssociationRoots.delete(entry.root);const records=[...entry.pending??[],...entry.observer?.takeRecords()??[]];entry.observer?.disconnect();for(const subscription of entry.subscriptions)subscription.indexed=indexed.observeIndexedLabelAssociations(subscription.host,subscription.listener),subscription.indexed.update(subscription.labels);indexed.replayIndexedLabelAssociations(entry.root,records,entry.overflow)}function loadExternalLabelAssociation(){return indexedLabelAssociationLoad??=importIndexedLabelAssociation().then(indexed=>{indexedLabelAssociation=indexed;for(const entry of[...leanAssociationRoots.values()])migrateLeanAssociationRoot(entry,indexed)},()=>{indexedLabelAssociationLoad=void 0})}function observeExternalLabelAssociations(host,listener){if(indexedLabelAssociation)return indexedLabelAssociation.observeIndexedLabelAssociations(host,listener);const root=host.getRootNode();let entry=leanAssociationRoots.get(root);if(!entry){const created={root,subscriptions:new Set,overflow:!1},Observer=host.ownerDocument.defaultView?.MutationObserver;Observer&&(created.observer=new Observer(records=>{leanAssociationRoots.get(root)===created&&queueLeanAssociationRecords(created,records)}),created.observer.observe(root,ASSOCIATION_OBSERVER_OPTIONS)),leanAssociationRoots.set(root,entry=created)}const lean=entry,subscription={host,listener,labels:[]};lean.subscriptions.add(subscription);let active=!0;return{update(labels){if(active){if(subscription.indexed){subscription.indexed.update(labels);return}subscription.labels=labels,labels.length!==0&&(lean.pending??=[],loadExternalLabelAssociation())}},disconnect(){if(active){if(active=!1,subscription.indexed){subscription.indexed.disconnect();return}lean.subscriptions.delete(subscription),!(lean.subscriptions.size>0||leanAssociationRoots.get(root)!==lean)&&(lean.observer?.disconnect(),leanAssociationRoots.delete(root))}}}}function isComposedDescendant(host,candidate){let current=candidate;for(;current;){if(current===host)return!0;if(current.parentNode){current=current.parentNode;continue}current=isShadowRootNode(current)?current.host:null}return!1}function resolveExternalLabels(host){const native=attachedInternals.get(host)?.labels;if(native)return Array.from(native).filter(isLabelElement).filter(label=>isCurrentlyAssociatedLabel(label,host));const labels=[],ancestor=host.closest("label");ancestor&&isCurrentlyAssociatedLabel(ancestor,host)&&labels.push(ancestor);const root=host.getRootNode();if(host.id&&"querySelectorAll"in root)for(const found of root.querySelectorAll("label[for]"))isLabelElement(found)&&isCurrentlyAssociatedLabel(found,host)&&!labels.includes(found)&&labels.push(found);return labels}const LABEL_TEXT_MAX_DEPTH=256,LABEL_TEXT_MAX_NODES=4096,NON_CONTENT_ELEMENTS=new Set(["script","style","template"]);function labelText(label,exclude){let remaining=LABEL_TEXT_MAX_NODES;const read=(node,depth)=>{if(node===exclude||depth>LABEL_TEXT_MAX_DEPTH||--remaining<0)return"";if(node.nodeType===Node.TEXT_NODE)return node.textContent??"";let children=node.childNodes;if(node.nodeType===Node.ELEMENT_NODE){const element=node;if(NON_CONTENT_ELEMENTS.has(element.localName))return"";if(element!==label){if(hasFocusExcludingAttributes(element,!0)||isAriaTrue(element.getAttribute("aria-hidden"))||styleExcludesFocusSubtree(element.ownerDocument.defaultView?.getComputedStyle(element)))return"";const ariaLabel=element.getAttribute("aria-label")?.trim();if(ariaLabel)return ariaLabel;const alternative=element.localName==="img"||element.localName==="area"?element.getAttribute("alt")?.trim():void 0;if(alternative)return alternative}if(element.shadowRoot)children=element.shadowRoot.childNodes;else if(element.localName==="slot"){const assigned=element.assignedNodes({flatten:!0});assigned.length>0&&(children=assigned)}}else if(node.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)return"";let text="";for(let index=0;index<children.length;index+=1)text+=read(children[index],depth+1);return text};return read(label,0)}function resolveExternalLabelText(labels,host){return labels.map(label=>labelText(label,host).trim()).filter(text=>text!=="").join(" ")}class ExternalLabelController{constructor(host){this.host=host,this.labels=[],this.activating=!1,this.onLabelClick=event=>{if(this.activating||this.barred)return;const source=event.currentTarget;if(!source||!isLabelElement(source)||!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}event.composedPath().includes(this.host)||queueMicrotask(()=>{if(event.defaultPrevented||!this.host.isConnected||this.barred)return;if(!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}const focusTarget=this.resolveFocusTarget(),activation=this.resolveActivation(focusTarget);this.activating=!0;try{this.host.focus(),isComposedDescendant(this.host,deepActiveElementIn(this.host.ownerDocument))||focusTarget?.focus(),activation==="activate"&&focusTarget?.click()}finally{this.activating=!1}})}}hostConnected(){this.associationRootSubscription?.disconnect(),this.associationRootSubscription=observeExternalLabelAssociations(this.host,()=>this.refresh()),this.refresh()}hostUpdated(){this.refresh()}hostDisconnected(){this.release(),this.associationRootSubscription?.disconnect(),this.associationRootSubscription=void 0;for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=[]}refresh(){const next=resolveExternalLabels(this.host);if(next.length!==this.labels.length||next.some((label,index)=>label!==this.labels[index])){for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=next;for(const label of this.labels)label.addEventListener("click",this.onLabelClick)}this.associationRootSubscription?.update(next),this.apply()}get barred(){return typeof this.host.matches=="function"&&this.host.matches(":disabled")?!0:!!(this.host.effectiveDisabled??this.host.disabled)}resolveNameTarget(focusTarget){if(this.hostSemanticOwner)return this.host;const root=this.ownRoot;if(!root)return focusTarget;if(focusTarget){for(const composite of root.querySelectorAll(COMPOSITE_ROLE_SELECTOR))if(isHtmlElement(composite)&&isComposedDescendant(composite,focusTarget))return composite}if(focusTarget&&focusTarget.getRootNode()===root)return focusTarget;const owned=focusTarget?this.outermostOwnedAncestor(focusTarget):null;if(owned)return owned;const semantic=root.querySelector(SEMANTIC_TARGET_SELECTOR);return semantic&&isHtmlElement(semantic)?semantic:focusTarget}outermostOwnedAncestor(node){const root=this.ownRoot;let owned=null,current=node;for(;current&&current!==this.host;)isHtmlElement(current)&&(current.getRootNode()===root||current.parentNode===this.host)&&(owned=current),current.parentNode?current=current.parentNode:current=isShadowRootNode(current)?current.host:null;return owned}get ownRoot(){const root=this.host.renderRoot;return isShadowRootNode(root)?root:this.host.shadowRoot}resolveFocusTarget(){return this.hostSemanticOwner?this.host:firstFormControlFocusTarget(this.host)}get hostSemanticOwner(){const candidate=this.host;return typeof candidate[EXTERNAL_LABEL_HOST_SEMANTICS]=="function"?candidate:null}hostHasAuthoredName(owner){return owner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"has-authored-name"})===!0}resolveActivation(focusTarget){const declared=this.host[EXTERNAL_LABEL_ACTIVATION];if(typeof declared=="function")return declared.call(this.host);if(!focusTarget||focusTarget.getRootNode()!==this.ownRoot)return"focus";const role=focusTarget.getAttribute("role");return role&&ACTIVATING_ROLES.has(role)?"activate":"focus"}apply(){const hostOwner=this.hostSemanticOwner;if(hostOwner&&this.hostHasAuthoredName(hostOwner)||!hostOwner&&this.host.hasAttribute("aria-label")){this.release();return}const name=resolveExternalLabelText(this.labels,this.host);if(name===""){this.release();return}const settled=this.applied;if(settled&&settled.name===name&&settled.target.isConnected&&settled.target.getAttribute("aria-label")===name)return;const target=this.resolveNameTarget(this.resolveFocusTarget());target&&(this.applied&&this.applied.target!==target&&this.release(),this.applied||(this.applied={target,name,had:target.hasAttribute("aria-label"),previous:target.getAttribute("aria-label")}),target===this.host&&hostOwner?hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"apply",name}):target.getAttribute("aria-label")!==name&&target.setAttribute("aria-label",name),this.applied.name=name)}release(){const applied=this.applied;if(this.applied=void 0,!applied)return;const{target,name,had,previous}=applied,hostOwner=target===this.host?this.hostSemanticOwner:null;if(hostOwner){hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"release",appliedName:name,hadPrevious:had,previous});return}target.getAttribute("aria-label")===name&&(had?target.setAttribute("aria-label",previous??""):target.removeAttribute("aria-label"))}}function installFormControlInternalsCapture(){registerFormControlLabelSupport(captureFormInternals)}let supportInstalled=!1;function installFormControlLabelSupport(){supportInstalled||(supportInstalled=!0,registerFormControlLabelSupport(captureFormInternals,host=>new ExternalLabelController(host)))}export{EXTERNAL_LABEL_HOST_SEMANTICS,ExternalLabelController,captureFormInternals,installFormControlInternalsCapture,installFormControlLabelSupport,isCurrentlyAssociatedLabel,loadExternalLabelAssociation,observeExternalLabelAssociations,resolveExternalLabelText,resolveExternalLabels};
@@ -1 +1 @@
1
- import{canonicalizeLocaleTag}from"./locale-tag.js";import{warnLocaleFallback}from"./dev-warning.js";import{DEV_DIAGNOSTICS}from"./dev-mode-attribute-warning.js";import{domParentElement,flattenedParentElement,ownerView}from"./composed-tree.js";import{readOwnDataValue}from"./data-descriptors.js";import{getDefaultPluralRules,getMessageNumberFormat}from"./intl-cache.js";import{isPlainRecord}from"./object-guards.js";import{requestContextUpdate}from"./context-update.js";const MAX_LOCALE_CANDIDATES=64,MAX_LOCALE_PARENT_DEPTH=32,MAX_LOCALE_SUBTAGS=32,MAX_LOCALE_TAG_LENGTH=255,MAX_LOCALE_CACHE_ENTRIES=128,MAX_CACHEABLE_LOCALE_LENGTH=512,LEGACY_LOCALE_PATTERN=/^[a-z0-9]{1,32}(?:-[a-z0-9]{1,32})*$/,locales=new Map,localePublicTags=new Map,localeMeta=new Map,localeParents=new Map,wellFormedLocales=new Set,exactOnlyLocales=new Set,localeCatalogRevisions=new Map,listeners=new Set,hostLocaleListeners=new Set,hostLocaleFinalizer=new FinalizationRegistry(subscription=>{hostLocaleListeners.delete(subscription)}),ownerDocumentsWithBrowsingContext=new WeakSet,registryListeners=new Set;let activeLocale="",catalogRevision=0;const localeIdentityCache=new Map,EMPTY_LOCALE_IDENTITY=/* @__PURE__ */(()=>Object.freeze({publicTag:"",lookupKey:"",wellFormed:!1,candidateBounded:!0,storable:!1}))(),localeCandidateCache=new Map,ENGLISH_ONLY_CANDIDATES=/* @__PURE__ */(()=>Object.freeze(["en"]))();function cacheBounded(cache,key,value){cache.size>=MAX_LOCALE_CACHE_ENTRIES&&cache.clear(),cache.set(key,value)}function subtagCountWithinBounds(tag){return tag.length<=MAX_LOCALE_TAG_LENGTH&&tag.split("-").length<=MAX_LOCALE_SUBTAGS}function localeIdentity(locale){const known=typeof locale=="string"&&locale.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(locale):void 0;if(known)return known;const normalized=typeof locale=="string"?locale.trim().replace(/_/g,"-"):"";if(!normalized)return EMPTY_LOCALE_IDENTITY;const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(normalized):void 0;if(cached)return rememberLocaleSpelling(locale,normalized,cached),cached;let publicTag=normalized.toLowerCase(),wellFormed=!1;try{const canonical=canonicalizeLocaleTag(normalized);canonical&&(publicTag=canonical,wellFormed=!0)}catch{}const lookupKey=publicTag.toLowerCase(),candidateBounded=subtagCountWithinBounds(lookupKey),identity={publicTag,lookupKey,wellFormed,candidateBounded,storable:wellFormed||candidateBounded&&LEGACY_LOCALE_PATTERN.test(lookupKey)};return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,normalized,identity),rememberLocaleSpelling(locale,normalized,identity),identity}function rememberLocaleSpelling(locale,normalized,identity){locale!==normalized&&locale.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,locale,identity)}function storedLocaleIdentity(locale,required){if(typeof locale!="string")throw new TypeError("A locale must be a string.");const identity=localeIdentity(locale);if(!identity.publicTag){if(!required)return identity;throw new TypeError("A locale is required.")}if(!identity.storable)throw new TypeError("The locale must be BCP-47 or a bounded alphanumeric custom tag.");return identity}function canonicalizeLyraLocale(locale){const identity=localeIdentity(locale);return identity.storable?identity.publicTag:"en"}const likelySubtagsCache=new Map;function likelySubtags(key){let likely=likelySubtagsCache.get(key);if(!likely){try{const{script="",region=""}=new Intl.Locale(key).maximize();likely=[script==="Zzzz"?"":script.toLowerCase(),region.toLowerCase()]}catch{return["",""]}key.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(likelySubtagsCache,key,likely)}return likely}function regionalFallbacks(requestedKey,limit,wellFormed){if(limit<=0||!wellFormed)return[];const separator=requestedKey.indexOf("-"),language=separator===-1?requestedKey:requestedKey.slice(0,separator);if(!language)return[];const requestedSubtags=new Set(requestedKey.split("-")),siblings=[...locales.keys()].filter(key=>wellFormedLocales.has(key)&&!exactOnlyLocales.has(key)&&(key===language||key.startsWith(`${language}-`))&&!isPrefixOf(key,requestedKey));if(siblings.length<2)return siblings;const[script,region]=likelySubtags(requestedKey),rank=key=>{const[keyScript,keyRegion]=likelySubtags(key);return(script&&keyScript===script?1e4:0)+(region&&keyRegion===region?1e3:0)+key.split("-").filter(subtag=>requestedSubtags.has(subtag)).length};return siblings.map(key=>[rank(key),key]).sort(([a,x],[b,y])=>b-a||(x<y?-1:x>y?1:0)).slice(0,limit).map(([,key])=>key)}function impliedScriptStep(requestedKey){const separator=requestedKey.indexOf("-");if(separator<=0)return;const language=requestedKey.slice(0,separator),subtags=requestedKey.split("-");if(/^[a-z]{4}$/.test(subtags[1]))return;const[script]=likelySubtags(requestedKey),[languageScript]=likelySubtags(language);return script&&languageScript&&script!==languageScript?`${language}-${script}`:void 0}function isPrefixOf(key,requestedKey){return key===requestedKey||requestedKey.startsWith(`${key}-`)}function localeCandidates(locale){const identity=localeIdentity(locale),normalized=identity.lookupKey;if(!normalized)return ENGLISH_ONLY_CANDIDATES;const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeCandidateCache.get(normalized):void 0;if(cached)return cached;const candidates=[];if((identity.wellFormed||identity.candidateBounded)&&candidates.push(normalized),identity.candidateBounded){for(let index=normalized.length-1;index>=0;index-=1)normalized.charCodeAt(index)===45&&index>0&&candidates.push(normalized.slice(0,index));const scriptStep=identity.wellFormed?impliedScriptStep(normalized):void 0;scriptStep&&candidates.splice(candidates.length-1,0,scriptStep);const regionalBudget=Math.max(0,MAX_LOCALE_CANDIDATES-candidates.length-1);candidates.push(...regionalFallbacks(normalized,regionalBudget,identity.wellFormed))}else if(identity.wellFormed){const separator=normalized.indexOf("-");separator>0&&candidates.push(normalized.slice(0,separator))}const expanded=[],seen=new Set;for(const candidate of candidates){let current=candidate;for(;current&&!seen.has(current)&&expanded.length<MAX_LOCALE_CANDIDATES-1;)seen.add(current),expanded.push(current),current=localeParents.get(current)}seen.has("en")||expanded.push("en");const frozen=Object.freeze(expanded);return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeCandidateCache,normalized,frozen),frozen}function lyraLocaleCatalogVersion(locale){return localeCandidates(locale).map(candidate=>localeCatalogRevisions.get(candidate)??0).join(",")}function getRegisteredLyraLocales(){const keys=new Set(["en",...localePublicTags.values()]);return Object.freeze([...keys].sort())}const NO_REGISTERED_LOCALE_KEYS=/* @__PURE__ */(()=>Object.freeze([]))();function getRegisteredLyraLocaleKeys(locale){const identity=localeIdentity(locale);if(!identity.lookupKey)return NO_REGISTERED_LOCALE_KEYS;const catalog=locales.get(identity.lookupKey);return catalog?Object.freeze(Object.keys(catalog)):NO_REGISTERED_LOCALE_KEYS}function subscribeLyraLocaleRegistry(listener){return registryListeners.add(listener),()=>registryListeners.delete(listener)}const MAX_CATALOG_MESSAGES=4096,MAX_CATALOG_PROPERTY_READS=MAX_CATALOG_MESSAGES*2,MAX_MESSAGE_KEY_LENGTH=256,PLURAL_CATEGORIES=new Set(["zero","one","two","few","many","other"]),trustedMessageRecords=new WeakSet;function trusted(snapshot){return trustedMessageRecords.add(Object.freeze(snapshot)),snapshot}function snapshotPluralMessage(value){if(!isPlainRecord(value))return;const snapshot=Object.create(null);let count=0;try{for(const key in value){if(++count>PLURAL_CATEGORIES.size||!PLURAL_CATEGORIES.has(key)||!Object.prototype.hasOwnProperty.call(value,key))return;const entry=readOwnDataValue(value,key);if(typeof entry!="string")return;snapshot[key]=entry}}catch{return}return typeof snapshot.other=="string"?trusted(snapshot):void 0}function snapshotMessage(value){return typeof value=="string"?value:snapshotPluralMessage(value)}function snapshotCatalog(strings){const snapshot=Object.create(null);let keys=[];if(isPlainRecord(strings))try{keys=Reflect.ownKeys(strings).slice(0,MAX_CATALOG_PROPERTY_READS)}catch{}let count=0;for(const key of keys){if(count>=MAX_CATALOG_MESSAGES)break;if(typeof key!="string"||!key||key.length>MAX_MESSAGE_KEY_LENGTH)continue;let descriptor;try{descriptor=Reflect.getOwnPropertyDescriptor(strings,key)}catch{continue}if(!descriptor?.enumerable||!("value"in descriptor))continue;count+=1;const message=snapshotMessage(descriptor.value);message!==void 0&&(snapshot[key]=message)}return trusted(snapshot)}function mergeCatalogs(current,incoming){return trusted(Object.assign(Object.create(null),current,incoming))}function snapshotLocaleMeta(meta){if(meta===void 0)return;if(!isPlainRecord(meta))return Object.freeze({});const snapshot={},dir=readOwnDataValue(meta,"dir");(dir==="ltr"||dir==="rtl")&&(snapshot.dir=dir);const name=readOwnDataValue(meta,"name");return typeof name=="string"&&(snapshot.name=name),Object.freeze(snapshot)}function snapshotLyraLocaleStrings(strings){return snapshotCatalog(strings)}let emptyLocaleStrings;function emptyLyraLocaleStrings(){return emptyLocaleStrings??=snapshotLyraLocaleStrings({})}const trustedDefaultCatalogs=new WeakMap;function trustedLyraDefaultStrings(defaults){const known=trustedDefaultCatalogs.get(defaults);if(known)return known;let trusted2=defaults;if(isPlainRecord(defaults)&&!trustedMessageRecords.has(defaults))try{Reflect.ownKeys(defaults).length<=MAX_CATALOG_MESSAGES&&(trusted2=snapshotCatalog(defaults))}catch{}return trustedDefaultCatalogs.set(defaults,trusted2),trusted2}function safeMessageAt(source,key){if(isPlainRecord(source))return trustedMessageRecords.has(source)?source[key]:snapshotMessage(readOwnDataValue(source,key))}function deliverLocaleListeners(groups,operation){const errors=[];for(const group of groups)for(const listener of group)try{listener()}catch(error){errors.push(error)}if(errors.length>0)throw new AggregateError(errors,`${operation} committed, but ${errors.length} locale subscriber${errors.length===1?"":"s"} failed.`)}function localeUsesCatalog(locale,lookupKey){return localeCandidates(locale).includes(lookupKey)}function recordLyraOwnerDocumentConnection(host){ownerView(host)&&ownerDocumentsWithBrowsingContext.add(host.ownerDocument)}function forgetHostLocaleSubscription(subscription){hostLocaleListeners.delete(subscription),hostLocaleFinalizer.unregister(subscription)}function liveHostLocaleSubscriptions(){const live=[];for(const subscription of[...hostLocaleListeners]){const host=subscription.deref();if(!host||!host.isConnected||ownerDocumentsWithBrowsingContext.has(host.ownerDocument)&&ownerView(host)===null){forgetHostLocaleSubscription(subscription);continue}live.push(host)}return live}function registerLocale(locale,strings,meta,exactOnly,parentKey){const identity=storedLocaleIdentity(locale,!0),key=identity.lookupKey,incomingStrings=snapshotCatalog(strings),incomingMeta=snapshotLocaleMeta(meta);parentKey!==void 0&&validateLocaleParent(key,parentKey);const isNewLocale=!locales.has(key),candidateTopologyChanged=isNewLocale||parentKey!==void 0&&localeParents.get(key)!==parentKey||exactOnly&&!exactOnlyLocales.has(key)||identity.wellFormed&&!wellFormedLocales.has(key),previouslyAffectedActive=candidateTopologyChanged&&activeLocale!==""&&localeUsesCatalog(activeLocale,key),previouslyAffectedHosts=new Set(candidateTopologyChanged?liveHostLocaleSubscriptions().filter(host=>localeUsesCatalog(inheritedLocale(host),key)):[]);exactOnly&&exactOnlyLocales.add(key),parentKey!==void 0&&localeParents.set(key,parentKey),identity.wellFormed&&wellFormedLocales.add(key),locales.set(key,mergeCatalogs(locales.get(key),incomingStrings)),localePublicTags.set(key,identity.publicTag),incomingMeta&&localeMeta.set(key,Object.freeze({...localeMeta.get(key)??{},...incomingMeta})),localeCatalogRevisions.set(key,++catalogRevision),candidateTopologyChanged&&localeCandidateCache.clear();const activeSnapshot=previouslyAffectedActive||activeLocale&&localeUsesCatalog(activeLocale,key)?[...listeners]:[],hostSnapshot=liveHostLocaleSubscriptions().filter(host=>previouslyAffectedHosts.has(host)||localeUsesCatalog(inheritedLocale(host),key)).map(host=>()=>requestContextUpdate(host)),registrySnapshot=isNewLocale?[...registryListeners]:[];deliverLocaleListeners([activeSnapshot,hostSnapshot,registrySnapshot],`registerLyraLocale(${JSON.stringify(identity.publicTag)})`)}function registerLyraLocale(locale,strings,meta){registerLocale(locale,strings,meta,!1)}function validateLocaleParent(childKey,parentKey){for(const origin of new Set([childKey,...localeParents.keys()])){const visited=new Set;let current=origin,depth=0;for(;current;){if(visited.has(current))throw new TypeError("Locale parent relationships must not contain cycles.");if(visited.add(current),current=current===childKey?parentKey:localeParents.get(current),current&&++depth>MAX_LOCALE_PARENT_DEPTH)throw new TypeError("Locale parent chains must not exceed 32 edges.")}}}function registerLyraLocaleDelta(locale,parent,strings,meta){const parentKey=storedLocaleIdentity(parent,!0).lookupKey;registerLocale(locale,strings,meta,!0,parentKey)}function registerLyraExactLocale(locale,strings,meta){registerLocale(locale,strings,meta,!0)}function getLyraLocaleDirection(locale){const identity=localeIdentity(locale);if(!identity.publicTag)return"ltr";for(const candidate of localeCandidates(identity.publicTag)){const declared=localeMeta.get(candidate)?.dir;if(declared)return declared}try{const resolved=new Intl.Locale(identity.publicTag);return(resolved.textInfo?.direction??resolved.getTextInfo?.().direction)==="rtl"?"rtl":"ltr"}catch{return"ltr"}}function setLyraLocale(locale){const next=storedLocaleIdentity(locale,!1).publicTag;if(activeLocale===next)return;const hostSnapshot=liveHostLocaleSubscriptions(),previousHostLocales=hostSnapshot.map(host=>inheritedLocale(host));activeLocale=next;const affectedHostListeners=hostSnapshot.filter((host,index)=>inheritedLocale(host)!==previousHostLocales[index]).map(host=>()=>requestContextUpdate(host));deliverLocaleListeners([[...listeners],affectedHostListeners],`setLyraLocale(${JSON.stringify(next)})`)}function getLyraLocale(){return activeLocale}function resolveActiveOrExplicitLocale(locale){const trimmed=locale?.trim();return trimmed&&trimmed.toLowerCase()!=="auto"?locale:activeLocale||void 0}function subscribeLyraLocale(listener){return listeners.add(listener),()=>listeners.delete(listener)}function subscribeLyraLocaleForHost(host){recordLyraOwnerDocumentConnection(host);const subscription=new WeakRef(host);return hostLocaleListeners.add(subscription),hostLocaleFinalizer.register(host,subscription,subscription),()=>forgetHostLocaleSubscription(subscription)}function inheritedLocale(host,localeAttribute=host.getAttribute("locale")){const explicit=localeAttribute||host.getAttribute("lang");if(explicit)return canonicalizeLyraLocale(explicit);if(host.getAttribute("lang")==="")return activeLocale||"en";const documentElement=host.ownerDocument?.documentElement;let parent=domParentElement(host);for(;parent;){const isDocumentElement=parent===documentElement,locale=isDocumentElement?parent.getAttribute("locale"):parent.getAttribute("locale")||parent.getAttribute("lang");if(locale)return canonicalizeLyraLocale(locale);if(!isDocumentElement&&parent.getAttribute("lang")==="")return activeLocale||"en";parent=domParentElement(parent)}if(activeLocale)return activeLocale;const documentLocale=documentElement?.getAttribute("lang");return documentLocale?canonicalizeLyraLocale(documentLocale):"en"}const hostContextCaches=new WeakMap;function enableLyraLocaleCache(host){hostContextCaches.has(host)||hostContextCaches.set(host,{})}function invalidateLyraLocaleCache(host){const cache=hostContextCaches.get(host);cache&&(cache.attribute=void 0,cache.locale=void 0,cache.direction=void 0)}function resolveLyraLocale(host){return cachedLocale(host,host.getAttribute("locale")||"")}function cachedLocale(host,localeAttribute){const cache=hostContextCaches.get(host);if(!cache)return inheritedLocale(host,localeAttribute);let locale=cache.locale;return(locale===void 0||cache.attribute!==localeAttribute)&&(locale=inheritedLocale(host,localeAttribute),cache.attribute=localeAttribute,cache.locale=locale),locale}function resolveLyraServerLocale(host){const explicit=host.getAttribute("locale")||host.getAttribute("lang");return explicit?canonicalizeLyraLocale(explicit):activeLocale||"en"}function resolveLyraLocaleWithHostOverride(host,localeOverride){return localeOverride?canonicalizeLyraLocale(localeOverride):cachedLocale(host,localeOverride)}function inheritedDirection(host){const explicit=host.getAttribute("dir")?.toLowerCase();if(explicit==="rtl"||explicit==="ltr")return explicit;const view=ownerView(host);if(view)try{const getComputedStyle=view.getComputedStyle;if(typeof getComputedStyle=="function"){const computed=getComputedStyle.call(view,host).direction;if(computed==="rtl"||computed==="ltr")return computed}}catch{}let parent=flattenedParentElement(host);for(;parent;){const inherited=parent.getAttribute("dir")?.toLowerCase();if(inherited==="rtl"||inherited==="ltr")return inherited;parent=flattenedParentElement(parent)}return"ltr"}function resolveLyraDirection(host){const cache=hostContextCaches.get(host);if(!cache)return inheritedDirection(host);let direction=cache.direction;return direction===void 0&&(direction=inheritedDirection(host),cache.direction=direction),direction}function peekLyraLocale(host){return hostContextCaches.get(host)?.locale}function peekLyraDirection(host){return hostContextCaches.get(host)?.direction}const PLURAL_CATEGORY_FALLBACKS={zero:["zero","other"],one:["one","other"],two:["two","few","many","other"],few:["few","many","other"],many:["many","few","other"],other:["other"]};function pluralSelector(values){let raw;try{raw=values.pluralCount??values.count}catch{return}return typeof raw=="number"&&Number.isFinite(raw)?raw:void 0}function selectPluralMessage(message,locale,count){if(count===void 0)return message.other;const tag=localeCandidates(locale)[0],category=getDefaultPluralRules(tag).select(count);for(const candidate of PLURAL_CATEGORY_FALLBACKS[category]??PLURAL_CATEGORY_FALLBACKS.other){const text=message[candidate];if(text!==void 0)return text}return message.other}function resolveLyraString(host,key,overrides,fallback,values,defaults){return resolveLyraStringWithLocale(()=>resolveLyraLocale(host),key,overrides,fallback,values,defaults)}function resolveLyraStringWithLocale(resolveLocale,key,overrides,fallback,values,defaults){let message=safeMessageAt(overrides,key);message===void 0&&typeof fallback=="string"&&(message=fallback);let locale;if(message===void 0){locale=resolveLocale();for(const candidate of localeCandidates(locale)){const registered=safeMessageAt(locales.get(candidate),key);if(registered!==void 0){message=registered;break}}DEV_DIAGNOSTICS&&message===void 0&&warnLocaleFallback(locale,key)}message??=safeMessageAt(defaults,key)??key;let text;return typeof message!="string"?(locale??=resolveLocale(),text=selectPluralMessage(message,locale,values?pluralSelector(values):void 0)):text=message,values?text.replace(/\{(\w+)\}/g,(match,name)=>{try{const value=values[name];return typeof value=="string"?value:typeof value!="number"?match:Number.isFinite(value)?(locale??=resolveLocale(),getMessageNumberFormat(locale).format(value+0)):String(value)}catch{return match}}):text}function resolveLocalizedParts(template,interpolate){const marker=selectAbsentMarker(template);return interpolate(marker).split(marker)}function resolveLocalizedSlots(template,names,interpolate){const markers=Object.create(null),byMarker=new Map;let seen=template;for(const name of names){if(Object.prototype.hasOwnProperty.call(markers,name))continue;const marker=selectAbsentMarker(seen);markers[name]=marker,byMarker.set(marker,name),seen+=marker}const text=interpolate(markers),out=[];let start=0;for(;;){let at=-1,found="";for(const marker of byMarker.keys()){const index=text.indexOf(marker,start);index!==-1&&(at===-1||index<at)&&(at=index,found=marker)}if(at===-1)break;at>start&&out.push(text.slice(start,at)),out.push({slot:byMarker.get(found)}),start=at+found.length}return start<text.length&&out.push(text.slice(start)),out}function selectAbsentMarker(template){const privateUse=new Set;for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);code>=57344&&code<=63743&&privateUse.add(code)}let marker="";for(let code=57344;code<=63743;code+=1)if(!privateUse.has(code)){marker=String.fromCharCode(code);break}if(!marker){const counts=new Uint32Array(65536);for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);counts[code]=(counts[code]??0)+1}let leastCode=0,leastCount=Number.POSITIVE_INFINITY;for(let code=0;code<counts.length;code+=1){const count=counts[code]??0;if(count===0){marker=String.fromCharCode(code);break}count<leastCount&&(leastCode=code,leastCount=count)}if(!marker){const followers=new Uint8Array(65536);for(let index=0;index+1<template.length;index+=1)template.charCodeAt(index)===leastCode&&(followers[template.charCodeAt(index+1)]=1);let follower=0;for(;follower<followers.length&&followers[follower]!==0;)follower+=1;marker=String.fromCharCode(leastCode,follower<followers.length?follower:leastCode)}}return marker}export{canonicalizeLyraLocale,emptyLyraLocaleStrings,enableLyraLocaleCache,getLyraLocale,getLyraLocaleDirection,getRegisteredLyraLocaleKeys,getRegisteredLyraLocales,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraDirection,peekLyraLocale,recordLyraOwnerDocumentConnection,registerLyraExactLocale,registerLyraLocale,registerLyraLocaleDelta,resolveActiveOrExplicitLocale,resolveLocalizedParts,resolveLocalizedSlots,resolveLyraDirection,resolveLyraLocale,resolveLyraLocaleWithHostOverride,resolveLyraServerLocale,resolveLyraString,resolveLyraStringWithLocale,setLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocale,subscribeLyraLocaleForHost,subscribeLyraLocaleRegistry,trustedLyraDefaultStrings};
1
+ import{canonicalizeLocaleTag}from"./locale-tag.js";import{warnLocaleFallback}from"./dev-warning.js";import{DEV_DIAGNOSTICS}from"./dev-mode-attribute-warning.js";import{domParentElement,flattenedParentElement,ownerView}from"./composed-tree.js";import{readOwnDataValue}from"./data-descriptors.js";import{getDefaultPluralRules,getMessageNumberFormat}from"./intl-cache.js";import{isPlainRecord}from"./object-guards.js";import{requestContextUpdate}from"./context-update.js";const MAX_LOCALE_CANDIDATES=64,MAX_LOCALE_PARENT_DEPTH=32,MAX_LOCALE_SUBTAGS=32,MAX_LOCALE_TAG_LENGTH=255,MAX_LOCALE_CACHE_ENTRIES=128,MAX_CACHEABLE_LOCALE_LENGTH=512,LEGACY_LOCALE_PATTERN=/^[a-z0-9]{1,32}(?:-[a-z0-9]{1,32})*$/,locales=new Map,localePublicTags=new Map,localeMeta=new Map,localeParents=new Map,wellFormedLocales=new Set,exactOnlyLocales=new Set,localeCatalogRevisions=new Map,listeners=new Set,hostLocaleListeners=new Set,hostLocaleFinalizer=new FinalizationRegistry(subscription=>{hostLocaleListeners.delete(subscription)}),ownerDocumentsWithBrowsingContext=new WeakSet,registryListeners=new Set;let activeLocale="",catalogRevision=0;const localeIdentityCache=new Map,EMPTY_LOCALE_IDENTITY=/* @__PURE__ */(()=>Object.freeze({publicTag:"",lookupKey:"",wellFormed:!1,candidateBounded:!0,storable:!1}))(),localeCandidateCache=new Map,ENGLISH_ONLY_CANDIDATES=/* @__PURE__ */(()=>Object.freeze(["en"]))();function cacheBounded(cache,key,value){cache.size>=MAX_LOCALE_CACHE_ENTRIES&&cache.clear(),cache.set(key,value)}function subtagCountWithinBounds(tag){return tag.length<=MAX_LOCALE_TAG_LENGTH&&tag.split("-").length<=MAX_LOCALE_SUBTAGS}function localeIdentity(locale){const known=typeof locale=="string"&&locale.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(locale):void 0;if(known)return known;const normalized=typeof locale=="string"?locale.trim().replace(/_/g,"-"):"";if(!normalized)return EMPTY_LOCALE_IDENTITY;const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(normalized):void 0;if(cached)return rememberLocaleSpelling(locale,normalized,cached),cached;let publicTag=normalized.toLowerCase(),wellFormed=!1;try{const canonical=canonicalizeLocaleTag(normalized);canonical&&(publicTag=canonical,wellFormed=!0)}catch{}const lookupKey=publicTag.toLowerCase(),candidateBounded=subtagCountWithinBounds(lookupKey),identity={publicTag,lookupKey,wellFormed,candidateBounded,storable:wellFormed||candidateBounded&&LEGACY_LOCALE_PATTERN.test(lookupKey)};return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,normalized,identity),rememberLocaleSpelling(locale,normalized,identity),identity}function rememberLocaleSpelling(locale,normalized,identity){locale!==normalized&&locale.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,locale,identity)}function storedLocaleIdentity(locale,required){if(typeof locale!="string")throw new TypeError("A locale must be a string.");const identity=localeIdentity(locale);if(!identity.publicTag){if(!required)return identity;throw new TypeError("A locale is required.")}if(!identity.storable)throw new TypeError("The locale must be BCP-47 or a bounded alphanumeric custom tag.");return identity}function canonicalizeLyraLocale(locale){const identity=localeIdentity(locale);return identity.storable?identity.publicTag:"en"}const likelySubtagsCache=new Map;function likelySubtags(key){let likely=likelySubtagsCache.get(key);if(!likely){try{const{script="",region=""}=new Intl.Locale(key).maximize();likely=[script==="Zzzz"?"":script.toLowerCase(),region.toLowerCase()]}catch{return["",""]}key.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(likelySubtagsCache,key,likely)}return likely}function regionalFallbacks(requestedKey,limit,wellFormed){if(limit<=0||!wellFormed)return[];const separator=requestedKey.indexOf("-"),language=separator===-1?requestedKey:requestedKey.slice(0,separator);if(!language)return[];const requestedSubtags=new Set(requestedKey.split("-")),siblings=[...locales.keys()].filter(key=>wellFormedLocales.has(key)&&!exactOnlyLocales.has(key)&&(key===language||key.startsWith(`${language}-`))&&!isPrefixOf(key,requestedKey));if(siblings.length<2)return siblings;const[script,region]=likelySubtags(requestedKey),rank=key=>{const[keyScript,keyRegion]=likelySubtags(key);return(script&&keyScript===script?1e4:0)+(region&&keyRegion===region?1e3:0)+key.split("-").filter(subtag=>requestedSubtags.has(subtag)).length};return siblings.map(key=>[rank(key),key]).sort(([a,x],[b,y])=>b-a||(x<y?-1:x>y?1:0)).slice(0,limit).map(([,key])=>key)}function impliedScriptStep(requestedKey){const separator=requestedKey.indexOf("-");if(separator<=0)return;const language=requestedKey.slice(0,separator),subtags=requestedKey.split("-");if(/^[a-z]{4}$/.test(subtags[1]))return;const[script]=likelySubtags(requestedKey),[languageScript]=likelySubtags(language);return script&&languageScript&&script!==languageScript?`${language}-${script}`:void 0}function isPrefixOf(key,requestedKey){return key===requestedKey||requestedKey.startsWith(`${key}-`)}function localeCandidates(locale){const identity=localeIdentity(locale),normalized=identity.lookupKey;if(!normalized)return ENGLISH_ONLY_CANDIDATES;const cacheable=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH,cached=cacheable?localeCandidateCache.get(normalized):void 0;if(cached)return cached;const candidates=expandLocaleCandidates?expandLocaleCandidates(identity):normalized==="en"||!(identity.wellFormed||identity.candidateBounded)?ENGLISH_ONLY_CANDIDATES:Object.freeze([normalized,"en"]);return cacheable&&cacheBounded(localeCandidateCache,normalized,candidates),candidates}let expandLocaleCandidates;function expandedLocaleCandidates(identity){const normalized=identity.lookupKey,candidates=[];if((identity.wellFormed||identity.candidateBounded)&&candidates.push(normalized),identity.candidateBounded){for(let index=normalized.length-1;index>=0;index-=1)normalized.charCodeAt(index)===45&&index>0&&candidates.push(normalized.slice(0,index));const scriptStep=identity.wellFormed?impliedScriptStep(normalized):void 0;scriptStep&&candidates.splice(candidates.length-1,0,scriptStep);const regionalBudget=Math.max(0,MAX_LOCALE_CANDIDATES-candidates.length-1);candidates.push(...regionalFallbacks(normalized,regionalBudget,identity.wellFormed))}else if(identity.wellFormed){const separator=normalized.indexOf("-");separator>0&&candidates.push(normalized.slice(0,separator))}const expanded=[],seen=new Set;for(const candidate of candidates){let current=candidate;for(;current&&!seen.has(current)&&expanded.length<MAX_LOCALE_CANDIDATES-1;)seen.add(current),expanded.push(current),current=localeParents.get(current)}return seen.has("en")||expanded.push("en"),Object.freeze(expanded)}function lyraLocaleCatalogVersion(locale){let version="";for(const candidate of localeCandidates(locale)){const revision=localeCatalogRevisions.get(candidate);revision&&(version+=`${revision},`)}return version}function getRegisteredLyraLocales(){const keys=new Set(["en",...localePublicTags.values()]);return Object.freeze([...keys].sort())}const NO_REGISTERED_LOCALE_KEYS=/* @__PURE__ */(()=>Object.freeze([]))();function getRegisteredLyraLocaleKeys(locale){const identity=localeIdentity(locale);if(!identity.lookupKey)return NO_REGISTERED_LOCALE_KEYS;const catalog=locales.get(identity.lookupKey);return catalog?Object.freeze(Object.keys(catalog)):NO_REGISTERED_LOCALE_KEYS}function subscribeLyraLocaleRegistry(listener){return registryListeners.add(listener),()=>registryListeners.delete(listener)}const MAX_CATALOG_MESSAGES=4096,MAX_CATALOG_PROPERTY_READS=MAX_CATALOG_MESSAGES*2,MAX_MESSAGE_KEY_LENGTH=256,PLURAL_CATEGORIES=new Set(["zero","one","two","few","many","other"]),trustedMessageRecords=new WeakSet;function trusted(snapshot){return trustedMessageRecords.add(Object.freeze(snapshot)),snapshot}function snapshotPluralMessage(value){if(!isPlainRecord(value))return;const snapshot=Object.create(null);let count=0;try{for(const key in value){if(++count>PLURAL_CATEGORIES.size||!PLURAL_CATEGORIES.has(key)||!Object.prototype.hasOwnProperty.call(value,key))return;const entry=readOwnDataValue(value,key);if(typeof entry!="string")return;snapshot[key]=entry}}catch{return}return typeof snapshot.other=="string"?trusted(snapshot):void 0}function snapshotMessage(value){return typeof value=="string"?value:snapshotPluralMessage(value)}function snapshotCatalog(strings){const snapshot=Object.create(null);let keys=[];if(isPlainRecord(strings))try{keys=Reflect.ownKeys(strings).slice(0,MAX_CATALOG_PROPERTY_READS)}catch{}let count=0;for(const key of keys){if(count>=MAX_CATALOG_MESSAGES)break;if(typeof key!="string"||!key||key.length>MAX_MESSAGE_KEY_LENGTH)continue;let descriptor;try{descriptor=Reflect.getOwnPropertyDescriptor(strings,key)}catch{continue}if(!descriptor?.enumerable||!("value"in descriptor))continue;count+=1;const message=snapshotMessage(descriptor.value);message!==void 0&&(snapshot[key]=message)}return trusted(snapshot)}function mergeCatalogs(current,incoming){return trusted(Object.assign(Object.create(null),current,incoming))}function snapshotLocaleMeta(meta){if(meta===void 0)return;if(!isPlainRecord(meta))return Object.freeze({});const snapshot={},dir=readOwnDataValue(meta,"dir");(dir==="ltr"||dir==="rtl")&&(snapshot.dir=dir);const name=readOwnDataValue(meta,"name");return typeof name=="string"&&(snapshot.name=name),Object.freeze(snapshot)}function snapshotLyraLocaleStrings(strings){return snapshotCatalog(strings)}let emptyLocaleStrings;function emptyLyraLocaleStrings(){return emptyLocaleStrings??=snapshotLyraLocaleStrings({})}const trustedDefaultCatalogs=new WeakMap;function trustedLyraDefaultStrings(defaults){const known=trustedDefaultCatalogs.get(defaults);if(known)return known;let trusted2=defaults;if(isPlainRecord(defaults)&&!trustedMessageRecords.has(defaults))try{Reflect.ownKeys(defaults).length<=MAX_CATALOG_MESSAGES&&(trusted2=snapshotCatalog(defaults))}catch{}return trustedDefaultCatalogs.set(defaults,trusted2),trusted2}function safeMessageAt(source,key){if(isPlainRecord(source))return trustedMessageRecords.has(source)?source[key]:snapshotMessage(readOwnDataValue(source,key))}function deliverLocaleListeners(groups,operation){const errors=[];for(const group of groups)for(const listener of group)try{listener()}catch(error){errors.push(error)}if(errors.length>0)throw new AggregateError(errors,`${operation} committed, but ${errors.length} locale subscriber${errors.length===1?"":"s"} failed.`)}function localeUsesCatalog(locale,lookupKey){return localeCandidates(locale).includes(lookupKey)}function recordLyraOwnerDocumentConnection(host){ownerView(host)&&ownerDocumentsWithBrowsingContext.add(host.ownerDocument)}function forgetHostLocaleSubscription(subscription){hostLocaleListeners.delete(subscription),hostLocaleFinalizer.unregister(subscription)}function liveHostLocaleSubscriptions(){const live=[];for(const subscription of[...hostLocaleListeners]){const host=subscription.deref();if(!host||!host.isConnected||ownerDocumentsWithBrowsingContext.has(host.ownerDocument)&&ownerView(host)===null){forgetHostLocaleSubscription(subscription);continue}live.push(host)}return live}function registerLocale(locale,strings,meta,exactOnly,parentKey){const identity=storedLocaleIdentity(locale,!0),key=identity.lookupKey,incomingStrings=snapshotCatalog(strings),incomingMeta=snapshotLocaleMeta(meta);parentKey!==void 0&&validateLocaleParent(key,parentKey),expandLocaleCandidates||(expandLocaleCandidates=expandedLocaleCandidates,localeCandidateCache.clear());const isNewLocale=!locales.has(key),candidateTopologyChanged=isNewLocale||parentKey!==void 0&&localeParents.get(key)!==parentKey||exactOnly&&!exactOnlyLocales.has(key)||identity.wellFormed&&!wellFormedLocales.has(key),previouslyAffectedActive=candidateTopologyChanged&&activeLocale!==""&&localeUsesCatalog(activeLocale,key),previouslyAffectedHosts=new Set(candidateTopologyChanged?liveHostLocaleSubscriptions().filter(host=>localeUsesCatalog(inheritedLocale(host),key)):[]);exactOnly&&exactOnlyLocales.add(key),parentKey!==void 0&&localeParents.set(key,parentKey),identity.wellFormed&&wellFormedLocales.add(key),locales.set(key,mergeCatalogs(locales.get(key),incomingStrings)),localePublicTags.set(key,identity.publicTag),incomingMeta&&localeMeta.set(key,Object.freeze({...localeMeta.get(key)??{},...incomingMeta})),localeCatalogRevisions.set(key,++catalogRevision),candidateTopologyChanged&&localeCandidateCache.clear();const activeSnapshot=previouslyAffectedActive||activeLocale&&localeUsesCatalog(activeLocale,key)?[...listeners]:[],hostSnapshot=liveHostLocaleSubscriptions().filter(host=>previouslyAffectedHosts.has(host)||localeUsesCatalog(inheritedLocale(host),key)).map(host=>()=>requestContextUpdate(host)),registrySnapshot=isNewLocale?[...registryListeners]:[];deliverLocaleListeners([activeSnapshot,hostSnapshot,registrySnapshot],`registerLyraLocale(${JSON.stringify(identity.publicTag)})`)}function registerLyraLocale(locale,strings,meta){registerLocale(locale,strings,meta,!1)}function validateLocaleParent(childKey,parentKey){for(const origin of new Set([childKey,...localeParents.keys()])){const visited=new Set;let current=origin,depth=0;for(;current;){if(visited.has(current))throw new TypeError("Locale parent relationships must not contain cycles.");if(visited.add(current),current=current===childKey?parentKey:localeParents.get(current),current&&++depth>MAX_LOCALE_PARENT_DEPTH)throw new TypeError("Locale parent chains must not exceed 32 edges.")}}}function registerLyraLocaleDelta(locale,parent,strings,meta){const parentKey=storedLocaleIdentity(parent,!0).lookupKey;registerLocale(locale,strings,meta,!0,parentKey)}function registerLyraExactLocale(locale,strings,meta){registerLocale(locale,strings,meta,!0)}function getLyraLocaleDirection(locale){const identity=localeIdentity(locale);if(!identity.publicTag)return"ltr";for(const candidate of localeCandidates(identity.publicTag)){const declared=localeMeta.get(candidate)?.dir;if(declared)return declared}try{const resolved=new Intl.Locale(identity.publicTag);return(resolved.textInfo?.direction??resolved.getTextInfo?.().direction)==="rtl"?"rtl":"ltr"}catch{return"ltr"}}function setLyraLocale(locale){const next=storedLocaleIdentity(locale,!1).publicTag;if(activeLocale===next)return;const hostSnapshot=liveHostLocaleSubscriptions(),previousHostLocales=hostSnapshot.map(host=>inheritedLocale(host));activeLocale=next;const affectedHostListeners=hostSnapshot.filter((host,index)=>inheritedLocale(host)!==previousHostLocales[index]).map(host=>()=>requestContextUpdate(host));deliverLocaleListeners([[...listeners],affectedHostListeners],`setLyraLocale(${JSON.stringify(next)})`)}function getLyraLocale(){return activeLocale}function resolveActiveOrExplicitLocale(locale){const trimmed=locale?.trim();return trimmed&&trimmed.toLowerCase()!=="auto"?locale:activeLocale||void 0}function subscribeLyraLocale(listener){return listeners.add(listener),()=>listeners.delete(listener)}function subscribeLyraLocaleForHost(host){recordLyraOwnerDocumentConnection(host);const subscription=new WeakRef(host);return hostLocaleListeners.add(subscription),hostLocaleFinalizer.register(host,subscription,subscription),()=>forgetHostLocaleSubscription(subscription)}function inheritedLocale(host,localeAttribute=host.getAttribute("locale")){const explicit=localeAttribute||host.getAttribute("lang");if(explicit)return canonicalizeLyraLocale(explicit);if(host.getAttribute("lang")==="")return activeLocale||"en";const documentElement=host.ownerDocument?.documentElement;let parent=domParentElement(host);for(;parent;){const isDocumentElement=parent===documentElement,locale=isDocumentElement?parent.getAttribute("locale"):parent.getAttribute("locale")||parent.getAttribute("lang");if(locale)return canonicalizeLyraLocale(locale);if(!isDocumentElement&&parent.getAttribute("lang")==="")return activeLocale||"en";parent=domParentElement(parent)}if(activeLocale)return activeLocale;const documentLocale=documentElement?.getAttribute("lang");return documentLocale?canonicalizeLyraLocale(documentLocale):"en"}const hostContextCaches=new WeakMap;function enableLyraLocaleCache(host){hostContextCaches.has(host)||hostContextCaches.set(host,{})}function invalidateLyraLocaleCache(host){const cache=hostContextCaches.get(host);cache&&(cache.attribute=void 0,cache.locale=void 0,cache.direction=void 0)}function resolveLyraLocale(host){return cachedLocale(host,host.getAttribute("locale")||"")}function cachedLocale(host,localeAttribute){const cache=hostContextCaches.get(host);if(!cache)return inheritedLocale(host,localeAttribute);let locale=cache.locale;return(locale===void 0||cache.attribute!==localeAttribute)&&(locale=inheritedLocale(host,localeAttribute),cache.attribute=localeAttribute,cache.locale=locale),locale}function resolveLyraServerLocale(host){const explicit=host.getAttribute("locale")||host.getAttribute("lang");return explicit?canonicalizeLyraLocale(explicit):activeLocale||"en"}function resolveLyraLocaleWithHostOverride(host,localeOverride){return localeOverride?canonicalizeLyraLocale(localeOverride):cachedLocale(host,localeOverride)}function inheritedDirection(host){const explicit=host.getAttribute("dir")?.toLowerCase();if(explicit==="rtl"||explicit==="ltr")return explicit;const view=ownerView(host);if(view)try{const getComputedStyle=view.getComputedStyle;if(typeof getComputedStyle=="function"){const computed=getComputedStyle.call(view,host).direction;if(computed==="rtl"||computed==="ltr")return computed}}catch{}let parent=flattenedParentElement(host);for(;parent;){const inherited=parent.getAttribute("dir")?.toLowerCase();if(inherited==="rtl"||inherited==="ltr")return inherited;parent=flattenedParentElement(parent)}return"ltr"}function resolveLyraDirection(host){const cache=hostContextCaches.get(host);if(!cache)return inheritedDirection(host);let direction=cache.direction;return direction===void 0&&(direction=inheritedDirection(host),cache.direction=direction),direction}function peekLyraLocale(host){return hostContextCaches.get(host)?.locale}function peekLyraDirection(host){return hostContextCaches.get(host)?.direction}const PLURAL_CATEGORY_FALLBACKS={zero:["zero","other"],one:["one","other"],two:["two","few","many","other"],few:["few","many","other"],many:["many","few","other"],other:["other"]};function pluralSelector(values){let raw;try{raw=values.pluralCount??values.count}catch{return}return typeof raw=="number"&&Number.isFinite(raw)?raw:void 0}function selectPluralMessage(message,locale,count){if(count===void 0)return message.other;const tag=localeCandidates(locale)[0],category=getDefaultPluralRules(tag).select(count);for(const candidate of PLURAL_CATEGORY_FALLBACKS[category]??PLURAL_CATEGORY_FALLBACKS.other){const text=message[candidate];if(text!==void 0)return text}return message.other}function resolveLyraString(host,key,overrides,fallback,values,defaults){return resolveLyraStringWithLocale(()=>resolveLyraLocale(host),key,overrides,fallback,values,defaults)}function resolveLyraStringWithLocale(resolveLocale,key,overrides,fallback,values,defaults){let message=safeMessageAt(overrides,key);message===void 0&&typeof fallback=="string"&&(message=fallback);let locale;if(message===void 0){if(locale=resolveLocale(),locales.size)for(const candidate of localeCandidates(locale)){const registered=safeMessageAt(locales.get(candidate),key);if(registered!==void 0){message=registered;break}}DEV_DIAGNOSTICS&&message===void 0&&warnLocaleFallback(locale,key)}message??=safeMessageAt(defaults,key)??key;let text;return typeof message!="string"?(locale??=resolveLocale(),text=selectPluralMessage(message,locale,values?pluralSelector(values):void 0)):text=message,values?text.replace(/\{(\w+)\}/g,(match,name)=>{try{const value=values[name];return typeof value=="string"?value:typeof value!="number"?match:Number.isFinite(value)?(locale??=resolveLocale(),getMessageNumberFormat(locale).format(value+0)):String(value)}catch{return match}}):text}function resolveLocalizedParts(template,interpolate){const marker=selectAbsentMarker(template);return interpolate(marker).split(marker)}function resolveLocalizedSlots(template,names,interpolate){const markers=Object.create(null),byMarker=new Map;let seen=template;for(const name of names){if(Object.prototype.hasOwnProperty.call(markers,name))continue;const marker=selectAbsentMarker(seen);markers[name]=marker,byMarker.set(marker,name),seen+=marker}const text=interpolate(markers),out=[];let start=0;for(;;){let at=-1,found="";for(const marker of byMarker.keys()){const index=text.indexOf(marker,start);index!==-1&&(at===-1||index<at)&&(at=index,found=marker)}if(at===-1)break;at>start&&out.push(text.slice(start,at)),out.push({slot:byMarker.get(found)}),start=at+found.length}return start<text.length&&out.push(text.slice(start)),out}function selectAbsentMarker(template){const privateUse=new Set;for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);code>=57344&&code<=63743&&privateUse.add(code)}let marker="";for(let code=57344;code<=63743;code+=1)if(!privateUse.has(code)){marker=String.fromCharCode(code);break}if(!marker){const counts=new Uint32Array(65536);for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);counts[code]=(counts[code]??0)+1}let leastCode=0,leastCount=Number.POSITIVE_INFINITY;for(let code=0;code<counts.length;code+=1){const count=counts[code]??0;if(count===0){marker=String.fromCharCode(code);break}count<leastCount&&(leastCode=code,leastCount=count)}if(!marker){const followers=new Uint8Array(65536);for(let index=0;index+1<template.length;index+=1)template.charCodeAt(index)===leastCode&&(followers[template.charCodeAt(index+1)]=1);let follower=0;for(;follower<followers.length&&followers[follower]!==0;)follower+=1;marker=String.fromCharCode(leastCode,follower<followers.length?follower:leastCode)}}return marker}export{canonicalizeLyraLocale,emptyLyraLocaleStrings,enableLyraLocaleCache,getLyraLocale,getLyraLocaleDirection,getRegisteredLyraLocaleKeys,getRegisteredLyraLocales,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraDirection,peekLyraLocale,recordLyraOwnerDocumentConnection,registerLyraExactLocale,registerLyraLocale,registerLyraLocaleDelta,resolveActiveOrExplicitLocale,resolveLocalizedParts,resolveLocalizedSlots,resolveLyraDirection,resolveLyraLocale,resolveLyraLocaleWithHostOverride,resolveLyraServerLocale,resolveLyraString,resolveLyraStringWithLocale,setLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocale,subscribeLyraLocaleForHost,subscribeLyraLocaleRegistry,trustedLyraDefaultStrings};
@@ -26,7 +26,7 @@ export type LyraMessage=string|LyraPluralMessage;
26
26
  * additional keys as well; components may use a component-specific key when
27
27
  * a message is not part of this common set.
28
28
  */
29
- export type LyraMessageKey='connectorManagerLabel'|'connectorManagerEmpty'|'connectorManagerLimit'|'connectorManagerKindMcp'|'connectorManagerKindConnector'|'connectorManagerStatusDisconnected'|'connectorManagerStatusConnecting'|'connectorManagerStatusConnected'|'connectorManagerConnect'|'connectorManagerDisconnect'|'connectorManagerConnectFor'|'connectorManagerDisconnectFor'|'connectorManagerRetryFor'|'connectorManagerStatusChanged'|'backgroundRunsLabel'|'backgroundRunsEmpty'|'backgroundRunsLimit'|'backgroundRunsStatusCompleted'|'backgroundRunsStatusFailed'|'backgroundRunsOpenFor'|'backgroundRunsCancelFor'|'researchProgressLabel'|'researchProgressEmpty'|'researchProgressLimit'|'researchProgressStatusPending'|'researchProgressStatusRunning'|'researchProgressStatusCompleted'|'researchProgressStatusFailed'|'researchProgressSources'|'budgetMeterLabel'|'budgetMeterUnavailable'|'budgetMeterExceeded'|'budgetMeterValue'|'budgetMeterPercent'|'toolParamMinLength'|'toolParamMaxLength'|'toolParamMinimum'|'toolParamMaximum'|'toolParamFormat'|'toolParamMinItems'|'toolParamMaxItems'|'toolParamInvalidConstraint'|'toolParamInvalidSelection'|'permissionRulesLabel'|'permissionRulesEmpty'|'permissionRulesLimit'|'permissionRulesDecisionFor'|'permissionRulesScope'|'permissionRulesAllow'|'permissionRulesAsk'|'permissionGrantLabel'|'permissionGrantScopeLabel'|'permissionGrantAllowOnce'|'permissionGrantAllowSession'|'agentQuestionUnsupported'|'changeReviewLabel'|'changeReviewEmpty'|'changeReviewKeep'|'changeReviewKeepHunk'|'changeReviewDiscard'|'changeReviewPending'|'changeReviewKept'|'changeReviewDiscarded'|'changeReviewDiscardHunk'|'changeReviewHunk'|'changeReviewHunkInFile'|'changeReviewLimit'|'agentQuestionLabel'|'agentQuestionAccept'|'agentQuestionDecline'|'agentQuestionSubmitted'|'agentQuestionFormLoadFailed'|'streamInterrupted'|'streamResume'|'genViewEmpty'|'genViewInvalid'|'genViewLoading'|'genViewLoadFailed'|'genViewInvalidState'|'genViewActionDenied'|'genViewConfirmationRequired'|'noData'|'graphDataListLimit'|'graphLegendLabel'|'legendTypeShown'|'legendTypeHidden'|'entityChipWithType'|'jumpToLatest'|'terminalLabel'|'terminalDownload'|'terminalHighlightLine'|'terminalOutputTruncated'|'schemaViewerIssueLimit'|'schemaViewerIssueError'|'schemaViewerIssueWarning'|'schemaViewerIssueInfo'|'toolParamMissingProperty'|'toolParamBooleanUnset'|'toolParamBooleanTrue'|'toolParamBooleanFalse'|'toolParamSchemaLimit'|'testResultsLimit'|'toolTimelineLimit'|'toolTimelineLoadError'|'toolSelectLimit'|'sequenceStripEmpty'|'sequenceStripSourceError'|'sequenceStripSourceItemUnavailable'|'sequenceStripSourceItemLabel'|'sequenceStripSourceRangeDetails'|'sequenceStripSourceKeyboardHelp'|'sequenceStripCategoryCount'|'sequenceStripCellKeyboardHelp'|'sequenceStripUnnamedCategory'|'sequenceStripBucketLabel'|'sequenceStripBucketSummary'|'sequenceStripItemCount'|'sequenceStripRangeCount'|'noColumns'|'dataGridColumnMenu'|'dataGridPinStart'|'dataGridPinEnd'|'dataGridUnpin'|'dataGridRowsPerPage'|'dataGridTreeLimitReached'|'loadMore'|'viewerSearchMatchCount'|'viewerSearchNoMatches'|'viewerSearchActiveMatch'|'viewerHighlightLabel'|'tableRowTotal'|'tableFilterLabel'|'tableFilterPlaceholder'|'tableLoading'|'tableLoadingMore'|'tableLoadFailed'|'tableEditCell'|'tableEditCellInRow'|'carousel'|'carouselLabel'|'carouselSlide'|'carouselSlidePosition'|'carouselSlideAnnouncement'|'carouselSlideAnnouncementSeparator'|'carouselIndicators'|'carouselGoTo'|'carouselPauseRotation'|'carouselResumeRotation'|'carouselViewport'|'imageComparerLabel'|'zoomableFrameLabel'|'zoomControls'|'zoomOut'|'zoomIn'|'lightboxLabel'|'lightboxImagePosition'|'scrollerLabel'|'chatViewportLabel'|'newMessagesCount'|'newMessages'|'scrollPrevious'|'scrollNext'|'showAllColumns'|'dataGridColumns'|'showFewerColumns'|'clear'|'openCalendar'|'open'|'close'|'toggleNavigation'|'resizeNavigation'|'appRailPin'|'appRailItemToggle'|'appRailGroupToggle'|'resizeColumn'|'resizeValuePixels'|'resizeValuePercent'|'copy'|'copyJson'|'copied'|'expand'|'collapse'|'toggleMessage'|'messageActionsLabel'|'regenerateResponse'|'editMessage'|'showMore'|'showMoreCount'|'showLess'|'retry'|'remove'|'removeWithContext'|'playWithContext'|'pauseWithContext'|'loading'|'loadingDocument'|'calendarPreviousMonth'|'calendarNextMonth'|'noMatches'|'previous'|'next'|'paginationLabel'|'paginationPage'|'paginationJumpToPage'|'paginationPageSize'|'paginationPageSizeOption'|'paginationInvalidPage'|'paginationInvalidPageUnknownTotal'|'branchPickerLabel'|'branchPrevious'|'branchNext'|'branchPosition'|'paginationSummary'|'paginationEmptySummary'|'paginationApplied'|'paginationAppliedUnknownTotal'|'cancel'|'confirm'|'search'|'circularReference'|'items'|'item'|'trendOf'|'wordCloud'|'wordCloudWordLimit'|'wordCloudLegend'|'wordCloudWordAnnouncement'|'wordCloudPreparedSummary'|'wordCloudPreparedUnavailable'|'avPlayerWaveformUnavailable'|'avPlayerTranscriptUnavailable'|'histogramDistributionSummary'|'histogramDistributionRange'|'graphSourceRecords'|'graphSourceNodes'|'graphSourceEdges'|'graphSourceAllRecords'|'graphSourceIncidentEdges'|'graphSourceDirection'|'graphSourceBothDirections'|'graphSourceTotals'|'graphSourceCoverageComplete'|'graphSourceCoverageNeighborhood'|'graphSourceCoverageAggregate'|'graphSourceNodeCount'|'graphSourceEdgeCount'|'graphSourceShownNodes'|'graphSourceShownEdges'|'graphSourceRecordsError'|'graphSourceSceneError'|'graphSourceRecordMissing'|'heatmapSourceError'|'heatmapSourceSummary'|'heatmapSourceRangeLabel'|'heatmapSourceExactWindow'|'heatmapSourceKeyboardHelp'|'heatmapSourceMean'|'heatmapSourceMin'|'heatmapSourceMax'|'testResultsInputTooLarge'|'embeddingExplorerSpatialBounds'|'embeddingExplorerSpatialSummary'|'embeddingExplorerSpatialBin'|'embeddingExplorerSpatialError'|'embeddingExplorerSpatialLoading'|'comboboxLoadError'|'comboboxSelectedOverflow'|'promptQueueItemLabel'|'promptQueueActionLabel'|'notInCatalog'|'sendMessage'|'stopGenerating'|'dropzoneReleaseToAdd'|'dropzoneRejectedType'|'chartCategory'|'chartTotal'|'chartAxisTotal'|'chartPrimaryAxis'|'chartSecondaryAxis'|'chartPointLabel'|'chartPointCoordinates'|'chartBubblePointCoordinates'|'chartBandRange'|'chartLabeledPoint'|'chartLegend'|'resetZoom'|'chatSending'|'chatResponding'|'chatFailedToSend'|'chatFailedAnnounce'|'chatCompleteAnnounce'|'showMoreCollapsed'|'showMoreOverflowLabel'|'countAtLeast'|'copyCode'|'copyCodeIndexed'|'copiedToClipboard'|'codeRegion'|'codeRegionIndexed'|'codeRegionWithLanguage'|'codeRegionWithLanguageIndexed'|'markdownTableRegion'|'markdownTableRegionIndexed'|'codeBlockLineLabel'|'copyDiff'|'diffViewOldLabel'|'diffViewNewLabel'|'diffViewHiddenLines'|'diffViewTooLarge'|'jsonArray'|'jsonObject'|'jsonValue'|'jsonCopyLabel'|'jsonToggleLabel'|'jsonItemCount'|'jsonKeyCount'|'jsonViewerLimit'|'jsonViewerLabel'|'untitledSource'|'sourcePageSuffix'|'toolCall'|'statusPending'|'statusRunning'|'statusSuccess'|'statusError'|'statusDenied'|'statusIncomplete'|'maximize'|'restore'|'promptStudioVariableName'|'promptStudioVariableValue'|'schemaViewerLimit'|'subagentPanelLimit'|'pollPause'|'pollResume'|'pollRefresh'|'pollInactive'|'pollRefreshing'|'pollPaused'|'pollPausedAnnounce'|'pollResumedAnnounce'|'pollRefreshingAnnounce'|'randomContentPause'|'randomContentResume'|'randomContentNext'|'attachmentAdd'|'attachmentTriggerFiles'|'attachmentTriggerImage'|'attachmentTriggerCamera'|'attachmentMenuFiles'|'attachmentMenuImage'|'attachmentMenuCamera'|'checkboxRequired'|'checkboxGroupRequired'|'tokenInputRequired'|'tokenInputTooFew'|'tokenInputTooMany'|'tokenInputEditWithContext'|'tokenInputLabel'|'commandPaletteLabel'|'commandPalettePlaceholder'|'commandPaletteEmpty'|'commandPaletteResults'|'iconButtonLabel'|'codeEditorLabel'|'calendarLabel'|'calendarEmpty'|'calendarEventsOverflow'|'switchRequired'|'citationHighConfidence'|'citationMediumConfidence'|'citationLowConfidence'|'citationVerified'|'citationUnverified'|'contextMeterUsed'|'contextMeterUsedOfTotal'|'contextMeterSegmentLabel'|'contextMeterInputLimit'|'gaugeLabel'|'gaugeValueLabel'|'untitledConversation'|'panelToggle'|'dockPanelResize'|'documentPreviewAlt'|'documentPreviewUrlNotAllowed'|'documentPreviewFailedToLoad'|'documentPreviewResourceTooLarge'|'documentPreviewGenericError'|'ebookViewerLoadError'|'ebookViewerLocationChanged'|'ebookViewerMissingLibrary'|'ebookViewerRegionLabel'|'ebookViewerPreviousChapter'|'ebookViewerNextChapter'|'ebookViewerShowingChapter'|'fileTypeFile'|'fileTypePdf'|'fileTypeWord'|'fileTypeSpreadsheet'|'fileTypePresentation'|'fileTypeText'|'fileTypeCode'|'fileTypeArchive'|'fileTypeImage'|'fileTypeAudio'|'fileTypeVideo'|'fileTypeWithSize'|'pptxViewerLabel'|'pptxViewerFidelityNotice'|'pptxViewerRenderError'|'pptxViewerMissingLibrary'|'pptxViewerPreviousSlide'|'pptxViewerNextSlide'|'pptxViewerSlideOf'|'documentViewerLabel'|'attachmentPreviewName'|'attachmentPreviewFile'|'documentViewerMissingSanitizer'|'docxViewerLabel'|'docxViewerMissingConverter'|'svgViewerLabel'|'htmlViewerLabel'|'datasetViewerLabel'|'datasetViewerMissingParser'|'datasetViewerEmpty'|'datasetViewerCaption'|'datasetViewerCaptionNamed'|'contactViewerLabel'|'contactViewerNoContacts'|'contactViewerUnnamedContact'|'contactViewerPhoneLabel'|'contactViewerEmailLabel'|'contactViewerAddressLabel'|'contactViewerOrganization'|'contactViewerTypedValue'|'contactViewerAddressFormat'|'contactViewerTypeHome'|'contactViewerTypeWork'|'contactViewerTypeCell'|'contactViewerTypeVoice'|'contactViewerTypeFax'|'contactViewerTypeInternet'|'contactViewerTypePreferred'|'exportButtonLabel'|'generationStatusElapsedSeconds'|'generationStatusThroughput'|'graphDataList'|'graphSpatialControls'|'graphView3d'|'graphViewList'|'graphFit'|'graphOrbitLeft'|'graphOrbitRight'|'graphOrbitUp'|'graphOrbitDown'|'graphSpatialInstructions'|'graphSpatialUnavailable'|'graphCustomNodesError'|'graphCustomNodesUnavailable'|'graphGlowUnavailable'|'graphSpatialPage'|'graphItemAnnouncement'|'navigation'|'attachmentRetryWithContext'|'attachmentUploadingWithContext'|'attachmentUploadingProgress'|'attachmentUploadingIndeterminate'|'attachmentUploadFailed'|'attachmentUntitledFile'|'chartTrendIncreasing'|'chartTrendDecreasing'|'chartTrendFlat'|'chartSummary'|'chartSeriesNoData'|'chartSummaryWithData'|'chartSummaryEmpty'|'chartSummarySeparator'|'chartData'|'chartRenderUnavailable'|'chartPreparedSummary'|'chartPreparedUnavailable'|'chartPreparedSummaryZoom'|'chartSpatialSummary'|'chartSpatialRadiusDomain'|'chartSpatialDensityLegend'|'chartSpatialPoint'|'chartSpatialBin'|'chartSpatialHidden'|'chartDataSampled'|'chartPlotSampled'|'chartZoomUnavailable'|'chartDataLabelsUnavailable'|'chartStackTotalsUnavailable'|'chartAnnotationsUnavailable'|'chart'|'chartTypeLine'|'chartTypeBar'|'chartTypeScatter'|'chartTypePie'|'chartTypeDoughnut'|'chartTypeRadar'|'chartTypePolarArea'|'chartTypeBubble'|'boxPlotSeriesSummary'|'boxPlotSummaryWithData'|'boxPlotSummaryEmpty'|'boxPlotData'|'chartSeriesLabel'|'boxPlotMin'|'boxPlotQ1'|'boxPlotMedian'|'boxPlotQ3'|'boxPlotMax'|'boxPlot'|'histogramFrequency'|'liteChartMarkSummary'|'liteChartBarLabel'|'chartValueLabel'|'chartValuePercentageLabel'|'liteChartCustomMarkSummary'|'composerLabel'|'composerPlaceholder'|'textareaLabel'|'citation'|'citationWithStatus'|'citationWithCustomLabel'|'comboboxOverflow'|'comboboxRequired'|'comboboxCreate'|'comboboxLabel'|'rename'|'previousMonth'|'nextMonth'|'chooseDate'|'date'|'dateInputMinMessage'|'dateInputMaxMessage'|'dateInputPastDisabled'|'dateInputFutureDisabled'|'dateInputInvalid'|'timeInputLabel'|'timeInputHour'|'timeInputMinute'|'timeInputSecond'|'timeInputDayPeriod'|'timeInputEmptySegment'|'timeInputOpen'|'timeInputPopup'|'timeInputNow'|'timeInputInvalid'|'timeInputMinMessage'|'timeInputMaxMessage'|'timeInputRangeMessage'|'timeInputStepMessage'|'documentPreviewEmpty'|'convertingDocument'|'conversationActionWithTitle'|'documentPreviewNotAvailable'|'documentPreviewGenericFile'|'documentPreviewTypeDocument'|'documentPreviewTypeImage'|'documentPreviewTypeEmail'|'documentPreviewTypeCalendar'|'archiveViewerEmpty'|'archiveViewerFolder'|'archiveViewerFile'|'documentPreviewTypeDataset'|'documentPreviewTypeContact'|'download'|'exportFormatMenuLabel'|'exportFailed'|'fileInputDefaultLabel'|'fileInputAccepted'|'fileInputRejected'|'fileInputFolderRejected'|'fileInputRejectedType'|'fileInputRejectedSize'|'fileInputRejectedCount'|'fileInputRejectedRead'|'fileInputRejectedLimit'|'fileInputRejectedMaxFiles'|'fileInputRejectedMaxTotalSize'|'fileInputRejectionsMore'|'elapsedMinutesSecondsTemplate'|'graphNode'|'graphLink'|'graphDiagram'|'graphTypedNode'|'graphExpandableItem'|'graphNodeFocused'|'graphSelectionCount'|'graphNodesHidden'|'graphCommunity'|'heatmapValueLabel'|'heatmapMatrixCellLabel'|'heatmapCalendarLabel'|'heatmapMatrixLabel'|'heatmapCalendarCellLabel'|'heatmapNoDataValue'|'heatmapDefaultRowLabel'|'heatmapDefaultColLabel'|'heatmapSelectedCellLabel'|'heatmapSelectedCount'|'mapResetNorth'|'heatmapProjectionLimit'|'heatmapDecorationLimit'|'funnelStagesLimit'|'funnelStagesInputLimit'|'inputLabel'|'showPassword'|'hidePassword'|'radioRequired'|'progress'|'responsivePanel'|'popover'|'details'|'breadcrumb'|'timeline'|'timelineClusterCount'|'timelineItemVariantWarning'|'timelineItemVariantBrand'|'rating'|'sliderLabel'|'feedbackPositive'|'feedbackNegative'|'feedbackReasonsLabel'|'feedbackCommentLabel'|'feedbackCommentPlaceholder'|'feedbackSubmit'|'feedbackSubmitted'|'feedbackCommentTooLong'|'feedbackSingleReasonDescription'|'colorPicker'|'mediaCardUntitledFile'|'mediaCardOpenName'|'mediaCardOpenImageAttachment'|'mediaCardOpenVideoAttachment'|'mediaCardOpenFileAttachment'|'mediaCardImageAttachment'|'mediaCardVideoAttachment'|'animatedImageDefaultAlt'|'mentionSuggestions'|'mentionResultCount'|'mentionResultPosition'|'suggestionsLabel'|'map'|'model'|'selectModel'|'modelSelectNoModels'|'modelSelectRequired'|'temperature'|'play'|'playbackPosition'|'playbackStepPosition'|'videoPlayerLabel'|'videoMute'|'videoUnmute'|'videoVolume'|'videoCaptions'|'videoCaptionsOff'|'videoPictureInPicture'|'videoExitPictureInPicture'|'videoEnterFullscreen'|'videoExitFullscreen'|'videoPlaylistLabel'|'videoPlaylistUntitled'|'videoTimeReadout'|'selectValueMissing'|'select'|'sourceListDefaultLabel'|'threadListLabel'|'threadGroupPinned'|'threadGroupToday'|'threadGroupYesterday'|'threadGroupPrevious7Days'|'threadGroupPrevious30Days'|'threadGroupArchived'|'pinConversation'|'unpinConversation'|'archiveConversation'|'unarchiveConversation'|'deleteConversation'|'searchThreads'|'threadListMatchAnnounce'|'threadListEmpty'|'agentWorkspaceLabel'|'agentWorkspaceInputLimit'|'agentWorkspaceConversation'|'agentWorkspaceDetails'|'agentWorkspaceRun'|'agentWorkspaceTools'|'agentWorkspaceRetrieval'|'agentWorkspaceGrounding'|'agentWorkspaceContext'|'agentWorkspaceEmpty'|'ragAnswerLabel'|'ragAnswerCitations'|'ragAnswerSources'|'ragAnswerRetry'|'evaluationDashboardLabel'|'evaluationDashboardRunsLabel'|'evaluationDashboardNoRuns'|'evaluationDashboardMetricUnavailable'|'approvalQueueLabel'|'approvalQueueLimit'|'approvalQueueEmpty'|'approvalQueueOpen'|'approvalQueuePendingCount'|'approvalQueuePending'|'embeddingExplorerLabel'|'embeddingExplorerEmpty'|'embeddingExplorerPoint'|'embeddingExplorerPointLimit'|'knowledgeBaseAdminLabel'|'knowledgeBaseAdminInputLimit'|'knowledgeBaseAdminSourcesTab'|'knowledgeBaseAdminIngestionTab'|'resizeDivider'|'trendUnchanged'|'statTrendIncreased'|'statTrendDecreased'|'statTrendGood'|'statTrendBad'|'statTrendAnnouncement'|'streamStalled'|'streamStallAnnounce'|'streamRecoverAnnounce'|'streamStallClearedAnnounce'|'thinkingPanelLabel'|'messagePartsLabel'|'messagePartsWindowNotice'|'messagePartError'|'messagePartRetry'|'promptQueueLabel'|'promptQueueEmpty'|'promptQueueInputLimit'|'promptQueueAttachmentLimit'|'promptQueueSendNow'|'promptQueueItemRemoved'|'selectionToolbarLabel'|'selectionAsk'|'selectionQuote'|'selectionCite'|'promptInputLabel'|'promptInputControls'|'promptInputCollectionLimit'|'promptInputSources'|'promptInputAttachments'|'promptQueueItemAttachments'|'mcpAppLabel'|'mcpAppUnavailable'|'mcpAppLoading'|'taskListLabel'|'taskListCompletedOfTotal'|'taskListStepStartedAnnounce'|'taskListStepCompletedAnnounce'|'taskListStepFailedAnnounce'|'taskListStepIncompleteAnnounce'|'activityFeedLabel'|'activityFeedCompletedSteps'|'handoffLabel'|'handoffToAgent'|'handoffFromToAgent'|'usageBadgeLabel'|'usageBadgeTokensIn'|'usageBadgeTokensOut'|'usageBadgeTokensInLabel'|'usageBadgeTokensOutLabel'|'usageBadgeTotalTokensLabel'|'usageBadgeCostLabel'|'usageBadgeLatencyLabel'|'checkpointLabel'|'checkpointRestore'|'checkpointRestoreWithContext'|'checkpointRestoring'|'checkpointConfirmPrompt'|'thoughtFor'|'thinking'|'rangeStart'|'rangeEnd'|'calloutAnnouncementWithContext'|'closeWithContext'|'closeWithTruncatedContext'|'toastContentIncomplete'|'toastOverflow'|'toolApprovalHeading'|'toolApprovalGenericTool'|'toolApprovalArgsLabel'|'confirmApproved'|'confirmDenied'|'confirmApprovedAnnounce'|'confirmDeniedAnnounce'|'deny'|'edit'|'approve'|'invalidJson'|'fieldRequired'|'fieldMustBeString'|'fieldMustBeNumber'|'fieldMustBeInteger'|'fieldMustBeBoolean'|'unsupportedFieldType'|'fieldMustBeOneOf'|'fieldMustEqual'|'schemaMustBeObject'|'schemaPropertiesMustBeFlat'|'valueMustBeSerializable'|'valueInvalid'|'matchMismatch'|'phoneInputLabel'|'phoneInputIncomplete'|'otpInputIncomplete'|'otpInputLabel'|'numberInputIncrease'|'numberInputDecrease'|'textareaCharacterCount'|'textareaCharactersRemaining'|'copyFailed'|'colorPickerSaturationBrightness'|'colorPickerSaturationBrightnessValue'|'colorPickerHue'|'colorPickerHueValue'|'colorPickerOpacity'|'colorPickerOpacityValue'|'colorPickerValueField'|'colorPickerToggleFormat'|'colorPickerEyeDropper'|'colorPickerSwatches'|'colorPickerSwatch'|'colorPickerCurrentValue'|'selectSelectedOverflow'|'iconLoadError'|'iconTooLarge'|'iconSanitizerMissing'|'paginationFirstPage'|'paginationLastPage'|'accessibleLabelSeparator'|'durationMilliseconds'|'durationSeconds'|'selectTools'|'searchToolsPlaceholder'|'useDefaultTools'|'toolSelectCustomizeHint'|'noMatchesQuery'|'toolSelectNoneAvailable'|'toolSelectSummary'|'toolCount'|'otherCategory'|'widgetFullscreenPanel'|'widgetViewGroup'|'widgetExitFullscreen'|'widgetExitFullscreenWithLabel'|'widgetExpandToFullscreen'|'widgetExpandToFullscreenWithLabel'|'menuLabel'|'pause'|'kbdEscapeVisual'|'kbdEscapeWord'|'kbdTabWord'|'kbdSpaceWord'|'kbdDeleteVisual'|'kbdDeleteWord'|'kbdHomeWord'|'kbdEndWord'|'kbdPageUpVisual'|'kbdPageUpWord'|'kbdPageDownVisual'|'kbdPageDownWord'|'kbdEnterWord'|'kbdBackspaceWord'|'kbdArrowUpWord'|'kbdArrowDownWord'|'kbdArrowLeftWord'|'kbdArrowRightWord'|'kbdPlusWord'|'kbdMinusWord'|'kbdCommandWord'|'kbdControlVisual'|'kbdControlWord'|'kbdOptionWord'|'kbdAltWord'|'kbdShiftWord'|'kbdShortcutSeparator'|'emailViewerLabel'|'emailViewerMissingParser'|'emailViewerFrom'|'emailViewerTo'|'emailViewerSubject'|'emailViewerDate'|'emailViewerAttachments'|'emailViewerUnnamedAttachment'|'emailViewerNoSubject'|'emailViewerOpenAttachment'|'emailViewerQuotedText'|'emailViewerOpenAttachmentSize'|'emailViewerEmptyBody'|'emailViewerGroupAddress'|'calendarViewerLabel'|'calendarViewerMissingParser'|'calendarViewerEmpty'|'calendarViewerNoSummary'|'pdfViewerLabel'|'pdfViewerMissingLibrary'|'qrCodeMissingLibrary'|'qrCodeGenerationFailed'|'mapMissingLibrary'|'mapStyleRequired'|'mapWebglUnavailable'|'mapInitializationFailed'|'mapLegend'|'mapScene'|'mapCloseWithLabel'|'mapSceneEmpty'|'mapSceneUnavailable'|'mapScenePartial'|'mapSceneInvalid'|'mapSceneLimit'|'mapScenePrevious'|'mapSceneNext'|'mapScenePage'|'mapSceneMarker'|'mapScenePath'|'mapSceneArc'|'mapSceneModel'|'chartMissingLibrary'|'boxPlotMissingLibrary'|'graphMissingLibrary'|'pdfViewerPageOf'|'pdfViewerPageFailed'|'pdfViewerPageHighlights'|'pdfViewerZoomIn'|'pdfViewerZoomOut'|'pdfViewerCurrentZoom'|'pdfViewerPreviousPage'|'pdfViewerNextPage'|'anchorJumped'|'anchorJumpedToPage'|'anchorNotFound'|'highlightLayerLabel'|'highlightWithLabel'|'cellHighlightWithLabel'|'highlightOfTotal'|'pageRailLabel'|'pageRailPage'|'pageRailPageHighlighted'|'spreadsheetViewerUnavailable'|'csvViewerUnavailable'|'csvViewerLabel'|'spreadsheetViewerLabel'|'knownDateDay'|'knownDateMonth'|'knownDateYear'|'skipToContent'|'tourSkip'|'tourDone'|'tourStepOf'|'emojiPickerSearchLabel'|'emojiPickerSearchPlaceholder'|'emojiPickerGridLabel'|'emojiPickerEmpty'|'emojiPickerLoadError'|'emojiPickerPeerMissing'|'emojiPickerGroupSmileysEmotion'|'emojiPickerGroupPeopleBody'|'emojiPickerGroupComponent'|'emojiPickerGroupAnimalsNature'|'emojiPickerGroupFoodDrink'|'emojiPickerGroupTravelPlaces'|'emojiPickerGroupActivities'|'emojiPickerGroupObjects'|'emojiPickerGroupSymbols'|'emojiPickerGroupFlags'|'emojiPickerGroupUnknown'|'pushToTalkRequesting'|'pushToTalkDenied'|'pushToTalkError'|'pushToTalkUnsupported'|'pushToTalkStarted'|'pushToTalkStopped'|'pushToTalkCancelled'|'pushToTalkHold'|'pushToTalkStart'|'pushToTalkStop'|'traceTree'|'traceTreeSpanStatus'|'traceTreeMetricLabel'|'spanProjectionLimit'|'agentTraceFilterLabel'|'spanKindAgent'|'spanKindLlm'|'spanKindTool'|'spanKindRetriever'|'spanKindEmbedding'|'spanKindOther'|'tokensIn'|'tokensOut'|'cost'|'duration'|'spanWaterfall'|'spanStartedAtOffset'|'rubricSubmit'|'rubricSubmitAndNext'|'rubricSkip'|'rubricKeysLimit'|'compareResponseA'|'compareResponseB'|'compareVoteLabel'|'compareVoteBetter'|'compareVoteTie'|'compareVoteBothBad'|'compareVoteRecorded'|'comparePanel'|'audioVisualizerLabel'|'audioVisualizerIdle'|'audioVisualizerListening'|'audioVisualizerThinking'|'audioVisualizerSpeaking'|'treeNodeMoved'|'fileTreeLabel'|'fileTreeDiffSummary'|'gitStatusAdded'|'gitStatusModified'|'gitStatusDeleted'|'gitStatusRenamed'|'gitStatusUntracked'|'gitStatusConflicted'|'gitStatusIgnored'|'imageViewerLabel'|'imageViewerFailedToLoad'|'imageViewerRotate'|'imageViewerFitLabel'|'imageViewerFitContain'|'imageViewerFitWidth'|'imageViewerFitActual'|'imageViewerAnnotate'|'imageViewerHighlightsLabel'|'imageViewerHighlightsLimited'|'imageViewerUnlabeledHighlight'|'imageViewerAnnotationHint'|'imageViewerAnnotationBoxPosition'|'imageViewerAnnotationAdded'|'imageViewerAnnotationCancelled'|'transcriptFeedLabel'|'transcriptFeedEmpty'|'transcriptFeedInterim'|'commitCardLabel'|'commitCardCopyHash'|'commitCardDiffSummary'|'commitCardChangedFiles'|'stackTraceLabel'|'stackTraceLimit'|'stackTraceInternalFrames'|'statusSkipped'|'testResultsLabel'|'testResultsPassed'|'testResultsFailed'|'testResultsSkipped'|'testResultsShownAnnounce'|'testResultsRunning'|'testResultsFilterLabel'|'testResultsCompleteAnnounce'|'testResultsToggleTest'|'testResultsUnnamedTest'|'envListLabel'|'envListLimit'|'envListReveal'|'envListHide'|'envListValueHidden'|'envListCopy'|'voice'|'voicePickerNoVoices'|'voicePickerRequired'|'voicePickerPreview'|'voicePickerPreviewFailed'|'voicePickerStopPreview'|'avPlayerLabel'|'avPlayerFailedToLoad'|'avPlayerTranscript'|'avPlayerTimeline'|'avPlayerPlaybackRate'|'avPlayerRateOption'|'avPlayerPosition'|'avPlayerHighlightRange'|'avPlayerHighlightAt'|'attachmentTriggerAudio'|'attachmentMenuAudio'|'browserFrameLabel'|'browserFrameUrlLabel'|'browserFrameViewOf'|'browserFrameTakeOver'|'browserFrameHandBack'|'browserFrameStop'|'browserFrameStatusIdle'|'browserFrameStatusConnecting'|'browserFrameStatusLive'|'browserFrameStatusStalled'|'browserFrameControllerAgent'|'browserFrameControllerUser'|'browserFramePingsLimit'|'notebookViewerLabel'|'notebookViewerInvalid'|'notebookViewerUnsupportedVersion'|'notebookViewerTooManyCells'|'notebookViewerInPrompt'|'notebookViewerInPromptEmpty'|'notebookViewerCodeCell'|'notebookViewerMarkdownCell'|'notebookViewerRawCell'|'notebookViewerErrorOutput'|'notebookViewerFullOutput'|'notebookViewerUnrenderedOutput'|'xmlViewerLabel'|'xmlViewerParseError'|'xmlViewerTooManyNodes'|'xmlViewerLimit'|'xmlViewerChildCount'|'xmlViewerCopyDocument'|'xmlViewerCopyNode'|'xmlViewerToggleNode'|'artifactPanelLabel'|'artifactPanelPreview'|'artifactPanelCode'|'artifactPanelPreviousVersion'|'artifactPanelNextVersion'|'artifactPanelVersionPosition'|'artifactPanelRestore'|'artifactPanelGenerating'|'resultFieldLabel'|'geojsonViewLabel'|'geojsonViewInvalid'|'geojsonViewFeatureCount'|'geojsonViewMissingMapLibrary'|'mindMapLabel'|'mindMapTopicStatus'|'mindMapLeafStatus'|'mindMapExpanded'|'mindMapCollapsed'|'mindMapNodeLimit'|'mindMapInputLimit'|'entityDegree'|'entityCommunity'|'focusInGraph'|'focusInGraphWithContext'|'untitledEntity'|'untitledCommunity'|'communityMemberCount'|'communityDrillIn'|'communityDrillInWithContext'|'selectAllSources'|'sourcePickerSelection'|'provenancePanelLabel'|'provenanceEntities'|'provenanceRelationships'|'provenanceCommunities'|'provenanceChunks'|'provenanceEmpty'|'chunkInspectorLabel'|'chunkScore'|'scoreTierHigh'|'scoreTierMedium'|'scoreTierLow'|'chunkInspectorEmpty'|'flowCanvasLabel'|'flowCanvasLayoutLimit'|'flowCanvasInputLimit'|'flowCanvasSummary'|'flowNode'|'flowEdge'|'flowEdgeWithLabel'|'flowItemAnnouncement'|'dashboardGridLabel'|'dashboardCellCollisionRejected'|'dashboardCellMoved'|'dashboardCellResized'|'flowEdgeList'|'flowNodeSelected'|'flowNodeDeselected'|'flowSelectionCleared'|'flowNodeMoved'|'flowNodeProgressLabel'|'flowConnectStarted'|'flowConnectTarget'|'flowConnectCommitted'|'flowConnectCancelled'|'zoomToFit'|'flowLockCanvas'|'flowControlsLabel'|'flowMinimapLabel'|'flowMinimapSourceUnavailable'|'flowMinimapViewport'|'flowMinimapInstructions'|'flowMinimapViewportChanged'|'nodePaletteLabel'|'nodePalettePlaceholder'|'nodePaletteEmpty'|'nodePaletteDragHint'|'nodePaletteResultCount'|'pathStripLabel'|'pathNodeStatus'|'pathRelationStatus'|'pathRelationForward'|'pathRelationReverse'|'flowInputHandle'|'flowOutputHandle'|'flowStatusWithDuration'|'flowStatusWithDetail'|'flowSourceRevealSourceNode'|'flowSourceRevealTargetNode'|'flowSourceRecordMatches'|'neighborListLabel'|'neighborRowLabel'|'neighborDirectionIn'|'neighborDirectionOut'|'neighborDirectionBoth'|'neighborExpand'|'neighborListEmpty'|'neighborSourceChoose'|'neighborSourceError'|'neighborSourceSummary'|'neighborGroupHeader'|'flowRunStatusLabel'|'flowRunSummary'|'flowRunStepStatus'|'flowRunStatusCount'|'policySummaryLabel'|'policySummaryLimit'|'policySummaryAllowCount'|'policySummaryDenyCount'|'policySummaryNeedsReviewCount'|'policySummaryStateAllow'|'policySummaryStateDeny'|'policySummaryStateNeedsReview'|'policySummaryCategoryGuardrail'|'policySummaryCategoryPermission'|'policySummaryCategoryPrivacy'|'policySummaryCategoryTool'|'policySummaryDetailLabel'|'evalDatasetLabel'|'evalDatasetAddExample'|'evalDatasetRemoveExample'|'evalDatasetImportLabel'|'evalDatasetSearchLabel'|'evalDatasetTagFilterLabel'|'evalDatasetEmpty'|'evalDatasetNoMatches'|'evalDatasetColumnInput'|'evalDatasetColumnExpectedOutput'|'evalDatasetColumnTags'|'queryBuilderLabel'|'queryBuilderEmpty'|'queryBuilderNoFields'|'queryBuilderAddCondition'|'queryBuilderRemoveCondition'|'queryBuilderRowControlName'|'queryBuilderFieldLabel'|'queryBuilderFieldPlaceholder'|'queryBuilderOperatorLabel'|'queryBuilderOperatorPlaceholder'|'queryBuilderValueLabel'|'queryBuilderValuePlaceholder'|'queryBuilderCombinatorLabel'|'queryBuilderCombinatorAnd'|'queryBuilderCombinatorOr'|'queryBuilderConditionAdded'|'queryBuilderConditionRemoved'|'queryBuilderConditionInvalid'|'queryBuilderBooleanTrue'|'queryBuilderBooleanFalse'|'queryBuilderOperatorEquals'|'queryBuilderOperatorNotEquals'|'queryBuilderOperatorGreaterThan'|'queryBuilderOperatorGreaterThanOrEqual'|'queryBuilderOperatorLessThan'|'queryBuilderOperatorLessThanOrEqual'|'queryBuilderOperatorAfter'|'queryBuilderOperatorOnOrAfter'|'queryBuilderOperatorBefore'|'queryBuilderOperatorOnOrBefore'|'queryBuilderOperatorContains'|'queryBuilderOperatorStartsWith'|'queryBuilderOperatorEndsWith'|'queryBuilderOperatorIn'|'queryBuilderOperatorNotIn'|'queryBuilderOperatorIsEmpty'|'queryBuilderOperatorIsNotEmpty'|'memoryPanelLabel'|'memoryPanelShortTermHeading'|'memoryPanelLongTermHeading'|'memoryPanelAdd'|'memoryPanelAddWithContext'|'memoryPanelAddPosition'|'memoryPanelForgetAll'|'memoryPanelConfirmAddHeading'|'memoryPanelConfirmRemoveHeading'|'memoryPanelConfirmForgetHeading'|'memoryPanelConfirmForgetBody'|'memoryPanelItemsLimit'|'graphExplorerLabel'|'graphExplorerAllTypesHidden'|'graphExplorerClearTypes'|'graphExplorerSearchPlaceholder'|'graphExplorerSearchResultsLabel'|'graphExplorerPin'|'graphExplorerUnpin'|'graphExplorerPinned'|'graphExplorerUnpinned'|'graphExplorerPinnedHeading'|'graphExplorerFindPath'|'retrievalModeVector'|'retrievalModeKeyword'|'retrievalModeHybrid'|'retrievalSearchLabel'|'retrievalModeLabel'|'retrievalFiltersLabel'|'groundingSummaryLabel'|'groundingSummaryEmpty'|'groundingSummarySupportedLabel'|'groundingSummaryUnsupportedLabel'|'groundingSummaryCoverageLabel'|'groundingSummaryConfidenceLabel'|'groundingSummaryWarningsHeading'|'groundingSummaryEvidenceHeading'|'groundingSummaryCitationsLimit'|'claimEvidenceLabel'|'claimEvidenceEmpty'|'claimEvidenceSupported'|'claimEvidencePartiallySupported'|'claimEvidenceUnsupported'|'claimEvidenceContradicted'|'claimEvidenceConfidence'|'claimEvidenceClaimsLimit'|'retrievalCompareLabel'|'retrievalCompareEmpty'|'retrievalCompareInputLimit'|'retrievalCompareResultLimit'|'retrievalCompareOverlap'|'retrievalCompareRank'|'retrievalCompareDenseScore'|'retrievalCompareSparseScore'|'retrievalCompareRerankScore'|'retrievalCompareFinalScore'|'ragEvalDashboardLabel'|'ragEvalDashboardEmpty'|'ragEvalDashboardInputLimit'|'ragEvalDashboardSlicesLimit'|'ragEvalDashboardRuns'|'ragEvalDashboardSlices'|'ragEvalDashboardAllSlices'|'ragEvalDashboardSliceUnavailable'|'ragEvalDashboardRunsLimit'|'ragEvalDashboardMetricUnavailable'|'promptStudioLabel'|'promptStudioLargeWorkspace'|'promptStudioMessages'|'promptStudioVariables'|'promptStudioVersions'|'promptStudioPreview'|'promptStudioPreviewLimit'|'promptStudioRun'|'promptStudioSave'|'promptStudioAddMessage'|'promptStudioRemoveMessage'|'promptStudioRemoveMessageNumbered'|'promptStudioMessageRole'|'promptStudioMessageContent'|'promptStudioMoveMessageUp'|'promptStudioMoveMessageDown'|'promptStudioRoleSystem'|'promptStudioRoleUser'|'promptStudioRoleAssistant'|'promptStudioRoleTool'|'schemaViewerLabel'|'schemaViewerEmpty'|'schemaViewerRequired'|'schemaViewerCircular'|'schemaViewerType'|'subagentPanelLabel'|'subagentPanelEmpty'|'subagentPanelRetry'|'subagentPanelCancelRun'|'subagentPanelRetryRun'|'toolTimelineDetailsFor'|'toolCallBlockHeaderPending'|'toolCallBlockHeaderRunning'|'toolCallBlockHeaderSuccess'|'toolCallBlockHeaderError'|'toolCallBlockHeaderDenied'|'toolCallBlockHeaderIncomplete'|'toolCallBlockArgumentsLabel'|'toolCallBlockResultLabel'|'toolCallBlockErrorLabel'|'realtimeSessionLabel'|'realtimeSessionDisconnected'|'realtimeSessionConnecting'|'realtimeSessionConnected'|'realtimeSessionReconnecting'|'realtimeSessionError'|'realtimeSessionConnect'|'realtimeSessionDisconnect'|'realtimeSessionMute'|'realtimeSessionUnmute'|'realtimeSessionInterrupt'|'realtimeSessionConnectionFailed'|'contextInspectorRedacted'|'contextInspectorTruncated'|'contextInspectorLabel'|'contextInspectorEmpty'|'contextInspectorCopyLabel'|'knowledgeBaseSyncIdle'|'knowledgeBaseSyncSyncing'|'knowledgeBaseSyncPaused'|'knowledgeBaseSyncSynced'|'knowledgeBaseSyncError'|'knowledgeBaseHealthHealthy'|'knowledgeBaseHealthDegraded'|'knowledgeBaseHealthFailed'|'knowledgeBaseHealthUnknown'|'knowledgeBasePermissionOwner'|'knowledgeBasePermissionEditor'|'knowledgeBasePermissionViewer'|'knowledgeBasePermissionRestricted'|'knowledgeBaseNeverSynced'|'knowledgeBaseSyncAction'|'knowledgeBasePauseAction'|'knowledgeBaseDeleteAction'|'knowledgeBaseNameColumn'|'knowledgeBaseSyncColumn'|'knowledgeBaseHealthColumn'|'knowledgeBasePermissionColumn'|'knowledgeBaseActionsColumn'|'knowledgeBaseTotalSources'|'knowledgeBaseSyncedSources'|'knowledgeBaseSyncingSources'|'knowledgeBaseNeedsAttention'|'knowledgeBaseHeading'|'knowledgeBaseCreateSource'|'knowledgeBaseEmptyHeading'|'ingestionStageQueued'|'ingestionStageUploading'|'ingestionStageExtracting'|'ingestionStageChunking'|'ingestionStageEmbedding'|'ingestionStageIndexing'|'ingestionStageDone'|'ingestionStageFailed'|'ingestionStageCancelled'|'ingestionStageUnknown'|'ingestionQueueLabel'|'ingestionQueueEmpty'|'ingestionActionWithContext'|'ingestionQueueActionLimit'|'documentLibraryFreshnessFresh'|'documentLibraryFreshnessAging'|'documentLibraryFreshnessStale'|'documentLibrarySelectAll'|'documentLibrarySelectColumn'|'documentLibraryTypeColumn'|'documentLibraryNameColumn'|'documentLibraryVersionColumn'|'documentLibraryOwnerColumn'|'documentLibraryOmitted'|'documentLibraryTagsColumn'|'documentLibraryFreshnessColumn'|'documentLibraryUpdatedColumn'|'documentLibraryLabel'|'documentLibraryEmptyHeading'|'documentLibraryNoMatchesHeading'|'documentLibrarySearchPlaceholder'|'documentLibraryFilterByTag'|'documentLibraryClearSelection'|'documentLibrarySelectedCount'|'documentLibraryCursorNavigation'|'documentLibraryCursorRestart'|'documentLibraryCursorEnd'|'documentLibraryCursorEmptyBatch'|'documentLibraryCursorHistoryLimit'|'documentLibraryCursorFailed'|'documentCompareNoVersion'|'documentCompareLabel'|'agentRunCurrentStepLabel'|'graphQueryHopRangeInvalid'|'graphQueryRelationshipTypeLabel'|'graphQueryNodeTypeLabel'|'graphQueryBuilderLabel'|'graphQueryStartLabel'|'graphQueryEndLabel'|'graphQueryMinHopsLabel'|'graphQueryMaxHopsLabel'|'graphQueryDirectionLabel'|'graphQueryRun'|'graphQuerySavedQueriesLabel'|'graphQuerySaveNameLabel'|'graphQuerySaveButton'|'graphQueryLoadWithContext'|'filterBarReset'|'filterBarActiveFilters'|'drilldownDocuments'|'drilldownRuns'|'drilldownEmpty'|'drilldownUntitledNode'|'evaluationRunGroundingHeading'|'evaluationRunToolTraceHeading'|'evaluationRunInputHeading'|'evaluationRunOutputHeading'|'evaluationRunLabel'|'evaluationRunProgressLabel'|'retrievalFilterChipLabel'|'retrievalSearchEmptyDescription'|'groundingSummaryEvidenceSpan'|'contextInspectorTruncatedCount'|'contextInspectorSegmentTokens'|'contextInspectorLimit'|'knowledgeBaseDocumentCount'|'knowledgeBaseRowActionsLabel'|'knowledgeBaseEmptyDescription'|'ingestionChunkCount'|'ingestionItemProgressLabel'|'ingestionEmbeddedOfTotal'|'ingestionAttemptCount'|'ingestionRetryWithContext'|'ingestionCancelWithContext'|'documentLibrarySelectDocument'|'agentRunStatusAnnounce'|'graphQueryDeleteWithContext'|'evaluationRunExampleLabel'|'evaluationRunExampleLimit'|'evaluationRunExampleStartedAnnounce'|'evaluationRunExampleCompletedAnnounce'|'evaluationRunExampleFailedAnnounce'|'evaluationRunExampleCancelledAnnounce'|'evaluationRunExampleWaitingInputAnnounce'|'evaluationRunExampleWaitingApprovalAnnounce'|'evaluationRunProgressSummary'|'evaluationRunRunningCount'|'evaluationRunFailedCount'|'evaluationRunDetailsLoadError'|'retrievalStageQueryRewrite'|'retrievalStageEmbed'|'retrievalStageRetrieve'|'retrievalStageRerank'|'retrievalStageFilter'|'statusUnknown'|'statRowsInputLimit'|'retrievalStageKindUnknown'|'retrievalShowMoreWithContext'|'retrievalShowLessWithContext'|'valueTruncated'|'retrievalTraceEvidenceToggle'|'documentCompareOldVersion'|'documentCompareNewVersion'|'agentRunStatusIdle'|'agentRunStatusQueued'|'agentRunStatusCollecting'|'agentRunStatusWaitingInput'|'agentRunStatusWaitingApproval'|'agentRunStatusDone'|'agentRunStatusCancelled'|'localePickerLabel'|'localePickerRequired'|'localePickerSearchLabel'|'localePickerEmpty'|'currencyPickerLabel'|'countryPickerLabel'|'timeZonePickerLabel'|'unitPickerLabel'|'flagLoadError'|'moveUp'|'moveDown'|'reorderMovePending'|'reorderMoveCancelled'|'reorderItemMoved'|'signaturePad'|'signaturePadLabel'|'signaturePadInstructions'|'signaturePadEmpty'|'signaturePadSigned'|'signaturePadPenDown'|'signaturePadPenUp'|'signaturePadDrawingLimit'|'mentionMoreResults'|'commandPaletteResultCount'|'dataGridRowLimit'|'dataGridToggleRow'|'dataGridFilterColumn'|'dataGridSelectPage'|'tableRowLimit'|'tableAdditionalColumns'|'tabCloseAction'|'treeLimit'|'treeSourceError'|'treeSourceSummary'|'treeDefaultLabel'|'graphNodeLimit'|'graphEdgeLimit'|'graphExplorerSearchLimit'|'streamStatusIdle'|'streamStatusConnecting'|'streamStatusStalled'|'stepperStateCompleted'|'stepperStateError'|'stepperStatePending'|'stepperStateLocked'|'stepperStateLoading'|'stepperStateDisabled'|'stepperSteps'|'stepperStepPosition'|'generationStatusTokens'|'funnelComparisonShare'|'funnelDropoffIncreased'|'funnelDropoffDecreased'|'retrievalResultsSelectRowOrdinal'|'retrievalResultsSelectionLimit'|'chunkInspectorOpenOrdinal'|'ragAnswerEmpty'|'retrievalTraceEmpty'|'retrievalTraceLabel'|'sourcePickerMatches'|'sourcePickerLimit'|'provenancePanelLimit'|'commitCardFilesLimit'|'taskListLimit'|'evalDatasetLimit'|'mapMarker'|'mapToggleAttribution'|'mapFeedback'|'threadListInputLimit'|'commandPaletteInputLimit'|'promptInputInputLimit'|'sourceSearchUnavailable'|'sourceSelectionLoading'|'sourceSelectionFailed'|'documentLibrarySelectPage'|'chartInputLimit'|'chartTableSource'|'chartTableTarget'|'chartTableValue'|'chartTableName'|'chartTotalsCaption'|'chartValuesTooSmall'|'chordPairLabel'|'sankeyCycle'|'treemapTileLabel'|'choroplethInvalidGeometry'|'histogramInputLimit'|'calendarInputLimit'|'heatmapInputLimit'|'activityFeedInputLimit'|'catalogPickerInputLimit'|'catalogPickerSearchLoadFailed'|'localePickerInputLimit'|'emojiPickerInputLimit'|'mentionInputLimit'|'transcriptFeedInputLimit'|'transcriptFeedWindowNotice'|'transcriptFeedRegion'|'spanWaterfallLimit'|'toolTimelineInputLimit'|'retrievalResultsInputLimit'|'ingestionQueueInputLimit'|'tagFacetLimit'|'codeBlockHighlightLimit'|'codeBlockHighlightedLine'|'codeBlockActiveLine'|'codeBlockToggle'|'diffViewHighlightLimit'|'diffViewLabel'|'engine3dLoading'|'engine3dUnavailable'|'engine3dUnsupported'|'engine3dContextLost'|'engine3dError'|'engine3dSoftwareRendering'|'engine3dShowingBuiltin'|'engine3dShowingList'|'modelViewerLabel'|'modelViewerAlternative'|'modelViewerInstructions'|'modelViewerReady'|'modelViewerEmpty'|'modelViewerProgress'|'modelViewerInvalid'|'modelViewerUnsupportedFormat'|'modelViewerFit'|'modelViewerRotateLeft'|'modelViewerRotateRight'|'modelViewerRotateUp'|'modelViewerRotateDown'|'modelViewerViewport'|'largeDataInvalid'|'largeDataLimit'|'mapGeolocateFindLocation'|'mapGeolocateUnavailable'|'mapGeolocatePermissionDenied'|'mapGeolocatePositionUnavailable'|'mapGeolocateTimeout'|'mapGeolocateError'|'mapGeolocateOutOfBounds'|'mapHashConflict'|'mapHashInvalid'|'mapControlUnavailable'|'mapGlobe'|'mapTerrain'|'mapScaleFeet'|'mapScaleMeters'|'mapScaleKilometers'|'mapScaleMiles'|'mapScaleNauticalMiles'|'mapFeatureStateUnavailable'|'mapPickAtCenter'|'mapCancelPick'|'mapDrawingControls'|'mapDrawAtCenter'|'mapUndoDrawing'|'mapCompleteDrawing'|'mapCancelDrawing'|'mapDrawingVertices'|'mapDrawingUnavailable'|'mapDrawingInvalidCoordinate'|'mapDrawingDuplicateVertex'|'mapDrawingVertexLimit'|'mapDrawingTooFewVertices'|'mapDrawingInvalidGeometry'|'mapExportUnavailable'|'mapDrawingVertex'|'mapDrawingEditInstructions'|'panoramaInstructions'|'panoramaHotspotsLabel'|'mapActivate'|'mapDrawingLength'|'mapDrawingArea'|'mapSquareMeters'|'mapSquareKilometers'|'chart3dLabel'|'chart3dEmpty'|'chart3dRow'|'chart3dInstructions'|'chart3dFit'|'chart3dName'|'chart3dSize'|'chart3dCategory'|'chart3dXAxis'|'chart3dYAxis'|'chart3dZAxis'|'stylePanelLabel'|'stylePanelMode'|'stylePanelModeLight'|'stylePanelModeDark'|'stylePanelModeSystem'|'stylePanelLook'|'stylePanelSurface'|'stylePanelSurfaceSolid'|'stylePanelSurfaceGlass'|'stylePanelSurfaceOpacity'|'stylePanelDensity'|'stylePanelDensityCompact'|'stylePanelDensityComfortable'|'stylePanelDensityTouch'|'stylePanelAccent'|'stylePanelReset'|'styleAccentEmerald'|'styleAccentPeridot'|'styleAccentTopaz'|'styleAccentRuby'|'styleAccentTourmaline'|'styleAccentAmethyst'|'styleAccentAquamarine'|'styleAccentSapphire'|'styleAccentHematite'|'styleLookShadcn'|'styleLookLyra'|'styleLookMaterial'|'styleLookData'|'styleLookTerminal'|'styleLookHighContrast';
29
+ export type LyraMessageKey='connectorManagerLabel'|'connectorManagerEmpty'|'connectorManagerLimit'|'connectorManagerKindMcp'|'connectorManagerKindConnector'|'connectorManagerStatusDisconnected'|'connectorManagerStatusConnecting'|'connectorManagerStatusConnected'|'connectorManagerConnect'|'connectorManagerDisconnect'|'connectorManagerConnectFor'|'connectorManagerDisconnectFor'|'connectorManagerRetryFor'|'connectorManagerStatusChanged'|'backgroundRunsLabel'|'backgroundRunsEmpty'|'backgroundRunsLimit'|'backgroundRunsStatusCompleted'|'backgroundRunsStatusFailed'|'backgroundRunsOpenFor'|'backgroundRunsCancelFor'|'researchProgressLabel'|'researchProgressEmpty'|'researchProgressLimit'|'researchProgressStatusPending'|'researchProgressStatusRunning'|'researchProgressStatusCompleted'|'researchProgressStatusFailed'|'researchProgressSources'|'budgetMeterLabel'|'budgetMeterUnavailable'|'budgetMeterExceeded'|'budgetMeterValue'|'budgetMeterPercent'|'toolParamMinLength'|'toolParamMaxLength'|'toolParamMinimum'|'toolParamMaximum'|'toolParamFormat'|'toolParamMinItems'|'toolParamMaxItems'|'toolParamInvalidConstraint'|'toolParamInvalidSelection'|'permissionRulesLabel'|'permissionRulesEmpty'|'permissionRulesLimit'|'permissionRulesDecisionFor'|'permissionRulesScope'|'permissionRulesAllow'|'permissionRulesAsk'|'permissionGrantLabel'|'permissionGrantScopeLabel'|'permissionGrantAllowOnce'|'permissionGrantAllowSession'|'agentQuestionUnsupported'|'changeReviewLabel'|'changeReviewEmpty'|'changeReviewKeep'|'changeReviewKeepHunk'|'changeReviewDiscard'|'changeReviewPending'|'changeReviewKept'|'changeReviewDiscarded'|'changeReviewDiscardHunk'|'changeReviewHunk'|'changeReviewHunkInFile'|'changeReviewLimit'|'agentQuestionLabel'|'agentQuestionAccept'|'agentQuestionDecline'|'agentQuestionSubmitted'|'agentQuestionFormLoadFailed'|'streamInterrupted'|'streamResume'|'genViewEmpty'|'genViewInvalid'|'genViewLoading'|'genViewLoadFailed'|'genViewInvalidState'|'genViewActionDenied'|'genViewConfirmationRequired'|'noData'|'graphDataListLimit'|'graphLegendLabel'|'legendTypeShown'|'legendTypeHidden'|'entityChipWithType'|'jumpToLatest'|'terminalLabel'|'terminalDownload'|'terminalHighlightLine'|'terminalOutputTruncated'|'schemaViewerIssueLimit'|'schemaViewerIssueError'|'schemaViewerIssueWarning'|'schemaViewerIssueInfo'|'toolParamMissingProperty'|'toolParamBooleanUnset'|'toolParamBooleanTrue'|'toolParamBooleanFalse'|'toolParamSchemaLimit'|'testResultsLimit'|'toolTimelineLimit'|'toolTimelineLoadError'|'toolSelectLimit'|'sequenceStripEmpty'|'sequenceStripSourceError'|'sequenceStripSourceItemUnavailable'|'sequenceStripSourceItemLabel'|'sequenceStripSourceRangeDetails'|'sequenceStripSourceKeyboardHelp'|'sequenceStripCategoryCount'|'sequenceStripCellKeyboardHelp'|'sequenceStripUnnamedCategory'|'sequenceStripBucketLabel'|'sequenceStripBucketSummary'|'sequenceStripItemCount'|'sequenceStripRangeCount'|'noColumns'|'dataGridColumnMenu'|'dataGridPinStart'|'dataGridPinEnd'|'dataGridUnpin'|'dataGridRowsPerPage'|'dataGridTreeLimitReached'|'loadMore'|'viewerSearchMatchCount'|'viewerSearchNoMatches'|'viewerSearchActiveMatch'|'viewerHighlightLabel'|'tableRowTotal'|'tableFilterLabel'|'tableFilterPlaceholder'|'tableLoading'|'tableLoadingMore'|'tableLoadFailed'|'tableEditCell'|'tableEditCellInRow'|'carousel'|'carouselLabel'|'carouselSlide'|'carouselSlidePosition'|'carouselSlideAnnouncement'|'carouselSlideAnnouncementSeparator'|'carouselIndicators'|'carouselGoTo'|'carouselPauseRotation'|'carouselResumeRotation'|'carouselViewport'|'imageComparerLabel'|'zoomableFrameLabel'|'zoomControls'|'zoomOut'|'zoomIn'|'lightboxLabel'|'lightboxImagePosition'|'scrollerLabel'|'chatViewportLabel'|'newMessagesCount'|'newMessages'|'scrollPrevious'|'scrollNext'|'showAllColumns'|'dataGridColumns'|'showFewerColumns'|'clear'|'openCalendar'|'open'|'close'|'toggleNavigation'|'resizeNavigation'|'appRailPin'|'appRailItemToggle'|'appRailGroupToggle'|'resizeColumn'|'resizeValuePixels'|'resizeValuePercent'|'copy'|'copyJson'|'copied'|'expand'|'collapse'|'toggleMessage'|'messageActionsLabel'|'regenerateResponse'|'editMessage'|'showMore'|'showMoreCount'|'showLess'|'retry'|'remove'|'removeWithContext'|'playWithContext'|'pauseWithContext'|'loading'|'loadingDocument'|'calendarPreviousMonth'|'calendarNextMonth'|'noMatches'|'previous'|'next'|'paginationLabel'|'paginationPage'|'paginationJumpToPage'|'paginationPageSize'|'paginationPageSizeOption'|'paginationInvalidPage'|'paginationInvalidPageUnknownTotal'|'branchPickerLabel'|'branchPrevious'|'branchNext'|'branchPosition'|'paginationSummary'|'paginationEmptySummary'|'paginationApplied'|'paginationAppliedUnknownTotal'|'cancel'|'confirm'|'search'|'circularReference'|'items'|'item'|'trendOf'|'wordCloud'|'wordCloudWordLimit'|'wordCloudLegend'|'wordCloudWordAnnouncement'|'wordCloudPreparedSummary'|'wordCloudPreparedUnavailable'|'avPlayerWaveformUnavailable'|'avPlayerTranscriptUnavailable'|'histogramDistributionSummary'|'histogramDistributionRange'|'graphSourceRecords'|'graphSourceNodes'|'graphSourceEdges'|'graphSourceAllRecords'|'graphSourceIncidentEdges'|'graphSourceDirection'|'graphSourceBothDirections'|'graphSourceTotals'|'graphSourceCoverageComplete'|'graphSourceCoverageNeighborhood'|'graphSourceCoverageAggregate'|'graphSourceNodeCount'|'graphSourceEdgeCount'|'graphSourceShownNodes'|'graphSourceShownEdges'|'graphSourceRecordsError'|'graphSourceSceneError'|'graphSourceRecordMissing'|'heatmapSourceError'|'heatmapSourceSummary'|'heatmapSourceRangeLabel'|'heatmapSourceExactWindow'|'heatmapSourceKeyboardHelp'|'heatmapSourceMean'|'heatmapSourceMin'|'heatmapSourceMax'|'testResultsInputTooLarge'|'embeddingExplorerSpatialBounds'|'embeddingExplorerSpatialSummary'|'embeddingExplorerSpatialBin'|'embeddingExplorerSpatialError'|'embeddingExplorerSpatialLoading'|'comboboxLoadError'|'comboboxRichContentUnavailable'|'comboboxSelectedOverflow'|'promptQueueItemLabel'|'promptQueueActionLabel'|'notInCatalog'|'sendMessage'|'stopGenerating'|'dropzoneReleaseToAdd'|'dropzoneRejectedType'|'chartCategory'|'chartTotal'|'chartAxisTotal'|'chartPrimaryAxis'|'chartSecondaryAxis'|'chartPointLabel'|'chartPointCoordinates'|'chartBubblePointCoordinates'|'chartBandRange'|'chartLabeledPoint'|'chartLegend'|'resetZoom'|'chatSending'|'chatResponding'|'chatFailedToSend'|'chatFailedAnnounce'|'chatCompleteAnnounce'|'showMoreCollapsed'|'showMoreOverflowLabel'|'countAtLeast'|'copyCode'|'copyCodeIndexed'|'copiedToClipboard'|'codeRegion'|'codeRegionIndexed'|'codeRegionWithLanguage'|'codeRegionWithLanguageIndexed'|'markdownTableRegion'|'markdownTableRegionIndexed'|'codeBlockLineLabel'|'copyDiff'|'diffViewOldLabel'|'diffViewNewLabel'|'diffViewHiddenLines'|'diffViewTooLarge'|'jsonArray'|'jsonObject'|'jsonValue'|'jsonCopyLabel'|'jsonToggleLabel'|'jsonItemCount'|'jsonKeyCount'|'jsonViewerLimit'|'jsonViewerLabel'|'untitledSource'|'sourcePageSuffix'|'toolCall'|'statusPending'|'statusRunning'|'statusSuccess'|'statusError'|'statusDenied'|'statusIncomplete'|'maximize'|'restore'|'promptStudioVariableName'|'promptStudioVariableValue'|'schemaViewerLimit'|'subagentPanelLimit'|'pollPause'|'pollResume'|'pollRefresh'|'pollInactive'|'pollRefreshing'|'pollPaused'|'pollPausedAnnounce'|'pollResumedAnnounce'|'pollRefreshingAnnounce'|'randomContentPause'|'randomContentResume'|'randomContentNext'|'attachmentAdd'|'attachmentTriggerFiles'|'attachmentTriggerImage'|'attachmentTriggerCamera'|'attachmentMenuFiles'|'attachmentMenuImage'|'attachmentMenuCamera'|'checkboxRequired'|'checkboxGroupRequired'|'tokenInputRequired'|'tokenInputTooFew'|'tokenInputTooMany'|'tokenInputEditWithContext'|'tokenInputLabel'|'commandPaletteLabel'|'commandPalettePlaceholder'|'commandPaletteEmpty'|'commandPaletteResults'|'iconButtonLabel'|'codeEditorLabel'|'calendarLabel'|'calendarEmpty'|'calendarEventsOverflow'|'switchRequired'|'citationHighConfidence'|'citationMediumConfidence'|'citationLowConfidence'|'citationVerified'|'citationUnverified'|'contextMeterUsed'|'contextMeterUsedOfTotal'|'contextMeterSegmentLabel'|'contextMeterInputLimit'|'gaugeLabel'|'gaugeValueLabel'|'untitledConversation'|'panelToggle'|'dockPanelResize'|'documentPreviewAlt'|'documentPreviewUrlNotAllowed'|'documentPreviewFailedToLoad'|'documentPreviewResourceTooLarge'|'documentPreviewGenericError'|'ebookViewerLoadError'|'ebookViewerLocationChanged'|'ebookViewerMissingLibrary'|'ebookViewerRegionLabel'|'ebookViewerPreviousChapter'|'ebookViewerNextChapter'|'ebookViewerShowingChapter'|'fileTypeFile'|'fileTypePdf'|'fileTypeWord'|'fileTypeSpreadsheet'|'fileTypePresentation'|'fileTypeText'|'fileTypeCode'|'fileTypeArchive'|'fileTypeImage'|'fileTypeAudio'|'fileTypeVideo'|'fileTypeWithSize'|'pptxViewerLabel'|'pptxViewerFidelityNotice'|'pptxViewerRenderError'|'pptxViewerMissingLibrary'|'pptxViewerPreviousSlide'|'pptxViewerNextSlide'|'pptxViewerSlideOf'|'documentViewerLabel'|'attachmentPreviewName'|'attachmentPreviewFile'|'documentViewerMissingSanitizer'|'docxViewerLabel'|'docxViewerMissingConverter'|'svgViewerLabel'|'htmlViewerLabel'|'datasetViewerLabel'|'datasetViewerMissingParser'|'datasetViewerEmpty'|'datasetViewerCaption'|'datasetViewerCaptionNamed'|'contactViewerLabel'|'contactViewerNoContacts'|'contactViewerUnnamedContact'|'contactViewerPhoneLabel'|'contactViewerEmailLabel'|'contactViewerAddressLabel'|'contactViewerOrganization'|'contactViewerTypedValue'|'contactViewerAddressFormat'|'contactViewerTypeHome'|'contactViewerTypeWork'|'contactViewerTypeCell'|'contactViewerTypeVoice'|'contactViewerTypeFax'|'contactViewerTypeInternet'|'contactViewerTypePreferred'|'exportButtonLabel'|'generationStatusElapsedSeconds'|'generationStatusThroughput'|'graphDataList'|'graphSpatialControls'|'graphView3d'|'graphViewList'|'graphFit'|'graphOrbitLeft'|'graphOrbitRight'|'graphOrbitUp'|'graphOrbitDown'|'graphSpatialInstructions'|'graphSpatialUnavailable'|'graphCustomNodesError'|'graphCustomNodesUnavailable'|'graphGlowUnavailable'|'graphSpatialPage'|'graphItemAnnouncement'|'navigation'|'attachmentRetryWithContext'|'attachmentUploadingWithContext'|'attachmentUploadingProgress'|'attachmentUploadingIndeterminate'|'attachmentUploadFailed'|'attachmentUntitledFile'|'chartTrendIncreasing'|'chartTrendDecreasing'|'chartTrendFlat'|'chartSummary'|'chartSeriesNoData'|'chartSummaryWithData'|'chartSummaryEmpty'|'chartSummarySeparator'|'chartData'|'chartRenderUnavailable'|'chartPreparedSummary'|'chartPreparedUnavailable'|'chartPreparedSummaryZoom'|'chartSpatialSummary'|'chartSpatialRadiusDomain'|'chartSpatialDensityLegend'|'chartSpatialPoint'|'chartSpatialBin'|'chartSpatialHidden'|'chartDataSampled'|'chartPlotSampled'|'chartZoomUnavailable'|'chartDataLabelsUnavailable'|'chartStackTotalsUnavailable'|'chartAnnotationsUnavailable'|'chart'|'chartTypeLine'|'chartTypeBar'|'chartTypeScatter'|'chartTypePie'|'chartTypeDoughnut'|'chartTypeRadar'|'chartTypePolarArea'|'chartTypeBubble'|'boxPlotSeriesSummary'|'boxPlotSummaryWithData'|'boxPlotSummaryEmpty'|'boxPlotData'|'chartSeriesLabel'|'boxPlotMin'|'boxPlotQ1'|'boxPlotMedian'|'boxPlotQ3'|'boxPlotMax'|'boxPlot'|'histogramFrequency'|'liteChartMarkSummary'|'liteChartBarLabel'|'chartValueLabel'|'chartValuePercentageLabel'|'liteChartCustomMarkSummary'|'composerLabel'|'composerPlaceholder'|'textareaLabel'|'citation'|'citationWithStatus'|'citationWithCustomLabel'|'comboboxOverflow'|'comboboxRequired'|'comboboxCreate'|'comboboxLabel'|'rename'|'previousMonth'|'nextMonth'|'chooseDate'|'date'|'dateInputMinMessage'|'dateInputMaxMessage'|'dateInputPastDisabled'|'dateInputFutureDisabled'|'dateInputInvalid'|'timeInputLabel'|'timeInputHour'|'timeInputMinute'|'timeInputSecond'|'timeInputDayPeriod'|'timeInputEmptySegment'|'timeInputOpen'|'timeInputPopup'|'timeInputNow'|'timeInputInvalid'|'timeInputMinMessage'|'timeInputMaxMessage'|'timeInputRangeMessage'|'timeInputStepMessage'|'documentPreviewEmpty'|'convertingDocument'|'conversationActionWithTitle'|'documentPreviewNotAvailable'|'documentPreviewGenericFile'|'documentPreviewTypeDocument'|'documentPreviewTypeImage'|'documentPreviewTypeEmail'|'documentPreviewTypeCalendar'|'archiveViewerEmpty'|'archiveViewerFolder'|'archiveViewerFile'|'documentPreviewTypeDataset'|'documentPreviewTypeContact'|'download'|'exportFormatMenuLabel'|'exportFailed'|'fileInputDefaultLabel'|'fileInputAccepted'|'fileInputRejected'|'fileInputFolderRejected'|'fileInputRejectedType'|'fileInputRejectedSize'|'fileInputRejectedCount'|'fileInputRejectedRead'|'fileInputRejectedLimit'|'fileInputRejectedMaxFiles'|'fileInputRejectedMaxTotalSize'|'fileInputRejectionsMore'|'elapsedMinutesSecondsTemplate'|'graphNode'|'graphLink'|'graphDiagram'|'graphTypedNode'|'graphExpandableItem'|'graphNodeFocused'|'graphSelectionCount'|'graphNodesHidden'|'graphCommunity'|'heatmapValueLabel'|'heatmapMatrixCellLabel'|'heatmapCalendarLabel'|'heatmapMatrixLabel'|'heatmapCalendarCellLabel'|'heatmapNoDataValue'|'heatmapDefaultRowLabel'|'heatmapDefaultColLabel'|'heatmapSelectedCellLabel'|'heatmapSelectedCount'|'mapResetNorth'|'heatmapProjectionLimit'|'heatmapDecorationLimit'|'funnelStagesLimit'|'funnelStagesInputLimit'|'inputLabel'|'showPassword'|'hidePassword'|'radioRequired'|'progress'|'responsivePanel'|'popover'|'details'|'breadcrumb'|'timeline'|'timelineClusterCount'|'timelineItemVariantWarning'|'timelineItemVariantBrand'|'rating'|'sliderLabel'|'feedbackPositive'|'feedbackNegative'|'feedbackReasonsLabel'|'feedbackCommentLabel'|'feedbackCommentPlaceholder'|'feedbackSubmit'|'feedbackSubmitted'|'feedbackCommentTooLong'|'feedbackSingleReasonDescription'|'colorPicker'|'mediaCardUntitledFile'|'mediaCardOpenName'|'mediaCardOpenImageAttachment'|'mediaCardOpenVideoAttachment'|'mediaCardOpenFileAttachment'|'mediaCardImageAttachment'|'mediaCardVideoAttachment'|'animatedImageDefaultAlt'|'mentionSuggestions'|'mentionResultCount'|'mentionResultPosition'|'suggestionsLabel'|'map'|'model'|'selectModel'|'modelSelectNoModels'|'modelSelectRequired'|'temperature'|'play'|'playbackPosition'|'playbackStepPosition'|'videoPlayerLabel'|'videoMute'|'videoUnmute'|'videoVolume'|'videoCaptions'|'videoCaptionsOff'|'videoPictureInPicture'|'videoExitPictureInPicture'|'videoEnterFullscreen'|'videoExitFullscreen'|'videoPlaylistLabel'|'videoPlaylistUntitled'|'videoTimeReadout'|'selectValueMissing'|'select'|'sourceListDefaultLabel'|'threadListLabel'|'threadGroupPinned'|'threadGroupToday'|'threadGroupYesterday'|'threadGroupPrevious7Days'|'threadGroupPrevious30Days'|'threadGroupArchived'|'pinConversation'|'unpinConversation'|'archiveConversation'|'unarchiveConversation'|'deleteConversation'|'searchThreads'|'threadListMatchAnnounce'|'threadListEmpty'|'agentWorkspaceLabel'|'agentWorkspaceInputLimit'|'agentWorkspaceConversation'|'agentWorkspaceDetails'|'agentWorkspaceRun'|'agentWorkspaceTools'|'agentWorkspaceRetrieval'|'agentWorkspaceGrounding'|'agentWorkspaceContext'|'agentWorkspaceEmpty'|'ragAnswerLabel'|'ragAnswerCitations'|'ragAnswerSources'|'ragAnswerRetry'|'evaluationDashboardLabel'|'evaluationDashboardRunsLabel'|'evaluationDashboardNoRuns'|'evaluationDashboardMetricUnavailable'|'approvalQueueLabel'|'approvalQueueLimit'|'approvalQueueEmpty'|'approvalQueueOpen'|'approvalQueuePendingCount'|'approvalQueuePending'|'embeddingExplorerLabel'|'embeddingExplorerEmpty'|'embeddingExplorerPoint'|'embeddingExplorerPointLimit'|'knowledgeBaseAdminLabel'|'knowledgeBaseAdminInputLimit'|'knowledgeBaseAdminSourcesTab'|'knowledgeBaseAdminIngestionTab'|'resizeDivider'|'trendUnchanged'|'statTrendIncreased'|'statTrendDecreased'|'statTrendGood'|'statTrendBad'|'statTrendAnnouncement'|'streamStalled'|'streamStallAnnounce'|'streamRecoverAnnounce'|'streamStallClearedAnnounce'|'thinkingPanelLabel'|'messagePartsLabel'|'messagePartsWindowNotice'|'messagePartError'|'messagePartRetry'|'promptQueueLabel'|'promptQueueEmpty'|'promptQueueInputLimit'|'promptQueueAttachmentLimit'|'promptQueueSendNow'|'promptQueueItemRemoved'|'selectionToolbarLabel'|'selectionAsk'|'selectionQuote'|'selectionCite'|'promptInputLabel'|'promptInputControls'|'promptInputCollectionLimit'|'promptInputSources'|'promptInputAttachments'|'promptQueueItemAttachments'|'mcpAppLabel'|'mcpAppUnavailable'|'mcpAppLoading'|'taskListLabel'|'taskListCompletedOfTotal'|'taskListStepStartedAnnounce'|'taskListStepCompletedAnnounce'|'taskListStepFailedAnnounce'|'taskListStepIncompleteAnnounce'|'activityFeedLabel'|'activityFeedCompletedSteps'|'handoffLabel'|'handoffToAgent'|'handoffFromToAgent'|'usageBadgeLabel'|'usageBadgeTokensIn'|'usageBadgeTokensOut'|'usageBadgeTokensInLabel'|'usageBadgeTokensOutLabel'|'usageBadgeTotalTokensLabel'|'usageBadgeCostLabel'|'usageBadgeLatencyLabel'|'checkpointLabel'|'checkpointRestore'|'checkpointRestoreWithContext'|'checkpointRestoring'|'checkpointConfirmPrompt'|'thoughtFor'|'thinking'|'rangeStart'|'rangeEnd'|'calloutAnnouncementWithContext'|'closeWithContext'|'closeWithTruncatedContext'|'toastContentIncomplete'|'toastOverflow'|'toolApprovalHeading'|'toolApprovalGenericTool'|'toolApprovalArgsLabel'|'confirmApproved'|'confirmDenied'|'confirmApprovedAnnounce'|'confirmDeniedAnnounce'|'deny'|'edit'|'approve'|'invalidJson'|'fieldRequired'|'fieldMustBeString'|'fieldMustBeNumber'|'fieldMustBeInteger'|'fieldMustBeBoolean'|'unsupportedFieldType'|'fieldMustBeOneOf'|'fieldMustEqual'|'schemaMustBeObject'|'schemaPropertiesMustBeFlat'|'valueMustBeSerializable'|'valueInvalid'|'matchMismatch'|'phoneInputLabel'|'phoneInputIncomplete'|'otpInputIncomplete'|'otpInputLabel'|'numberInputIncrease'|'numberInputDecrease'|'textareaCharacterCount'|'textareaCharactersRemaining'|'copyFailed'|'colorPickerSaturationBrightness'|'colorPickerSaturationBrightnessValue'|'colorPickerHue'|'colorPickerHueValue'|'colorPickerOpacity'|'colorPickerOpacityValue'|'colorPickerValueField'|'colorPickerToggleFormat'|'colorPickerEyeDropper'|'colorPickerSwatches'|'colorPickerSwatch'|'colorPickerCurrentValue'|'selectSelectedOverflow'|'iconLoadError'|'iconTooLarge'|'iconSanitizerMissing'|'paginationFirstPage'|'paginationLastPage'|'accessibleLabelSeparator'|'durationMilliseconds'|'durationSeconds'|'selectTools'|'searchToolsPlaceholder'|'useDefaultTools'|'toolSelectCustomizeHint'|'noMatchesQuery'|'toolSelectNoneAvailable'|'toolSelectSummary'|'toolCount'|'otherCategory'|'widgetFullscreenPanel'|'widgetViewGroup'|'widgetExitFullscreen'|'widgetExitFullscreenWithLabel'|'widgetExpandToFullscreen'|'widgetExpandToFullscreenWithLabel'|'menuLabel'|'pause'|'kbdEscapeVisual'|'kbdEscapeWord'|'kbdTabWord'|'kbdSpaceWord'|'kbdDeleteVisual'|'kbdDeleteWord'|'kbdHomeWord'|'kbdEndWord'|'kbdPageUpVisual'|'kbdPageUpWord'|'kbdPageDownVisual'|'kbdPageDownWord'|'kbdEnterWord'|'kbdBackspaceWord'|'kbdArrowUpWord'|'kbdArrowDownWord'|'kbdArrowLeftWord'|'kbdArrowRightWord'|'kbdPlusWord'|'kbdMinusWord'|'kbdCommandWord'|'kbdControlVisual'|'kbdControlWord'|'kbdOptionWord'|'kbdAltWord'|'kbdShiftWord'|'kbdShortcutSeparator'|'emailViewerLabel'|'emailViewerMissingParser'|'emailViewerFrom'|'emailViewerTo'|'emailViewerSubject'|'emailViewerDate'|'emailViewerAttachments'|'emailViewerUnnamedAttachment'|'emailViewerNoSubject'|'emailViewerOpenAttachment'|'emailViewerQuotedText'|'emailViewerOpenAttachmentSize'|'emailViewerEmptyBody'|'emailViewerGroupAddress'|'calendarViewerLabel'|'calendarViewerMissingParser'|'calendarViewerEmpty'|'calendarViewerNoSummary'|'pdfViewerLabel'|'pdfViewerMissingLibrary'|'qrCodeMissingLibrary'|'qrCodeGenerationFailed'|'mapMissingLibrary'|'mapStyleRequired'|'mapWebglUnavailable'|'mapInitializationFailed'|'mapLegend'|'mapScene'|'mapCloseWithLabel'|'mapSceneEmpty'|'mapSceneUnavailable'|'mapScenePartial'|'mapSceneInvalid'|'mapSceneLimit'|'mapScenePrevious'|'mapSceneNext'|'mapScenePage'|'mapSceneMarker'|'mapScenePath'|'mapSceneArc'|'mapSceneModel'|'chartMissingLibrary'|'boxPlotMissingLibrary'|'graphMissingLibrary'|'pdfViewerPageOf'|'pdfViewerPageFailed'|'pdfViewerPageHighlights'|'pdfViewerZoomIn'|'pdfViewerZoomOut'|'pdfViewerCurrentZoom'|'pdfViewerPreviousPage'|'pdfViewerNextPage'|'anchorJumped'|'anchorJumpedToPage'|'anchorNotFound'|'highlightLayerLabel'|'highlightWithLabel'|'cellHighlightWithLabel'|'highlightOfTotal'|'pageRailLabel'|'pageRailPage'|'pageRailPageHighlighted'|'spreadsheetViewerUnavailable'|'csvViewerUnavailable'|'csvViewerLabel'|'spreadsheetViewerLabel'|'knownDateDay'|'knownDateMonth'|'knownDateYear'|'skipToContent'|'tourSkip'|'tourDone'|'tourStepOf'|'emojiPickerSearchLabel'|'emojiPickerSearchPlaceholder'|'emojiPickerGridLabel'|'emojiPickerEmpty'|'emojiPickerLoadError'|'emojiPickerPeerMissing'|'emojiPickerGroupSmileysEmotion'|'emojiPickerGroupPeopleBody'|'emojiPickerGroupComponent'|'emojiPickerGroupAnimalsNature'|'emojiPickerGroupFoodDrink'|'emojiPickerGroupTravelPlaces'|'emojiPickerGroupActivities'|'emojiPickerGroupObjects'|'emojiPickerGroupSymbols'|'emojiPickerGroupFlags'|'emojiPickerGroupUnknown'|'pushToTalkRequesting'|'pushToTalkDenied'|'pushToTalkError'|'pushToTalkUnsupported'|'pushToTalkStarted'|'pushToTalkStopped'|'pushToTalkCancelled'|'pushToTalkHold'|'pushToTalkStart'|'pushToTalkStop'|'traceTree'|'traceTreeSpanStatus'|'traceTreeMetricLabel'|'spanProjectionLimit'|'agentTraceFilterLabel'|'spanKindAgent'|'spanKindLlm'|'spanKindTool'|'spanKindRetriever'|'spanKindEmbedding'|'spanKindOther'|'tokensIn'|'tokensOut'|'cost'|'duration'|'spanWaterfall'|'spanStartedAtOffset'|'rubricSubmit'|'rubricSubmitAndNext'|'rubricSkip'|'rubricKeysLimit'|'compareResponseA'|'compareResponseB'|'compareVoteLabel'|'compareVoteBetter'|'compareVoteTie'|'compareVoteBothBad'|'compareVoteRecorded'|'comparePanel'|'audioVisualizerLabel'|'audioVisualizerIdle'|'audioVisualizerListening'|'audioVisualizerThinking'|'audioVisualizerSpeaking'|'treeNodeMoved'|'fileTreeLabel'|'fileTreeDiffSummary'|'gitStatusAdded'|'gitStatusModified'|'gitStatusDeleted'|'gitStatusRenamed'|'gitStatusUntracked'|'gitStatusConflicted'|'gitStatusIgnored'|'imageViewerLabel'|'imageViewerFailedToLoad'|'imageViewerRotate'|'imageViewerFitLabel'|'imageViewerFitContain'|'imageViewerFitWidth'|'imageViewerFitActual'|'imageViewerAnnotate'|'imageViewerHighlightsLabel'|'imageViewerHighlightsLimited'|'imageViewerUnlabeledHighlight'|'imageViewerAnnotationHint'|'imageViewerAnnotationBoxPosition'|'imageViewerAnnotationAdded'|'imageViewerAnnotationCancelled'|'transcriptFeedLabel'|'transcriptFeedEmpty'|'transcriptFeedInterim'|'commitCardLabel'|'commitCardCopyHash'|'commitCardDiffSummary'|'commitCardChangedFiles'|'stackTraceLabel'|'stackTraceLimit'|'stackTraceInternalFrames'|'statusSkipped'|'testResultsLabel'|'testResultsPassed'|'testResultsFailed'|'testResultsSkipped'|'testResultsShownAnnounce'|'testResultsRunning'|'testResultsFilterLabel'|'testResultsCompleteAnnounce'|'testResultsToggleTest'|'testResultsUnnamedTest'|'envListLabel'|'envListLimit'|'envListReveal'|'envListHide'|'envListValueHidden'|'envListCopy'|'voice'|'voicePickerNoVoices'|'voicePickerRequired'|'voicePickerPreview'|'voicePickerPreviewFailed'|'voicePickerStopPreview'|'avPlayerLabel'|'avPlayerFailedToLoad'|'avPlayerTranscript'|'avPlayerTimeline'|'avPlayerPlaybackRate'|'avPlayerRateOption'|'avPlayerPosition'|'avPlayerHighlightRange'|'avPlayerHighlightAt'|'attachmentTriggerAudio'|'attachmentMenuAudio'|'browserFrameLabel'|'browserFrameUrlLabel'|'browserFrameViewOf'|'browserFrameTakeOver'|'browserFrameHandBack'|'browserFrameStop'|'browserFrameStatusIdle'|'browserFrameStatusConnecting'|'browserFrameStatusLive'|'browserFrameStatusStalled'|'browserFrameControllerAgent'|'browserFrameControllerUser'|'browserFramePingsLimit'|'notebookViewerLabel'|'notebookViewerInvalid'|'notebookViewerUnsupportedVersion'|'notebookViewerTooManyCells'|'notebookViewerInPrompt'|'notebookViewerInPromptEmpty'|'notebookViewerCodeCell'|'notebookViewerMarkdownCell'|'notebookViewerRawCell'|'notebookViewerErrorOutput'|'notebookViewerFullOutput'|'notebookViewerUnrenderedOutput'|'xmlViewerLabel'|'xmlViewerParseError'|'xmlViewerTooManyNodes'|'xmlViewerLimit'|'xmlViewerChildCount'|'xmlViewerCopyDocument'|'xmlViewerCopyNode'|'xmlViewerToggleNode'|'artifactPanelLabel'|'artifactPanelPreview'|'artifactPanelCode'|'artifactPanelPreviousVersion'|'artifactPanelNextVersion'|'artifactPanelVersionPosition'|'artifactPanelRestore'|'artifactPanelGenerating'|'resultFieldLabel'|'geojsonViewLabel'|'geojsonViewInvalid'|'geojsonViewFeatureCount'|'geojsonViewMissingMapLibrary'|'mindMapLabel'|'mindMapTopicStatus'|'mindMapLeafStatus'|'mindMapExpanded'|'mindMapCollapsed'|'mindMapNodeLimit'|'mindMapInputLimit'|'entityDegree'|'entityCommunity'|'focusInGraph'|'focusInGraphWithContext'|'untitledEntity'|'untitledCommunity'|'communityMemberCount'|'communityDrillIn'|'communityDrillInWithContext'|'selectAllSources'|'sourcePickerSelection'|'provenancePanelLabel'|'provenanceEntities'|'provenanceRelationships'|'provenanceCommunities'|'provenanceChunks'|'provenanceEmpty'|'chunkInspectorLabel'|'chunkScore'|'scoreTierHigh'|'scoreTierMedium'|'scoreTierLow'|'chunkInspectorEmpty'|'flowCanvasLabel'|'flowCanvasLayoutLimit'|'flowCanvasInputLimit'|'flowCanvasSummary'|'flowNode'|'flowEdge'|'flowEdgeWithLabel'|'flowItemAnnouncement'|'dashboardGridLabel'|'dashboardCellCollisionRejected'|'dashboardCellMoved'|'dashboardCellResized'|'flowEdgeList'|'flowNodeSelected'|'flowNodeDeselected'|'flowSelectionCleared'|'flowNodeMoved'|'flowNodeProgressLabel'|'flowConnectStarted'|'flowConnectTarget'|'flowConnectCommitted'|'flowConnectCancelled'|'zoomToFit'|'flowLockCanvas'|'flowControlsLabel'|'flowMinimapLabel'|'flowMinimapSourceUnavailable'|'flowMinimapViewport'|'flowMinimapInstructions'|'flowMinimapViewportChanged'|'nodePaletteLabel'|'nodePalettePlaceholder'|'nodePaletteEmpty'|'nodePaletteDragHint'|'nodePaletteResultCount'|'pathStripLabel'|'pathNodeStatus'|'pathRelationStatus'|'pathRelationForward'|'pathRelationReverse'|'flowInputHandle'|'flowOutputHandle'|'flowStatusWithDuration'|'flowStatusWithDetail'|'flowSourceRevealSourceNode'|'flowSourceRevealTargetNode'|'flowSourceRecordMatches'|'neighborListLabel'|'neighborRowLabel'|'neighborDirectionIn'|'neighborDirectionOut'|'neighborDirectionBoth'|'neighborExpand'|'neighborListEmpty'|'neighborSourceChoose'|'neighborSourceError'|'neighborSourceSummary'|'neighborGroupHeader'|'flowRunStatusLabel'|'flowRunSummary'|'flowRunStepStatus'|'flowRunStatusCount'|'policySummaryLabel'|'policySummaryLimit'|'policySummaryAllowCount'|'policySummaryDenyCount'|'policySummaryNeedsReviewCount'|'policySummaryStateAllow'|'policySummaryStateDeny'|'policySummaryStateNeedsReview'|'policySummaryCategoryGuardrail'|'policySummaryCategoryPermission'|'policySummaryCategoryPrivacy'|'policySummaryCategoryTool'|'policySummaryDetailLabel'|'evalDatasetLabel'|'evalDatasetAddExample'|'evalDatasetRemoveExample'|'evalDatasetImportLabel'|'evalDatasetSearchLabel'|'evalDatasetTagFilterLabel'|'evalDatasetEmpty'|'evalDatasetNoMatches'|'evalDatasetColumnInput'|'evalDatasetColumnExpectedOutput'|'evalDatasetColumnTags'|'queryBuilderLabel'|'queryBuilderEmpty'|'queryBuilderNoFields'|'queryBuilderAddCondition'|'queryBuilderRemoveCondition'|'queryBuilderRowControlName'|'queryBuilderFieldLabel'|'queryBuilderFieldPlaceholder'|'queryBuilderOperatorLabel'|'queryBuilderOperatorPlaceholder'|'queryBuilderValueLabel'|'queryBuilderValuePlaceholder'|'queryBuilderCombinatorLabel'|'queryBuilderCombinatorAnd'|'queryBuilderCombinatorOr'|'queryBuilderConditionAdded'|'queryBuilderConditionRemoved'|'queryBuilderConditionInvalid'|'queryBuilderBooleanTrue'|'queryBuilderBooleanFalse'|'queryBuilderOperatorEquals'|'queryBuilderOperatorNotEquals'|'queryBuilderOperatorGreaterThan'|'queryBuilderOperatorGreaterThanOrEqual'|'queryBuilderOperatorLessThan'|'queryBuilderOperatorLessThanOrEqual'|'queryBuilderOperatorAfter'|'queryBuilderOperatorOnOrAfter'|'queryBuilderOperatorBefore'|'queryBuilderOperatorOnOrBefore'|'queryBuilderOperatorContains'|'queryBuilderOperatorStartsWith'|'queryBuilderOperatorEndsWith'|'queryBuilderOperatorIn'|'queryBuilderOperatorNotIn'|'queryBuilderOperatorIsEmpty'|'queryBuilderOperatorIsNotEmpty'|'memoryPanelLabel'|'memoryPanelShortTermHeading'|'memoryPanelLongTermHeading'|'memoryPanelAdd'|'memoryPanelAddWithContext'|'memoryPanelAddPosition'|'memoryPanelForgetAll'|'memoryPanelConfirmAddHeading'|'memoryPanelConfirmRemoveHeading'|'memoryPanelConfirmForgetHeading'|'memoryPanelConfirmForgetBody'|'memoryPanelItemsLimit'|'graphExplorerLabel'|'graphExplorerAllTypesHidden'|'graphExplorerClearTypes'|'graphExplorerSearchPlaceholder'|'graphExplorerSearchResultsLabel'|'graphExplorerPin'|'graphExplorerUnpin'|'graphExplorerPinned'|'graphExplorerUnpinned'|'graphExplorerPinnedHeading'|'graphExplorerFindPath'|'retrievalModeVector'|'retrievalModeKeyword'|'retrievalModeHybrid'|'retrievalSearchLabel'|'retrievalModeLabel'|'retrievalFiltersLabel'|'groundingSummaryLabel'|'groundingSummaryEmpty'|'groundingSummarySupportedLabel'|'groundingSummaryUnsupportedLabel'|'groundingSummaryCoverageLabel'|'groundingSummaryConfidenceLabel'|'groundingSummaryWarningsHeading'|'groundingSummaryEvidenceHeading'|'groundingSummaryCitationsLimit'|'claimEvidenceLabel'|'claimEvidenceEmpty'|'claimEvidenceSupported'|'claimEvidencePartiallySupported'|'claimEvidenceUnsupported'|'claimEvidenceContradicted'|'claimEvidenceConfidence'|'claimEvidenceClaimsLimit'|'retrievalCompareLabel'|'retrievalCompareEmpty'|'retrievalCompareInputLimit'|'retrievalCompareResultLimit'|'retrievalCompareOverlap'|'retrievalCompareRank'|'retrievalCompareDenseScore'|'retrievalCompareSparseScore'|'retrievalCompareRerankScore'|'retrievalCompareFinalScore'|'ragEvalDashboardLabel'|'ragEvalDashboardEmpty'|'ragEvalDashboardInputLimit'|'ragEvalDashboardSlicesLimit'|'ragEvalDashboardRuns'|'ragEvalDashboardSlices'|'ragEvalDashboardAllSlices'|'ragEvalDashboardSliceUnavailable'|'ragEvalDashboardRunsLimit'|'ragEvalDashboardMetricUnavailable'|'promptStudioLabel'|'promptStudioLargeWorkspace'|'promptStudioMessages'|'promptStudioVariables'|'promptStudioVersions'|'promptStudioPreview'|'promptStudioPreviewLimit'|'promptStudioRun'|'promptStudioSave'|'promptStudioAddMessage'|'promptStudioRemoveMessage'|'promptStudioRemoveMessageNumbered'|'promptStudioMessageRole'|'promptStudioMessageContent'|'promptStudioMoveMessageUp'|'promptStudioMoveMessageDown'|'promptStudioRoleSystem'|'promptStudioRoleUser'|'promptStudioRoleAssistant'|'promptStudioRoleTool'|'schemaViewerLabel'|'schemaViewerEmpty'|'schemaViewerRequired'|'schemaViewerCircular'|'schemaViewerType'|'subagentPanelLabel'|'subagentPanelEmpty'|'subagentPanelRetry'|'subagentPanelCancelRun'|'subagentPanelRetryRun'|'toolTimelineDetailsFor'|'toolCallBlockHeaderPending'|'toolCallBlockHeaderRunning'|'toolCallBlockHeaderSuccess'|'toolCallBlockHeaderError'|'toolCallBlockHeaderDenied'|'toolCallBlockHeaderIncomplete'|'toolCallBlockArgumentsLabel'|'toolCallBlockResultLabel'|'toolCallBlockErrorLabel'|'realtimeSessionLabel'|'realtimeSessionDisconnected'|'realtimeSessionConnecting'|'realtimeSessionConnected'|'realtimeSessionReconnecting'|'realtimeSessionError'|'realtimeSessionConnect'|'realtimeSessionDisconnect'|'realtimeSessionMute'|'realtimeSessionUnmute'|'realtimeSessionInterrupt'|'realtimeSessionConnectionFailed'|'contextInspectorRedacted'|'contextInspectorTruncated'|'contextInspectorLabel'|'contextInspectorEmpty'|'contextInspectorCopyLabel'|'knowledgeBaseSyncIdle'|'knowledgeBaseSyncSyncing'|'knowledgeBaseSyncPaused'|'knowledgeBaseSyncSynced'|'knowledgeBaseSyncError'|'knowledgeBaseHealthHealthy'|'knowledgeBaseHealthDegraded'|'knowledgeBaseHealthFailed'|'knowledgeBaseHealthUnknown'|'knowledgeBasePermissionOwner'|'knowledgeBasePermissionEditor'|'knowledgeBasePermissionViewer'|'knowledgeBasePermissionRestricted'|'knowledgeBaseNeverSynced'|'knowledgeBaseSyncAction'|'knowledgeBasePauseAction'|'knowledgeBaseDeleteAction'|'knowledgeBaseNameColumn'|'knowledgeBaseSyncColumn'|'knowledgeBaseHealthColumn'|'knowledgeBasePermissionColumn'|'knowledgeBaseActionsColumn'|'knowledgeBaseTotalSources'|'knowledgeBaseSyncedSources'|'knowledgeBaseSyncingSources'|'knowledgeBaseNeedsAttention'|'knowledgeBaseHeading'|'knowledgeBaseCreateSource'|'knowledgeBaseEmptyHeading'|'ingestionStageQueued'|'ingestionStageUploading'|'ingestionStageExtracting'|'ingestionStageChunking'|'ingestionStageEmbedding'|'ingestionStageIndexing'|'ingestionStageDone'|'ingestionStageFailed'|'ingestionStageCancelled'|'ingestionStageUnknown'|'ingestionQueueLabel'|'ingestionQueueEmpty'|'ingestionActionWithContext'|'ingestionQueueActionLimit'|'documentLibraryFreshnessFresh'|'documentLibraryFreshnessAging'|'documentLibraryFreshnessStale'|'documentLibrarySelectAll'|'documentLibrarySelectColumn'|'documentLibraryTypeColumn'|'documentLibraryNameColumn'|'documentLibraryVersionColumn'|'documentLibraryOwnerColumn'|'documentLibraryOmitted'|'documentLibraryTagsColumn'|'documentLibraryFreshnessColumn'|'documentLibraryUpdatedColumn'|'documentLibraryLabel'|'documentLibraryEmptyHeading'|'documentLibraryNoMatchesHeading'|'documentLibrarySearchPlaceholder'|'documentLibraryFilterByTag'|'documentLibraryClearSelection'|'documentLibrarySelectedCount'|'documentLibraryCursorNavigation'|'documentLibraryCursorRestart'|'documentLibraryCursorEnd'|'documentLibraryCursorEmptyBatch'|'documentLibraryCursorHistoryLimit'|'documentLibraryCursorFailed'|'documentCompareNoVersion'|'documentCompareLabel'|'agentRunCurrentStepLabel'|'graphQueryHopRangeInvalid'|'graphQueryRelationshipTypeLabel'|'graphQueryNodeTypeLabel'|'graphQueryBuilderLabel'|'graphQueryStartLabel'|'graphQueryEndLabel'|'graphQueryMinHopsLabel'|'graphQueryMaxHopsLabel'|'graphQueryDirectionLabel'|'graphQueryRun'|'graphQuerySavedQueriesLabel'|'graphQuerySaveNameLabel'|'graphQuerySaveButton'|'graphQueryLoadWithContext'|'filterBarReset'|'filterBarActiveFilters'|'drilldownDocuments'|'drilldownRuns'|'drilldownEmpty'|'drilldownUntitledNode'|'evaluationRunGroundingHeading'|'evaluationRunToolTraceHeading'|'evaluationRunInputHeading'|'evaluationRunOutputHeading'|'evaluationRunLabel'|'evaluationRunProgressLabel'|'retrievalFilterChipLabel'|'retrievalSearchEmptyDescription'|'groundingSummaryEvidenceSpan'|'contextInspectorTruncatedCount'|'contextInspectorSegmentTokens'|'contextInspectorLimit'|'knowledgeBaseDocumentCount'|'knowledgeBaseRowActionsLabel'|'knowledgeBaseEmptyDescription'|'ingestionChunkCount'|'ingestionItemProgressLabel'|'ingestionEmbeddedOfTotal'|'ingestionAttemptCount'|'ingestionRetryWithContext'|'ingestionCancelWithContext'|'documentLibrarySelectDocument'|'agentRunStatusAnnounce'|'graphQueryDeleteWithContext'|'evaluationRunExampleLabel'|'evaluationRunExampleLimit'|'evaluationRunExampleStartedAnnounce'|'evaluationRunExampleCompletedAnnounce'|'evaluationRunExampleFailedAnnounce'|'evaluationRunExampleCancelledAnnounce'|'evaluationRunExampleWaitingInputAnnounce'|'evaluationRunExampleWaitingApprovalAnnounce'|'evaluationRunProgressSummary'|'evaluationRunRunningCount'|'evaluationRunFailedCount'|'evaluationRunDetailsLoadError'|'retrievalStageQueryRewrite'|'retrievalStageEmbed'|'retrievalStageRetrieve'|'retrievalStageRerank'|'retrievalStageFilter'|'statusUnknown'|'statRowsInputLimit'|'retrievalStageKindUnknown'|'retrievalShowMoreWithContext'|'retrievalShowLessWithContext'|'valueTruncated'|'retrievalTraceEvidenceToggle'|'documentCompareOldVersion'|'documentCompareNewVersion'|'agentRunStatusIdle'|'agentRunStatusQueued'|'agentRunStatusCollecting'|'agentRunStatusWaitingInput'|'agentRunStatusWaitingApproval'|'agentRunStatusDone'|'agentRunStatusCancelled'|'localePickerLabel'|'localePickerRequired'|'localePickerSearchLabel'|'localePickerEmpty'|'currencyPickerLabel'|'countryPickerLabel'|'timeZonePickerLabel'|'unitPickerLabel'|'flagLoadError'|'moveUp'|'moveDown'|'reorderMovePending'|'reorderMoveCancelled'|'reorderItemMoved'|'signaturePad'|'signaturePadLabel'|'signaturePadInstructions'|'signaturePadEmpty'|'signaturePadSigned'|'signaturePadPenDown'|'signaturePadPenUp'|'signaturePadDrawingLimit'|'mentionMoreResults'|'commandPaletteResultCount'|'dataGridRowLimit'|'dataGridToggleRow'|'dataGridFilterColumn'|'dataGridSelectPage'|'tableRowLimit'|'tableAdditionalColumns'|'tabCloseAction'|'treeLimit'|'treeSourceError'|'treeSourceSummary'|'treeDefaultLabel'|'graphNodeLimit'|'graphEdgeLimit'|'graphExplorerSearchLimit'|'streamStatusIdle'|'streamStatusConnecting'|'streamStatusStalled'|'stepperStateCompleted'|'stepperStateError'|'stepperStatePending'|'stepperStateLocked'|'stepperStateLoading'|'stepperStateDisabled'|'stepperSteps'|'stepperStepPosition'|'generationStatusTokens'|'funnelComparisonShare'|'funnelDropoffIncreased'|'funnelDropoffDecreased'|'retrievalResultsSelectRowOrdinal'|'retrievalResultsSelectionLimit'|'chunkInspectorOpenOrdinal'|'ragAnswerEmpty'|'retrievalTraceEmpty'|'retrievalTraceLabel'|'sourcePickerMatches'|'sourcePickerLimit'|'provenancePanelLimit'|'commitCardFilesLimit'|'taskListLimit'|'evalDatasetLimit'|'mapMarker'|'mapToggleAttribution'|'mapFeedback'|'threadListInputLimit'|'commandPaletteInputLimit'|'promptInputInputLimit'|'sourceSearchUnavailable'|'sourceSelectionLoading'|'sourceSelectionFailed'|'documentLibrarySelectPage'|'chartInputLimit'|'chartTableSource'|'chartTableTarget'|'chartTableValue'|'chartTableName'|'chartTotalsCaption'|'chartValuesTooSmall'|'chordPairLabel'|'sankeyCycle'|'treemapTileLabel'|'choroplethInvalidGeometry'|'histogramInputLimit'|'calendarInputLimit'|'heatmapInputLimit'|'activityFeedInputLimit'|'catalogPickerInputLimit'|'catalogPickerSearchLoadFailed'|'localePickerInputLimit'|'emojiPickerInputLimit'|'mentionInputLimit'|'transcriptFeedInputLimit'|'transcriptFeedWindowNotice'|'transcriptFeedRegion'|'spanWaterfallLimit'|'toolTimelineInputLimit'|'retrievalResultsInputLimit'|'ingestionQueueInputLimit'|'tagFacetLimit'|'codeBlockHighlightLimit'|'codeBlockHighlightedLine'|'codeBlockActiveLine'|'codeBlockToggle'|'diffViewHighlightLimit'|'diffViewLabel'|'engine3dLoading'|'engine3dUnavailable'|'engine3dUnsupported'|'engine3dContextLost'|'engine3dError'|'engine3dSoftwareRendering'|'engine3dShowingBuiltin'|'engine3dShowingList'|'modelViewerLabel'|'modelViewerAlternative'|'modelViewerInstructions'|'modelViewerReady'|'modelViewerEmpty'|'modelViewerProgress'|'modelViewerInvalid'|'modelViewerUnsupportedFormat'|'modelViewerFit'|'modelViewerRotateLeft'|'modelViewerRotateRight'|'modelViewerRotateUp'|'modelViewerRotateDown'|'modelViewerViewport'|'largeDataInvalid'|'largeDataLimit'|'mapGeolocateFindLocation'|'mapGeolocateUnavailable'|'mapGeolocatePermissionDenied'|'mapGeolocatePositionUnavailable'|'mapGeolocateTimeout'|'mapGeolocateError'|'mapGeolocateOutOfBounds'|'mapHashConflict'|'mapHashInvalid'|'mapControlUnavailable'|'mapGlobe'|'mapTerrain'|'mapScaleFeet'|'mapScaleMeters'|'mapScaleKilometers'|'mapScaleMiles'|'mapScaleNauticalMiles'|'mapFeatureStateUnavailable'|'mapPickAtCenter'|'mapCancelPick'|'mapDrawingControls'|'mapDrawAtCenter'|'mapUndoDrawing'|'mapCompleteDrawing'|'mapCancelDrawing'|'mapDrawingVertices'|'mapDrawingUnavailable'|'mapDrawingInvalidCoordinate'|'mapDrawingDuplicateVertex'|'mapDrawingVertexLimit'|'mapDrawingTooFewVertices'|'mapDrawingInvalidGeometry'|'mapExportUnavailable'|'mapDrawingVertex'|'mapDrawingEditInstructions'|'panoramaInstructions'|'panoramaHotspotsLabel'|'mapActivate'|'mapDrawingLength'|'mapDrawingArea'|'mapSquareMeters'|'mapSquareKilometers'|'chart3dLabel'|'chart3dEmpty'|'chart3dRow'|'chart3dInstructions'|'chart3dFit'|'chart3dName'|'chart3dSize'|'chart3dCategory'|'chart3dXAxis'|'chart3dYAxis'|'chart3dZAxis'|'stylePanelLabel'|'stylePanelMode'|'stylePanelModeLight'|'stylePanelModeDark'|'stylePanelModeSystem'|'stylePanelLook'|'stylePanelSurface'|'stylePanelSurfaceSolid'|'stylePanelSurfaceGlass'|'stylePanelSurfaceOpacity'|'stylePanelDensity'|'stylePanelDensityCompact'|'stylePanelDensityComfortable'|'stylePanelDensityTouch'|'stylePanelAccent'|'stylePanelReset'|'styleAccentEmerald'|'styleAccentPeridot'|'styleAccentTopaz'|'styleAccentRuby'|'styleAccentTourmaline'|'styleAccentAmethyst'|'styleAccentAquamarine'|'styleAccentSapphire'|'styleAccentHematite'|'styleLookShadcn'|'styleLookLyra'|'styleLookMaterial'|'styleLookData'|'styleLookTerminal'|'styleLookHighContrast';
30
30
  /**
31
31
  * Message-catalog input. Registration and per-instance `.strings` assignment snapshot eligible
32
32
  * own data properties; retained catalogs are immutable, so reassign or re-register to publish a