@aceshooting/lyra-ui 13.0.1 → 14.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 (723) hide show
  1. package/CHANGELOG.md +329 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cli/migration-contract.json +1 -1
  4. package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts +23 -15
  5. package/dist/components/agent-tools/activity-feed/activity-feed.class.js +9 -6
  6. package/dist/components/agent-tools/agent-trace/agent-trace.class.d.ts +12 -3
  7. package/dist/components/agent-tools/agent-trace/agent-trace.class.js +2 -1
  8. package/dist/components/agent-tools/approval-queue/approval-queue.class.d.ts +4 -2
  9. package/dist/components/agent-tools/approval-queue/approval-queue.class.js +1 -1
  10. package/dist/components/agent-tools/artifact-panel/artifact-panel.styles.js +1 -1
  11. package/dist/components/agent-tools/commit-card/commit-card.class.d.ts +3 -1
  12. package/dist/components/agent-tools/commit-card/commit-card.class.js +2 -2
  13. package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts +2 -1
  14. package/dist/components/agent-tools/compare-panel/compare-panel.styles.js +1 -1
  15. package/dist/components/agent-tools/prompt-studio/prompt-studio.class.d.ts +6 -2
  16. package/dist/components/agent-tools/prompt-studio/prompt-studio.class.js +8 -8
  17. package/dist/components/agent-tools/result-card/result-card.class.d.ts +1 -1
  18. package/dist/components/agent-tools/result-card/result-card.class.js +1 -1
  19. package/dist/components/agent-tools/result-card/result-field.class.d.ts +1 -1
  20. package/dist/components/agent-tools/result-card/result-field.class.js +1 -1
  21. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.d.ts +5 -5
  22. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.js +23 -10
  23. package/dist/components/agent-tools/span-waterfall/span-waterfall.class.d.ts +13 -6
  24. package/dist/components/agent-tools/span-waterfall/span-waterfall.class.js +3 -3
  25. package/dist/components/agent-tools/span-waterfall/span-waterfall.styles.js +1 -1
  26. package/dist/components/agent-tools/stack-trace/stack-trace-parse.js +3 -3
  27. package/dist/components/agent-tools/stack-trace/stack-trace.class.d.ts +1 -1
  28. package/dist/components/agent-tools/stack-trace/stack-trace.class.js +1 -1
  29. package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +1 -1
  30. package/dist/components/agent-tools/subagent-panel/subagent-panel.styles.js +1 -1
  31. package/dist/components/agent-tools/task-list/task-list.class.d.ts +1 -2
  32. package/dist/components/agent-tools/task-list/task-list.class.js +2 -2
  33. package/dist/components/agent-tools/terminal/terminal.class.d.ts +11 -2
  34. package/dist/components/agent-tools/terminal/terminal.class.js +5 -5
  35. package/dist/components/agent-tools/terminal/terminal.styles.js +1 -1
  36. package/dist/components/agent-tools/test-results/test-results.class.d.ts +4 -2
  37. package/dist/components/agent-tools/test-results/test-results.class.js +2 -2
  38. package/dist/components/agent-tools/thinking-panel/thinking-panel.class.d.ts +2 -0
  39. package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +1 -1
  40. package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.js +1 -1
  41. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +2 -2
  42. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +1 -1
  43. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +3 -2
  44. package/dist/components/agent-tools/tool-param-form/tool-param-form.d.ts +1 -1
  45. package/dist/components/agent-tools/tool-param-form/tool-param-form.js +1 -1
  46. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.js +2 -2
  47. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +1 -1
  48. package/dist/components/agent-tools/tool-result-view/registry.d.ts +2 -1
  49. package/dist/components/agent-tools/tool-result-view/tool-result-view.class.d.ts +1 -1
  50. package/dist/components/agent-tools/tool-result-view/tool-result-view.class.js +1 -1
  51. package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.d.ts +18 -12
  52. package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +7 -7
  53. package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +9 -3
  54. package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +1 -1
  55. package/dist/components/agent-tools/trace-tree/span.d.ts +3 -1
  56. package/dist/components/agent-tools/trace-tree/span.js +1 -1
  57. package/dist/components/agent-tools/trace-tree/trace-tree.styles.js +1 -1
  58. package/dist/components/charts/chart/box-plot.class.d.ts +12 -3
  59. package/dist/components/charts/chart/box-plot.class.js +9 -9
  60. package/dist/components/charts/chart/box-plot.styles.js +1 -1
  61. package/dist/components/charts/chart/chart-core-loader.js +1 -1
  62. package/dist/components/charts/chart/chart-feature-loader.js +1 -1
  63. package/dist/components/charts/chart/chart-preload.d.ts +1 -1
  64. package/dist/components/charts/chart/chart-preload.js +1 -1
  65. package/dist/components/charts/chart/chart.class.d.ts +33 -10
  66. package/dist/components/charts/chart/chart.class.js +23 -14
  67. package/dist/components/charts/chart/chart.styles.js +1 -1
  68. package/dist/components/charts/chart/histogram-bin.js +1 -1
  69. package/dist/components/charts/chart/lite-chart.class.d.ts +20 -11
  70. package/dist/components/charts/chart/lite-chart.class.js +17 -11
  71. package/dist/components/charts/chart/lite-chart.styles.js +1 -1
  72. package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +1 -1
  73. package/dist/components/conversation/agent-workspace/agent-workspace.class.js +2 -2
  74. package/dist/components/conversation/audio-visualizer/audio-visualizer.class.d.ts +10 -5
  75. package/dist/components/conversation/audio-visualizer/audio-visualizer.class.js +1 -1
  76. package/dist/components/conversation/branch-picker/branch-picker.class.d.ts +4 -2
  77. package/dist/components/conversation/branch-picker/branch-picker.class.js +1 -1
  78. package/dist/components/conversation/branch-picker/branch-picker.styles.js +1 -1
  79. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +6 -2
  80. package/dist/components/conversation/chat-composer/chat-composer.class.js +3 -3
  81. package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
  82. package/dist/components/conversation/chat-message/chat-message.class.d.ts +4 -3
  83. package/dist/components/conversation/chat-message/chat-message.class.js +2 -2
  84. package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
  85. package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
  86. package/dist/components/conversation/code-block/code-block-core.class.d.ts +4 -3
  87. package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
  88. package/dist/components/conversation/code-block/code-block-shared.d.ts +3 -3
  89. package/dist/components/conversation/code-block/code-block-shared.js +2 -2
  90. package/dist/components/conversation/code-block/code-block.class.d.ts +4 -3
  91. package/dist/components/conversation/code-block/code-block.class.js +1 -1
  92. package/dist/components/conversation/code-block/code-block.styles.js +1 -1
  93. package/dist/components/conversation/code-block/code-loader.d.ts +1 -1
  94. package/dist/components/conversation/code-block/code-loader.js +1 -1
  95. package/dist/components/conversation/code-block/shiki-types.d.ts +2 -0
  96. package/dist/components/conversation/code-block/shiki-types.js +1 -1
  97. package/dist/components/conversation/conversation-item/conversation-item.class.js +1 -1
  98. package/dist/components/conversation/conversation-item/conversation-item.styles.js +1 -1
  99. package/dist/components/conversation/generation-metrics/generation-metrics.styles.js +1 -1
  100. package/dist/components/conversation/markdown/katex-loader.d.ts +4 -4
  101. package/dist/components/conversation/markdown/katex-loader.js +1 -1
  102. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  103. package/dist/components/conversation/markdown/markdown-core.class.d.ts +1 -1
  104. package/dist/components/conversation/markdown/markdown-loader.d.ts +1 -1
  105. package/dist/components/conversation/markdown/markdown-loader.js +1 -1
  106. package/dist/components/conversation/markdown/markdown-shared.d.ts +6 -1
  107. package/dist/components/conversation/markdown/markdown-shared.js +5 -4
  108. package/dist/components/conversation/markdown/markdown.class.d.ts +1 -1
  109. package/dist/components/conversation/message-actions/message-actions.class.d.ts +18 -3
  110. package/dist/components/conversation/message-actions/message-actions.class.js +2 -2
  111. package/dist/components/conversation/message-actions/message-actions.styles.js +1 -1
  112. package/dist/components/conversation/message-actions/toolbar-actions.d.ts +3 -1
  113. package/dist/components/conversation/message-actions/toolbar-actions.js +1 -1
  114. package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +40 -15
  115. package/dist/components/conversation/message-feedback/message-feedback.class.js +7 -3
  116. package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
  117. package/dist/components/conversation/message-parts/message-parts.class.d.ts +10 -4
  118. package/dist/components/conversation/message-parts/message-parts.class.js +2 -2
  119. package/dist/components/conversation/message-parts/message-parts.styles.js +1 -1
  120. package/dist/components/conversation/model-select/model-select.class.d.ts +5 -2
  121. package/dist/components/conversation/model-select/model-select.class.js +8 -5
  122. package/dist/components/conversation/model-settings-panel/model-settings-panel.class.d.ts +3 -5
  123. package/dist/components/conversation/model-settings-panel/model-settings-panel.class.js +2 -1
  124. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +9 -2
  125. package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -3
  126. package/dist/components/conversation/prompt-input/prompt-input.styles.js +1 -1
  127. package/dist/components/conversation/prompt-queue/prompt-queue.class.d.ts +20 -4
  128. package/dist/components/conversation/prompt-queue/prompt-queue.class.js +1 -1
  129. package/dist/components/conversation/prompt-queue/prompt-queue.styles.js +1 -1
  130. package/dist/components/conversation/push-to-talk/push-to-talk.class.d.ts +17 -8
  131. package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
  132. package/dist/components/conversation/push-to-talk/push-to-talk.styles.js +1 -1
  133. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +6 -3
  134. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
  135. package/dist/components/conversation/selection-toolbar/selection-toolbar.styles.js +1 -1
  136. package/dist/components/conversation/thread-list/thread-list.class.d.ts +14 -4
  137. package/dist/components/conversation/thread-list/thread-list.class.js +11 -11
  138. package/dist/components/conversation/thread-list/thread-list.styles.js +1 -1
  139. package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +2 -0
  140. package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
  141. package/dist/components/conversation/transcript-feed/transcript-feed.styles.js +1 -1
  142. package/dist/components/conversation/typing-indicator/typing-indicator.class.d.ts +2 -1
  143. package/dist/components/conversation/typing-indicator/typing-indicator.class.js +1 -1
  144. package/dist/components/conversation/usage-badge/usage-badge-overlay-runtime.d.ts +3 -0
  145. package/dist/components/conversation/usage-badge/usage-badge-overlay-runtime.js +1 -0
  146. package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +4 -2
  147. package/dist/components/conversation/usage-badge/usage-badge.class.js +1 -1
  148. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +12 -4
  149. package/dist/components/conversation/voice-picker/voice-picker.class.js +8 -5
  150. package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
  151. package/dist/components/conversation/widget-renderer/resolve.d.ts +4 -6
  152. package/dist/components/conversation/widget-renderer/resolve.js +1 -1
  153. package/dist/components/data/calendar/calendar.class.d.ts +16 -5
  154. package/dist/components/data/calendar/calendar.class.js +2 -2
  155. package/dist/components/data/calendar/calendar.styles.js +1 -1
  156. package/dist/components/data/condition-builder/condition-builder.class.d.ts +3 -1
  157. package/dist/components/data/condition-builder/condition-builder.class.js +15 -1
  158. package/dist/components/data/context-meter/context-meter.class.d.ts +3 -1
  159. package/dist/components/data/context-meter/context-meter.class.js +4 -4
  160. package/dist/components/data/data-grid/data-grid.class.d.ts +51 -6
  161. package/dist/components/data/data-grid/data-grid.class.js +25 -11
  162. package/dist/components/data/data-grid/data-grid.styles.js +1 -1
  163. package/dist/components/data/document-library/document-library.class.d.ts +5 -2
  164. package/dist/components/data/document-library/document-library.class.js +1 -1
  165. package/dist/components/data/env-list/env-list.class.js +1 -1
  166. package/dist/components/data/file-tree/file-tree.class.d.ts +2 -1
  167. package/dist/components/data/file-tree/file-tree.class.js +1 -1
  168. package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +24 -14
  169. package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -2
  170. package/dist/components/data/flow-canvas/flow-canvas.styles.js +1 -1
  171. package/dist/components/data/flow-canvas/flow-model.js +1 -1
  172. package/dist/components/data/flow-canvas/flow-types.d.ts +2 -1
  173. package/dist/components/data/flow-controls/flow-controls.styles.js +1 -1
  174. package/dist/components/data/flow-run-status/flow-run-status.class.js +1 -1
  175. package/dist/components/data/funnel/funnel.class.d.ts +1 -0
  176. package/dist/components/data/funnel/funnel.class.js +1 -1
  177. package/dist/components/data/gauge/gauge.class.d.ts +4 -1
  178. package/dist/components/data/gauge/gauge.class.js +6 -6
  179. package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +5 -2
  180. package/dist/components/data/graph-query-builder/graph-query-builder.class.js +15 -1
  181. package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +1 -1
  182. package/dist/components/data/heatmap/heatmap.class.d.ts +7 -4
  183. package/dist/components/data/heatmap/heatmap.class.js +1 -1
  184. package/dist/components/data/sequence-strip/sequence-strip.class.js +1 -1
  185. package/dist/components/data/sparkline/sparkline.class.d.ts +2 -1
  186. package/dist/components/data/sparkline/sparkline.class.js +1 -1
  187. package/dist/components/data/stat/stat.class.d.ts +6 -2
  188. package/dist/components/data/stat/stat.class.js +1 -1
  189. package/dist/components/data/table/table.class.d.ts +15 -16
  190. package/dist/components/data/table/table.class.js +5 -4
  191. package/dist/components/data/table/table.styles.js +1 -1
  192. package/dist/components/data/timeline/timeline.class.d.ts +7 -2
  193. package/dist/components/data/timeline/timeline.class.js +1 -1
  194. package/dist/components/data/timeline/timeline.styles.js +1 -1
  195. package/dist/components/data/tree/tree-item.class.d.ts +3 -1
  196. package/dist/components/data/tree/tree-item.class.js +1 -1
  197. package/dist/components/data/tree/tree-item.styles.js +1 -1
  198. package/dist/components/data/tree/tree.class.d.ts +4 -1
  199. package/dist/components/data/tree/tree.class.js +1 -1
  200. package/dist/components/data/word-cloud/word-cloud-layout.d.ts +2 -1
  201. package/dist/components/data/word-cloud/word-cloud-layout.js +1 -1
  202. package/dist/components/data/word-cloud/word-cloud.class.d.ts +2 -1
  203. package/dist/components/data/word-cloud/word-cloud.class.js +1 -1
  204. package/dist/components/forms/button/button.class.d.ts +5 -3
  205. package/dist/components/forms/button/button.class.js +1 -1
  206. package/dist/components/forms/checkbox/checkbox.class.d.ts +3 -0
  207. package/dist/components/forms/checkbox/checkbox.class.js +1 -1
  208. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +7 -2
  209. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  210. package/dist/components/forms/code-editor/code-editor.class.d.ts +16 -4
  211. package/dist/components/forms/code-editor/code-editor.class.js +19 -9
  212. package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
  213. package/dist/components/forms/color-picker/color-picker.class.d.ts +6 -2
  214. package/dist/components/forms/color-picker/color-picker.class.js +4 -4
  215. package/dist/components/forms/combobox/combobox.class.d.ts +19 -8
  216. package/dist/components/forms/combobox/combobox.class.js +3 -3
  217. package/dist/components/forms/combobox/combobox.styles.js +1 -1
  218. package/dist/components/forms/combobox/option.class.d.ts +4 -0
  219. package/dist/components/forms/combobox/option.class.js +2 -2
  220. package/dist/components/forms/date-picker/calendar-core.d.ts +1 -1
  221. package/dist/components/forms/date-picker/calendar-core.js +1 -1
  222. package/dist/components/forms/date-picker/date-input.class.d.ts +20 -10
  223. package/dist/components/forms/date-picker/date-input.class.js +4 -4
  224. package/dist/components/forms/date-picker/date-picker.class.d.ts +33 -15
  225. package/dist/components/forms/date-picker/date-picker.class.js +8 -8
  226. package/dist/components/forms/date-picker/date-picker.styles.js +1 -1
  227. package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
  228. package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +11 -3
  229. package/dist/components/forms/emoji-picker/emoji-picker.class.js +3 -3
  230. package/dist/components/forms/emoji-picker/emoji-types.d.ts +2 -2
  231. package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
  232. package/dist/components/forms/icon-button/icon-button.class.js +1 -1
  233. package/dist/components/forms/input/input.class.d.ts +16 -5
  234. package/dist/components/forms/input/input.class.js +7 -1
  235. package/dist/components/forms/input/native-time-input.class.d.ts +3 -0
  236. package/dist/components/forms/input/number-input.class.d.ts +3 -0
  237. package/dist/components/forms/input/time-input.class.d.ts +11 -2
  238. package/dist/components/forms/input/time-input.class.js +2 -2
  239. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +22 -4
  240. package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
  241. package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
  242. package/dist/components/forms/otp-input/otp-input.class.d.ts +5 -1
  243. package/dist/components/forms/otp-input/otp-input.class.js +1 -1
  244. package/dist/components/forms/phone-input/phone-input.class.d.ts +21 -8
  245. package/dist/components/forms/phone-input/phone-input.class.js +1 -1
  246. package/dist/components/forms/radio/radio-button.class.d.ts +4 -0
  247. package/dist/components/forms/radio/radio-group.class.d.ts +4 -1
  248. package/dist/components/forms/radio/radio-group.class.js +1 -1
  249. package/dist/components/forms/radio/radio.class.d.ts +6 -2
  250. package/dist/components/forms/radio/radio.class.js +1 -1
  251. package/dist/components/forms/rubric-form/rubric-form.class.d.ts +7 -1
  252. package/dist/components/forms/rubric-form/rubric-form.class.js +3 -3
  253. package/dist/components/forms/select/select.class.d.ts +8 -2
  254. package/dist/components/forms/select/select.class.js +2 -2
  255. package/dist/components/forms/select/select.styles.js +1 -1
  256. package/dist/components/forms/slider/slider.class.d.ts +12 -6
  257. package/dist/components/forms/slider/slider.class.js +2 -2
  258. package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +4 -0
  259. package/dist/components/forms/swatch-picker/swatch-picker.class.js +1 -1
  260. package/dist/components/forms/switch/switch.class.d.ts +5 -1
  261. package/dist/components/forms/switch/switch.class.js +1 -1
  262. package/dist/components/forms/textarea/textarea.class.d.ts +3 -0
  263. package/dist/components/forms/textarea/textarea.class.js +1 -1
  264. package/dist/components/forms/time-range/time-range.class.d.ts +3 -0
  265. package/dist/components/forms/time-range/time-range.class.js +1 -1
  266. package/dist/components/forms/token-input/token-input.class.d.ts +8 -2
  267. package/dist/components/forms/token-input/token-input.class.js +2 -2
  268. package/dist/components/forms/token-input/token-input.styles.js +1 -1
  269. package/dist/components/layout/app-rail/app-rail.class.d.ts +9 -5
  270. package/dist/components/layout/app-rail/app-rail.class.js +4 -3
  271. package/dist/components/layout/app-rail/app-rail.styles.js +1 -1
  272. package/dist/components/layout/carousel/carousel.class.d.ts +3 -2
  273. package/dist/components/layout/carousel/carousel.class.js +1 -1
  274. package/dist/components/layout/command-palette/command-palette.class.d.ts +2 -2
  275. package/dist/components/layout/command-palette/command-palette.class.js +1 -1
  276. package/dist/components/layout/command-palette/command-palette.styles.js +1 -1
  277. package/dist/components/layout/dashboard-grid/dashboard-grid.class.d.ts +2 -0
  278. package/dist/components/layout/dashboard-grid/dashboard-grid.class.js +1 -1
  279. package/dist/components/layout/details/details.class.d.ts +16 -15
  280. package/dist/components/layout/details/details.class.js +43 -34
  281. package/dist/components/layout/details/details.styles.js +1 -1
  282. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +4 -3
  283. package/dist/components/layout/dock-panel/dock-panel.class.js +2 -1
  284. package/dist/components/layout/filter-bar/filter-bar.class.d.ts +3 -1
  285. package/dist/components/layout/filter-bar/filter-bar.class.js +2 -2
  286. package/dist/components/layout/menu/menu-item.class.js +2 -2
  287. package/dist/components/layout/menu/menu-label.class.d.ts +3 -3
  288. package/dist/components/layout/menu/menu.class.d.ts +4 -1
  289. package/dist/components/layout/menu/menu.class.js +1 -1
  290. package/dist/components/layout/multi-split/multi-split.class.d.ts +19 -8
  291. package/dist/components/layout/multi-split/multi-split.class.js +2 -1
  292. package/dist/components/layout/multi-split/multi-split.styles.js +1 -1
  293. package/dist/components/layout/reorder-list/reorder-item.class.d.ts +2 -1
  294. package/dist/components/layout/reorder-list/reorder-item.class.js +1 -1
  295. package/dist/components/layout/reorder-list/reorder-list.class.js +1 -1
  296. package/dist/components/layout/reorder-list/reorder-owner.js +1 -1
  297. package/dist/components/layout/scroller/scroller.class.d.ts +4 -4
  298. package/dist/components/layout/scroller/scroller.styles.js +1 -1
  299. package/dist/components/layout/split-panel/split-panel.class.d.ts +5 -3
  300. package/dist/components/layout/split-panel/split-panel.class.js +3 -2
  301. package/dist/components/layout/tab-group/tab-group.class.d.ts +3 -1
  302. package/dist/components/layout/tab-group/tab-group.class.js +1 -1
  303. package/dist/components/layout/tab-group/tab-group.styles.js +1 -1
  304. package/dist/components/layout/virtual-list/virtual-list.class.js +2 -2
  305. package/dist/components/layout/widget/widget.class.d.ts +6 -2
  306. package/dist/components/layout/widget/widget.class.js +1 -1
  307. package/dist/components/layout/widget/widget.styles.js +1 -1
  308. package/dist/components/media/animation/animation.class.d.ts +3 -2
  309. package/dist/components/media/animation/animation.class.js +1 -1
  310. package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +4 -3
  311. package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
  312. package/dist/components/media/av-player/av-metadata.d.ts +3 -2
  313. package/dist/components/media/av-player/av-player.class.d.ts +4 -3
  314. package/dist/components/media/av-player/av-player.class.js +3 -3
  315. package/dist/components/media/av-player/av-player.styles.js +1 -1
  316. package/dist/components/media/avatar/avatar.class.d.ts +2 -1
  317. package/dist/components/media/avatar/avatar.class.js +1 -1
  318. package/dist/components/media/file-input/file-input.class.d.ts +4 -2
  319. package/dist/components/media/file-input/file-input.class.js +1 -1
  320. package/dist/components/media/file-input/file-input.styles.js +1 -1
  321. package/dist/components/media/flag/flag.class.js +1 -1
  322. package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -1
  323. package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
  324. package/dist/components/media/image-viewer/image-viewer.styles.js +1 -1
  325. package/dist/components/media/lightbox/lightbox.styles.js +1 -1
  326. package/dist/components/media/map/map-loader.js +1 -1
  327. package/dist/components/media/map/map.class.d.ts +22 -34
  328. package/dist/components/media/map/map.class.js +1 -1
  329. package/dist/components/media/map/map.styles.js +1 -1
  330. package/dist/components/media/media-card/media-card.class.d.ts +1 -1
  331. package/dist/components/media/media-card/media-card.class.js +1 -1
  332. package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
  333. package/dist/components/media/qr-code/qr-code-loader.js +1 -1
  334. package/dist/components/media/qr-code/qr-code.class.d.ts +5 -2
  335. package/dist/components/media/qr-code/qr-code.class.js +2 -2
  336. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +3 -3
  337. package/dist/components/media/sequence-playback/sequence-playback.class.js +1 -1
  338. package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
  339. package/dist/components/media/video/video.class.d.ts +2 -1
  340. package/dist/components/media/video/video.styles.js +1 -1
  341. package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +3 -2
  342. package/dist/components/media/zoomable-frame/zoomable-frame.class.js +2 -2
  343. package/dist/components/overlays/alert/alert.styles.js +1 -1
  344. package/dist/components/overlays/callout/callout.styles.js +1 -1
  345. package/dist/components/overlays/chip/chip-group.class.d.ts +2 -0
  346. package/dist/components/overlays/chip/chip-group.class.js +1 -1
  347. package/dist/components/overlays/dialog/dialog.class.d.ts +2 -0
  348. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  349. package/dist/components/overlays/dialog/dialog.styles.js +1 -1
  350. package/dist/components/overlays/empty/empty.class.d.ts +2 -0
  351. package/dist/components/overlays/empty/empty.class.js +1 -1
  352. package/dist/components/overlays/kbd/kbd.class.d.ts +2 -0
  353. package/dist/components/overlays/kbd/kbd.class.js +1 -1
  354. package/dist/components/overlays/overlay/popover.class.d.ts +3 -1
  355. package/dist/components/overlays/overlay/popover.class.js +1 -1
  356. package/dist/components/overlays/overlay/tooltip.class.d.ts +3 -1
  357. package/dist/components/overlays/overlay/tooltip.class.js +1 -1
  358. package/dist/components/overlays/rating/rating.class.d.ts +2 -0
  359. package/dist/components/overlays/rating/rating.class.js +1 -1
  360. package/dist/components/overlays/toast/toast-item.class.js +1 -1
  361. package/dist/components/retrieval/claim-evidence/claim-evidence.class.d.ts +11 -5
  362. package/dist/components/retrieval/claim-evidence/claim-evidence.class.js +3 -3
  363. package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.js +2 -2
  364. package/dist/components/retrieval/entity-card/entity-card.class.d.ts +5 -2
  365. package/dist/components/retrieval/entity-card/entity-card.class.js +1 -1
  366. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +4 -2
  367. package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -1
  368. package/dist/components/retrieval/graph/graph-canvas.js +1 -1
  369. package/dist/components/retrieval/graph/graph-loader.js +1 -1
  370. package/dist/components/retrieval/graph/graph.class.d.ts +10 -8
  371. package/dist/components/retrieval/graph/graph.class.js +10 -10
  372. package/dist/components/retrieval/graph-legend/graph-legend.class.d.ts +4 -2
  373. package/dist/components/retrieval/graph-legend/graph-legend.class.js +1 -1
  374. package/dist/components/retrieval/grounding-summary/grounding-summary.class.d.ts +15 -9
  375. package/dist/components/retrieval/grounding-summary/grounding-summary.class.js +7 -5
  376. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +2 -0
  377. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +1 -1
  378. package/dist/components/retrieval/knowledge-base/knowledge-base.class.d.ts +3 -2
  379. package/dist/components/retrieval/knowledge-base/knowledge-base.class.js +4 -3
  380. package/dist/components/retrieval/knowledge-base/knowledge-base.styles.js +1 -1
  381. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +7 -3
  382. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +8 -3
  383. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.styles.js +1 -1
  384. package/dist/components/retrieval/memory-panel/memory-panel.class.d.ts +15 -6
  385. package/dist/components/retrieval/memory-panel/memory-panel.class.js +1 -1
  386. package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +1 -1
  387. package/dist/components/retrieval/neighbor-list/neighbor-list.styles.js +1 -1
  388. package/dist/components/retrieval/node-palette/node-palette.class.d.ts +17 -12
  389. package/dist/components/retrieval/node-palette/node-palette.class.js +2 -2
  390. package/dist/components/retrieval/node-palette/node-palette.styles.js +1 -1
  391. package/dist/components/retrieval/path-strip/path-strip.class.js +1 -1
  392. package/dist/components/retrieval/provenance-panel/provenance-panel.class.d.ts +2 -1
  393. package/dist/components/retrieval/provenance-panel/provenance-panel.class.js +1 -1
  394. package/dist/components/retrieval/retrieval-results/retrieval-results.class.d.ts +1 -1
  395. package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +5 -5
  396. package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.js +1 -1
  397. package/dist/components/retrieval/source-picker/source-picker.class.d.ts +2 -1
  398. package/dist/components/retrieval/source-picker/source-picker.class.js +2 -2
  399. package/dist/components/utility/copy-button/copy-button.class.d.ts +2 -1
  400. package/dist/components/utility/copy-button/copy-button.class.js +1 -1
  401. package/dist/components/utility/diff-view/diff-view.class.d.ts +4 -1
  402. package/dist/components/utility/diff-view/diff-view.class.js +1 -1
  403. package/dist/components/utility/export-button/export-button.class.d.ts +2 -2
  404. package/dist/components/utility/export-button/export-button.class.js +1 -1
  405. package/dist/components/utility/export-button/export-button.styles.js +1 -1
  406. package/dist/components/utility/format/format-date.class.js +1 -1
  407. package/dist/components/utility/format/format-number.class.d.ts +3 -1
  408. package/dist/components/utility/format/format-options.js +1 -1
  409. package/dist/components/utility/format/relative-time.class.js +1 -1
  410. package/dist/components/utility/icon/dompurify-loader.js +1 -1
  411. package/dist/components/utility/icon/icon-library.js +1 -1
  412. package/dist/components/utility/intersection-observer/intersection-observer.class.js +1 -1
  413. package/dist/components/utility/json-viewer/json-viewer.class.d.ts +6 -3
  414. package/dist/components/utility/json-viewer/json-viewer.class.js +5 -5
  415. package/dist/components/utility/known-date/known-date.class.d.ts +9 -5
  416. package/dist/components/utility/known-date/known-date.class.js +2 -2
  417. package/dist/components/utility/known-date/known-date.styles.js +1 -1
  418. package/dist/components/utility/mention-popover/mention-popover.class.d.ts +32 -45
  419. package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
  420. package/dist/components/utility/mutation-observer/mutation-observer.class.js +1 -1
  421. package/dist/components/utility/poll-status/poll-status.class.d.ts +3 -0
  422. package/dist/components/utility/poll-status/poll-status.styles.js +1 -1
  423. package/dist/components/viewers/calendar-viewer/calendar-loader.js +1 -1
  424. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.d.ts +1 -0
  425. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
  426. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.d.ts +2 -1
  427. package/dist/components/viewers/dataset-viewer/dataset-viewer.styles.js +1 -1
  428. package/dist/components/viewers/document-compare/document-compare.class.d.ts +11 -8
  429. package/dist/components/viewers/document-compare/document-compare.class.js +2 -2
  430. package/dist/components/viewers/document-preview/document-preview.class.d.ts +8 -4
  431. package/dist/components/viewers/document-preview/document-preview.class.js +4 -4
  432. package/dist/components/viewers/document-preview/document-preview.styles.js +1 -1
  433. package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +5 -2
  434. package/dist/components/viewers/document-viewer/document-viewer.class.js +2 -2
  435. package/dist/components/viewers/document-viewer/document-viewer.styles.js +1 -1
  436. package/dist/components/viewers/document-viewer/registry-ownership.d.ts +1 -0
  437. package/dist/components/viewers/document-viewer/registry-ownership.js +1 -0
  438. package/dist/components/viewers/document-viewer/registry.js +1 -1
  439. package/dist/components/viewers/docx-viewer/docx-loader.js +1 -1
  440. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
  441. package/dist/components/viewers/ebook-viewer/ebook-loader.d.ts +1 -1
  442. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.d.ts +8 -2
  443. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
  444. package/dist/components/viewers/email-viewer/email-loader.js +1 -1
  445. package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +3 -2
  446. package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
  447. package/dist/components/viewers/html-viewer/dompurify-loader.js +1 -1
  448. package/dist/components/viewers/include/include-resource.js +1 -1
  449. package/dist/components/viewers/include/include.class.d.ts +3 -1
  450. package/dist/components/viewers/notebook-viewer/dompurify-loader.js +1 -1
  451. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.d.ts +4 -2
  452. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +4 -4
  453. package/dist/components/viewers/notebook-viewer/notebook-viewer.styles.js +1 -1
  454. package/dist/components/viewers/passive-markup.js +1 -1
  455. package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
  456. package/dist/components/viewers/pptx-viewer/pptx-loader.js +1 -1
  457. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-loader.js +1 -1
  458. package/dist/components/viewers/svg-viewer/dompurify-loader.js +1 -1
  459. package/dist/components/viewers/svg-viewer/svg-viewer.class.d.ts +2 -1
  460. package/dist/components/viewers/svg-viewer/svg-viewer.styles.js +1 -1
  461. package/dist/components/viewers/viewer-loading.js +1 -1
  462. package/dist/components/viewers/viewer-search-limits.d.ts +2 -0
  463. package/dist/components/viewers/viewer-search-limits.js +1 -1
  464. package/dist/components/viewers/xml-viewer/xml-viewer.class.d.ts +2 -1
  465. package/dist/components/viewers/xml-viewer/xml-viewer.class.js +1 -1
  466. package/dist/components/viewers/xml-viewer/xml-viewer.js +1 -1
  467. package/dist/custom-elements-jsx.d.ts +1 -1
  468. package/dist/events.d.ts +13 -6
  469. package/dist/internal/aria-controls.d.ts +16 -13
  470. package/dist/internal/aria-controls.js +1 -1
  471. package/dist/internal/aria-reflection.js +1 -1
  472. package/dist/internal/catalog-picker.d.ts +2 -2
  473. package/dist/internal/catalog-picker.js +1 -1
  474. package/dist/internal/chart-annotation-registration.d.ts +1 -0
  475. package/dist/internal/chart-annotation-registration.js +1 -0
  476. package/dist/internal/data-descriptors.d.ts +13 -0
  477. package/dist/internal/data-descriptors.js +1 -0
  478. package/dist/internal/default-strings.generated.d.ts +1 -1
  479. package/dist/internal/default-strings.generated.js +2 -2
  480. package/dist/internal/dev-mode-attribute-warning.d.ts +3 -0
  481. package/dist/internal/dev-mode-attribute-warning.js +1 -1
  482. package/dist/internal/element-internals.d.ts +4 -3
  483. package/dist/internal/element-internals.js +1 -1
  484. package/dist/internal/form-associated.js +1 -1
  485. package/dist/internal/highlight-collection.d.ts +2 -0
  486. package/dist/internal/highlight-collection.js +1 -1
  487. package/dist/internal/localization-types.d.ts +1 -1
  488. package/dist/internal/localization.js +2 -2
  489. package/dist/internal/lyra-element.d.ts +10 -1
  490. package/dist/internal/lyra-element.js +2 -1
  491. package/dist/internal/native-control-description.d.ts +7 -0
  492. package/dist/internal/native-control-description.js +1 -0
  493. package/dist/internal/option-selection.js +1 -1
  494. package/dist/internal/overlay-order.d.ts +6 -0
  495. package/dist/internal/overlay-order.js +1 -0
  496. package/dist/internal/overlay-stack.d.ts +1 -1
  497. package/dist/internal/overlay-stack.js +1 -1
  498. package/dist/internal/package-metadata.d.ts +1 -1
  499. package/dist/internal/package-metadata.js +1 -1
  500. package/dist/internal/papaparse-loader.js +1 -1
  501. package/dist/internal/positioner.d.ts +5 -4
  502. package/dist/internal/pseudo-localization.js +1 -1
  503. package/dist/internal/reactive-property-writes.d.ts +1 -0
  504. package/dist/internal/reactive-property-writes.js +1 -0
  505. package/dist/internal/safe-css.js +1 -1
  506. package/dist/internal/step-value.d.ts +6 -0
  507. package/dist/internal/step-value.js +1 -0
  508. package/dist/internal/svg-title.d.ts +3 -0
  509. package/dist/internal/svg-title.js +1 -0
  510. package/dist/internal/text-quote.js +1 -1
  511. package/dist/lyra.d.ts +1 -1
  512. package/dist/svelte.d.ts +1 -1
  513. package/dist/translations/ar.js +2 -2
  514. package/dist/translations/de.js +2 -2
  515. package/dist/translations/es.js +2 -2
  516. package/dist/translations/fa.js +2 -2
  517. package/dist/translations/fr.js +2 -2
  518. package/dist/translations/he.js +2 -2
  519. package/dist/translations/ja.js +2 -2
  520. package/dist/translations/pseudo/ar-XB.js +1 -1
  521. package/dist/translations/pt-BR.js +2 -2
  522. package/dist/translations/ru.js +2 -2
  523. package/dist/translations/zh-CN.js +2 -2
  524. package/dist/vue.d.ts +1 -1
  525. package/llms/components/lr-accordion-item.md +10 -5
  526. package/llms/components/lr-accordion.md +10 -5
  527. package/llms/components/lr-activity-feed.md +6 -5
  528. package/llms/components/lr-agent-run.md +1 -1
  529. package/llms/components/lr-agent-trace.md +3 -0
  530. package/llms/components/lr-agent-workspace.md +3 -2
  531. package/llms/components/lr-animation.md +4 -0
  532. package/llms/components/lr-app-rail-item.md +4 -2
  533. package/llms/components/lr-app-rail.md +4 -2
  534. package/llms/components/lr-attachment-chip.md +8 -3
  535. package/llms/components/lr-audio-visualizer.md +9 -6
  536. package/llms/components/lr-av-player.md +14 -0
  537. package/llms/components/lr-avatar.md +4 -0
  538. package/llms/components/lr-bar-chart.md +2 -2
  539. package/llms/components/lr-box-plot.md +15 -6
  540. package/llms/components/lr-bubble-chart.md +2 -2
  541. package/llms/components/lr-button.md +11 -3
  542. package/llms/components/lr-calendar-viewer.md +4 -0
  543. package/llms/components/lr-calendar.md +15 -4
  544. package/llms/components/lr-carousel.md +5 -0
  545. package/llms/components/lr-chart.md +24 -9
  546. package/llms/components/lr-chat-composer.md +2 -1
  547. package/llms/components/lr-chat-message.md +4 -0
  548. package/llms/components/lr-checkbox.md +3 -0
  549. package/llms/components/lr-chip-group.md +3 -0
  550. package/llms/components/lr-chip.md +3 -0
  551. package/llms/components/lr-chunk-inspector.md +2 -2
  552. package/llms/components/lr-code-block-core.md +20 -8
  553. package/llms/components/lr-code-block.md +17 -14
  554. package/llms/components/lr-code-editor.md +20 -5
  555. package/llms/components/lr-color-picker.md +9 -0
  556. package/llms/components/lr-combobox.md +35 -4
  557. package/llms/components/lr-command-palette.md +4 -0
  558. package/llms/components/lr-commit-card.md +3 -0
  559. package/llms/components/lr-compare-panel.md +7 -0
  560. package/llms/components/lr-condition-builder.md +5 -0
  561. package/llms/components/lr-conversation-item.md +3 -0
  562. package/llms/components/lr-copy-button.md +10 -1
  563. package/llms/components/lr-dashboard-grid.md +5 -0
  564. package/llms/components/lr-data-grid.md +22 -3
  565. package/llms/components/lr-dataset-viewer.md +3 -2
  566. package/llms/components/lr-date-input.md +50 -6
  567. package/llms/components/lr-date-picker.md +51 -7
  568. package/llms/components/lr-details.md +10 -5
  569. package/llms/components/lr-dialog.md +4 -0
  570. package/llms/components/lr-diff-view.md +6 -0
  571. package/llms/components/lr-document-compare.md +6 -2
  572. package/llms/components/lr-document-library.md +4 -0
  573. package/llms/components/lr-document-preview.md +18 -4
  574. package/llms/components/lr-document-viewer.md +14 -4
  575. package/llms/components/lr-docx-viewer.md +6 -0
  576. package/llms/components/lr-doughnut-chart.md +2 -2
  577. package/llms/components/lr-dropdown-item.md +4 -0
  578. package/llms/components/lr-dropdown.md +3 -0
  579. package/llms/components/lr-ebook-viewer.md +12 -3
  580. package/llms/components/lr-email-viewer.md +10 -0
  581. package/llms/components/lr-emoji-picker.md +17 -3
  582. package/llms/components/lr-empty.md +3 -0
  583. package/llms/components/lr-entity-card.md +3 -0
  584. package/llms/components/lr-entity-chip.md +4 -0
  585. package/llms/components/lr-eval-dataset.md +2 -2
  586. package/llms/components/lr-export-button.md +9 -0
  587. package/llms/components/lr-file-input.md +12 -8
  588. package/llms/components/lr-file-tree.md +5 -1
  589. package/llms/components/lr-filter-bar.md +5 -0
  590. package/llms/components/lr-flow-canvas.md +8 -1
  591. package/llms/components/lr-flow-node.md +2 -1
  592. package/llms/components/lr-flow-run-status.md +1 -1
  593. package/llms/components/lr-format-date.md +3 -1
  594. package/llms/components/lr-format-number.md +4 -0
  595. package/llms/components/lr-funnel.md +4 -0
  596. package/llms/components/lr-gauge.md +4 -0
  597. package/llms/components/lr-generation-metrics.md +5 -0
  598. package/llms/components/lr-graph-legend.md +4 -2
  599. package/llms/components/lr-graph-query-builder.md +6 -0
  600. package/llms/components/lr-graph.md +8 -2
  601. package/llms/components/lr-grounding-summary.md +8 -8
  602. package/llms/components/lr-heatmap.md +13 -0
  603. package/llms/components/lr-histogram.md +2 -2
  604. package/llms/components/lr-icon-button.md +7 -0
  605. package/llms/components/lr-image-viewer.md +9 -0
  606. package/llms/components/lr-include.md +5 -0
  607. package/llms/components/lr-ingestion-queue.md +5 -1
  608. package/llms/components/lr-input.md +22 -8
  609. package/llms/components/lr-intersection-observer.md +9 -0
  610. package/llms/components/lr-json-viewer.md +10 -1
  611. package/llms/components/lr-kbd.md +3 -0
  612. package/llms/components/lr-knowledge-base.md +10 -1
  613. package/llms/components/lr-knowledge-graph-explorer.md +7 -0
  614. package/llms/components/lr-known-date.md +7 -0
  615. package/llms/components/lr-line-chart.md +2 -2
  616. package/llms/components/lr-lite-chart.md +29 -9
  617. package/llms/components/lr-live-region.md +3 -0
  618. package/llms/components/lr-locale-picker.md +12 -0
  619. package/llms/components/lr-map.md +23 -5
  620. package/llms/components/lr-markdown-core.md +4 -0
  621. package/llms/components/lr-markdown.md +15 -8
  622. package/llms/components/lr-media-card.md +5 -8
  623. package/llms/components/lr-mention-popover.md +17 -10
  624. package/llms/components/lr-menu-item.md +4 -0
  625. package/llms/components/lr-menu-label.md +4 -3
  626. package/llms/components/lr-menu.md +4 -0
  627. package/llms/components/lr-message-actions.md +13 -3
  628. package/llms/components/lr-message-feedback.md +24 -7
  629. package/llms/components/lr-message-parts.md +6 -3
  630. package/llms/components/lr-model-select.md +13 -2
  631. package/llms/components/lr-multi-split.md +20 -7
  632. package/llms/components/lr-mutation-observer.md +8 -0
  633. package/llms/components/lr-native-time-input.md +10 -0
  634. package/llms/components/lr-node-palette.md +8 -2
  635. package/llms/components/lr-notebook-viewer.md +4 -1
  636. package/llms/components/lr-number-input.md +12 -1
  637. package/llms/components/lr-option.md +35 -4
  638. package/llms/components/lr-otp-input.md +10 -0
  639. package/llms/components/lr-pan-zoom.md +1 -2
  640. package/llms/components/lr-phone-input.md +20 -5
  641. package/llms/components/lr-pie-chart.md +2 -2
  642. package/llms/components/lr-polar-area-chart.md +2 -2
  643. package/llms/components/lr-poll-status.md +4 -0
  644. package/llms/components/lr-popover.md +3 -0
  645. package/llms/components/lr-popup.md +3 -2
  646. package/llms/components/lr-prompt-input.md +7 -3
  647. package/llms/components/lr-prompt-queue.md +6 -0
  648. package/llms/components/lr-prompt-studio.md +7 -0
  649. package/llms/components/lr-provenance-panel.md +3 -0
  650. package/llms/components/lr-push-to-talk.md +8 -0
  651. package/llms/components/lr-qr-code.md +6 -0
  652. package/llms/components/lr-radar-chart.md +2 -2
  653. package/llms/components/lr-radio-button.md +13 -4
  654. package/llms/components/lr-radio-group.md +5 -0
  655. package/llms/components/lr-radio.md +9 -0
  656. package/llms/components/lr-rating.md +8 -0
  657. package/llms/components/lr-relative-time.md +2 -0
  658. package/llms/components/lr-reorder-item.md +6 -0
  659. package/llms/components/lr-reorder-list.md +6 -0
  660. package/llms/components/lr-result-card.md +6 -3
  661. package/llms/components/lr-result-field.md +6 -3
  662. package/llms/components/lr-retrieval-results.md +1 -1
  663. package/llms/components/lr-rubric-form.md +12 -0
  664. package/llms/components/lr-scatter-chart.md +2 -2
  665. package/llms/components/lr-scroller.md +5 -5
  666. package/llms/components/lr-select.md +9 -0
  667. package/llms/components/lr-sequence-playback.md +5 -2
  668. package/llms/components/lr-slider.md +19 -5
  669. package/llms/components/lr-source-picker.md +4 -0
  670. package/llms/components/lr-span-waterfall.md +3 -0
  671. package/llms/components/lr-sparkline.md +4 -0
  672. package/llms/components/lr-split-panel.md +4 -0
  673. package/llms/components/lr-stack-trace.md +3 -0
  674. package/llms/components/lr-stat.md +10 -0
  675. package/llms/components/lr-streaming-text.md +2 -3
  676. package/llms/components/lr-subagent-panel.md +3 -2
  677. package/llms/components/lr-svg-viewer.md +3 -0
  678. package/llms/components/lr-swatch-picker.md +4 -0
  679. package/llms/components/lr-switch.md +6 -0
  680. package/llms/components/lr-tab-group.md +4 -0
  681. package/llms/components/lr-table.md +10 -2
  682. package/llms/components/lr-terminal.md +17 -5
  683. package/llms/components/lr-textarea.md +9 -0
  684. package/llms/components/lr-thinking-panel.md +3 -1
  685. package/llms/components/lr-thread-list.md +26 -4
  686. package/llms/components/lr-time-input.md +3 -0
  687. package/llms/components/lr-time-range.md +5 -0
  688. package/llms/components/lr-timeline-item.md +6 -0
  689. package/llms/components/lr-timeline.md +6 -0
  690. package/llms/components/lr-token-input.md +14 -0
  691. package/llms/components/lr-tool-call-chip.md +7 -5
  692. package/llms/components/lr-tool-param-form.md +6 -2
  693. package/llms/components/lr-tool-result-dialog.md +4 -0
  694. package/llms/components/lr-tool-result-view.md +2 -3
  695. package/llms/components/lr-tool-select-dialog.md +6 -2
  696. package/llms/components/lr-tooltip.md +6 -0
  697. package/llms/components/lr-trace-tree.md +3 -0
  698. package/llms/components/lr-transcript-feed.md +3 -0
  699. package/llms/components/lr-tree-item.md +12 -5
  700. package/llms/components/lr-tree.md +12 -5
  701. package/llms/components/lr-typing-indicator.md +3 -0
  702. package/llms/components/lr-usage-badge.md +4 -0
  703. package/llms/components/lr-video.md +8 -2
  704. package/llms/components/lr-virtual-list.md +5 -3
  705. package/llms/components/lr-voice-picker.md +15 -2
  706. package/llms/components/lr-widget-renderer.md +21 -13
  707. package/llms/components/lr-widget.md +4 -2
  708. package/llms/components/lr-word-cloud.md +4 -0
  709. package/llms/components/lr-xml-viewer.md +9 -2
  710. package/llms/components/lr-zoomable-frame.md +6 -3
  711. package/llms/peers.md +5 -5
  712. package/llms/shared.md +74 -63
  713. package/llms-full.txt +4705 -2954
  714. package/package.json +19 -14
  715. package/vscode-css-data.json +1 -1
  716. package/vscode-html-data.json +1 -1
  717. package/web-types.json +1 -1
  718. package/dist/components/viewers/docx-viewer/fixtures/minimal-docx-fixture.d.ts +0 -1
  719. package/dist/components/viewers/docx-viewer/fixtures/minimal-docx-fixture.js +0 -1
  720. package/dist/components/viewers/ebook-viewer/fixtures/minimal-epub-fixture.d.ts +0 -1
  721. package/dist/components/viewers/ebook-viewer/fixtures/minimal-epub-fixture.js +0 -1
  722. package/dist/components/viewers/spreadsheet-viewer/fixtures/minimal-xlsx-fixture.d.ts +0 -1
  723. package/dist/components/viewers/spreadsheet-viewer/fixtures/minimal-xlsx-fixture.js +0 -1
@@ -19,7 +19,8 @@ export interface LyraMapChoroplethLayer{readonly sourceId:string;readonly geojso
19
19
  /**
20
20
  * `[value, color]` pairs, ascending by `value`, fed to a maplibre-gl `interpolate` or `step`
21
21
  * expression. CSS custom-property references are resolved against the host before they reach
22
- * MapLibre's WebGL canvas. Must contain at least one pair -- an empty array can't build a valid
22
+ * MapLibre's WebGL canvas and refreshed on live ancestor theme changes without rebuilding map
23
+ * sources or layers. Must contain at least one pair -- an empty array can't build a valid
23
24
  * expression, so it's ignored (the existing fill layer, if any, is left as-is) rather than
24
25
  * applied.
25
26
  */
@@ -43,7 +44,8 @@ readonly interpolation?:LyraMapChoroplethInterpolation;
43
44
  *
44
45
  * Defaults to the first stop's own color, which makes the common case (a legend whose first band
45
46
  * starts at the data's minimum) need no extra configuration. CSS custom-property references are
46
- * resolved against the host before reaching MapLibre. Set it when the map should distinguish
47
+ * resolved against the host before reaching MapLibre and refreshed with the stop colors on
48
+ * live theme changes. Set it when the map should distinguish
47
49
  * "below the lowest advertised band" from the lowest band itself.
48
50
  */
49
51
  readonly stepBaseColor?:string;}
@@ -226,28 +228,7 @@ export interface LyraMapInstance{getCanvas():HTMLCanvasElement;getCenter():{lng:
226
228
  */
227
229
  setMaxBounds?(bounds?:unknown):unknown;}
228
230
  /** A pan-constraining box, `[[west, south], [east, north]]`, in the order maplibre-gl takes. */
229
- export type LyraMapBounds=readonly[readonly[number,number],readonly[number,number]];
230
- /**
231
- * Builds a maplibre-gl `updateData()` diff when stable feature ids make the change addressable,
232
- * and returns `null` otherwise so the caller replaces the whole source instead. Property changes,
233
- * additions, removals, and order changes all stay on the incremental path.
234
- *
235
- * `setData()` unconditionally re-tiles and repaints an entire source with no diffing. That is
236
- * invisible on a static map and expensive on an animated one: advancing a choropleth a step every
237
- * few hundred milliseconds re-tiles every polygon each time, when all that changed were the values
238
- * driving the colour ramp.
239
- *
240
- * Geometry and bbox values must remain semantically unchanged. The component's ownership boundary
241
- * necessarily detaches them on every accepted assignment, so reference identity cannot establish
242
- * that fact; a bounded, accessor-free comparison verifies their JSON data graph instead. Any
243
- * uncertainty still falls back to `setData()`.
244
- *
245
- * MapLibre applies removals before additions. To preserve the feature collection's observable
246
- * order, the longest next-order prefix already appearing in previous order stays in place; the
247
- * remaining suffix is removed and re-added in its exact next order. Appends and ordinary removals
248
- * therefore remain minimal, while a reorder changes only the suffix it invalidated.
249
- */
250
- export declare function buildGeoJsonPropertyDiff(previous:unknown,next:unknown):MapLibreGeoJsonDiff|null;export interface LyraMapEventMap{'lr-map-load':CustomEvent<null>;'lr-map-marker-activate':CustomEvent<LyraMapMarkerActivationDetail>;'lr-map-click':CustomEvent<{readonly lngLat:readonly[number,number];readonly feature:Feature|undefined;
231
+ export type LyraMapBounds=readonly[readonly[number,number],readonly[number,number]];export declare function buildGeoJsonPropertyDiff(previous:unknown,next:unknown):MapLibreGeoJsonDiff|null;export interface LyraMapEventMap{'lr-map-load':CustomEvent<null>;'lr-map-marker-activate':CustomEvent<LyraMapMarkerActivationDetail>;'lr-map-click':CustomEvent<{readonly lngLat:readonly[number,number];readonly feature:Feature|undefined;
251
232
  /** Which layer `feature` was hit on, so a click is attributable when both a choropleth and
252
233
  * `dataLayers` are painted. `'cluster'` marks a hit on a clustered entry's aggregate circle,
253
234
  * whose `point_count`/`cluster_id` properties describe the group rather than one feature.
@@ -283,8 +264,12 @@ readonly sourceId:string|undefined;}>;}
283
264
  * its backing MapLibre source and layers use collision-free component-owned
284
265
  * ids and must not be accessed through `map`.
285
266
  *
286
- * Collection-bearing inputs take bounded, recursively frozen snapshots synchronously. Mutate a
287
- * copy and reassign it to update the map; later changes to the assigned source are not observed.
267
+ * Collection-bearing control data is admitted through bounded, descriptor-safe projections whose
268
+ * retained configuration is frozen. Opaque `choropleth.geojson`, `dataLayers[].geojson`, and
269
+ * marker `unsafeHtml` values retain their original identity only at the MapLibre/Popup and
270
+ * immutable `lr-map-marker-activate` detail boundaries; the component does not inspect them
271
+ * again after admission. Reassign control input when its configuration changes rather than
272
+ * relying on mutation of its admitted projection.
288
273
  *
289
274
  * @customElement lr-map
290
275
  * @event lr-map-load - Fired once the underlying maplibregl.Map loads.
@@ -338,11 +323,12 @@ readonly sourceId:string|undefined;}>;}
338
323
  * @since 4.0.0
339
324
  */
340
325
  export declare class LyraMap extends LyraElement<LyraMapEventMap>{protected static readonly immutableEventDetails:readonly string[];
341
- /** `feature` is a maplibre-gl `queryRenderedFeatures()` result -- not a plain object the generic
342
- * event-detail snapshotter can structurally clone, so its identity is preserved instead of being
343
- * walked (which would otherwise silently collapse it to `undefined`). `lngLat` still gets the
344
- * normal detached-and-frozen snapshot treatment. */
345
- protected static readonly identityEventDetailProperties:Readonly<{'lr-map-click':readonly string[];}>;protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[];
326
+ /** MapLibre features and admitted marker snapshots carry opaque peer values that the generic
327
+ * event-detail snapshotter must not walk. The marker is already a frozen canonical record; its
328
+ * `unsafeHtml` value therefore reaches both Popup and activation consumers by identity. */
329
+ protected static readonly identityEventDetailProperties:Readonly<{'lr-map-click':readonly string[];'lr-map-marker-activate':readonly string[];}>;protected static readonly ownedCollectionProperties:readonly string[];
330
+ /** The retained raw values are opaque after their schema projections below admit them. */
331
+ protected static readonly identityCollectionProperties:readonly string[];protected static readonly identityCollectionObjectProperties:readonly string[];static styles:import("lit").CSSResultGroup[];
346
332
  /** Starts the shared optional-peer import without constructing a map. Returns false when the
347
333
  * peer is unavailable, so applications can decide whether to render their own fallback before
348
334
  * connecting an element. */
@@ -426,7 +412,9 @@ markers:readonly LyraMapMarker[];
426
412
  * be; `kind: 'heatmap'` replaces the geometry split with MapLibre's own `heatmap` layer. Neither
427
413
  * changes an entry that sets neither.
428
414
  */
429
- dataLayers:readonly LyraMapGeoJsonDataLayer[];
415
+ dataLayers:readonly LyraMapGeoJsonDataLayer[];private _canonicalChoroplethSource;private _canonicalChoropleth;private _canonicalDataLayersSource;private _canonicalDataLayers;private _canonicalMarkersSource;private _canonicalMarkers;
416
+ /** A property assignment gets one descriptor projection; every subsequent map path uses it. */
417
+ private get canonicalChoropleth();private get canonicalDataLayers();private get canonicalMarkers();
430
418
  /** Accessible name for MapLibre's focusable canvas. A nonempty host `aria-label` remains the
431
419
  * overall component name and is not cloned onto the nested focus owner; the canvas uses this
432
420
  * purpose-specific label or the localized `map` message. An explicit empty host name is
@@ -503,7 +491,7 @@ private get safeCenter();connectedCallback():void;disconnectedCallback():void;pr
503
491
  */
504
492
  private tryConstructMap;protected updated(changed:PropertyValues):void;protected willUpdate(changed:PropertyValues):void;
505
493
  /** Repaints token-derived MapLibre values without touching sources, layers, or map geometry. */
506
- private refreshThemePaint;private applyChoropleth;
494
+ private refreshThemePaint;private applyChoropleth;private choroplethColorExpression;
507
495
  /**
508
496
  * Keeps the choropleth out of every caller-controlled data-layer namespace. Repeatedly prefixing
509
497
  * is intentional: a consumer may legitimately supply both `shared` and
@@ -582,7 +570,7 @@ private styleProvidesGlyphs;
582
570
  /** Allocates a private source/layer namespace that cannot overwrite base-style resources. */
583
571
  private resolveDataLayerSourceId;
584
572
  /** Removes one previously-applied `dataLayers` entry's source/layers, if present. */
585
- private removeDataLayer;private applyMarkers;private readonly configuredMarkerElements;private configureMarkerInteraction;private emitMarkerActivation;private get effectiveMapLabel();private validMarkerLngLat;private popupId;private configurePopupSemantics;private stopObservingMapAllocation;
573
+ private removeDataLayer;private applyMarkers;private readonly configuredMarkerElements;private configureMarkerInteraction;private emitMarkerActivation;private get effectiveMapLabel();private popupId;private configurePopupSemantics;private stopObservingMapAllocation;
586
574
  /** Keeps MapLibre's canvas allocation synchronized with this component's live container. */
587
575
  private observeMapAllocation;private stopObservingPeerChrome;
588
576
  /** Projects stable Lyra parts onto peer-owned nodes without erasing existing part tokens. */
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{devWarnOnce}from"../../../internal/dev-mode-attribute-warning.js";import{sanitizeCssColor}from"../../../internal/safe-css.js";import{finiteRange}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{notifyMapCanvasReady}from"../../../internal/map-canvas-ready.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{srOnly}from"../../../internal/a11y.js";import{ThemeWatcher}from"../../../internal/theme-watcher.js";import{loadMaplibre}from"./map-loader.js";import{styles}from"./map.styles.js";import"../../overlays/skeleton/skeleton.class.js";import{LYRA_DEFAULT_close,LYRA_DEFAULT_items,LYRA_DEFAULT_loading,LYRA_DEFAULT_map,LYRA_DEFAULT_mapInitializationFailed,LYRA_DEFAULT_mapLegend,LYRA_DEFAULT_mapMissingLibrary,LYRA_DEFAULT_mapStyleRequired,LYRA_DEFAULT_mapWebglUnavailable,LYRA_DEFAULT_paginationSummary}from"../../../internal/default-strings.generated.js";function supportsWebGL2(host){try{const context=host.ownerDocument.createElement("canvas").getContext("webgl2");if(!context)return!1;try{context.getExtension("WEBGL_lose_context")?.loseContext()}catch{}return!0}catch{return!1}}function hasMapStyle(style){return typeof style=="string"?style.trim().length>0:style!==void 0}const MAX_MAP_LEGEND_GRADIENT_STOPS=64;function normalizeMapLegendGradient(value){if(!Array.isArray(value))return[];const usable=[],scanCount=Math.min(value.length,MAX_MAP_LEGEND_GRADIENT_STOPS);for(let index=0;index<scanCount;index+=1){const stop=value[index];if(!Array.isArray(stop)||stop.length<2)continue;const[rawValue,rawColor]=stop;if(typeof rawValue!="number"||!Number.isFinite(rawValue)||typeof rawColor!="string")continue;const color=sanitizeCssColor(rawColor);color&&usable.push([rawValue,color])}return usable.length<2?[]:Object.freeze([...usable].sort((a,b)=>a[0]-b[0]))}const MAP_LEGEND_ITEM_LIMIT=100,MAP_LEGEND_SCAN_LIMIT=1e3,MAP_LEGEND_LABEL_LIMIT=256,MAP_LEGEND_TOTAL_LABEL_LIMIT=8192,MAP_LEGEND_COLOR_LIMIT=256,MAP_LEGEND_PATTERNS=new Set(["solid","diagonal","dots","crosshatch"]),EMPTY_MAP_LEGEND=Object.freeze([]),EMPTY_MAP_LEGEND_PROJECTION=Object.freeze({inputCount:0,renderedCount:0,omittedCount:0,truncatedLabelCount:0,truncated:!1});function boundedLegendText(value,limit){return value.length<=limit?value:`${value.slice(0,Math.max(0,limit-1))}\u2026`}function normalizeMapLegend(value){let input;try{input=Array.isArray(value)?value:[]}catch{input=[]}let inputCount=0;try{inputCount=Math.max(0,Math.min(Number.MAX_SAFE_INTEGER,input.length))}catch{inputCount=0}const entries=[];let labelCharacters=0,truncatedLabelCount=0;const scanCount=Math.min(inputCount,MAP_LEGEND_SCAN_LIMIT);for(let index=0;index<scanCount&&entries.length<MAP_LEGEND_ITEM_LIMIT;index++)try{const candidate=input[index];if(!candidate||typeof candidate!="object")continue;const rawColor=candidate.color,rawLabel=candidate.label,rawPattern=candidate.pattern;if(typeof rawColor!="string"||typeof rawLabel!="string"||typeof rawPattern!="string"||!MAP_LEGEND_PATTERNS.has(rawPattern))continue;const remaining=MAP_LEGEND_TOTAL_LABEL_LIMIT-labelCharacters;if(remaining<=0)break;const labelLimit=Math.min(MAP_LEGEND_LABEL_LIMIT,remaining),label=boundedLegendText(rawLabel,labelLimit);if(!label.trim())continue;rawLabel.length>labelLimit&&truncatedLabelCount++,labelCharacters+=label.length,entries.push(Object.freeze({color:rawColor.slice(0,MAP_LEGEND_COLOR_LIMIT),label,pattern:rawPattern}))}catch{}const frozenEntries=entries.length?Object.freeze(entries):EMPTY_MAP_LEGEND,omittedCount=Math.max(0,inputCount-frozenEntries.length),projection=Object.freeze({inputCount,renderedCount:frozenEntries.length,omittedCount,truncatedLabelCount,truncated:omittedCount>0||truncatedLabelCount>0});return{entries:frozenEntries,projection}}function addPartToken(element,token){const tokens=new Set((element.getAttribute("part")??"").split(/\s+/).filter(Boolean));tokens.add(token),element.setAttribute("part",[...tokens].join(" "))}const CHOROPLETH_LOG_INTERPOLATION_BASE=.25,CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL=8;function choroplethLogInterpolationFactor(input,lower,upper){const difference=upper-lower;if(difference===0)return 0;const progress=input-lower;return(Math.pow(CHOROPLETH_LOG_INTERPOLATION_BASE,progress)-1)/(Math.pow(CHOROPLETH_LOG_INTERPOLATION_BASE,difference)-1)}function compactGradientPercent(value){return String(Math.round(Math.min(100,Math.max(0,value))*1e4)/1e4)}function choroplethLegendGradientImage(stops,interpolation){const lo=stops[0],span=stops[stops.length-1][0]-lo[0],stopPercent=(value,index)=>span>0?(value-lo[0])/span*100:index/(stops.length-1)*100;if(interpolation!=="logarithmic"||span<=0)return`linear-gradient(to right, ${stops.map(([value,color],index)=>`${color} ${compactGradientPercent(stopPercent(value,index))}%`).join(", ")})`;const image=[`${lo[1]} 0%`];for(let index=1;index<stops.length;index+=1){const lower=stops[index-1],upper=stops[index],interval=upper[0]-lower[0];if(interval<=0){image.push(`${upper[1]} ${compactGradientPercent(stopPercent(upper[0],index))}%`);continue}for(let sample=1;sample<=CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL;sample+=1){const intervalProgress=sample/CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL,input=lower[0]+interval*intervalProgress,position=(input-lo[0])/span*100;if(sample===CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL){image.push(`${upper[1]} ${compactGradientPercent(position)}%`);continue}const factor=Math.min(1,Math.max(0,choroplethLogInterpolationFactor(input,lower[0],upper[0]))),lowerWeight=compactGradientPercent((1-factor)*100),upperWeight=compactGradientPercent(factor*100);image.push(`color-mix(in srgb, ${lower[1]} ${lowerWeight}%, ${upper[1]} ${upperWeight}%) ${compactGradientPercent(position)}%`)}}return`linear-gradient(to right, ${image.join(", ")})`}const MAX_MAP_MARKERS=2e3;function popupText(host,markup){const template=host.ownerDocument.createElement("template");template.innerHTML=markup;for(const hidden of template.content.querySelectorAll('script, style, template, [hidden], [aria-hidden="true"]'))hidden.remove();return(template.content.textContent??"").replace(/\s+/gu," ").trim()}const MAX_MAP_DATA_LAYERS=100;function normalizedDataLayers(value){if(!Array.isArray(value))return[];const output=[],seenSourceIds=new Set,scanCount=Math.min(value.length,MAX_MAP_DATA_LAYERS);for(let index=0;index<scanCount;index++){const candidate=value[index];try{if(candidate===null||typeof candidate!="object"||Array.isArray(candidate))continue;const rawSourceId=candidate.sourceId;if(typeof rawSourceId!="string")continue;const sourceId=rawSourceId.trim();if(sourceId.length===0||seenSourceIds.has(sourceId))continue;seenSourceIds.add(sourceId),output.push(rawSourceId===sourceId?candidate:{...candidate,sourceId})}catch{}}return output}const DATA_LAYER_SUFFIXES=["-fill","-line","-circle","-cluster","-cluster-count","-heatmap"],QUERYABLE_DATA_LAYER_SUFFIXES=["-fill","-line","-circle","-cluster"],MAX_MAP_STEP_STOPS=32;function normalizedSteps(value,isOutput,clampThreshold=threshold=>threshold){if(!Array.isArray(value))return[];const usable=[],scanCount=Math.min(value.length,MAX_MAP_STEP_STOPS);for(let index=0;index<scanCount;index+=1){const stop=value[index];if(!Array.isArray(stop)||stop.length<2)continue;const[rawThreshold,rawOutput]=stop;typeof rawThreshold!="number"||!Number.isFinite(rawThreshold)||isOutput(rawOutput)&&usable.push([clampThreshold(rawThreshold),rawOutput])}return usable.sort((a,b)=>a[0]-b[0]),usable.filter((stop,index)=>index===0||stop[0]>usable[index-1][0])}const isFiniteOutput=candidate=>typeof candidate=="number"&&Number.isFinite(candidate),isColorOutput=candidate=>typeof candidate=="string"&&candidate.trim().length>0;function stepExpression(input,stops){const expression=["step",input,stops[0][1]];for(const[threshold,output]of stops)expression.push(threshold,output);return expression}const DEFAULT_CLUSTER_RADIUS=50,DEFAULT_CLUSTER_MAX_ZOOM=14,DEFAULT_CLUSTER_RADIUS_STEPS=Object.freeze([[0,14],[10,18],[50,24]]),DEFAULT_HEATMAP_RADIUS=30,DEFAULT_HEATMAP_INTENSITY=1,HEATMAP_TRANSPARENT="rgba(0, 0, 0, 0)";function withTransparentFloor(stops){return stops.length&&stops[0][0]>0?[[0,HEATMAP_TRANSPARENT],...stops]:stops}const MAX_CLUSTER_COUNT_FONTS=8;function normalizedClusterOptions(value){if(value===null||typeof value!="object"||Array.isArray(value))return;const options=value,radiusSteps=normalizedSteps(options.radiusSteps,isFiniteOutput),fonts=Array.isArray(options.countFont)?options.countFont.filter(font=>typeof font=="string"&&font.trim().length>0).slice(0,MAX_CLUSTER_COUNT_FONTS):[];return{radius:finiteRange(Number(options.radius),DEFAULT_CLUSTER_RADIUS,1,1e3),maxZoom:finiteRange(Number(options.maxZoom),DEFAULT_CLUSTER_MAX_ZOOM,0,24),radiusSteps:radiusSteps.length?radiusSteps:DEFAULT_CLUSTER_RADIUS_STEPS,colorSteps:normalizedSteps(options.colorSteps,isColorOutput),countFont:fonts.length?fonts:void 0}}function dataLayerShape(layer){if(layer.kind==="heatmap")return"heatmap";const cluster=normalizedClusterOptions(layer.cluster);return cluster?`cluster:${cluster.radius}:${cluster.maxZoom}:${cluster.countFont?.join(",")??""}`:"auto"}function heatmapWeightExpression(options){const field=typeof options?.weightField=="string"?options.weightField.trim():"";if(!field)return;const range=options?.weightRange,min=Array.isArray(range)?Number(range[0]):Number.NaN,max=Array.isArray(range)?Number(range[1]):Number.NaN;return!Number.isFinite(min)||!Number.isFinite(max)||min>=max?["get",field]:["interpolate",["linear"],["get",field],min,0,max,1]}function heatmapZoomValue(value,fallback,min,max){if(!Array.isArray(value))return finiteRange(Number(value),fallback,min,max);const stops=normalizedSteps(value,isFiniteOutput,zoom=>finiteRange(zoom,0,0,24)).map(([zoom,output])=>[zoom,finiteRange(output,fallback,min,max)]);if(stops.length===0)return fallback;if(stops.length===1)return stops[0][1];const expression=["interpolate",["linear"],["zoom"]];for(const[zoom,output]of stops)expression.push(zoom,output);return expression}const FALLBACK_FILL_OPACITY=.75;function ownerWindow(host){return host.ownerDocument?.defaultView??null}function choroplethFillOpacity(host){const raw=ownerWindow(host)?.getComputedStyle(host).getPropertyValue("--lr-map-choropleth-fill-opacity").trim()??"",parsed=Number.parseFloat(raw);return Number.isFinite(parsed)?parsed:FALLBACK_FILL_OPACITY}const TONE_TOKEN={accent:"--lr-color-brand",success:"--lr-color-success",warning:"--lr-color-warning",danger:"--lr-color-danger",neutral:"--lr-color-text-quiet"},ON_TONE_TOKEN={accent:"--lr-color-on-brand",success:"--lr-color-on-success",warning:"--lr-color-on-warning",danger:"--lr-color-on-danger",neutral:"--lr-color-on-neutral"},HEATMAP_RAMP_TOKENS=Object.freeze([[.25,"--lr-color-brand"],[.5,"--lr-color-success"],[.75,"--lr-color-warning"],[1,"--lr-color-danger"]]);function dataLayerColor(host,tone){const token=TONE_TOKEN[tone??"accent"];return(ownerWindow(host)?.getComputedStyle(host).getPropertyValue(token).trim()??"")||"#0969da"}function resolvedLayerColor(host,explicit,tone){const candidate=typeof explicit=="string"?explicit.trim():"";if(!candidate)return dataLayerColor(host,tone);const reference=/^var\(\s*(--[\w-]+)/.exec(candidate);return reference?ownerWindow(host)?.getComputedStyle(host).getPropertyValue(reference[1]).trim()||dataLayerColor(host,tone):candidate}const UNTILEABLE_SCAN_FEATURE_LIMIT=1e4;function warnOnUntileableProperties(geojson,sourceLabel){const features=geojson?.features;if(!Array.isArray(features))return;const limit=Math.min(features.length,UNTILEABLE_SCAN_FEATURE_LIMIT);for(let index=0;index<limit;index+=1){const feature=features[index],properties=feature?.properties;if(!(!properties||typeof properties!="object"))for(const[key,value]of Object.entries(properties)){if(typeof value!="number"||!Number.isFinite(value)||Math.abs(value)<=Number.MAX_SAFE_INTEGER)continue;const identity=feature?.id??`index ${index}`;devWarnOnce(`lyra-map-untileable-property:${sourceLabel}:${key}`,`<lr-map>: feature ${String(identity)} in "${sourceLabel}" carries ${key}=${value}, which is too large to survive maplibre-gl's vector-tile encoding. Tiling happens in a worker, so the failure would reach you only as an opaque "Given varint doesn't fit into 10 bytes" error while the rest of the layer still paints. Carry a reduced figure in the feature and keep the exact value in your own data.`)}}}const GEOJSON_DIFF_FEATURE_LIMIT=1e4,GEOJSON_DIFF_VALUE_LIMIT=5e4;function isPlainGeoJsonRecord(value){try{const prototype=Object.getPrototypeOf(value);if(prototype===null)return!0;const constructor=Object.getOwnPropertyDescriptor(prototype,"constructor");return!!(constructor&&"value"in constructor&&typeof constructor.value=="function"&&constructor.value.name==="Object"&&Object.getPrototypeOf(prototype)===null)}catch{return!1}}function sameGeoJsonValue(previous,next,comparison){if(comparison.remaining<=0)return!1;if(comparison.remaining-=1,Object.is(previous,next))return!0;if(previous===null||next===null||typeof previous!="object"||typeof next!="object")return!1;const pairedNext=comparison.forward.get(previous);if(pairedNext)return pairedNext===next;const pairedPrevious=comparison.reverse.get(next);if(pairedPrevious)return pairedPrevious===previous;comparison.forward.set(previous,next),comparison.reverse.set(next,previous);const previousIsArray=Array.isArray(previous),nextIsArray=Array.isArray(next);if(previousIsArray||nextIsArray){if(!previousIsArray||!nextIsArray||previous.length!==next.length)return!1;for(let index=0;index<previous.length;index+=1){const before=Object.getOwnPropertyDescriptor(previous,String(index)),after=Object.getOwnPropertyDescriptor(next,String(index));if(!!before!=!!after)return!1;if(!(!before||!after)&&(!("value"in before)||!("value"in after)||!sameGeoJsonValue(before.value,after.value,comparison)))return!1}return!0}if(!isPlainGeoJsonRecord(previous)||!isPlainGeoJsonRecord(next))return!1;const previousKeys=Object.keys(previous),nextKeys=Object.keys(next);if(previousKeys.length!==nextKeys.length)return!1;for(let index=0;index<previousKeys.length;index+=1){const key=previousKeys[index];if(key!==nextKeys[index])return!1;const before=Object.getOwnPropertyDescriptor(previous,key),after=Object.getOwnPropertyDescriptor(next,key);if(!before||!after||!("value"in before)||!("value"in after)||!sameGeoJsonValue(before.value,after.value,comparison))return!1}return!0}function sameGeoJsonSnapshots(previous,next){try{return sameGeoJsonValue(previous,next,{remaining:GEOJSON_DIFF_VALUE_LIMIT,forward:new WeakMap,reverse:new WeakMap})}catch{return!1}}function indexGeoJsonCollection(value){try{if(value?.type!=="FeatureCollection")return null;const features=value?.features;if(!Array.isArray(features)||features.length>GEOJSON_DIFF_FEATURE_LIMIT)return null;const ordered=[],byId=new Map;for(let index=0;index<features.length;index+=1){const feature=features[index];if(!feature||Array.isArray(feature)||feature.type!=="Feature")return null;const id=feature.id;if(typeof id!="string"&&typeof id!="number"||byId.has(id))return null;const rawProperties=feature.properties;if(rawProperties!=null&&(typeof rawProperties!="object"||Array.isArray(rawProperties)))return null;const indexed={id,index,feature,geometry:feature.geometry,bbox:feature.bbox,properties:rawProperties??{}};ordered.push(indexed),byId.set(id,indexed)}return{ordered,byId}}catch{return null}}function buildGeoJsonPropertyDiff(previous,next){const previousCollection=indexGeoJsonCollection(previous),nextCollection=indexGeoJsonCollection(next);if(!previousCollection||!nextCollection)return null;const previousGeometry=[],nextGeometry=[];for(const after of nextCollection.ordered){const before=previousCollection.byId.get(after.id);before&&(previousGeometry.push(before.geometry,before.bbox),nextGeometry.push(after.geometry,after.bbox))}if(!sameGeoJsonSnapshots(previousGeometry,nextGeometry))return null;const retained=new Set;let previousIndex=-1;for(const feature of nextCollection.ordered){const before=previousCollection.byId.get(feature.id);if(!before||before.index<=previousIndex)break;retained.add(feature.id),previousIndex=before.index}const remove=previousCollection.ordered.filter(feature=>!retained.has(feature.id)).map(feature=>feature.id),add=nextCollection.ordered.filter(feature=>!retained.has(feature.id)).map(feature=>feature.feature),update=[];for(const after of nextCollection.ordered){if(!retained.has(after.id))continue;const before=previousCollection.byId.get(after.id),addOrUpdateProperties=[];for(const[key,value]of Object.entries(after.properties))Object.is(before.properties[key],value)||addOrUpdateProperties.push({key,value});const removeProperties=Object.keys(before.properties).filter(key=>!Object.hasOwn(after.properties,key));addOrUpdateProperties.length===0&&removeProperties.length===0||update.push({id:after.id,addOrUpdateProperties,removeProperties})}return{...remove.length?{remove}:{},...add.length?{add}:{},update}}class LyraMap extends LyraElement{static{this.defaultStrings={...super.defaultStrings,close:LYRA_DEFAULT_close,items:LYRA_DEFAULT_items,loading:LYRA_DEFAULT_loading,map:LYRA_DEFAULT_map,mapInitializationFailed:LYRA_DEFAULT_mapInitializationFailed,mapLegend:LYRA_DEFAULT_mapLegend,mapMissingLibrary:LYRA_DEFAULT_mapMissingLibrary,mapStyleRequired:LYRA_DEFAULT_mapStyleRequired,mapWebglUnavailable:LYRA_DEFAULT_mapWebglUnavailable,paginationSummary:LYRA_DEFAULT_paginationSummary}}static{this.immutableEventDetails=Object.freeze(["lr-map-click","lr-map-marker-activate"])}static{this.identityEventDetailProperties=Object.freeze({"lr-map-click":Object.freeze(["feature"])})}static{this.ownedCollectionProperties=Object.freeze(["center","mapStyle","choropleth","markers","dataLayers"])}static{this.styles=[LyraElement.styles,styles,srOnly]}static preload(){return loadMaplibre().then(module=>module!==null)}constructor(){super(),this.center=[0,0],this.zoom=2,this.maxBounds=null,this._legend=EMPTY_MAP_LEGEND,this._legendProjection=EMPTY_MAP_LEGEND_PROJECTION,this.hasLegendSlot=!1,this._legendGradient=Object.freeze([]),this.legendGradientLoLabel=null,this.legendGradientHiLabel=null,this.markers=[],this.dataLayers=[],this.label="",this.loading=!0,this.loadLibrary=loadMaplibre,this.visible=ownerWindow(this)?.IntersectionObserver===void 0,this._styleLoaded=!1,this._appliedDataLayerIds=new Map,this._appliedDataLayerShapes=new Map,this._appliedGeoJson=new Map,this._nextDataLayerId=0,this._webglReady=!1,this._markerInstances=new Map,this._markerLabels=new Map,this._markerPopupIds=new Map,this.markerActivationDetails=new WeakMap,this._configuredPopups=new WeakSet,this._nextPopupId=0,this._markerColors=new Map,this._connectGeneration=0,this.configuredMarkerElements=new WeakSet,this.onLegendSlotChange=event=>{const slot=event.target;this.hasLegendSlot=slot.assignedNodes({flatten:!0}).some(node=>node.nodeType===Node.ELEMENT_NODE||(node.textContent??"").trim().length>0)},new ThemeWatcher(this,()=>this.refreshThemePaint())}get legend(){return this._legend}set legend(value){const previous=this._legend,normalized=normalizeMapLegend(value);this._legend=normalized.entries,this._legendProjection=normalized.projection,this.requestUpdate("legend",previous)}probeLegendSlot(){for(const child of Array.from(this.children))if(child.getAttribute("slot")==="legend")return!0;return!1}get legendGradient(){return this._legendGradient}set legendGradient(value){const previous=this._legendGradient;this._legendGradient=normalizeMapLegendGradient(value),this.requestUpdate("legendGradient",previous)}warnOnLegendChoroplethMismatch(){const layer=this.choropleth,legend=this.legendGradient;!layer||legend.length===0||!Array.isArray(layer.stops)||layer.stops.length===0||legend.length===layer.stops.length&&legend.every(([legendValue,legendColor],index)=>{const layerStop=layer.stops[index];return Array.isArray(layerStop)&&layerStop[0]===legendValue&&resolvedLayerColor(this,layerStop[1],void 0)===resolvedLayerColor(this,legendColor,void 0)})||devWarnOnce("lyra-map-legend-choropleth-mismatch",`<${this.localName}>: legendGradient does not match choropleth.stops, so the visible key may misdescribe the map. Assign the same stops array to both, or derive both from one source.`)}get legendProjection(){return this._legendProjection}get map(){return this._map}pushGeoJson(source,resolvedSourceId,geojson){const previous=this._appliedGeoJson.get(resolvedSourceId),diff=typeof source.updateData=="function"&&previous!==void 0?buildGeoJsonPropertyDiff(previous,geojson):null;diff===null||typeof source.updateData!="function"?source.setData(geojson):(diff.update.length>0||diff.add?.length||diff.remove?.length)&&source.updateData(diff),this._appliedGeoJson.set(resolvedSourceId,geojson)}get safeMaxBounds(){const bounds=this.maxBounds;if(!Array.isArray(bounds)||bounds.length!==2)return null;const[southWest,northEast]=bounds;if(!Array.isArray(southWest)||!Array.isArray(northEast))return null;const[west,south]=southWest,[east,north]=northEast,values=[west,south,east,north].map(Number);if(!values.every(value=>Number.isFinite(value)))return null;const[w,s,e,n]=values;return w>=e||s>=n||w<-180||e>180||s<-90||n>90?null:[[w,s],[e,n]]}applyMaxBounds(){const map=this._map;if(!map||typeof map.setMaxBounds!="function")return;const bounds=this.safeMaxBounds;let zoomBefore,centerBefore;try{if(zoomBefore=map.getZoom(),centerBefore=map.getCenter(),map.setMaxBounds(bounds),bounds===null||Number.isFinite(map.getZoom()))return}catch{}try{map.setMaxBounds(null)}catch{}typeof zoomBefore=="number"&&Number.isFinite(zoomBefore)&&map.setZoom(zoomBefore),centerBefore&&map.setCenter([centerBefore.lng,centerBefore.lat]),devWarnOnce("lyra-map-max-bounds-rejected","<lr-map>: maxBounds left maplibre-gl without a usable camera, so it was dropped and the camera restored. This is a peer limitation, not a bad value -- it shows up at sub-1 fractional zooms in wide containers. Raise the zoom, narrow the box, or leave maxBounds unset.")}get safeZoom(){return finiteRange(this.zoom,2,0,22)}get safeCenter(){const center=Array.isArray(this.center)?this.center:[];return[finiteRange(Number(center[0]),0,-180,180),finiteRange(Number(center[1]),0,-90,90)]}connectedCallback(){super.connectedCallback(),this.syncErrorAnnouncementSink();const generation=++this._connectGeneration,IntersectionObserverCtor=ownerWindow(this)?.IntersectionObserver;if(this.visible=IntersectionObserverCtor===void 0,this.failure=void 0,this.loading=!0,this._webglReady=!1,IntersectionObserverCtor){const observer=new IntersectionObserverCtor(entries=>{entries[0]?.isIntersecting&&(this.visible=!0)});this.intersectionObserver=observer,observer.observe(this)}(async()=>{let mod;try{mod=await this.loadLibrary()}catch{generation===this._connectGeneration&&this.isConnected&&this.failInitialization("missing-peer");return}if(!(generation!==this._connectGeneration||!this.isConnected)){if(this.loading=!1,!mod){this.failInitialization("missing-peer");return}if(this._maplibreModule=mod,!hasMapStyle(this.mapStyle)){this.failInitialization("style-required");return}if(!supportsWebGL2(this)){this.failInitialization("webgl-unavailable");return}this._webglReady=!0,await this.updateComplete,!(generation!==this._connectGeneration||!this.containerEl||!this.isConnected)&&this.tryConstructMap()}})()}disconnectedCallback(){this.releaseErrorAnnouncementSink(),super.disconnectedCallback(),this.disposeMap(),this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0;for(const marker of this._markerInstances.values()){const markerElement=marker.getElement?.();markerElement&&this.markerActivationDetails.delete(markerElement),marker.remove()}this._markerInstances.clear(),this._markerColors.clear(),this._markerLabels.clear(),this._markerPopupIds.clear()}failureMessage(reason=this.failure??"initialization-failed"){switch(reason){case"missing-peer":return this.localize("mapMissingLibrary");case"style-required":return this.localize("mapStyleRequired");case"webgl-unavailable":return this.localize("mapWebglUnavailable");case"initialization-failed":return this.localize("mapInitializationFailed")}}failInitialization(reason,partialMap){try{partialMap?.remove()}catch{}this.disposeMap(),this.loading=!1,this.failure=reason,this.errorAnnouncementSink?.announce(this.failureMessage(reason))}disposeMap(){this.stopObservingMapAllocation(),this.stopObservingPeerChrome();try{this._map?.remove()}catch{}this._map=void 0,this._styleLoaded=!1,this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0,this._appliedDataLayerIds.clear(),this._appliedDataLayerShapes.clear(),this._appliedGeoJson.clear()}adoptedCallback(){super.adoptedCallback(),this.stopObservingMapAllocation(),this.stopObservingPeerChrome(),this.releaseErrorAnnouncementSink(),this.syncErrorAnnouncementSink(),this._map&&this.containerEl&&this.isConnected&&this.observeMapAllocation(this._map,this.containerEl)}syncErrorAnnouncementSink(){this.isConnected&&this.errorAnnouncementSink?.element.ownerDocument!==this.ownerDocument&&(this.releaseErrorAnnouncementSink(),this.errorAnnouncementSink=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this}))}releaseErrorAnnouncementSink(){this.errorAnnouncementSink?.release(),this.errorAnnouncementSink=void 0}tryConstructMap(){if(this._map||!this._maplibreModule||!this._webglReady||!this.containerEl||!this.visible||!this.isConnected)return;if(!hasMapStyle(this.mapStyle)){this.failInitialization("style-required");return}const mod=this._maplibreModule;let candidate;try{candidate=new mod.Map({container:this.containerEl,style:this.mapStyle,center:this.safeCenter,zoom:this.safeZoom,...typeof this.renderWorldCopies=="boolean"?{renderWorldCopies:this.renderWorldCopies}:{},locale:{"Map.Title":this.effectiveMapLabel,"Marker.Title":this.localize("map"),"Popup.Close":this.localize("close")}}),candidate.on("error",event=>{if(this._map===candidate&&!this._styleLoaded){this.failInitialization("initialization-failed");return}console.error("lr-map:",event.error??event)}),candidate.on("load",()=>{if(this._map===candidate)try{this._styleLoaded=!0,this.applyChoropleth(),this.applyMarkers(),this.applyDataLayers(),this.emit("lr-map-load")}catch{this.failInitialization("initialization-failed")}}),candidate.on("click",event=>{if(this._map!==candidate)return;const fillLayerId=this._appliedFillLayerId,layerIds=[];fillLayerId&&candidate.getLayer(fillLayerId)&&layerIds.push(fillLayerId);for(const resolvedSourceId of this._appliedDataLayerIds.values())for(const suffix of QUERYABLE_DATA_LAYER_SUFFIXES){const layerId=`${resolvedSourceId}${suffix}`;candidate.getLayer(layerId)&&layerIds.push(layerId)}const hit=(layerIds.length?candidate.queryRenderedFeatures(event.point,{layers:layerIds}):[])[0],hitLayerId=hit?.layer?.id;let origin,sourceId;if(hitLayerId!==void 0){if(hitLayerId===fillLayerId)origin="choropleth";else for(const[publicSourceId,resolvedSourceId]of this._appliedDataLayerIds)if(hitLayerId.startsWith(`${resolvedSourceId}-`)){origin=hitLayerId===`${resolvedSourceId}-cluster`?"cluster":"data-layer",sourceId=publicSourceId;break}}this.emit("lr-map-click",{lngLat:[event.lngLat.lng,event.lngLat.lat],feature:hit,origin,sourceId})});const canvas=candidate.getCanvas?.();canvas&&notifyMapCanvasReady(this,canvas),this._map=candidate,this.observeMapAllocation(candidate,this.containerEl),this.observePeerChrome(),this.failure=void 0}catch{this.failInitialization("initialization-failed",candidate);return}this.applyMaxBounds()}updated(changed){if(super.updated(changed),this.setAttribute("aria-busy",String(this.loading)),(changed.has("choropleth")||changed.has("legendGradient"))&&this.warnOnLegendChoroplethMismatch(),changed.has("visible")&&this.visible&&this.tryConstructMap(),changed.has("mapStyle")&&!hasMapStyle(this.mapStyle)&&this._maplibreModule)this.failInitialization("style-required");else if(changed.has("mapStyle")&&!this._map&&this._maplibreModule&&hasMapStyle(this.mapStyle))this.tryConstructMap();else if(changed.has("mapStyle")&&this._map){this._styleLoaded=!1,this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0;const map=this._map;try{map.once("style.load",()=>{if(this._map===map)try{this._styleLoaded=!0,this._appliedDataLayerIds.clear(),this._appliedDataLayerShapes.clear(),this._appliedGeoJson.clear(),this.applyChoropleth(),this.applyDataLayers()}catch{this.scheduleAfterUpdate(()=>this.failInitialization("initialization-failed"),"map-style-failure")}}),map.setStyle(this.mapStyle)}catch{this.scheduleAfterUpdate(()=>this.failInitialization("initialization-failed"),"map-style-failure")}}else if(this._styleLoaded&&(changed.has("dataLayers")||changed.has("choropleth"))){const nextChoroplethSourceId=this.choropleth?this.resolveChoroplethSourceId(this.choropleth.sourceId):void 0;this._appliedChoroplethSourceId&&this._appliedChoroplethSourceId!==nextChoroplethSourceId&&this.removeChoropleth(),changed.has("dataLayers")&&this.applyDataLayers(),this.applyChoropleth()}changed.has("center")&&this._map&&this._map.setCenter(this.safeCenter),changed.has("zoom")&&this._map&&this._map.setZoom(this.safeZoom),changed.has("maxBounds")&&this._map&&this.applyMaxBounds(),changed.has("markers")&&this._map&&this.applyMarkers(),this.syncMapSemantics()}willUpdate(changed){super.willUpdate(changed),changed.has("mapStyle")&&!this._map&&this._maplibreModule&&hasMapStyle(this.mapStyle)&&(this._webglReady||(this._webglReady=supportsWebGL2(this)),this.failure=this._webglReady?void 0:"webgl-unavailable",this._webglReady||(this.loading=!1,this.errorAnnouncementSink?.announce(this.failureMessage("webgl-unavailable"))))}refreshThemePaint(){if(!this._map||!this._styleLoaded)return;const fillOpacity=choroplethFillOpacity(this);this._appliedFillLayerId&&this._map.setPaintProperty(this._appliedFillLayerId,"fill-opacity",fillOpacity);const dataLayersBySourceId=new Map(normalizedDataLayers(this.dataLayers).map(layer=>[layer.sourceId,layer]));for(const[publicSourceId,sourceId]of this._appliedDataLayerIds){const dataLayer=dataLayersBySourceId.get(publicSourceId);dataLayer&&this.paintDataLayer(sourceId,dataLayer)}}applyChoropleth(){if(!this._map)return;if(!this.choropleth){this.removeChoropleth();return}const{geojson,field,stops}=this.choropleth,sourceId=this.resolveChoroplethSourceId(this.choropleth.sourceId),fillLayerId=`${sourceId}-fill`;this._appliedChoroplethSourceId&&this._appliedChoroplethSourceId!==sourceId&&this.removeChoropleth(),warnOnUntileableProperties(geojson,"choropleth");const existingSource=this._map.getSource(sourceId);if(existingSource?this.pushGeoJson(existingSource,sourceId,geojson):(this._map.addSource(sourceId,{type:"geojson",data:geojson}),this._appliedGeoJson.set(sourceId,geojson)),this._appliedChoroplethSourceId=sourceId,stops.length===0)return;const resolvedStops=stops.map(([value,color])=>[value,resolvedLayerColor(this,color,void 0)]);let colorExpr;if(this.choropleth.interpolation==="step"){const base=typeof this.choropleth.stepBaseColor=="string"&&this.choropleth.stepBaseColor.trim()?resolvedLayerColor(this,this.choropleth.stepBaseColor,void 0):resolvedStops[0][1];colorExpr=["step",["get",field],base];for(const[value,color]of resolvedStops)colorExpr.push(value,color)}else{colorExpr=["interpolate",this.choropleth.interpolation==="logarithmic"?["exponential",CHOROPLETH_LOG_INTERPOLATION_BASE]:["linear"],["get",field]];for(const[value,color]of resolvedStops)colorExpr.push(value,color)}this._map.getLayer(fillLayerId)?(this._map.setPaintProperty(fillLayerId,"fill-color",colorExpr),this._map.setPaintProperty(fillLayerId,"fill-opacity",choroplethFillOpacity(this))):this._map.addLayer({id:fillLayerId,type:"fill",source:sourceId,paint:{"fill-color":colorExpr,"fill-opacity":choroplethFillOpacity(this)}}),this._appliedFillLayerId=fillLayerId}resolveChoroplethSourceId(sourceId){const dataSourceIds=new Set(normalizedDataLayers(this.dataLayers).map(layer=>layer.sourceId));let resolved=sourceId;for(;dataSourceIds.has(resolved);)resolved=`lr-choropleth-${resolved}`;return resolved}removeChoropleth(){!this._map||!this._appliedChoroplethSourceId||(this._appliedFillLayerId&&this._map.getLayer(this._appliedFillLayerId)&&this._map.removeLayer(this._appliedFillLayerId),this._map.getSource(this._appliedChoroplethSourceId)&&this._map.removeSource(this._appliedChoroplethSourceId),this._appliedGeoJson.delete(this._appliedChoroplethSourceId),this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0)}applyDataLayers(){if(!this._map)return;const layers=normalizedDataLayers(this.dataLayers),nextIds=new Set(layers.map(layer=>layer.sourceId));for(const publicSourceId of this._appliedDataLayerIds.keys())nextIds.has(publicSourceId)||this.removeDataLayer(publicSourceId);for(const layer of layers){const{sourceId:publicSourceId,geojson}=layer,shape=dataLayerShape(layer),appliedShape=this._appliedDataLayerShapes.get(publicSourceId);appliedShape!==void 0&&appliedShape!==shape&&this.removeDataLayer(publicSourceId);const sourceId=this.resolveDataLayerSourceId(publicSourceId);warnOnUntileableProperties(geojson,publicSourceId);const cluster=layer.kind==="heatmap"?void 0:normalizedClusterOptions(layer.cluster),existingSource=this._map.getSource(sourceId);existingSource?this.pushGeoJson(existingSource,sourceId,geojson):(this._map.addSource(sourceId,{type:"geojson",data:geojson,...cluster?{cluster:!0,clusterRadius:cluster.radius,clusterMaxZoom:cluster.maxZoom}:{}}),this._appliedGeoJson.set(sourceId,geojson)),this.applyDataLayerRendering(sourceId,layer),this._appliedDataLayerIds.set(publicSourceId,sourceId),this._appliedDataLayerShapes.set(publicSourceId,shape)}}applyDataLayerRendering(sourceId,layer){if(layer.kind==="heatmap"){this.applyHeatmapLayer(sourceId,layer);return}const cluster=normalizedClusterOptions(layer.cluster);if(cluster){this.applyClusterLayers(sourceId,layer,cluster);return}this.applyGeometryLayers(sourceId,layer)}paintDataLayer(sourceId,layer){if(layer.kind==="heatmap"){this.paintHeatmapLayer(sourceId,layer);return}const cluster=normalizedClusterOptions(layer.cluster);if(cluster){this.paintClusterLayers(sourceId,layer,cluster);return}this.paintGeometryLayers(sourceId,layer)}applyGeometryLayers(sourceId,layer){if(!this._map)return;const tone=layer.tone,color=resolvedLayerColor(this,layer.color,tone),stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),fillId=`${sourceId}-fill`,lineId=`${sourceId}-line`,circleId=`${sourceId}-circle`;this._map.getLayer(fillId)||this._map.addLayer({id:fillId,type:"fill",source:sourceId,filter:["==",["geometry-type"],"Polygon"],paint:{"fill-color":color,"fill-opacity":choroplethFillOpacity(this)}}),this._map.getLayer(lineId)||this._map.addLayer({id:lineId,type:"line",source:sourceId,filter:["in",["geometry-type"],["literal",["LineString","Polygon"]]],paint:{"line-color":stroke,"line-width":2}}),this._map.getLayer(circleId)||this._map.addLayer({id:circleId,type:"circle",source:sourceId,filter:["==",["geometry-type"],"Point"],paint:{"circle-color":stroke,"circle-radius":5}}),this.paintGeometryLayers(sourceId,layer)}paintGeometryLayers(sourceId,layer){if(!this._map)return;const tone=layer.tone,color=resolvedLayerColor(this,layer.color,tone),stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone);this._map.setPaintProperty(`${sourceId}-fill`,"fill-color",color),this._map.setPaintProperty(`${sourceId}-fill`,"fill-opacity",choroplethFillOpacity(this)),this._map.setPaintProperty(`${sourceId}-line`,"line-color",stroke),this._map.setPaintProperty(`${sourceId}-circle`,"circle-color",stroke)}clusterColorExpression(layer,cluster){const tone=layer.tone;return cluster.colorSteps.length?stepExpression(["get","point_count"],cluster.colorSteps.map(([count,stepColor])=>[count,resolvedLayerColor(this,stepColor,tone)])):resolvedLayerColor(this,layer.color,tone)}applyClusterLayers(sourceId,layer,cluster){if(!this._map)return;const tone=layer.tone,stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),clusterId=`${sourceId}-cluster`,countId=`${sourceId}-cluster-count`,circleId=`${sourceId}-circle`,clusterColor=this.clusterColorExpression(layer,cluster),clusterRadius=stepExpression(["get","point_count"],cluster.radiusSteps),countColor=resolvedLayerColor(this,`var(${ON_TONE_TOKEN[tone??"accent"]})`,tone);this._map.getLayer(clusterId)||this._map.addLayer({id:clusterId,type:"circle",source:sourceId,filter:["has","point_count"],paint:{"circle-color":clusterColor,"circle-radius":clusterRadius,"circle-stroke-width":1,"circle-stroke-color":stroke}}),this.styleProvidesGlyphs()&&!this._map.getLayer(countId)&&this._map.addLayer({id:countId,type:"symbol",source:sourceId,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-size":12,...cluster.countFont?{"text-font":[...cluster.countFont]}:{}},paint:{"text-color":countColor}}),this._map.getLayer(circleId)||this._map.addLayer({id:circleId,type:"circle",source:sourceId,filter:["all",["==",["geometry-type"],"Point"],["!",["has","point_count"]]],paint:{"circle-color":stroke,"circle-radius":5}}),this.paintClusterLayers(sourceId,layer,cluster)}paintClusterLayers(sourceId,layer,cluster){if(!this._map)return;const tone=layer.tone,stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),clusterId=`${sourceId}-cluster`;this._map.setPaintProperty(clusterId,"circle-color",this.clusterColorExpression(layer,cluster)),this._map.setPaintProperty(clusterId,"circle-radius",stepExpression(["get","point_count"],cluster.radiusSteps)),this._map.setPaintProperty(clusterId,"circle-stroke-color",stroke),this.styleProvidesGlyphs()&&this._map.setPaintProperty(`${sourceId}-cluster-count`,"text-color",resolvedLayerColor(this,`var(${ON_TONE_TOKEN[tone??"accent"]})`,tone)),this._map.setPaintProperty(`${sourceId}-circle`,"circle-color",stroke)}applyHeatmapLayer(sourceId,layer){if(!this._map)return;const heatmapId=`${sourceId}-heatmap`,options=layer.heatmap,weight=heatmapWeightExpression(options),color=this.heatmapColorExpression(layer),radius=heatmapZoomValue(options?.radius,DEFAULT_HEATMAP_RADIUS,1,200),intensity=heatmapZoomValue(options?.intensity,DEFAULT_HEATMAP_INTENSITY,0,100),opacity=finiteRange(Number(options?.opacity),1,0,1);if(!this._map.getLayer(heatmapId)){this._map.addLayer({id:heatmapId,type:"heatmap",source:sourceId,paint:{...weight?{"heatmap-weight":weight}:{},"heatmap-intensity":intensity,"heatmap-color":color,"heatmap-radius":radius,...options?.opacity===void 0?{}:{"heatmap-opacity":opacity}}});return}this.paintHeatmapLayer(sourceId,layer)}paintHeatmapLayer(sourceId,layer){if(!this._map)return;const heatmapId=`${sourceId}-heatmap`;this._map.setPaintProperty(heatmapId,"heatmap-weight",heatmapWeightExpression(layer.heatmap)??1),this._map.setPaintProperty(heatmapId,"heatmap-intensity",heatmapZoomValue(layer.heatmap?.intensity,DEFAULT_HEATMAP_INTENSITY,0,100)),this._map.setPaintProperty(heatmapId,"heatmap-color",this.heatmapColorExpression(layer)),this._map.setPaintProperty(heatmapId,"heatmap-radius",heatmapZoomValue(layer.heatmap?.radius,DEFAULT_HEATMAP_RADIUS,1,200)),this._map.setPaintProperty(heatmapId,"heatmap-opacity",finiteRange(Number(layer.heatmap?.opacity),1,0,1))}heatmapColorExpression(layer){const tone=layer.tone,authored=normalizedSteps(layer.heatmap?.stops,isColorOutput,threshold=>finiteRange(threshold,0,0,1)).map(([density,color])=>[density,resolvedLayerColor(this,color,tone)]),authoredRamp=withTransparentFloor(authored),ramp=authoredRamp.length>=2?authoredRamp:withTransparentFloor(HEATMAP_RAMP_TOKENS.map(([density,token])=>[density,resolvedLayerColor(this,`var(${token})`,tone)])),expression=["interpolate",["linear"],["heatmap-density"]];for(const[density,color]of ramp)expression.push(density,color);return expression}styleProvidesGlyphs(){try{const liveGlyphs=this._map?.getStyle?.()?.glyphs;if(typeof liveGlyphs=="string"&&liveGlyphs.trim().length>0)return!0}catch{}const declared=this.mapStyle,declaredGlyphs=declared&&typeof declared=="object"?declared.glyphs:void 0;return typeof declaredGlyphs=="string"&&declaredGlyphs.trim().length>0}resolveDataLayerSourceId(publicSourceId){const applied=this._appliedDataLayerIds.get(publicSourceId);if(applied)return applied;let sourceId;do sourceId=`lr-data-layer-${this._nextDataLayerId++}`;while(this._map?.getSource(sourceId)||DATA_LAYER_SUFFIXES.some(suffix=>this._map?.getLayer(`${sourceId}${suffix}`)));return sourceId}removeDataLayer(publicSourceId){if(!this._map)return;const sourceId=this._appliedDataLayerIds.get(publicSourceId);if(sourceId){for(const suffix of DATA_LAYER_SUFFIXES){const layerId=`${sourceId}${suffix}`;this._map.getLayer(layerId)&&this._map.removeLayer(layerId)}this._map.getSource(sourceId)&&this._map.removeSource(sourceId),this._appliedDataLayerIds.delete(publicSourceId),this._appliedDataLayerShapes.delete(publicSourceId),this._appliedGeoJson.delete(sourceId)}}applyMarkers(){const map=this._map,mod=this._maplibreModule;if(!map||!mod)return;const visible=new Set,coordCounts=new Map,explicitIds=new Set,markers=Array.isArray(this.markers)?this.markers.slice(0,MAX_MAP_MARKERS):[];for(const candidate of markers){const lngLat=this.validMarkerLngLat(candidate);if(!lngLat)continue;const rawLabel=candidate.label;if(rawLabel!==void 0&&typeof rawLabel!="string")continue;const m=candidate,rawId=m.id;let key,id;if(rawId!==void 0){if(typeof rawId!="string"||(id=rawId.trim(),id.length===0||explicitIds.has(id)))continue;explicitIds.add(id),key=`id:${id}`}else{const coordKey=`${lngLat[0]},${lngLat[1]}`,occurrence=coordCounts.get(coordKey)??0;coordCounts.set(coordKey,occurrence+1),key=`coordinate:${coordKey}#${occurrence}`}visible.add(key);let existing=this._markerInstances.get(key);const markerColor=sanitizeCssColor(m.color);if(existing&&this._markerColors.get(key)!==markerColor){const existingElement=existing.getElement?.();existingElement&&this.markerActivationDetails.delete(existingElement),existing.remove(),this._markerInstances.delete(key),this._markerColors.delete(key),existing=void 0}if(existing){existing.setLngLat(lngLat);const popup=existing.getPopup();if(m.unsafeHtml)if(popup)popup.setHTML(m.unsafeHtml);else{const nextPopup=new mod.Popup({offset:12}).setHTML(m.unsafeHtml);existing.setPopup(nextPopup),this.configurePopupSemantics(key,existing,nextPopup)}else if(m.label)if(popup)popup.setText(m.label);else{const nextPopup=new mod.Popup({offset:12}).setText(m.label);existing.setPopup(nextPopup),this.configurePopupSemantics(key,existing,nextPopup)}else popup&&existing.setPopup(void 0)}else{const marker=new mod.Marker(markerColor?{color:markerColor}:void 0).setLngLat(lngLat);if(m.unsafeHtml||m.label){const popup=new mod.Popup({offset:12});m.unsafeHtml?popup.setHTML(m.unsafeHtml):m.label&&popup.setText(m.label),marker.setPopup(popup),this.configurePopupSemantics(key,marker,popup)}marker.addTo(map),this._markerInstances.set(key,marker),this._markerColors.set(key,markerColor)}const markerLabel=m.label?.trim()||(m.unsafeHtml?popupText(this,m.unsafeHtml):"");this._markerLabels.set(key,markerLabel||void 0);const markerElement=this._markerInstances.get(key)?.getElement?.();if(markerElement){addPartToken(markerElement,"marker"),markerElement.setAttribute("aria-label",markerLabel||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale);const currentMarker=this._markerInstances.get(key);this.configureMarkerInteraction(markerElement,{id,lngLat,marker:m});const popup=currentMarker?.getPopup();popup&&currentMarker?(this.configurePopupSemantics(key,currentMarker,popup),this.syncPopupSemantics(key,currentMarker,popup)):(markerElement.removeAttribute("aria-controls"),markerElement.removeAttribute("aria-expanded"),markerElement.removeAttribute("aria-haspopup"))}}for(const[key,marker]of this._markerInstances)if(!visible.has(key)){const markerElement=marker.getElement?.();markerElement&&this.markerActivationDetails.delete(markerElement),marker.remove(),this._markerInstances.delete(key),this._markerColors.delete(key),this._markerLabels.delete(key),this._markerPopupIds.delete(key)}}configureMarkerInteraction(markerElement,activation){this.markerActivationDetails.set(markerElement,activation),markerElement.setAttribute("role","button"),markerElement.tabIndex=0;const markerLabel=activation.marker.label?.trim()||(activation.marker.unsafeHtml?popupText(this,activation.marker.unsafeHtml):"");markerElement.setAttribute("aria-label",markerLabel||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale),!this.configuredMarkerElements.has(markerElement)&&(this.configuredMarkerElements.add(markerElement),markerElement.addEventListener("click",event=>{event.defaultPrevented||this.emitMarkerActivation(markerElement,"pointer")}),markerElement.addEventListener("keydown",event=>{event.key!==" "&&event.key!=="Enter"||event.repeat||event.defaultPrevented||(event.key===" "&&event.preventDefault(),this.emitMarkerActivation(markerElement,"keyboard"))},{capture:!0}))}emitMarkerActivation(markerElement,source){if(!this.isConnected)return;const activation=this.markerActivationDetails.get(markerElement);activation&&this.emit("lr-map-marker-activate",{...activation,source})}get effectiveMapLabel(){return this.getAttribute("aria-label")===""?"":this.label||this.localize("map")}validMarkerLngLat(candidate){if(!candidate||typeof candidate!="object")return null;const lngLat=candidate.lngLat;if(!Array.isArray(lngLat)||lngLat.length<2)return null;const[lng,lat]=lngLat;return typeof lng!="number"||typeof lat!="number"||!Number.isFinite(lng)||!Number.isFinite(lat)||lat<-90||lat>90?null:[lng,lat]}popupId(key){let id=this._markerPopupIds.get(key);return id||(id=`map-popup-${this._connectGeneration}-${++this._nextPopupId}`,this._markerPopupIds.set(key,id)),id}configurePopupSemantics(key,marker,popup){!popup||typeof popup!="object"||this._configuredPopups.has(popup)||(this._configuredPopups.add(popup),popup.on?.("open",()=>this.syncPopupSemantics(key,marker,popup)),popup.on?.("close",()=>{marker.getElement?.()?.setAttribute("aria-expanded","false")}))}stopObservingMapAllocation(){this.mapResizeObserver?.disconnect(),this.mapResizeObserver=void 0,this.observedMapContainer=void 0}observeMapAllocation(map,container){this.stopObservingMapAllocation();const ResizeObserverCtor=container.ownerDocument.defaultView?.ResizeObserver;if(!ResizeObserverCtor)return;let observer;observer=new ResizeObserverCtor(()=>{if(!(this.mapResizeObserver!==observer||this.observedMapContainer!==container||this.containerEl!==container||this._map!==map||!this.isConnected))try{map.resize()}catch{}}),this.mapResizeObserver=observer,this.observedMapContainer=container;try{observer.observe(container)}catch{this.stopObservingMapAllocation()}}stopObservingPeerChrome(){this.peerChromeObserver?.disconnect(),this.peerChromeObserver=void 0,this.observedPeerContainer=void 0}syncPeerChromeParts(root=this.containerEl??this.renderRoot){const selectors=[[".maplibregl-marker","marker"],[".maplibregl-popup","popup"],[".maplibregl-popup-content","popup-content"],[".maplibregl-popup-close-button","popup-close-button"],[".maplibregl-ctrl-attrib","attribution"],[".maplibregl-ctrl-attrib-button","attribution-toggle"]];for(const[selector,part]of selectors){const candidate=root;candidate.matches?.(selector)&&addPartToken(candidate,part);for(const element of root.querySelectorAll(selector))addPartToken(element,part)}}observePeerChrome(){const container=this.containerEl;if(!container||(this.syncPeerChromeParts(container),this.observedPeerContainer===container&&this.peerChromeObserver))return;this.stopObservingPeerChrome();const MutationObserverCtor=container.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.observedPeerContainer=container,this.peerChromeObserver=new MutationObserverCtor(records=>{if(!(!this.isConnected||this.containerEl!==container))for(const record of records)for(const node of record.addedNodes)node.nodeType===Node.ELEMENT_NODE&&this.syncPeerChromeParts(node)}),this.peerChromeObserver.observe(container,{childList:!0,subtree:!0}))}syncPopupSemantics(key,marker,popup){const markerElement=marker?.getElement?.();if(!markerElement)return;const id=this.popupId(key);markerElement.setAttribute("aria-controls",id),markerElement.setAttribute("aria-haspopup","dialog"),markerElement.setAttribute("aria-expanded",popup?.isOpen?.()?"true":"false");const popupElement=popup?.getElement?.();if(!popupElement)return;addPartToken(markerElement,"marker"),addPartToken(popupElement,"popup"),popupElement.id=id,popupElement.setAttribute("role","dialog"),popupElement.setAttribute("lang",this.effectiveLocale),popupElement.setAttribute("aria-label",this._markerLabels.get(key)||this.effectiveMapLabel);const popupContent=popupElement.querySelector(".maplibregl-popup-content");popupContent&&addPartToken(popupContent,"popup-content");const closeButton=popupElement.querySelector(".maplibregl-popup-close-button");closeButton&&addPartToken(closeButton,"popup-close-button"),closeButton?.setAttribute("aria-label",this.localize("close"))}syncMapSemantics(){const canvas=this._map?.getCanvas?.();canvas&&(canvas.setAttribute("aria-label",this.effectiveMapLabel),canvas.setAttribute("lang",this.effectiveLocale),this.legend.length||this.legendProjection.truncated?canvas.setAttribute("aria-describedby","map-legend"):canvas.removeAttribute("aria-describedby"));for(const[key,marker]of this._markerInstances){const markerElement=marker.getElement?.();if(!markerElement)continue;addPartToken(markerElement,"marker"),markerElement.setAttribute("role","button"),markerElement.tabIndex=0,markerElement.setAttribute("aria-label",this._markerLabels.get(key)||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale);const popup=marker.getPopup?.();popup?this.syncPopupSemantics(key,marker,popup):(markerElement.removeAttribute("aria-controls"),markerElement.removeAttribute("aria-expanded"),markerElement.removeAttribute("aria-haspopup"))}this.syncPeerChromeParts()}formatCount(value){return getNumberFormat(this.effectiveLocale).format(value)}legendLimitText(){return this.localize("paginationSummary",void 0,{start:this.formatCount(this.legend.length===0?0:1),end:this.formatCount(this.legend.length),total:this.formatCount(this.legendProjection.inputCount),itemLabel:this.localize("items")})}renderLegendGradient(){const stops=this.legendGradient;if(stops.length<2)return nothing;const lo=stops[0],hi=stops[stops.length-1],image=choroplethLegendGradientImage(stops,this.choropleth?.interpolation);return html`<div class="legend-gradient">
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getOwnDataDescriptor,MISSING_OWN_DATA_DESCRIPTOR,UNSAFE_OWN_DATA_DESCRIPTOR}from"../../../internal/data-descriptors.js";import{devWarnOnce}from"../../../internal/dev-mode-attribute-warning.js";import{sanitizeCssColor}from"../../../internal/safe-css.js";import{finiteRange}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{notifyMapCanvasReady}from"../../../internal/map-canvas-ready.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{srOnly}from"../../../internal/a11y.js";import{ThemeWatcher}from"../../../internal/theme-watcher.js";import{loadMaplibre}from"./map-loader.js";import{styles}from"./map.styles.js";import"../../overlays/skeleton/skeleton.class.js";import{LYRA_DEFAULT_close,LYRA_DEFAULT_items,LYRA_DEFAULT_loading,LYRA_DEFAULT_map,LYRA_DEFAULT_mapInitializationFailed,LYRA_DEFAULT_mapLegend,LYRA_DEFAULT_mapMissingLibrary,LYRA_DEFAULT_mapStyleRequired,LYRA_DEFAULT_mapWebglUnavailable,LYRA_DEFAULT_paginationSummary}from"../../../internal/default-strings.generated.js";function supportsWebGL2(host){try{const context=host.ownerDocument.createElement("canvas").getContext("webgl2");if(!context)return!1;try{context.getExtension("WEBGL_lose_context")?.loseContext()}catch{}return!0}catch{return!1}}function hasMapStyle(style){return typeof style=="string"?style.trim().length>0:style!==void 0}const MAX_MAP_LEGEND_GRADIENT_STOPS=64;function isRuntimeArray(value){try{return Array.isArray(value)}catch{return!1}}function isRuntimeRecord(value){try{return value!==null&&typeof value=="object"&&!Array.isArray(value)}catch{return!1}}function boundedOwnArrayLength(value,limit){if(!isRuntimeArray(value))return;const descriptor=getOwnDataDescriptor(value,"length");if(!(descriptor===MISSING_OWN_DATA_DESCRIPTOR||descriptor===UNSAFE_OWN_DATA_DESCRIPTOR||typeof descriptor.value!="number"||!Number.isSafeInteger(descriptor.value)||descriptor.value<0))return Math.min(descriptor.value,limit)}function ownDataValue(value,property2){return getOwnDataDescriptor(value,property2)}function isUnsafeDescriptor(descriptor){return descriptor===UNSAFE_OWN_DATA_DESCRIPTOR}function optionalDescriptorValue(descriptor){return descriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(descriptor)?void 0:descriptor.value}function normalizeMapLegendGradient(value){try{const scanCount=boundedOwnArrayLength(value,MAX_MAP_LEGEND_GRADIENT_STOPS);if(scanCount===void 0)return[];const usable=[];for(let index=0;index<scanCount;index+=1){const stopDescriptor=ownDataValue(value,String(index));if(stopDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(stopDescriptor))continue;const stop=stopDescriptor.value,stopLength=boundedOwnArrayLength(stop,2);if(stopLength===void 0||stopLength<2)continue;const valueDescriptor=ownDataValue(stop,"0"),colorDescriptor=ownDataValue(stop,"1");if(valueDescriptor===MISSING_OWN_DATA_DESCRIPTOR||colorDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(valueDescriptor)||isUnsafeDescriptor(colorDescriptor)||typeof valueDescriptor.value!="number"||!Number.isFinite(valueDescriptor.value)||typeof colorDescriptor.value!="string")continue;const color=sanitizeCssColor(colorDescriptor.value);color&&usable.push([valueDescriptor.value,color])}return usable.length<2?[]:Object.freeze([...usable].sort((a,b)=>a[0]-b[0]))}catch{return[]}}const MAP_LEGEND_ITEM_LIMIT=100,MAP_LEGEND_SCAN_LIMIT=1e3,MAP_LEGEND_LABEL_LIMIT=256,MAP_LEGEND_TOTAL_LABEL_LIMIT=8192,MAP_LEGEND_COLOR_LIMIT=256,MAP_LEGEND_PATTERNS=new Set(["solid","diagonal","dots","crosshatch"]),EMPTY_MAP_LEGEND=Object.freeze([]),EMPTY_MAP_LEGEND_PROJECTION=Object.freeze({inputCount:0,renderedCount:0,omittedCount:0,truncatedLabelCount:0,truncated:!1});function boundedLegendText(value,limit){return value.length<=limit?value:`${value.slice(0,Math.max(0,limit-1))}…`}function normalizeMapLegend(value){let input;try{input=Array.isArray(value)?value:[]}catch{input=[]}let inputCount=0;try{inputCount=Math.max(0,Math.min(Number.MAX_SAFE_INTEGER,input.length))}catch{inputCount=0}const entries=[];let labelCharacters=0,truncatedLabelCount=0;const scanCount=Math.min(inputCount,MAP_LEGEND_SCAN_LIMIT);for(let index=0;index<scanCount&&entries.length<MAP_LEGEND_ITEM_LIMIT;index++)try{const candidate=input[index];if(!candidate||typeof candidate!="object")continue;const rawColor=candidate.color,rawLabel=candidate.label,rawPattern=candidate.pattern;if(typeof rawColor!="string"||typeof rawLabel!="string"||typeof rawPattern!="string"||!MAP_LEGEND_PATTERNS.has(rawPattern))continue;const remaining=MAP_LEGEND_TOTAL_LABEL_LIMIT-labelCharacters;if(remaining<=0)break;const labelLimit=Math.min(MAP_LEGEND_LABEL_LIMIT,remaining),label=boundedLegendText(rawLabel,labelLimit);if(!label.trim())continue;rawLabel.length>labelLimit&&truncatedLabelCount++,labelCharacters+=label.length,entries.push(Object.freeze({color:rawColor.slice(0,MAP_LEGEND_COLOR_LIMIT),label,pattern:rawPattern}))}catch{}const frozenEntries=entries.length?Object.freeze(entries):EMPTY_MAP_LEGEND,omittedCount=Math.max(0,inputCount-frozenEntries.length),projection=Object.freeze({inputCount,renderedCount:frozenEntries.length,omittedCount,truncatedLabelCount,truncated:omittedCount>0||truncatedLabelCount>0});return{entries:frozenEntries,projection}}function addPartToken(element,token){const tokens=new Set((element.getAttribute("part")??"").split(/\s+/).filter(Boolean));tokens.add(token),element.setAttribute("part",[...tokens].join(" "))}const CHOROPLETH_LOG_INTERPOLATION_BASE=.25,CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL=8;function choroplethLogInterpolationFactor(input,lower,upper){const difference=upper-lower;if(difference===0)return 0;const progress=input-lower;return(Math.pow(CHOROPLETH_LOG_INTERPOLATION_BASE,progress)-1)/(Math.pow(CHOROPLETH_LOG_INTERPOLATION_BASE,difference)-1)}function compactGradientPercent(value){return String(Math.round(Math.min(100,Math.max(0,value))*1e4)/1e4)}function choroplethLegendGradientImage(stops,interpolation){const lo=stops[0],span=stops[stops.length-1][0]-lo[0],stopPercent=(value,index)=>span>0?(value-lo[0])/span*100:index/(stops.length-1)*100;if(interpolation!=="logarithmic"||span<=0)return`linear-gradient(to right, ${stops.map(([value,color],index)=>`${color} ${compactGradientPercent(stopPercent(value,index))}%`).join(", ")})`;const image=[`${lo[1]} 0%`];for(let index=1;index<stops.length;index+=1){const lower=stops[index-1],upper=stops[index],interval=upper[0]-lower[0];if(interval<=0){image.push(`${upper[1]} ${compactGradientPercent(stopPercent(upper[0],index))}%`);continue}for(let sample=1;sample<=CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL;sample+=1){const intervalProgress=sample/CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL,input=lower[0]+interval*intervalProgress,position=(input-lo[0])/span*100;if(sample===CHOROPLETH_LEGEND_SAMPLES_PER_INTERVAL){image.push(`${upper[1]} ${compactGradientPercent(position)}%`);continue}const factor=Math.min(1,Math.max(0,choroplethLogInterpolationFactor(input,lower[0],upper[0]))),lowerWeight=compactGradientPercent((1-factor)*100),upperWeight=compactGradientPercent(factor*100);image.push(`color-mix(in srgb, ${lower[1]} ${lowerWeight}%, ${upper[1]} ${upperWeight}%) ${compactGradientPercent(position)}%`)}}return`linear-gradient(to right, ${image.join(", ")})`}const MAX_MAP_MARKERS=2e3;function popupText(host,markup){const template=host.ownerDocument.createElement("template");template.innerHTML=markup;for(const hidden of template.content.querySelectorAll('script, style, template, [hidden], [aria-hidden="true"]'))hidden.remove();return(template.content.textContent??"").replace(/\s+/gu," ").trim()}function markerPopupText(host,markup){return typeof markup=="string"&&markup?popupText(host,markup):""}const MAX_MAP_DATA_LAYERS=100,EMPTY_CANONICAL_MAP_DATA_LAYERS=Object.freeze([]);function mapTone(value){switch(value){case"accent":case"success":case"warning":case"danger":case"neutral":return value;default:return}}function projectMapDataLayer(value){try{if(!isRuntimeRecord(value))return;const sourceIdDescriptor=ownDataValue(value,"sourceId"),geojsonDescriptor=ownDataValue(value,"geojson"),toneDescriptor=ownDataValue(value,"tone"),colorDescriptor=ownDataValue(value,"color"),strokeColorDescriptor=ownDataValue(value,"strokeColor"),kindDescriptor=ownDataValue(value,"kind"),heatmapDescriptor=ownDataValue(value,"heatmap"),clusterDescriptor=ownDataValue(value,"cluster");if(sourceIdDescriptor===MISSING_OWN_DATA_DESCRIPTOR||geojsonDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(sourceIdDescriptor)||isUnsafeDescriptor(geojsonDescriptor))return;const sourceId=sourceIdDescriptor.value,geojson=geojsonDescriptor.value;if(typeof sourceId!="string"||sourceId.trim().length===0||!isRuntimeRecord(geojson))return;const optionalValue=descriptor=>descriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(descriptor)?void 0:descriptor.value,tone=mapTone(optionalValue(toneDescriptor)),colorValue=optionalValue(colorDescriptor),strokeColorValue=optionalValue(strokeColorDescriptor),kindValue=optionalValue(kindDescriptor),heatmapValue=optionalValue(heatmapDescriptor),clusterValue=optionalValue(clusterDescriptor),kind=kindValue==="heatmap"?"heatmap":"auto";return Object.freeze({sourceId:sourceId.trim(),geojson,geojsonProjection:projectGeoJson(geojson),tone,color:typeof colorValue=="string"?colorValue:void 0,strokeColor:typeof strokeColorValue=="string"?strokeColorValue:void 0,kind,heatmap:kind==="heatmap"?projectHeatmapOptions(heatmapValue):void 0,cluster:kind==="auto"?normalizedClusterOptions(clusterValue):void 0})}catch{return}}function projectMapDataLayers(value){try{const scanCount=boundedOwnArrayLength(value,MAX_MAP_DATA_LAYERS);if(scanCount===void 0)return EMPTY_CANONICAL_MAP_DATA_LAYERS;const output=[],seenSourceIds=new Set;for(let index=0;index<scanCount;index+=1){const descriptor=ownDataValue(value,String(index));if(descriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(descriptor))continue;const layer=projectMapDataLayer(descriptor.value);!layer||seenSourceIds.has(layer.sourceId)||(seenSourceIds.add(layer.sourceId),output.push(layer))}return output.length?Object.freeze(output):EMPTY_CANONICAL_MAP_DATA_LAYERS}catch{return EMPTY_CANONICAL_MAP_DATA_LAYERS}}const DATA_LAYER_SUFFIXES=["-fill","-line","-circle","-cluster","-cluster-count","-heatmap"],QUERYABLE_DATA_LAYER_SUFFIXES=["-fill","-line","-circle","-cluster"],MAX_MAP_STEP_STOPS=32;function normalizedSteps(value,isOutput,clampThreshold=threshold=>threshold){try{const scanCount=boundedOwnArrayLength(value,MAX_MAP_STEP_STOPS);if(scanCount===void 0)return Object.freeze([]);const usable=[];for(let index=0;index<scanCount;index+=1){const stopDescriptor=ownDataValue(value,String(index));if(stopDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(stopDescriptor))continue;const stop=stopDescriptor.value,stopLength=boundedOwnArrayLength(stop,2);if(stopLength===void 0||stopLength<2)continue;const thresholdDescriptor=ownDataValue(stop,"0"),outputDescriptor=ownDataValue(stop,"1");thresholdDescriptor===MISSING_OWN_DATA_DESCRIPTOR||outputDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(thresholdDescriptor)||isUnsafeDescriptor(outputDescriptor)||typeof thresholdDescriptor.value!="number"||!Number.isFinite(thresholdDescriptor.value)||!isOutput(outputDescriptor.value)||usable.push([clampThreshold(thresholdDescriptor.value),outputDescriptor.value])}usable.sort((a,b)=>a[0]-b[0]);const deduplicated=usable.filter((stop,index)=>index===0||stop[0]>usable[index-1][0]);return Object.freeze(deduplicated.map(stop=>Object.freeze(stop)))}catch{return Object.freeze([])}}const isFiniteOutput=candidate=>typeof candidate=="number"&&Number.isFinite(candidate),isColorOutput=candidate=>typeof candidate=="string"&&candidate.trim().length>0;function stepExpression(input,stops){const expression=["step",input,stops[0][1]];for(const[threshold,output]of stops)expression.push(threshold,output);return expression}const DEFAULT_CLUSTER_RADIUS=50,DEFAULT_CLUSTER_MAX_ZOOM=14,DEFAULT_CLUSTER_RADIUS_STEPS=Object.freeze([[0,14],[10,18],[50,24]]),DEFAULT_HEATMAP_RADIUS=30,DEFAULT_HEATMAP_INTENSITY=1,HEATMAP_TRANSPARENT="rgba(0, 0, 0, 0)";function withTransparentFloor(stops){return stops.length&&stops[0][0]>0?[[0,HEATMAP_TRANSPARENT],...stops]:stops}const MAX_CLUSTER_COUNT_FONTS=8;function normalizedClusterOptions(value){try{if(!isRuntimeRecord(value))return;const radiusDescriptor=ownDataValue(value,"radius"),maxZoomDescriptor=ownDataValue(value,"maxZoom"),radiusStepsDescriptor=ownDataValue(value,"radiusSteps"),colorStepsDescriptor=ownDataValue(value,"colorSteps"),countFontDescriptor=ownDataValue(value,"countFont"),radiusValue=optionalDescriptorValue(radiusDescriptor),maxZoomValue=optionalDescriptorValue(maxZoomDescriptor),radiusSteps=normalizedSteps(optionalDescriptorValue(radiusStepsDescriptor),isFiniteOutput),colorSteps=normalizedSteps(optionalDescriptorValue(colorStepsDescriptor),isColorOutput),fonts=normalizedClusterFonts(optionalDescriptorValue(countFontDescriptor));return Object.freeze({radius:finiteRange(typeof radiusValue=="number"?radiusValue:Number.NaN,DEFAULT_CLUSTER_RADIUS,1,1e3),maxZoom:finiteRange(typeof maxZoomValue=="number"?maxZoomValue:Number.NaN,DEFAULT_CLUSTER_MAX_ZOOM,0,24),radiusSteps:radiusSteps.length?radiusSteps:DEFAULT_CLUSTER_RADIUS_STEPS,colorSteps,countFont:fonts.length?fonts:void 0})}catch{return}}function normalizedClusterFonts(value){try{const length=boundedOwnArrayLength(value,MAX_CLUSTER_COUNT_FONTS);if(length===void 0)return Object.freeze([]);const fonts=[];for(let index=0;index<length;index+=1){const descriptor=ownDataValue(value,String(index));descriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(descriptor)||typeof descriptor.value!="string"||descriptor.value.trim().length===0||fonts.push(descriptor.value)}return Object.freeze(fonts)}catch{return Object.freeze([])}}function projectedHeatmapRange(value){try{const length=boundedOwnArrayLength(value,2);if(length===void 0||length<2)return;const minDescriptor=ownDataValue(value,"0"),maxDescriptor=ownDataValue(value,"1");return minDescriptor===MISSING_OWN_DATA_DESCRIPTOR||maxDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(minDescriptor)||isUnsafeDescriptor(maxDescriptor)||typeof minDescriptor.value!="number"||typeof maxDescriptor.value!="number"||!Number.isFinite(minDescriptor.value)||!Number.isFinite(maxDescriptor.value)?void 0:Object.freeze([minDescriptor.value,maxDescriptor.value])}catch{return}}function projectedHeatmapZoomValue(value){if(typeof value=="number"&&Number.isFinite(value))return value;if(isRuntimeArray(value))return normalizedSteps(value,isFiniteOutput,zoom=>finiteRange(zoom,0,0,24))}function projectHeatmapOptions(value){try{if(!isRuntimeRecord(value))return;const weightFieldDescriptor=ownDataValue(value,"weightField"),weightRangeDescriptor=ownDataValue(value,"weightRange"),stopsDescriptor=ownDataValue(value,"stops"),radiusDescriptor=ownDataValue(value,"radius"),intensityDescriptor=ownDataValue(value,"intensity"),opacityDescriptor=ownDataValue(value,"opacity"),weightFieldValue=optionalDescriptorValue(weightFieldDescriptor),opacityValue=optionalDescriptorValue(opacityDescriptor);return Object.freeze({weightField:typeof weightFieldValue=="string"&&weightFieldValue.trim().length>0?weightFieldValue.trim():void 0,weightRange:projectedHeatmapRange(optionalDescriptorValue(weightRangeDescriptor)),stops:normalizedSteps(optionalDescriptorValue(stopsDescriptor),isColorOutput,density=>finiteRange(density,0,0,1)),radius:projectedHeatmapZoomValue(optionalDescriptorValue(radiusDescriptor)),intensity:projectedHeatmapZoomValue(optionalDescriptorValue(intensityDescriptor)),opacity:typeof opacityValue=="number"&&Number.isFinite(opacityValue)?opacityValue:void 0})}catch{return}}function dataLayerShape(layer){if(layer.kind==="heatmap")return"heatmap";const cluster=layer.cluster;return cluster?`cluster:${cluster.radius}:${cluster.maxZoom}:${cluster.countFont?.join(",")??""}`:"auto"}function heatmapWeightExpression(options){const field=options?.weightField??"";if(!field)return;const min=options?.weightRange?.[0]??Number.NaN,max=options?.weightRange?.[1]??Number.NaN;return!Number.isFinite(min)||!Number.isFinite(max)||min>=max?["get",field]:["interpolate",["linear"],["get",field],min,0,max,1]}function heatmapZoomValue(value,fallback,min,max){if(!isRuntimeArray(value))return finiteRange(typeof value=="number"?value:Number.NaN,fallback,min,max);const stops=value.map(([zoom,output])=>[zoom,finiteRange(output,fallback,min,max)]);if(stops.length===0)return fallback;if(stops.length===1)return stops[0][1];const expression=["interpolate",["linear"],["zoom"]];for(const[zoom,output]of stops)expression.push(zoom,output);return expression}function projectMapChoropleth(value){try{if(!isRuntimeRecord(value))return;const sourceIdDescriptor=ownDataValue(value,"sourceId"),geojsonDescriptor=ownDataValue(value,"geojson"),fieldDescriptor=ownDataValue(value,"field"),stopsDescriptor=ownDataValue(value,"stops"),interpolationDescriptor=ownDataValue(value,"interpolation"),stepBaseColorDescriptor=ownDataValue(value,"stepBaseColor");if(sourceIdDescriptor===MISSING_OWN_DATA_DESCRIPTOR||geojsonDescriptor===MISSING_OWN_DATA_DESCRIPTOR||fieldDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(sourceIdDescriptor)||isUnsafeDescriptor(geojsonDescriptor)||isUnsafeDescriptor(fieldDescriptor))return;const sourceId=sourceIdDescriptor.value,geojson=geojsonDescriptor.value,field=fieldDescriptor.value;if(typeof sourceId!="string"||sourceId.trim().length===0||!isRuntimeRecord(geojson)||typeof field!="string"||field.trim().length===0)return;const interpolationValue=optionalDescriptorValue(interpolationDescriptor),stepBaseColorValue=optionalDescriptorValue(stepBaseColorDescriptor),interpolation=interpolationValue==="logarithmic"||interpolationValue==="step"?interpolationValue:"linear";return Object.freeze({sourceId:sourceId.trim(),geojson,geojsonProjection:projectGeoJson(geojson),field:field.trim(),stops:normalizedSteps(optionalDescriptorValue(stopsDescriptor),isColorOutput),interpolation,stepBaseColor:typeof stepBaseColorValue=="string"&&stepBaseColorValue.trim().length>0?stepBaseColorValue:void 0})}catch{return}}const EMPTY_CANONICAL_MAP_MARKERS=Object.freeze([]),UNPROJECTED_MAP_VALUE=Symbol("unprojected-map-value");function projectMarkerLngLat(value){try{const length=boundedOwnArrayLength(value,2);if(length===void 0||length<2)return;const lngDescriptor=ownDataValue(value,"0"),latDescriptor=ownDataValue(value,"1");return lngDescriptor===MISSING_OWN_DATA_DESCRIPTOR||latDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(lngDescriptor)||isUnsafeDescriptor(latDescriptor)||typeof lngDescriptor.value!="number"||typeof latDescriptor.value!="number"||!Number.isFinite(lngDescriptor.value)||!Number.isFinite(latDescriptor.value)||latDescriptor.value<-90||latDescriptor.value>90?void 0:Object.freeze([lngDescriptor.value,latDescriptor.value])}catch{return}}function projectMapMarker(value){try{if(!isRuntimeRecord(value))return;const idDescriptor=ownDataValue(value,"id"),lngLatDescriptor=ownDataValue(value,"lngLat"),colorDescriptor=ownDataValue(value,"color"),labelDescriptor=ownDataValue(value,"label"),unsafeHtmlDescriptor=ownDataValue(value,"unsafeHtml");if(lngLatDescriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(idDescriptor)||isUnsafeDescriptor(lngLatDescriptor)||isUnsafeDescriptor(colorDescriptor)||isUnsafeDescriptor(labelDescriptor)||isUnsafeDescriptor(unsafeHtmlDescriptor))return;const lngLat=projectMarkerLngLat(lngLatDescriptor.value),idValue=optionalDescriptorValue(idDescriptor),labelValue=optionalDescriptorValue(labelDescriptor);if(!lngLat||idValue!==void 0&&typeof idValue!="string"||typeof idValue=="string"&&idValue.trim().length===0||labelValue!==void 0&&typeof labelValue!="string")return;const colorValue=optionalDescriptorValue(colorDescriptor);return Object.freeze({id:typeof idValue=="string"?idValue.trim():void 0,lngLat,color:typeof colorValue=="string"?colorValue:void 0,label:typeof labelValue=="string"?labelValue:void 0,unsafeHtml:optionalDescriptorValue(unsafeHtmlDescriptor)})}catch{return}}function projectMapMarkers(value){try{const scanCount=boundedOwnArrayLength(value,MAX_MAP_MARKERS);if(scanCount===void 0)return EMPTY_CANONICAL_MAP_MARKERS;const output=[],explicitIds=new Set;for(let index=0;index<scanCount;index+=1){const descriptor=ownDataValue(value,String(index));if(descriptor===MISSING_OWN_DATA_DESCRIPTOR||isUnsafeDescriptor(descriptor))continue;const marker=projectMapMarker(descriptor.value);!marker||marker.id!==void 0&&explicitIds.has(marker.id)||(marker.id!==void 0&&explicitIds.add(marker.id),output.push(marker))}return output.length?Object.freeze(output):EMPTY_CANONICAL_MAP_MARKERS}catch{return EMPTY_CANONICAL_MAP_MARKERS}}const FALLBACK_FILL_OPACITY=.75;function ownerWindow(host){return host.ownerDocument?.defaultView??null}function choroplethFillOpacity(host){const raw=ownerWindow(host)?.getComputedStyle(host).getPropertyValue("--lr-map-choropleth-fill-opacity").trim()??"",parsed=Number.parseFloat(raw);return Number.isFinite(parsed)?parsed:FALLBACK_FILL_OPACITY}const TONE_TOKEN={accent:"--lr-color-brand",success:"--lr-color-success",warning:"--lr-color-warning",danger:"--lr-color-danger",neutral:"--lr-color-text-quiet"},ON_TONE_TOKEN={accent:"--lr-color-on-brand",success:"--lr-color-on-success",warning:"--lr-color-on-warning",danger:"--lr-color-on-danger",neutral:"--lr-color-on-neutral"},HEATMAP_RAMP_TOKENS=Object.freeze([[.25,"--lr-color-brand"],[.5,"--lr-color-success"],[.75,"--lr-color-warning"],[1,"--lr-color-danger"]]);function dataLayerColor(host,tone){const token=TONE_TOKEN[tone??"accent"];return(ownerWindow(host)?.getComputedStyle(host).getPropertyValue(token).trim()??"")||"#0969da"}function resolvedLayerColor(host,explicit,tone){const candidate=typeof explicit=="string"?explicit.trim():"";if(!candidate)return dataLayerColor(host,tone);const reference=/^var\(\s*(--[\w-]+)/.exec(candidate);return reference?ownerWindow(host)?.getComputedStyle(host).getPropertyValue(reference[1]).trim()||dataLayerColor(host,tone):candidate}const GEOJSON_DIFF_FEATURE_LIMIT=1e4,GEOJSON_DIFF_VALUE_LIMIT=5e4,GEOJSON_PROJECTION_DEPTH_LIMIT=100,INVALID_GEOJSON_PROJECTION_VALUE=Symbol("invalid-geojson-projection-value"),GEOJSON_FUNCTION_TO_STRING=Function.prototype.toString,GEOJSON_OBJECT_CONSTRUCTOR_SOURCE=GEOJSON_FUNCTION_TO_STRING.call(Object),EMPTY_CANONICAL_GEOJSON_PROJECTION=Object.freeze({diagnostics:Object.freeze([]),collection:void 0}),EMPTY_CANONICAL_GEOJSON_PROPERTIES=new Map;function spendGeoJsonProjectionWork(budget){return budget.remaining<=0?!1:(budget.remaining-=1,!0)}function projectedGeoJsonOwnValue(value,key,budget){if(!spendGeoJsonProjectionWork(budget))return INVALID_GEOJSON_PROJECTION_VALUE;const descriptor=ownDataValue(value,key);return isUnsafeDescriptor(descriptor)?INVALID_GEOJSON_PROJECTION_VALUE:descriptor===MISSING_OWN_DATA_DESCRIPTOR?descriptor:descriptor.value}function isPlainGeoJsonRecord(value){try{const prototype=Object.getPrototypeOf(value);if(prototype===null)return!0;if(Object.getPrototypeOf(prototype)!==null)return!1;const constructorDescriptor=Object.getOwnPropertyDescriptor(prototype,"constructor");if(!constructorDescriptor||!("value"in constructorDescriptor)||typeof constructorDescriptor.value!="function")return!1;const constructor=constructorDescriptor.value,constructorPrototype=Object.getOwnPropertyDescriptor(constructor,"prototype");return!!(constructorPrototype&&"value"in constructorPrototype&&constructorPrototype.value===prototype&&GEOJSON_FUNCTION_TO_STRING.call(constructor)===GEOJSON_OBJECT_CONSTRUCTOR_SOURCE)}catch{return!1}}function projectGeoJsonComparableValue(value,budget,depth=0){if(!spendGeoJsonProjectionWork(budget)||depth>GEOJSON_PROJECTION_DEPTH_LIMIT)return INVALID_GEOJSON_PROJECTION_VALUE;if(value==null||typeof value=="boolean"||typeof value=="string")return value;if(typeof value=="number")return Number.isFinite(value)?value:INVALID_GEOJSON_PROJECTION_VALUE;if(typeof value!="object"||budget.active.has(value))return INVALID_GEOJSON_PROJECTION_VALUE;const remembered=budget.seen.get(value);if(remembered!==void 0)return remembered;if(isRuntimeArray(value)){const length=projectedGeoJsonOwnValue(value,"length",budget);if(length===INVALID_GEOJSON_PROJECTION_VALUE||length===MISSING_OWN_DATA_DESCRIPTOR||typeof length!="number"||!Number.isSafeInteger(length)||length<0||length>budget.remaining)return INVALID_GEOJSON_PROJECTION_VALUE;const output2=new Array(length);budget.seen.set(value,output2),budget.active.add(value);let completed2=!1;try{for(let index=0;index<length;index+=1){const entry=projectedGeoJsonOwnValue(value,String(index),budget);if(entry===INVALID_GEOJSON_PROJECTION_VALUE)return entry;if(entry===MISSING_OWN_DATA_DESCRIPTOR)continue;const projected=projectGeoJsonComparableValue(entry,budget,depth+1);if(projected===INVALID_GEOJSON_PROJECTION_VALUE)return projected;Object.defineProperty(output2,index,{value:projected,enumerable:!0,configurable:!1,writable:!1})}const frozen=Object.freeze(output2);return completed2=!0,frozen}finally{budget.active.delete(value),completed2||budget.seen.delete(value)}}if(!isPlainGeoJsonRecord(value))return INVALID_GEOJSON_PROJECTION_VALUE;const output=Object.create(null);budget.seen.set(value,output),budget.active.add(value);let completed=!1;try{for(const key in value){const entry=projectedGeoJsonOwnValue(value,key,budget);if(entry===INVALID_GEOJSON_PROJECTION_VALUE)return entry;if(entry===MISSING_OWN_DATA_DESCRIPTOR)continue;const projected=projectGeoJsonComparableValue(entry,budget,depth+1);if(projected===INVALID_GEOJSON_PROJECTION_VALUE)return projected;Object.defineProperty(output,key,{value:projected,enumerable:!0,configurable:!1,writable:!1})}const frozen=Object.freeze(output);return completed=!0,frozen}catch{return INVALID_GEOJSON_PROJECTION_VALUE}finally{budget.active.delete(value),completed||budget.seen.delete(value)}}function projectGeoJsonProperties(value,budget){if(value==null)return EMPTY_CANONICAL_GEOJSON_PROPERTIES;if(!isRuntimeRecord(value))return;const output=new Map;try{for(const key in value){const entry=projectedGeoJsonOwnValue(value,key,budget);if(entry===INVALID_GEOJSON_PROJECTION_VALUE)return;entry!==MISSING_OWN_DATA_DESCRIPTOR&&output.set(key,entry)}}catch{return}return output}function projectGeoJsonFeature(value,index,budget){if(!isRuntimeRecord(value))return;const type=projectedGeoJsonOwnValue(value,"type",budget),id=projectedGeoJsonOwnValue(value,"id",budget),geometry=projectedGeoJsonOwnValue(value,"geometry",budget),bbox=projectedGeoJsonOwnValue(value,"bbox",budget),properties=projectedGeoJsonOwnValue(value,"properties",budget);if(properties===INVALID_GEOJSON_PROJECTION_VALUE)return;const projectedProperties=projectGeoJsonProperties(properties===MISSING_OWN_DATA_DESCRIPTOR?void 0:properties,budget);if(!projectedProperties)return;const diagnostic=Object.freeze({id:typeof id=="string"||typeof id=="number"?id:void 0,index,properties:projectedProperties});if(type===INVALID_GEOJSON_PROJECTION_VALUE||id===INVALID_GEOJSON_PROJECTION_VALUE||geometry===INVALID_GEOJSON_PROJECTION_VALUE||bbox===INVALID_GEOJSON_PROJECTION_VALUE||type!=="Feature"||id===MISSING_OWN_DATA_DESCRIPTOR||typeof id!="string"&&typeof id!="number")return Object.freeze({diagnostic,feature:void 0});const comparableGeometry=projectGeoJsonComparableValue(geometry===MISSING_OWN_DATA_DESCRIPTOR?void 0:geometry,budget),comparableBbox=projectGeoJsonComparableValue(bbox===MISSING_OWN_DATA_DESCRIPTOR?void 0:bbox,budget);return Object.freeze(comparableGeometry===INVALID_GEOJSON_PROJECTION_VALUE||comparableBbox===INVALID_GEOJSON_PROJECTION_VALUE?{diagnostic,feature:void 0}:{diagnostic,feature:Object.freeze({id,index,feature:value,geometry:comparableGeometry,bbox:comparableBbox,properties:projectedProperties})})}function projectGeoJson(value){try{if(!isRuntimeRecord(value))return EMPTY_CANONICAL_GEOJSON_PROJECTION;const budget={remaining:GEOJSON_DIFF_VALUE_LIMIT,seen:new WeakMap,active:new WeakSet},type=projectedGeoJsonOwnValue(value,"type",budget),features=projectedGeoJsonOwnValue(value,"features",budget);if(type!=="FeatureCollection"||features===INVALID_GEOJSON_PROJECTION_VALUE||features===MISSING_OWN_DATA_DESCRIPTOR||!isRuntimeArray(features))return EMPTY_CANONICAL_GEOJSON_PROJECTION;const length=projectedGeoJsonOwnValue(features,"length",budget);if(length===INVALID_GEOJSON_PROJECTION_VALUE||length===MISSING_OWN_DATA_DESCRIPTOR||typeof length!="number"||!Number.isSafeInteger(length)||length<0||length>GEOJSON_DIFF_FEATURE_LIMIT)return EMPTY_CANONICAL_GEOJSON_PROJECTION;const diagnostics=[],ordered=[],byId=new Map;let collectionIsAddressable=!0;for(let index=0;index<length;index+=1){const candidate=projectedGeoJsonOwnValue(features,String(index),budget);if(candidate===INVALID_GEOJSON_PROJECTION_VALUE||candidate===MISSING_OWN_DATA_DESCRIPTOR){collectionIsAddressable=!1;continue}const projected=projectGeoJsonFeature(candidate,index,budget);if(!projected){collectionIsAddressable=!1;continue}diagnostics.push(projected.diagnostic);const feature=projected.feature;if(!feature||byId.has(feature.id)){collectionIsAddressable=!1;continue}ordered.push(feature),byId.set(feature.id,feature)}return Object.freeze({diagnostics:Object.freeze(diagnostics),collection:collectionIsAddressable&&ordered.length===length?Object.freeze({ordered:Object.freeze(ordered),byId}):void 0})}catch{return EMPTY_CANONICAL_GEOJSON_PROJECTION}}function warnOnUntileableProperties(projection,sourceLabel){for(const feature of projection.diagnostics)for(const[key,value]of feature.properties){if(typeof value!="number"||!Number.isFinite(value)||Math.abs(value)<=Number.MAX_SAFE_INTEGER)continue;const identity=feature.id??`index ${feature.index}`;devWarnOnce(`lyra-map-untileable-property:${sourceLabel}:${key}`,`<lr-map>: feature ${String(identity)} in "${sourceLabel}" carries ${key}=${value}, which is too large to survive maplibre-gl's vector-tile encoding. Tiling happens in a worker, so the failure would reach you only as an opaque "Given varint doesn't fit into 10 bytes" error while the rest of the layer still paints. Carry a reduced figure in the feature and keep the exact value in your own data.`)}}function sameGeoJsonValue(previous,next,comparison){if(comparison.remaining<=0)return!1;if(comparison.remaining-=1,Object.is(previous,next))return!0;if(previous===null||next===null||typeof previous!="object"||typeof next!="object")return!1;const pairedNext=comparison.forward.get(previous);if(pairedNext)return pairedNext===next;const pairedPrevious=comparison.reverse.get(next);if(pairedPrevious)return pairedPrevious===previous;comparison.forward.set(previous,next),comparison.reverse.set(next,previous);const previousIsArray=Array.isArray(previous),nextIsArray=Array.isArray(next);if(previousIsArray||nextIsArray){if(!previousIsArray||!nextIsArray||previous.length!==next.length)return!1;for(let index=0;index<previous.length;index+=1){const before=Object.getOwnPropertyDescriptor(previous,String(index)),after=Object.getOwnPropertyDescriptor(next,String(index));if(!!before!=!!after)return!1;if(!(!before||!after)&&(!("value"in before)||!("value"in after)||!sameGeoJsonValue(before.value,after.value,comparison)))return!1}return!0}if(!isPlainGeoJsonRecord(previous)||!isPlainGeoJsonRecord(next))return!1;const previousKeys=Object.keys(previous),nextKeys=Object.keys(next);if(previousKeys.length!==nextKeys.length)return!1;for(let index=0;index<previousKeys.length;index+=1){const key=previousKeys[index];if(key!==nextKeys[index])return!1;const before=Object.getOwnPropertyDescriptor(previous,key),after=Object.getOwnPropertyDescriptor(next,key);if(!before||!after||!("value"in before)||!("value"in after)||!sameGeoJsonValue(before.value,after.value,comparison))return!1}return!0}function sameGeoJsonSnapshots(previous,next){try{return sameGeoJsonValue(previous,next,{remaining:GEOJSON_DIFF_VALUE_LIMIT,forward:new WeakMap,reverse:new WeakMap})}catch{return!1}}function buildProjectedGeoJsonPropertyDiff(previous,next){const previousCollection=previous.collection,nextCollection=next.collection;if(!previousCollection||!nextCollection)return null;const previousGeometry=[],nextGeometry=[];for(const after of nextCollection.ordered){const before=previousCollection.byId.get(after.id);before&&(previousGeometry.push(before.geometry,before.bbox),nextGeometry.push(after.geometry,after.bbox))}if(!sameGeoJsonSnapshots(previousGeometry,nextGeometry))return null;const retained=new Set;let previousIndex=-1;for(const feature of nextCollection.ordered){const before=previousCollection.byId.get(feature.id);if(!before||before.index<=previousIndex)break;retained.add(feature.id),previousIndex=before.index}const remove=previousCollection.ordered.filter(feature=>!retained.has(feature.id)).map(feature=>feature.id),add=nextCollection.ordered.filter(feature=>!retained.has(feature.id)).map(feature=>feature.feature),update=[];for(const after of nextCollection.ordered){if(!retained.has(after.id))continue;const before=previousCollection.byId.get(after.id),addOrUpdateProperties=[];for(const[key,value]of after.properties)Object.is(before.properties.get(key),value)||addOrUpdateProperties.push({key,value});const removeProperties=[...before.properties.keys()].filter(key=>!after.properties.has(key));addOrUpdateProperties.length===0&&removeProperties.length===0||update.push({id:after.id,addOrUpdateProperties,removeProperties})}return{...remove.length?{remove}:{},...add.length?{add}:{},update}}function buildGeoJsonPropertyDiff(previous,next){return buildProjectedGeoJsonPropertyDiff(projectGeoJson(previous),projectGeoJson(next))}class LyraMap extends LyraElement{static{this.defaultStrings={...super.defaultStrings,close:LYRA_DEFAULT_close,items:LYRA_DEFAULT_items,loading:LYRA_DEFAULT_loading,map:LYRA_DEFAULT_map,mapInitializationFailed:LYRA_DEFAULT_mapInitializationFailed,mapLegend:LYRA_DEFAULT_mapLegend,mapMissingLibrary:LYRA_DEFAULT_mapMissingLibrary,mapStyleRequired:LYRA_DEFAULT_mapStyleRequired,mapWebglUnavailable:LYRA_DEFAULT_mapWebglUnavailable,paginationSummary:LYRA_DEFAULT_paginationSummary}}static{this.immutableEventDetails=Object.freeze(["lr-map-click","lr-map-marker-activate"])}static{this.identityEventDetailProperties=Object.freeze({"lr-map-click":Object.freeze(["feature"]),"lr-map-marker-activate":Object.freeze(["marker"])})}static{this.ownedCollectionProperties=Object.freeze(["center","mapStyle","choropleth","markers","dataLayers"])}static{this.identityCollectionProperties=Object.freeze(["markers","dataLayers"])}static{this.identityCollectionObjectProperties=Object.freeze(["choropleth"])}static{this.styles=[LyraElement.styles,styles,srOnly]}static preload(){return loadMaplibre().then(module=>module!==null)}constructor(){super(),this.center=[0,0],this.zoom=2,this.maxBounds=null,this._legend=EMPTY_MAP_LEGEND,this._legendProjection=EMPTY_MAP_LEGEND_PROJECTION,this.hasLegendSlot=!1,this._legendGradient=Object.freeze([]),this.legendGradientLoLabel=null,this.legendGradientHiLabel=null,this.markers=[],this.dataLayers=[],this._canonicalChoroplethSource=UNPROJECTED_MAP_VALUE,this._canonicalDataLayersSource=UNPROJECTED_MAP_VALUE,this._canonicalDataLayers=EMPTY_CANONICAL_MAP_DATA_LAYERS,this._canonicalMarkersSource=UNPROJECTED_MAP_VALUE,this._canonicalMarkers=EMPTY_CANONICAL_MAP_MARKERS,this.label="",this.loading=!0,this.loadLibrary=loadMaplibre,this.visible=ownerWindow(this)?.IntersectionObserver===void 0,this._styleLoaded=!1,this._appliedDataLayerIds=new Map,this._appliedDataLayerShapes=new Map,this._appliedGeoJson=new Map,this._nextDataLayerId=0,this._webglReady=!1,this._markerInstances=new Map,this._markerLabels=new Map,this._markerPopupIds=new Map,this.markerActivationDetails=new WeakMap,this._configuredPopups=new WeakSet,this._nextPopupId=0,this._markerColors=new Map,this._connectGeneration=0,this.configuredMarkerElements=new WeakSet,this.onLegendSlotChange=event=>{const slot=event.target;this.hasLegendSlot=slot.assignedNodes({flatten:!0}).some(node=>node.nodeType===Node.ELEMENT_NODE||(node.textContent??"").trim().length>0)},new ThemeWatcher(this,()=>this.refreshThemePaint())}get legend(){return this._legend}set legend(value){const previous=this._legend,normalized=normalizeMapLegend(value);this._legend=normalized.entries,this._legendProjection=normalized.projection,this.requestUpdate("legend",previous)}probeLegendSlot(){for(const child of Array.from(this.children))if(child.getAttribute("slot")==="legend")return!0;return!1}get legendGradient(){return this._legendGradient}set legendGradient(value){const previous=this._legendGradient;this._legendGradient=normalizeMapLegendGradient(value),this.requestUpdate("legendGradient",previous)}warnOnLegendChoroplethMismatch(){const layer=this.canonicalChoropleth,legend=this.legendGradient;!layer||legend.length===0||layer.stops.length===0||legend.length===layer.stops.length&&legend.every(([legendValue,legendColor],index)=>{const layerStop=layer.stops[index];return layerStop!==void 0&&layerStop[0]===legendValue&&resolvedLayerColor(this,layerStop[1],void 0)===resolvedLayerColor(this,legendColor,void 0)})||devWarnOnce("lyra-map-legend-choropleth-mismatch",`<${this.localName}>: legendGradient does not match choropleth.stops, so the visible key may misdescribe the map. Assign the same stops array to both, or derive both from one source.`)}get legendProjection(){return this._legendProjection}get canonicalChoropleth(){const source=this.choropleth;return Object.is(source,this._canonicalChoroplethSource)?this._canonicalChoropleth:(this._canonicalChoroplethSource=source,this._canonicalChoropleth=projectMapChoropleth(source),this._canonicalChoropleth)}get canonicalDataLayers(){const source=this.dataLayers;return Object.is(source,this._canonicalDataLayersSource)?this._canonicalDataLayers:(this._canonicalDataLayersSource=source,this._canonicalDataLayers=projectMapDataLayers(source),this._canonicalDataLayers)}get canonicalMarkers(){const source=this.markers;return Object.is(source,this._canonicalMarkersSource)?this._canonicalMarkers:(this._canonicalMarkersSource=source,this._canonicalMarkers=projectMapMarkers(source),this._canonicalMarkers)}get map(){return this._map}pushGeoJson(source,resolvedSourceId,geojson,projection=projectGeoJson(geojson)){const previous=this._appliedGeoJson.get(resolvedSourceId),diff=typeof source.updateData=="function"&&previous!==void 0?buildProjectedGeoJsonPropertyDiff(previous,projection):null;diff===null||typeof source.updateData!="function"?source.setData(geojson):(diff.update.length>0||diff.add?.length||diff.remove?.length)&&source.updateData(diff),this._appliedGeoJson.set(resolvedSourceId,projection)}get safeMaxBounds(){const bounds=this.maxBounds;if(!Array.isArray(bounds)||bounds.length!==2)return null;const[southWest,northEast]=bounds;if(!Array.isArray(southWest)||!Array.isArray(northEast))return null;const[west,south]=southWest,[east,north]=northEast,values=[west,south,east,north].map(Number);if(!values.every(value=>Number.isFinite(value)))return null;const[w,s,e,n]=values;return w>=e||s>=n||w<-180||e>180||s<-90||n>90?null:[[w,s],[e,n]]}applyMaxBounds(){const map=this._map;if(!map||typeof map.setMaxBounds!="function")return;const bounds=this.safeMaxBounds;let zoomBefore,centerBefore;try{if(zoomBefore=map.getZoom(),centerBefore=map.getCenter(),map.setMaxBounds(bounds),bounds===null||Number.isFinite(map.getZoom()))return}catch{}try{map.setMaxBounds(null)}catch{}typeof zoomBefore=="number"&&Number.isFinite(zoomBefore)&&map.setZoom(zoomBefore),centerBefore&&map.setCenter([centerBefore.lng,centerBefore.lat]),devWarnOnce("lyra-map-max-bounds-rejected","<lr-map>: maxBounds left maplibre-gl without a usable camera, so it was dropped and the camera restored. This is a peer limitation, not a bad value -- it shows up at sub-1 fractional zooms in wide containers. Raise the zoom, narrow the box, or leave maxBounds unset.")}get safeZoom(){return finiteRange(this.zoom,2,0,22)}get safeCenter(){const center=Array.isArray(this.center)?this.center:[];return[finiteRange(Number(center[0]),0,-180,180),finiteRange(Number(center[1]),0,-90,90)]}connectedCallback(){super.connectedCallback(),this.syncErrorAnnouncementSink();const generation=++this._connectGeneration,IntersectionObserverCtor=ownerWindow(this)?.IntersectionObserver;if(this.visible=IntersectionObserverCtor===void 0,this.failure=void 0,this.loading=!0,this._webglReady=!1,IntersectionObserverCtor){const observer=new IntersectionObserverCtor(entries=>{entries[0]?.isIntersecting&&(this.visible=!0)});this.intersectionObserver=observer,observer.observe(this)}(async()=>{let mod;try{mod=await this.loadLibrary()}catch{generation===this._connectGeneration&&this.isConnected&&this.failInitialization("missing-peer");return}if(!(generation!==this._connectGeneration||!this.isConnected)){if(this.loading=!1,!mod){this.failInitialization("missing-peer");return}if(this._maplibreModule=mod,!hasMapStyle(this.mapStyle)){this.failInitialization("style-required");return}if(!supportsWebGL2(this)){this.failInitialization("webgl-unavailable");return}this._webglReady=!0,await this.updateComplete,!(generation!==this._connectGeneration||!this.containerEl||!this.isConnected)&&this.tryConstructMap()}})()}disconnectedCallback(){this.releaseErrorAnnouncementSink(),super.disconnectedCallback(),this.disposeMap(),this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0;for(const marker of this._markerInstances.values()){const markerElement=marker.getElement?.();markerElement&&this.markerActivationDetails.delete(markerElement),marker.remove()}this._markerInstances.clear(),this._markerColors.clear(),this._markerLabels.clear(),this._markerPopupIds.clear()}failureMessage(reason=this.failure??"initialization-failed"){switch(reason){case"missing-peer":return this.localize("mapMissingLibrary");case"style-required":return this.localize("mapStyleRequired");case"webgl-unavailable":return this.localize("mapWebglUnavailable");case"initialization-failed":return this.localize("mapInitializationFailed")}}failInitialization(reason,partialMap){try{partialMap?.remove()}catch{}this.disposeMap(),this.loading=!1,this.failure=reason,this.errorAnnouncementSink?.announce(this.failureMessage(reason))}disposeMap(){this.stopObservingMapAllocation(),this.stopObservingPeerChrome();try{this._map?.remove()}catch{}this._map=void 0,this._styleLoaded=!1,this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0,this._appliedDataLayerIds.clear(),this._appliedDataLayerShapes.clear(),this._appliedGeoJson.clear()}adoptedCallback(){super.adoptedCallback(),this.stopObservingMapAllocation(),this.stopObservingPeerChrome(),this.releaseErrorAnnouncementSink(),this.syncErrorAnnouncementSink(),this._map&&this.containerEl&&this.isConnected&&this.observeMapAllocation(this._map,this.containerEl)}syncErrorAnnouncementSink(){this.isConnected&&this.errorAnnouncementSink?.element.ownerDocument!==this.ownerDocument&&(this.releaseErrorAnnouncementSink(),this.errorAnnouncementSink=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this}))}releaseErrorAnnouncementSink(){this.errorAnnouncementSink?.release(),this.errorAnnouncementSink=void 0}tryConstructMap(){if(this._map||!this._maplibreModule||!this._webglReady||!this.containerEl||!this.visible||!this.isConnected)return;if(!hasMapStyle(this.mapStyle)){this.failInitialization("style-required");return}const mod=this._maplibreModule;let candidate;try{candidate=new mod.Map({container:this.containerEl,style:this.mapStyle,center:this.safeCenter,zoom:this.safeZoom,...typeof this.renderWorldCopies=="boolean"?{renderWorldCopies:this.renderWorldCopies}:{},locale:{"Map.Title":this.effectiveMapLabel,"Marker.Title":this.localize("map"),"Popup.Close":this.localize("close")}}),candidate.on("error",event=>{if(this._map===candidate&&!this._styleLoaded){this.failInitialization("initialization-failed");return}console.error("lr-map:",event.error??event)}),candidate.on("load",()=>{if(this._map===candidate)try{this._styleLoaded=!0,this.applyChoropleth(),this.applyMarkers(),this.applyDataLayers(),this.emit("lr-map-load")}catch{this.failInitialization("initialization-failed")}}),candidate.on("click",event=>{if(this._map!==candidate)return;const fillLayerId=this._appliedFillLayerId,layerIds=[];fillLayerId&&candidate.getLayer(fillLayerId)&&layerIds.push(fillLayerId);for(const resolvedSourceId of this._appliedDataLayerIds.values())for(const suffix of QUERYABLE_DATA_LAYER_SUFFIXES){const layerId=`${resolvedSourceId}${suffix}`;candidate.getLayer(layerId)&&layerIds.push(layerId)}const hit=(layerIds.length?candidate.queryRenderedFeatures(event.point,{layers:layerIds}):[])[0],hitLayerId=hit?.layer?.id;let origin,sourceId;if(hitLayerId!==void 0){if(hitLayerId===fillLayerId)origin="choropleth";else for(const[publicSourceId,resolvedSourceId]of this._appliedDataLayerIds)if(hitLayerId.startsWith(`${resolvedSourceId}-`)){origin=hitLayerId===`${resolvedSourceId}-cluster`?"cluster":"data-layer",sourceId=publicSourceId;break}}this.emit("lr-map-click",{lngLat:[event.lngLat.lng,event.lngLat.lat],feature:hit,origin,sourceId})});const canvas=candidate.getCanvas?.();canvas&&notifyMapCanvasReady(this,canvas),this._map=candidate,this.observeMapAllocation(candidate,this.containerEl),this.observePeerChrome(),this.failure=void 0}catch{this.failInitialization("initialization-failed",candidate);return}this.applyMaxBounds()}updated(changed){if(super.updated(changed),this.setAttribute("aria-busy",String(this.loading)),(changed.has("choropleth")||changed.has("legendGradient"))&&this.warnOnLegendChoroplethMismatch(),changed.has("visible")&&this.visible&&this.tryConstructMap(),changed.has("mapStyle")&&!hasMapStyle(this.mapStyle)&&this._maplibreModule)this.failInitialization("style-required");else if(changed.has("mapStyle")&&!this._map&&this._maplibreModule&&hasMapStyle(this.mapStyle))this.tryConstructMap();else if(changed.has("mapStyle")&&this._map){this._styleLoaded=!1,this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0;const map=this._map;try{map.once("style.load",()=>{if(this._map===map)try{this._styleLoaded=!0,this._appliedDataLayerIds.clear(),this._appliedDataLayerShapes.clear(),this._appliedGeoJson.clear(),this.applyChoropleth(),this.applyDataLayers()}catch{this.scheduleAfterUpdate(()=>this.failInitialization("initialization-failed"),"map-style-failure")}}),map.setStyle(this.mapStyle)}catch{this.scheduleAfterUpdate(()=>this.failInitialization("initialization-failed"),"map-style-failure")}}else if(this._styleLoaded&&(changed.has("dataLayers")||changed.has("choropleth"))){const choropleth=this.canonicalChoropleth,nextChoroplethSourceId=choropleth?this.resolveChoroplethSourceId(choropleth.sourceId):void 0;this._appliedChoroplethSourceId&&this._appliedChoroplethSourceId!==nextChoroplethSourceId&&this.removeChoropleth(),changed.has("dataLayers")&&this.applyDataLayers(),this.applyChoropleth()}changed.has("center")&&this._map&&this._map.setCenter(this.safeCenter),changed.has("zoom")&&this._map&&this._map.setZoom(this.safeZoom),changed.has("maxBounds")&&this._map&&this.applyMaxBounds(),changed.has("markers")&&this._map&&this.applyMarkers(),this.syncMapSemantics()}willUpdate(changed){super.willUpdate(changed),changed.has("mapStyle")&&!this._map&&this._maplibreModule&&hasMapStyle(this.mapStyle)&&(this._webglReady||(this._webglReady=supportsWebGL2(this)),this.failure=this._webglReady?void 0:"webgl-unavailable",this._webglReady||(this.loading=!1,this.errorAnnouncementSink?.announce(this.failureMessage("webgl-unavailable"))))}refreshThemePaint(){if(!this._map||!this._styleLoaded)return;const fillOpacity=choroplethFillOpacity(this);if(this._appliedFillLayerId){const choropleth=this.canonicalChoropleth;choropleth&&choropleth.stops.length>0&&this._map.setPaintProperty(this._appliedFillLayerId,"fill-color",this.choroplethColorExpression(choropleth)),this._map.setPaintProperty(this._appliedFillLayerId,"fill-opacity",fillOpacity)}const dataLayersBySourceId=new Map(this.canonicalDataLayers.map(layer=>[layer.sourceId,layer]));for(const[publicSourceId,sourceId]of this._appliedDataLayerIds){const dataLayer=dataLayersBySourceId.get(publicSourceId);dataLayer&&this.paintDataLayer(sourceId,dataLayer)}}applyChoropleth(){if(!this._map)return;const choropleth=this.canonicalChoropleth;if(!choropleth){this.removeChoropleth();return}const{geojson,geojsonProjection,stops}=choropleth,sourceId=this.resolveChoroplethSourceId(choropleth.sourceId),fillLayerId=`${sourceId}-fill`;this._appliedChoroplethSourceId&&this._appliedChoroplethSourceId!==sourceId&&this.removeChoropleth(),warnOnUntileableProperties(geojsonProjection,"choropleth");const existingSource=this._map.getSource(sourceId);if(existingSource?this.pushGeoJson(existingSource,sourceId,geojson,geojsonProjection):(this._map.addSource(sourceId,{type:"geojson",data:geojson}),this._appliedGeoJson.set(sourceId,geojsonProjection)),this._appliedChoroplethSourceId=sourceId,stops.length===0)return;const colorExpr=this.choroplethColorExpression(choropleth);this._map.getLayer(fillLayerId)?(this._map.setPaintProperty(fillLayerId,"fill-color",colorExpr),this._map.setPaintProperty(fillLayerId,"fill-opacity",choroplethFillOpacity(this))):this._map.addLayer({id:fillLayerId,type:"fill",source:sourceId,paint:{"fill-color":colorExpr,"fill-opacity":choroplethFillOpacity(this)}}),this._appliedFillLayerId=fillLayerId}choroplethColorExpression(choropleth){const{field,stops}=choropleth,resolvedStops=stops.map(([value,color])=>[value,resolvedLayerColor(this,color,void 0)]);let colorExpr;if(choropleth.interpolation==="step"){const base=choropleth.stepBaseColor?resolvedLayerColor(this,choropleth.stepBaseColor,void 0):resolvedStops[0][1];colorExpr=["step",["get",field],base];for(const[value,color]of resolvedStops)colorExpr.push(value,color)}else{colorExpr=["interpolate",choropleth.interpolation==="logarithmic"?["exponential",CHOROPLETH_LOG_INTERPOLATION_BASE]:["linear"],["get",field]];for(const[value,color]of resolvedStops)colorExpr.push(value,color)}return colorExpr}resolveChoroplethSourceId(sourceId){const dataSourceIds=new Set(this.canonicalDataLayers.map(layer=>layer.sourceId));let resolved=sourceId;for(;dataSourceIds.has(resolved);)resolved=`lr-choropleth-${resolved}`;return resolved}removeChoropleth(){!this._map||!this._appliedChoroplethSourceId||(this._appliedFillLayerId&&this._map.getLayer(this._appliedFillLayerId)&&this._map.removeLayer(this._appliedFillLayerId),this._map.getSource(this._appliedChoroplethSourceId)&&this._map.removeSource(this._appliedChoroplethSourceId),this._appliedGeoJson.delete(this._appliedChoroplethSourceId),this._appliedChoroplethSourceId=void 0,this._appliedFillLayerId=void 0)}applyDataLayers(){if(!this._map)return;const layers=this.canonicalDataLayers,nextIds=new Set(layers.map(layer=>layer.sourceId));for(const publicSourceId of this._appliedDataLayerIds.keys())nextIds.has(publicSourceId)||this.removeDataLayer(publicSourceId);for(const layer of layers){const{sourceId:publicSourceId,geojson,geojsonProjection}=layer,shape=dataLayerShape(layer),appliedShape=this._appliedDataLayerShapes.get(publicSourceId);appliedShape!==void 0&&appliedShape!==shape&&this.removeDataLayer(publicSourceId);const sourceId=this.resolveDataLayerSourceId(publicSourceId);warnOnUntileableProperties(geojsonProjection,publicSourceId);const cluster=layer.cluster,existingSource=this._map.getSource(sourceId);existingSource?this.pushGeoJson(existingSource,sourceId,geojson,geojsonProjection):(this._map.addSource(sourceId,{type:"geojson",data:geojson,...cluster?{cluster:!0,clusterRadius:cluster.radius,clusterMaxZoom:cluster.maxZoom}:{}}),this._appliedGeoJson.set(sourceId,geojsonProjection)),this.applyDataLayerRendering(sourceId,layer),this._appliedDataLayerIds.set(publicSourceId,sourceId),this._appliedDataLayerShapes.set(publicSourceId,shape)}}applyDataLayerRendering(sourceId,layer){if(layer.kind==="heatmap"){this.applyHeatmapLayer(sourceId,layer);return}const cluster=layer.cluster;if(cluster){this.applyClusterLayers(sourceId,layer,cluster);return}this.applyGeometryLayers(sourceId,layer)}paintDataLayer(sourceId,layer){if(layer.kind==="heatmap"){this.paintHeatmapLayer(sourceId,layer);return}const cluster=layer.cluster;if(cluster){this.paintClusterLayers(sourceId,layer,cluster);return}this.paintGeometryLayers(sourceId,layer)}applyGeometryLayers(sourceId,layer){if(!this._map)return;const tone=layer.tone,color=resolvedLayerColor(this,layer.color,tone),stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),fillId=`${sourceId}-fill`,lineId=`${sourceId}-line`,circleId=`${sourceId}-circle`;this._map.getLayer(fillId)||this._map.addLayer({id:fillId,type:"fill",source:sourceId,filter:["==",["geometry-type"],"Polygon"],paint:{"fill-color":color,"fill-opacity":choroplethFillOpacity(this)}}),this._map.getLayer(lineId)||this._map.addLayer({id:lineId,type:"line",source:sourceId,filter:["in",["geometry-type"],["literal",["LineString","Polygon"]]],paint:{"line-color":stroke,"line-width":2}}),this._map.getLayer(circleId)||this._map.addLayer({id:circleId,type:"circle",source:sourceId,filter:["==",["geometry-type"],"Point"],paint:{"circle-color":stroke,"circle-radius":5}}),this.paintGeometryLayers(sourceId,layer)}paintGeometryLayers(sourceId,layer){if(!this._map)return;const tone=layer.tone,color=resolvedLayerColor(this,layer.color,tone),stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone);this._map.setPaintProperty(`${sourceId}-fill`,"fill-color",color),this._map.setPaintProperty(`${sourceId}-fill`,"fill-opacity",choroplethFillOpacity(this)),this._map.setPaintProperty(`${sourceId}-line`,"line-color",stroke),this._map.setPaintProperty(`${sourceId}-circle`,"circle-color",stroke)}clusterColorExpression(layer,cluster){const tone=layer.tone;return cluster.colorSteps.length?stepExpression(["get","point_count"],cluster.colorSteps.map(([count,stepColor])=>[count,resolvedLayerColor(this,stepColor,tone)])):resolvedLayerColor(this,layer.color,tone)}applyClusterLayers(sourceId,layer,cluster){if(!this._map)return;const tone=layer.tone,stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),clusterId=`${sourceId}-cluster`,countId=`${sourceId}-cluster-count`,circleId=`${sourceId}-circle`,clusterColor=this.clusterColorExpression(layer,cluster),clusterRadius=stepExpression(["get","point_count"],cluster.radiusSteps),countColor=resolvedLayerColor(this,`var(${ON_TONE_TOKEN[tone??"accent"]})`,tone);this._map.getLayer(clusterId)||this._map.addLayer({id:clusterId,type:"circle",source:sourceId,filter:["has","point_count"],paint:{"circle-color":clusterColor,"circle-radius":clusterRadius,"circle-stroke-width":1,"circle-stroke-color":stroke}}),this.styleProvidesGlyphs()&&!this._map.getLayer(countId)&&this._map.addLayer({id:countId,type:"symbol",source:sourceId,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-size":12,...cluster.countFont?{"text-font":[...cluster.countFont]}:{}},paint:{"text-color":countColor}}),this._map.getLayer(circleId)||this._map.addLayer({id:circleId,type:"circle",source:sourceId,filter:["all",["==",["geometry-type"],"Point"],["!",["has","point_count"]]],paint:{"circle-color":stroke,"circle-radius":5}}),this.paintClusterLayers(sourceId,layer,cluster)}paintClusterLayers(sourceId,layer,cluster){if(!this._map)return;const tone=layer.tone,stroke=resolvedLayerColor(this,layer.strokeColor??layer.color,tone),clusterId=`${sourceId}-cluster`;this._map.setPaintProperty(clusterId,"circle-color",this.clusterColorExpression(layer,cluster)),this._map.setPaintProperty(clusterId,"circle-radius",stepExpression(["get","point_count"],cluster.radiusSteps)),this._map.setPaintProperty(clusterId,"circle-stroke-color",stroke),this.styleProvidesGlyphs()&&this._map.setPaintProperty(`${sourceId}-cluster-count`,"text-color",resolvedLayerColor(this,`var(${ON_TONE_TOKEN[tone??"accent"]})`,tone)),this._map.setPaintProperty(`${sourceId}-circle`,"circle-color",stroke)}applyHeatmapLayer(sourceId,layer){if(!this._map)return;const heatmapId=`${sourceId}-heatmap`,options=layer.heatmap,weight=heatmapWeightExpression(options),color=this.heatmapColorExpression(layer),radius=heatmapZoomValue(options?.radius,DEFAULT_HEATMAP_RADIUS,1,200),intensity=heatmapZoomValue(options?.intensity,DEFAULT_HEATMAP_INTENSITY,0,100),opacity=finiteRange(options?.opacity??Number.NaN,1,0,1);if(!this._map.getLayer(heatmapId)){this._map.addLayer({id:heatmapId,type:"heatmap",source:sourceId,paint:{...weight?{"heatmap-weight":weight}:{},"heatmap-intensity":intensity,"heatmap-color":color,"heatmap-radius":radius,...options?.opacity===void 0?{}:{"heatmap-opacity":opacity}}});return}this.paintHeatmapLayer(sourceId,layer)}paintHeatmapLayer(sourceId,layer){if(!this._map)return;const heatmapId=`${sourceId}-heatmap`;this._map.setPaintProperty(heatmapId,"heatmap-weight",heatmapWeightExpression(layer.heatmap)??1),this._map.setPaintProperty(heatmapId,"heatmap-intensity",heatmapZoomValue(layer.heatmap?.intensity,DEFAULT_HEATMAP_INTENSITY,0,100)),this._map.setPaintProperty(heatmapId,"heatmap-color",this.heatmapColorExpression(layer)),this._map.setPaintProperty(heatmapId,"heatmap-radius",heatmapZoomValue(layer.heatmap?.radius,DEFAULT_HEATMAP_RADIUS,1,200)),this._map.setPaintProperty(heatmapId,"heatmap-opacity",finiteRange(layer.heatmap?.opacity??Number.NaN,1,0,1))}heatmapColorExpression(layer){const tone=layer.tone,authored=(layer.heatmap?.stops??[]).map(([density,color])=>[density,resolvedLayerColor(this,color,tone)]),authoredRamp=withTransparentFloor(authored),ramp=authoredRamp.length>=2?authoredRamp:withTransparentFloor(HEATMAP_RAMP_TOKENS.map(([density,token])=>[density,resolvedLayerColor(this,`var(${token})`,tone)])),expression=["interpolate",["linear"],["heatmap-density"]];for(const[density,color]of ramp)expression.push(density,color);return expression}styleProvidesGlyphs(){try{const liveGlyphs=this._map?.getStyle?.()?.glyphs;if(typeof liveGlyphs=="string"&&liveGlyphs.trim().length>0)return!0}catch{}const declared=this.mapStyle,declaredGlyphs=declared&&typeof declared=="object"?declared.glyphs:void 0;return typeof declaredGlyphs=="string"&&declaredGlyphs.trim().length>0}resolveDataLayerSourceId(publicSourceId){const applied=this._appliedDataLayerIds.get(publicSourceId);if(applied)return applied;let sourceId;do sourceId=`lr-data-layer-${this._nextDataLayerId++}`;while(this._map?.getSource(sourceId)||DATA_LAYER_SUFFIXES.some(suffix=>this._map?.getLayer(`${sourceId}${suffix}`)));return sourceId}removeDataLayer(publicSourceId){if(!this._map)return;const sourceId=this._appliedDataLayerIds.get(publicSourceId);if(sourceId){for(const suffix of DATA_LAYER_SUFFIXES){const layerId=`${sourceId}${suffix}`;this._map.getLayer(layerId)&&this._map.removeLayer(layerId)}this._map.getSource(sourceId)&&this._map.removeSource(sourceId),this._appliedDataLayerIds.delete(publicSourceId),this._appliedDataLayerShapes.delete(publicSourceId),this._appliedGeoJson.delete(sourceId)}}applyMarkers(){const map=this._map,mod=this._maplibreModule;if(!map||!mod)return;const visible=new Set,coordCounts=new Map,explicitIds=new Set;for(const m of this.canonicalMarkers){const lngLat=m.lngLat,mapLngLat=[lngLat[0],lngLat[1]];let key,id;if(m.id!==void 0){if(id=m.id,explicitIds.has(id))continue;explicitIds.add(id),key=`id:${id}`}else{const coordKey=`${lngLat[0]},${lngLat[1]}`,occurrence=coordCounts.get(coordKey)??0;coordCounts.set(coordKey,occurrence+1),key=`coordinate:${coordKey}#${occurrence}`}visible.add(key);let existing=this._markerInstances.get(key);const markerColor=sanitizeCssColor(m.color);if(existing&&this._markerColors.get(key)!==markerColor){const existingElement=existing.getElement?.();existingElement&&this.markerActivationDetails.delete(existingElement),existing.remove(),this._markerInstances.delete(key),this._markerColors.delete(key),existing=void 0}if(existing){existing.setLngLat(mapLngLat);const popup=existing.getPopup();if(m.unsafeHtml)if(popup)popup.setHTML(m.unsafeHtml);else{const nextPopup=new mod.Popup({offset:12}).setHTML(m.unsafeHtml);existing.setPopup(nextPopup),this.configurePopupSemantics(key,existing,nextPopup)}else if(m.label)if(popup)popup.setText(m.label);else{const nextPopup=new mod.Popup({offset:12}).setText(m.label);existing.setPopup(nextPopup),this.configurePopupSemantics(key,existing,nextPopup)}else popup&&existing.setPopup(void 0)}else{const marker=new mod.Marker(markerColor?{color:markerColor}:void 0).setLngLat(mapLngLat);if(m.unsafeHtml||m.label){const popup=new mod.Popup({offset:12});m.unsafeHtml?popup.setHTML(m.unsafeHtml):m.label&&popup.setText(m.label),marker.setPopup(popup),this.configurePopupSemantics(key,marker,popup)}marker.addTo(map),this._markerInstances.set(key,marker),this._markerColors.set(key,markerColor)}const markerLabel=m.label?.trim()||markerPopupText(this,m.unsafeHtml);this._markerLabels.set(key,markerLabel||void 0);const markerElement=this._markerInstances.get(key)?.getElement?.();if(markerElement){addPartToken(markerElement,"marker"),markerElement.setAttribute("aria-label",markerLabel||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale);const currentMarker=this._markerInstances.get(key);this.configureMarkerInteraction(markerElement,{id,lngLat,marker:m});const popup=currentMarker?.getPopup();popup&&currentMarker?(this.configurePopupSemantics(key,currentMarker,popup),this.syncPopupSemantics(key,currentMarker,popup)):(markerElement.removeAttribute("aria-controls"),markerElement.removeAttribute("aria-expanded"),markerElement.removeAttribute("aria-haspopup"))}}for(const[key,marker]of this._markerInstances)if(!visible.has(key)){const markerElement=marker.getElement?.();markerElement&&this.markerActivationDetails.delete(markerElement),marker.remove(),this._markerInstances.delete(key),this._markerColors.delete(key),this._markerLabels.delete(key),this._markerPopupIds.delete(key)}}configureMarkerInteraction(markerElement,activation){this.markerActivationDetails.set(markerElement,activation),markerElement.setAttribute("role","button"),markerElement.tabIndex=0;const markerLabel=activation.marker.label?.trim()||markerPopupText(this,activation.marker.unsafeHtml);markerElement.setAttribute("aria-label",markerLabel||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale),!this.configuredMarkerElements.has(markerElement)&&(this.configuredMarkerElements.add(markerElement),markerElement.addEventListener("click",event=>{event.defaultPrevented||this.emitMarkerActivation(markerElement,"pointer")}),markerElement.addEventListener("keydown",event=>{event.key!==" "&&event.key!=="Enter"||event.repeat||event.defaultPrevented||(event.key===" "&&event.preventDefault(),this.emitMarkerActivation(markerElement,"keyboard"))},{capture:!0}))}emitMarkerActivation(markerElement,source){if(!this.isConnected)return;const activation=this.markerActivationDetails.get(markerElement);activation&&this.emit("lr-map-marker-activate",{...activation,source})}get effectiveMapLabel(){return this.getAttribute("aria-label")===""?"":this.label||this.localize("map")}popupId(key){let id=this._markerPopupIds.get(key);return id||(id=`map-popup-${this._connectGeneration}-${++this._nextPopupId}`,this._markerPopupIds.set(key,id)),id}configurePopupSemantics(key,marker,popup){!popup||typeof popup!="object"||this._configuredPopups.has(popup)||(this._configuredPopups.add(popup),popup.on?.("open",()=>this.syncPopupSemantics(key,marker,popup)),popup.on?.("close",()=>{marker.getElement?.()?.setAttribute("aria-expanded","false")}))}stopObservingMapAllocation(){this.mapResizeObserver?.disconnect(),this.mapResizeObserver=void 0,this.observedMapContainer=void 0}observeMapAllocation(map,container){this.stopObservingMapAllocation();const ResizeObserverCtor=container.ownerDocument.defaultView?.ResizeObserver;if(!ResizeObserverCtor)return;let observer;observer=new ResizeObserverCtor(()=>{if(!(this.mapResizeObserver!==observer||this.observedMapContainer!==container||this.containerEl!==container||this._map!==map||!this.isConnected))try{map.resize()}catch{}}),this.mapResizeObserver=observer,this.observedMapContainer=container;try{observer.observe(container)}catch{this.stopObservingMapAllocation()}}stopObservingPeerChrome(){this.peerChromeObserver?.disconnect(),this.peerChromeObserver=void 0,this.observedPeerContainer=void 0}syncPeerChromeParts(root=this.containerEl??this.renderRoot){const selectors=[[".maplibregl-marker","marker"],[".maplibregl-popup","popup"],[".maplibregl-popup-content","popup-content"],[".maplibregl-popup-close-button","popup-close-button"],[".maplibregl-ctrl-attrib","attribution"],[".maplibregl-ctrl-attrib-button","attribution-toggle"]];for(const[selector,part]of selectors){const candidate=root;candidate.matches?.(selector)&&addPartToken(candidate,part);for(const element of root.querySelectorAll(selector))addPartToken(element,part)}}observePeerChrome(){const container=this.containerEl;if(!container||(this.syncPeerChromeParts(container),this.observedPeerContainer===container&&this.peerChromeObserver))return;this.stopObservingPeerChrome();const MutationObserverCtor=container.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.observedPeerContainer=container,this.peerChromeObserver=new MutationObserverCtor(records=>{if(!(!this.isConnected||this.containerEl!==container))for(const record of records)for(const node of record.addedNodes)node.nodeType===Node.ELEMENT_NODE&&this.syncPeerChromeParts(node)}),this.peerChromeObserver.observe(container,{childList:!0,subtree:!0}))}syncPopupSemantics(key,marker,popup){const markerElement=marker?.getElement?.();if(!markerElement)return;const id=this.popupId(key);markerElement.setAttribute("aria-controls",id),markerElement.setAttribute("aria-haspopup","dialog"),markerElement.setAttribute("aria-expanded",popup?.isOpen?.()?"true":"false");const popupElement=popup?.getElement?.();if(!popupElement)return;addPartToken(markerElement,"marker"),addPartToken(popupElement,"popup"),popupElement.id=id,popupElement.setAttribute("role","dialog"),popupElement.setAttribute("lang",this.effectiveLocale),popupElement.setAttribute("aria-label",this._markerLabels.get(key)||this.effectiveMapLabel);const popupContent=popupElement.querySelector(".maplibregl-popup-content");popupContent&&addPartToken(popupContent,"popup-content");const closeButton=popupElement.querySelector(".maplibregl-popup-close-button");closeButton&&addPartToken(closeButton,"popup-close-button"),closeButton?.setAttribute("aria-label",this.localize("close"))}syncMapSemantics(){const canvas=this._map?.getCanvas?.();canvas&&(canvas.setAttribute("aria-label",this.effectiveMapLabel),canvas.setAttribute("lang",this.effectiveLocale),this.legend.length||this.legendProjection.truncated?canvas.setAttribute("aria-describedby","map-legend"):canvas.removeAttribute("aria-describedby"));for(const[key,marker]of this._markerInstances){const markerElement=marker.getElement?.();if(!markerElement)continue;addPartToken(markerElement,"marker"),markerElement.setAttribute("role","button"),markerElement.tabIndex=0,markerElement.setAttribute("aria-label",this._markerLabels.get(key)||this.localize("map")),markerElement.setAttribute("lang",this.effectiveLocale);const popup=marker.getPopup?.();popup?this.syncPopupSemantics(key,marker,popup):(markerElement.removeAttribute("aria-controls"),markerElement.removeAttribute("aria-expanded"),markerElement.removeAttribute("aria-haspopup"))}this.syncPeerChromeParts()}formatCount(value){return getNumberFormat(this.effectiveLocale).format(value)}legendLimitText(){return this.localize("paginationSummary",void 0,{start:this.formatCount(this.legend.length===0?0:1),end:this.formatCount(this.legend.length),total:this.formatCount(this.legendProjection.inputCount),itemLabel:this.localize("items")})}renderLegendGradient(){const stops=this.legendGradient;if(stops.length<2)return nothing;const lo=stops[0],hi=stops[stops.length-1],image=choroplethLegendGradientImage(stops,this.canonicalChoropleth?.interpolation);return html`<div class="legend-gradient">
2
2
  <span part="legend-lo">${this.legendGradientLoLabel??this.formatCount(lo[0])}</span>
3
3
  <span
4
4
  part="legend-gradient"
@@ -1 +1 @@
1
- import{css}from"lit";const styles=css`:host{inline-size:100%;block-size:var(--lr-map-height,var(--lr-size-24rem));display:block;position:relative}[part=base]{block-size:100%;inline-size:100%;position:relative}lr-skeleton{--lr-skeleton-w:100%;--lr-skeleton-h:100%}[part=container]{block-size:100%;inline-size:100%;position:absolute;inset:0;overflow:hidden}.maplibregl-canvas-container{block-size:100%;inline-size:100%}.maplibregl-canvas{position:absolute;inset-block-start:0;inset-inline-start:0}.maplibregl-canvas-container.maplibregl-interactive{cursor:grab;user-select:none}.maplibregl-canvas-container.maplibregl-interactive:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-marker{inline-size:max-content;min-inline-size:var(--lr-size-1-5rem);min-block-size:var(--lr-size-1-5rem);box-sizing:border-box;will-change:transform;position:absolute;inset-block-start:0;inset-inline-start:0}.maplibregl-popup{z-index:var(--lr-layer-content);will-change:transform;pointer-events:none;color:var(--lr-color-text);font-family:var(--lr-font);font-size:var(--lr-font-size-sm);line-height:var(--lr-line-height-normal);display:flex;position:absolute;inset-block-start:0;inset-inline-start:0}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:var(--lr-size-0-625rem) solid transparent;block-size:0;inline-size:0;z-index:var(--lr-layer-content)}.maplibregl-popup-anchor-top .maplibregl-popup-tip{border-block-start:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{border-block-start:none;border-inline-start:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:flex-start}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{border-block-start:none;border-inline-end:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:flex-end}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-block-end:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{border-block-end:none;border-inline-start:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:flex-start}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{border-block-end:none;border-inline-end:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:flex-end}.maplibregl-popup-anchor-left .maplibregl-popup-tip{border-inline-start:none;border-inline-end-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-right .maplibregl-popup-tip{border-inline-end:none;border-inline-start-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-content{min-inline-size:var(--lr-icon-button-size);padding:var(--lr-space-m);border:var(--lr-border-width-thin) solid var(--lr-color-border);border-radius:var(--lr-radius);background:var(--lr-color-surface-overlay);box-shadow:var(--lr-shadow-m);pointer-events:auto;overflow-wrap:anywhere;padding-inline-end:calc(var(--lr-icon-button-size) + var(--lr-space-xs));position:relative}.maplibregl-popup-close-button{min-inline-size:var(--lr-icon-button-size);min-block-size:var(--lr-icon-button-size);border-radius:var(--lr-radius);color:var(--lr-color-text-quiet);font:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset-block-start:0;inset-inline-end:0}.maplibregl-popup-close-button:where(:hover){background:var(--lr-map-popup-close-button-hover-bg,var(--lr-color-brand-quiet));color:var(--lr-map-popup-close-button-hover-color,var(--lr-color-brand))}.maplibregl-popup-close-button:where(:active){background:var(--lr-map-popup-close-button-active-bg,color-mix(in oklab, var(--lr-color-brand-quiet), var(--lr-color-mix-partner) var(--lr-color-mix-active)));color:var(--lr-map-popup-close-button-active-color,var(--lr-color-brand))}.maplibregl-popup-close-button:where(:focus-visible){outline:var(--lr-focus-ring);outline-offset:calc(-1 * var(--lr-focus-ring-offset))}[part=error]{padding:var(--lr-space-l);color:var(--lr-color-danger);font-size:var(--lr-font-size-md-sm);text-align:center;margin:0}[part=legend]{z-index:var(--lr-layer-content);min-inline-size:0;max-inline-size:calc(100% - var(--lr-space-s) - var(--lr-space-s));max-block-size:calc(100% - var(--lr-space-s) - var(--lr-space-s));box-sizing:border-box;gap:var(--lr-space-xs);padding:var(--lr-space-xs) var(--lr-space-s);background:var(--lr-color-surface);border:var(--lr-border-width-thin) solid var(--lr-color-border);border-radius:var(--lr-radius);box-shadow:var(--lr-shadow-m);font-size:var(--lr-font-size-xs);flex-direction:column;display:flex;position:absolute;inset-block-end:var(--lr-space-s);inset-inline-start:var(--lr-space-s);overflow:auto}.legend-list{gap:var(--lr-space-xs);flex-direction:column;min-inline-size:0;display:flex}.legend-gradient{align-items:center;gap:var(--lr-space-xs);min-inline-size:0;display:flex}.legend-gradient .gradient-bar{flex:1 1 var(--lr-size-6rem);min-inline-size:0;block-size:var(--lr-size-0-5rem);border-radius:var(--lr-size-2px)}[part=legend-lo],[part=legend-hi]{white-space:nowrap;flex:none}:host(:dir(rtl)) .legend-gradient .gradient-bar{transform:scaleX(-1)}.legend-row{align-items:center;gap:var(--lr-space-xs);min-inline-size:0;display:flex}.legend-row>span:last-child{overflow-wrap:anywhere;min-inline-size:0}[part=legend-swatch]{inline-size:var(--lr-size-0-75rem);block-size:var(--lr-size-0-75rem);box-sizing:border-box;border:var(--lr-border-width-thin) solid currentColor;border-radius:var(--lr-size-2px);flex:none;position:relative;overflow:hidden}[part=legend-swatch][data-pattern=diagonal]{border-style:dashed}[part=legend-swatch][data-pattern=dots]{border-style:dotted;border-radius:50%}[part=legend-swatch][data-pattern=crosshatch]{border-style:double;border-radius:0}[part=legend-swatch][data-pattern=diagonal]:before,[part=legend-swatch][data-pattern=crosshatch]:before,[part=legend-swatch][data-pattern=crosshatch]:after,[part=legend-swatch][data-pattern=dots]:before{content:"";inline-size:150%;block-size:var(--lr-border-width-thin);background:currentColor;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)rotate(-45deg)}[part=legend-swatch][data-pattern=crosshatch]:after{transform:translate(-50%,-50%)rotate(45deg)}[part=legend-swatch][data-pattern=dots]:before{inline-size:var(--lr-size-2px);block-size:var(--lr-size-2px);border-radius:50%;transform:translate(-50%,-50%)}[part=legend-limit]{min-inline-size:0;border-block-start:var(--lr-border-width-thin) solid var(--lr-color-border);color:var(--lr-color-text-quiet);overflow-wrap:anywhere;padding-block-start:var(--lr-space-xs)}.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{z-index:var(--lr-layer-content);pointer-events:none;position:absolute}.maplibregl-ctrl-top-left{inset-block-start:0;inset-inline-start:0}.maplibregl-ctrl-top-right{inset-block-start:0;inset-inline-end:0}.maplibregl-ctrl-bottom-left{inset-block-end:0;inset-inline-start:0}.maplibregl-ctrl-bottom-right{inset-block-end:0;inset-inline-end:0}.maplibregl-ctrl{margin:var(--lr-space-xs);pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-attrib{padding:0 var(--lr-space-xs);border-radius:var(--lr-radius);background:var(--lr-color-surface);color:var(--lr-color-text-quiet);font-size:var(--lr-font-size-xs)}.maplibregl-ctrl-attrib a{color:var(--lr-color-text-quiet);text-decoration:none}.maplibregl-ctrl-attrib a:hover{text-decoration:underline}.maplibregl-ctrl-attrib-inner{overflow-wrap:anywhere}.maplibregl-ctrl-attrib-button{inline-size:var(--lr-icon-button-size);block-size:var(--lr-icon-button-size);border-radius:var(--lr-radius-pill);color:var(--lr-color-text);cursor:pointer;background:0 0;border:0;padding:0;display:none;position:absolute;inset-block-start:0;inset-inline-end:0}.maplibregl-ctrl-attrib.maplibregl-compact{min-block-size:var(--lr-icon-button-size);padding-inline-end:var(--lr-icon-button-size);position:relative}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib-button:hover,.maplibregl-ctrl-attrib-button:active{background:var(--lr-color-brand-quiet)}.maplibregl-ctrl-attrib-button:focus-visible{outline:var(--lr-focus-ring);outline-offset:calc(-1 * var(--lr-focus-ring-offset))}.maplibregl-ctrl-attrib summary{-webkit-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary::-webkit-details-marker{display:none}.maplibregl-ctrl-attrib summary::marker{content:""}@media (forced-colors:active){[part=legend-swatch]{color:canvastext;border-color:canvastext;background:canvas!important}[part=legend-swatch][data-pattern=solid]{background:canvastext!important}}`;export{styles};
1
+ import{css}from"lit";const styles=css`:host{inline-size:100%;block-size:var(--lr-map-height,var(--lr-size-24rem));display:block;position:relative}[part=base]{block-size:100%;inline-size:100%;position:relative}lr-skeleton{--lr-skeleton-w:100%;--lr-skeleton-h:100%}[part=container]{block-size:100%;inline-size:100%;position:absolute;inset:0;overflow:hidden}.maplibregl-canvas-container{block-size:100%;inline-size:100%}.maplibregl-canvas{position:absolute;inset-block-start:0;inset-inline-start:0}.maplibregl-canvas-container.maplibregl-interactive{cursor:grab;user-select:none}.maplibregl-canvas-container.maplibregl-interactive:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-marker{inline-size:max-content;min-inline-size:var(--lr-size-1-5rem);min-block-size:var(--lr-size-1-5rem);box-sizing:border-box;will-change:transform;position:absolute;top:0;left:0}.maplibregl-popup{z-index:var(--lr-layer-content);will-change:transform;pointer-events:none;color:var(--lr-color-text);font-family:var(--lr-font);font-size:var(--lr-font-size-sm);line-height:var(--lr-line-height-normal);display:flex;position:absolute;top:0;left:0}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:var(--lr-size-0-625rem) solid transparent;block-size:0;inline-size:0;z-index:var(--lr-layer-content)}.maplibregl-popup-anchor-top .maplibregl-popup-tip{border-block-start:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{border-block-start:none;border-inline-start:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:flex-start}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{border-block-start:none;border-inline-end:none;border-block-end-color:var(--lr-color-surface-overlay);align-self:flex-end}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-block-end:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{border-block-end:none;border-inline-start:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:flex-start}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{border-block-end:none;border-inline-end:none;border-block-start-color:var(--lr-color-surface-overlay);align-self:flex-end}.maplibregl-popup-anchor-left .maplibregl-popup-tip{border-inline-start:none;border-inline-end-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-anchor-right .maplibregl-popup-tip{border-inline-end:none;border-inline-start-color:var(--lr-color-surface-overlay);align-self:center}.maplibregl-popup-content{min-inline-size:var(--lr-icon-button-size);padding:var(--lr-space-m);border:var(--lr-border-width-thin) solid var(--lr-color-border);border-radius:var(--lr-radius);background:var(--lr-color-surface-overlay);box-shadow:var(--lr-shadow-m);pointer-events:auto;overflow-wrap:anywhere;padding-inline-end:calc(var(--lr-icon-button-size) + var(--lr-space-xs));position:relative}.maplibregl-popup-close-button{min-inline-size:var(--lr-icon-button-size);min-block-size:var(--lr-icon-button-size);border-radius:var(--lr-radius);color:var(--lr-color-text-quiet);font:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset-block-start:0;inset-inline-end:0}.maplibregl-popup-close-button:where(:hover){background:var(--lr-map-popup-close-button-hover-bg,var(--lr-color-brand-quiet));color:var(--lr-map-popup-close-button-hover-color,var(--lr-color-brand))}.maplibregl-popup-close-button:where(:active){background:var(--lr-map-popup-close-button-active-bg,color-mix(in oklab, var(--lr-color-brand-quiet), var(--lr-color-mix-partner) var(--lr-color-mix-active)));color:var(--lr-map-popup-close-button-active-color,var(--lr-color-brand))}.maplibregl-popup-close-button:where(:focus-visible){outline:var(--lr-focus-ring);outline-offset:calc(-1 * var(--lr-focus-ring-offset))}[part=error]{padding:var(--lr-space-l);color:var(--lr-color-danger);font-size:var(--lr-font-size-md-sm);text-align:center;margin:0}[part=legend]{z-index:var(--lr-layer-content);min-inline-size:0;max-inline-size:calc(100% - var(--lr-space-s) - var(--lr-space-s));max-block-size:calc(100% - var(--lr-space-s) - var(--lr-space-s));box-sizing:border-box;gap:var(--lr-space-xs);padding:var(--lr-space-xs) var(--lr-space-s);background:var(--lr-color-surface);border:var(--lr-border-width-thin) solid var(--lr-color-border);border-radius:var(--lr-radius);box-shadow:var(--lr-shadow-m);font-size:var(--lr-font-size-xs);flex-direction:column;display:flex;position:absolute;inset-block-end:var(--lr-space-s);inset-inline-start:var(--lr-space-s);overflow:auto}.legend-list{gap:var(--lr-space-xs);flex-direction:column;min-inline-size:0;display:flex}.legend-gradient{align-items:center;gap:var(--lr-space-xs);min-inline-size:0;display:flex}.legend-gradient .gradient-bar{flex:1 1 var(--lr-size-6rem);min-inline-size:0;block-size:var(--lr-size-0-5rem);border-radius:var(--lr-size-2px)}[part=legend-lo],[part=legend-hi]{white-space:nowrap;flex:none}:host(:dir(rtl)) .legend-gradient .gradient-bar{transform:scaleX(-1)}.legend-row{align-items:center;gap:var(--lr-space-xs);min-inline-size:0;display:flex}.legend-row>span:last-child{overflow-wrap:anywhere;min-inline-size:0}[part=legend-swatch]{inline-size:var(--lr-size-0-75rem);block-size:var(--lr-size-0-75rem);box-sizing:border-box;border:var(--lr-border-width-thin) solid currentColor;border-radius:var(--lr-size-2px);flex:none;position:relative;overflow:hidden}[part=legend-swatch][data-pattern=diagonal]{border-style:dashed}[part=legend-swatch][data-pattern=dots]{border-style:dotted;border-radius:50%}[part=legend-swatch][data-pattern=crosshatch]{border-style:double;border-radius:0}[part=legend-swatch][data-pattern=diagonal]:before,[part=legend-swatch][data-pattern=crosshatch]:before,[part=legend-swatch][data-pattern=crosshatch]:after,[part=legend-swatch][data-pattern=dots]:before{content:"";inline-size:150%;block-size:var(--lr-border-width-thin);background:currentColor;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)rotate(-45deg)}[part=legend-swatch][data-pattern=crosshatch]:after{transform:translate(-50%,-50%)rotate(45deg)}[part=legend-swatch][data-pattern=dots]:before{inline-size:var(--lr-size-2px);block-size:var(--lr-size-2px);border-radius:50%;transform:translate(-50%,-50%)}[part=legend-limit]{min-inline-size:0;border-block-start:var(--lr-border-width-thin) solid var(--lr-color-border);color:var(--lr-color-text-quiet);overflow-wrap:anywhere;padding-block-start:var(--lr-space-xs)}.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right,.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right{z-index:var(--lr-layer-content);pointer-events:none;position:absolute}.maplibregl-ctrl-top-left{inset-block-start:0;inset-inline-start:0}.maplibregl-ctrl-top-right{inset-block-start:0;inset-inline-end:0}.maplibregl-ctrl-bottom-left{inset-block-end:0;inset-inline-start:0}.maplibregl-ctrl-bottom-right{inset-block-end:0;inset-inline-end:0}.maplibregl-ctrl{margin:var(--lr-space-xs);pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-attrib{padding:0 var(--lr-space-xs);border-radius:var(--lr-radius);background:var(--lr-color-surface);color:var(--lr-color-text-quiet);font-size:var(--lr-font-size-xs)}.maplibregl-ctrl-attrib a{color:var(--lr-color-text-quiet);text-decoration:none}.maplibregl-ctrl-attrib a:hover{text-decoration:underline}.maplibregl-ctrl-attrib-inner{overflow-wrap:anywhere}.maplibregl-ctrl-attrib-button{inline-size:var(--lr-icon-button-size);block-size:var(--lr-icon-button-size);border-radius:var(--lr-radius-pill);color:var(--lr-color-text);cursor:pointer;background:0 0;border:0;padding:0;display:none;position:absolute;inset-block-start:0;inset-inline-end:0}.maplibregl-ctrl-attrib.maplibregl-compact{min-block-size:var(--lr-icon-button-size);padding-inline-end:var(--lr-icon-button-size);position:relative}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib-button:hover,.maplibregl-ctrl-attrib-button:active{background:var(--lr-color-brand-quiet)}.maplibregl-ctrl-attrib-button:focus-visible{outline:var(--lr-focus-ring);outline-offset:calc(-1 * var(--lr-focus-ring-offset))}.maplibregl-ctrl-attrib summary{-webkit-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary::-webkit-details-marker{display:none}.maplibregl-ctrl-attrib summary::marker{content:""}@media (forced-colors:active){[part=legend-swatch]{color:canvastext;border-color:canvastext;background:canvas!important}[part=legend-swatch][data-pattern=solid]{background:canvastext!important}}`;export{styles};
@@ -115,7 +115,7 @@ export declare class LyraMediaCard extends LyraElement<LyraMediaCardEventMap>{st
115
115
  src:string;
116
116
  /** Explicit format dispatch. Leave unset to auto-detect from `mime-type`. */
117
117
  kind?:LyraMediaCardKind;
118
- /** Drives auto-detection when `kind` is unset. */
118
+ /** Drives auto-detection when `kind` is unset. Attribute removal is consumed as an absent hint. */
119
119
  mimeType:string;
120
120
  /** Shown in the file-chip fallback, used as the download link's suggested
121
121
  * filename, and folded into the accessible name of the whole card. */
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{expandIcon,fileIcon}from"../../../internal/icons.js";import{safeDownloadHref as safeMediaCardLinkHref,safeMediaSrc as safeMediaCardSrc}from"../../../internal/safe-url.js";import{styles}from"./media-card.styles.js";import{sanitizeCssLength}from"../../../internal/safe-css.js";import{LYRA_DEFAULT_mediaCardImageAttachment,LYRA_DEFAULT_mediaCardOpenFileAttachment,LYRA_DEFAULT_mediaCardOpenImageAttachment,LYRA_DEFAULT_mediaCardOpenName,LYRA_DEFAULT_mediaCardOpenVideoAttachment,LYRA_DEFAULT_mediaCardUntitledFile,LYRA_DEFAULT_mediaCardVideoAttachment}from"../../../internal/default-strings.generated.js";function detectKind(mimeType){const mt=mimeType.trim().toLowerCase();return mt.startsWith("image/")?"image":mt.startsWith("video/")?"video":"file"}class LyraMediaCard extends LyraElement{constructor(){super(...arguments),this.src="",this.mimeType="",this.filename="",this.accessibleLabel=null,this.maxHeight="",this.frame="card",this.onActivate=()=>{this.emit("lr-media-open",this.eventDetail())},this.onActionFocus=event=>{relayNativeEvent(this,event)},this.onActionBlur=event=>{relayNativeEvent(this,event)},this.onLinkClick=e=>{this.emit("lr-before-media-download",this.eventDetail(),{cancelable:!0}).defaultPrevented&&e.preventDefault()}}static{this.defaultStrings={...super.defaultStrings,mediaCardImageAttachment:LYRA_DEFAULT_mediaCardImageAttachment,mediaCardOpenFileAttachment:LYRA_DEFAULT_mediaCardOpenFileAttachment,mediaCardOpenImageAttachment:LYRA_DEFAULT_mediaCardOpenImageAttachment,mediaCardOpenName:LYRA_DEFAULT_mediaCardOpenName,mediaCardOpenVideoAttachment:LYRA_DEFAULT_mediaCardOpenVideoAttachment,mediaCardUntitledFile:LYRA_DEFAULT_mediaCardUntitledFile,mediaCardVideoAttachment:LYRA_DEFAULT_mediaCardVideoAttachment}}static{this.styles=[LyraElement.styles,styles]}get resolvedKind(){return this.kind??detectKind(this.mimeType)}get displayFilename(){return this.filename||this.localize("mediaCardUntitledFile")}get actionLabel(){const hostLabel=hostAriaLabel(this);if(this.accessibleLabel&&(hostLabel===null||this.accessibleLabel!==hostLabel))return this.accessibleLabel;const name=this.filename||this.alt;return name?this.localize("mediaCardOpenName",void 0,{name}):this.resolvedKind==="image"?this.localize("mediaCardOpenImageAttachment"):this.resolvedKind==="video"?this.localize("mediaCardOpenVideoAttachment"):this.localize("mediaCardOpenFileAttachment")}get imgAlt(){return this.alt??(this.filename||this.localize("mediaCardImageAttachment"))}get videoLabel(){return this.alt||this.filename||this.localize("mediaCardVideoAttachment")}get baseStyle(){const maxHeight=sanitizeCssLength(this.maxHeight);return maxHeight?styleMap({"--lr-media-card-max-height":maxHeight}):nothing}eventDetail(){return{src:safeMediaCardSrc(this.src)??safeMediaCardLinkHref(this.src)??this.src.trim(),filename:this.filename}}get primaryAction(){return this.shadowRoot?.querySelector('button[part="base"], button[part="open-button"], a[part="base"]')??null}focus(options){this.primaryAction?.focus(options)}blur(){this.primaryAction?.blur()}click(){this.primaryAction?.click()}renderImage(src){return html`
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{expandIcon,fileIcon}from"../../../internal/icons.js";import{safeDownloadHref as safeMediaCardLinkHref,safeMediaSrc as safeMediaCardSrc}from"../../../internal/safe-url.js";import{styles}from"./media-card.styles.js";import{sanitizeCssLength}from"../../../internal/safe-css.js";import{LYRA_DEFAULT_mediaCardImageAttachment,LYRA_DEFAULT_mediaCardOpenFileAttachment,LYRA_DEFAULT_mediaCardOpenImageAttachment,LYRA_DEFAULT_mediaCardOpenName,LYRA_DEFAULT_mediaCardOpenVideoAttachment,LYRA_DEFAULT_mediaCardUntitledFile,LYRA_DEFAULT_mediaCardVideoAttachment}from"../../../internal/default-strings.generated.js";function detectKind(mimeType){const mt=mimeType.trim().toLowerCase();return mt.startsWith("image/")?"image":mt.startsWith("video/")?"video":"file"}class LyraMediaCard extends LyraElement{constructor(){super(...arguments),this.src="",this.mimeType="",this.filename="",this.accessibleLabel=null,this.maxHeight="",this.frame="card",this.onActivate=()=>{this.emit("lr-media-open",this.eventDetail())},this.onActionFocus=event=>{relayNativeEvent(this,event)},this.onActionBlur=event=>{relayNativeEvent(this,event)},this.onLinkClick=e=>{this.emit("lr-before-media-download",this.eventDetail(),{cancelable:!0}).defaultPrevented&&e.preventDefault()}}static{this.defaultStrings={...super.defaultStrings,mediaCardImageAttachment:LYRA_DEFAULT_mediaCardImageAttachment,mediaCardOpenFileAttachment:LYRA_DEFAULT_mediaCardOpenFileAttachment,mediaCardOpenImageAttachment:LYRA_DEFAULT_mediaCardOpenImageAttachment,mediaCardOpenName:LYRA_DEFAULT_mediaCardOpenName,mediaCardOpenVideoAttachment:LYRA_DEFAULT_mediaCardOpenVideoAttachment,mediaCardUntitledFile:LYRA_DEFAULT_mediaCardUntitledFile,mediaCardVideoAttachment:LYRA_DEFAULT_mediaCardVideoAttachment}}static{this.styles=[LyraElement.styles,styles]}get resolvedKind(){return this.kind??detectKind(this.mimeType??"")}get displayFilename(){return this.filename||this.localize("mediaCardUntitledFile")}get actionLabel(){const hostLabel=this.getAttribute("aria-label");if(this.accessibleLabel&&(hostLabel===null||this.accessibleLabel!==hostLabel))return this.accessibleLabel;const name=this.filename||this.alt;return name?this.localize("mediaCardOpenName",void 0,{name}):this.resolvedKind==="image"?this.localize("mediaCardOpenImageAttachment"):this.resolvedKind==="video"?this.localize("mediaCardOpenVideoAttachment"):this.localize("mediaCardOpenFileAttachment")}get imgAlt(){return this.alt??(this.filename||this.localize("mediaCardImageAttachment"))}get videoLabel(){return this.alt||this.filename||this.localize("mediaCardVideoAttachment")}get baseStyle(){const maxHeight=sanitizeCssLength(this.maxHeight);return maxHeight?styleMap({"--lr-media-card-max-height":maxHeight}):nothing}eventDetail(){return{src:safeMediaCardSrc(this.src)??safeMediaCardLinkHref(this.src)??this.src.trim(),filename:this.filename}}get primaryAction(){return this.shadowRoot?.querySelector('button[part="base"], button[part="open-button"], a[part="base"]')??null}focus(options){this.primaryAction?.focus(options)}blur(){this.primaryAction?.blur()}click(){this.primaryAction?.click()}renderImage(src){return html`
2
2
  <button
3
3
  part="base"
4
4
  type="button"
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html}from"lit";import{property}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{srOnly}from"../../../internal/a11y.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{finiteRange}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{styles}from"./pan-zoom.styles.js";import{LYRA_DEFAULT_pdfViewerCurrentZoom,LYRA_DEFAULT_resetZoom,LYRA_DEFAULT_zoomControls,LYRA_DEFAULT_zoomIn,LYRA_DEFAULT_zoomOut,LYRA_DEFAULT_zoomableFrameLabel}from"../../../internal/default-strings.generated.js";function isElementTarget(target){const candidate=target;return candidate.nodeType===1&&typeof candidate.matches=="function"}function ownsKeyboardInput(event){for(const target of event.composedPath())if(isElementTarget(target)&&target.matches('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="searchbox"], [role="combobox"], [role="spinbutton"], [role="slider"], [role="listbox"], [role="menu"], [role="menuitem"], [role="radio"], [role="radiogroup"], [role="grid"], [role="tree"], [role="tablist"]'))return!0;return!1}class LyraPanZoom extends LyraElement{constructor(){super(...arguments),this.zoom=1,this.minZoom=.5,this.maxZoom=4,this.zoomStep=.25,this.src="",this.alt="",this.accessibleLabel=null,this.onViewportFocus=event=>{relayNativeEvent(this,event)},this.onViewportBlur=event=>{relayNativeEvent(this,event)},this.onViewportKeyDown=event=>{ownsKeyboardInput(event)||(event.key==="+"||event.key==="="?(event.preventDefault(),this.zoomIn()):event.key==="-"||event.key==="_"?(event.preventDefault(),this.zoomOut()):event.key==="0"&&(event.preventDefault(),this.resetZoom()))}}static{this.defaultStrings={...super.defaultStrings,pdfViewerCurrentZoom:LYRA_DEFAULT_pdfViewerCurrentZoom,resetZoom:LYRA_DEFAULT_resetZoom,zoomControls:LYRA_DEFAULT_zoomControls,zoomIn:LYRA_DEFAULT_zoomIn,zoomOut:LYRA_DEFAULT_zoomOut,zoomableFrameLabel:LYRA_DEFAULT_zoomableFrameLabel}}static{this.styles=[LyraElement.styles,styles,srOnly]}get safeMinZoom(){return finiteRange(this.minZoom,.5,.01,1e3)}get safeMaxZoom(){return finiteRange(this.maxZoom,4,this.safeMinZoom,1e3)}get safeZoomStep(){return finiteRange(this.zoomStep,.25,.01,1e3)}get safeZoom(){return finiteRange(this.zoom,1,this.safeMinZoom,this.safeMaxZoom)}setZoom(value,quantize=!0){const min=this.safeMinZoom,max=this.safeMaxZoom,step=this.safeZoomStep,stepped=quantize?Math.round(value/step)*step:value,next=Math.min(max,Math.max(min,Math.round(stepped*100)/100));next!==this.zoom&&(this.zoom=next,this.emit("lr-zoom-change",{zoom:next}))}zoomIn(){this.setZoom(this.safeZoom+this.safeZoomStep)}zoomOut(){this.setZoom(this.safeZoom-this.safeZoomStep)}resetZoom(){this.setZoom(1,!1)}resetView(){this.resetZoom(),this.renderRoot.querySelector('[part="viewport"]')?.scrollTo({left:0,top:0})}get viewportEl(){return this.renderRoot.querySelector('[part="viewport"]')}focus(options){this.viewportEl?.focus(options)}blur(){this.viewportEl?.blur()}click(){this.viewportEl?.click()}render(){const zoom=this.safeZoom,min=this.safeMinZoom,max=this.safeMaxZoom,viewportLabel=hostAriaLabel(this)!==null?this.localize("zoomableFrameLabel"):this.accessibleLabel??this.localize("zoomableFrameLabel"),safeSrc=safeMediaSrc(this.src);return html`<div part="base">
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html}from"lit";import{property}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{srOnly}from"../../../internal/a11y.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{finiteRange}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{styles}from"./pan-zoom.styles.js";import{LYRA_DEFAULT_pdfViewerCurrentZoom,LYRA_DEFAULT_resetZoom,LYRA_DEFAULT_zoomControls,LYRA_DEFAULT_zoomIn,LYRA_DEFAULT_zoomOut,LYRA_DEFAULT_zoomableFrameLabel}from"../../../internal/default-strings.generated.js";function isElementTarget(target){const candidate=target;return candidate.nodeType===1&&typeof candidate.matches=="function"}function ownsKeyboardInput(event){for(const target of event.composedPath())if(isElementTarget(target)&&target.matches('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="searchbox"], [role="combobox"], [role="spinbutton"], [role="slider"], [role="listbox"], [role="menu"], [role="menuitem"], [role="radio"], [role="radiogroup"], [role="grid"], [role="tree"], [role="tablist"]'))return!0;return!1}class LyraPanZoom extends LyraElement{constructor(){super(...arguments),this.zoom=1,this.minZoom=.5,this.maxZoom=4,this.zoomStep=.25,this.src="",this.alt="",this.accessibleLabel=null,this.onViewportFocus=event=>{relayNativeEvent(this,event)},this.onViewportBlur=event=>{relayNativeEvent(this,event)},this.onViewportKeyDown=event=>{ownsKeyboardInput(event)||(event.key==="+"||event.key==="="?(event.preventDefault(),this.zoomIn()):event.key==="-"||event.key==="_"?(event.preventDefault(),this.zoomOut()):event.key==="0"&&(event.preventDefault(),this.resetZoom()))}}static{this.defaultStrings={...super.defaultStrings,pdfViewerCurrentZoom:LYRA_DEFAULT_pdfViewerCurrentZoom,resetZoom:LYRA_DEFAULT_resetZoom,zoomControls:LYRA_DEFAULT_zoomControls,zoomIn:LYRA_DEFAULT_zoomIn,zoomOut:LYRA_DEFAULT_zoomOut,zoomableFrameLabel:LYRA_DEFAULT_zoomableFrameLabel}}static{this.styles=[LyraElement.styles,styles,srOnly]}get safeMinZoom(){return finiteRange(this.minZoom,.5,.01,1e3)}get safeMaxZoom(){return finiteRange(this.maxZoom,4,this.safeMinZoom,1e3)}get safeZoomStep(){return finiteRange(this.zoomStep,.25,.01,1e3)}get safeZoom(){return finiteRange(this.zoom,1,this.safeMinZoom,this.safeMaxZoom)}setZoom(value,quantize=!0){const min=this.safeMinZoom,max=this.safeMaxZoom,step=this.safeZoomStep,stepped=quantize?Math.round(value/step)*step:value,next=Math.min(max,Math.max(min,Math.round(stepped*100)/100));next!==this.zoom&&(this.zoom=next,this.emit("lr-zoom-change",{zoom:next}))}zoomIn(){this.setZoom(this.safeZoom+this.safeZoomStep)}zoomOut(){this.setZoom(this.safeZoom-this.safeZoomStep)}resetZoom(){this.setZoom(1,!1)}resetView(){this.resetZoom(),this.renderRoot.querySelector('[part="viewport"]')?.scrollTo({left:0,top:0})}get viewportEl(){return this.renderRoot.querySelector('[part="viewport"]')}focus(options){this.viewportEl?.focus(options)}blur(){this.viewportEl?.blur()}click(){this.viewportEl?.click()}render(){const zoom=this.safeZoom,min=this.safeMinZoom,max=this.safeMaxZoom,viewportLabel=this.getAttribute("aria-label")!==null?this.localize("zoomableFrameLabel"):this.accessibleLabel??this.localize("zoomableFrameLabel"),safeSrc=safeMediaSrc(this.src);return html`<div part="base">
2
2
  <div
3
3
  part="viewport"
4
4
  role="group"
@@ -1 +1 @@
1
- import{resolveOptionalPeerCapability}from"../../../internal/optional-peer-capabilities.js";function isQrCodeApi(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&"create"in value&&typeof value.create=="function"}let cached;async function loadQrCode(importQrCode=()=>import("qrcode")){try{const module=await importQrCode();return resolveOptionalPeerCapability(module,isQrCodeApi)}catch(error){return console.warn("<lr-qr-code> needs the optional peer dependency `qrcode` to render QR codes \u2014 install it with `pnpm add qrcode`:",error),null}}function loadQrCodeCached(){return cached||(cached=loadQrCode()),cached}function clearQrCodeCache(){cached=void 0}export{clearQrCodeCache,loadQrCode,loadQrCodeCached};
1
+ import{resolveOptionalPeerCapability}from"../../../internal/optional-peer-capabilities.js";import{devWarnOnce}from"../../../internal/dev-mode-attribute-warning.js";const QR_CODE_PEER_WARNING_KEY="lyra-qr-code-peer-unavailable",QR_CODE_PEER_WARNING="<lr-qr-code> could not load its optional qrcode peer.";function isQrCodeApi(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&"create"in value&&typeof value.create=="function"}let cached;async function loadQrCode(importQrCode=()=>import("qrcode")){try{const module=await importQrCode();return resolveOptionalPeerCapability(module,isQrCodeApi)}catch{return devWarnOnce(QR_CODE_PEER_WARNING_KEY,QR_CODE_PEER_WARNING),null}}function loadQrCodeCached(){return cached||(cached=loadQrCode()),cached}function clearQrCodeCache(){cached=void 0}export{clearQrCodeCache,loadQrCode,loadQrCodeCached};
@@ -91,11 +91,14 @@ get errorCorrection():LyraQrCodeErrorCorrection;set errorCorrection(value:LyraQr
91
91
  /** The stable canvas used for QR paint. The same node remains reachable across empty, loading,
92
92
  * ready, error, reconnect, and redraw transitions. Readonly: an explicit `get` (rather than
93
93
  * `@query`) so the generated manifest marks it non-assignable. */
94
- get canvas():HTMLCanvasElement;private loadState;private errorAnnouncementSink?;private statusAnnouncementSink?;private pendingLoadingAnnouncement;private readonly accessibilityInternals?;private visible;private intersectionObserver?;
94
+ get canvas():HTMLCanvasElement;private loadState;private errorAnnouncementSink?;private statusAnnouncementSink?;private pendingLoadingAnnouncement;private readonly accessibilityInternals?;private visible;private visibilityKnown;private intersectionObserver?;private intersectionGeneration;
95
95
  /** Injectable loader seam -- overridden directly by tests with a synchronous fake instead of
96
96
  * needing the real `qrcode` package to load in the test browser (mirrors `LyraPdfViewer`'s
97
97
  * `loadLibrary` field). */
98
- private loadLibrary;private generation;constructor();connectedCallback():void;disconnectedCallback():void;adoptedCallback():void;private syncAnnouncementSinks;private releaseAnnouncementSinks;private transitionTo;private syncSemanticOwner;protected updated(changed:PropertyValues):void;protected willUpdate(changed:PropertyValues):void;
98
+ private loadLibrary;private generation;constructor();connectedCallback():void;disconnectedCallback():void;adoptedCallback():void;
99
+ /** Binds visibility to the current owner realm. A valid observer entry is required before
100
+ * painting, but a missing or failing platform capability preserves immediate rendering. */
101
+ private bindVisibilityObserver;private clearVisibilityObserver;private restoreImmediateVisibility;private syncAnnouncementSinks;private releaseAnnouncementSinks;private transitionTo;private syncSemanticOwner;protected updated(changed:PropertyValues):void;protected willUpdate(changed:PropertyValues):void;
99
102
  /** Re-encodes `value` via the optional `qrcode` peer's `create()` and caches the resulting
100
103
  * module matrix. Redraw-only geometry changes (`size`/`radius`) and theme refreshes never
101
104
  * call this -- see the class doc comment and `updated()`'s dispatch. */