@alfadocs/ui-kit 1.54.3 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (617) hide show
  1. package/dist/_chunks/{accordion-C11v9ouP.js → accordion-Ch3xp0mX.js} +9 -9
  2. package/dist/_chunks/{actions-cell-renderer-CjzSqMgn.js → actions-cell-renderer-Dj1ZkvJj.js} +4 -4
  3. package/dist/_chunks/{address-autocomplete-BBZ0u_U1.js → address-autocomplete-bPR2mNBt.js} +2 -2
  4. package/dist/_chunks/address-fields-BfjxS05Z.js +298 -0
  5. package/dist/_chunks/{agenda-card-CakEvwnM.js → agenda-card-DauvvKX6.js} +2 -2
  6. package/dist/_chunks/{agenda-tray-B8vuZKjH.js → agenda-tray-ZKhDxlfw.js} +24 -24
  7. package/dist/_chunks/{ai-credits-notice-D9_qP2xc.js → ai-credits-notice-BoNJtOuE.js} +4 -4
  8. package/dist/_chunks/ai-fab-pill-BOu96kCx.js +30 -0
  9. package/dist/_chunks/{ai-permission-notice-Cr6o1f0f.js → ai-permission-notice-5vpblPCx.js} +3 -3
  10. package/dist/_chunks/{ai-prompt-input-DkL8W-nt.js → ai-prompt-input-Beh-O_rJ.js} +4 -4
  11. package/dist/_chunks/{alia-sidebar-DSUQ2RpK.js → alia-sidebar-DS0b54Mv.js} +12 -12
  12. package/dist/_chunks/{anamnesis-card-BT1tMt5O.js → anamnesis-card-BSlAhaoG.js} +4 -4
  13. package/dist/_chunks/{anamnesis-summary-card-Bv0CZ-mk.js → anamnesis-summary-card-2YfIYY2j.js} +2 -2
  14. package/dist/_chunks/{anamnesis-summary-rows-Brru7JrH.js → anamnesis-summary-rows-Dtw5Hpg4.js} +425 -424
  15. package/dist/_chunks/{antenatal-schedule-timeline-BZzgjfyd.js → antenatal-schedule-timeline-Kf2Yg8uo.js} +4 -4
  16. package/dist/_chunks/{app-frame-Cos-GSfw.js → app-frame-B-0O9CrU.js} +40 -38
  17. package/dist/_chunks/{appointment-card-CA2ynsmN.js → appointment-card-Dh3fAcyf.js} +12 -12
  18. package/dist/_chunks/{appointment-peek-Cbrg36wj.js → appointment-peek-BIZaDeCi.js} +6 -6
  19. package/dist/_chunks/{appointment-timeline-CssAJLpL.js → appointment-timeline-DmqYEIT9.js} +32 -33
  20. package/dist/_chunks/{appointment-tray-EQUjllVy.js → appointment-tray-CyI_p3zU.js} +28 -28
  21. package/dist/_chunks/{appointment-workflow-status-DrWCNLbB.js → appointment-workflow-status-DMjuIK90.js} +2 -2
  22. package/dist/_chunks/{audio-recorder-BM68r6fe.js → audio-recorder-DWKKjGPt.js} +5 -6
  23. package/dist/_chunks/{auth-form-parts-Celi-TLV.js → auth-form-parts-CravOf0L.js} +6 -5
  24. package/dist/_chunks/{autocomplete-BXm1rnT0.js → autocomplete-DosDnGie.js} +3 -3
  25. package/dist/_chunks/{avatar-DYtwj1-R.js → avatar-WZY3eGE7.js} +10 -10
  26. package/dist/_chunks/{balance-badge-cell-C5hmahoB.js → balance-badge-cell-zP-iN-Pd.js} +5 -5
  27. package/dist/_chunks/{benefit-card-DB1Kdrmc.js → benefit-card-BWBClvdF.js} +46 -45
  28. package/dist/_chunks/{bishop-score-BzvVol-u.js → bishop-score-BxA20j9T.js} +5 -5
  29. package/dist/_chunks/{bmi-calculator-CDmQk0b5.js → bmi-calculator-DTZhRhXe.js} +5 -5
  30. package/dist/_chunks/{booking-BGY3LUi8.js → booking-uZO10TLK.js} +1553 -1458
  31. package/dist/_chunks/{button-CYPx2xFq.js → button-Bn16lcFM.js} +10 -7
  32. package/dist/_chunks/{button-group-CpEycMps.js → button-group-CWlwR-A5.js} +3 -3
  33. package/dist/_chunks/{calendar-BwF5nQuW.js → calendar-6-24PQ1u.js} +4 -4
  34. package/dist/_chunks/{calendar-workspace-BJPhMb2c.js → calendar-workspace-DVajSkKA.js} +868 -883
  35. package/dist/_chunks/{card-DPmk26CL.js → card-DMO2nkt4.js} +45 -42
  36. package/dist/_chunks/{care-plan-card-BqI-_B4T.js → care-plan-card-Ddjh5Doc.js} +5 -5
  37. package/dist/_chunks/{care-plan-entry-card-CbsZmfQM.js → care-plan-entry-card-0rpR-4Te.js} +5 -5
  38. package/dist/_chunks/{care-plan-header-BIS4CGcp.js → care-plan-header-BeMYMiI7.js} +3 -3
  39. package/dist/_chunks/{carousel.agent-DW9iPLdy.js → carousel.agent-D3xthzTf.js} +44 -45
  40. package/dist/_chunks/{chart-C134Ibwm.js → chart-C2RBJERE.js} +3 -3
  41. package/dist/_chunks/{chat-container-CAfyTxat.js → chat-container-baxzy8k8.js} +21 -22
  42. package/dist/_chunks/{chat-input-Bg99kcl3.js → chat-input-PtrSu1ZC.js} +27 -27
  43. package/dist/_chunks/{chat-message-D4rvLoIJ.js → chat-message-CmGUcajG.js} +4 -4
  44. package/dist/_chunks/city-input-BC_nYINn.js +185 -0
  45. package/dist/_chunks/{clinical-note-card-gmWXEwSu.js → clinical-note-card-14JIoUR0.js} +3 -3
  46. package/dist/_chunks/{code-block-CRVa-Thh.js → code-block-BQgK70mO.js} +2 -2
  47. package/dist/_chunks/{collapsible-CTjxzGuF.js → collapsible-DVPM46bq.js} +27 -27
  48. package/dist/_chunks/{color-picker-Bu0wM8xv.js → color-picker-BRQ4Y9SO.js} +3 -3
  49. package/dist/_chunks/{combobox-DppVSuUm.js → combobox-U5yfO6o0.js} +262 -218
  50. package/dist/_chunks/{connection-status-BwTnjnUj.js → connection-status-ncTjUPt6.js} +4 -4
  51. package/dist/_chunks/{contact-card-CIVCcicP.js → contact-card-CmK05vNb.js} +2 -2
  52. package/dist/_chunks/{contact-profile-card-B-HzocbB.js → contact-profile-card-C5DbP_X3.js} +4 -4
  53. package/dist/_chunks/{control-room-rail-g4vNSPFi.js → control-room-rail-Tx2jW250.js} +3 -3
  54. package/dist/_chunks/{copy-field-CiIuVbKe.js → copy-field-CvTIuA_p.js} +3 -3
  55. package/dist/_chunks/{country-select-r3QC7cVA.js → country-select-DF5Bd_mn.js} +2 -2
  56. package/dist/_chunks/{cycle-calculator-LjsQd9Gl.js → cycle-calculator-Dgfqr4Q4.js} +7 -7
  57. package/dist/_chunks/{dashboard-grid--rkojX6m.js → dashboard-grid-SAGoyCtL.js} +71 -71
  58. package/dist/_chunks/{data-table-BErtJzaT.js → data-table-C6T31E33.js} +244 -240
  59. package/dist/_chunks/{data-table-tabs-D5nFZKxg.js → data-table-tabs-Xhg5G0gU.js} +4 -4
  60. package/dist/_chunks/{date-picker-variants-B3AFKDSu.js → date-picker-variants-BnF-sHzq.js} +19 -10
  61. package/dist/_chunks/{date-picker-BnhBmcH6.js → date-picker-wRAcq2lt.js} +49 -49
  62. package/dist/_chunks/{date-range-picker-Dg050N1d.js → date-range-picker-BOvHwWO5.js} +5 -5
  63. package/dist/_chunks/{date-time-picker-Ckl6ezCL.js → date-time-picker-CLeLKuv9.js} +5 -5
  64. package/dist/_chunks/{dependent-selector-CPiolWiw.js → dependent-selector-Bet3XAFj.js} +2 -2
  65. package/dist/_chunks/{description-list-BKQMUiXv.js → description-list-DkLeHiew.js} +2 -2
  66. package/dist/_chunks/{dev-bypass-button-Y1s7gPSD.js → dev-bypass-button-BhGn6evf.js} +2 -2
  67. package/dist/_chunks/{document-preview-C_6R_VZK.js → document-preview-uoTekVR7.js} +5 -5
  68. package/dist/_chunks/{document-scanner-pADVX447.js → document-scanner-CQS9kv84.js} +17 -17
  69. package/dist/_chunks/{dropdown-menu-B5mgV1kV.js → dropdown-menu-BQSNVp4x.js} +2 -2
  70. package/dist/_chunks/{due-date-calculator-mDvGKmRV.js → due-date-calculator-DXDJbUzo.js} +8 -8
  71. package/dist/_chunks/{editable-currency-cell-renderer-CfFp_1hI.js → editable-currency-cell-renderer-CmYcMuwi.js} +4 -4
  72. package/dist/_chunks/{editable-description-CCrAEJMq.js → editable-description-DuJlvltc.js} +3 -3
  73. package/dist/_chunks/editor-overlay-NMxzcO6J.js +90 -0
  74. package/dist/_chunks/{email-input-DQixfopu.js → email-input-C7THAwh2.js} +3 -3
  75. package/dist/_chunks/{empty-state-CgvmPPvW.js → empty-state-gNG3qYCX.js} +2 -2
  76. package/dist/_chunks/{entity-card-D1Yrh9wf.js → entity-card-fpm-KUKc.js} +26 -27
  77. package/dist/_chunks/{entity-summary-C3E4JKVr.js → entity-summary-DcB0fIiv.js} +5 -5
  78. package/dist/_chunks/{error-boundary-Bzjk9Q2l.js → error-boundary-ChowhO6w.js} +2 -2
  79. package/dist/_chunks/error-page-CpuYbpOB.js +344 -0
  80. package/dist/_chunks/{error-page-illustration-bFti0VEc.js → error-page-illustration-BdJLuMdV.js} +12 -12
  81. package/dist/_chunks/error-summary-BhM8FEkl.js +101 -0
  82. package/dist/_chunks/{face-scheme-Doodi6A6.js → face-scheme-BicuUA2K.js} +8 -8
  83. package/dist/_chunks/{fetal-weight-DBgEaMoJ.js → fetal-weight-BWaqqjea.js} +5 -5
  84. package/dist/_chunks/{field-array-DGiIHCdy.js → field-array-BO-kaKFK.js} +3 -3
  85. package/dist/_chunks/{file-manager-BDNSnr7f.js → file-manager-dIJQUZvq.js} +52 -52
  86. package/dist/_chunks/{finished-terminal-BguGAUdg.js → finished-terminal-CPSDrIMB.js} +3 -3
  87. package/dist/_chunks/{fiscal-code-input-DNA_SbQx.js → fiscal-code-input-DesSQ6Fh.js} +168 -168
  88. package/dist/_chunks/floating-clearance-nIx9fFLy.js +20 -0
  89. package/dist/_chunks/forgot-password-form-DEx-M_QR.js +234 -0
  90. package/dist/_chunks/{form-field-Db0liyI8.js → form-field-Ani72sVY.js} +46 -44
  91. package/dist/_chunks/format-price-BKle6Xwt.js +52 -0
  92. package/dist/_chunks/{freemium-paywall-CtUCj-ND.js → freemium-paywall-B6ojVXq7.js} +44 -42
  93. package/dist/_chunks/{gestational-age-calculator-BVBz_5dm.js → gestational-age-calculator-BfGpt3du.js} +9 -9
  94. package/dist/_chunks/glass-surface-CPok0jEe.js +20 -0
  95. package/dist/_chunks/{hcg-doubling-BECrAUu3.js → hcg-doubling-BIYyI2Yo.js} +7 -7
  96. package/dist/_chunks/{header--a4ZTiM5.js → header-B9552pLh.js} +15 -14
  97. package/dist/_chunks/{header-settings-kkVm9VP3.js → header-settings-ge_3gYEq.js} +4 -4
  98. package/dist/_chunks/heatmap-BARGZZt2.js +2865 -0
  99. package/dist/_chunks/{help-me-write-templates-B4Y8dBv1.js → help-me-write-templates-B7L3zGsE.js} +28 -28
  100. package/dist/_chunks/{hover-card-CcRSI4gy.js → hover-card-BnTueNS2.js} +2 -2
  101. package/dist/_chunks/{iban-input-CpOUMMR-.js → iban-input-B9L2QDHh.js} +2 -2
  102. package/dist/_chunks/{icon-button-mKIvw90h.js → icon-button-COX76Jdj.js} +2 -2
  103. package/dist/_chunks/{icon-button-group-BsQkbCX4.js → icon-button-group-C5hhI-R5.js} +3 -3
  104. package/dist/_chunks/{icon-picker-JZzs1ol_.js → icon-picker-DWrqmI1c.js} +20 -20
  105. package/dist/_chunks/{image-cropper-CNBGkG7P.js → image-cropper-D0kkQ4lG.js} +2 -2
  106. package/dist/_chunks/{info-tip-Czh1izZ6.js → info-tip-B0jmIt6M.js} +2 -2
  107. package/dist/_chunks/{input-surface-xyERuLU_.js → input-surface-iBmxVBfr.js} +11 -12
  108. package/dist/_chunks/{insert-result-BuWQl11Z.js → insert-result-C1C2OCc3.js} +2 -2
  109. package/dist/_chunks/intl-locale-ySteXlDD.js +23 -0
  110. package/dist/_chunks/{kbd-BLovyx1R.js → kbd-Bx7eQv9f.js} +70 -66
  111. package/dist/_chunks/{key-value-pair-BkXjt88Z.js → key-value-pair-Ax8IJr1M.js} +2 -2
  112. package/dist/_chunks/{kit-extensions-GQHKTLWI.js → kit-extensions-C9-v8Dih.js} +6 -6
  113. package/dist/_chunks/{link-cell-renderer-D-xv2HMS.js → link-cell-renderer-DlBVPMTi.js} +9 -9
  114. package/dist/_chunks/{locale-picker-BhNIgeXA.js → locale-picker-DfNSdOpy.js} +4 -4
  115. package/dist/_chunks/login-dev-card-DmZ1B0lB.js +309 -0
  116. package/dist/_chunks/{logo-CuaqxTGK.js → logo-hIsyVE96.js} +19 -19
  117. package/dist/_chunks/{map-view-CQmqQJwK.js → map-view-CO2v0hfp.js} +9 -9
  118. package/dist/_chunks/{marketplace-app-shell-DbEfoNxe.js → marketplace-app-shell-Dcx-JEjg.js} +11 -11
  119. package/dist/_chunks/{message-card-C1buKlzM.js → message-card-DVo8-dOm.js} +36 -28
  120. package/dist/_chunks/{message-tray-DyBVqlGj.js → message-tray-BB95DA82.js} +5 -5
  121. package/dist/_chunks/{money-GypsuFk2.js → money-CeClE1nH.js} +2 -2
  122. package/dist/_chunks/multi-select-BT23EnSA.js +688 -0
  123. package/dist/_chunks/{muscle-scheme-DfYQ0Z3v.js → muscle-scheme-BDgIaGeW.js} +2 -2
  124. package/dist/_chunks/{nav-grid-BPbmzHY0.js → nav-grid-BqCPH8sm.js} +16 -17
  125. package/dist/_chunks/{notes-panel-DWJY3WV8.js → notes-panel-I8ntrrUW.js} +54 -53
  126. package/dist/_chunks/{notification-card-DubeUbVJ.js → notification-card-BGCIL6Mu.js} +56 -48
  127. package/dist/_chunks/{notification-tray-DJ0gtfu6.js → notification-tray-__sJXnsz.js} +5 -5
  128. package/dist/_chunks/{number-input-DRDRYZJg.js → number-input-CVwI1ltI.js} +2 -2
  129. package/dist/_chunks/{operator-hero-BnBPxwOi.js → operator-hero-Dyd2IGbR.js} +4 -4
  130. package/dist/_chunks/{optical-prescription-DBvebioV.js → optical-prescription-Do6e3wfs.js} +5 -5
  131. package/dist/_chunks/option-row-Dc7BrbK8.js +37 -0
  132. package/dist/_chunks/{otp-input-BedEqmIV.js → otp-input-CGMu30_e.js} +2 -2
  133. package/dist/_chunks/{pagination-CzEkpfti.js → pagination-BR1_GfD_.js} +2 -2
  134. package/dist/_chunks/{panel-subview-D8HGXaUa.js → panel-subview-BT-Apwgb.js} +3 -3
  135. package/dist/_chunks/{parse-DeDYl04y.js → parse-jZ-i8Xgj.js} +2 -2
  136. package/dist/_chunks/{password-input-6Yl6x1IO.js → password-input-BokZ_rnT.js} +162 -140
  137. package/dist/_chunks/{patient-details-D7QlsGK1.js → patient-details-DsTtjpuX.js} +6 -6
  138. package/dist/_chunks/{patient-field-row-Dr-ndtG8.js → patient-field-row-BvZ9luz-.js} +212 -211
  139. package/dist/_chunks/{patient-search-Dm3w0jWw.js → patient-search-D5xlXmd2.js} +5 -5
  140. package/dist/_chunks/{patient-summary-card-A3WhxFwp.js → patient-summary-card-3dspc2tR.js} +7 -7
  141. package/dist/_chunks/{payment-automation-upsell-DNiraNhF.js → payment-automation-upsell-DEUfM7EU.js} +5 -5
  142. package/dist/_chunks/{payment-form-B08gHZIY.js → payment-form-v6zZuV1_.js} +60 -56
  143. package/dist/_chunks/{payment-request-card-CR7SjsRs.js → payment-request-card-DAGqh9Yx.js} +5 -5
  144. package/dist/_chunks/{pdf-viewer-zv7pkUPA.js → pdf-viewer-C3minW5b.js} +5 -5
  145. package/dist/_chunks/periodontal-chart-BqwLxy2m.js +1413 -0
  146. package/dist/_chunks/{periodontal-chart-card-Djr3en8Q.js → periodontal-chart-card-CWZ1YM1h.js} +3 -3
  147. package/dist/_chunks/{periodontal-diagnosis-DmVIqXtC.js → periodontal-diagnosis-C9IuvLId.js} +2 -2
  148. package/dist/_chunks/{periodontal-risk-chart-C1Y5f-md.js → periodontal-risk-chart-D3DjIymT.js} +2 -2
  149. package/dist/_chunks/{phone-input-BzeUr49H.js → phone-input-DxkHMYmu.js} +139 -139
  150. package/dist/_chunks/{popover-9_v-7fJc.js → popover-BI3oV3eY.js} +2 -2
  151. package/dist/_chunks/{postal-code-input-lCk8me6K.js → postal-code-input-CfZOnIkW.js} +2 -2
  152. package/dist/_chunks/{practice-profile-hero-Bc3AyBiM.js → practice-profile-hero-C8RPACCi.js} +3 -3
  153. package/dist/_chunks/{practice-results-D3liWOz1.js → practice-results-DxOgbPDy.js} +9 -9
  154. package/dist/_chunks/{pregnancy-dating-BEmsMys4.js → pregnancy-dating-R3q5n1Wh.js} +10 -10
  155. package/dist/_chunks/{pregnancy-weight-gain-DMVPvM3a.js → pregnancy-weight-gain-DwmNklDU.js} +5 -5
  156. package/dist/_chunks/{privacy-lock-KDPKiTpH.js → privacy-lock-WkUgwIj_.js} +4 -4
  157. package/dist/_chunks/{privacy-mask-H8yYwgIb.js → privacy-mask-ChIjELJC.js} +3 -3
  158. package/dist/_chunks/{product-hub-panel-M5X3TYzq.js → product-hub-panel-BSSiGGG4.js} +49 -49
  159. package/dist/_chunks/{progress-TIAsNHQW.js → progress-D_g_Sl2g.js} +3 -5
  160. package/dist/_chunks/{province-select-DtF2ukoC.js → province-select-Bd20Z9Br.js} +2 -2
  161. package/dist/_chunks/{public-footer-Bfs81Qzp.js → public-footer-CxpG6J1M.js} +93 -90
  162. package/dist/_chunks/{public-header.agent-CrXkGtTF.js → public-header.agent-BWusjxY8.js} +3 -3
  163. package/dist/_chunks/{qr-code-Ofx7ryyu.js → qr-code-DHEma21c.js} +47 -48
  164. package/dist/_chunks/{radiograph-panel.agent-rS3Tegx6.js → radiograph-panel.agent-BA90I3Mu.js} +8 -8
  165. package/dist/_chunks/registration-form-D7iNqMBF.js +819 -0
  166. package/dist/_chunks/{reviews-panel-CyxZ0VmZ.js → reviews-panel-CDcK6W3b.js} +6 -6
  167. package/dist/_chunks/{rich-text-editor-DmnWavgl.js → rich-text-editor-Blp4smUr.js} +791 -799
  168. package/dist/_chunks/{scroll-area-BZOvUhwQ.js → scroll-area-ZtFCv9K7.js} +56 -46
  169. package/dist/_chunks/{search-bar-ORcfuK9A.js → search-bar-DQJS0wJN.js} +209 -199
  170. package/dist/_chunks/search-input-BAlDd05M.js +246 -0
  171. package/dist/_chunks/{section-card-XR2bW1Ie.js → section-card-ChJdOlBU.js} +2 -2
  172. package/dist/_chunks/{select-DHPmASkG.js → select-Ce5RMk93.js} +274 -236
  173. package/dist/_chunks/{session-countdown-DWUVDDox.js → session-countdown-CBINYw8H.js} +3 -3
  174. package/dist/_chunks/{sheet-BTgxkDJS.js → sheet-CNFW8mYZ.js} +3 -3
  175. package/dist/_chunks/{sidebar-2GBc0ZUa.js → sidebar-DLsG2AIk.js} +123 -124
  176. package/dist/_chunks/{sign-document-B_3U-S6g.js → sign-document-B6HlyCGV.js} +22 -22
  177. package/dist/_chunks/{sign-in-with-alfadocs-button-DFmgQuDo.js → sign-in-with-alfadocs-button-D91_x8DX.js} +4 -4
  178. package/dist/_chunks/{signature-capture-F6KViBF_.js → signature-capture-Chqh62Pc.js} +19 -20
  179. package/dist/_chunks/{signature-field-DLDznGnB.js → signature-field-Y01UB5DA.js} +2 -2
  180. package/dist/_chunks/{signature-request-BdolmJk4.js → signature-request-rgMsgo-C.js} +8 -8
  181. package/dist/_chunks/{signed-out-frame-dz1rLJ65.js → signed-out-frame-B2GTIeqA.js} +51 -51
  182. package/dist/_chunks/sliders-horizontal-D-F97cnE.js +22 -0
  183. package/dist/_chunks/{slot-grid-kCDoV3k4.js → slot-grid-sVZriOiQ.js} +4 -4
  184. package/dist/_chunks/{social-sign-in-button-BMGNlUWs.js → social-sign-in-button-yUqwhnPZ.js} +2 -2
  185. package/dist/_chunks/{spinner-a0FTYX9Q.js → spinner-CoflYlEx.js} +2 -2
  186. package/dist/_chunks/{stat-Ce9ymEKm.js → stat-51CDL4au.js} +25 -26
  187. package/dist/_chunks/state-backed-text-input-DECQy5aA.js +12 -0
  188. package/dist/_chunks/{stepper-accordion-BPNS6J6B.js → stepper-accordion-D7lnBGh2.js} +49 -49
  189. package/dist/_chunks/{streaming-text-BAPn_sZs.js → streaming-text-BKZmbW1Q.js} +31 -32
  190. package/dist/_chunks/subDays-DlMw8Xng.js +8 -0
  191. package/dist/_chunks/{tab-bar-DRKiomgj.js → tab-bar-Bm-rJB7Y.js} +7 -8
  192. package/dist/_chunks/{tabs-yIY-RySP.js → tabs-I2wf_nC7.js} +3 -3
  193. package/dist/_chunks/{task-card-C02Km4Gb.js → task-card-BMXMh3uE.js} +9 -9
  194. package/dist/_chunks/{task-editor-i-juLk76.js → task-editor-Ctxsa1BY.js} +155 -157
  195. package/dist/_chunks/{task-tray-By6DPwbT.js → task-tray-DsBO-AaP.js} +31 -31
  196. package/dist/_chunks/{tasks-panel-BkN9sROF.js → tasks-panel-CdgZQQgG.js} +130 -131
  197. package/dist/_chunks/{text-area-CDuItrvL.js → text-area-COMVJ1yE.js} +106 -96
  198. package/dist/_chunks/text-input-CaG9ApoE.js +333 -0
  199. package/dist/_chunks/{theme-toggle-BAHz3itd.js → theme-toggle-PpFcFoYK.js} +4 -4
  200. package/dist/_chunks/time-picker-DVfyAR81.js +871 -0
  201. package/dist/_chunks/{timeline-CVLjybJ3.js → timeline-DG8wAlAx.js} +3 -3
  202. package/dist/_chunks/{toast-UMUvXFsA.js → toast-CPqguP7G.js} +2 -2
  203. package/dist/_chunks/{token-insert-menu-DgtBIbNu.js → token-insert-menu-B-pWFDKX.js} +3 -3
  204. package/dist/_chunks/{tool-rail-CwXN-sDC.js → tool-rail-Bwyuw_Ot.js} +113 -110
  205. package/dist/_chunks/{tooth-scheme-BAMhwCZe.js → tooth-scheme-BAO_voUO.js} +97 -97
  206. package/dist/_chunks/{transcript-panel-jOCW4Ycl.js → transcript-panel-CjsiDB1K.js} +4 -4
  207. package/dist/_chunks/{treatment-receipt-DF2Slh-x.js → treatment-receipt-BSVOfStA.js} +2 -2
  208. package/dist/_chunks/{typing-indicator-BmwMQSxw.js → typing-indicator-B1RkE8jD.js} +16 -15
  209. package/dist/_chunks/{unit-converter-Bvhj9r3m.js → unit-converter-DS4UB_59.js} +5 -5
  210. package/dist/_chunks/{use-appointment-details-read-B6dBBgDa.js → use-appointment-details-read-DinTrRIW.js} +214 -214
  211. package/dist/_chunks/use-dom-value-DTxHhQAN.js +16 -0
  212. package/dist/_chunks/{use-prism-DaspP8w-.js → use-prism-DBOiELx7.js} +9 -9
  213. package/dist/_chunks/use-registration-submit-eWAECgUC.js +171 -0
  214. package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +59 -0
  215. package/dist/_chunks/voice-control-panel-Bg1eklL0.js +1009 -0
  216. package/dist/_chunks/{wallet-pay-button-Dew8Pmgq.js → wallet-pay-button-DFP5FW0D.js} +2 -2
  217. package/dist/_chunks/{warning-stack-B_v_qMBI.js → warning-stack-ubD0IZCy.js} +25 -25
  218. package/dist/_chunks/{widget-picker-Ck8HTsil.js → widget-picker-D8RiWrJd.js} +38 -38
  219. package/dist/_chunks/{workflow-map-PzamnfJK.js → workflow-map-D3mezmGB.js} +8 -8
  220. package/dist/_chunks/{workflow-status-DDnsIrLt.js → workflow-status-BT27_fQp.js} +3 -3
  221. package/dist/agent-catalog.json +584 -14
  222. package/dist/agent-i18n/en.json +51 -10
  223. package/dist/components/_shared/ai-fab-pill.d.ts +18 -0
  224. package/dist/components/_shared/floating-clearance.d.ts +12 -0
  225. package/dist/components/_shared/glass-surface.d.ts +22 -0
  226. package/dist/components/_shared/input-surface.d.ts +1 -1
  227. package/dist/components/_shared/intl-locale.d.ts +7 -0
  228. package/dist/components/_shared/option-row.d.ts +30 -0
  229. package/dist/components/_shared/option.d.ts +2 -0
  230. package/dist/components/_shared/state-backed-text-input.d.ts +16 -0
  231. package/dist/components/_shared/use-dom-value.d.ts +20 -0
  232. package/dist/components/_shared/use-state-backed-input.d.ts +31 -0
  233. package/dist/components/accordion/index.js +1 -1
  234. package/dist/components/address-autocomplete/index.js +1 -1
  235. package/dist/components/address-fields/address-fields.d.ts +4 -0
  236. package/dist/components/address-fields/index.js +1 -1
  237. package/dist/components/agenda-card/index.js +1 -1
  238. package/dist/components/agenda-tray/index.js +1 -1
  239. package/dist/components/ai-credits-notice/index.js +1 -1
  240. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +34 -0
  241. package/dist/components/ai-permission-notice/index.d.ts +1 -1
  242. package/dist/components/ai-permission-notice/index.js +1 -1
  243. package/dist/components/ai-prompt-input/index.js +1 -1
  244. package/dist/components/anamnesis-card/index.js +1 -1
  245. package/dist/components/anamnesis-summary-card/index.js +1 -1
  246. package/dist/components/app-frame/index.js +1 -1
  247. package/dist/components/appointment-card/index.js +2 -2
  248. package/dist/components/appointment-details-panel/index.js +1 -1
  249. package/dist/components/appointment-peek/index.js +1 -1
  250. package/dist/components/appointment-timeline/index.js +1 -1
  251. package/dist/components/audio-recorder/index.js +1 -1
  252. package/dist/components/autocomplete/index.js +1 -1
  253. package/dist/components/avatar/index.js +1 -1
  254. package/dist/components/benefit-card/index.js +1 -1
  255. package/dist/components/bishop-score/index.js +1 -1
  256. package/dist/components/bmi-calculator/index.js +1 -1
  257. package/dist/components/booking/booking-types.d.ts +10 -5
  258. package/dist/components/booking/index.js +1 -1
  259. package/dist/components/booking/payment.d.ts +19 -0
  260. package/dist/components/button/index.js +2 -2
  261. package/dist/components/button-group/index.js +1 -1
  262. package/dist/components/calendar/index.js +1 -1
  263. package/dist/components/card/index.js +1 -1
  264. package/dist/components/care-plan-card/index.js +1 -1
  265. package/dist/components/care-plan-entry-card/index.js +1 -1
  266. package/dist/components/care-plan-header/index.js +1 -1
  267. package/dist/components/carousel/index.js +1 -1
  268. package/dist/components/chart/index.js +1 -1
  269. package/dist/components/chat-container/index.js +1 -1
  270. package/dist/components/chat-input/index.js +1 -1
  271. package/dist/components/chat-message/index.js +1 -1
  272. package/dist/components/city-input/index.js +1 -1
  273. package/dist/components/clinical-note-card/index.js +1 -1
  274. package/dist/components/collapsible/index.js +1 -1
  275. package/dist/components/color-picker/index.js +1 -1
  276. package/dist/components/combobox/combobox.d.ts +6 -0
  277. package/dist/components/combobox/index.js +1 -1
  278. package/dist/components/connection-status/index.js +1 -1
  279. package/dist/components/contact-card/index.js +1 -1
  280. package/dist/components/contact-profile-card/index.js +1 -1
  281. package/dist/components/control-room-rail/index.js +1 -1
  282. package/dist/components/copy-field/index.js +1 -1
  283. package/dist/components/country-select/index.js +1 -1
  284. package/dist/components/cycle-calculator/index.js +1 -1
  285. package/dist/components/dashboard-grid/index.js +1 -1
  286. package/dist/components/data-table/index.js +4 -4
  287. package/dist/components/data-table-tabs/index.js +1 -1
  288. package/dist/components/date-picker/date-picker.d.ts +3 -3
  289. package/dist/components/date-picker/index.js +1 -1
  290. package/dist/components/date-range-picker/date-range-picker.d.ts +3 -3
  291. package/dist/components/date-range-picker/index.js +1 -1
  292. package/dist/components/date-time-picker/index.js +1 -1
  293. package/dist/components/dependent-selector/index.js +1 -1
  294. package/dist/components/description-list/index.js +1 -1
  295. package/dist/components/dev-bypass-button/index.js +1 -1
  296. package/dist/components/document-preview/index.js +1 -1
  297. package/dist/components/document-scanner/index.js +1 -1
  298. package/dist/components/dropdown-menu/index.js +1 -1
  299. package/dist/components/due-date-calculator/index.js +2 -2
  300. package/dist/components/editable-description/index.js +1 -1
  301. package/dist/components/editor-overlay/index.js +1 -1
  302. package/dist/components/email-input/email-input.d.ts +1 -1
  303. package/dist/components/email-input/index.js +1 -1
  304. package/dist/components/empty-state/index.js +1 -1
  305. package/dist/components/entity-summary/index.js +1 -1
  306. package/dist/components/error-boundary/index.js +1 -1
  307. package/dist/components/error-summary/error-summary.d.ts +50 -0
  308. package/dist/components/error-summary/index.d.ts +2 -0
  309. package/dist/components/error-summary/index.js +5 -0
  310. package/dist/components/face-scheme/index.js +1 -1
  311. package/dist/components/fetal-weight/index.js +1 -1
  312. package/dist/components/field-array/index.js +1 -1
  313. package/dist/components/file-manager/index.js +1 -1
  314. package/dist/components/finished-terminal/index.js +1 -1
  315. package/dist/components/fiscal-code-input/index.js +1 -1
  316. package/dist/components/form-field/form-field.d.ts +9 -0
  317. package/dist/components/form-field/index.js +1 -1
  318. package/dist/components/freemium-paywall/index.js +1 -1
  319. package/dist/components/gestational-age-calculator/index.js +1 -1
  320. package/dist/components/hcg-doubling/index.js +1 -1
  321. package/dist/components/header/index.js +1 -1
  322. package/dist/components/header-settings/index.js +1 -1
  323. package/dist/components/heatmap/heatmap-context.d.ts +21 -0
  324. package/dist/components/heatmap/heatmap-format.d.ts +59 -0
  325. package/dist/components/heatmap/heatmap-grid.d.ts +66 -0
  326. package/dist/components/heatmap/heatmap-legend.d.ts +36 -0
  327. package/dist/components/heatmap/heatmap-model.d.ts +152 -0
  328. package/dist/components/heatmap/heatmap-scale.d.ts +125 -0
  329. package/dist/components/heatmap/heatmap-table-view.d.ts +35 -0
  330. package/dist/components/heatmap/heatmap-tooltip.d.ts +40 -0
  331. package/dist/components/heatmap/heatmap-variants.d.ts +87 -0
  332. package/dist/components/heatmap/heatmap-window.d.ts +54 -0
  333. package/dist/components/heatmap/heatmap.agent.d.ts +4 -0
  334. package/dist/components/heatmap/heatmap.d.ts +186 -0
  335. package/dist/components/heatmap/index.d.ts +8 -0
  336. package/dist/components/heatmap/index.js +8 -0
  337. package/dist/components/hover-card/index.js +1 -1
  338. package/dist/components/iban-input/index.js +1 -1
  339. package/dist/components/icon-button/index.js +1 -1
  340. package/dist/components/icon-button-group/index.js +1 -1
  341. package/dist/components/icon-picker/index.js +1 -1
  342. package/dist/components/image-cropper/index.js +1 -1
  343. package/dist/components/index.d.ts +3 -0
  344. package/dist/components/info-tip/index.js +1 -1
  345. package/dist/components/kbd/index.js +1 -1
  346. package/dist/components/key-value-pair/index.js +1 -1
  347. package/dist/components/locale-picker/index.js +1 -1
  348. package/dist/components/logo/index.js +1 -1
  349. package/dist/components/map-view/index.js +1 -1
  350. package/dist/components/message-card/index.js +1 -1
  351. package/dist/components/message-tray/index.js +1 -1
  352. package/dist/components/money/index.js +1 -1
  353. package/dist/components/multi-select/index.js +1 -1
  354. package/dist/components/multi-select/multi-select.d.ts +6 -0
  355. package/dist/components/muscle-scheme/index.js +1 -1
  356. package/dist/components/nav-grid/index.js +1 -1
  357. package/dist/components/notes-panel/index.js +1 -1
  358. package/dist/components/notification-card/index.js +1 -1
  359. package/dist/components/notification-tray/index.js +1 -1
  360. package/dist/components/number-input/index.js +1 -1
  361. package/dist/components/operator-hero/index.js +1 -1
  362. package/dist/components/optical-prescription/index.js +1 -1
  363. package/dist/components/otp-input/index.js +1 -1
  364. package/dist/components/pagination/index.js +1 -1
  365. package/dist/components/panel-subview/index.js +1 -1
  366. package/dist/components/password-input/index.js +1 -1
  367. package/dist/components/patient-details/index.js +1 -1
  368. package/dist/components/patient-search/index.js +1 -1
  369. package/dist/components/patient-summary-card/index.js +1 -1
  370. package/dist/components/patient-table/index.js +1 -1
  371. package/dist/components/payment-card/index.js +1 -1
  372. package/dist/components/payment-form/index.js +1 -1
  373. package/dist/components/pdf-viewer/index.js +1 -1
  374. package/dist/components/periodontal-chart/index.d.ts +1 -1
  375. package/dist/components/periodontal-chart/index.js +1 -1
  376. package/dist/components/periodontal-chart/periodontal-chart.d.ts +44 -1
  377. package/dist/components/periodontal-chart-card/index.js +1 -1
  378. package/dist/components/periodontal-diagnosis/index.js +1 -1
  379. package/dist/components/periodontal-risk-chart/index.js +1 -1
  380. package/dist/components/phone-input/index.js +1 -1
  381. package/dist/components/popover/index.js +1 -1
  382. package/dist/components/postal-code-input/index.js +1 -1
  383. package/dist/components/practice-profile-hero/index.js +1 -1
  384. package/dist/components/practice-results/index.js +1 -1
  385. package/dist/components/pregnancy-dating/index.js +1 -1
  386. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  387. package/dist/components/privacy-lock/index.js +1 -1
  388. package/dist/components/product-hub-tray/index.js +1 -1
  389. package/dist/components/progress/index.js +1 -1
  390. package/dist/components/province-select/index.js +1 -1
  391. package/dist/components/public-footer/index.js +1 -1
  392. package/dist/components/public-header/index.js +1 -1
  393. package/dist/components/qr-code/index.js +1 -1
  394. package/dist/components/radiograph-panel/index.js +1 -1
  395. package/dist/components/reviews-panel/index.js +1 -1
  396. package/dist/components/rich-text-editor/index.js +2 -2
  397. package/dist/components/rich-text-editor/rich-text-editor.d.ts +5 -20
  398. package/dist/components/scroll-area/index.js +1 -1
  399. package/dist/components/scroll-area/scroll-area.d.ts +17 -1
  400. package/dist/components/search-bar/index.js +1 -1
  401. package/dist/components/search-input/index.js +1 -1
  402. package/dist/components/section-card/index.js +1 -1
  403. package/dist/components/select/index.js +1 -1
  404. package/dist/components/select/select.d.ts +41 -0
  405. package/dist/components/session-countdown/index.js +1 -1
  406. package/dist/components/sheet/index.js +1 -1
  407. package/dist/components/sidebar/index.js +1 -1
  408. package/dist/components/sign-document/index.js +1 -1
  409. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  410. package/dist/components/signature-capture/index.js +1 -1
  411. package/dist/components/signature-field/index.js +1 -1
  412. package/dist/components/skeleton-scheme/index.js +1 -1
  413. package/dist/components/slot-grid/index.js +1 -1
  414. package/dist/components/social-sign-in-button/index.js +1 -1
  415. package/dist/components/spinner/index.js +1 -1
  416. package/dist/components/stat/index.js +1 -1
  417. package/dist/components/stepper-accordion/index.js +1 -1
  418. package/dist/components/streaming-text/index.js +1 -1
  419. package/dist/components/tab-bar/index.js +1 -1
  420. package/dist/components/tabs/index.js +1 -1
  421. package/dist/components/task-card/index.js +1 -1
  422. package/dist/components/task-editor/index.js +1 -1
  423. package/dist/components/task-tray/index.js +1 -1
  424. package/dist/components/tasks-panel/index.js +1 -1
  425. package/dist/components/text-area/index.js +1 -1
  426. package/dist/components/text-input/index.js +1 -1
  427. package/dist/components/theme-toggle/index.js +1 -1
  428. package/dist/components/time-picker/index.js +1 -1
  429. package/dist/components/time-picker/time-picker.d.ts +26 -5
  430. package/dist/components/timeline/index.js +1 -1
  431. package/dist/components/toast/index.js +1 -1
  432. package/dist/components/token-insert-menu/index.js +1 -1
  433. package/dist/components/tool-rail/index.js +1 -1
  434. package/dist/components/tooth-scheme/index.js +1 -1
  435. package/dist/components/transcript-panel/index.js +1 -1
  436. package/dist/components/treatment-receipt/index.js +1 -1
  437. package/dist/components/typing-indicator/index.js +1 -1
  438. package/dist/components/unit-converter/index.js +1 -1
  439. package/dist/components/voice-control-panel/index.d.ts +5 -0
  440. package/dist/components/voice-control-panel/index.js +6 -0
  441. package/dist/components/voice-control-panel/voice-control-panel.agent.d.ts +4 -0
  442. package/dist/components/voice-control-panel/voice-control-panel.d.ts +179 -0
  443. package/dist/components/wallet-pay-button/index.js +1 -1
  444. package/dist/components/warning-stack/index.js +1 -1
  445. package/dist/components/widget-picker/index.js +1 -1
  446. package/dist/components/workflow/index.js +1 -1
  447. package/dist/components/workflow-status/index.js +2 -2
  448. package/dist/error-pages/400.ar.html +1 -1
  449. package/dist/error-pages/400.de.html +1 -1
  450. package/dist/error-pages/400.el.html +1 -1
  451. package/dist/error-pages/400.en.html +1 -1
  452. package/dist/error-pages/400.es.html +1 -1
  453. package/dist/error-pages/400.fr.html +1 -1
  454. package/dist/error-pages/400.hi.html +1 -1
  455. package/dist/error-pages/400.html +1 -1
  456. package/dist/error-pages/400.it.html +1 -1
  457. package/dist/error-pages/400.ja.html +1 -1
  458. package/dist/error-pages/400.nl.html +1 -1
  459. package/dist/error-pages/400.pl.html +1 -1
  460. package/dist/error-pages/400.pt.html +1 -1
  461. package/dist/error-pages/400.ro.html +1 -1
  462. package/dist/error-pages/400.ru.html +1 -1
  463. package/dist/error-pages/400.sq.html +1 -1
  464. package/dist/error-pages/400.sv.html +1 -1
  465. package/dist/error-pages/400.tr.html +1 -1
  466. package/dist/error-pages/400.zh.html +1 -1
  467. package/dist/error-pages/410.ar.html +1 -1
  468. package/dist/error-pages/410.de.html +1 -1
  469. package/dist/error-pages/410.el.html +1 -1
  470. package/dist/error-pages/410.en.html +1 -1
  471. package/dist/error-pages/410.es.html +1 -1
  472. package/dist/error-pages/410.fr.html +1 -1
  473. package/dist/error-pages/410.hi.html +1 -1
  474. package/dist/error-pages/410.html +1 -1
  475. package/dist/error-pages/410.it.html +1 -1
  476. package/dist/error-pages/410.ja.html +1 -1
  477. package/dist/error-pages/410.nl.html +1 -1
  478. package/dist/error-pages/410.pl.html +1 -1
  479. package/dist/error-pages/410.pt.html +1 -1
  480. package/dist/error-pages/410.ro.html +1 -1
  481. package/dist/error-pages/410.ru.html +1 -1
  482. package/dist/error-pages/410.sq.html +1 -1
  483. package/dist/error-pages/410.sv.html +1 -1
  484. package/dist/error-pages/410.tr.html +1 -1
  485. package/dist/error-pages/410.zh.html +1 -1
  486. package/dist/error-pages/419.ar.html +1 -1
  487. package/dist/error-pages/419.de.html +1 -1
  488. package/dist/error-pages/419.el.html +1 -1
  489. package/dist/error-pages/419.en.html +1 -1
  490. package/dist/error-pages/419.es.html +1 -1
  491. package/dist/error-pages/419.fr.html +1 -1
  492. package/dist/error-pages/419.hi.html +1 -1
  493. package/dist/error-pages/419.html +1 -1
  494. package/dist/error-pages/419.it.html +1 -1
  495. package/dist/error-pages/419.ja.html +1 -1
  496. package/dist/error-pages/419.nl.html +1 -1
  497. package/dist/error-pages/419.pl.html +1 -1
  498. package/dist/error-pages/419.pt.html +1 -1
  499. package/dist/error-pages/419.ro.html +1 -1
  500. package/dist/error-pages/419.ru.html +1 -1
  501. package/dist/error-pages/419.sq.html +1 -1
  502. package/dist/error-pages/419.sv.html +1 -1
  503. package/dist/error-pages/419.tr.html +1 -1
  504. package/dist/error-pages/419.zh.html +1 -1
  505. package/dist/error-pages/429.ar.html +1 -1
  506. package/dist/error-pages/429.de.html +1 -1
  507. package/dist/error-pages/429.el.html +1 -1
  508. package/dist/error-pages/429.en.html +1 -1
  509. package/dist/error-pages/429.es.html +1 -1
  510. package/dist/error-pages/429.fr.html +1 -1
  511. package/dist/error-pages/429.hi.html +1 -1
  512. package/dist/error-pages/429.html +1 -1
  513. package/dist/error-pages/429.it.html +1 -1
  514. package/dist/error-pages/429.ja.html +1 -1
  515. package/dist/error-pages/429.nl.html +1 -1
  516. package/dist/error-pages/429.pl.html +1 -1
  517. package/dist/error-pages/429.pt.html +1 -1
  518. package/dist/error-pages/429.ro.html +1 -1
  519. package/dist/error-pages/429.ru.html +1 -1
  520. package/dist/error-pages/429.sq.html +1 -1
  521. package/dist/error-pages/429.sv.html +1 -1
  522. package/dist/error-pages/429.tr.html +1 -1
  523. package/dist/error-pages/429.zh.html +1 -1
  524. package/dist/hooks/index.js +1 -1
  525. package/dist/host-compat.css +9 -2
  526. package/dist/host-legacy.css +86 -0
  527. package/dist/i18n/locales/ar.d.ts +117 -1
  528. package/dist/i18n/locales/ar.js +118 -2
  529. package/dist/i18n/locales/de.d.ts +117 -1
  530. package/dist/i18n/locales/de.js +118 -2
  531. package/dist/i18n/locales/el.d.ts +117 -1
  532. package/dist/i18n/locales/el.js +118 -2
  533. package/dist/i18n/locales/en.d.ts +117 -1
  534. package/dist/i18n/locales/en.js +118 -2
  535. package/dist/i18n/locales/es.d.ts +117 -1
  536. package/dist/i18n/locales/es.js +118 -2
  537. package/dist/i18n/locales/fr.d.ts +117 -1
  538. package/dist/i18n/locales/fr.js +118 -2
  539. package/dist/i18n/locales/hi.d.ts +117 -1
  540. package/dist/i18n/locales/hi.js +118 -2
  541. package/dist/i18n/locales/it.d.ts +117 -1
  542. package/dist/i18n/locales/it.js +118 -2
  543. package/dist/i18n/locales/ja.d.ts +117 -1
  544. package/dist/i18n/locales/ja.js +118 -2
  545. package/dist/i18n/locales/nl.d.ts +117 -1
  546. package/dist/i18n/locales/nl.js +118 -2
  547. package/dist/i18n/locales/pl.d.ts +117 -1
  548. package/dist/i18n/locales/pl.js +118 -2
  549. package/dist/i18n/locales/pt.d.ts +117 -1
  550. package/dist/i18n/locales/pt.js +118 -2
  551. package/dist/i18n/locales/ro.d.ts +117 -1
  552. package/dist/i18n/locales/ro.js +118 -2
  553. package/dist/i18n/locales/ru.d.ts +117 -1
  554. package/dist/i18n/locales/ru.js +118 -2
  555. package/dist/i18n/locales/sq.d.ts +117 -1
  556. package/dist/i18n/locales/sq.js +118 -2
  557. package/dist/i18n/locales/sv.d.ts +117 -1
  558. package/dist/i18n/locales/sv.js +118 -2
  559. package/dist/i18n/locales/tr.d.ts +117 -1
  560. package/dist/i18n/locales/tr.js +118 -2
  561. package/dist/i18n/locales/zh.d.ts +117 -1
  562. package/dist/i18n/locales/zh.js +118 -2
  563. package/dist/index.js +763 -753
  564. package/dist/locales/ar.json +118 -2
  565. package/dist/locales/de.json +118 -2
  566. package/dist/locales/el.json +118 -2
  567. package/dist/locales/en.json +118 -2
  568. package/dist/locales/es.json +118 -2
  569. package/dist/locales/fr.json +118 -2
  570. package/dist/locales/hi.json +118 -2
  571. package/dist/locales/it.json +118 -2
  572. package/dist/locales/ja.json +118 -2
  573. package/dist/locales/nl.json +118 -2
  574. package/dist/locales/pl.json +118 -2
  575. package/dist/locales/pt.json +118 -2
  576. package/dist/locales/ro.json +118 -2
  577. package/dist/locales/ru.json +118 -2
  578. package/dist/locales/sq.json +118 -2
  579. package/dist/locales/sv.json +118 -2
  580. package/dist/locales/tr.json +118 -2
  581. package/dist/locales/zh.json +118 -2
  582. package/dist/patterns/_shared/auth-form-parts.d.ts +4 -0
  583. package/dist/patterns/_shared/use-error-summary.d.ts +34 -0
  584. package/dist/patterns/alia-assistant/index.js +1 -1
  585. package/dist/patterns/anamnesis/index.js +1 -1
  586. package/dist/patterns/calendar/index.js +1 -1
  587. package/dist/patterns/error-page/error-page.d.ts +29 -5
  588. package/dist/patterns/error-page/index.js +2 -2
  589. package/dist/patterns/forgot-password-form/forgot-password-form.d.ts +3 -2
  590. package/dist/patterns/forgot-password-form/index.js +1 -1
  591. package/dist/patterns/help-me-write-templates/index.js +1 -1
  592. package/dist/patterns/login-form/index.js +1 -1
  593. package/dist/patterns/login-form/login-form.d.ts +5 -4
  594. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  595. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  596. package/dist/patterns/registration-form/index.js +1 -1
  597. package/dist/patterns/registration-form/registration-form.d.ts +3 -2
  598. package/dist/patterns/signature-request/index.js +1 -1
  599. package/dist/patterns/signed-out-frame/index.js +1 -1
  600. package/dist/tokens.css +10 -13
  601. package/package.json +19 -2
  602. package/dist/_chunks/address-fields-BaClzQLM.js +0 -292
  603. package/dist/_chunks/city-input-BL5WsGJ3.js +0 -170
  604. package/dist/_chunks/editor-overlay-CWV0chPV.js +0 -93
  605. package/dist/_chunks/error-page-C15GfNEj.js +0 -312
  606. package/dist/_chunks/forgot-password-form-Duu3pZDU.js +0 -203
  607. package/dist/_chunks/format-price-DAbh61Lz.js +0 -51
  608. package/dist/_chunks/intl-locale-CXM-B8EP.js +0 -16
  609. package/dist/_chunks/login-dev-card-DletSsX3.js +0 -275
  610. package/dist/_chunks/multi-select-CVb6PJOK.js +0 -638
  611. package/dist/_chunks/periodontal-chart-5nLsSuRM.js +0 -1305
  612. package/dist/_chunks/registration-form-Lz9iKrKo.js +0 -759
  613. package/dist/_chunks/search-input-6SoR2Rf4.js +0 -237
  614. package/dist/_chunks/subDays-XBMBTVOO.js +0 -8
  615. package/dist/_chunks/text-input-rzLEKhRU.js +0 -331
  616. package/dist/_chunks/time-picker-DKKmpFh3.js +0 -425
  617. package/dist/_chunks/use-registration-submit-DxCWic5_.js +0 -141
@@ -0,0 +1,2865 @@
1
+ import { jsx as v, jsxs as P, Fragment as La } from "react/jsx-runtime";
2
+ import { useContext as Ea, createContext as Aa, useId as Ka, useRef as $, useMemo as _, useState as le, useCallback as C, useEffect as gt, memo as Ca, forwardRef as fa, lazy as va, Suspense as Ha } from "react";
3
+ import { useTranslation as Ht } from "react-i18next";
4
+ import { u as Oa } from "./registry-DvAUVLHh.js";
5
+ import { f as wa } from "./intl-locale-ySteXlDD.js";
6
+ import { B as za } from "./button-Bn16lcFM.js";
7
+ import { E as Va } from "./empty-state-gNG3qYCX.js";
8
+ import { L as Ba } from "./live-region-C41SO3cA.js";
9
+ import { S as jt } from "./skeleton-B1KTdJ4N.js";
10
+ import { T as ba, a as Fa } from "./tooltip-Cp-PLePW.js";
11
+ import { p as Ga } from "./privacy-mask-ChIjELJC.js";
12
+ import { u as Je } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
13
+ import { i as $a } from "./is-development-CLUAnsU7.js";
14
+ import { c as oe } from "./index-D2ZczOXr.js";
15
+ import { C as Da } from "./chevron-down-DWE7GSq9.js";
16
+ import { E as ja } from "./error-boundary-ChowhO6w.js";
17
+ import { c as ya } from "./createLucideIcon-DhHxpK9K.js";
18
+ /**
19
+ * @license lucide-react v1.22.0 - ISC
20
+ *
21
+ * This source code is licensed under the ISC license.
22
+ * See the LICENSE file in the root directory of this source tree.
23
+ */
24
+ const Pa = [
25
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
26
+ ["path", { d: "M3 9h18", key: "1pudct" }],
27
+ ["path", { d: "M3 15h18", key: "5xshup" }],
28
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
29
+ ["path", { d: "M15 3v18", key: "14nvp0" }]
30
+ ], qa = ya("grid-3x3", Pa);
31
+ /**
32
+ * @license lucide-react v1.22.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */
37
+ const Wa = [
38
+ [
39
+ "path",
40
+ {
41
+ d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
42
+ key: "gugj83"
43
+ }
44
+ ]
45
+ ], Ua = ya("table-2", Wa), ut = {
46
+ type: "object",
47
+ properties: {
48
+ rowId: { type: "string", description: "Row id, from rowIds." },
49
+ columnId: {
50
+ type: ["string", "number"],
51
+ description: "Column id, from columnIds."
52
+ }
53
+ },
54
+ required: ["rowId", "columnId"]
55
+ }, Ya = {
56
+ id: "heatmap",
57
+ capabilities: [
58
+ "select_single",
59
+ "select_multiple",
60
+ "range_pick",
61
+ "expand",
62
+ "sort",
63
+ "view_change"
64
+ ],
65
+ state: {
66
+ selection: {
67
+ type: "Array<{ rowId, columnId }>",
68
+ descriptionKey: "ui.agent.heatmap.state.selection",
69
+ description: "Row and column ids of the selected cells.",
70
+ read: (e) => e.getSelection()
71
+ },
72
+ selectionMode: {
73
+ type: "'none' | 'single' | 'multiple' | 'range'",
74
+ descriptionKey: "ui.agent.heatmap.state.selectionMode",
75
+ description: "How cells can be selected in this heatmap.",
76
+ read: (e) => e.getSelectionMode()
77
+ },
78
+ view: {
79
+ type: "'heatmap' | 'table'",
80
+ descriptionKey: "ui.agent.heatmap.state.view",
81
+ description: "Whether the heatmap or its table view is showing.",
82
+ read: (e) => e.getView()
83
+ },
84
+ sortRows: {
85
+ type: "'none' | 'label' | 'total-asc' | 'total-desc'",
86
+ descriptionKey: "ui.agent.heatmap.state.sortRows",
87
+ description: "Current row order.",
88
+ read: (e) => e.getSortRows()
89
+ },
90
+ rowIds: {
91
+ type: "string[]",
92
+ descriptionKey: "ui.agent.heatmap.state.rowIds",
93
+ description: "Row ids in display order, every group expanded. Opaque, never a label.",
94
+ read: (e) => e.getRowIds()
95
+ },
96
+ columnIds: {
97
+ type: "Array<string | number>",
98
+ descriptionKey: "ui.agent.heatmap.state.columnIds",
99
+ description: "Column ids in order. Opaque, never a label.",
100
+ read: (e) => e.getColumnIds()
101
+ },
102
+ groupIds: {
103
+ type: "string[]",
104
+ descriptionKey: "ui.agent.heatmap.state.groupIds",
105
+ description: "Group ids in display order, empty unless rows are grouped. A group not listed in `groups` shows as group-1, group-2 and so on.",
106
+ read: (e) => e.getGroupIds()
107
+ },
108
+ collapsedGroups: {
109
+ type: "string[]",
110
+ descriptionKey: "ui.agent.heatmap.state.collapsedGroups",
111
+ description: "Ids (as in groupIds) of the row groups that are collapsed.",
112
+ read: (e) => e.getCollapsedGroups()
113
+ }
114
+ },
115
+ actions: {
116
+ select_cell: {
117
+ safety: "read",
118
+ argsType: "{ rowId: string, columnId: string | number }",
119
+ argsSchema: ut,
120
+ idempotent: !0,
121
+ descriptionKey: "ui.agent.heatmap.actions.selectCell",
122
+ description: "Make one cell the whole selection.",
123
+ errors: [
124
+ 'Selection is off (selection="none").',
125
+ "The row or column id does not exist."
126
+ ],
127
+ examples: [
128
+ {
129
+ args: { rowId: "chair-1", columnId: 10 },
130
+ note: "Select chair 1 at 10:00."
131
+ }
132
+ ],
133
+ invoke: (e, t) => {
134
+ e.selectCells([t]);
135
+ }
136
+ },
137
+ select_cells: {
138
+ safety: "read",
139
+ argsType: "{ cells: Array<{ rowId, columnId }> }",
140
+ argsSchema: {
141
+ type: "object",
142
+ properties: {
143
+ cells: {
144
+ type: "array",
145
+ items: ut,
146
+ description: "Cells to select; replaces the selection. Single mode keeps the first."
147
+ }
148
+ },
149
+ required: ["cells"]
150
+ },
151
+ idempotent: !0,
152
+ descriptionKey: "ui.agent.heatmap.actions.selectCells",
153
+ description: "Replace the selection with the given cells.",
154
+ errors: [
155
+ 'Selection is off (selection="none").',
156
+ "A row or column id does not exist; nothing is selected."
157
+ ],
158
+ invoke: (e, t) => {
159
+ e.selectCells(t.cells);
160
+ }
161
+ },
162
+ select_range: {
163
+ safety: "read",
164
+ argsType: "{ from: { rowId, columnId }, to: { rowId, columnId } }",
165
+ argsSchema: {
166
+ type: "object",
167
+ properties: {
168
+ from: { ...ut, description: "One corner, inclusive." },
169
+ to: { ...ut, description: "The opposite corner, inclusive." }
170
+ },
171
+ required: ["from", "to"]
172
+ },
173
+ idempotent: !0,
174
+ descriptionKey: "ui.agent.heatmap.actions.selectRange",
175
+ description: "Select the rectangle of cells between two corners, in the rows as shown.",
176
+ errors: [
177
+ 'Needs selection="range" or "multiple".',
178
+ "A corner names a row or column that does not exist."
179
+ ],
180
+ invoke: (e, t) => {
181
+ e.selectRange(t.from, t.to);
182
+ }
183
+ },
184
+ clear_selection: {
185
+ safety: "read",
186
+ idempotent: !0,
187
+ descriptionKey: "ui.agent.heatmap.actions.clearSelection",
188
+ description: "Deselect every cell.",
189
+ errors: ['Selection is off (selection="none").'],
190
+ invoke: (e) => {
191
+ e.clearSelection();
192
+ }
193
+ },
194
+ read_cell: {
195
+ safety: "read",
196
+ argsType: "{ rowId: string, columnId: string | number }",
197
+ argsSchema: ut,
198
+ returns: "{ value, count, status, step } | null",
199
+ returnsSchema: {
200
+ type: ["object", "null"],
201
+ properties: {
202
+ value: { type: ["number", "null"] },
203
+ count: { type: "number" },
204
+ status: { enum: ["value", "empty", "low-sample"] },
205
+ step: { type: ["number", "null"] }
206
+ }
207
+ },
208
+ idempotent: !0,
209
+ descriptionKey: "ui.agent.heatmap.actions.readCell",
210
+ description: "Read a cell's value, count, status and colour step (no labels).",
211
+ invoke: (e, t) => e.readCell(t)
212
+ },
213
+ toggle_table_view: {
214
+ safety: "read",
215
+ descriptionKey: "ui.agent.heatmap.actions.toggleTableView",
216
+ description: "Switch between the heatmap and its table view.",
217
+ returns: "'heatmap' | 'table'",
218
+ returnsSchema: { enum: ["heatmap", "table"] },
219
+ invoke: (e) => {
220
+ const t = e.getView() === "table" ? "heatmap" : "table";
221
+ return e.setView(t), t;
222
+ }
223
+ },
224
+ set_view: {
225
+ safety: "read",
226
+ argsType: "{ view: 'heatmap' | 'table' }",
227
+ argsSchema: {
228
+ type: "object",
229
+ properties: {
230
+ view: {
231
+ enum: ["heatmap", "table"],
232
+ description: "The coloured grid, or the same data as a table."
233
+ }
234
+ },
235
+ required: ["view"]
236
+ },
237
+ idempotent: !0,
238
+ descriptionKey: "ui.agent.heatmap.actions.setView",
239
+ description: "Show the heatmap or its table view.",
240
+ invoke: (e, t) => {
241
+ e.getView() !== t.view && e.setView(t.view);
242
+ }
243
+ },
244
+ sort_rows: {
245
+ safety: "read",
246
+ argsType: "{ sort: 'none' | 'label' | 'total-asc' | 'total-desc' }",
247
+ argsSchema: {
248
+ type: "object",
249
+ properties: {
250
+ sort: {
251
+ enum: ["none", "label", "total-asc", "total-desc"],
252
+ description: "Row order within each group: as given, by label, or by row total."
253
+ }
254
+ },
255
+ required: ["sort"]
256
+ },
257
+ idempotent: !0,
258
+ descriptionKey: "ui.agent.heatmap.actions.sortRows",
259
+ description: "Reorder the rows.",
260
+ invoke: (e, t) => {
261
+ e.setSortRows(t.sort);
262
+ }
263
+ },
264
+ expand_group: {
265
+ safety: "read",
266
+ argsType: "{ groupId: string }",
267
+ argsSchema: {
268
+ type: "object",
269
+ properties: {
270
+ groupId: { type: "string", description: "Group id, from groupIds." }
271
+ },
272
+ required: ["groupId"]
273
+ },
274
+ idempotent: !0,
275
+ descriptionKey: "ui.agent.heatmap.actions.expandGroup",
276
+ description: "Show a group's rows.",
277
+ errors: [
278
+ "Rows are not grouped (groupRows is off).",
279
+ "The group id does not exist (see groupIds)."
280
+ ],
281
+ invoke: (e, t) => {
282
+ e.setGroupCollapsed(t.groupId, !1);
283
+ }
284
+ },
285
+ collapse_group: {
286
+ safety: "read",
287
+ argsType: "{ groupId: string }",
288
+ argsSchema: {
289
+ type: "object",
290
+ properties: {
291
+ groupId: { type: "string", description: "Group id, from groupIds." }
292
+ },
293
+ required: ["groupId"]
294
+ },
295
+ idempotent: !0,
296
+ descriptionKey: "ui.agent.heatmap.actions.collapseGroup",
297
+ description: "Hide a group's rows, leaving its totals row.",
298
+ errors: [
299
+ "Rows are not grouped (groupRows is off).",
300
+ "The group id does not exist (see groupIds)."
301
+ ],
302
+ invoke: (e, t) => {
303
+ e.setGroupCollapsed(t.groupId, !0);
304
+ }
305
+ }
306
+ },
307
+ domHooks: {
308
+ root: {
309
+ attr: "data-component",
310
+ value: "heatmap",
311
+ description: "Marks the Heatmap root."
312
+ },
313
+ instanceId: {
314
+ attr: "data-component-id",
315
+ sourceProp: "id",
316
+ description: "Sourced from the id prop on Heatmap."
317
+ },
318
+ item: {
319
+ attr: "data-heatmap-cell-id",
320
+ description: 'On every data cell: "<rowId>:<columnId>", built from the opaque ids, never from labels. A group header row and its cells carry data-heatmap-group-id, the group id as in groupIds.'
321
+ }
322
+ }
323
+ }, Tt = Aa(null);
324
+ function xa() {
325
+ return Ea(Tt);
326
+ }
327
+ function Ia(e, t) {
328
+ const a = new Intl.NumberFormat(
329
+ e,
330
+ t === "rate" ? { style: "percent", maximumFractionDigits: 0 } : { maximumFractionDigits: 2 }
331
+ );
332
+ return (o) => a.format(o);
333
+ }
334
+ function ka(e) {
335
+ const t = new Intl.NumberFormat(e, { maximumFractionDigits: 0 });
336
+ return (a) => t.format(a);
337
+ }
338
+ const Ja = "–";
339
+ function Qa({
340
+ t: e,
341
+ privacyMode: t,
342
+ privacyScope: a = "rows",
343
+ valueType: o,
344
+ formatValue: s,
345
+ formatCount: c,
346
+ groups: l
347
+ }) {
348
+ const b = new Map(l == null ? void 0 : l.map((p) => [p.id, p.label])), w = Ga(), m = t, x = t && a === "all", k = t && a === "all", g = (p) => p.status === "empty" ? e("heatmap.noData") : p.status === "low-sample" ? e("heatmap.lowSample") : p.label !== void 0 && !t ? p.label : p.value === null ? e("heatmap.noData") : s(p.value), M = (p) => p.count === void 0 ? null : o === "rate" && p.status === "value" && p.value !== null ? e("heatmap.countOf", {
349
+ part: c(Math.round(p.value * p.count)),
350
+ total: c(p.count)
351
+ }) : e("heatmap.records", {
352
+ count: p.count,
353
+ formatted: c(p.count)
354
+ });
355
+ return {
356
+ masksRows: m,
357
+ masksColumns: x,
358
+ masksGroups: k,
359
+ rowLabel: (p) => m ? w : p.label,
360
+ columnLabel: (p) => x ? w : p.label,
361
+ // A group missing from `groups` has only its id to show, which may be a
362
+ // name, so privacy mode masks it whatever the scope.
363
+ groupLabel: (p) => k ? w : b.get(p) ?? (t ? w : p),
364
+ cellName: (p, E) => e("heatmap.cellName", { row: p, column: E }),
365
+ groupRowText: (p, E) => e("heatmap.groupRow", {
366
+ group: p,
367
+ method: e(E === "sum" ? "heatmap.totals.sum" : "heatmap.totals.mean")
368
+ }),
369
+ tableText: (p) => {
370
+ const E = p.status === "empty" ? null : M(p), D = g(p);
371
+ return E === null ? D : e("heatmap.valueWithCount", { value: D, count: E });
372
+ },
373
+ methodLabel: (p) => e(p === "sum" ? "heatmap.totals.sum" : "heatmap.totals.mean"),
374
+ valueText: g,
375
+ visibleText: (p) => p.status === "empty" ? Ja : p.status === "low-sample" ? "" : g(p),
376
+ countText: M,
377
+ sentence: (p, E, D) => {
378
+ const A = M(D), I = g(D);
379
+ return A === null || D.status === "empty" ? e("heatmap.cell", { row: p, column: E, value: I }) : e("heatmap.cellWithCount", {
380
+ row: p,
381
+ column: E,
382
+ value: I,
383
+ count: A
384
+ });
385
+ },
386
+ formatValue: s
387
+ };
388
+ }
389
+ const be = 10, Xt = Math.floor(be / 2), Qe = be - 1, Ye = be / 2, Ze = (e, t, a) => Math.min(a, Math.max(t, e)), aa = /* @__PURE__ */ new Set();
390
+ function Pt(e) {
391
+ !$a() || aa.has(e) || (aa.add(e), console.warn(`Heatmap: ${e}`));
392
+ }
393
+ function ra(e) {
394
+ return e[0] <= e[1] ? e : (Pt(
395
+ `scale domain [${e[0]}, ${e[1]}] is reversed; using [${e[1]}, ${e[0]}].`
396
+ ), [e[1], e[0]]);
397
+ }
398
+ function Sa(e) {
399
+ const t = e.filter(Number.isFinite).sort((a, o) => a - o);
400
+ return t.filter((a, o) => o === 0 || a !== t[o - 1]);
401
+ }
402
+ function Xa(e) {
403
+ let t = 1 / 0, a = -1 / 0;
404
+ for (const o of e)
405
+ Number.isFinite(o) && (o < t && (t = o), o > a && (a = o));
406
+ return t === 1 / 0 ? null : [t, a];
407
+ }
408
+ function Za(e, t, a) {
409
+ if (!(a > t)) return Xt;
410
+ const o = Ze((e - t) / (a - t), 0, 1);
411
+ return Math.min(Qe, Math.floor(o * be));
412
+ }
413
+ function er(e, t, a, o) {
414
+ if (e < a) {
415
+ const l = a - t, b = l > 0 ? Ze((a - e) / l, 0, 1) : 1;
416
+ return Ye - 1 - Math.min(Ye - 1, Math.floor(b * Ye));
417
+ }
418
+ const s = o - a, c = s > 0 ? Ze((e - a) / s, 0, 1) : e > a ? 1 : 0;
419
+ return Ye + Math.min(Ye - 1, Math.floor(c * Ye));
420
+ }
421
+ function tr(e, t) {
422
+ if (e.type !== "diverging" || e.midpoint === void 0) return !1;
423
+ const a = Math.max(
424
+ Math.abs(e.midpoint),
425
+ Math.abs(e.min ?? 0),
426
+ Math.abs(e.max ?? 0)
427
+ );
428
+ return Math.abs(t - e.midpoint) <= a * Number.EPSILON * 16;
429
+ }
430
+ function ar(e, t) {
431
+ const a = e.length;
432
+ if (a === 0) return NaN;
433
+ if (a === 1) return e[0];
434
+ const o = Ze(t, 0, 1) * (a - 1), s = Math.floor(o), c = Math.min(a - 1, s + 1);
435
+ return e[s] + (e[c] - e[s]) * (o - s);
436
+ }
437
+ function rr(e, t) {
438
+ const a = Math.max(1, Math.round(t)), o = [];
439
+ for (let s = 1; s < a; s += 1)
440
+ o.push(ar(e, s / a));
441
+ return o;
442
+ }
443
+ function nr(e, t) {
444
+ if (e.length === 0) return [];
445
+ const a = e[0], o = (s) => {
446
+ let c = 0, l = e.length - 1;
447
+ for (; c < l; ) {
448
+ const b = c + l >>> 1;
449
+ e[b] < s ? c = b + 1 : l = b;
450
+ }
451
+ return e[c];
452
+ };
453
+ return Sa(
454
+ rr(e, t).map(o)
455
+ ).filter((s) => s > a);
456
+ }
457
+ function na(e, t) {
458
+ let a = 0, o = t.length;
459
+ for (; a < o; ) {
460
+ const s = a + o >>> 1;
461
+ t[s] <= e ? a = s + 1 : o = s;
462
+ }
463
+ return a;
464
+ }
465
+ function qt(e, t) {
466
+ return t <= 1 ? Xt : Math.round(
467
+ Ze(e, 0, t - 1) * Qe / (t - 1)
468
+ );
469
+ }
470
+ function Wt(e, t) {
471
+ const a = Xa(t);
472
+ switch (e.type) {
473
+ case "diverging": {
474
+ const o = e.domain && e.domain !== "auto" ? ra(e.domain) : null, s = e.midpoint ?? (o && (o[0] > 0 || o[1] < 0) ? (o[0] + o[1]) / 2 : 0);
475
+ let c, l;
476
+ if (o)
477
+ [c, l] = o;
478
+ else {
479
+ const b = a ? Math.max(
480
+ Math.abs(a[0] - s),
481
+ Math.abs(a[1] - s)
482
+ ) : 0;
483
+ c = s - b, l = s + b;
484
+ }
485
+ return {
486
+ type: "diverging",
487
+ min: c,
488
+ max: l,
489
+ midpoint: s,
490
+ thresholds: [],
491
+ stepOf: (b) => er(b, c, s, l)
492
+ };
493
+ }
494
+ case "quantile": {
495
+ const o = t.filter(Number.isFinite).slice().sort((l, b) => l - b), s = Ze(
496
+ Math.round(e.buckets ?? be),
497
+ 2,
498
+ be
499
+ ), c = nr(o, s);
500
+ return {
501
+ type: "quantile",
502
+ min: (a == null ? void 0 : a[0]) ?? null,
503
+ max: (a == null ? void 0 : a[1]) ?? null,
504
+ thresholds: c,
505
+ stepOf: (l) => qt(na(l, c), c.length + 1)
506
+ };
507
+ }
508
+ case "threshold": {
509
+ const o = e.thresholds.filter(Number.isFinite), s = Sa(o);
510
+ s.length !== o.length && Pt("duplicate thresholds merged."), s.length > Qe && Pt(
511
+ `${s.length} thresholds given; ten steps take at most ${Qe}, so the highest ${s.length - Qe} are dropped.`
512
+ );
513
+ const c = s.slice(0, Qe);
514
+ return {
515
+ type: "threshold",
516
+ min: (a == null ? void 0 : a[0]) ?? null,
517
+ max: (a == null ? void 0 : a[1]) ?? null,
518
+ thresholds: c,
519
+ stepOf: (l) => qt(na(l, c), c.length + 1)
520
+ };
521
+ }
522
+ case "sequential":
523
+ default: {
524
+ const o = e.domain && e.domain !== "auto" ? ra(e.domain) : null, s = o ? o[0] : (a == null ? void 0 : a[0]) ?? null, c = o ? o[1] : (a == null ? void 0 : a[1]) ?? null;
525
+ return {
526
+ type: "sequential",
527
+ min: s,
528
+ max: c,
529
+ thresholds: [],
530
+ stepOf: (l) => s === null || c === null ? Xt : Za(l, s, c)
531
+ };
532
+ }
533
+ }
534
+ }
535
+ function or(e) {
536
+ let t = 0, a = !1, o = 0, s = !1;
537
+ for (const c of e)
538
+ c.value === null || !Number.isFinite(c.value) || (t += c.value, a = !0, c.count !== void 0 && (o += c.count, s = !0));
539
+ return { value: a ? t : null, count: s ? o : void 0 };
540
+ }
541
+ function sr(e) {
542
+ let t = 0, a = 0, o = 0, s = !1;
543
+ for (const c of e) {
544
+ if (c.value === null || !Number.isFinite(c.value)) continue;
545
+ const l = c.count ?? 1;
546
+ t += c.value * l, a += l, c.count !== void 0 && (o += c.count, s = !0);
547
+ }
548
+ return {
549
+ value: a > 0 ? t / a : null,
550
+ count: s ? o : void 0
551
+ };
552
+ }
553
+ function pt(e, t) {
554
+ return t === "sum" ? or(e) : sr(e);
555
+ }
556
+ function ir(e, t) {
557
+ const a = new Set(t == null ? void 0 : t.map((l) => l.id)), o = new Set(a), s = /* @__PURE__ */ new Map();
558
+ let c = 0;
559
+ for (const l of e) {
560
+ const b = l.group;
561
+ if (b === void 0 || s.has(b)) continue;
562
+ if (a.has(b)) {
563
+ s.set(b, b);
564
+ continue;
565
+ }
566
+ let w;
567
+ do
568
+ c += 1, w = `group-${c}`;
569
+ while (o.has(w));
570
+ o.add(w), s.set(b, w);
571
+ }
572
+ return s;
573
+ }
574
+ function Zt(e, t) {
575
+ return t !== void 0 && e !== void 0 && e < t;
576
+ }
577
+ function lr(e, t) {
578
+ if (e == null)
579
+ return { value: null, status: "empty" };
580
+ const a = typeof e == "number" ? { value: e } : e, o = a.value === null || !Number.isFinite(a.value) ? null : a.value, s = o === null ? "empty" : Zt(a.count, t) ? "low-sample" : "value";
581
+ return { value: o, count: a.count, label: a.label, status: s };
582
+ }
583
+ function dr(e, t, a, o, s) {
584
+ return e.map(
585
+ (c, l) => t.map(
586
+ (b, w) => {
587
+ var m;
588
+ return lr(
589
+ a ? a(c, b, l, w) : (m = o == null ? void 0 : o[l]) == null ? void 0 : m[w],
590
+ s
591
+ );
592
+ }
593
+ )
594
+ );
595
+ }
596
+ function cr(e) {
597
+ const t = [];
598
+ for (const a of e)
599
+ for (const o of a)
600
+ o.status === "value" && o.value !== null && t.push(o.value);
601
+ return t;
602
+ }
603
+ function ur(e) {
604
+ return e.some((t) => t.some((a) => a.status !== "empty"));
605
+ }
606
+ function pr(e, t, a, o, s, c) {
607
+ const l = e.map((k) => pt(k, o)), b = [];
608
+ for (let k = 0; k < a; k += 1)
609
+ b.push(
610
+ pt(
611
+ e.map((g) => g[k]),
612
+ s
613
+ )
614
+ );
615
+ const w = /* @__PURE__ */ new Map();
616
+ t.forEach((k, g) => {
617
+ if (k.group === void 0) return;
618
+ const M = w.get(k.group) ?? [];
619
+ M.push(g), w.set(k.group, M);
620
+ });
621
+ const m = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
622
+ for (const [k, g] of w) {
623
+ const M = [];
624
+ for (let p = 0; p < a; p += 1)
625
+ M.push(
626
+ pt(
627
+ g.map((E) => e[E][p]),
628
+ c
629
+ )
630
+ );
631
+ m.set(k, M), x.set(
632
+ k,
633
+ pt(
634
+ g.flatMap((p) => e[p]),
635
+ o
636
+ )
637
+ );
638
+ }
639
+ return {
640
+ rows: l,
641
+ columns: b,
642
+ grand: pt(e.flat(), o),
643
+ groupColumns: m,
644
+ groups: x
645
+ };
646
+ }
647
+ const Bt = (e) => `d:${e}`, mr = (e) => `g:${e}`, Mt = "f";
648
+ function hr(e, t, a, o, s) {
649
+ const c = [...e];
650
+ if (o === "label")
651
+ return c.sort((l, b) => s.compare(t[l].label, t[b].label));
652
+ if (o === "total-asc" || o === "total-desc") {
653
+ const l = o === "total-asc" ? 1 : -1;
654
+ return c.sort((b, w) => {
655
+ var k, g;
656
+ const m = (k = a[b]) == null ? void 0 : k.value, x = (g = a[w]) == null ? void 0 : g.value;
657
+ return m == null ? x == null ? 0 : 1 : x == null ? -1 : (m - x) * l;
658
+ });
659
+ }
660
+ return c;
661
+ }
662
+ function oa(e, t, a, o) {
663
+ var w;
664
+ if (!a)
665
+ return t.map((m) => ({
666
+ kind: "data",
667
+ key: Bt(e[m].id),
668
+ rowIndex: m,
669
+ groupId: e[m].group
670
+ }));
671
+ const s = [], c = /* @__PURE__ */ new Map(), l = [];
672
+ e.forEach((m) => {
673
+ m.group !== void 0 && !c.has(m.group) && (c.set(m.group, []), s.push(m.group));
674
+ });
675
+ for (const m of t) {
676
+ const x = e[m].group;
677
+ x === void 0 ? l.push(m) : (w = c.get(x)) == null || w.push(m);
678
+ }
679
+ const b = [];
680
+ for (const m of s) {
681
+ const x = c.get(m) ?? [], k = o.has(m);
682
+ if (b.push({
683
+ kind: "group",
684
+ key: mr(m),
685
+ groupId: m,
686
+ collapsed: k,
687
+ rowIndexes: x
688
+ }), !k)
689
+ for (const g of x)
690
+ b.push({
691
+ kind: "data",
692
+ key: Bt(e[g].id),
693
+ rowIndex: g,
694
+ groupId: m
695
+ });
696
+ }
697
+ for (const m of l)
698
+ b.push({ kind: "data", key: Bt(e[m].id), rowIndex: m });
699
+ return b;
700
+ }
701
+ function Na({
702
+ cell: e,
703
+ label: t,
704
+ open: a,
705
+ onOpenChange: o,
706
+ side: s = "top",
707
+ children: c
708
+ }) {
709
+ const l = xa(), b = t ?? (l == null ? void 0 : l.tooltipText(e)) ?? "";
710
+ return /* @__PURE__ */ v(
711
+ ba,
712
+ {
713
+ label: b,
714
+ open: a,
715
+ onOpenChange: o,
716
+ side: s,
717
+ delayDuration: 0,
718
+ children: c
719
+ }
720
+ );
721
+ }
722
+ Na.displayName = "HeatmapTooltip";
723
+ function sa({
724
+ label: e,
725
+ onOpenChange: t
726
+ }) {
727
+ return /* @__PURE__ */ v(ba, { label: e, open: !0, onOpenChange: t, delayDuration: 0, children: /* @__PURE__ */ v(
728
+ "span",
729
+ {
730
+ "aria-hidden": "true",
731
+ "data-component": "heatmap-tooltip",
732
+ className: "ds:pointer-events-none ds:absolute ds:inset-0"
733
+ }
734
+ ) });
735
+ }
736
+ const gr = 1e3, fr = 3;
737
+ function ia({ offset: e, viewport: t, lead: a, pitch: o, count: s }, c = fr) {
738
+ if (s <= 0) return [0, 0];
739
+ if (!(o > 0)) return [0, s];
740
+ const l = Math.abs(e) - a, b = Math.floor(l / o) - c, w = Math.ceil((l + t) / o) + c, m = Math.max(0, Math.min(s - 1, b)), x = Math.max(m + 1, Math.min(s, w));
741
+ return [m, x];
742
+ }
743
+ function la(e, t, a) {
744
+ const [o, s] = e, c = [];
745
+ for (let l = o; l < s; l += 1) c.push(l);
746
+ return a === null || a < 0 || a >= t ? {
747
+ indexes: c,
748
+ lead: o,
749
+ middle: 0,
750
+ middleAfter: 0,
751
+ tail: Math.max(0, t - s)
752
+ } : a < o ? {
753
+ indexes: [a, ...c],
754
+ lead: a,
755
+ middle: o - a - 1,
756
+ middleAfter: 1,
757
+ tail: Math.max(0, t - s)
758
+ } : a >= s ? {
759
+ indexes: [...c, a],
760
+ lead: o,
761
+ middle: a - s,
762
+ middleAfter: c.length,
763
+ tail: t - a - 1
764
+ } : {
765
+ indexes: c,
766
+ lead: o,
767
+ middle: 0,
768
+ middleAfter: 0,
769
+ tail: Math.max(0, t - s)
770
+ };
771
+ }
772
+ function Rt(e) {
773
+ return {
774
+ indexes: Array.from({ length: e }, (t, a) => a),
775
+ lead: 0,
776
+ middle: 0,
777
+ middleAfter: 0,
778
+ tail: 0
779
+ };
780
+ }
781
+ function da(e, t) {
782
+ if (e.indexes.every((o) => o < t)) return e;
783
+ const a = e.indexes.filter((o) => o < t);
784
+ return {
785
+ indexes: a,
786
+ lead: Math.min(e.lead, t),
787
+ middle: 0,
788
+ middleAfter: 0,
789
+ tail: Math.max(0, t - (a.length + Math.min(e.lead, t)))
790
+ };
791
+ }
792
+ function ca(e, t) {
793
+ return e.lead !== t.lead || e.tail !== t.tail || e.middle !== t.middle || e.indexes.length !== t.indexes.length ? !1 : e.indexes.every((a, o) => a === t.indexes[o]);
794
+ }
795
+ const Ut = (e, t) => `${e}-${Math.min(9, Math.max(0, Math.round(t)))}`, _a = {
796
+ "primary-0": "ds:bg-[var(--heatmap-primary-0)] ds:text-[color:var(--heatmap-primary-0-foreground)]",
797
+ "primary-1": "ds:bg-[var(--heatmap-primary-1)] ds:text-[color:var(--heatmap-primary-1-foreground)]",
798
+ "primary-2": "ds:bg-[var(--heatmap-primary-2)] ds:text-[color:var(--heatmap-primary-2-foreground)]",
799
+ "primary-3": "ds:bg-[var(--heatmap-primary-3)] ds:text-[color:var(--heatmap-primary-3-foreground)]",
800
+ "primary-4": "ds:bg-[var(--heatmap-primary-4)] ds:text-[color:var(--heatmap-primary-4-foreground)]",
801
+ "primary-5": "ds:bg-[var(--heatmap-primary-5)] ds:text-[color:var(--heatmap-primary-5-foreground)]",
802
+ "primary-6": "ds:bg-[var(--heatmap-primary-6)] ds:text-[color:var(--heatmap-primary-6-foreground)]",
803
+ "primary-7": "ds:bg-[var(--heatmap-primary-7)] ds:text-[color:var(--heatmap-primary-7-foreground)]",
804
+ "primary-8": "ds:bg-[var(--heatmap-primary-8)] ds:text-[color:var(--heatmap-primary-8-foreground)]",
805
+ "primary-9": "ds:bg-[var(--heatmap-primary-9)] ds:text-[color:var(--heatmap-primary-9-foreground)]",
806
+ "success-0": "ds:bg-[var(--heatmap-success-0)] ds:text-[color:var(--heatmap-success-0-foreground)]",
807
+ "success-1": "ds:bg-[var(--heatmap-success-1)] ds:text-[color:var(--heatmap-success-1-foreground)]",
808
+ "success-2": "ds:bg-[var(--heatmap-success-2)] ds:text-[color:var(--heatmap-success-2-foreground)]",
809
+ "success-3": "ds:bg-[var(--heatmap-success-3)] ds:text-[color:var(--heatmap-success-3-foreground)]",
810
+ "success-4": "ds:bg-[var(--heatmap-success-4)] ds:text-[color:var(--heatmap-success-4-foreground)]",
811
+ "success-5": "ds:bg-[var(--heatmap-success-5)] ds:text-[color:var(--heatmap-success-5-foreground)]",
812
+ "success-6": "ds:bg-[var(--heatmap-success-6)] ds:text-[color:var(--heatmap-success-6-foreground)]",
813
+ "success-7": "ds:bg-[var(--heatmap-success-7)] ds:text-[color:var(--heatmap-success-7-foreground)]",
814
+ "success-8": "ds:bg-[var(--heatmap-success-8)] ds:text-[color:var(--heatmap-success-8-foreground)]",
815
+ "success-9": "ds:bg-[var(--heatmap-success-9)] ds:text-[color:var(--heatmap-success-9-foreground)]",
816
+ "destructive-0": "ds:bg-[var(--heatmap-destructive-0)] ds:text-[color:var(--heatmap-destructive-0-foreground)]",
817
+ "destructive-1": "ds:bg-[var(--heatmap-destructive-1)] ds:text-[color:var(--heatmap-destructive-1-foreground)]",
818
+ "destructive-2": "ds:bg-[var(--heatmap-destructive-2)] ds:text-[color:var(--heatmap-destructive-2-foreground)]",
819
+ "destructive-3": "ds:bg-[var(--heatmap-destructive-3)] ds:text-[color:var(--heatmap-destructive-3-foreground)]",
820
+ "destructive-4": "ds:bg-[var(--heatmap-destructive-4)] ds:text-[color:var(--heatmap-destructive-4-foreground)]",
821
+ "destructive-5": "ds:bg-[var(--heatmap-destructive-5)] ds:text-[color:var(--heatmap-destructive-5-foreground)]",
822
+ "destructive-6": "ds:bg-[var(--heatmap-destructive-6)] ds:text-[color:var(--heatmap-destructive-6-foreground)]",
823
+ "destructive-7": "ds:bg-[var(--heatmap-destructive-7)] ds:text-[color:var(--heatmap-destructive-7-foreground)]",
824
+ "destructive-8": "ds:bg-[var(--heatmap-destructive-8)] ds:text-[color:var(--heatmap-destructive-8-foreground)]",
825
+ "destructive-9": "ds:bg-[var(--heatmap-destructive-9)] ds:text-[color:var(--heatmap-destructive-9-foreground)]",
826
+ "diverging-0": "ds:bg-[var(--heatmap-diverging-0)] ds:text-[color:var(--heatmap-diverging-0-foreground)]",
827
+ "diverging-1": "ds:bg-[var(--heatmap-diverging-1)] ds:text-[color:var(--heatmap-diverging-1-foreground)]",
828
+ "diverging-2": "ds:bg-[var(--heatmap-diverging-2)] ds:text-[color:var(--heatmap-diverging-2-foreground)]",
829
+ "diverging-3": "ds:bg-[var(--heatmap-diverging-3)] ds:text-[color:var(--heatmap-diverging-3-foreground)]",
830
+ "diverging-4": "ds:bg-[var(--heatmap-diverging-4)] ds:text-[color:var(--heatmap-diverging-4-foreground)]",
831
+ "diverging-5": "ds:bg-[var(--heatmap-diverging-5)] ds:text-[color:var(--heatmap-diverging-5-foreground)]",
832
+ "diverging-6": "ds:bg-[var(--heatmap-diverging-6)] ds:text-[color:var(--heatmap-diverging-6-foreground)]",
833
+ "diverging-7": "ds:bg-[var(--heatmap-diverging-7)] ds:text-[color:var(--heatmap-diverging-7-foreground)]",
834
+ "diverging-8": "ds:bg-[var(--heatmap-diverging-8)] ds:text-[color:var(--heatmap-diverging-8-foreground)]",
835
+ "diverging-9": "ds:bg-[var(--heatmap-diverging-9)] ds:text-[color:var(--heatmap-diverging-9-foreground)]",
836
+ // A value exactly on a diverging scale's midpoint: neutral, so a cell
837
+ // with no change never looks like one with a small change.
838
+ midpoint: "ds:bg-[var(--heatmap-midpoint)] ds:text-[color:var(--heatmap-midpoint-foreground)]",
839
+ empty: "ds:border ds:border-dashed ds:border-[color:var(--heatmap-empty-border)] ds:bg-[var(--heatmap-empty)] ds:text-[color:var(--heatmap-empty-foreground)]",
840
+ "low-sample": "ds:border ds:border-[color:var(--heatmap-empty-border)] ds:bg-[var(--heatmap-low-sample-surface)] ds:bg-[image:var(--heatmap-low-sample)] ds:text-[color:var(--heatmap-empty-foreground)]",
841
+ aggregate: "ds:bg-[var(--muted)] ds:text-[color:var(--foreground)] ds:font-semibold"
842
+ }, ua = oe(
843
+ "ds:flex ds:min-w-0 ds:max-w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-[color:var(--foreground)]"
844
+ ), vr = oe(
845
+ "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]"
846
+ ), wr = oe(
847
+ [
848
+ "ds:relative ds:max-w-full ds:overflow-auto ds:overscroll-contain",
849
+ "ds:max-h-[var(--heatmap-max-block-size)]",
850
+ "ds:bg-[var(--background)]",
851
+ // Keep a cell scrolled into view clear of the sticky header, footer and
852
+ // row-header column. The sizes are measured and set on this element.
853
+ "ds:scroll-pt-[var(--heatmap-sticky-block-start)] ds:scroll-pb-[var(--heatmap-sticky-block-end)] ds:scroll-ps-[var(--heatmap-sticky-inline-start)]"
854
+ ].join(" ")
855
+ ), br = oe(
856
+ // Focusable only to hold focus during a retry; not a control, so no ring.
857
+ "ds:min-w-0 ds:max-w-full ds:outline-none",
858
+ {
859
+ variants: {
860
+ capped: {
861
+ true: "ds:flex ds:h-[var(--heatmap-max-block-size)] ds:flex-col",
862
+ false: "ds:block ds:max-h-[var(--heatmap-max-block-size)]"
863
+ }
864
+ },
865
+ defaultVariants: { capped: !1 }
866
+ }
867
+ ), yr = oe(
868
+ [
869
+ "ds:grid ds:w-max ds:min-w-full",
870
+ "ds:[grid-template-rows:auto] ds:auto-rows-[var(--heatmap-row-track)]",
871
+ "ds:gap-[var(--heatmap-gap)]",
872
+ "ds:outline-none"
873
+ ].join(" "),
874
+ {
875
+ variants: {
876
+ size: {
877
+ sm: "ds:[--heatmap-cell-inline:var(--min-target-size)] ds:[--heatmap-cell-block:var(--min-target-size)]",
878
+ md: "ds:[--heatmap-cell-inline:max(var(--min-target-size),var(--spacing-2xl))] ds:[--heatmap-cell-block:var(--min-target-size)]",
879
+ lg: "ds:[--heatmap-cell-inline:max(var(--min-target-size),calc(var(--spacing-2xl)_+_var(--spacing-md)))] ds:[--heatmap-cell-block:max(var(--min-target-size),var(--spacing-2xl))]"
880
+ },
881
+ density: {
882
+ default: "ds:[--heatmap-gap:var(--spacing-2xs)]",
883
+ compact: "ds:[--heatmap-gap:var(--spacing-none)]"
884
+ },
885
+ virtualised: {
886
+ true: "ds:[--heatmap-track:var(--heatmap-cell-inline)] ds:[--heatmap-row-track:var(--heatmap-cell-block)]",
887
+ false: "ds:[--heatmap-track:minmax(var(--heatmap-cell-inline),1fr)] ds:[--heatmap-row-track:minmax(var(--heatmap-cell-block),auto)]"
888
+ },
889
+ totalsColumn: {
890
+ true: "ds:grid-cols-[max-content_repeat(var(--heatmap-columns),var(--heatmap-track))_max-content]",
891
+ false: "ds:grid-cols-[max-content_repeat(var(--heatmap-columns),var(--heatmap-track))]"
892
+ }
893
+ },
894
+ defaultVariants: {
895
+ size: "md",
896
+ density: "default",
897
+ virtualised: !1,
898
+ totalsColumn: !1
899
+ }
900
+ }
901
+ ), At = oe(
902
+ "ds:col-span-full ds:grid ds:grid-cols-subgrid",
903
+ {
904
+ variants: {
905
+ position: {
906
+ // The header and footer rows stick to the scroll box's block edges,
907
+ // above the row headers that stick to its inline start.
908
+ // Each also covers the row gap on its inner side, so cells
909
+ // scrolling underneath never show through the gap.
910
+ header: "ds:sticky ds:top-0 ds:z-[calc(var(--z-sticky)+1)] ds:bg-[var(--background)] ds:after:pointer-events-none ds:after:absolute ds:after:inset-x-0 ds:after:top-[calc(100%_-_var(--spacing-2xs))] ds:after:h-[calc(var(--heatmap-gap)_+_var(--spacing-2xs))] ds:after:bg-[var(--background)] ds:after:content-['']",
911
+ footer: "ds:sticky ds:bottom-0 ds:z-[calc(var(--z-sticky)+1)] ds:bg-[var(--background)] ds:after:pointer-events-none ds:after:absolute ds:after:inset-x-0 ds:after:bottom-[calc(100%_-_var(--spacing-2xs))] ds:after:h-[calc(var(--heatmap-gap)_+_var(--spacing-2xs))] ds:after:bg-[var(--background)] ds:after:content-['']",
912
+ body: ""
913
+ }
914
+ },
915
+ defaultVariants: { position: "body" }
916
+ }
917
+ ), Xe = oe("ds:pointer-events-none", {
918
+ variants: {
919
+ axis: {
920
+ "row-lead": "ds:col-span-full ds:row-span-[var(--heatmap-row-lead)]",
921
+ "row-middle": "ds:col-span-full ds:row-span-[var(--heatmap-row-middle)]",
922
+ "row-tail": "ds:col-span-full ds:row-span-[var(--heatmap-row-tail)]",
923
+ "col-lead": "ds:col-span-[var(--heatmap-col-lead)]",
924
+ "col-middle": "ds:col-span-[var(--heatmap-col-middle)]",
925
+ // Holds the skipped columns after the window, so the row-totals cell
926
+ // lands in its own track at the end and never next to the window.
927
+ "col-tail": "ds:col-span-[var(--heatmap-col-tail)]"
928
+ }
929
+ }
930
+ }), Ma = "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:data-[highlighted=true]:bg-[var(--muted)] ds:data-[highlighted=true]:text-[color:var(--foreground)]", Ft = oe(
931
+ [
932
+ "ds:flex ds:min-w-0 ds:items-end ds:justify-center ds:text-center",
933
+ "ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
934
+ "type-meta ds:text-[color:var(--muted-foreground)] ds:break-normal ds:[overflow-wrap:anywhere]",
935
+ Ma
936
+ ].join(" "),
937
+ {
938
+ variants: {
939
+ corner: {
940
+ // The top-start corner sticks with the row headers below it.
941
+ true: "ds:sticky ds:start-0 ds:z-[var(--z-sticky)] ds:items-end ds:justify-start ds:text-start ds:bg-[var(--background)] ds:pe-[var(--spacing-sm)]",
942
+ false: ""
943
+ }
944
+ },
945
+ defaultVariants: { corner: !1 }
946
+ }
947
+ ), Yt = oe(
948
+ [
949
+ "ds:sticky ds:start-0 ds:z-[var(--z-sticky)] ds:flex ds:min-w-0 ds:items-center",
950
+ "ds:max-w-[calc(var(--spacing-2xl)*4)] ds:gap-[var(--spacing-xs)]",
951
+ "ds:bg-[var(--background)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-sm)]",
952
+ // Cover the gaps at the inline end and below too, so cells scrolling
953
+ // underneath never show through between row headers.
954
+ "ds:after:pointer-events-none ds:after:absolute ds:after:top-0 ds:after:bottom-[calc(var(--heatmap-gap)*-1)] ds:after:start-full ds:after:w-[var(--heatmap-gap)] ds:after:bg-[var(--background)] ds:after:content-['']",
955
+ // The strip below overlaps its neighbours slightly so a fractional row
956
+ // position never leaves a hairline seam.
957
+ "ds:before:pointer-events-none ds:before:absolute ds:before:inset-x-0 ds:before:top-[calc(100%_-_var(--spacing-2xs))] ds:before:h-[calc(var(--heatmap-gap)_+_var(--spacing-2xs)*2)] ds:before:bg-[var(--background)] ds:before:content-['']",
958
+ "type-body-sm ds:text-start ds:break-normal ds:[overflow-wrap:anywhere]",
959
+ Ma
960
+ ].join(" "),
961
+ {
962
+ variants: {
963
+ kind: {
964
+ data: "",
965
+ group: "ds:font-semibold",
966
+ total: "ds:font-semibold"
967
+ },
968
+ // A virtualised grid needs every row the same height: no wrapping.
969
+ // The label truncates inside its own span (heatmapRowLabelVariants):
970
+ // overflow on the header itself would clip its gap-covering strips.
971
+ virtualised: {
972
+ true: "ds:whitespace-nowrap",
973
+ false: ""
974
+ }
975
+ },
976
+ defaultVariants: { kind: "data", virtualised: !1 }
977
+ }
978
+ ), pa = oe("ds:min-w-0", {
979
+ variants: {
980
+ virtualised: {
981
+ true: "ds:overflow-hidden ds:text-ellipsis",
982
+ false: ""
983
+ }
984
+ },
985
+ defaultVariants: { virtualised: !1 }
986
+ }), Lt = oe(
987
+ [
988
+ "ds:relative ds:flex ds:min-w-0 ds:items-center ds:justify-center",
989
+ "ds:min-h-[var(--heatmap-cell-block)] ds:overflow-hidden ds:px-[var(--spacing-2xs)]",
990
+ "type-meta ds:tabular-nums ds:whitespace-nowrap ds:select-none",
991
+ "ds:forced-colors:[forced-color-adjust:none]",
992
+ "ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-ring",
993
+ "ds:focus-visible:outline-offset-[calc(var(--focus-ring-width)*-1)]",
994
+ "ds:focus-visible:shadow-[inset_0_0_0_calc(var(--focus-ring-width)*2)_var(--background)]",
995
+ "ds:forced-colors:focus-visible:outline-[Highlight]",
996
+ "ds:aria-selected:shadow-[inset_0_0_0_var(--spacing-2xs)_var(--background),inset_0_0_0_calc(var(--spacing-2xs)*2)_var(--foreground),inset_0_0_0_calc(var(--spacing-2xs)*3)_var(--background)]",
997
+ "ds:aria-selected:focus-visible:shadow-[inset_0_0_0_calc(var(--focus-ring-width)_+_var(--spacing-2xs))_var(--background),inset_0_0_0_calc(var(--focus-ring-width)_+_var(--spacing-2xs)*2)_var(--foreground),inset_0_0_0_calc(var(--focus-ring-width)_+_var(--spacing-2xs)*3)_var(--background)]"
998
+ ].join(" "),
999
+ {
1000
+ variants: {
1001
+ tone: _a,
1002
+ interactive: {
1003
+ true: "ds:cursor-pointer",
1004
+ false: "ds:cursor-default"
1005
+ }
1006
+ },
1007
+ defaultVariants: { tone: "empty", interactive: !1 }
1008
+ }
1009
+ ), xr = oe(
1010
+ "ds:flex ds:min-w-0 ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]"
1011
+ ), Ir = oe(
1012
+ "ds:flex ds:w-[calc(var(--spacing-xl)*6)] ds:min-w-0 ds:max-w-full ds:shrink ds:items-stretch",
1013
+ {
1014
+ variants: {
1015
+ variant: {
1016
+ stepped: "ds:gap-[var(--spacing-2xs)]",
1017
+ continuous: "ds:overflow-hidden ds:rounded-[var(--radius-sm)]"
1018
+ }
1019
+ },
1020
+ defaultVariants: { variant: "stepped" }
1021
+ }
1022
+ ), mt = oe(
1023
+ "ds:inline-block ds:forced-colors:[forced-color-adjust:none]",
1024
+ {
1025
+ variants: {
1026
+ tone: _a,
1027
+ shape: {
1028
+ stepped: "ds:h-[var(--spacing-sm)] ds:min-w-0 ds:flex-1 ds:rounded-[var(--radius-sm)]",
1029
+ continuous: "ds:h-[var(--spacing-sm)] ds:min-w-0 ds:flex-1",
1030
+ key: "ds:size-[var(--spacing-md)] ds:shrink-0 ds:rounded-[var(--radius-sm)]",
1031
+ label: "ds:shrink-0 ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:whitespace-nowrap"
1032
+ }
1033
+ },
1034
+ defaultVariants: { tone: "empty", shape: "key" }
1035
+ }
1036
+ ), Ra = "", Kt = (e, t) => `${e}${Ra}${String(t)}`, Et = (e) => {
1037
+ const t = e.indexOf(Ra);
1038
+ return [e.slice(0, t), e.slice(t + 1)];
1039
+ };
1040
+ function kr(e, t, a) {
1041
+ return e.status === "empty" || e.value === null ? "empty" : e.status === "low-sample" ? "low-sample" : tr(t, e.value) ? "midpoint" : Ut(a, t.stepOf(e.value));
1042
+ }
1043
+ function Jt(e, t) {
1044
+ return {
1045
+ value: e.value,
1046
+ count: e.count,
1047
+ status: e.value === null ? "empty" : Zt(e.count, t) ? "low-sample" : "value"
1048
+ };
1049
+ }
1050
+ const Qt = (e) => e.status === "value" ? "aggregate" : e.status;
1051
+ function Ct(e, t) {
1052
+ const a = [];
1053
+ return e.lead > 0 && a.push(
1054
+ /* @__PURE__ */ v(
1055
+ "div",
1056
+ {
1057
+ "aria-hidden": "true",
1058
+ className: Xe({ axis: "col-lead" })
1059
+ },
1060
+ "lead"
1061
+ )
1062
+ ), e.indexes.forEach((o, s) => {
1063
+ e.middle > 0 && s === e.middleAfter && a.push(
1064
+ /* @__PURE__ */ v(
1065
+ "div",
1066
+ {
1067
+ "aria-hidden": "true",
1068
+ className: Xe({ axis: "col-middle" })
1069
+ },
1070
+ "middle"
1071
+ )
1072
+ ), a.push(t(o));
1073
+ }), e.tail > 0 && a.push(
1074
+ /* @__PURE__ */ v(
1075
+ "div",
1076
+ {
1077
+ "aria-hidden": "true",
1078
+ className: Xe({ axis: "col-tail" })
1079
+ },
1080
+ "tail"
1081
+ )
1082
+ ), a;
1083
+ }
1084
+ const Sr = Ca(function({
1085
+ ctx: t,
1086
+ row: a,
1087
+ ariaRowIndex: o,
1088
+ highlighted: s,
1089
+ activeCol: c,
1090
+ tooltipCol: l,
1091
+ selectedCols: b
1092
+ }) {
1093
+ var D, A;
1094
+ const w = t.columns.length, m = _(
1095
+ () => new Set(b === "" ? [] : b.split(",").map(Number)),
1096
+ [b]
1097
+ );
1098
+ if (a.kind === "group") {
1099
+ const I = t.describer.groupLabel(a.groupId), q = t.groupIds.get(a.groupId), H = `${t.idBase}-label-${o}`, L = ((D = t.totals) == null ? void 0 : D.groupColumns.get(a.groupId)) ?? [], ve = (A = t.totals) == null ? void 0 : A.groups.get(a.groupId), j = (V, U, we, ee) => {
1100
+ const y = Jt(V ?? { value: null }, t.minCount), S = we(y);
1101
+ return /* @__PURE__ */ P(
1102
+ "div",
1103
+ {
1104
+ role: "gridcell",
1105
+ "aria-colindex": U + 2,
1106
+ "aria-expanded": !a.collapsed,
1107
+ "aria-label": S,
1108
+ tabIndex: c === U ? 0 : -1,
1109
+ "data-heatmap-group-id": q,
1110
+ className: Lt({
1111
+ tone: Qt(y),
1112
+ interactive: !0
1113
+ }),
1114
+ children: [
1115
+ t.describer.visibleText(y),
1116
+ ee && l === U ? /* @__PURE__ */ v(
1117
+ sa,
1118
+ {
1119
+ label: S,
1120
+ onOpenChange: t.onTooltipOpenChange
1121
+ }
1122
+ ) : null
1123
+ ]
1124
+ },
1125
+ U
1126
+ );
1127
+ }, J = t.describer.groupRowText(
1128
+ I,
1129
+ t.groupColumnMethod
1130
+ );
1131
+ return /* @__PURE__ */ P(
1132
+ "div",
1133
+ {
1134
+ role: "row",
1135
+ "aria-rowindex": o,
1136
+ "data-heatmap-body-row": "",
1137
+ "data-heatmap-group-id": q,
1138
+ className: At({ position: "body" }),
1139
+ children: [
1140
+ /* @__PURE__ */ P(
1141
+ "div",
1142
+ {
1143
+ role: "rowheader",
1144
+ "aria-colindex": 1,
1145
+ "aria-labelledby": H,
1146
+ "data-highlighted": s,
1147
+ className: Yt({
1148
+ kind: "group",
1149
+ virtualised: t.virtualised
1150
+ }),
1151
+ children: [
1152
+ /* @__PURE__ */ v(
1153
+ "button",
1154
+ {
1155
+ type: "button",
1156
+ tabIndex: -1,
1157
+ "aria-expanded": !a.collapsed,
1158
+ "aria-label": a.collapsed ? t.expandLabel(I) : t.collapseLabel(I),
1159
+ onMouseDown: (V) => V.preventDefault(),
1160
+ onClick: () => t.onToggleGroup(a.groupId),
1161
+ className: "ds:inline-flex ds:size-[var(--spacing-lg)] ds:shrink-0 ds:cursor-pointer ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-transparent ds:text-[color:inherit] ds:hover:bg-[var(--muted)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-ring ds:forced-colors:focus-visible:outline-[Highlight]",
1162
+ children: /* @__PURE__ */ v(
1163
+ Da,
1164
+ {
1165
+ "aria-hidden": "true",
1166
+ className: [
1167
+ "ds:size-4 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
1168
+ a.collapsed ? "ds:-rotate-90 ds:rtl:rotate-90" : ""
1169
+ ].join(" ")
1170
+ }
1171
+ )
1172
+ }
1173
+ ),
1174
+ /* @__PURE__ */ v(
1175
+ "span",
1176
+ {
1177
+ id: H,
1178
+ className: pa({
1179
+ virtualised: t.virtualised
1180
+ }),
1181
+ children: I
1182
+ }
1183
+ )
1184
+ ]
1185
+ }
1186
+ ),
1187
+ Ct(
1188
+ t.colWindow,
1189
+ (V) => j(
1190
+ L[V],
1191
+ V,
1192
+ (U) => t.describer.sentence(
1193
+ J,
1194
+ t.describer.columnLabel(t.columns[V]),
1195
+ U
1196
+ ),
1197
+ !0
1198
+ )
1199
+ ),
1200
+ t.rowTotals ? j(
1201
+ ve,
1202
+ w,
1203
+ (V) => t.describer.sentence(
1204
+ I,
1205
+ t.describer.methodLabel(t.rowTotals || "mean"),
1206
+ V
1207
+ ),
1208
+ !1
1209
+ ) : null
1210
+ ]
1211
+ }
1212
+ );
1213
+ }
1214
+ const x = a.rowIndex, k = t.rows[x], g = t.describer.rowLabel(k), M = t.matrix[x], p = (I) => {
1215
+ const q = M[I], H = t.columns[I], L = m.has(I);
1216
+ return /* @__PURE__ */ P(
1217
+ "div",
1218
+ {
1219
+ role: "gridcell",
1220
+ "aria-colindex": I + 2,
1221
+ "aria-label": t.describer.sentence(
1222
+ g,
1223
+ t.describer.columnLabel(H),
1224
+ q
1225
+ ),
1226
+ "aria-describedby": c === I ? t.describedBy : void 0,
1227
+ "aria-selected": t.selectable ? L : void 0,
1228
+ tabIndex: c === I ? 0 : -1,
1229
+ "data-heatmap-cell-id": `${k.id}:${String(H.id)}`,
1230
+ "data-status": q.status,
1231
+ className: Lt({
1232
+ tone: kr(q, t.scale, t.palette),
1233
+ interactive: t.interactive
1234
+ }),
1235
+ children: [
1236
+ t.showValues || q.status === "empty" ? t.describer.visibleText(q) : null,
1237
+ l === I ? /* @__PURE__ */ v(
1238
+ sa,
1239
+ {
1240
+ label: t.tooltipText(t.cellInfo(x, I)),
1241
+ onOpenChange: t.onTooltipOpenChange
1242
+ }
1243
+ ) : null
1244
+ ]
1245
+ },
1246
+ I
1247
+ );
1248
+ };
1249
+ let E = null;
1250
+ if (t.rowTotals && t.totals) {
1251
+ const I = Jt(t.totals.rows[x], t.minCount);
1252
+ E = /* @__PURE__ */ v(
1253
+ "div",
1254
+ {
1255
+ role: "gridcell",
1256
+ "aria-colindex": w + 2,
1257
+ "aria-label": t.describer.sentence(
1258
+ g,
1259
+ t.describer.methodLabel(t.rowTotals),
1260
+ I
1261
+ ),
1262
+ tabIndex: c === w ? 0 : -1,
1263
+ className: Lt({ tone: Qt(I) }),
1264
+ children: t.describer.visibleText(I)
1265
+ }
1266
+ );
1267
+ }
1268
+ return /* @__PURE__ */ P(
1269
+ "div",
1270
+ {
1271
+ role: "row",
1272
+ "aria-rowindex": o,
1273
+ "data-heatmap-body-row": "",
1274
+ "data-heatmap-row-id": k.id,
1275
+ className: At({ position: "body" }),
1276
+ children: [
1277
+ /* @__PURE__ */ v(
1278
+ "div",
1279
+ {
1280
+ role: "rowheader",
1281
+ "aria-colindex": 1,
1282
+ "data-highlighted": s,
1283
+ className: Yt({
1284
+ kind: "data",
1285
+ virtualised: t.virtualised
1286
+ }),
1287
+ children: /* @__PURE__ */ v(
1288
+ "span",
1289
+ {
1290
+ className: pa({ virtualised: t.virtualised }),
1291
+ children: g
1292
+ }
1293
+ )
1294
+ }
1295
+ ),
1296
+ Ct(t.colWindow, p),
1297
+ E
1298
+ ]
1299
+ }
1300
+ );
1301
+ }), Gt = {
1302
+ headerBlock: 48,
1303
+ footerBlock: 0,
1304
+ rowPitch: 46,
1305
+ leadInline: 120,
1306
+ colPitch: 46,
1307
+ viewportBlock: 600,
1308
+ viewportInline: 900
1309
+ }, ma = (e) => Math.max(
1310
+ 1,
1311
+ Math.floor(
1312
+ (e.viewportBlock - e.headerBlock - e.footerBlock) / Math.max(1, e.rowPitch)
1313
+ )
1314
+ );
1315
+ function Nr(e) {
1316
+ const {
1317
+ title: t,
1318
+ rowsLabel: a,
1319
+ rows: o,
1320
+ columns: s,
1321
+ matrix: c,
1322
+ body: l,
1323
+ scale: b,
1324
+ palette: w,
1325
+ describer: m,
1326
+ showValues: x,
1327
+ totals: k,
1328
+ rowTotals: g,
1329
+ columnTotals: M,
1330
+ groupColumnMethod: p,
1331
+ groupIds: E,
1332
+ minCount: D,
1333
+ selectionMode: A,
1334
+ selected: I,
1335
+ columnIndexOfKey: q,
1336
+ interactive: H,
1337
+ virtualised: L,
1338
+ size: ve,
1339
+ density: j,
1340
+ cellInfo: J,
1341
+ tooltipText: V,
1342
+ describeFocused: U,
1343
+ onActivate: we,
1344
+ onRange: ee,
1345
+ onToggleGroup: y
1346
+ } = e, { t: S } = Ht("ui"), ae = Ka(), Q = $(null), Y = $(null), _e = $(null), Oe = $(null), K = s.length, Me = K + (g ? 1 : 0), O = !!(M && k), de = _(
1347
+ () => [
1348
+ ...l.map((n) => n.key),
1349
+ ...O ? [Mt] : []
1350
+ ],
1351
+ [l, O]
1352
+ ), ye = _(() => {
1353
+ const n = /* @__PURE__ */ new Map();
1354
+ return de.forEach((r, d) => n.set(r, d)), n;
1355
+ }, [de]), [F, et] = le(() => ({
1356
+ rowKey: de[0] ?? Mt,
1357
+ col: 0
1358
+ })), te = (() => {
1359
+ const n = ye.get(F.rowKey);
1360
+ if (n !== void 0) return n;
1361
+ const r = o.find((u) => `d:${u.id}` === F.rowKey);
1362
+ return ((r == null ? void 0 : r.group) === void 0 ? void 0 : ye.get(`g:${r.group}`)) ?? 0;
1363
+ })(), z = Math.min(
1364
+ Math.max(0, F.col),
1365
+ Math.max(0, Me - 1)
1366
+ ), ce = de[te], xe = $(!1), [Ie, G] = le(!1), me = $(!1), ke = $("pointer"), [tt, ze] = le(null), Le = $(null), [ft, Se] = le(!1), Ve = C((n) => {
1367
+ const r = Le.current;
1368
+ r === n || r && n && r.rowKey === n.rowKey && r.col === n.col || (Le.current = n, ze(n), Se(!1));
1369
+ }, []), X = tt ?? (Ie && ce ? { rowKey: ce, col: z } : null), Ee = ft ? null : tt ?? (Ie && ke.current === "keyboard" && ce ? { rowKey: ce, col: z } : null), [re, Ot] = le(Gt), Re = $(re);
1370
+ Re.current = re;
1371
+ const at = C(() => {
1372
+ var Z, _t;
1373
+ const n = Q.current, r = Y.current;
1374
+ if (!n || !r) return;
1375
+ const d = window.getComputedStyle(r), u = parseFloat(d.rowGap) || 0, h = parseFloat(d.columnGap) || 0, N = d.gridTemplateColumns.split(" ").map((Ue) => parseFloat(Ue)).filter((Ue) => Number.isFinite(Ue)), W = ((Z = _e.current) == null ? void 0 : Z.getBoundingClientRect().height) ?? 0, se = r.querySelector(
1376
+ "[data-heatmap-body-row]"
1377
+ ), ne = (se == null ? void 0 : se.getBoundingClientRect().height) ?? 0, ie = {
1378
+ headerBlock: W + u,
1379
+ footerBlock: ((_t = Oe.current) == null ? void 0 : _t.getBoundingClientRect().height) ?? 0,
1380
+ rowPitch: (ne || W || Gt.rowPitch) + u,
1381
+ leadInline: (N[0] ?? 0) + h,
1382
+ colPitch: (N[1] ?? Gt.colPitch) + h,
1383
+ viewportBlock: n.clientHeight,
1384
+ viewportInline: n.clientWidth
1385
+ }, He = Re.current;
1386
+ Object.keys(ie).some(
1387
+ (Ue) => Math.abs(ie[Ue] - He[Ue]) > 0.5
1388
+ ) && Ot(ie);
1389
+ }, []);
1390
+ Je(() => {
1391
+ at();
1392
+ const n = Q.current;
1393
+ if (!n || typeof ResizeObserver > "u") return;
1394
+ const r = new ResizeObserver(() => at());
1395
+ return r.observe(n), Y.current && r.observe(Y.current), () => r.disconnect();
1396
+ }, [at, l.length, K, ve, j]);
1397
+ const vt = ce === Mt ? null : te, Be = z < K ? z : null, rt = C(() => {
1398
+ if (!L)
1399
+ return { rows: Rt(l.length), cols: Rt(K) };
1400
+ const n = Q.current, r = Re.current, d = ia({
1401
+ offset: (n == null ? void 0 : n.scrollTop) ?? 0,
1402
+ viewport: r.viewportBlock,
1403
+ lead: r.headerBlock,
1404
+ pitch: r.rowPitch,
1405
+ count: l.length
1406
+ }), u = ia({
1407
+ offset: (n == null ? void 0 : n.scrollLeft) ?? 0,
1408
+ viewport: r.viewportInline,
1409
+ lead: r.leadInline,
1410
+ pitch: r.colPitch,
1411
+ count: K
1412
+ });
1413
+ return {
1414
+ rows: la(d, l.length, vt),
1415
+ cols: la(u, K, Be)
1416
+ };
1417
+ }, [L, l.length, K, vt, Be]), [he, zt] = le(rt), Fe = _(() => Rt(l.length), [l.length]), wt = _(() => Rt(K), [K]), ge = _(
1418
+ () => L ? {
1419
+ rows: da(he.rows, l.length),
1420
+ cols: da(he.cols, K)
1421
+ } : { rows: Fe, cols: wt },
1422
+ [L, he, l.length, K, Fe, wt]
1423
+ ), Ae = C(() => {
1424
+ const n = rt();
1425
+ zt(
1426
+ (r) => ca(r.rows, n.rows) && ca(r.cols, n.cols) ? r : n
1427
+ );
1428
+ }, [rt]);
1429
+ Je(() => {
1430
+ Ae();
1431
+ }, [Ae, re]);
1432
+ const Ne = $(0), nt = C(() => {
1433
+ !L || Ne.current || (Ne.current = window.requestAnimationFrame(() => {
1434
+ Ne.current = 0, Ae();
1435
+ }));
1436
+ }, [L, Ae]);
1437
+ gt(() => () => window.cancelAnimationFrame(Ne.current), []), Je(() => {
1438
+ ce !== void 0 && ce !== F.rowKey && et({ rowKey: ce, col: z });
1439
+ }), Je(() => {
1440
+ if (!me.current || xe.current) return;
1441
+ const n = document.activeElement;
1442
+ n && n !== document.body && n.isConnected || (xe.current = !0);
1443
+ });
1444
+ const bt = C(
1445
+ (n, r) => {
1446
+ var d;
1447
+ return ((d = Y.current) == null ? void 0 : d.querySelector(
1448
+ `[role="row"][aria-rowindex="${n + 2}"] > [aria-colindex="${r + 2}"]`
1449
+ )) ?? null;
1450
+ },
1451
+ []
1452
+ );
1453
+ Je(() => {
1454
+ var r;
1455
+ if (!xe.current) return;
1456
+ const n = bt(te, z);
1457
+ n && (xe.current = !1, n.focus({ preventScroll: !0 }), (r = n.scrollIntoView) == null || r.call(n, { block: "nearest", inline: "nearest" }));
1458
+ });
1459
+ const Ke = () => Y.current ? window.getComputedStyle(Y.current).direction === "rtl" : !1, B = $(null), Ge = (n) => {
1460
+ const r = l[n];
1461
+ return r && r.kind === "data" ? r.rowIndex : null;
1462
+ }, ue = $(!1), $e = (n, r) => {
1463
+ const d = Math.max(0, Math.min(de.length - 1, n)), u = Math.max(0, Math.min(Me - 1, r));
1464
+ return xe.current = !0, Se(!1), et({ rowKey: de[d], col: u }), { row: d, col: u };
1465
+ }, Ce = (n, r, d) => {
1466
+ const u = l[n];
1467
+ if (u) {
1468
+ if (u.kind === "group") {
1469
+ y(u.groupId);
1470
+ return;
1471
+ }
1472
+ if (!(r >= K)) {
1473
+ if (A === "range" && d && B.current) {
1474
+ ee(B.current, { rowIndex: u.rowIndex, col: r });
1475
+ return;
1476
+ }
1477
+ B.current = { rowIndex: u.rowIndex, col: r }, we(u.rowIndex, r, !0);
1478
+ }
1479
+ }
1480
+ }, De = (n) => {
1481
+ if (n.target instanceof Element && n.target.closest("button"))
1482
+ return;
1483
+ ke.current = "keyboard";
1484
+ const r = de.length - 1, d = Me - 1, u = Ke() ? -1 : 1;
1485
+ let h = te, N = z;
1486
+ const W = n.ctrlKey || n.metaKey;
1487
+ switch (n.key) {
1488
+ case "ArrowRight":
1489
+ N += u;
1490
+ break;
1491
+ case "ArrowLeft":
1492
+ N -= u;
1493
+ break;
1494
+ case "ArrowDown":
1495
+ h += 1;
1496
+ break;
1497
+ case "ArrowUp":
1498
+ h -= 1;
1499
+ break;
1500
+ case "Home":
1501
+ N = 0, W && (h = 0);
1502
+ break;
1503
+ case "End":
1504
+ N = d, W && (h = r);
1505
+ break;
1506
+ case "PageDown": {
1507
+ const ie = l.findIndex(
1508
+ (Z, _t) => _t > te && Z.kind === "group"
1509
+ );
1510
+ h = l.some((Z) => Z.kind === "group") ? ie === -1 ? r : ie : te + ma(Re.current);
1511
+ break;
1512
+ }
1513
+ case "PageUp": {
1514
+ let ie = -1;
1515
+ for (let Z = Math.min(te, l.length) - 1; Z >= 0; Z -= 1)
1516
+ if (l[Z].kind === "group") {
1517
+ ie = Z;
1518
+ break;
1519
+ }
1520
+ h = l.some((Z) => Z.kind === "group") ? ie === -1 ? 0 : ie : te - ma(Re.current);
1521
+ break;
1522
+ }
1523
+ case "Enter":
1524
+ case " ":
1525
+ n.preventDefault(), Ce(te, z, n.shiftKey);
1526
+ return;
1527
+ case "Escape":
1528
+ Ee && (n.preventDefault(), Se(!0));
1529
+ return;
1530
+ default:
1531
+ return;
1532
+ }
1533
+ n.preventDefault();
1534
+ const se = $e(h, N), ne = n.key.startsWith("Arrow");
1535
+ if (A === "range" && n.shiftKey && ne) {
1536
+ const ie = Ge(se.row), He = B.current ?? (() => {
1537
+ const Z = Ge(te);
1538
+ return Z === null || z >= K ? null : { rowIndex: Z, col: z };
1539
+ })();
1540
+ He && ie !== null && se.col < K && (B.current = He, ee(He, { rowIndex: ie, col: se.col }));
1541
+ }
1542
+ }, je = (n) => {
1543
+ var N;
1544
+ if (!(n instanceof Element)) return null;
1545
+ const r = n.closest('[role="gridcell"]'), d = r == null ? void 0 : r.parentElement;
1546
+ if (!r || !d || !((N = Y.current) != null && N.contains(r))) return null;
1547
+ const u = Number(d.getAttribute("aria-rowindex")) - 2, h = Number(r.getAttribute("aria-colindex")) - 2;
1548
+ return !Number.isInteger(u) || u < 0 || h < 0 ? null : { row: u, col: h };
1549
+ }, ot = $(!1), pe = $("mouse"), yt = (n) => {
1550
+ if (ke.current = "pointer", pe.current = n.pointerType, A !== "range" || n.pointerType !== "mouse" || n.button !== 0)
1551
+ return;
1552
+ const r = je(n.target);
1553
+ if (ue.current = !1, !r) return;
1554
+ const d = Ge(r.row);
1555
+ if (d === null || r.col >= K) return;
1556
+ if (n.shiftKey && B.current)
1557
+ ee(B.current, { rowIndex: d, col: r.col });
1558
+ else {
1559
+ B.current = { rowIndex: d, col: r.col };
1560
+ const h = Kt(o[d].id, s[r.col].id);
1561
+ I.size === 1 && I.has(h) ? ue.current = !0 : ee(B.current, B.current);
1562
+ }
1563
+ ot.current = !0;
1564
+ const u = () => {
1565
+ ot.current = !1, window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
1566
+ };
1567
+ window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u);
1568
+ }, xt = (n) => {
1569
+ if (n.pointerType !== "mouse") return;
1570
+ const r = je(n.target);
1571
+ if (Ve(
1572
+ r ? { rowKey: de[r.row], col: r.col } : null
1573
+ ), ot.current && r && B.current) {
1574
+ const d = Ge(r.row);
1575
+ d !== null && r.col < K && ((d !== B.current.rowIndex || r.col !== B.current.col) && (ue.current = !1), ue.current || ee(B.current, { rowIndex: d, col: r.col }));
1576
+ }
1577
+ }, fe = $(null), Te = C(() => {
1578
+ fe.current && (document.removeEventListener("pointerover", fe.current), fe.current = null);
1579
+ }, []);
1580
+ gt(() => Te, [Te]);
1581
+ const Pe = (n) => {
1582
+ Te();
1583
+ const r = n.relatedTarget;
1584
+ if (r instanceof Element && r.closest('[data-component="tooltip"]')) {
1585
+ const d = (u) => {
1586
+ var N;
1587
+ const h = u.target;
1588
+ h instanceof Element && h.closest('[data-component="tooltip"]') || (Te(), h instanceof Node && ((N = Y.current) != null && N.contains(h)) || Ve(null));
1589
+ };
1590
+ fe.current = d, document.addEventListener("pointerover", d);
1591
+ return;
1592
+ }
1593
+ Ve(null);
1594
+ }, st = (n) => {
1595
+ var u;
1596
+ const r = n.target instanceof Element ? n.target.closest("button") : null;
1597
+ if (r) {
1598
+ const h = Number((u = r.closest('[role="row"]')) == null ? void 0 : u.getAttribute("aria-rowindex")) - 2;
1599
+ Number.isInteger(h) && h >= 0 && $e(h, z);
1600
+ return;
1601
+ }
1602
+ const d = je(n.target);
1603
+ if (d) {
1604
+ if ($e(d.row, d.col), xe.current = !1, A === "range" && pe.current === "mouse") {
1605
+ const h = l[d.row];
1606
+ (h == null ? void 0 : h.kind) === "group" ? Ce(d.row, d.col, !1) : (h == null ? void 0 : h.kind) === "data" && d.col < K && we(h.rowIndex, d.col, ue.current), ue.current = !1;
1607
+ return;
1608
+ }
1609
+ Ce(d.row, d.col, n.shiftKey);
1610
+ }
1611
+ }, it = $(!1);
1612
+ gt(() => {
1613
+ let n = 0;
1614
+ const r = () => {
1615
+ it.current = !0, window.cancelAnimationFrame(n), n = window.requestAnimationFrame(() => {
1616
+ it.current = !1;
1617
+ });
1618
+ };
1619
+ return window.addEventListener("scroll", r, { capture: !0 }), () => {
1620
+ window.removeEventListener("scroll", r, { capture: !0 }), window.cancelAnimationFrame(n);
1621
+ };
1622
+ }, []);
1623
+ const It = C((n) => {
1624
+ n || it.current && Le.current === null || Se(!0);
1625
+ }, []), kt = C(
1626
+ (n) => S("heatmap.expandGroup", { group: n }),
1627
+ [S]
1628
+ ), lt = C(
1629
+ (n) => S("heatmap.collapseGroup", { group: n }),
1630
+ [S]
1631
+ ), R = `${ae}-description`, qe = l[te], dt = U && (qe == null ? void 0 : qe.kind) === "data" && z < K ? V(J(qe.rowIndex, z)) : null, St = _(
1632
+ () => ({
1633
+ rows: o,
1634
+ columns: s,
1635
+ matrix: c,
1636
+ scale: b,
1637
+ palette: w,
1638
+ describer: m,
1639
+ showValues: x,
1640
+ totals: k,
1641
+ rowTotals: g,
1642
+ groupColumnMethod: p,
1643
+ groupIds: E,
1644
+ minCount: D,
1645
+ selectable: A !== "none",
1646
+ interactive: H,
1647
+ virtualised: L,
1648
+ colWindow: ge.cols,
1649
+ idBase: ae,
1650
+ describedBy: U ? R : void 0,
1651
+ cellInfo: J,
1652
+ tooltipText: V,
1653
+ onTooltipOpenChange: It,
1654
+ onToggleGroup: y,
1655
+ expandLabel: kt,
1656
+ collapseLabel: lt
1657
+ }),
1658
+ [
1659
+ o,
1660
+ s,
1661
+ c,
1662
+ b,
1663
+ w,
1664
+ m,
1665
+ x,
1666
+ k,
1667
+ g,
1668
+ p,
1669
+ E,
1670
+ D,
1671
+ A,
1672
+ H,
1673
+ L,
1674
+ ge.cols,
1675
+ ae,
1676
+ U,
1677
+ R,
1678
+ J,
1679
+ V,
1680
+ It,
1681
+ y,
1682
+ kt,
1683
+ lt
1684
+ ]
1685
+ ), ct = _(() => {
1686
+ const n = /* @__PURE__ */ new Map();
1687
+ for (const d of I) {
1688
+ const [u, h] = Et(d), N = q(h);
1689
+ if (N === void 0) continue;
1690
+ const W = n.get(u) ?? [];
1691
+ W.push(N), n.set(u, W);
1692
+ }
1693
+ const r = /* @__PURE__ */ new Map();
1694
+ for (const [d, u] of n)
1695
+ r.set(d, u.sort((h, N) => h - N).join(","));
1696
+ return r;
1697
+ }, [I, q]), We = (X == null ? void 0 : X.col) ?? -1, Vt = /* @__PURE__ */ P(
1698
+ "div",
1699
+ {
1700
+ ref: _e,
1701
+ role: "row",
1702
+ "aria-rowindex": 1,
1703
+ className: At({ position: "header" }),
1704
+ children: [
1705
+ /* @__PURE__ */ v(
1706
+ "div",
1707
+ {
1708
+ role: "columnheader",
1709
+ "aria-colindex": 1,
1710
+ className: Ft({ corner: !0 }),
1711
+ children: a ?? /* @__PURE__ */ v("span", { className: "ds:sr-only", children: S("heatmap.rowsHeader") })
1712
+ }
1713
+ ),
1714
+ Ct(ge.cols, (n) => /* @__PURE__ */ v(
1715
+ "div",
1716
+ {
1717
+ role: "columnheader",
1718
+ "aria-colindex": n + 2,
1719
+ "data-highlighted": We === n,
1720
+ className: Ft(),
1721
+ children: m.columnLabel(s[n])
1722
+ },
1723
+ n
1724
+ )),
1725
+ g ? /* @__PURE__ */ v(
1726
+ "div",
1727
+ {
1728
+ role: "columnheader",
1729
+ "aria-colindex": K + 2,
1730
+ "data-highlighted": We === K,
1731
+ className: Ft(),
1732
+ children: m.methodLabel(g)
1733
+ }
1734
+ ) : null
1735
+ ]
1736
+ }
1737
+ );
1738
+ let Nt = null;
1739
+ if (M && k) {
1740
+ const n = l.length, r = m.methodLabel(M), d = te === n, u = (h, N, W, se = r) => {
1741
+ const ne = Jt(h, D);
1742
+ return /* @__PURE__ */ v(
1743
+ "div",
1744
+ {
1745
+ role: "gridcell",
1746
+ "aria-colindex": N + 2,
1747
+ "aria-label": m.sentence(se, W, ne),
1748
+ tabIndex: d && z === N ? 0 : -1,
1749
+ className: Lt({ tone: Qt(ne) }),
1750
+ children: m.visibleText(ne)
1751
+ },
1752
+ N
1753
+ );
1754
+ };
1755
+ Nt = /* @__PURE__ */ P(
1756
+ "div",
1757
+ {
1758
+ ref: Oe,
1759
+ role: "row",
1760
+ "aria-rowindex": n + 2,
1761
+ className: At({ position: "footer" }),
1762
+ children: [
1763
+ /* @__PURE__ */ v(
1764
+ "div",
1765
+ {
1766
+ role: "rowheader",
1767
+ "aria-colindex": 1,
1768
+ "data-highlighted": (X == null ? void 0 : X.rowKey) === Mt,
1769
+ className: Yt({ kind: "total", virtualised: L }),
1770
+ children: r
1771
+ }
1772
+ ),
1773
+ Ct(
1774
+ ge.cols,
1775
+ (h) => u(k.columns[h], h, m.columnLabel(s[h]))
1776
+ ),
1777
+ g ? u(
1778
+ k.grand,
1779
+ K,
1780
+ m.methodLabel(g),
1781
+ // The corner aggregates every cell by the row method, so it
1782
+ // is named for all cells, not for the footer's own method.
1783
+ S("heatmap.allCells")
1784
+ ) : null
1785
+ ]
1786
+ }
1787
+ );
1788
+ }
1789
+ const i = [], f = ge.rows;
1790
+ f.lead > 0 && i.push(
1791
+ /* @__PURE__ */ v(
1792
+ "div",
1793
+ {
1794
+ "aria-hidden": "true",
1795
+ className: Xe({ axis: "row-lead" })
1796
+ },
1797
+ "row-lead"
1798
+ )
1799
+ ), f.indexes.forEach((n, r) => {
1800
+ f.middle > 0 && r === f.middleAfter && i.push(
1801
+ /* @__PURE__ */ v(
1802
+ "div",
1803
+ {
1804
+ "aria-hidden": "true",
1805
+ className: Xe({ axis: "row-middle" })
1806
+ },
1807
+ "row-middle"
1808
+ )
1809
+ );
1810
+ const d = l[n];
1811
+ if (!d) return;
1812
+ const u = n === te;
1813
+ i.push(
1814
+ /* @__PURE__ */ v(
1815
+ Sr,
1816
+ {
1817
+ ctx: St,
1818
+ row: d,
1819
+ ariaRowIndex: n + 2,
1820
+ highlighted: (X == null ? void 0 : X.rowKey) === d.key,
1821
+ activeCol: u ? z : -1,
1822
+ tooltipCol: (Ee == null ? void 0 : Ee.rowKey) === d.key ? Ee.col : -1,
1823
+ selectedCols: d.kind === "data" ? ct.get(o[d.rowIndex].id) ?? "" : ""
1824
+ },
1825
+ d.key
1826
+ )
1827
+ );
1828
+ }), f.tail > 0 && i.push(
1829
+ /* @__PURE__ */ v(
1830
+ "div",
1831
+ {
1832
+ "aria-hidden": "true",
1833
+ className: Xe({ axis: "row-tail" })
1834
+ },
1835
+ "row-tail"
1836
+ )
1837
+ );
1838
+ const T = {
1839
+ "--heatmap-columns": String(Math.max(1, K)),
1840
+ "--heatmap-row-lead": String(f.lead),
1841
+ "--heatmap-row-middle": String(f.middle),
1842
+ "--heatmap-row-tail": String(f.tail),
1843
+ "--heatmap-col-lead": String(ge.cols.lead),
1844
+ "--heatmap-col-middle": String(ge.cols.middle),
1845
+ "--heatmap-col-tail": String(ge.cols.tail),
1846
+ "--heatmap-sticky-block-start": `${re.headerBlock}px`,
1847
+ "--heatmap-sticky-block-end": `${re.footerBlock}px`,
1848
+ "--heatmap-sticky-inline-start": `${re.leadInline}px`
1849
+ };
1850
+ return /* @__PURE__ */ P(
1851
+ "div",
1852
+ {
1853
+ ref: Q,
1854
+ onScroll: nt,
1855
+ style: T,
1856
+ "data-component": "heatmap-grid",
1857
+ className: wr(),
1858
+ children: [
1859
+ /* @__PURE__ */ P(
1860
+ "div",
1861
+ {
1862
+ ref: Y,
1863
+ role: "grid",
1864
+ tabIndex: -1,
1865
+ "aria-label": t,
1866
+ "aria-rowcount": de.length + 1,
1867
+ "aria-colcount": Me + 1,
1868
+ "aria-multiselectable": A === "multiple" || A === "range" ? !0 : void 0,
1869
+ "data-heatmap-grid": "",
1870
+ className: yr({
1871
+ size: ve,
1872
+ density: j,
1873
+ virtualised: L,
1874
+ totalsColumn: !!g
1875
+ }),
1876
+ onKeyDown: De,
1877
+ onPointerDown: yt,
1878
+ onPointerMove: xt,
1879
+ onPointerLeave: Pe,
1880
+ onClick: st,
1881
+ onFocus: (n) => {
1882
+ n.target.matches(":focus-visible") && (ke.current = "keyboard"), me.current = !0, G(!0);
1883
+ },
1884
+ onBlur: (n) => {
1885
+ n.currentTarget.contains(n.relatedTarget) || (me.current = !1, G(!1));
1886
+ },
1887
+ children: [
1888
+ Vt,
1889
+ i,
1890
+ Nt
1891
+ ]
1892
+ }
1893
+ ),
1894
+ dt !== null ? /* @__PURE__ */ v("span", { id: R, hidden: !0, children: dt }) : null
1895
+ ]
1896
+ }
1897
+ );
1898
+ }
1899
+ const $t = Array.from({ length: be }, (e, t) => t);
1900
+ function _r(e, t) {
1901
+ return {
1902
+ start: e.min === null ? "" : t(e.min),
1903
+ end: e.max === null ? "" : t(e.max),
1904
+ middle: e.type === "diverging" && e.midpoint !== void 0 ? t(e.midpoint) : void 0
1905
+ };
1906
+ }
1907
+ const ea = fa(
1908
+ ({
1909
+ variant: e = "stepped",
1910
+ palette: t,
1911
+ scale: a,
1912
+ values: o,
1913
+ valueFormatter: s,
1914
+ showEmpty: c,
1915
+ showLowSample: l,
1916
+ minCount: b,
1917
+ className: w
1918
+ }, m) => {
1919
+ const { t: x, i18n: k } = Ht("ui"), g = xa(), M = wa(k.resolvedLanguage ?? k.language), p = _(
1920
+ () => a ? Wt(a, o ?? []) : (g == null ? void 0 : g.scale) ?? Wt({ type: "sequential" }, o ?? []),
1921
+ [a, o, g == null ? void 0 : g.scale]
1922
+ ), E = t ?? (g == null ? void 0 : g.palette) ?? (p.type === "diverging" ? "diverging" : "primary"), D = s ?? (g == null ? void 0 : g.describer.formatValue) ?? Ia(M, "number"), A = (p.type === "quantile" || p.type === "threshold") && p.thresholds.length > 0, I = p.thresholds.length + 1, q = A ? Array.from(
1923
+ { length: I },
1924
+ (y, S) => qt(S, I)
1925
+ ) : [], H = p.thresholds.map(D), L = _r(p, D), ve = A ? x("heatmap.legend.descriptionBands", {
1926
+ count: I,
1927
+ formatted: ka(M)(I),
1928
+ edges: new Intl.ListFormat(M, {
1929
+ type: "conjunction"
1930
+ }).format(H)
1931
+ }) : L.middle !== void 0 ? x("heatmap.legend.descriptionDiverging", {
1932
+ min: L.start,
1933
+ max: L.end,
1934
+ midpoint: L.middle
1935
+ }) : x("heatmap.legend.description", {
1936
+ min: L.start,
1937
+ max: L.end
1938
+ }), j = (p.type === "quantile" || p.type === "threshold") && !A ? [p.min === null ? be / 2 : p.stepOf(p.min)] : null, J = c ?? (g == null ? void 0 : g.hasEmpty) ?? !1, V = l ?? (g == null ? void 0 : g.hasLowSample) ?? !1, U = b ?? (g == null ? void 0 : g.minCount), we = e === "continuous" ? "continuous" : "stepped", ee = (y) => /* @__PURE__ */ v("span", { className: Ir({ variant: e }), children: y.map((S) => /* @__PURE__ */ v(
1939
+ "span",
1940
+ {
1941
+ className: mt({
1942
+ tone: Ut(E, S),
1943
+ shape: we
1944
+ })
1945
+ },
1946
+ S
1947
+ )) });
1948
+ return /* @__PURE__ */ P(
1949
+ "div",
1950
+ {
1951
+ ref: m,
1952
+ role: "group",
1953
+ "aria-label": x("heatmap.legend.label"),
1954
+ "data-component": "heatmap-legend",
1955
+ className: xr({ className: w }),
1956
+ children: [
1957
+ /* @__PURE__ */ v("span", { className: "ds:sr-only", children: ve }),
1958
+ A ? /* @__PURE__ */ v(
1959
+ "span",
1960
+ {
1961
+ "aria-hidden": "true",
1962
+ "data-legend": "bands",
1963
+ className: "ds:flex ds:min-w-0 ds:max-w-full ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:tabular-nums",
1964
+ children: q.map((y, S) => /* @__PURE__ */ P(
1965
+ "span",
1966
+ {
1967
+ className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
1968
+ children: [
1969
+ /* @__PURE__ */ v(
1970
+ "span",
1971
+ {
1972
+ "data-step": y,
1973
+ className: mt({
1974
+ tone: Ut(E, y),
1975
+ shape: "key"
1976
+ })
1977
+ }
1978
+ ),
1979
+ S < H.length ? /* @__PURE__ */ v("span", { className: "ds:shrink-0", children: H[S] }) : null
1980
+ ]
1981
+ },
1982
+ y
1983
+ ))
1984
+ }
1985
+ ) : /* @__PURE__ */ P(
1986
+ "span",
1987
+ {
1988
+ "aria-hidden": "true",
1989
+ className: "ds:flex ds:min-w-0 ds:max-w-full ds:items-center ds:gap-[var(--spacing-xs)] ds:tabular-nums",
1990
+ children: [
1991
+ /* @__PURE__ */ v("span", { className: "ds:shrink-0", children: L.start }),
1992
+ L.middle !== void 0 ? /* @__PURE__ */ P(La, { children: [
1993
+ ee($t.slice(0, be / 2)),
1994
+ /* @__PURE__ */ v(
1995
+ "span",
1996
+ {
1997
+ "data-legend": "midpoint",
1998
+ className: mt({
1999
+ tone: "midpoint",
2000
+ shape: "label"
2001
+ }),
2002
+ children: L.middle
2003
+ }
2004
+ ),
2005
+ ee($t.slice(be / 2))
2006
+ ] }) : ee(j ?? $t),
2007
+ /* @__PURE__ */ v("span", { className: "ds:shrink-0", children: L.end })
2008
+ ]
2009
+ }
2010
+ ),
2011
+ J ? /* @__PURE__ */ P("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2012
+ /* @__PURE__ */ v(
2013
+ "span",
2014
+ {
2015
+ "aria-hidden": "true",
2016
+ className: mt({ tone: "empty" })
2017
+ }
2018
+ ),
2019
+ x("heatmap.legend.noData")
2020
+ ] }) : null,
2021
+ V ? /* @__PURE__ */ P("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2022
+ /* @__PURE__ */ v(
2023
+ "span",
2024
+ {
2025
+ "aria-hidden": "true",
2026
+ className: mt({ tone: "low-sample" })
2027
+ }
2028
+ ),
2029
+ U === void 0 ? x("heatmap.legend.lowSample") : x("heatmap.legend.lowSampleUnder", {
2030
+ value: new Intl.NumberFormat(M).format(U)
2031
+ })
2032
+ ] }) : null
2033
+ ]
2034
+ }
2035
+ );
2036
+ }
2037
+ );
2038
+ ea.displayName = "HeatmapLegend";
2039
+ const ta = () => import("./data-table-C6T31E33.js").then((e) => e.h).then((e) => ({
2040
+ default: e.DataTable
2041
+ })), Mr = va(ta);
2042
+ function ha() {
2043
+ ta().catch(() => {
2044
+ });
2045
+ }
2046
+ function ht(e, t) {
2047
+ const a = (e == null ? void 0 : e.value) ?? null;
2048
+ return {
2049
+ value: a,
2050
+ count: e == null ? void 0 : e.count,
2051
+ status: a === null ? "empty" : Zt(e == null ? void 0 : e.count, t) ? "low-sample" : "value"
2052
+ };
2053
+ }
2054
+ function Rr({
2055
+ title: e,
2056
+ rowsLabel: t,
2057
+ rows: a,
2058
+ columns: o,
2059
+ matrix: s,
2060
+ body: c,
2061
+ grouped: l,
2062
+ groupIds: b,
2063
+ describer: w,
2064
+ totals: m,
2065
+ rowTotals: x,
2066
+ columnTotals: k,
2067
+ groupColumnMethod: g,
2068
+ minCount: M,
2069
+ onLoadError: p
2070
+ }) {
2071
+ const { t: E } = Ht("ui"), D = _(
2072
+ () => [
2073
+ ...l ? [
2074
+ {
2075
+ colId: "group",
2076
+ field: "group",
2077
+ headerName: E("heatmap.table.group"),
2078
+ // A sort here would pull rows out of their groups.
2079
+ sortable: !1
2080
+ }
2081
+ ] : [],
2082
+ {
2083
+ colId: "row",
2084
+ field: "row",
2085
+ headerName: t ?? E("heatmap.rowsHeader"),
2086
+ sortable: !l
2087
+ },
2088
+ ...o.map(
2089
+ (y, S) => ({
2090
+ colId: `c${S}`,
2091
+ headerName: w.columnLabel(y),
2092
+ valueGetter: (ae) => {
2093
+ var Q;
2094
+ return ((Q = ae.data) == null ? void 0 : Q.cells[S]) ?? "";
2095
+ },
2096
+ sortable: !1
2097
+ })
2098
+ ),
2099
+ ...x ? [
2100
+ {
2101
+ colId: "total",
2102
+ field: "total",
2103
+ headerName: w.methodLabel(x),
2104
+ sortable: !1
2105
+ }
2106
+ ] : []
2107
+ ],
2108
+ [l, t, o, w, x, E]
2109
+ ), A = _(
2110
+ () => c.map((y) => {
2111
+ if (y.kind === "group") {
2112
+ const Q = w.groupLabel(y.groupId), Y = (m == null ? void 0 : m.groupColumns.get(y.groupId)) ?? [];
2113
+ return {
2114
+ id: `group:${b.get(y.groupId) ?? ""}`,
2115
+ group: Q,
2116
+ row: w.groupRowText(Q, g),
2117
+ cells: o.map(
2118
+ (_e, Oe) => w.tableText(ht(Y[Oe], M))
2119
+ ),
2120
+ total: x && m ? w.tableText(
2121
+ ht(m.groups.get(y.groupId), M)
2122
+ ) : void 0
2123
+ };
2124
+ }
2125
+ const S = y.rowIndex, ae = a[S].group;
2126
+ return {
2127
+ id: `row:${a[S].id}`,
2128
+ group: l && ae !== void 0 ? w.groupLabel(ae) : void 0,
2129
+ row: w.rowLabel(a[S]),
2130
+ cells: s[S].map((Q) => w.tableText(Q)),
2131
+ total: x && m ? w.tableText(ht(m.rows[S], M)) : void 0
2132
+ };
2133
+ }),
2134
+ [
2135
+ c,
2136
+ a,
2137
+ o,
2138
+ s,
2139
+ l,
2140
+ b,
2141
+ w,
2142
+ x,
2143
+ m,
2144
+ g,
2145
+ M
2146
+ ]
2147
+ ), I = _(
2148
+ () => k && m ? [
2149
+ {
2150
+ id: "heatmap-column-totals",
2151
+ row: w.methodLabel(k),
2152
+ cells: m.columns.map(
2153
+ (y) => w.tableText(ht(y, M))
2154
+ ),
2155
+ // The grand total, by the row method, as the grid's corner.
2156
+ total: x ? w.tableText(ht(m.grand, M)) : void 0
2157
+ }
2158
+ ] : void 0,
2159
+ [k, x, m, w, M]
2160
+ ), q = A.length + ((I == null ? void 0 : I.length) ?? 0), H = $(q);
2161
+ H.current = q;
2162
+ const [L, ve] = le(null), j = L === q, J = $(null);
2163
+ Je(() => {
2164
+ const y = J.current;
2165
+ if (j || !y || typeof ResizeObserver > "u") return;
2166
+ const S = new ResizeObserver(() => {
2167
+ y.scrollHeight > y.clientHeight + 1 && ve(H.current);
2168
+ }), ae = () => {
2169
+ S.observe(y);
2170
+ for (const Y of Array.from(y.children)) S.observe(Y);
2171
+ };
2172
+ ae();
2173
+ const Q = new MutationObserver(ae);
2174
+ return Q.observe(y, { childList: !0 }), () => {
2175
+ S.disconnect(), Q.disconnect();
2176
+ };
2177
+ }, [j]);
2178
+ const V = _(
2179
+ () => ({
2180
+ getRowId: (y) => y.data.id,
2181
+ domLayout: j ? "normal" : "autoHeight"
2182
+ }),
2183
+ [j]
2184
+ ), [U, we] = le(0), ee = _(
2185
+ () => U === 0 ? Mr : va(ta),
2186
+ [U]
2187
+ );
2188
+ return /* @__PURE__ */ v(
2189
+ "div",
2190
+ {
2191
+ ref: J,
2192
+ role: "group",
2193
+ "aria-label": e,
2194
+ tabIndex: -1,
2195
+ "data-component": "heatmap-table",
2196
+ "data-layout": j ? "capped" : "fit",
2197
+ className: br({ capped: j }),
2198
+ children: /* @__PURE__ */ v(
2199
+ ja,
2200
+ {
2201
+ size: "sm",
2202
+ onError: () => p == null ? void 0 : p(),
2203
+ onRetry: () => {
2204
+ var y;
2205
+ we((S) => S + 1), (y = J.current) == null || y.focus();
2206
+ },
2207
+ children: /* @__PURE__ */ v(
2208
+ Ha,
2209
+ {
2210
+ fallback: /* @__PURE__ */ v("div", { role: "status", "aria-label": E("heatmap.loadingTable"), children: /* @__PURE__ */ v(
2211
+ jt,
2212
+ {
2213
+ variant: "rectangular",
2214
+ className: "ds:h-[calc(var(--min-target-size)*4)] ds:w-full"
2215
+ }
2216
+ ) }),
2217
+ children: /* @__PURE__ */ v(
2218
+ ee,
2219
+ {
2220
+ columnDefs: D,
2221
+ rowData: A,
2222
+ pinnedBottomRowData: I,
2223
+ density: "compact",
2224
+ heightClass: j ? "ds:min-h-0 ds:flex-1" : "",
2225
+ gridOptions: V
2226
+ }
2227
+ )
2228
+ }
2229
+ )
2230
+ }
2231
+ )
2232
+ }
2233
+ );
2234
+ }
2235
+ const Tr = { type: "sequential", domain: "auto" }, Dt = (e) => new Set((e ?? []).map((t) => Kt(t.rowId, t.columnId))), ga = { text: "", privacyMode: !1, repeat: 0 }, Ta = fa(
2236
+ ({
2237
+ title: e,
2238
+ rows: t,
2239
+ columns: a,
2240
+ getCell: o,
2241
+ cells: s,
2242
+ groups: c,
2243
+ scale: l = Tr,
2244
+ palette: b,
2245
+ valueType: w = "number",
2246
+ minCount: m,
2247
+ valueFormatter: x,
2248
+ showValues: k = !1,
2249
+ legend: g = "stepped",
2250
+ rowTotals: M = !1,
2251
+ columnTotals: p = !1,
2252
+ sortRows: E,
2253
+ defaultSortRows: D = "none",
2254
+ onSortRowsChange: A,
2255
+ groupRows: I = !1,
2256
+ defaultCollapsedGroups: q,
2257
+ selection: H = "none",
2258
+ selectedCells: L,
2259
+ defaultSelectedCells: ve,
2260
+ onSelectionChange: j,
2261
+ onCellClick: J,
2262
+ renderTooltip: V,
2263
+ density: U = "default",
2264
+ size: we = "md",
2265
+ loading: ee = !1,
2266
+ privacyMode: y = !1,
2267
+ privacyScope: S = "rows",
2268
+ rowsLabel: ae,
2269
+ defaultView: Q = "heatmap",
2270
+ onViewChange: Y,
2271
+ id: _e,
2272
+ className: Oe,
2273
+ children: K
2274
+ }, Me) => {
2275
+ const { t: O, i18n: de } = Ht("ui"), ye = wa(de.resolvedLanguage ?? de.language), F = _(
2276
+ () => dr(t, a, o, s, m),
2277
+ [t, a, o, s, m]
2278
+ ), et = _(() => cr(F), [F]), te = JSON.stringify(l), z = _(
2279
+ () => Wt(l, et),
2280
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by content
2281
+ [te, et]
2282
+ ), ce = b ?? (z.type === "diverging" ? "diverging" : "primary"), xe = _(
2283
+ () => x ?? Ia(ye, w),
2284
+ [x, ye, w]
2285
+ ), Ie = _(() => ka(ye), [ye]), G = _(
2286
+ () => Qa({
2287
+ t: O,
2288
+ privacyMode: y,
2289
+ privacyScope: S,
2290
+ valueType: w,
2291
+ formatValue: xe,
2292
+ formatCount: Ie,
2293
+ groups: c
2294
+ }),
2295
+ [
2296
+ O,
2297
+ y,
2298
+ S,
2299
+ w,
2300
+ xe,
2301
+ Ie,
2302
+ c
2303
+ ]
2304
+ ), me = _(
2305
+ () => ir(t, c),
2306
+ [t, c]
2307
+ ), ke = p || M || "mean", tt = M || "mean", ze = _(
2308
+ () => pr(
2309
+ F,
2310
+ t,
2311
+ a.length,
2312
+ tt,
2313
+ p || "mean",
2314
+ ke
2315
+ ),
2316
+ [
2317
+ F,
2318
+ t,
2319
+ a.length,
2320
+ tt,
2321
+ p,
2322
+ ke
2323
+ ]
2324
+ ), [Le, ft] = le(ga), Se = $(0), Ve = $(y);
2325
+ Ve.current = y;
2326
+ const X = C((i, f = !1) => {
2327
+ window.clearTimeout(Se.current);
2328
+ const T = Ve.current, n = () => ft((r) => ({
2329
+ text: i,
2330
+ privacyMode: T,
2331
+ repeat: r.text === i ? r.repeat + 1 : 0
2332
+ }));
2333
+ f ? Se.current = window.setTimeout(n, 300) : n();
2334
+ }, []);
2335
+ gt(() => () => window.clearTimeout(Se.current), []), gt(() => {
2336
+ window.clearTimeout(Se.current), ft((i) => i.text === "" ? i : ga);
2337
+ }, [y]);
2338
+ const Ee = Le.privacyMode === y ? (
2339
+ // The same words twice leave the DOM unchanged and a screen reader
2340
+ // silent: a trailing no-break space on every other repeat changes
2341
+ // the text without changing what is read.
2342
+ `${Le.text}${Le.repeat % 2 === 1 ? " " : ""}`
2343
+ ) : "", [re, Ot] = le(Q), Re = C(
2344
+ (i) => {
2345
+ Ot(i), Y == null || Y(i), X(
2346
+ O(i === "table" ? "heatmap.announce.tableView" : "heatmap.announce.heatmapView")
2347
+ );
2348
+ },
2349
+ [Y, X, O]
2350
+ ), [at, vt] = le(D), Be = E ?? at, rt = C(
2351
+ (i) => {
2352
+ E === void 0 && vt(i), A == null || A(i);
2353
+ },
2354
+ [E, A]
2355
+ ), [he, zt] = le(
2356
+ () => new Set(q ?? [])
2357
+ ), Fe = C(
2358
+ (i, f) => {
2359
+ if (he.has(i) === f) return;
2360
+ zt((n) => {
2361
+ if (n.has(i) === f) return n;
2362
+ const r = new Set(n);
2363
+ return f ? r.add(i) : r.delete(i), r;
2364
+ });
2365
+ const T = G.groupLabel(i);
2366
+ X(
2367
+ f ? O("heatmap.announce.groupCollapsed", { group: T }) : O("heatmap.announce.groupExpanded", { group: T })
2368
+ );
2369
+ },
2370
+ [he, X, G, O]
2371
+ ), wt = C(
2372
+ (i) => Fe(i, !he.has(i)),
2373
+ [he, Fe]
2374
+ ), ge = _(
2375
+ () => new Intl.Collator(ye, { numeric: !0, sensitivity: "base" }),
2376
+ [ye]
2377
+ ), Ae = Be === "label" && G.masksRows ? "none" : Be, Ne = _(
2378
+ () => hr(
2379
+ t.map((i, f) => f),
2380
+ t,
2381
+ ze.rows,
2382
+ Ae,
2383
+ ge
2384
+ ),
2385
+ [t, ze.rows, Ae, ge]
2386
+ ), nt = _(
2387
+ () => oa(t, Ne, I, he),
2388
+ [t, Ne, I, he]
2389
+ ), bt = _(
2390
+ () => oa(t, Ne, I, /* @__PURE__ */ new Set()),
2391
+ [t, Ne, I]
2392
+ ), Ke = _(
2393
+ () => new Map(t.map((i, f) => [i.id, f])),
2394
+ [t]
2395
+ ), B = _(
2396
+ () => new Map(a.map((i, f) => [String(i.id), f])),
2397
+ [a]
2398
+ ), Ge = C(
2399
+ (i) => B.get(i),
2400
+ [B]
2401
+ ), ue = C(
2402
+ (i, f) => {
2403
+ const T = t[i], n = a[f], r = F[i][f];
2404
+ return {
2405
+ rowId: T.id,
2406
+ columnId: n.id,
2407
+ row: T,
2408
+ column: n,
2409
+ rowIndex: i,
2410
+ columnIndex: f,
2411
+ value: r.value,
2412
+ count: r.count,
2413
+ label: r.label,
2414
+ status: r.status,
2415
+ step: r.status === "value" && r.value !== null ? z.stepOf(r.value) : null
2416
+ };
2417
+ },
2418
+ [t, a, F, z]
2419
+ ), $e = C(
2420
+ (i) => {
2421
+ const f = i.row.group === void 0 ? void 0 : me.get(i.row.group);
2422
+ return {
2423
+ rowId: i.rowId,
2424
+ columnId: i.columnId,
2425
+ row: {
2426
+ id: i.row.id,
2427
+ label: G.rowLabel(i.row),
2428
+ ...f === void 0 ? {} : { group: f }
2429
+ },
2430
+ column: {
2431
+ id: i.column.id,
2432
+ label: G.columnLabel(i.column)
2433
+ },
2434
+ rowIndex: i.rowIndex,
2435
+ columnIndex: i.columnIndex,
2436
+ value: i.value,
2437
+ count: i.count,
2438
+ status: i.status,
2439
+ step: i.step
2440
+ };
2441
+ },
2442
+ [G, me]
2443
+ ), Ce = C(
2444
+ (i) => V ? V(y ? $e(i) : i, {
2445
+ privacyMode: y
2446
+ }) : G.sentence(
2447
+ G.rowLabel(i.row),
2448
+ G.columnLabel(i.column),
2449
+ F[i.rowIndex][i.columnIndex]
2450
+ ),
2451
+ [V, y, $e, G, F]
2452
+ ), De = L !== void 0, [je, ot] = le(
2453
+ () => Dt(ve)
2454
+ ), pe = _(() => {
2455
+ const i = De ? Dt(L) : je, f = /* @__PURE__ */ new Set();
2456
+ for (const T of i) {
2457
+ const [n, r] = Et(T);
2458
+ Ke.has(n) && B.has(r) && f.add(T);
2459
+ }
2460
+ return f;
2461
+ }, [
2462
+ De,
2463
+ L,
2464
+ je,
2465
+ Ke,
2466
+ B
2467
+ ]), yt = C(
2468
+ (i) => {
2469
+ const f = [];
2470
+ for (const T of i) {
2471
+ const [n, r] = Et(T), d = Ke.get(n), u = B.get(r);
2472
+ d !== void 0 && u !== void 0 && f.push(ue(d, u));
2473
+ }
2474
+ return f;
2475
+ },
2476
+ [Ke, B, ue]
2477
+ ), xt = C(
2478
+ (i, f) => G.cellName(
2479
+ G.rowLabel(t[i]),
2480
+ G.columnLabel(a[f])
2481
+ ),
2482
+ [G, t, a]
2483
+ ), fe = C(
2484
+ (i, f, T = !1) => {
2485
+ De || ot(i), j == null || j(yt(i)), X(f, T);
2486
+ },
2487
+ [De, j, yt, X]
2488
+ ), Te = C(
2489
+ (i) => i === 0 ? O("heatmap.announce.cleared") : O("heatmap.announce.count", {
2490
+ count: i,
2491
+ formatted: Ie(i)
2492
+ }),
2493
+ [O, Ie]
2494
+ ), Pe = _(
2495
+ () => nt.flatMap((i) => i.kind === "data" ? [i.rowIndex] : []),
2496
+ [nt]
2497
+ ), st = C(
2498
+ (i, f) => {
2499
+ const T = Pe.indexOf(i.rowIndex), n = Pe.indexOf(f.rowIndex), r = /* @__PURE__ */ new Set();
2500
+ if (T === -1 || n === -1) return r;
2501
+ const [d, u] = T <= n ? [T, n] : [n, T], [h, N] = i.col <= f.col ? [i.col, f.col] : [f.col, i.col];
2502
+ for (let W = d; W <= u; W += 1) {
2503
+ const se = t[Pe[W]].id;
2504
+ for (let ne = h; ne <= N; ne += 1)
2505
+ r.add(Kt(se, a[ne].id));
2506
+ }
2507
+ return r;
2508
+ },
2509
+ [Pe, t, a]
2510
+ ), it = C(
2511
+ (i, f, T) => {
2512
+ if (J == null || J(ue(i, f)), !T || H === "none") return;
2513
+ const n = Kt(t[i].id, a[f].id), r = xt(i, f);
2514
+ if (H === "multiple") {
2515
+ const u = new Set(pe), h = !u.has(n);
2516
+ h ? u.add(n) : u.delete(n), fe(
2517
+ u,
2518
+ O(h ? "heatmap.announce.added" : "heatmap.announce.removed", {
2519
+ cell: r,
2520
+ count: u.size,
2521
+ formatted: Ie(u.size)
2522
+ })
2523
+ );
2524
+ return;
2525
+ }
2526
+ const d = pe.size === 1 && pe.has(n);
2527
+ fe(
2528
+ d ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([n]),
2529
+ d ? O("heatmap.announce.cleared") : O("heatmap.announce.selected", { cell: r })
2530
+ );
2531
+ },
2532
+ [
2533
+ J,
2534
+ ue,
2535
+ H,
2536
+ t,
2537
+ a,
2538
+ xt,
2539
+ pe,
2540
+ fe,
2541
+ Ie,
2542
+ O
2543
+ ]
2544
+ ), It = C(
2545
+ (i, f) => {
2546
+ if (H !== "range" && H !== "multiple") return;
2547
+ const T = st(i, f);
2548
+ T.size === pe.size && [...T].every((n) => pe.has(n)) || fe(T, Te(T.size), !0);
2549
+ },
2550
+ [H, st, pe, fe, Te]
2551
+ ), kt = _(
2552
+ () => new Map([...me].map(([i, f]) => [f, i])),
2553
+ [me]
2554
+ ), lt = {
2555
+ selected: pe,
2556
+ selection: H,
2557
+ view: re,
2558
+ sortRows: Be,
2559
+ collapsed: he,
2560
+ groupRows: I,
2561
+ rows: t,
2562
+ columns: a,
2563
+ expandedBody: bt,
2564
+ groupIds: me,
2565
+ groupByPublicId: kt,
2566
+ rowIndexById: Ke,
2567
+ columnIndexById: B,
2568
+ matrix: F,
2569
+ scale: z,
2570
+ setView: Re,
2571
+ setSortRows: rt,
2572
+ setGroupCollapsed: Fe,
2573
+ commitSelection: fe,
2574
+ rectangle: st,
2575
+ countMessage: Te
2576
+ }, R = $(lt);
2577
+ R.current = lt;
2578
+ const qe = _(() => {
2579
+ const i = (r) => {
2580
+ const { columns: d, columnIndexById: u } = R.current, h = [];
2581
+ for (const N of r) {
2582
+ const [W, se] = Et(N), ne = u.get(se);
2583
+ ne !== void 0 && h.push({ rowId: W, columnId: d[ne].id });
2584
+ }
2585
+ return h;
2586
+ }, f = (r) => {
2587
+ const { rowIndexById: d, columnIndexById: u } = R.current, h = d.get(r.rowId), N = u.get(String(r.columnId));
2588
+ return h === void 0 || N === void 0 ? null : { rowIndex: h, col: N };
2589
+ }, T = (r) => {
2590
+ const d = f(r);
2591
+ if (!d)
2592
+ throw new Error(
2593
+ `Heatmap: no cell at row "${r.rowId}", column "${String(r.columnId)}".`
2594
+ );
2595
+ return d;
2596
+ }, n = () => {
2597
+ if (R.current.selection === "none")
2598
+ throw new Error('Heatmap: selection is off (selection="none").');
2599
+ };
2600
+ return {
2601
+ getSelection: () => i(R.current.selected),
2602
+ getSelectionMode: () => R.current.selection,
2603
+ selectCells: (r) => {
2604
+ n(), r.forEach(T);
2605
+ const { selection: d } = R.current, u = d === "single" ? r.slice(0, 1) : r, h = Dt(u);
2606
+ R.current.commitSelection(
2607
+ h,
2608
+ R.current.countMessage(h.size)
2609
+ );
2610
+ },
2611
+ selectRange: (r, d) => {
2612
+ const { selection: u } = R.current;
2613
+ if (u !== "range" && u !== "multiple")
2614
+ throw new Error(
2615
+ 'Heatmap: select_range needs selection="range" or "multiple".'
2616
+ );
2617
+ const h = T(r), N = T(d), W = R.current.rectangle(h, N);
2618
+ R.current.commitSelection(
2619
+ W,
2620
+ R.current.countMessage(W.size)
2621
+ );
2622
+ },
2623
+ clearSelection: () => {
2624
+ n(), R.current.selected.size !== 0 && R.current.commitSelection(
2625
+ /* @__PURE__ */ new Set(),
2626
+ R.current.countMessage(0)
2627
+ );
2628
+ },
2629
+ readCell: (r) => {
2630
+ const d = f(r);
2631
+ if (!d) return null;
2632
+ const u = R.current.matrix[d.rowIndex][d.col];
2633
+ return {
2634
+ value: u.value,
2635
+ count: u.count,
2636
+ status: u.status,
2637
+ step: u.status === "value" && u.value !== null ? R.current.scale.stepOf(u.value) : null
2638
+ };
2639
+ },
2640
+ getView: () => R.current.view,
2641
+ setView: (r) => R.current.setView(r),
2642
+ getSortRows: () => R.current.sortRows,
2643
+ setSortRows: (r) => R.current.setSortRows(r),
2644
+ getRowIds: () => {
2645
+ const { expandedBody: r, rows: d } = R.current;
2646
+ return r.flatMap(
2647
+ (u) => u.kind === "data" ? [d[u.rowIndex].id] : []
2648
+ );
2649
+ },
2650
+ getColumnIds: () => R.current.columns.map((r) => r.id),
2651
+ getGroupIds: () => {
2652
+ const {
2653
+ groupRows: r,
2654
+ expandedBody: d,
2655
+ groupIds: u
2656
+ } = R.current;
2657
+ return r ? d.flatMap(
2658
+ (h) => h.kind === "group" ? [u.get(h.groupId) ?? ""] : []
2659
+ ) : [];
2660
+ },
2661
+ getCollapsedGroups: () => {
2662
+ const { collapsed: r, groupIds: d } = R.current;
2663
+ return [...r].flatMap((u) => {
2664
+ const h = d.get(u);
2665
+ return h === void 0 ? [] : [h];
2666
+ });
2667
+ },
2668
+ setGroupCollapsed: (r, d) => {
2669
+ const { groupRows: u, groupByPublicId: h } = R.current;
2670
+ if (!u)
2671
+ throw new Error(
2672
+ "Heatmap: rows are not grouped (groupRows is off)."
2673
+ );
2674
+ const N = h.get(r);
2675
+ if (N === void 0)
2676
+ throw new Error(`Heatmap: no group "${r}".`);
2677
+ R.current.setGroupCollapsed(N, d);
2678
+ }
2679
+ };
2680
+ }, []);
2681
+ Oa(Ya, qe, _e);
2682
+ const dt = _(
2683
+ () => F.some((i) => i.some((f) => f.status === "empty")),
2684
+ [F]
2685
+ ), St = _(
2686
+ () => F.some((i) => i.some((f) => f.status === "low-sample")),
2687
+ [F]
2688
+ ), ct = _(
2689
+ () => ({
2690
+ palette: ce,
2691
+ scale: z,
2692
+ describer: G,
2693
+ hasEmpty: dt,
2694
+ hasLowSample: St,
2695
+ minCount: m,
2696
+ tooltipText: Ce
2697
+ }),
2698
+ [
2699
+ ce,
2700
+ z,
2701
+ G,
2702
+ dt,
2703
+ St,
2704
+ m,
2705
+ Ce
2706
+ ]
2707
+ ), We = ua({ className: Oe });
2708
+ if (ee)
2709
+ return /* @__PURE__ */ v(Tt.Provider, { value: ct, children: /* @__PURE__ */ P(
2710
+ "div",
2711
+ {
2712
+ ref: Me,
2713
+ "data-component": "heatmap",
2714
+ "data-component-id": _e,
2715
+ className: We,
2716
+ children: [
2717
+ /* @__PURE__ */ P(
2718
+ "div",
2719
+ {
2720
+ role: "status",
2721
+ "aria-label": O("heatmap.loading"),
2722
+ "aria-busy": "true",
2723
+ className: ua(),
2724
+ children: [
2725
+ /* @__PURE__ */ v(
2726
+ jt,
2727
+ {
2728
+ variant: "rectangular",
2729
+ className: "ds:h-[var(--spacing-md)] ds:w-[calc(var(--spacing-xl)*6)] ds:max-w-full"
2730
+ }
2731
+ ),
2732
+ /* @__PURE__ */ v(
2733
+ jt,
2734
+ {
2735
+ variant: "rectangular",
2736
+ className: "ds:h-[calc(var(--min-target-size)*5)] ds:w-full"
2737
+ }
2738
+ )
2739
+ ]
2740
+ }
2741
+ ),
2742
+ K
2743
+ ]
2744
+ }
2745
+ ) });
2746
+ if (t.length === 0 || a.length === 0 || !ur(F))
2747
+ return /* @__PURE__ */ v(Tt.Provider, { value: ct, children: /* @__PURE__ */ P(
2748
+ "div",
2749
+ {
2750
+ ref: Me,
2751
+ "data-component": "heatmap",
2752
+ "data-component-id": _e,
2753
+ className: We,
2754
+ children: [
2755
+ /* @__PURE__ */ v(
2756
+ Va,
2757
+ {
2758
+ variant: "no-results",
2759
+ size: "sm",
2760
+ title: O("heatmap.empty.title"),
2761
+ description: O("heatmap.empty.description")
2762
+ }
2763
+ ),
2764
+ K
2765
+ ]
2766
+ }
2767
+ ) });
2768
+ const Vt = t.length * a.length > gr, Nt = H !== "none" || J !== void 0;
2769
+ return /* @__PURE__ */ v(Tt.Provider, { value: ct, children: /* @__PURE__ */ P(
2770
+ "div",
2771
+ {
2772
+ ref: Me,
2773
+ "data-component": "heatmap",
2774
+ "data-component-id": _e,
2775
+ className: We,
2776
+ children: [
2777
+ /* @__PURE__ */ P("div", { className: vr(), children: [
2778
+ g !== !1 ? /* @__PURE__ */ v(ea, { variant: g }) : null,
2779
+ /* @__PURE__ */ v(
2780
+ za,
2781
+ {
2782
+ intent: "outline",
2783
+ size: "sm",
2784
+ className: "ds:ms-auto",
2785
+ startIcon: re === "table" ? /* @__PURE__ */ v(qa, { "aria-hidden": "true" }) : /* @__PURE__ */ v(Ua, { "aria-hidden": "true" }),
2786
+ onPointerEnter: re === "table" ? void 0 : ha,
2787
+ onFocus: re === "table" ? void 0 : ha,
2788
+ onClick: () => Re(re === "table" ? "heatmap" : "table"),
2789
+ children: O(re === "table" ? "heatmap.viewAsHeatmap" : "heatmap.viewAsTable")
2790
+ }
2791
+ )
2792
+ ] }),
2793
+ re === "table" ? /* @__PURE__ */ v(
2794
+ Rr,
2795
+ {
2796
+ onLoadError: () => X(O("heatmap.announce.tableFailed")),
2797
+ title: e,
2798
+ rowsLabel: ae,
2799
+ rows: t,
2800
+ columns: a,
2801
+ matrix: F,
2802
+ body: bt,
2803
+ grouped: I,
2804
+ groupIds: me,
2805
+ describer: G,
2806
+ totals: ze,
2807
+ rowTotals: M,
2808
+ columnTotals: p,
2809
+ groupColumnMethod: ke,
2810
+ minCount: m
2811
+ },
2812
+ `${y}-${S}`
2813
+ ) : /* @__PURE__ */ v(Fa, { delayDuration: 0, children: /* @__PURE__ */ v(
2814
+ Nr,
2815
+ {
2816
+ title: e,
2817
+ rowsLabel: ae,
2818
+ rows: t,
2819
+ columns: a,
2820
+ matrix: F,
2821
+ body: nt,
2822
+ scale: z,
2823
+ palette: ce,
2824
+ describer: G,
2825
+ showValues: k,
2826
+ totals: ze,
2827
+ rowTotals: M,
2828
+ columnTotals: p,
2829
+ groupColumnMethod: ke,
2830
+ groupIds: me,
2831
+ minCount: m,
2832
+ selectionMode: H,
2833
+ selected: pe,
2834
+ columnIndexOfKey: Ge,
2835
+ interactive: Nt,
2836
+ virtualised: Vt,
2837
+ size: we,
2838
+ density: U,
2839
+ cellInfo: ue,
2840
+ tooltipText: Ce,
2841
+ describeFocused: V !== void 0,
2842
+ onActivate: it,
2843
+ onRange: It,
2844
+ onToggleGroup: wt
2845
+ }
2846
+ ) }),
2847
+ K,
2848
+ /* @__PURE__ */ v(Ba, { children: Ee }, String(y))
2849
+ ]
2850
+ }
2851
+ ) });
2852
+ }
2853
+ );
2854
+ Ta.displayName = "Heatmap";
2855
+ const Wr = Object.assign(Ta, {
2856
+ Legend: ea,
2857
+ Tooltip: Na
2858
+ });
2859
+ export {
2860
+ Wr as H,
2861
+ ea as a,
2862
+ Na as b,
2863
+ Ya as h
2864
+ };
2865
+ //# sourceMappingURL=heatmap-BARGZZt2.js.map