@ngrok/mantle 0.84.0 → 0.84.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/accordion.d.ts +14 -10
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1 -1
  4. package/dist/{alert-Blmunr_D.d.ts → alert-DCVfviBx.d.ts} +18 -3
  5. package/dist/alert-DtBQuuuP.js +1 -0
  6. package/dist/alert-center.d.ts +15 -6
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +58 -37
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert.d.ts +1 -1
  11. package/dist/alert.js +1 -1
  12. package/dist/alternate-announcement-BkH4bOKp.js +1 -0
  13. package/dist/anchor-Cqu4GPPV.js +1 -0
  14. package/dist/anchor.d.ts +15 -15
  15. package/dist/anchor.js +1 -1
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.js +1 -1
  18. package/dist/avatar.js +1 -1
  19. package/dist/badge.d.ts +3 -1
  20. package/dist/badge.js +1 -1
  21. package/dist/bar-chart.d.ts +17 -8
  22. package/dist/bar-chart.js +1 -1
  23. package/dist/breadcrumb.js +1 -1
  24. package/dist/button-B52_vczK.js +1 -0
  25. package/dist/{button-DjsmeoJ2.d.ts → button-B5i9n7Qp.d.ts} +19 -7
  26. package/dist/button-CaM-ZAH5.js +1 -0
  27. package/dist/{button-Bc0lEOJ2.js → button-DGsTE3P2.js} +1 -1
  28. package/dist/{button-CRCNRnk6.d.ts → button-DO53OA70.d.ts} +2 -2
  29. package/dist/{button-DmJkYfyl.js → button-Wn-yt0c_.js} +1 -1
  30. package/dist/{button-C39M5h4K.d.ts → button-crUf0hbR.d.ts} +19 -2
  31. package/dist/button.d.ts +3 -3
  32. package/dist/button.js +1 -1
  33. package/dist/calendar.d.ts +20 -4
  34. package/dist/calendar.js +1 -1
  35. package/dist/card.d.ts +10 -6
  36. package/dist/card.js +1 -1
  37. package/dist/centered-layout.js +1 -1
  38. package/dist/chart-B_rZqf8a.js +2 -0
  39. package/dist/checkbox-Gg6nGUnR.js +1 -0
  40. package/dist/checkbox.js +1 -1
  41. package/dist/choice-CT_AdesL.js +1 -0
  42. package/dist/{choice-CVdQrs-m.d.ts → choice-PESu-9s8.d.ts} +46 -12
  43. package/dist/choice.d.ts +1 -1
  44. package/dist/choice.js +1 -1
  45. package/dist/{code-block-Dj9otiLi.js → code-block-BE3Q0iAo.js} +2 -2
  46. package/dist/code-block.d.ts +26 -2
  47. package/dist/code-block.js +6 -6
  48. package/dist/code-block_highlight-utils.js +1 -1
  49. package/dist/code.js +1 -1
  50. package/dist/combobox.d.ts +19 -2
  51. package/dist/combobox.js +1 -1
  52. package/dist/command.d.ts +32 -13
  53. package/dist/command.js +1 -1
  54. package/dist/compose-refs-DdUwopIY.js +1 -0
  55. package/dist/{cx-IiQEAKf5.js → cx-0HCjnNv1.js} +1 -1
  56. package/dist/cx.d.ts +3 -3
  57. package/dist/cx.js +1 -1
  58. package/dist/data-table.d.ts +114 -61
  59. package/dist/data-table.js +1 -1
  60. package/dist/description-list.d.ts +43 -9
  61. package/dist/description-list.js +1 -1
  62. package/dist/{dialog-u8PtHYES.d.ts → dialog-B8YvfyIo.d.ts} +5 -3
  63. package/dist/{dialog-CnlaqHNh.js → dialog-CA-1Z0Np.js} +1 -1
  64. package/dist/{dialog-CEk0L7M7.d.ts → dialog-CtLI_uex.d.ts} +5 -3
  65. package/dist/dialog.d.ts +2 -2
  66. package/dist/dialog.js +1 -1
  67. package/dist/{dropdown-menu-CpsUJGbn.d.ts → dropdown-menu-BYapTV0f.d.ts} +8 -5
  68. package/dist/dropdown-menu-BkPBh_8y.d.ts +1 -0
  69. package/dist/{dropdown-menu-DJDrRzDU.js → dropdown-menu-lxHsgLiw.js} +1 -1
  70. package/dist/dropdown-menu.d.ts +2 -2
  71. package/dist/dropdown-menu.js +1 -1
  72. package/dist/empty.d.ts +4 -4
  73. package/dist/empty.js +1 -1
  74. package/dist/field.d.ts +91 -38
  75. package/dist/field.js +1 -1
  76. package/dist/flag.d.ts +9 -1
  77. package/dist/flag.js +1 -1
  78. package/dist/hooks.d.ts +28 -19
  79. package/dist/hooks.js +1 -1
  80. package/dist/hover-card.d.ts +11 -3
  81. package/dist/hover-card.js +1 -1
  82. package/dist/{icon-k4E9yNWD.d.ts → icon-BmJ57Tgh.d.ts} +10 -0
  83. package/dist/icon-CGKaq_tV.js +1 -0
  84. package/dist/icon-U24NfYv7.js +1 -0
  85. package/dist/icon-w0HUe7tr.d.ts +42 -0
  86. package/dist/icon.d.ts +2 -2
  87. package/dist/icon.js +1 -1
  88. package/dist/{icons-DEVx1oP9.js → icons-Cie4gcrm.js} +1 -1
  89. package/dist/icons.d.ts +7 -13
  90. package/dist/icons.js +1 -1
  91. package/dist/{in-view-gxyc9Q1_.d.ts → in-view-Ch5vJtWo.d.ts} +10 -5
  92. package/dist/input-BhykQSvJ.js +1 -0
  93. package/dist/input-DQyN6gN0.js +1 -0
  94. package/dist/input.d.ts +22 -10
  95. package/dist/input.js +1 -1
  96. package/dist/interactive-target-BXScNeOr.js +1 -0
  97. package/dist/{kbd-B9qmYaW8.js → kbd-4_0Y_8rx.js} +1 -1
  98. package/dist/kbd.d.ts +15 -9
  99. package/dist/kbd.js +1 -1
  100. package/dist/{label-C6YH9skg.d.ts → label-Bnfe9YJ6.d.ts} +3 -1
  101. package/dist/label-BqIp6kFx.js +1 -0
  102. package/dist/label.d.ts +1 -1
  103. package/dist/label.js +1 -1
  104. package/dist/layer-container-BTcQpd4K.js +1 -0
  105. package/dist/layer-container.js +1 -1
  106. package/dist/line-chart.js +1 -1
  107. package/dist/list-Bo1mExIg.js +1 -0
  108. package/dist/list.d.ts +37 -14
  109. package/dist/list.js +1 -1
  110. package/dist/live-region-CV7kykeo.js +1 -0
  111. package/dist/live-region.js +1 -1
  112. package/dist/llms.txt +1 -1
  113. package/dist/main.d.ts +4 -2
  114. package/dist/main.js +1 -1
  115. package/dist/media-object.d.ts +5 -12
  116. package/dist/media-object.js +1 -1
  117. package/dist/multi-select.d.ts +45 -13
  118. package/dist/multi-select.js +1 -1
  119. package/dist/otp-input.d.ts +9 -3
  120. package/dist/otp-input.js +1 -1
  121. package/dist/pagination.d.ts +165 -19
  122. package/dist/pagination.js +1 -1
  123. package/dist/{popover-D6x6Bq-G.js → popover-Bp-9B3GR.js} +1 -1
  124. package/dist/{popover-DDuw1UaJ.d.ts → popover-s2LhmzfQ.d.ts} +8 -4
  125. package/dist/popover.d.ts +1 -1
  126. package/dist/popover.js +1 -1
  127. package/dist/primitive-CejGAoGb.js +1 -0
  128. package/dist/progress.d.ts +65 -31
  129. package/dist/progress.js +1 -1
  130. package/dist/qr-code.d.ts +10 -4
  131. package/dist/qr-code.js +1 -1
  132. package/dist/radio-group-HDVxTNPi.js +1 -0
  133. package/dist/radio-group.d.ts +50 -25
  134. package/dist/radio-group.js +1 -1
  135. package/dist/sandbar.d.ts +1 -1
  136. package/dist/sandbar.js +1 -1
  137. package/dist/sandboxed-on-click-UagMFl_U.js +1 -0
  138. package/dist/sandboxed-on-click.d.ts +8 -0
  139. package/dist/sandboxed-on-click.js +1 -1
  140. package/dist/scatter-plot.js +1 -1
  141. package/dist/select-Dov9H2CX.js +1 -0
  142. package/dist/{select-DkFkSYBP.d.ts → select-ouAW88jx.d.ts} +30 -9
  143. package/dist/select.d.ts +1 -1
  144. package/dist/select.js +1 -1
  145. package/dist/selectable-list.d.ts +64 -20
  146. package/dist/selectable-list.js +1 -1
  147. package/dist/{separator-CNDs98Dv.d.ts → separator-Bo4nY_3M.d.ts} +13 -2
  148. package/dist/{separator-D0D6VyyM.js → separator-Da8lDnio.js} +1 -1
  149. package/dist/separator.d.ts +1 -1
  150. package/dist/separator.js +1 -1
  151. package/dist/{sheet-BcfnKUit.js → sheet-C6UGAvRk.js} +1 -1
  152. package/dist/sheet.d.ts +5 -5
  153. package/dist/sheet.js +1 -1
  154. package/dist/sidebar.d.ts +7 -6
  155. package/dist/sidebar.js +1 -1
  156. package/dist/skeleton-paJOgf-f.js +1 -0
  157. package/dist/skeleton.d.ts +5 -4
  158. package/dist/skeleton.js +1 -1
  159. package/dist/skip-to-main-link.d.ts +9 -6
  160. package/dist/skip-to-main-link.js +1 -1
  161. package/dist/slider.d.ts +7 -3
  162. package/dist/slider.js +1 -1
  163. package/dist/{slot-DpNWVci8.js → slot-C3gII_9c.js} +1 -1
  164. package/dist/slot.js +1 -1
  165. package/dist/split-button.d.ts +8 -3
  166. package/dist/split-button.js +1 -1
  167. package/dist/switch.js +1 -1
  168. package/dist/{table-D51ZtV4U.d.ts → table-DEI-qvSC.d.ts} +25 -12
  169. package/dist/table-EZNW3nFk.js +1 -0
  170. package/dist/table.d.ts +1 -1
  171. package/dist/table.js +1 -1
  172. package/dist/tabs.js +1 -1
  173. package/dist/text-area.js +1 -1
  174. package/dist/theme-DN-Et3A_.js +1 -0
  175. package/dist/theme-switcher.d.ts +24 -12
  176. package/dist/theme-switcher.js +1 -1
  177. package/dist/theme.d.ts +18 -4
  178. package/dist/theme.js +1 -1
  179. package/dist/toast.d.ts +8 -3
  180. package/dist/toast.js +1 -1
  181. package/dist/tooltip-CkAibjBb.js +1 -0
  182. package/dist/{tooltip-BKWK5c7_.d.ts → tooltip-DA41fxe5.d.ts} +7 -1
  183. package/dist/tooltip.d.ts +1 -1
  184. package/dist/tooltip.js +1 -1
  185. package/dist/{use-breakpoint-Dqu12Szq.js → use-breakpoint-BhJ_3El2.js} +1 -1
  186. package/dist/use-is-apple-platform-CMPzIYjz.js +1 -0
  187. package/dist/use-matches-media-query-DCBT6iNA.js +1 -0
  188. package/dist/use-prefers-reduced-motion-DHYDQk1h.js +1 -0
  189. package/dist/utils.d.ts +1 -1
  190. package/dist/utils.js +1 -1
  191. package/dist/visually-hidden.js +1 -1
  192. package/dist/well.js +1 -1
  193. package/package.json +3 -3
  194. package/dist/alert-DDjzRuGa.js +0 -1
  195. package/dist/anchor-D2So_zuy.js +0 -1
  196. package/dist/button-CC10rP6X.js +0 -1
  197. package/dist/button-DiDlvAOp.js +0 -1
  198. package/dist/chart-BDxpXPfo.js +0 -2
  199. package/dist/checkbox-0EoxOyMA.js +0 -1
  200. package/dist/choice-CnwfjSEu.js +0 -1
  201. package/dist/compose-refs-BdBMM9ga.js +0 -1
  202. package/dist/dropdown-menu-CNaaABck.d.ts +0 -1
  203. package/dist/icon-CX_gj6sW.d.ts +0 -25
  204. package/dist/icon-d-nMCfAI.js +0 -1
  205. package/dist/icon-lZ48P8Nn.js +0 -1
  206. package/dist/input-BnlpQF0c.js +0 -1
  207. package/dist/input-CXmS0OFN.js +0 -1
  208. package/dist/label-D-D11mlp.js +0 -1
  209. package/dist/layer-container-CglTh9-6.js +0 -1
  210. package/dist/list-CwL23L_B.js +0 -1
  211. package/dist/primitive-BWyxJnXn.js +0 -1
  212. package/dist/select-BK6n6OIK.js +0 -1
  213. package/dist/skeleton-BhcJMpem.js +0 -1
  214. package/dist/table-C_Nm_RSV.js +0 -1
  215. package/dist/theme-CVfq037P.js +0 -1
  216. package/dist/tooltip-BZRRJgpm.js +0 -1
  217. package/dist/use-is-apple-platform-Cxwrb86L.js +0 -1
  218. package/dist/use-matches-media-query-Bd_GhhVd.js +0 -1
  219. package/dist/use-prefers-reduced-motion-Bk5zAfHY.js +0 -1
@@ -166,8 +166,8 @@ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: BarChartRoot
166
166
  declare const Bar: (props: BarChartBarProps) => null;
167
167
  /**
168
168
  * Hairline value gridlines behind the bars (renderless; painted on canvas).
169
- * The default runs perpendicular to the bars horizontal lines for vertical
170
- * bars, vertical lines for horizontal bars; pass `lines` to force a direction.
169
+ * The default runs perpendicular to the bars: horizontal lines for vertical
170
+ * bars, vertical lines for horizontal bars. Pass `lines` to force a direction.
171
171
  * Omit the part to omit the grid.
172
172
  *
173
173
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartgrid
@@ -223,8 +223,8 @@ declare const XAxis: (props: BarChartXAxisProps) => null;
223
223
  */
224
224
  declare const YAxis: (props: BarChartYAxisProps) => null;
225
225
  /**
226
- * A dashed marker at the value `y` an SLO threshold, a budget, a limit
227
- * (renderless; painted on canvas). It crosses the value axis: a horizontal
226
+ * A dashed marker at the value `y`, such as an SLO threshold, a budget, or a
227
+ * limit (renderless; painted on canvas). It crosses the value axis: a horizontal
228
228
  * line for vertical bars, a vertical line for horizontal bars.
229
229
  *
230
230
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartreferenceline
@@ -410,7 +410,10 @@ declare const BarChart: {
410
410
  */
411
411
  readonly Bar: typeof Bar;
412
412
  /**
413
- * Hairline gridlines behind the bars.
413
+ * Hairline value gridlines behind the bars (renderless; painted on canvas).
414
+ * The default runs perpendicular to the bars: horizontal lines for vertical
415
+ * bars, vertical lines for horizontal bars. Pass `lines` to force a direction.
416
+ * Omit the part to omit the grid.
414
417
  *
415
418
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartgrid
416
419
  *
@@ -429,7 +432,9 @@ declare const BarChart: {
429
432
  */
430
433
  readonly Grid: typeof Grid;
431
434
  /**
432
- * Category labels along the bottom of the plot.
435
+ * Category labels for the bars (renderless; painted on canvas): along the
436
+ * bottom for vertical bars, down the left gutter for horizontal bars. Labels
437
+ * that would collide are skipped, never rotated.
433
438
  *
434
439
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartxaxis
435
440
  *
@@ -448,7 +453,9 @@ declare const BarChart: {
448
453
  */
449
454
  readonly XAxis: typeof XAxis;
450
455
  /**
451
- * Value tick labels along the left of the plot.
456
+ * Value tick labels (renderless; painted on canvas): along the left for
457
+ * vertical bars, across the bottom for horizontal bars. Ticks land on clean
458
+ * thousands-separated numbers.
452
459
  *
453
460
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartyaxis
454
461
  *
@@ -467,7 +474,9 @@ declare const BarChart: {
467
474
  */
468
475
  readonly YAxis: typeof YAxis;
469
476
  /**
470
- * A dashed horizontal marker at a y value (threshold, budget, limit).
477
+ * A dashed marker at the value `y`, such as an SLO threshold, a budget, or a
478
+ * limit (renderless; painted on canvas). It crosses the value axis: a horizontal
479
+ * line for vertical bars, a vertical line for horizontal bars.
471
480
  *
472
481
  * @see https://mantle.ngrok.com/components/charts/bar-chart#barchartreferenceline
473
482
  *
package/dist/bar-chart.js CHANGED
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BDxpXPfo.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`bar`,componentName:`BarChart`,slotName:`bar-chart`,...e}),Bar:e=>a(`BarChart.Bar`,`bar`,e),Grid:e=>n(`BarChart.Grid`,e),XAxis:e=>t(`BarChart.XAxis`,e),YAxis:e=>r(`BarChart.YAxis`,e),ReferenceLine:t=>e(`BarChart.ReferenceLine`,t),Tooltip:e=>s(`BarChart.Tooltip`,e),Legend:e=>l(i,{partName:`BarChart.Legend`,slotName:`bar-chart`,...e}),CopyButton:e=>l(c,{partName:`BarChart.CopyButton`,slotName:`bar-chart`,...e})};export{u as BarChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-B_rZqf8a.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`bar`,componentName:`BarChart`,slotName:`bar-chart`,...e}),Bar:e=>a(`BarChart.Bar`,`bar`,e),Grid:e=>n(`BarChart.Grid`,e),XAxis:e=>t(`BarChart.XAxis`,e),YAxis:e=>r(`BarChart.YAxis`,e),ReferenceLine:t=>e(`BarChart.ReferenceLine`,t),Tooltip:e=>s(`BarChart.Tooltip`,e),Legend:e=>l(i,{partName:`BarChart.Legend`,slotName:`bar-chart`,...e}),CopyButton:e=>l(c,{partName:`BarChart.CopyButton`,slotName:`bar-chart`,...e})};export{u as BarChart};
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-lZ48P8Nn.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{t as a}from"./slot-DpNWVci8.js";import{t as o}from"./skeleton-BhcJMpem.js";import{cloneElement as s,isValidElement as c,useEffect as l,useRef as u}from"react";import{jsx as d}from"react/jsx-runtime";import{CaretRightIcon as f}from"@phosphor-icons/react/CaretRight";const p=({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`nav`,{ref:s,"data-slot":i(o,`breadcrumb`),"aria-label":`Breadcrumb`,className:n(`min-w-0`,r),...c,children:t});function m(e,t){let n=e.scrollWidth-e.clientWidth;return n===t||e.contains(document.activeElement)?t:(e.scrollLeft=n,n)}const h={Root:p,List:({asChild:r,children:o,className:s,"data-slot":c,ref:f,...p})=>{let h=r?a:`ol`,g=u(null),_=t(g,f),v=u(void 0);return e(()=>{let e=g.current;e!=null&&(v.current=m(e,v.current))}),l(()=>{let e=g.current;if(e==null)return;let t=new ResizeObserver(()=>{v.current=m(e,v.current)});return t.observe(e),()=>{t.disconnect()}},[]),d(h,{ref:_,"data-slot":i(c,`breadcrumb-list`),className:n(`text-muted flex items-center gap-1.5 text-sm`,`scroll-fade-x min-w-0 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,`scroll-px-10`,s),...p,children:o})},Item:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`li`,{ref:s,"data-slot":i(o,`breadcrumb-item`),className:n(`inline-flex shrink-0 items-center gap-1.5`,r),...c,children:t}),Link:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`a`,{ref:s,"data-slot":i(o,`breadcrumb-link`),className:n(`hover:text-strong transition-colors`,r),...c,children:t}),Label:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`span`,{ref:s,"data-slot":i(o,`breadcrumb-label`),className:n(`text-muted`,r),...c,children:t}),Page:({asChild:e,children:t,className:r,"data-slot":o,ref:l,...u})=>{let f=e?a:`span`,p=e&&c(t)?s(t,{"aria-current":`page`}):t;return d(f,{ref:l,"data-slot":i(o,`breadcrumb-page`),className:n(`text-muted`,r),...u,"aria-current":`page`,children:p})},Separator:({asChild:e,children:t,className:o,"data-slot":l,ref:u,...p})=>{let m=e?a:`li`,h=e&&c(t)?s(t,{role:`presentation`,"aria-hidden":`true`}):t??d(r,{svg:d(f,{}),className:`size-3.5`});return d(m,{ref:u,"data-slot":i(l,`breadcrumb-separator`),className:n(`shrink-0`,o),...p,role:`presentation`,"aria-hidden":`true`,children:h})},Skeleton:({className:e,"data-slot":t,label:r=`Loading breadcrumbs…`,ref:a,...s})=>d(o,{asChild:!0,children:d(`li`,{ref:a,"data-slot":i(t,`breadcrumb-skeleton`),className:n(`w-24 shrink-0`,e),...s,children:d(`span`,{role:`status`,className:`sr-only`,children:r})})})},g=Object.assign((e,t={})=>({kind:`link`,label:e,...t}),{label:e=>({kind:`label`,label:e}),content:e=>({kind:`content`,content:e})});function _(e){let{handle:t}=e;if(typeof t!=`object`||!t||!(`breadcrumb`in t))return!1;let{breadcrumb:n}=t;return typeof n==`string`||typeof n==`function`}function v(e){return e.filter(_).flatMap(e=>{let{breadcrumb:t}=e.handle;return(typeof t==`string`?[g(t)]:t(e)).map((t,n)=>{let r=`${e.id}:${n}`;return t.kind===`content`?{kind:`content`,key:r,content:t.content}:t.kind===`label`?{kind:`label`,key:r,label:t.label}:{kind:`link`,key:r,label:t.label,to:t.to??e.pathname}})})}export{h as Breadcrumb,v as buildCrumbs,_ as hasBreadcrumb,g as routeBreadcrumb};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./icon-CGKaq_tV.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{t as a}from"./slot-C3gII_9c.js";import{t as o}from"./skeleton-paJOgf-f.js";import{cloneElement as s,isValidElement as c,useEffect as l,useRef as u}from"react";import{jsx as d}from"react/jsx-runtime";import{CaretRightIcon as f}from"@phosphor-icons/react/CaretRight";const p=({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`nav`,{ref:s,"data-slot":i(o,`breadcrumb`),"aria-label":`Breadcrumb`,className:n(`min-w-0`,r),...c,children:t});function m(e,t){let n=e.scrollWidth-e.clientWidth;return n===t||e.contains(document.activeElement)?t:(e.scrollLeft=n,n)}const h={Root:p,List:({asChild:r,children:o,className:s,"data-slot":c,ref:f,...p})=>{let h=r?a:`ol`,g=u(null),_=t(g,f),v=u(void 0);return e(()=>{let e=g.current;e!=null&&(v.current=m(e,v.current))}),l(()=>{let e=g.current;if(e==null)return;let t=new ResizeObserver(()=>{v.current=m(e,v.current)});return t.observe(e),()=>{t.disconnect()}},[]),d(h,{ref:_,"data-slot":i(c,`breadcrumb-list`),className:n(`text-muted flex items-center gap-1.5 text-sm`,`scroll-fade-x min-w-0 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,`scroll-px-10`,s),...p,children:o})},Item:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`li`,{ref:s,"data-slot":i(o,`breadcrumb-item`),className:n(`inline-flex shrink-0 items-center gap-1.5`,r),...c,children:t}),Link:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`a`,{ref:s,"data-slot":i(o,`breadcrumb-link`),className:n(`hover:text-strong transition-colors`,r),...c,children:t}),Label:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>d(e?a:`span`,{ref:s,"data-slot":i(o,`breadcrumb-label`),className:n(`text-muted`,r),...c,children:t}),Page:({asChild:e,children:t,className:r,"data-slot":o,ref:l,...u})=>{let f=e?a:`span`,p=e&&c(t)?s(t,{"aria-current":`page`}):t;return d(f,{ref:l,"data-slot":i(o,`breadcrumb-page`),className:n(`text-muted`,r),...u,"aria-current":`page`,children:p})},Separator:({asChild:e,children:t,className:o,"data-slot":l,ref:u,...p})=>{let m=e?a:`li`,h=e&&c(t)?s(t,{role:`presentation`,"aria-hidden":`true`}):t??d(r,{svg:d(f,{}),className:`size-3.5`});return d(m,{ref:u,"data-slot":i(l,`breadcrumb-separator`),className:n(`shrink-0`,o),...p,role:`presentation`,"aria-hidden":`true`,children:h})},Skeleton:({className:e,"data-slot":t,label:r=`Loading breadcrumbs…`,ref:a,...s})=>d(o,{asChild:!0,"aria-hidden":!1,children:d(`li`,{ref:a,"data-slot":i(t,`breadcrumb-skeleton`),className:n(`w-24 shrink-0`,e),...s,children:d(`span`,{role:`status`,className:`sr-only`,children:r})})})},g=Object.assign((e,t={})=>({kind:`link`,label:e,...t}),{label:e=>({kind:`label`,label:e}),content:e=>({kind:`content`,content:e})});function _(e){let{handle:t}=e;if(typeof t!=`object`||!t||!(`breadcrumb`in t))return!1;let{breadcrumb:n}=t;return typeof n==`string`||typeof n==`function`}function v(e){return e.filter(_).flatMap(e=>{let{breadcrumb:t}=e.handle;return(typeof t==`string`?[g(t)]:t(e)).map((t,n)=>{let r=`${e.id}:${n}`;return t.kind===`content`?{kind:`content`,key:r,content:t.content}:t.kind===`label`?{kind:`label`,key:r,label:t.label}:{kind:`link`,key:r,label:t.label,to:t.to??e.pathname}})})}export{h as Breadcrumb,v as buildCrumbs,_ as hasBreadcrumb,g as routeBreadcrumb};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{cva as t}from"class-variance-authority";const n=e(`icon-button`,`inline-flex shrink-0 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`),r=t(n,{variants:{appearance:{filled:`bg-filled-neutral text-neutral-50 focus-visible:ring-focus-accent focus-visible:border-transparent not-disabled:hover:bg-filled-neutral-hover border-transparent`,ghost:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`,outlined:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},intent:{neutral:``},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`,lg:`size-10`,xl:`size-12`}},defaultVariants:{intent:`neutral`,size:`md`}});export{r as t};
@@ -77,8 +77,7 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
77
77
  intent: ButtonIntent;
78
78
  /**
79
79
  * An icon to render inside the button, beside the button's text
80
- * children. If the `state` is `"pending"`, then the icon will
81
- * automatically be replaced with a spinner.
80
+ * children. When `isLoading` is `true`, a spinner replaces the icon.
82
81
  *
83
82
  * For an icon-only button, do not use `Button` — use `IconButton`
84
83
  * instead: it requires an accessible `label` and renders a square box
@@ -86,8 +85,8 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
86
85
  */
87
86
  icon?: ReactNode;
88
87
  /**
89
- * The side that the icon will render on, if one is present. If `state="pending"`,
90
- * then the loading icon will also render on this side.
88
+ * The side that the icon will render on, if one is present. When
89
+ * `isLoading` is `true`, the spinner renders on this side too.
91
90
  * @default "start"
92
91
  */
93
92
  iconPlacement?: "start" | "end";
@@ -137,9 +136,22 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
137
136
  * `truncate` to clamp a long one — give the slot a display of its own first, with
138
137
  * `[&>[data-slot=button-label]]:block`.
139
138
  *
140
- * | Data Attribute | Value | Description |
141
- * | -------------- | ---------------- | --------------------------------------------------------------------------------------------- |
142
- * | `data-slot` | `"button-label"` | On the `<span>` wrapping `children`. `display: contents`, so it changes no layout by itself. |
139
+ * **Disabled and loading.** A native `<button>` gets the `disabled` attribute.
140
+ * Under `asChild`, the child gets no `disabled` attribute, because it is inert
141
+ * on an `<a>`: the child gets `aria-disabled="true"`, leaves the tab order
142
+ * with `tabIndex={-1}`, and a click on it is cancelled before any handler runs.
143
+ * An explicit `disabled` wins over `isLoading`, so `disabled={false}` keeps a
144
+ * loading button enabled. `aria-disabled={false}` cannot re-enable the button.
145
+ *
146
+ * | Data Attribute | Value | Description |
147
+ * | ----------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
148
+ * | `data-slot` | `"button"` | On the button element, or on the `asChild` child. |
149
+ * | `data-slot` | `"button-label"` | On the `<span>` wrapping `children`. `display: contents`, so it changes no layout by itself. |
150
+ * | `data-appearance` | `"filled"` \| `"ghost"` \| `"link"` \| `"outlined"` | The `appearance` prop. |
151
+ * | `data-intent` | `"accent"` \| `"danger"` \| `"neutral"` | The `intent` prop. |
152
+ * | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | The `size` prop. Omitted when `appearance` is `"link"`, which has no box to size. |
153
+ * | `data-loading` | `"true"` \| `"false"` | The `isLoading` prop. |
154
+ * | `data-disabled` | `"true"` \| `"false"` | `true` when `disabled`, `isLoading`, or `aria-disabled="true"` is set. |
143
155
  *
144
156
  * @see https://mantle.ngrok.com/components/actions/button
145
157
  *
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./slot-C3gII_9c.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{n as i}from"./button-DGsTE3P2.js";import{t as a}from"./button-B52_vczK.js";import{Children as o,cloneElement as s,isValidElement as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CircleNotchIcon as d}from"@phosphor-icons/react/CircleNotch";const f=({"aria-disabled":f,appearance:p,asChild:m=!1,children:h,className:g,disabled:_,icon:v,intent:y,isLoading:b=!1,label:x,ref:S,size:C=`md`,type:w,...T})=>{let E=r(_??b)||r(f),D=b?u(d,{className:`animate-spin`}):v,O={"aria-disabled":E,"data-slot":`icon-button`,className:e(a({appearance:p,intent:y,isLoading:b,size:C}),g),"data-appearance":p,"data-disabled":E,"data-icon-button":!0,"data-intent":y,"data-loading":b,"data-size":C,ref:S,...T,"aria-label":x},k=u(t,{svg:D});return m?(l(c(h)&&o.only(h),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),u(n,{...O,children:s(h,E?i:{},k)})):u(`button`,{...O,disabled:E,type:w??`button`,children:k})};export{f as t};
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-DpNWVci8.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=f(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),h={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},g={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=({"aria-disabled":f,appearance:_,asChild:v,children:y,className:b,disabled:x,icon:S,iconPlacement:C=`start`,intent:w,isLoading:T=!1,ref:E,size:D=`md`,type:O,...k})=>{let A=r(f??x??T),j=T?u(p,{className:`animate-spin`}):S,M=j&&_!==`link`,N={"aria-disabled":A,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,m({appearance:_,intent:w,isLoading:T,size:D}),_!==`link`&&`font-sans`,M&&C===`start`&&h[D],M&&C===`end`&&g[D],b),"data-appearance":_,"data-disabled":A,"data-intent":w,"data-loading":T,"data-size":_===`link`?void 0:D,disabled:A,ref:E,...k};return v?(c(s(y)&&a.only(y),"When using `asChild`, Button must be passed a single child as a JSX tag."),u(n,{...N,children:o(y,{},d(l,{children:[j&&u(t,{svg:j,className:i(C===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:y.props.children})]}))})):d(`button`,{...N,type:O??`button`,children:[j&&u(t,{svg:j,className:i(C===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:y})]})};export{_ as t};
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./slot-C3gII_9c.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=f(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),h={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},g={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=({"aria-disabled":f,appearance:_,asChild:y,children:b,className:x,disabled:S,icon:C,iconPlacement:w=`start`,intent:T,isLoading:E=!1,ref:D,size:O=`md`,type:k,...A})=>{let j=r(S??E)||r(f),M=E?u(p,{className:`animate-spin`}):C,N=M&&_!==`link`,P={"aria-disabled":j,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,m({appearance:_,intent:T,isLoading:E,size:O}),_!==`link`&&`font-sans`,N&&w===`start`&&h[O],N&&w===`end`&&g[O],x),"data-appearance":_,"data-disabled":j,"data-intent":T,"data-loading":E,"data-size":_===`link`?void 0:O,ref:D,...A};return y?(c(s(b)&&a.only(b),"When using `asChild`, Button must be passed a single child as a JSX tag."),u(n,{...P,children:o(b,j?v:{},d(l,{children:[M&&u(t,{svg:M,className:i(w===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:b.props.children})]}))})):d(`button`,{...P,disabled:j,type:k??`button`,children:[M&&u(t,{svg:M,className:i(w===`end`&&`order-last`)}),u(`span`,{"data-slot":`button-label`,className:`contents`,children:b})]})},v={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{v as n,_ as t};
@@ -1,7 +1,7 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
2
  import { r as VariantProps } from "./index-DA4ig3gj.js";
3
- import "./button-DjsmeoJ2.js";
4
- import "./button-C39M5h4K.js";
3
+ import "./button-B5i9n7Qp.js";
4
+ import "./button-crUf0hbR.js";
5
5
  import { ComponentProps } from "react";
6
6
  //#region src/components/button/button-group.d.ts
7
7
  declare const buttonGroupVariants: (props?: ({
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DpNWVci8.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),a=({appearance:r,asChild:a,className:o,children:s,ref:c,...l})=>n(a?t:`div`,{"data-slot":`button-group`,className:e(i({appearance:r}),o),ref:c,...l,children:s});export{a as t};
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),a=({appearance:r,asChild:a,className:o,children:s,ref:c,...l})=>n(a?t:`div`,{"data-slot":`button-group`,className:e(i({appearance:r}),o),ref:c,...l,children:s});export{a as t};
@@ -88,8 +88,8 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
88
88
  */
89
89
  label: string;
90
90
  /**
91
- * An icon to render inside the button. If the `state` is `"pending"`, then
92
- * the icon will automatically be replaced with a spinner.
91
+ * An icon to render inside the button. When `isLoading` is `true`, a
92
+ * spinner replaces the icon.
93
93
  */
94
94
  icon: ReactNode;
95
95
  /**
@@ -129,6 +129,23 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
129
129
  * into their chrome — e.g. `ButtonGroup`'s panel appearance tightens it to
130
130
  * `0.125rem`.
131
131
  *
132
+ * **Disabled and loading.** A native `<button>` gets the `disabled` attribute.
133
+ * Under `asChild`, the child gets no `disabled` attribute, because it is inert
134
+ * on an `<a>`: the child gets `aria-disabled="true"`, leaves the tab order
135
+ * with `tabIndex={-1}`, and a click on it is cancelled before any handler runs.
136
+ * An explicit `disabled` wins over `isLoading`, so `disabled={false}` keeps a
137
+ * loading button enabled. `aria-disabled={false}` cannot re-enable the button.
138
+ *
139
+ * | Data Attribute | Value | Description |
140
+ * | ------------------ | -------------------------------------------- | ---------------------------------------------------------------------- |
141
+ * | `data-slot` | `"icon-button"` | On the button element, or on the `asChild` child. |
142
+ * | `data-icon-button` | `"true"` | Always present. Lets a wrapper style every icon button it contains. |
143
+ * | `data-appearance` | `"filled"` \| `"ghost"` \| `"outlined"` | The `appearance` prop. |
144
+ * | `data-intent` | `"neutral"` | The `intent` prop. |
145
+ * | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | The `size` prop. |
146
+ * | `data-loading` | `"true"` \| `"false"` | The `isLoading` prop. |
147
+ * | `data-disabled` | `"true"` \| `"false"` | `true` when `disabled`, `isLoading`, or `aria-disabled="true"` is set. |
148
+ *
132
149
  * @see https://mantle.ngrok.com/components/actions/icon-button
133
150
  *
134
151
  * @example
package/dist/button.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-DjsmeoJ2.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-C39M5h4K.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./button-CRCNRnk6.js";
1
+ import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-B5i9n7Qp.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-crUf0hbR.js";
3
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./button-DO53OA70.js";
4
4
  import { t as ButtonSize } from "./button-BCoI4bhP.js";
5
5
  export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonIntent, type IconButtonProps };
package/dist/button.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./button-Bc0lEOJ2.js";import{t}from"./button-CC10rP6X.js";import{t as n}from"./button-DmJkYfyl.js";export{e as Button,n as ButtonGroup,t as IconButton};
1
+ import{t as e}from"./button-DGsTE3P2.js";import{t}from"./button-CaM-ZAH5.js";import{t as n}from"./button-Wn-yt0c_.js";export{e as Button,n as ButtonGroup,t as IconButton};
@@ -1,12 +1,30 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { DateRange, DayPicker } from "react-day-picker";
3
3
  //#region src/components/calendar/calendar.d.ts
4
+ /**
5
+ * Props for `Calendar`: every `DayPicker` prop. `showOutsideDays` defaults to
6
+ * `false` here, and `className` lands on the calendar root alongside any
7
+ * `classNames.root` you pass.
8
+ */
4
9
  type CalendarProps = ComponentProps<typeof DayPicker>;
5
10
  /**
6
11
  * A calendar component that allows users to select a date or a range of dates.
12
+ * Renders a month grid with previous/next navigation; it has no text entry.
13
+ *
14
+ * **Server rendering.** If you omit `today`, `DayPicker` reads the clock during
15
+ * render, once on the server and again in the browser. If the two clocks or
16
+ * time zones disagree on the date, the `today` cell and its `Today, …` label
17
+ * land on different days. React then reports a hydration mismatch. If you also
18
+ * omit `month` and `defaultMonth`, the grid can open on a different month.
19
+ * Under SSR, pass `today` and `defaultMonth` (or `month`) from one
20
+ * request-scoped date. `timeZone` aligns the zone only, not the clock.
7
21
  *
8
- * @preview The API is not stable and may change.
9
- * There may also be bugs! Please file an issue if you find any! <3
22
+ * | Data Attribute | Value | Description |
23
+ * | --- | --- | --- |
24
+ * | `data-slot` | `"calendar"` | The calendar root. |
25
+ *
26
+ * @preview The API is not stable and may change. There may also be bugs.
27
+ * Please file an issue at https://github.com/ngrok/mantle/issues if you find any.
10
28
  *
11
29
  * @see https://mantle.ngrok.com/components/preview/calendar
12
30
  *
@@ -24,8 +42,6 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
24
42
  * onSelect={setDateRange}
25
43
  * />
26
44
  * ```
27
- *
28
- * https://github.com/ngrok/mantle/issues
29
45
  */
30
46
  declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react").JSX.Element;
31
47
  //#endregion
package/dist/calendar.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./button-DiDlvAOp.js";import{jsx as r}from"react/jsx-runtime";import{CaretRightIcon as i}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as a}from"@phosphor-icons/react/CaretLeft";import{DayPicker as o}from"react-day-picker";const s=n({appearance:`ghost`,intent:`neutral`,size:`sm`});function c({className:n,classNames:c,showOutsideDays:l=!1,...u}){return r(o,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>{let n=e.orientation===`left`?r(a,{}):r(i,{});return r(t,{svg:n,className:`size-4`})}},classNames:{root:e(`isolate`,n),button_next:e(s,`absolute right-0`),button_previous:e(s,`absolute left-0`),caption_label:`text-sm font-medium`,day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,u.mode===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`),day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`,...c},showOutsideDays:l,...u})}export{c as Calendar};
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-CGKaq_tV.js";import{t as n}from"./button-B52_vczK.js";import{useMemo as r}from"react";import{jsx as i}from"react/jsx-runtime";import{CaretRightIcon as a}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as o}from"@phosphor-icons/react/CaretLeft";import{DayPicker as s}from"react-day-picker";const c=n({appearance:`ghost`,intent:`neutral`,size:`sm`});function l({orientation:e}){return i(t,{svg:i(e===`left`?o:a,{}),className:`size-4`})}const u={Chevron:l},d={button_next:e(c,`absolute right-0`),button_previous:e(c,`absolute left-0`),caption_label:`text-sm font-medium`,day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`};function f({className:t,classNames:n,showOutsideDays:a=!1,...o}){let c=o.mode,l=r(()=>{let{root:r,...i}=n??{};return{...d,root:e(`isolate`,t,r),day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,c===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`),...i}},[t,n,c]);return i(s,{"data-slot":`calendar`,animate:!1,components:u,classNames:l,showOutsideDays:a,...o})}export{f as Calendar};
package/dist/card.d.ts CHANGED
@@ -5,7 +5,7 @@ import { ComponentProps } from "react";
5
5
  type CardProps = ComponentProps<"div"> & WithAsChild;
6
6
  /**
7
7
  * A container that displays content in a box resembling a physical card. The
8
- * outermost part every other `Card` part nests inside it.
8
+ * outermost part. Every other `Card` part nests inside it.
9
9
  *
10
10
  * @see https://mantle.ngrok.com/components/structure/card#cardroot
11
11
  *
@@ -104,7 +104,7 @@ declare const Footer: ({ asChild, className, children, ref, ...rest }: CardProps
104
104
  declare const Header: ({ asChild, className, children, ref, ...rest }: CardProps) => import("react").JSX.Element;
105
105
  type CardTitleProps = ComponentProps<"h3"> & WithAsChild;
106
106
  /**
107
- * The heading inside `Card.Header`. Renders an `h3` by default pass `asChild`
107
+ * The heading inside `Card.Header`. Renders an `h3` by default; pass `asChild`
108
108
  * to fit the surrounding document outline. Keep it a heading element
109
109
  * (`h1`-`h6`) for accessibility.
110
110
  *
@@ -164,7 +164,8 @@ declare const Title: ({ className, asChild, ref, ...props }: CardTitleProps) =>
164
164
  */
165
165
  declare const Card: {
166
166
  /**
167
- * A container that displays content in a box resembling a physical card.
167
+ * A container that displays content in a box resembling a physical card. The
168
+ * outermost part. Every other `Card` part nests inside it.
168
169
  *
169
170
  * @see https://mantle.ngrok.com/components/structure/card#cardroot
170
171
  *
@@ -179,7 +180,7 @@ declare const Card: {
179
180
  */
180
181
  readonly Root: typeof Root;
181
182
  /**
182
- * The main content of a card.
183
+ * The main content of a card. Usually composed as a direct child of a `Card` component.
183
184
  *
184
185
  * @see https://mantle.ngrok.com/components/structure/card#cardbody
185
186
  *
@@ -216,7 +217,8 @@ declare const Card: {
216
217
  */
217
218
  readonly Footer: typeof Footer;
218
219
  /**
219
- * The band above `Card.Body` that holds `Card.Title`.
220
+ * The band above `Card.Body` that holds `Card.Title`. Pass it as a direct child
221
+ * of `Card.Root`.
220
222
  *
221
223
  * @see https://mantle.ngrok.com/components/structure/card#cardheader
222
224
  *
@@ -237,7 +239,9 @@ declare const Card: {
237
239
  */
238
240
  readonly Header: typeof Header;
239
241
  /**
240
- * The heading inside `Card.Header`. Renders an `h3` by default.
242
+ * The heading inside `Card.Header`. Renders an `h3` by default; pass `asChild`
243
+ * to fit the surrounding document outline. Keep it a heading element
244
+ * (`h1`-`h6`) for accessibility.
241
245
  *
242
246
  * @see https://mantle.ngrok.com/components/structure/card#cardtitle
243
247
  *
package/dist/card.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DpNWVci8.js";import{jsx as n}from"react/jsx-runtime";const r={Root:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...s,children:a}),Body:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Footer:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Header:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Title:({className:r,asChild:i,ref:a,...o})=>n(i?t:`h3`,{ref:a,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,r),...o})};export{r as Card};
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-C3gII_9c.js";import{jsx as n}from"react/jsx-runtime";const r={Root:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...s,children:a}),Body:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Footer:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Header:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Title:({className:r,asChild:i,ref:a,...o})=>n(i?t:`h3`,{ref:a,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,r),...o})};export{r as Card};
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DpNWVci8.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout`),className:e(`flex min-h-full flex-col`,o),...c,children:a}),Notice:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-notice`),className:e(`w-full shrink-0`,o),...c,children:a}),Header:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`header`,{"data-slot":t(s,`centered-layout-header`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}),Body:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-body`),className:e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,o),...c,children:a}),Footer:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`footer`,{"data-slot":t(s,`centered-layout-footer`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a})};export{i as CenteredLayout};
1
+ import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-C3gII_9c.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout`),className:e(`flex min-h-full flex-col`,o),...c,children:a}),Notice:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-notice`),className:e(`w-full shrink-0`,o),...c,children:a}),Header:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`header`,{"data-slot":t(s,`centered-layout-header`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}),Body:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-body`),className:e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,o),...c,children:a}),Footer:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`footer`,{"data-slot":t(s,`centered-layout-footer`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a})};export{i as CenteredLayout};
@@ -0,0 +1,2 @@
1
+ import{n as e,t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./button-CaM-ZAH5.js";import{t as a}from"./use-copy-to-clipboard-CSyp4Zk0.js";import{t as o}from"./alternate-announcement-BkH4bOKp.js";import{t as s}from"./live-region-CV7kykeo.js";import{createContext as c,useContext as l,useEffect as u,useId as d,useLayoutEffect as f,useMemo as p,useRef as m,useState as h,useSyncExternalStore as g}from"react";import _ from"tiny-invariant";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{CheckIcon as x}from"@phosphor-icons/react/Check";import{CopyIcon as S}from"@phosphor-icons/react/Copy";import{scaleTime as C}from"d3-scale";import{area as w,curveLinear as T,curveMonotoneX as E,curveStep as D,line as O}from"d3-shape";const k=(e,t)=>Reflect.get(e,t),A=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},j=.5,ee=(e,t)=>e<0?e:t,te=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(ee(t,n))-o)*i;if(Math.abs(o-r(0))<j)return{baseline:o,value:s};let c=Math.min(a,Math.abs(o-s)/2);return{baseline:o-Math.sign(o-s)*c,value:s}},ne=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(ee(t,n));return Math.abs(a-i(r))<j},re=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`,`chart-other`],ie=e=>re.includes(e),M=e=>`--color-${e}`,ae=`var(--color-chart-decorative)`,N=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],P=e=>{let t=e.toLowerCase();return t.includes(`var(`)||t.includes(`currentcolor`)},F=(e,t)=>{let n=e.ownerDocument,r=n.createElement(`span`);r.style.display=`none`,r.style.color=t,e.appendChild(r);let i=n.defaultView?.getComputedStyle(r).color??``;return r.remove(),i},oe=(e,t)=>ie(t)?F(e,`var(${M(t)})`):P(t)?F(e,t):t,se=e=>({grid:F(e,`var(--border-color-card-muted)`),baseline:F(e,`var(--border-color-card)`),tickText:F(e,`var(--text-color-muted)`),reference:F(e,`var(--color-neutral-500)`),surface:F(e,`var(--background-color-card)`)}),ce=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,le=(e,t)=>{let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),()=>n.disconnect()},I=1.5,ue=1.1,L=1.6,de=e=>`oklch(from ${e} calc(l - 0.18) c h)`,R=(e,t,n)=>{let r=I;if(n===`up`){e.moveTo(-1.5,t+r),e.lineTo(t+r,-1.5),e.moveTo(-1.5,r),e.lineTo(r,-1.5),e.moveTo(t-r,t+r),e.lineTo(t+r,t-r);return}e.moveTo(-1.5,-1.5),e.lineTo(t+r,t+r),e.moveTo(t-r,-1.5),e.lineTo(t+r,r),e.moveTo(-1.5,t-r),e.lineTo(r,t+r)},z=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},B=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},fe={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=I,e.beginPath(),R(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=I,e.beginPath(),R(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),R(e,t,`up`),R(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?B(e,{size:t,width:2}):z(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?z(e,{size:t,width:2}):B(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,z(e,{size:t,width:ue}),B(e,{size:t,width:ue})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,L,0,Math.PI*2),e.moveTo(3*t/4+L,3*t/4),e.arc(3*t/4,3*t/4,L,0,Math.PI*2),e.fill()}},pe=(e,t)=>{let{texture:n,color:r,ink:i,devicePixelRatio:a,orientation:o}=t,s=e.canvas.ownerDocument.createElement(`canvas`);s.width=Math.max(1,Math.round(8*a)),s.height=s.width;let c=s.getContext(`2d`);if(c==null)return null;let l=s.width/8;c.scale(l,l),c.fillStyle=r,c.fillRect(0,0,8,8),fe[n](c,{size:8,ink:i,orientation:o});let u=e.createPattern(s,`repeat`);return u?.setTransform({a:1/l,b:0,c:0,d:1/l,e:0,f:0}),u},V=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},me=e=>{let{xs:t,values:n,startIndex:r,endIndex:i,positionK:a,positionB:o,columnCount:s}=e,c=new Uint8Array(s),l=new Float64Array(s),u=new Float64Array(s),d=new Float64Array(s),f=new Float64Array(s);for(let e=r;e<=i;e++){let r=n[e]??NaN;if(Number.isNaN(r))continue;let i=t[e]??NaN,p=Math.floor(i*a+o);if(p===s&&(p=s-1),!(p<0||p>=s)){if(c[p]===0){c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r;continue}r<(l[p]??1/0)&&(l[p]=r),r>(u[p]??-1/0)&&(u[p]=r),f[p]=r}}return{columnCount:s,hasData:c,minValue:l,maxValue:u,inValue:d,outValue:f}},he=new Intl.NumberFormat,ge=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),_e=new Map,H=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=_e.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),_e.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?ge.format(n):he.format(n)},ve=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e)))),ye=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),be=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),xe=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,U=(e,t)=>typeof e==`string`?e:typeof e==`number`?H(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??xe(e)?ye.format(e):be.format(e),Se=(e,t,n)=>{if(t<=0)return null;let r=0,i=t-1,a=e[0]??0,o=e[i]??0;if(n<=a)return 0;if(n>=o)return i;for(;i-r>1;){let t=r+i>>1;(e[t]??0)<=n?r=t:i=t}let s=n-(e[r]??0);return(e[i]??0)-n<s?i:r},Ce=Math.PI/2-.05,we=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),Te=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},Ee=e=>Math.min(Ce,Math.max(-Ce,e)),De=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},Oe=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],ke=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],Ae=Math.sqrt(50),je=Math.sqrt(10),Me=Math.sqrt(2),W=(e,t,n,r)=>{let i=(t-e)/Math.max(0,n),a=r?.integer?Math.max(1,i):i,o=Math.floor(Math.log10(a)),s=a/10**o,c=s>=Ae?10:s>=je?5:s>=Me?2:1,l,u,d;return o<0?(d=10**-o/c,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&(l+=1),u/d>t&&--u,d=-d):(d=10**o*c,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&(l+=1),u*d>t&&--u),u<l&&.5<=n&&n<2?W(e,t,n*2,r):[l,u,d]},Ne=(e,t,n,r)=>{if(!(n>0))return[];if(e===t)return r?.integer&&!Number.isInteger(e)?[]:[e];let i=t<e,[a,o,s]=i?W(t,e,n,r):W(e,t,n,r);if(!(o>=a))return[];let c=o-a+1,l=[];for(let e=0;e<c;e+=1){let t=i?o-e:a+e;l.push(s<0?t/-s:t*s)}return l},Pe=(e,t,n)=>W(e,t,n)[2],G=(e,t)=>{let n=e[1]-e[0];if(n===0)return{k:0,b:(t[0]+t[1])/2};let r=(t[1]-t[0])/n;return{k:r,b:t[0]-e[0]*r}},Fe=e=>{let{count:t,rangeStart:n,rangeEnd:r,paddingInner:i,paddingOuter:a}=e,o=r-n;if(t<=0||o<=0)return{count:Math.max(0,t),rangeStart:n,step:0,bandwidth:0,offset:0};let s=o/Math.max(1,t-i+a*2);return{count:t,rangeStart:n,step:s,bandwidth:s*(1-i),offset:s*a}},K=(e,t)=>e.rangeStart+e.offset+t*e.step,q=(e,t)=>K(e,t)+e.bandwidth/2,Ie=(e,t)=>({start:K(e,t)-(e.step-e.bandwidth)/2,size:e.step}),Le=(e,t)=>{if(e.count===0||e.step===0)return null;let n=Math.floor((t-e.rangeStart-e.offset+e.step/2-e.bandwidth/2)/e.step);return Math.min(e.count-1,Math.max(0,n))},Re=(e,t,n)=>Ne(e[0],e[1],t,n);let J=null,ze=null;const Be=e=>{if(ze!=null&&J!=null&&J[0]===e[0]&&J[1]===e[1])return ze;let t=C().domain([new Date(e[0]),new Date(e[1])]);return J=[e[0],e[1]],ze=t,t},Ve=(e,t)=>Be(e).ticks(t).map(e=>e.getTime()),He=e=>{let t=Be(e).tickFormat();return e=>t(new Date(e))},Y=(e,t)=>{if(e[0]>e[1])return Y([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return Y([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=Pe(n,r,t);if(e===i||e===0||!Number.isFinite(e))break;if(e>0)n=Math.floor(n/e)*e,r=Math.ceil(r/e)*e;else{let t=-e;n=Math.floor(n*t)/t,r=Math.ceil(r*t)/t}i=e}return[n,r]},Ue=(e,t)=>{let n=Y(e,t);return e[0]===0?[0,n[1]]:n},We=e=>e===`monotone`?E:e===`step`?D:T,X=e=>Math.round(e)+.5,Ge=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1;for(let t of i)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(X(t.position),n.top),e.lineTo(X(t.position),n.top+n.height),e.stroke();for(let t of a)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(n.left,X(t.position)),e.lineTo(n.left+n.width,X(t.position)),e.stroke();e.restore()},Ke=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,X(i)),e.lineTo(n.left+n.width,X(i)),e.stroke()},qe=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(X(i),n.top),e.lineTo(X(i),n.top+n.height),e.stroke()},Je=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.width),r=Math.min(t.valueY,t.baselineY),i=Math.abs(t.baselineY-t.valueY);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(t.x,r,n,i);continue}t.valueY<=t.baselineY?e.roundRect(t.x,r,n,i,[a,a,0,0]):e.roundRect(t.x,r,n,i,[0,0,a,a])}e.fill()},Ye=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.height),r=Math.min(t.valueX,t.baselineX),i=Math.abs(t.valueX-t.baselineX);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(r,t.y,i,n);continue}t.valueX>=t.baselineX?e.roundRect(r,t.y,i,n,[0,a,a,0]):e.roundRect(r,t.y,i,n,[a,0,0,a])}e.fill()},Xe=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t,c=O().x(a).y(o).defined(s).curve(We(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),c(i),e.stroke()},Ze=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t,l=w().x(a).y0(o).y1(s).defined(c).curve(We(r)).context(e);e.beginPath(),l(i),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore();let u=O().x(a).y(s).defined(c).curve(We(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),u(i),e.stroke()},Qe=(e,t)=>{let{color:n,columns:r,columnToX:i,valueK:a,valueB:o}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath();let s=!1;for(let t=0;t<r.columnCount;t++){if(r.hasData[t]===0){s=!1;continue}let n=i(t),c=(r.inValue[t]??0)*a+o,l=(r.minValue[t]??0)*a+o,u=(r.maxValue[t]??0)*a+o,d=(r.outValue[t]??0)*a+o;s?e.lineTo(n,c):(e.moveTo(n,c),s=!0),(l!==c||u!==c)&&(e.lineTo(n,l),e.lineTo(n,u)),d!==u&&e.lineTo(n,d)}e.stroke()},$e=(e,t)=>{let{color:n,lowerColumns:r,upperColumns:i,columnToX:a,valueK:o,valueB:s}=t;e.beginPath();let c=-1,l=t=>{if(c<0)return;let n=!1;for(let r=c;r<=t;r++){let t=a(r),c=(i.maxValue[r]??0)*o+s;n?e.lineTo(t,c):(e.moveTo(t,c),n=!0)}for(let n=t;n>=c;n--){let t=a(n),i=(r.minValue[n]??0)*o+s;e.lineTo(t,i)}e.closePath(),c=-1};for(let e=0;e<i.columnCount;e++){if(i.hasData[e]===0){l(e-1);continue}c<0&&(c=e)}l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),Qe(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},et=(e,t,n,r,i)=>{let a=!1;for(let[o,s]of i)a?e.lineTo(t+o*r,n+s*r):(e.moveTo(t+o*r,n+s*r),a=!0);e.closePath()},tt=[[-1/3,-1],[1/3,-1],[1/3,-1/3],[1,-1/3],[1,1/3],[1/3,1/3],[1/3,1],[-1/3,1],[-1/3,1/3],[-1,1/3],[-1,-1/3],[-1/3,-1/3]],nt=tt.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),rt=Array.from({length:10},(e,t)=>{let n=-Math.PI/2+t*Math.PI/5,r=t%2==0?1:.382;return[Math.cos(n)*r,Math.sin(n)*r]}),it={circle:(e,t,n,r)=>{e.arc(t,n,r,0,Math.PI*2)},square:(e,t,n,r)=>{let i=r*.886;e.moveTo(t-i,n-i),e.lineTo(t+i,n-i),e.lineTo(t+i,n+i),e.lineTo(t-i,n+i),e.closePath()},triangle:(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n-i),e.lineTo(t+i*.866,n+i*.5),e.lineTo(t-i*.866,n+i*.5),e.closePath()},diamond:(e,t,n,r)=>{let i=r*1.253;e.moveTo(t,n-i),e.lineTo(t+i,n),e.lineTo(t,n+i),e.lineTo(t-i,n),e.closePath()},"triangle-down":(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n+i),e.lineTo(t+i*.866,n-i*.5),e.lineTo(t-i*.866,n-i*.5),e.closePath()},plus:(e,t,n,r)=>{et(e,t,n,r*1.189,tt)},cross:(e,t,n,r)=>{et(e,t,n,r*1.189,nt)},star:(e,t,n,r)=>{et(e,t,n,r*1.673,rt)}},at=(e,t,n,r,i)=>{it[i](e,t,n,r)},ot=(e,t)=>{let{color:n,surface:r,shape:i,indexes:a,xAt:o,yAt:s,definedAt:c}=t;e.fillStyle=n,e.strokeStyle=r,e.lineWidth=2;for(let t of a)c(t)&&(e.beginPath(),at(e,o(t),s(t),4,i),e.fill(),e.stroke())},st=5e3,ct=2e4,lt=(e,t)=>{let{color:n,surface:r,shape:i,totalPointCount:a,indexes:o,xAt:s,yAt:c,radiusAt:l}=t;if(e.fillStyle=n,a>ct){e.beginPath();for(let t of o)l(t)<=0||e.rect(s(t)-1,c(t)-1,2,2);e.fill();return}let u=a<=st;e.strokeStyle=r,e.lineWidth=2;for(let t of o){let n=l(t);n<=0||(e.beginPath(),at(e,s(t),c(t),n,i),e.fill(),u&&e.stroke())}},ut=(e,t)=>{let{count:n,order:r,screenX:i,screenY:a,radius:o,colorAt:s,shapeAt:c,alphaAt:l,surface:u}=t;if(e.save(),n>ct){let t=``,n=-1;for(let c of r){let r=s(c);r!==t&&(e.fillStyle=r,t=r);let u=l(c);u!==n&&(e.globalAlpha=u,n=u);let d=Math.max(1,(o[c]??0)/2);e.fillRect((i[c]??0)-d/2,(a[c]??0)-d/2,d,d)}e.restore();return}let d=n<=st;e.strokeStyle=u,e.lineWidth=2;let f=``,p=-1;for(let t of r){let n=s(t);n!==f&&(e.fillStyle=n,f=n);let r=l(t);r!==p&&(e.globalAlpha=r,p=r),e.beginPath(),at(e,i[t]??0,a[t]??0,o[t]??0,c(t)),e.fill(),d&&e.stroke()}e.restore()},dt=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},ft=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},pt=(e,t)=>{let{plot:n,color:r,textColor:i,y:a,label:o,fontFamily:s}=t;e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(n.left,X(a)),e.lineTo(n.left+n.width,X(a)),e.stroke(),e.setLineDash([]),o!=null&&o.length>0&&(e.font=`11px ${s}`,e.fillStyle=i,e.textAlign=`right`,e.textBaseline=`bottom`,e.fillText(o,n.left+n.width-4,a-3))},mt=(e,t)=>{let{plot:n,color:r,textColor:i,x:a,label:o,fontFamily:s}=t;if(e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(X(a),n.top),e.lineTo(X(a),n.top+n.height),e.stroke(),e.setLineDash([]),o!=null&&o.length>0){e.font=`11px ${s}`,e.fillStyle=i;let t=e.measureText(o).width,r=a+4+t<=n.left+n.width;e.textAlign=r?`left`:`right`,e.textBaseline=`top`,e.fillText(o,r?a+4:a-4,n.top+3)}},ht=(e,t)=>{let{plot:n,color:r,fontFamily:i,xLabels:a,yLabels:o}=t;e.save(),e.font=`11px ${i}`,e.fillStyle=r,e.textAlign=`right`,e.textBaseline=`middle`;for(let t of o)e.globalAlpha=t.alpha,e.fillText(t.text,n.left-8,t.position);e.textAlign=`center`,e.textBaseline=`top`;for(let t of a)e.globalAlpha=t.alpha,e.fillText(t.text,t.position,n.top+n.height+8);e.restore()},gt=e=>{let t=e.length,n=e[0]?.length??0,r=[],i=[];for(let e=0;e<t;e++)r.push(new Float64Array(n)),i.push(new Float64Array(n));let a=0,o=0,s=new Float64Array(n),c=new Float64Array(n),l=new Int32Array(n).fill(-1),u=new Int32Array(n).fill(-1);for(let d=0;d<t;d++){let t=e[d],f=r[d],p=i[d];if(t!=null&&f!=null&&p!=null)for(let e=0;e<n;e++){let n=t[e]??NaN;if(Number.isNaN(n)){f[e]=NaN,p[e]=NaN;continue}if(n>=0){let t=s[e]??0,r=t+n;s[e]=r,f[e]=t,p[e]=r,r>o&&(o=r),n>0&&(l[e]=d)}else{let t=c[e]??0,r=t+n;c[e]=r,f[e]=r,p[e]=t,r<a&&(a=r),u[e]=d}}}return{lower:r,upper:i,min:a,max:o,positiveEnd:l,negativeEnd:u}},_t=e=>1-(1-e)**3;var vt=class{#e=new Float64Array;#t=new Float64Array;#n=new Float64Array;#r=0;#i=0;#a=!1;get active(){return this.#a}values(){return this.#n}retarget(e,t){let{duration:n,now:r}=t,i=e.length,a=this.#n.length!==i;if(a&&(this.#e=new Float64Array(i),this.#t=new Float64Array(i),this.#n=new Float64Array(i)),a||n<=0){for(let t=0;t<i;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n,this.#n[t]=n}this.#a=!1;return}let o=!1;for(let t=0;t<i;t++){let n=e[t]??NaN,r=this.#n[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n))){o=!0;break}}if(!o){for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1;return}for(let t=0;t<i;t++)this.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}snap(){this.#n.set(this.#t),this.#a=!1}tick(e){if(!this.#a)return!1;let t=Math.min(1,(e-this.#r)/this.#i),n=_t(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(r)){this.#n[e]=r;continue}this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},yt=class{#e=new Float64Array;#t=new Float64Array;#n=0;#r=!1;#i;#a;#o=0;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#t.length!==e.length&&(this.#e=new Float64Array(e.length),this.#t=new Float64Array(e.length));for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n}this.#r=!1}aim(e,t){if(this.#t.length!==e.length){this.jump(e);return}let n=!1;for(let t=0;t<e.length;t++){let r=e[t]??NaN,i=this.#e[t]??NaN;if(i!==r&&!(Number.isNaN(i)&&Number.isNaN(r))){n=!0;break}}if(!n)return;let r=0;for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n;let i=Math.abs(n-(this.#t[t]??NaN));Number.isFinite(i)&&i>r&&(r=i)}this.#o=r,this.#r||(this.#r=!0,this.#n=t)}tick(e){if(!this.#r)return!1;let t=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let n=1-(1-this.#i)**(t/16.67),r=Math.max(this.#o*this.#a,2**-52),i=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,a=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(a)){this.#t[e]=t;continue}let o=a+(t-a)*n;n>0&&o===a||Math.abs(t-o)<=r?this.#t[e]=t:(this.#t[e]=o,i=!1)}return this.#r=!i,this.#r}};const bt=e=>`${e.colorInput}|${e.texture}`,xt={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},St=1e3;var Ct=class{#e;#t;#n;#r={xKey:``,xScale:`linear`,yDomain:[`auto`,`auto`],orientation:`vertical`,zKey:null,dimensions:3,stacked:!1,animate:!0};#i={onDatumActivate:null,onActiveIndexChange:null};#a;#o=null;#s=null;#c=null;#l=null;#u=0;#d=0;#f=1;#p=[];#m=0;#h=new Float64Array;#g=[];#_=null;#v=null;#y=!1;#b=!1;#x=new Map;#S=0;#C=0;#w=!0;#T=!0;#E=null;#D=new yt({speed:.16});#O=new yt({speed:.2});#k=new Map;#A=new Map;#j=null;#M=!1;#N=new Map;#P=new Map;#F=0;#I=!1;#L=new Map;#R={alpha:0,target:0};#z=0;#B=null;#V=null;#H=null;#U={left:0,top:0,width:0,height:0};#W=null;#G=new Float64Array;#K=[0,1];#q={yaw:.65,pitch:-.35};#J=new yt({speed:.12});#Y=new yt({speed:.16});#X=null;#Z=!1;#Q=null;#$=new Int32Array;#ee=new Map;#te=``;#ne=null;#re=null;#ie=null;#ae=void 0;#oe=null;#se=!1;#ce=null;#le=null;#ue={width:0,height:0};#de=!1;#fe=!1;#pe=0;#me=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#n=e.store,this.#a=e.elements.canvas.getContext(`2d`),this.#n.onSeriesChange=()=>{this.#b=!0,this.#De()},this.#n.onPresentationChange=()=>{this.#De()},typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(e=>{let t=e[0];t!=null&&(this.#u=t.contentRect.width,this.#d=t.contentRect.height,this.#f=this.#je(),this.#L.clear(),this.#ne=null,this.#De())}),this.#o.observe(e.elements.plot),this.#c=new ResizeObserver(()=>{this.#ue={width:this.#t.tooltip.offsetWidth,height:this.#t.tooltip.offsetHeight},this.#Oe()}),this.#c.observe(e.elements.tooltip));let t=e.elements.root.ownerDocument.documentElement;this.#s=le(t,()=>{this.#H=null,this.#De()}),this.#he(),this.#Y.jump([1,1])}destroy(){this.#me=!0,this.#o?.disconnect(),this.#c?.disconnect(),this.#s?.(),this.#l?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#B!=null&&(clearTimeout(this.#B),this.#B=null),this.#pe!==0&&cancelAnimationFrame(this.#pe)}#he(){if(typeof matchMedia>`u`||this.#me)return;this.#l?.();let e=matchMedia(`(resolution: ${this.#je()}dppx)`),t=()=>{this.#f=this.#je(),this.#L.clear(),this.#De(),this.#he()};e.addEventListener(`change`,t,{once:!0}),this.#l=()=>e.removeEventListener(`change`,t)}setOptions(e){let t=this.#r;if(this.#r=e,t.xScale!==e.xScale&&this.#N.clear(),t.animate&&!e.animate&&this.#ge(),t.dimensions!==e.dimensions){let t=[+(e.dimensions>=2),+(e.dimensions>=3)],n=wt(e.dimensions);if(this.#ye()===0||!this.#M)this.#Y.jump(t),this.#q=n,this.#J.jump([n.yaw,n.pitch]);else{let e=n.yaw+Math.round((this.#q.yaw-n.yaw)/(Math.PI*2))*Math.PI*2;this.#Y.aim(t,performance.now()),this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#J.aim([e,n.pitch],performance.now())}}(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked)&&(this.#b=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#ne=null,this.#M&&(this.#ye()===0?this.#D.jump(this.#xe()):this.#D.aim(this.#xe(),performance.now()))),this.#De()}setCallbacks(e){this.#i=e}setRows(e){e!==this.#p&&(this.#p=e,this.#b=!0,this.#De())}flushIngest(){!this.#b||this.#me||(this.#b=!1,this.#_e())}setControlledActiveIndex(e){let t=this.#oe;this.#oe=null;let n=this.#ae!==void 0;if(this.#ae=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#at(e==null?null:this.#tt(e),{viaKeyboard:n,notify:!1})}else n&&this.#at(null,{viaKeyboard:!1,notify:!1});this.#Oe()}handlePointerMove(e,t){if(this.#X!=null){let n=e-this.#X.lastX,r=t-this.#X.lastY;(this.#X.moved||Math.abs(n)+Math.abs(r)>3)&&(this.#X.moved=!0,this.#q={yaw:this.#q.yaw+n*.008,pitch:Ee(this.#q.pitch+r*.008)},this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#X.lastX=e,this.#X.lastY=t,this.#at(null,{viaKeyboard:!1,notify:!1}),this.#De());return}if(this.#ce=e,this.#le=t,this.#e===`scatter`){let n=this.#ft(e,t);this.#re=n?.seriesKey??null,this.#ne=n==null?null:{x:n.screenX,y:n.screenY},this.#at(n?.index??null,{viaKeyboard:!1,notify:!0});return}let n=this.#rt(e,t);this.#at(n,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){if(this.#Z=!0,this.#Ce()){this.#X={lastX:e,lastY:t,moved:!1};return}this.handlePointerMove(e,t)}handlePointerUp(e,t){let n=this.#X;this.#X=null;let r=this.#Z;if(this.#Z=!1,n!=null){if(n.moved)return;this.handlePointerMove(e,t)}r&&this.handleActivate(e,t)}handlePointerLeave(){this.#ce=null,this.#le=null,this.#X=null,this.#Z=!1,this.#re=null,this.#ne=null,this.#at(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#$e();if(n==null)return;let r=this.#et(n),i=this.#p[r];if(i==null)return;let a=this.#e===`scatter`?this.#re:e==null||t==null?null:this.#it(n,e,t);this.#i.onDatumActivate?.({index:r,xValue:this.#nt(n),datum:i,dataKey:a})}handleKeyDown(e){if(this.#m===0)return!1;let t=this.#m-1,n=this.#$e(),r=this.#I?Math.max(1,Math.floor(this.#m/Math.max(1,this.#U.width*this.#f))):1,i=Math.max(1,Math.floor(this.#m/10)),a=(()=>{switch(e){case`ArrowLeft`:return Math.max(0,(n??this.#m)-r);case`ArrowRight`:return Math.min(t,(n??-1)+r);case`PageUp`:return Math.min(t,(n??0)+i);case`PageDown`:return Math.max(0,(n??t)-i);case`Home`:return 0;case`End`:return t;case`Escape`:return null;default:return}})();return a===void 0?e===`Enter`||e===` `?(this.handleActivate(null,null),!0):!1:(this.#ce=null,this.#le=null,this.#re=null,this.#ne=null,this.#at(a,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#H=null,this.#De()}#ge(){this.#D.jump(this.#xe()),this.#O.jump(this.#Se()),this.#Y.jump([+(this.#r.dimensions>=2),+(this.#r.dimensions>=3)]);let e=wt(this.#r.dimensions);this.#q=e,this.#J.jump([e.yaw,e.pitch]);for(let e of this.#k.values())e.snap();for(let e of this.#A.values())e.snap();this.#R.alpha=this.#R.target,this.#De()}#_e(){let e=this.#p,{xKey:t,xScale:n}=this.#r,r=this.#n.seriesSpecs();this.#L.clear();let i=this.#h;if(n===`band`||n===`point`){let n=e.length,r=new Float64Array(n),i=Array.from({length:n},()=>``),a=!1;for(let o=0;o<n;o++){let n=e[o],s=n==null?void 0:k(n,t);s!==void 0&&(a=!0),i[o]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),r[o]=o}_(n===0||a,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#_=null,this.#v=null,this.#m=n,this.#h=r,this.#g=i,this.#T=!0}else{let r=[],i=!1,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e[s],l=c==null?void 0:k(c,t);l!==void 0&&(i=!0),l!=null&&(a=!0);let u=kt(l,n===`time`);Number.isFinite(u)&&(r.push({source:s,x:u}),o=!0)}_(e.length===0||i,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),_(!a||o,`${this.#Te()} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale — check the xScale and the data types.`);let s=!0;for(let e=1;e<r.length;e++)if((r[e]?.x??0)<(r[e-1]?.x??0)){s=!1;break}let c=s?r:r.toSorted((e,t)=>e.x-t.x),l=c.length,u=new Float64Array(l),d=l===e.length,f=!0,p=new Int32Array(l);for(let e=0;e<l;e++){let t=c[e];t!=null&&(u[e]=t.x,Number.isInteger(t.x)||(f=!1),p[e]=t.source,t.source!==e&&(d=!1))}if(d)this.#_=null,this.#v=null;else{this.#_=p;let t=new Int32Array(e.length).fill(-1);for(let e=0;e<l;e++){let n=p[e];n!=null&&(t[n]=e)}this.#v=t}this.#m=l,this.#h=u,this.#g=[],this.#T=f}let a=!1;for(let e of this.#g)if(e instanceof Date&&xe(e)){a=!0;break}this.#y=a;let o=this.#h[0],s=this.#h[this.#m-1],c=i[0],l=i[i.length-1];!this.#Ce()&&(n===`linear`||n===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&s>=l?(this.#R.target=1,this.#z=performance.now()):(o!==c||s!==l)&&(this.#R.target=0);let u=this.#m,d=i.length===u&&u<=2500;if(d){for(let e=0;e<u;e++)if(i[e]!==this.#h[e]){d=!1;break}}let f=this.#x;this.#x=new Map;let p=1/0,m=-1/0,h=!0;for(let t of r){let n=new Float64Array(u),r=!1;for(let i=0;i<u;i++){let a=e[this.#_==null?i:this.#_[i]??i],o=a==null?void 0:k(a,t.dataKey);if(o===void 0){n[i]=NaN;continue}r=!0;let s=typeof o==`number`&&Number.isFinite(o)?o:NaN;n[i]=s,Number.isNaN(s)||(s<p&&(p=s),s>m&&(m=s),Number.isInteger(s)||(h=!1))}_(u===0||r,`${xt[t.mark]} dataKey "${t.dataKey}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#x.set(t.dataKey,n)}this.#S=p===1/0?0:p,this.#C=m===-1/0?0:m,this.#w=h;let g=this.#r.zKey;if(this.#e===`scatter`&&g!=null){let t=new Float64Array(u),n=1/0,r=-1/0,i=!1;for(let a=0;a<u;a++){let o=e[this.#_==null?a:this.#_[a]??a],s=o==null?void 0:k(o,g);s!==void 0&&(i=!0);let c=typeof s==`number`&&Number.isFinite(s)?s:NaN;t[a]=c,Number.isNaN(c)||(c<n&&(n=c),c>r&&(r=c))}_(u===0||i,`ScatterPlot.Root zKey "${g}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#G=t,this.#K=n===1/0?[0,1]:Y([n,r],5)}else this.#G=new Float64Array;this.#Q=null,this.#ne=null,this.#E=this.#r.stacked?gt(r.map(e=>this.#x.get(e.dataKey)??new Float64Array)):null,this.#I=V({pointCount:u,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I});let v=this.#H;if(v!=null){for(let e of this.#n.seriesMeta())if(v.inputs.get(e.dataKey)!==bt(e)){this.#H=null;break}}this.#ve(r,f,d);let y=this.#$e();y!=null&&this.#at(Math.min(y,Math.max(0,u-1)),{viaKeyboard:this.#se,notify:!1}),this.#lt({force:!0})}#ve(e,t,n){let r=performance.now(),i=this.#ye(),a=!this.#M;this.#M=this.#M||this.#m>0,a||i===0?(this.#D.jump(this.#xe()),this.#O.jump(this.#Se())):(this.#D.aim(this.#xe(),r),this.#O.aim(this.#Se(),r));let o=this.#m>0&&this.#m<=2500&&n,s=new Set,c=new Set,l=(e,t,n)=>{s.add(e);let a=this.#k.get(e);a??(a=new vt,this.#k.set(e,a));let c=o&&n&&a.values().length===t.length;a.retarget(t,{duration:c?i:0,now:r})};e.forEach((e,n)=>{c.add(e.dataKey);let a=t.has(e.dataKey);if(this.#E==null?l(e.dataKey,this.#x.get(e.dataKey)??new Float64Array,a):(l(`${e.dataKey}:lower`,this.#E.lower[n]??new Float64Array,a),l(`${e.dataKey}:upper`,this.#E.upper[n]??new Float64Array,a)),!this.#A.has(e.dataKey)&&this.#m>0){let t=new vt;t.retarget([0],{duration:0,now:r}),t.retarget([1],{duration:i,now:r}),this.#A.set(e.dataKey,t)}});for(let e of this.#k.keys())s.has(e)||this.#k.delete(e);for(let e of this.#A.keys())c.has(e)||this.#A.delete(e)}#ye(){return!this.#r.animate||this.#be()?0:280}#be(){return typeof matchMedia>`u`?!1:(this.#j??=matchMedia(`(prefers-reduced-motion: reduce)`),this.#j.matches)}#xe(){let[e,t]=this.#r.yDomain,n,r;if(this.#E==null?this.#e===`line`||this.#e===`scatter`?(n=this.#S,r=this.#C):(n=Math.min(0,this.#S),r=Math.max(0,this.#C)):(n=Math.min(0,this.#E.min),r=Math.max(0,this.#E.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#m===0)return[0,1];let i=this.#e===`bar`||this.#e===`area`?Ue([n,r],5):Y([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Se(){if(this.#m===0)return[0,1];let e=this.#h[0]??0,t=this.#h[this.#m-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?Y([e,t],5):[e,t]}#Ce(){return this.#e===`scatter`&&this.#r.zKey!=null}#we(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#Te(){return`${xt[this.#e].split(`.`)[0]??`Chart`}.Root`}#Ee(e,t){let n=this.#V;n??(n=this.#t.canvas.ownerDocument.createElement(`canvas`),this.#V=n),(n.width!==e||n.height!==t)&&(n.width=e,n.height=t);let r=n.getContext(`2d`);return r==null?null:{canvas:n,ctx:r}}#De(){this.#fe=!0,this.#ke()}#Oe(){this.#ke()}#ke(){this.#de||this.#me||(this.#de=!0,this.#pe=requestAnimationFrame(()=>{this.#de=!1,this.#pe=0,this.#Ae()}))}#Ae(){if(!this.#me){if(this.flushIngest(),this.#fe){this.#fe=!1;let e=performance.now(),t=!1;t=this.#D.tick(e)||t,t=this.#O.tick(e)||t;for(let n of this.#k.values())t=n.tick(e)||t;for(let n of this.#A.values())t=n.tick(e)||t;if(t=this.#Y.tick(e)||t,this.#J.tick(e)){t=!0;let e=this.#J.values();this.#q={yaw:e[0]??this.#q.yaw,pitch:e[1]??this.#q.pitch}}this.#Me(),this.#Pe(),t=this.#Ve(e)||t,t&&this.#De()}this.#mt()}}#je(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#Me(){let e=this.#t.root,t=`${ce(e.ownerDocument.documentElement)}|${this.#f}|${this.#r.orientation}`;if(this.#H?.signature===t)return;let n=e.ownerDocument.defaultView;if(n==null)return;let r=this.#a,i=new Map,a=new Map,o=new Map;for(let t of this.#n.seriesMeta()){let n=oe(e,t.colorInput);if(i.set(t.dataKey,n),a.set(t.dataKey,bt(t)),r!=null&&t.mark===`bar`&&t.texture!==`solid`){let i=pe(r,{texture:t.texture,color:n,ink:F(e,de(n)),devicePixelRatio:this.#f,orientation:this.#r.orientation});i!=null&&o.set(t.dataKey,i)}}this.#H={signature:t,series:i,inputs:a,barTextures:o,chrome:se(e),fontFamily:n.getComputedStyle(e).fontFamily||`sans-serif`}}#Ne(e){let t=this.#H?.signature??``;t!==this.#te&&(this.#ee.clear(),this.#te=t);let n=this.#ee.get(e);if(n!=null)return n;let r=oe(this.#t.root,e);return this.#ee.set(e,r),r}#Pe(){let e=this.#n.getSnapshot(),t=this.#Ce(),n=this.#we(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=(n?i:r)?24:8,s=Math.max(0,this.#d-8-o);this.#U={left:8,top:8,width:Math.max(0,this.#u-16),height:s};let c=8;if(a){c=40;let e=this.#a;if(e!=null&&this.#H!=null){e.font=`11px ${this.#H.fontFamily}`;let t=0,r=n?this.#Be().map(e=>e.text):this.#ze().map(e=>e.text);for(let n of r){let r=e.measureText(n).width;r>t&&(t=r)}c=Math.ceil(t)+14}}this.#U={left:c,top:8,width:Math.max(0,this.#u-c-8),height:s};let l=n?this.#U.top:this.#U.left,u=n?this.#U.top+this.#U.height:this.#U.left+this.#U.width;this.#W=this.#r.xScale===`band`?Fe({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:.2,paddingOuter:.1}):this.#r.xScale===`point`?Fe({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:1,paddingOuter:.5}):null,this.#I=V({pointCount:this.#m,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I})}#Fe(){let e=this.#D.values();return G([e[0]??0,e[1]??1],[this.#U.top+this.#U.height,this.#U.top])}#Ie(){let e=this.#D.values(),t=this.#we()?[this.#U.left,this.#U.left+this.#U.width]:[this.#U.top+this.#U.height,this.#U.top];return G([e[0]??0,e[1]??1],t)}#Le(){let e=this.#O.values();return G([e[0]??0,e[1]??1],[this.#U.left,this.#U.left+this.#U.width])}#Re(e){let t=this.#W;if(t!=null)return q(t,e);let{k:n,b:r}=this.#Le();return(this.#h[e]??0)*n+r}#ze(){let e=this.#n.getSnapshot(),t=this.#D.values(),n=Re([t[0]??0,t[1]??1],e.yAxis?.tickCount??5,{integer:this.#w}),r=e.yAxis?.tickFormat,i=n.length>1?ve(Math.abs((n[1]??0)-(n[0]??0))):void 0;return n.map(e=>({value:e,text:r==null?H(e,i==null?void 0:{maximumFractionDigits:i}):r(e)}))}#Be(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#W!=null){let e=this.#we(),n=e?this.#U.height:this.#U.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#m/r)),a=[];for(let e=0;e<this.#m;e+=i){let n=this.#g[e]??``;a.push({index:e,value:e,text:t==null?U(n,{datasetHasTimeOfDay:this.#y}):t(n)})}return a}let n=this.#O.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#U.width/90));if(this.#r.xScale===`time`){let e=He(r);return Ve(r,i).map(n=>({index:null,value:n,text:t==null?e(n):t(new Date(n))}))}let a=Re(r,i,{integer:this.#T}),o=a.length>1?ve(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>({index:null,value:e,text:t==null?H(e,o==null?void 0:{maximumFractionDigits:o}):t(e)}))}#Ve(e){let t=this.#a,n=this.#H;if(t==null||n==null||this.#u<=0||this.#d<=0)return!1;let r=Math.min(50,Math.max(0,e-this.#F));this.#F=e;let i=this.#t.canvas,a=Math.round(this.#u*this.#f),o=Math.round(this.#d*this.#f);(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),t.setTransform(this.#f,0,0,this.#f,0,0),t.clearRect(0,0,this.#u,this.#d);let s=this.#n.getSnapshot(),c=this.#U;if(c.width<=0||c.height<=0)return!1;let l=this.#Fe(),u=this.#Le(),d=this.#n.seriesSpecs(),f=this.#Ce(),p=this.#ye()===0,m=f?[]:this.#He(t,n.fontFamily),h=f?[]:this.#Ue(t,n.fontFamily),g=Tt(this.#N,m,r,p);g=Tt(this.#P,h,r,p)||g;let _=this.#R;if(_.target===1){if(e-this.#z>St)_.target=0;else if(this.#B==null){let t=St-(e-this.#z)+17;this.#B=setTimeout(()=>{this.#B=null,this.#De()},t)}}if(p)_.alpha=_.target;else{let e=1-(1-(_.target>_.alpha?.16:.08))**(r/16.67);_.alpha+=(_.target-_.alpha)*e,Math.abs(_.target-_.alpha)<.02&&(_.alpha=_.target)}_.alpha!==_.target&&(g=!0);let v=this.#we(),y=v?this.#Ie():l,b=e=>this.#W==null?e*u.k+u.b:q(this.#W,e),x=e=>e*y.k+y.b,S=[...this.#N.entries()].map(([e,t])=>({position:b(e),alpha:t.alpha})),C=[...this.#P.entries()].map(([e,t])=>({position:x(e),alpha:t.alpha}));if(s.grid!=null&&!f){let e=s.grid.lines??(v?`vertical`:`horizontal`),r=v?S:C,i=v?C:S;Ge(t,{plot:c,color:n.chrome.grid,xLines:e===`horizontal`?[]:i,yLines:e===`vertical`?[]:r})}let w=Math.min(40,c.width*.25),T=t,E=null;_.alpha>.01&&w>1&&(E=this.#Ee(a,o),E!=null&&(E.ctx.setTransform(this.#f,0,0,this.#f,0,0),E.ctx.clearRect(0,0,this.#u,this.#d),T=E.ctx)),T.save(),T.beginPath(),T.rect(c.left,c.top,c.width,c.height+1),T.clip();let D=null;if(this.#e===`bar`?v?this.#Ye(T,d):this.#Je(T,d,l):this.#e===`scatter`?D=this.#ut(T,d,l):this.#Xe(T,d,l),T.restore(),E!=null){T.save(),T.globalCompositeOperation=`destination-out`;let e=T.createLinearGradient(c.left,0,c.left+w,0);e.addColorStop(0,`rgba(0, 0, 0, ${_.alpha})`),e.addColorStop(1,`rgba(0, 0, 0, 0)`),T.fillStyle=e,T.fillRect(c.left,c.top,w,c.height+1),T.restore(),t.drawImage(E.canvas,0,0,this.#u,this.#d)}D!=null&&ft(t,{textColor:n.chrome.tickText,fontFamily:n.fontFamily,plot:c,center:D.center,axes:D.axes}),this.#e===`bar`&&this.#m>0&&(v?qe(t,{plot:c,color:n.chrome.baseline,x:x(0)}):Ke(t,{plot:c,color:n.chrome.baseline,y:x(0)}));for(let e of f?[]:s.referenceLines){let r=x(e.y);if(v?r<c.left||r>c.left+c.width:r<c.top||r>c.top+c.height)continue;let i=e.color==null?n.chrome.reference:this.#Ne(e.color);v?mt(t,{plot:c,color:i,textColor:n.chrome.tickText,x:r,label:e.label,fontFamily:n.fontFamily}):pt(t,{plot:c,color:i,textColor:n.chrome.tickText,y:r,label:e.label,fontFamily:n.fontFamily})}let O=s.xAxis==null||f?[]:[...this.#N.entries()].map(([e,t])=>({position:b(e),text:t.text,alpha:t.alpha})),k=s.yAxis==null||f?[]:[...this.#P.entries()].map(([e,t])=>({position:x(e),text:t.text,alpha:t.alpha})),A=v?k:O,j=v?O:k;return(A.length>0||j.length>0)&&ht(t,{plot:c,color:n.chrome.tickText,fontFamily:n.fontFamily,xLabels:A,yLabels:j}),g}#He(e,t){e.font=`11px ${t}`;let n=this.#we(),r=this.#Le(),i=[],a=-1/0;for(let t of this.#Be()){let o=t.index!=null&&this.#W!=null,s=o&&this.#W!=null?q(this.#W,t.index??0):t.value*r.k+r.b,c=n?15/2:e.measureText(t.text).width/2,l=n?2:8;s-c<a+l||(a=s+c,i.push({key:o?t.index??0:t.value,text:t.text}))}return i}#Ue(e,t){let n=this.#ze();if(!this.#we())return n.map(e=>({key:e.value,text:e.text}));e.font=`11px ${t}`;let r=this.#Ie(),i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=e.measureText(t.text).width/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#We(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#I&&this.#m<=2500){let e=this.#k.get(r);if(e!=null&&e.values().length===this.#m)return e.values()}return t===`value`?this.#x.get(e.dataKey)??new Float64Array:(t===`lower`?this.#E?.lower:this.#E?.upper)?.[n]??new Float64Array}#Ge(e){return this.#A.get(e)?.values()[0]??1}#Ke(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#qe(e,t,n){let r=this.#E;if(r==null)return!0;let i=r.lower[e]?.[t]??NaN,a=r.upper[e]?.[t]??NaN;if(Number.isNaN(i)||Number.isNaN(a))return!1;let o=i<0,s=(o?r.negativeEnd:r.positiveEnd)[t]??-1;if(s<0)return!1;let c=(o?r.lower:r.upper)[s]?.[t]??NaN;return ne({lower:i,upper:a,pileOuter:c,toPixel:n})}#Je(e,t,n){let r=this.#W,i=this.#H;if(r==null||i==null||this.#m===0||t.length===0)return;let a=this.#E!=null,o=a?1:t.length,s=r.bandwidth>=8*o?2:+(r.bandwidth>=3*o),c=(r.bandwidth-s*(o-1))/o,l=A({step:r.step,slot:c}),u=e=>e*n.k+n.b;t.forEach((t,n)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,n):null,m=a?this.#We(t,`upper`,n):this.#We(t,`value`,n);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let i=this.#Ke(p,e),h=a?K(r,e)+(r.bandwidth-l)/2:K(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,g=te({lower:i,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({x:h,width:l,baselineY:g.baseline,valueY:g.value,rounded:this.#qe(n,e,u)})}Je(e,{fill:i.barTextures.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:f})})}#Ye(e,t){let n=this.#W,r=this.#H;if(n==null||r==null||this.#m===0||t.length===0)return;let i=this.#Ie(),a=this.#E!=null,o=a?1:t.length,s=n.bandwidth>=8*o?2:+(n.bandwidth>=3*o),c=(n.bandwidth-s*(o-1))/o,l=A({step:n.step,slot:c}),u=e=>e*i.k+i.b;t.forEach((t,i)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,i):null,m=a?this.#We(t,`upper`,i):this.#We(t,`value`,i);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let r=this.#Ke(p,e),h=a?K(n,e)+(n.bandwidth-l)/2:K(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,g=te({lower:r,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({y:h,height:l,baselineX:g.baseline,valueX:g.value,rounded:this.#qe(i,e,u)})}Ye(e,{fill:r.barTextures.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:f})})}#Xe(e,t,n){let r=this.#H;if(r==null||this.#m===0)return;let i=this.#Le(),a=this.#W,o=e=>a==null?(this.#h[e]??0)*i.k+i.b:q(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=this.#Ge(t.dataKey);if(e.save(),s<1&&(e.beginPath(),e.rect(this.#U.left,0,this.#U.width*s,this.#d),e.clip()),this.#I){this.#Ze(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#We(t,this.#E==null?`value`:`upper`,i),u=this.#E==null?null:this.#We(t,`lower`,i),d=e=>!Number.isNaN(l[e]??NaN),f=[];for(let e=0;e<this.#m;e++)(!t.connectNulls||d(e))&&f.push(e);let p=e=>(l[e]??0)*n.k+n.b;if(c){let r=u==null?()=>0*n.k+n.b:e=>(u[e]??0)*n.k+n.b;Ze(e,{color:a,curve:t.curve,indexes:f,xAt:o,y0At:r,y1At:p,definedAt:d})}else Xe(e,{color:a,curve:t.curve,indexes:f,xAt:o,yAt:p,definedAt:d}),t.markers&&this.#U.width/this.#m>=12&&ot(e,{color:a,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),indexes:f,xAt:o,yAt:p,definedAt:d});e.restore()})}#Ze(e,t,n,r,i){let a=Math.max(1,Math.round(this.#U.width*this.#f)),o=e=>this.#U.left+(e+.5)/this.#f;if(t.mark===`area`){let s=this.#Qe(`${t.dataKey}:upper`,this.#We(t,this.#E==null?`value`:`upper`,n),a),c=this.#E==null?null:this.#Qe(`${t.dataKey}:lower`,this.#We(t,`lower`,n),a);c==null?$e(e,{color:r,lowerColumns:At(s,0),upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b}):$e(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#Qe(t.dataKey,this.#We(t,`value`,n),a);Qe(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#Qe(e,t,n){let r=this.#O.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#L.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=G(o,[0,n]),c=me({xs:this.#h,values:t,startIndex:0,endIndex:this.#m-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#L.set(e,{key:i,columns:c}),c}#$e(){if(this.#m===0)return null;let e;return e=this.#ae===void 0?this.#ie:this.#ae==null?null:this.#tt(this.#ae),e==null?null:Math.min(Math.max(0,e),this.#m-1)}#et(e){return this.#_==null?e:this.#_[e]??e}#tt(e){if(this.#p.length===0)return null;let t=Math.min(Math.max(0,e),this.#p.length-1);if(this.#v==null)return t;let n=this.#v[t]??-1;return n===-1?null:n}#nt(e){if(e<0||e>=this.#m)return``;let{xScale:t}=this.#r;if(t===`band`||t===`point`)return this.#g[e]??``;let n=this.#h[e]??0;return t===`time`?new Date(n):n}#rt(e,t){if(this.#m===0)return null;let n=this.#W;if(n!=null)return Le(n,this.#we()?t:e);let{k:r,b:i}=this.#Le();if(r===0)return 0;let a=e;if(this.#I){let t=Math.floor((e-this.#U.left)*this.#f);a=this.#U.left+(t+.5)/this.#f}return Se(this.#h,this.#m,(a-i)/r)}#it(e,t,n){let r=this.#n.seriesSpecs(),i=this.#we(),a=this.#W;if(this.#e===`bar`&&this.#E==null&&a!=null&&r.length>1){let o=(i?n:t)-K(a,e),s=Math.floor(o/Math.max(1,a.bandwidth)*r.length);return r[Math.min(r.length-1,Math.max(0,s))]?.dataKey??null}let{k:o,b:s}=i?this.#Ie():this.#Fe(),c=i?t:n,l=this.#E;if(this.#e===`bar`&&l!=null)for(let t=0;t<r.length;t++){let n=l.lower[t]?.[e]??NaN,i=l.upper[t]?.[e]??NaN;if(Number.isNaN(n)||Number.isNaN(i)||n===i)continue;let a=n*o+s,u=i*o+s;if(c>=Math.min(a,u)&&c<=Math.max(a,u))return r[t]?.dataKey??null}let u=null,d=1/0;return r.forEach((t,n)=>{let r=(this.#E==null?this.#x.get(t.dataKey):this.#E.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<d&&(d=i,u=t.dataKey)}),u}#at(e,t){let n=e==null||this.#m===0?null:Math.min(Math.max(0,e),this.#m-1),r=this.#ae!==void 0;if(t.notify&&n!==this.#$e()){let e=n==null?null:this.#et(n);if(this.#i.onActiveIndexChange?.(e),r){this.#oe={index:e,viaKeyboard:t.viaKeyboard};return}}this.#se=t.viaKeyboard,r||(this.#ie=n),this.#lt(),this.#Oe()}#ot=null;#st=!1;#ct=null;#lt(e={force:!1}){let t=this.#$e();if(!e.force&&t===this.#ot&&this.#se===this.#st&&this.#re===this.#ct)return;if(this.#ot=t,this.#st=this.#se,this.#ct=this.#re,t==null||this.#m===0){this.#n.publishHover(null);return}let n=this.#et(t),r=this.#p[n]??{},i=this.#n.getSnapshot().series.map(e=>{let n=this.#x.get(e.dataKey)?.[t]??NaN;return{dataKey:e.dataKey,label:e.label,value:Number.isNaN(n)?null:n,color:e.color}});this.#r.stacked&&i.reverse(),this.#e===`scatter`&&(i=this.#re==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#re));let a={index:n,xValue:this.#nt(t),datum:r,points:i,viaKeyboard:this.#se};if(this.#Ce()){let e=this.#G[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#ut(e,t,n){let r=this.#H;if(r==null||this.#m===0||t.length===0)return null;if(this.#Ce())return this.#dt(e,t);let i=this.#Le(),a=t.map((e,t)=>{let n=this.#We(e,`value`,t),r=[];for(let e=0;e<this.#m;e++)Number.isNaN(n[e]??NaN)||r.push(e);return r}),o=a.reduce((e,t)=>e+t.length,0);return t.forEach((t,s)=>{let c=this.#We(t,`value`,s),l=a[s]??[];e.save(),e.globalAlpha=this.#Ge(t.dataKey),lt(e,{color:r.series.get(t.dataKey)??`currentColor`,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),totalPointCount:o,indexes:l,xAt:e=>(this.#h[e]??0)*i.k+i.b,yAt:e=>(c[e]??0)*n.k+n.b,radiusAt:()=>4}),e.restore()}),null}#dt(e,t){let n=this.#H;if(n==null)return null;let r=this.#U,i=we(this.#q),a=r.left+r.width/2,o=r.top+r.height/2,s=this.#Y.values(),c=s[0]??1,l=s[1]??1,u=.85-.22*c-.11*l,d=Math.min(r.width,r.height)/2*u,f=this.#O.values(),p=[f[0]??0,f[1]??1],m=this.#D.values(),h=[m[0]??0,m[1]??1],g=this.#K,_=t.map(e=>this.#Ge(e.dataKey)),v=this.#Y.values(),y=v[0]??1,b=v[1]??1,x=(e,t,n)=>{let r=Te(e,t,n,i);return{x:a+r.x*d,y:o-r.y*d}},S=Oe.map(([e,t,n])=>x(e,t,n)),C=t[0],w=t.length===1&&C!=null?C.dataKey:`y`,T=[{label:this.#r.xKey,alpha:1,from:x(-1,-y,-b),to:x(1,-y,-b)},{label:w,alpha:y,from:x(-1,-1,-b),to:x(-1,1,-b)},{label:this.#r.zKey??`z`,alpha:b,from:x(-1,-y,-1),to:x(-1,-y,1)}];dt(e,{gridColor:n.chrome.grid,axisColor:n.chrome.baseline,corners:S,edges:ke,cubeAlpha:b,axes:T});let E=this.#m*t.length,D=this.#Q;(D==null||D.screenX.length<E)&&(D={screenX:new Float64Array(E),screenY:new Float64Array(E),radius:new Float64Array(E),seriesIndex:new Int32Array(E),pointIndex:new Int32Array(E),depths:new Float64Array(E),count:0});let O=D.depths,k=0;t.forEach((e,t)=>{let n=this.#We(e,`value`,t);for(let e=0;e<this.#m;e++){let r=n[e]??NaN,s=this.#G[e]??NaN;if(Number.isNaN(r)||Number.isNaN(s))continue;let c=Te(De(this.#h[e]??0,p),De(r,h)*y,De(s,g)*b,i);D.screenX[k]=a+c.x*d,D.screenY[k]=o-c.y*d,D.radius[k]=4*c.scale,D.seriesIndex[k]=t,D.pointIndex[k]=e,O[k]=c.depth,k+=1}}),D.count=k,this.#Q=D,this.#$.length<k&&(this.#$=new Int32Array(E));let A=this.#$.subarray(0,k);for(let e=0;e<k;e++)A[e]=e;A.sort((e,t)=>(O[t]??0)-(O[e]??0));let j=t.map(e=>this.#n.seriesShape(e.dataKey));return ut(e,{count:k,order:A,screenX:D.screenX,screenY:D.screenY,radius:D.radius,colorAt:e=>{let r=t[D.seriesIndex[e]??0];return r==null?`currentColor`:n.series.get(r.dataKey)??`currentColor`},shapeAt:e=>j[D.seriesIndex[e]??0]??`circle`,alphaAt:e=>_[D.seriesIndex[e]??0]??1,surface:n.chrome.surface}),{center:{x:a,y:o},axes:T}}#ft(e,t){let n=this.#n.seriesSpecs(),r=576,i=null;if(this.#Ce()){let a=this.#Q;if(a==null)return null;for(let o=0;o<a.count;o++){let s=(a.screenX[o]??0)-e,c=(a.screenY[o]??0)-t,l=s*s+c*c;if(l<r){let e=n[a.seriesIndex[o]??0];if(e==null)continue;r=l,i={seriesKey:e.dataKey,index:a.pointIndex[o]??0,screenX:a.screenX[o]??0,screenY:a.screenY[o]??0}}}return i}let a=this.#Le(),o=this.#Fe();for(let s of n){let n=this.#x.get(s.dataKey);if(n!=null)for(let c=0;c<this.#m;c++){let l=n[c]??NaN;if(Number.isNaN(l))continue;let u=(this.#h[c]??0)*a.k+a.b,d=l*o.k+o.b,f=u-e,p=d-t,m=f*f+p*p;m<r&&(r=m,i={seriesKey:s.dataKey,index:c,screenX:u,screenY:d})}}return i}#pt(e){let t=this.#n.seriesSpecs();if(this.#Ce()){let t=this.#Q;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}let n=this.#Le(),r=this.#Fe();for(let i of t){let t=this.#x.get(i.dataKey)?.[e]??NaN;if(!Number.isNaN(t))return{x:(this.#h[e]??0)*n.k+n.b,y:t*r.k+r.b}}return null}#mt(){let{crosshair:e,band:t,markers:n,tooltip:r}=this.#t,i=this.#$e(),a=i!=null&&this.#m>0,o=this.#e===`bar`,s=this.#e===`scatter`;if(e.style.opacity=a&&!o&&!s?`1`:`0`,t.style.opacity=a&&o?`1`:`0`,n.style.opacity=a&&!o?`1`:`0`,r.style.opacity=a?`1`:`0`,!a)return;let c=this.#U;if(s){let e=this.#ne??this.#pt(i);if(e==null){n.style.opacity=`0`,r.style.opacity=`0`;return}for(;n.children.length>1;)n.lastElementChild?.remove();n.children.length===0&&n.appendChild(Dt(n.ownerDocument));let t=n.children[0];if(t instanceof HTMLElement){let n=this.#n.getSnapshot().series,r=this.#re==null?n.find(e=>{let t=this.#x.get(e.dataKey)?.[i]??NaN;return!Number.isNaN(t)}):n.find(e=>e.dataKey===this.#re);t.style.opacity=`1`,Ot(t,r?.shape??`circle`,r?.color??`currentColor`),t.style.transform=`translate3d(${e.x}px, ${e.y}px, 0)`}this.#ht(e.x,e.y);return}let l=this.#Re(i),u=this.#we();if(o){let e=this.#W;if(e!=null){let n=Ie(e,i),r=Math.max(1,n.size),a=n.start-(r-n.size)/2;u?(t.style.transform=`translate3d(${c.left}px, ${a}px, 0)`,t.style.width=`${c.width}px`,t.style.height=`${r}px`):(t.style.transform=`translate3d(${a}px, ${c.top}px, 0)`,t.style.width=`${r}px`,t.style.height=`${c.height}px`)}}else{e.style.transform=`translate3d(${l}px, ${c.top}px, 0)`,e.style.height=`${c.height}px`;let t=this.#n.getSnapshot().series;for(;n.children.length>t.length;)n.lastElementChild?.remove();for(;n.children.length<t.length;)n.appendChild(Dt(n.ownerDocument));let r=this.#Fe();t.forEach((e,t)=>{let a=n.children[t];if(!(a instanceof HTMLElement))return;let o=this.#x.get(e.dataKey)?.[i]??NaN,s=this.#We(e,this.#E==null?`value`:`upper`,t)[i]??NaN;if(Number.isNaN(o)||Number.isNaN(s)){a.style.opacity=`0`;return}a.style.opacity=`1`,Ot(a,e.shape,e.color),a.style.transform=`translate3d(${l}px, ${s*r.k+r.b}px, 0)`})}o&&u&&this.#W!=null?this.#ht(this.#ce??c.left+c.width/2,q(this.#W,i)):this.#ht(l,this.#le??c.top+8)}#ht(e,t){let n=this.#U,r=this.#t.tooltip,i=this.#ue,a=e+12;a+i.width>n.left+n.width&&e-12-i.width>=n.left&&(a=e-12-i.width);let o=Math.max(0,Math.min(t-i.height/2,n.top+n.height-i.height));r.style.transform=`translate3d(${a}px, ${o}px, 0)`}};const wt=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},Tt=(e,t,n,r)=>{for(let t of e.values())t.target=0;for(let n of t){let t=e.get(n.key);t==null?e.set(n.key,{alpha:+!!r,target:1,text:n.text}):(t.target=1,t.text=n.text)}let i=1-.84**(n/16.67),a=1-.88**(n/16.67),o=!1;for(let[t,n]of e){if(r)n.alpha=n.target;else{let e=n.target>n.alpha?i:a;n.alpha+=(n.target-n.alpha)*e}if(n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03){e.delete(t);continue}n.alpha!==n.target&&(o=!0)}return o},Et={circle:`circle(50%)`,square:`inset(8%)`,triangle:`polygon(50% 0%, 100% 100%, 0% 100%)`,diamond:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`,"triangle-down":`polygon(0% 0%, 100% 0%, 50% 100%)`,plus:`polygon(33.33% 0%, 66.67% 0%, 66.67% 33.33%, 100% 33.33%, 100% 66.67%, 66.67% 66.67%, 66.67% 100%, 33.33% 100%, 33.33% 66.67%, 0% 66.67%, 0% 33.33%, 33.33% 33.33%)`,cross:`polygon(73.57% 2.86%, 97.14% 26.43%, 73.57% 50%, 97.14% 73.57%, 73.57% 97.14%, 50% 73.57%, 26.43% 97.14%, 2.86% 73.57%, 26.43% 50%, 2.86% 26.43%, 26.43% 2.86%, 50% 26.43%)`,star:`polygon(50% 2.45%, 61.8% 38.77%, 100% 38.77%, 69.1% 61.23%, 80.9% 97.55%, 50% 75.1%, 19.1% 97.55%, 30.9% 61.23%, 0% 38.77%, 38.2% 38.77%)`},Dt=e=>{let t=e.createElement(`div`);t.setAttribute(`data-slot`,`chart-active-point`),t.style.position=`absolute`,t.style.width=`12px`,t.style.height=`12px`,t.style.left=`-6px`,t.style.top=`-6px`;let n=e.createElement(`div`);n.style.position=`absolute`,n.style.inset=`0`,n.style.backgroundColor=`var(--background-color-card)`;let r=e.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`2px`,t.appendChild(n),t.appendChild(r),t},Ot=(e,t,n)=>{let r=Et[t];e.setAttribute(`data-shape`,t);let[i,a]=e.children;i instanceof HTMLElement&&(i.style.clipPath=r),a instanceof HTMLElement&&(a.style.clipPath=r,a.style.backgroundColor=n)},kt=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,At=(e,t)=>({columnCount:e.columnCount,hasData:e.hasData,minValue:new Float64Array(e.columnCount).fill(t),maxValue:new Float64Array(e.columnCount).fill(t),inValue:new Float64Array(e.columnCount).fill(t),outValue:new Float64Array(e.columnCount).fill(t)}),jt=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),Mt=e=>e instanceof Date?Number.isNaN(e.getTime())?`—`:e.toISOString():typeof e==`number`?Number.isFinite(e)?String(e):`—`:typeof e==`string`?jt(e):`—`,Nt=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,Pt=e=>`| ${e.join(` | `)} |`,Ft=({data:e,xKey:t,series:n,zKey:r})=>{let i=[jt(t),...n.map(e=>jt(e.label)),...r==null?[]:[jt(r)]],a=e.map(e=>[Mt(k(e,t)),...n.map(t=>Nt(k(e,t.dataKey))),...r==null?[]:[Nt(k(e,r))]]);return[Pt(i),Pt(i.map(()=>`---`)),...a.map(e=>Pt(e))].join(`
2
+ `)},It=(e,t)=>e==null?`var(${M(t)})`:ie(e)?`var(${M(e)})`:e,Lt={"chart-1":`circle`,"chart-2":`square`,"chart-3":`triangle`,"chart-4":`diamond`,"chart-5":`triangle-down`,"chart-6":`plus`,"chart-7":`cross`,"chart-8":`star`,"chart-other":`circle`},Rt=(e,t)=>e??Lt[t],zt={1:`chart-1`,2:`chart-2`,3:`chart-3`,4:`chart-4`,5:`chart-5`,6:`chart-6`,7:`chart-7`,8:`chart-8`,other:`chart-other`},Bt=e=>{let t=new Set;for(let n of e)n.seriesSlot!=null&&n.seriesSlot!==`other`&&t.add(zt[n.seriesSlot]);let n=new Map,r=new Set(t);for(let t of e){if(t.seriesSlot!=null){n.set(t.dataKey,zt[t.seriesSlot]);continue}let e=N.find(e=>!r.has(e))??`chart-other`;n.set(t.dataKey,e),r.add(e)}return n};var Vt=class{#e=new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=new Map;#r=new Map;#i=0;#a=null;#o=!1;#s=`vertical`;#c=null;#l=null;#u=new Map;#d=new Map;#f=null;#p=null;onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec)}seriesShape(e){return this.#t.series.find(t=>t.dataKey===e)?.shape??Lt[`chart-other`]}registerSeries(e){let t=this.#r.get(e.dataKey)??this.#i++;return this.#r.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#m({seriesChanged:!0}),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#m({seriesChanged:!0}))}}setDecorative(e){this.#o!==e&&(this.#o=e,this.#m({seriesChanged:!0}))}setOrientation(e){this.#s!==e&&(this.#s=e,this.#m())}registerGrid(e){let t={lines:e};return this.#a=t,this.#m(),()=>{this.#a===t&&(this.#a=null,this.#m())}}registerXAxis(e){return this.#c=e,this.#m(),()=>{this.#c===e&&(this.#c=null,this.#m())}}registerYAxis(e){return this.#l=e,this.#m(),()=>{this.#l===e&&(this.#l=null,this.#m())}}registerReferenceLine(e,t){let n=this.#d.get(e)??this.#i++;return this.#d.set(e,n),this.#u.set(e,{spec:t,sequence:n}),this.#m(),()=>{this.#u.get(e)?.spec===t&&(this.#u.delete(e),this.#m())}}registerTooltip(e){return this.#f=e,this.#m(),()=>{this.#f===e&&(this.#f=null,this.#m())}}publishHover(e){this.#p!==e&&(this.#p=e,this.#t={...this.#t,hover:e},this.#h())}seriesMeta(){let e=this.seriesSpecs(),t=Bt(e);return e.map(e=>{let n=t.get(e.dataKey)??`chart-other`,r=this.#o?ae:It(e.color,n),i=this.#o?ae:e.color??n;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:r,colorInput:i,shape:Rt(e.shape,n),texture:e.texture}})}#m(e={seriesChanged:!1}){this.#t={series:this.seriesMeta(),hover:this.#p,grid:this.#a,xAxis:this.#c,yAxis:this.#l,referenceLines:[...this.#u.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#f,orientation:this.#s},this.#h(),e.seriesChanged?this.onSeriesChange?.():this.onPresentationChange?.()}#h(){for(let e of this.#e)e()}};const Ht=c(null),Z=e=>{let t=l(Ht);return _(t,`${e} must be composed inside ${e.split(`.`)[0]}.Root — it registers into the chart it belongs to and renders nothing on its own.`),t},Ut=e=>g(e.subscribe,e.getSnapshot,e.getSnapshot),Wt=e=>g(e.subscribe,()=>e.getSnapshot().series,()=>e.getSnapshot().series),Gt=e=>g(e.subscribe,()=>e.getSnapshot().orientation,()=>e.getSnapshot().orientation),Kt=(e,t)=>{let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))},qt=e=>{let[t,n]=h(e);return Kt(t,e)?t:(n(e),e)},Jt=(e,t)=>{for(let n of e){let e=k(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},Yt=[`auto`,`auto`],Xt=({kind:t,componentName:i,slotName:a,data:o,xKey:s,xScale:c,zKey:l,dimensions:u=3,yDomain:g=Yt,stacked:x=!1,orientation:S=`vertical`,animate:C=!0,pending:w=!1,decorative:T=!1,activeIndex:E,onActiveIndexChange:D,onDatumActivate:O,className:A,children:j,ref:ee,"data-slot":te,"aria-label":ne,"aria-labelledby":re,"aria-hidden":ie,tabIndex:M,...ae})=>{let[N]=h(()=>new Vt),P=m(null),F=m({data:o,xKey:s,zKey:l}),[oe]=h(()=>({kind:t,componentName:i,store:N,engineRef:P,dataRef:F}));f(()=>{F.current={data:o,xKey:s,zKey:l}},[o,s,l]);let se=m(null),ce=e(se,ee),le=m(null),I=m(null),ue=m(null),L=m(null),de=m(null),R=m(null),z=d(),B=t===`bar`?`band`:c??Jt(o,s);_(t!==`scatter`||o.length===0||B!==`point`,`${i}.Root requires numeric or Date x values — the "${s}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[fe,pe]=g,V=p(()=>{for(let e of o){let t=k(e,s);if(t instanceof Date&&xe(t))return!0}return!1},[o,s]);return f(()=>{let e=se.current,n=le.current,r=I.current,i=ue.current,a=L.current,o=de.current,s=R.current;if(e==null||n==null||r==null||i==null||a==null||o==null||s==null)return;let c=new Ct({kind:t,store:N,elements:{root:e,plot:n,canvas:r,crosshair:i,band:a,markers:o,tooltip:s}});return P.current=c,()=>{P.current=null,c.destroy()}},[t,N]),f(()=>{P.current?.setOptions({xKey:s,xScale:B,yDomain:[fe,pe],zKey:l??null,dimensions:u,stacked:x,orientation:S,animate:C}),N.setOrientation(S),N.setDecorative(T)},[N,T,s,B,fe,pe,l,u,x,S,C]),f(()=>{P.current?.setRows(o)},[o]),f(()=>{P.current?.setCallbacks(T?{onDatumActivate:null,onActiveIndexChange:null}:{onDatumActivate:O??null,onActiveIndexChange:D??null})}),f(()=>{P.current?.setControlledActiveIndex(T?void 0:E)},[T,E]),f(()=>{P.current?.flushIngest()}),y(`div`,{"data-slot":r(te,a),className:n(`relative flex aspect-video w-full flex-col`,A),"aria-hidden":T?!0:ie,tabIndex:T?void 0:M,inert:T?!0:void 0,ref:ce,...ae,children:b(Ht.Provider,{value:oe,children:[b(`div`,{"data-slot":`${a}-plot`,className:n(`relative min-h-0 w-full flex-1`,w&&`opacity-60 transition-opacity duration-300`),ref:le,children:[y(`canvas`,{"data-slot":`${a}-canvas`,ref:I,"aria-hidden":!0,className:`absolute inset-0 size-full`}),T?null:b(v,{children:[y(`div`,{role:`application`,"aria-label":ne,"aria-labelledby":re,"aria-describedby":z,tabIndex:0,className:n(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm outline-none focus-visible:ring-2`,(t===`line`||t===`area`)&&`cursor-crosshair`,t===`scatter`&&l!=null&&`touch-none cursor-grab active:cursor-grabbing`),onPointerDown:e=>{e.isTrusted&&t===`scatter`&&l!=null&&e.currentTarget.setPointerCapture(e.pointerId),P.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerMove:e=>{P.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{P.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerLeave:()=>{P.current?.handlePointerLeave()},onPointerCancel:()=>{P.current?.handlePointerLeave()},onBlur:()=>{P.current?.handlePointerLeave()},onKeyDown:e=>{P.current?.handleKeyDown(e.key)&&e.preventDefault()}}),y(`span`,{id:z,className:`sr-only`,children:`Use the left and right arrow keys to move between data points, Page Up and Page Down to jump by a tenth of the data, Home and End to jump to the first and last, Enter or Space to activate the current point, and Escape to dismiss the readout.`})]}),y(`div`,{"data-slot":`${a}-crosshair`,ref:ue,"aria-hidden":!0,className:`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0`}),y(`div`,{"data-slot":`${a}-hover-band`,ref:L,"aria-hidden":!0,className:`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0`}),y(`div`,{"data-slot":`${a}-markers`,ref:de,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 opacity-0`}),y(an,{slotName:a,store:N,tooltipRef:R,xHasTimeOfDay:V})]}),j,T?null:b(v,{children:[y(dn,{store:N,xHasTimeOfDay:V}),y(pn,{data:o,label:ne,labelledBy:re,slotName:a,store:N,xHasTimeOfDay:V,xKey:s,zKey:l})]})]})})},Zt=(e,t,n)=>{let r=Z(e);_(r.kind===t,`${e} cannot be composed inside ${r.componentName}.Root — compose ${r.componentName} series parts instead.`);let{dataKey:i,label:a,seriesSlot:o,color:s,curve:c=`linear`,markers:l=!1,connectNulls:u=!1,shape:d,texture:p=`solid`}=n;return f(()=>r.store.registerSeries({dataKey:i,label:a??i,seriesSlot:o,color:s,mark:t,curve:c,markers:l,connectNulls:u,shape:d,texture:p}),[r.store,i,a,o,s,t,c,l,u,d,p]),null},Qt=(e,t)=>{let n=Z(e),{lines:r}=t;return f(()=>n.store.registerGrid(r),[n.store,r]),null},$t=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return f(()=>n.store.registerXAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},en=(e,t)=>{let n=Z(e),{tickFormat:r,tickCount:i}=t;return f(()=>n.store.registerYAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},tn=(e,t)=>{let n=Z(e),r=d(),{y:i,label:a,color:o}=t;return f(()=>n.store.registerReferenceLine(r,{y:i,label:a,color:o}),[n.store,r,i,a,o]),null},nn=(e,t)=>{let n=Z(e),{labelFormat:r,valueFormat:i,indicator:a=`line`,footer:o,children:s,...c}=t,l=qt(c);return f(()=>n.store.registerTooltip({labelFormat:r,valueFormat:i,indicator:a,footer:o,children:s,divProps:l}),[n.store,r,i,a,o,s,l]),null},rn=(e,t,n)=>e==null?`—`:n==null?H(e):n(e,t),an=({slotName:r,store:i,tooltipRef:a,xHasTimeOfDay:o})=>{let s=Ut(i),c=s.tooltip,l=s.hover,{className:u,ref:d,style:p,...h}=c?.divProps??{},g=m(null),_=e(a,g);f(()=>{if(d==null)return;let e=t(d),n=e(g.current);return()=>{typeof n==`function`?n():e(null)}},[d]);let x=c?.footer;return y(`div`,{"data-slot":`${r}-tooltip`,ref:_,className:n(`bg-popover border-popover text-strong pointer-events-none absolute left-0 top-0 z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md`,u),style:{opacity:0,...p},...h,children:l==null?null:c?.children==null?b(v,{children:[y(`div`,{className:`text-muted font-medium`,children:c?.labelFormat==null?U(l.xValue,{datasetHasTimeOfDay:o}):c.labelFormat(l.xValue)}),y(`div`,{className:`mt-1 grid gap-1`,children:l.points.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[c?.indicator===`none`?null:y(`span`,{"aria-hidden":!0,className:`h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),y(`span`,{className:`text-muted`,children:e.label}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:rn(e.value,e.dataKey,c?.valueFormat)})]},e.dataKey))}),l.zValue===void 0?null:b(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[y(`span`,{className:`text-muted`,children:`z`}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:l.zValue==null?`—`:H(l.zValue)})]}),x==null?null:y(`div`,{className:`text-muted mt-1`,children:typeof x==`function`?x(l):x})]}):c.children(l)})},Q=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,$=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,on={hatch:({ink:e})=>({backgroundImage:Q(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:Q(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${Q(`135deg`,e,4)}, ${Q(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:Q(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:Q(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${Q(`0deg`,e,4)}, ${Q(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},sn=(e,t,n)=>e===`solid`?{}:on[e]({ink:de(t),orientation:n}),cn=({series:e,orientation:t})=>e.mark===`bar`?y(`span`,{"aria-hidden":!0,"data-texture":e.texture,className:n(`size-2 shrink-0 rounded-[2px]`,$),style:{backgroundColor:e.color,...sn(e.texture,e.color,t)}}):e.mark===`line`?b(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[y(`span`,{className:n(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,$),style:{backgroundColor:e.color}}),y(`span`,{"data-shape":e.shape,className:n(`relative size-2`,$),style:{backgroundColor:e.color,clipPath:Et[e.shape]}})]}):y(`span`,{"aria-hidden":!0,"data-shape":e.shape,className:n(`size-2 shrink-0`,$),style:{backgroundColor:e.color,clipPath:Et[e.shape]}}),ln=({partName:e,slotName:t,className:r,children:i,...a})=>{let o=Z(e),s=Wt(o.store),c=Gt(o.store);return s.length<2?null:y(`div`,{"data-slot":`${t}-legend`,className:n(`text-muted flex flex-wrap items-center gap-x-4 gap-y-1 pt-3 text-xs`,r),...a,children:i==null?s.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[y(cn,{series:e,orientation:c}),e.label]},e.dataKey)):i(s)})},un=({partName:e,slotName:t,label:n=`Copy data as Markdown`,onCopy:r,onCopyError:c,onClick:l,ref:d,...f})=>{let p=Z(e),g=a(),[_,C]=h(``),w=_!==``,T=m(!1),E=m(void 0);return u(()=>()=>{E.current!=null&&clearTimeout(E.current)},[]),b(v,{children:[y(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":`${t}-copy-button`,label:n,icon:y(w?x:S,{}),ref:d,onClick:async e=>{try{if(l?.(e),e.defaultPrevented){E.current!=null&&(clearTimeout(E.current),E.current=void 0),C(``);return}let{data:t,xKey:n,zKey:i}=p.dataRef.current,a=Ft({data:t,xKey:n,zKey:i,series:p.store.getSnapshot().series});await g(a),r?.(a),C(o(`Copied`,T)),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{C(``)},2e3)}catch(e){c?.(e)}},...f}),y(s,{children:_})]})},dn=({store:e,xHasTimeOfDay:t})=>{let n=Ut(e),[r,i]=h(``),a=n.hover;return u(()=>{if(a==null||!a.viaKeyboard){i(``);return}let e=a.points.map(e=>`${e.label}: ${e.value==null?`no data`:H(e.value)}`).join(`, `),n=a.zValue===void 0?``:`, z: ${a.zValue==null?`no data`:H(a.zValue)}`,r=setTimeout(()=>{i(`${U(a.xValue,{datasetHasTimeOfDay:t})}. ${e}${n}`)},120);return()=>clearTimeout(r)},[a,t]),y(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:r})},fn=(e,t)=>{let[n,r]=h(void 0);return u(()=>{if(t==null){r(void 0);return}let e=t.split(/\s+/).map(e=>document.getElementById(e)?.textContent?.trim()??``).filter(Boolean).join(` `);r(e||void 0)},[t]),e??n},pn=({data:e,label:t,labelledBy:n,slotName:r,store:i,xHasTimeOfDay:a,xKey:o,zKey:s})=>{let c=Wt(i),l=fn(t,n);if(e.length===0||c.length===0)return null;let u=e.slice(0,150);return y(`div`,{className:`sr-only`,"data-slot":`${r}-data-table`,children:b(`table`,{children:[y(`caption`,{children:`${l==null?`Chart data`:`${l} — chart data`}${e.length>150?`. Showing the first 150 of ${e.length} rows.`:`.`}`}),y(`thead`,{children:b(`tr`,{children:[y(`th`,{scope:`col`,children:o}),c.map(e=>y(`th`,{scope:`col`,children:e.label},e.dataKey)),s==null?null:y(`th`,{scope:`col`,children:s})]})}),y(`tbody`,{children:u.map((e,t)=>{let n=k(e,o),r=n instanceof Date&&!Number.isNaN(n.getTime()),i=typeof n==`string`||typeof n==`number`||n instanceof Date?U(n,{datasetHasTimeOfDay:a}):String(n);return b(`tr`,{children:[y(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r?y(`time`,{dateTime:n.toISOString(),children:i}):i}),c.map(t=>{let n=k(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return y(`td`,{"data-value":r?n:void 0,children:r?H(n):`—`},t.dataKey)}),s==null?null:(()=>{let t=k(e,s),n=typeof t==`number`&&Number.isFinite(t);return y(`td`,{"data-value":n?t:void 0,children:n?H(t):`—`})})()]},t)})})]})})};export{tn as a,$t as c,Qt as i,en as l,ln as n,Zt as o,Xt as r,nn as s,un as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{a as r,r as i}from"./field-Bpptk_9t.js";import{useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";const c=e=>e===`indeterminate`,l=({"aria-invalid":l,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,ref:g,validation:_,...v})=>{let y=a(null),b=t(y,g),[x]=o(f),S=r(),{ariaInvalid:C,validation:w}=i({"aria-invalid":l,validation:_??S}),T=d??x;e(()=>{y.current&&(y.current.indeterminate=c(T))},[T]);let E=d==null?{defaultChecked:c(x)?void 0:x}:{checked:!c(d)&&d};return s(`input`,{"aria-checked":c(d)?`mixed`:d,"aria-invalid":C,"aria-readonly":h||void 0,"data-slot":`checkbox`,className:n(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,u),...E,"data-validation":w||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:b,type:`checkbox`,...v})};function u({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{u as n,l as t};
package/dist/checkbox.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t}from"./checkbox-0EoxOyMA.js";export{t as Checkbox,e as selectAllChecked};
1
+ import{n as e,t}from"./checkbox-Gg6nGUnR.js";export{t as Checkbox,e as selectAllChecked};
@@ -0,0 +1 @@
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-DdUwopIY.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./slot-C3gII_9c.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{t as a}from"./field-B1wqeZr4.js";import{t as o}from"./label-BqIp6kFx.js";import{t as s}from"./radio-group-HDVxTNPi.js";import{cloneElement as c,createContext as l,isValidElement as u,useContext as d,useId as f,useMemo as p,useRef as m}from"react";import h from"tiny-invariant";import{jsx as g}from"react/jsx-runtime";const _=l(null);function v(e){let t=d(_);return h(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const y=({"aria-describedby":e,"aria-errormessage":t,"aria-invalid":r,children:i,className:o,disabled:s=!1,id:c,name:l,ref:u,...h})=>{let v=d(a),y=v?.id,b=v?.name,x=v?.[`aria-describedby`],S=v?.[`aria-invalid`],C=v?.[`aria-errormessage`],w=f(),T=f(),E=m(null),D=y??c??w,O=[x??e,T].filter(Boolean).join(` `)||void 0,k=p(()=>({controlId:D,descriptionId:T,disabled:s,labelRef:E,controlProps:{id:D,name:b??l,disabled:s,"aria-describedby":O,"aria-invalid":S??r,"aria-errormessage":C??t}}),[D,T,s,O,b,l,S,r,C,t]);return g(_.Provider,{value:k,children:g(`div`,{ref:u,"data-slot":`choice`,className:n(`flex w-full items-start gap-2`,o),...h,children:i})})},b=({children:e,className:t,ref:r,...i})=>{let{controlProps:a}=v(`Indicator`),o=u(e)?c(e,{...a,disabled:a.disabled||e.props.disabled===!0,name:a.name??e.props.name,"aria-invalid":a[`aria-invalid`]??e.props[`aria-invalid`],"aria-errormessage":a[`aria-errormessage`]??e.props[`aria-errormessage`]}):e;return g(`span`,{ref:r,"data-slot":`choice-indicator`,className:n(`flex h-lh shrink-0 items-center text-sm`,t),...i,children:o})},x=({asChild:e,className:t,ref:i,...a})=>g(e?r:`div`,{ref:i,"data-slot":`choice-content`,className:n(`flex min-w-0 flex-1 flex-col gap-0.5`,t),...a}),S=({className:e,ref:r,...i})=>{let{controlId:a,disabled:s,labelRef:c}=v(`Label`),l=t(c,r);return g(o,{ref:l,"data-slot":`choice-label`,className:n(s&&`opacity-50`,e),...i,htmlFor:a,disabled:s})},C=({asChild:t,className:i,id:a,ref:o,...c})=>{let{disabled:l}=v(`Title`),u=d(s),p=f(),m=a??p;return e(()=>u?.registerLabelId(m),[u,m]),g(t?r:`p`,{ref:o,"data-slot":`choice-title`,className:n(`text-strong text-sm font-medium font-sans`,l&&`opacity-50`,i),...c,id:m})};function w(e){return e.defaultPrevented||i(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const T={Root:y,Indicator:b,Content:x,Label:S,Title:C,Description:({asChild:t,className:i,onClick:a,ref:o,...c})=>{let{descriptionId:l,disabled:u,labelRef:f}=v(`Description`),p=d(s);return e(()=>p?.registerDescriptionId(l),[p,l]),g(t?r:`p`,{ref:o,"data-slot":`choice-description`,className:n(`text-body text-sm leading-4`,!u&&`[[data-slot~=choice-label]~&]:cursor-pointer`,u&&`opacity-50`,i),onClick:e=>{a?.(e),w(e)&&(f.current?.click(),e.preventDefault())},...c,id:l})}};export{T as t};