@alfadocs/ui-kit 1.141.0 → 1.143.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 (324) hide show
  1. package/dist/_chunks/{actions-cell-renderer-C-l_ppP6.js → actions-cell-renderer-CPNyF6ye.js} +3 -3
  2. package/dist/_chunks/{ai-credits-notice-BNFcQoXo.js → ai-credits-notice-D_Zm_N2A.js} +2 -2
  3. package/dist/_chunks/{ai-permission-notice-C-xR2_iS.js → ai-permission-notice-CEDEWE2-.js} +19 -11
  4. package/dist/_chunks/{ai-prompt-input-B2QFwuJ1.js → ai-prompt-input-y4-dtQIT.js} +2 -2
  5. package/dist/_chunks/{ai-summary-panel-BhCo2vZF.js → ai-summary-panel-CJVOjr2I.js} +3 -3
  6. package/dist/_chunks/{alia-sidebar-CVBlKur9.js → alia-sidebar-AKz42_XE.js} +3 -3
  7. package/dist/_chunks/{anamnesis-card-sUFT0dpF.js → anamnesis-card-W8ZaDytS.js} +15 -14
  8. package/dist/_chunks/{anamnesis-summary-rows-YJGs2uWD.js → anamnesis-summary-rows-wUl7oXBO.js} +9 -9
  9. package/dist/_chunks/{appointment-card-r0OZm77v.js → appointment-card-HOZrABrQ.js} +3 -3
  10. package/dist/_chunks/{appointment-details-panel.history-DrIMDQYf.js → appointment-details-panel.history-B8R8XfGe.js} +37 -30
  11. package/dist/_chunks/{appointment-peek-BP_ACFz5.js → appointment-peek-BCzekfWh.js} +3 -3
  12. package/dist/_chunks/appointment-timeline-CMc_3C74.js +776 -0
  13. package/dist/_chunks/{appointment-tray-t_ltp-Yi.js → appointment-tray-D8k5YKLU.js} +2 -2
  14. package/dist/_chunks/{audio-recorder-6dUq8I38.js → audio-recorder-DxhCiLqG.js} +2 -2
  15. package/dist/_chunks/{balance-badge-cell-CRStPNDd.js → balance-badge-cell-10BdaOQ8.js} +6 -6
  16. package/dist/_chunks/{bill-line-table-DTqXdBED.js → bill-line-table-qAdmV19W.js} +2 -2
  17. package/dist/_chunks/{bishop-score-M7Fi-ykx.js → bishop-score-DbvfBlBM.js} +2 -2
  18. package/dist/_chunks/{button-group-DuQuuulC.js → button-group-DoKG16Fy.js} +2 -2
  19. package/dist/_chunks/{calculator-dialog-Cg3GjaRf.js → calculator-dialog-BWizCwN5.js} +2 -2
  20. package/dist/_chunks/{calendar-appointment-editor-dialog-CuXpgLCw.js → calendar-appointment-editor-dialog-9kVppi9f.js} +18 -18
  21. package/dist/_chunks/{calendar-editor-discard-host-BcMEgVEq.js → calendar-editor-discard-host-BblBxMqT.js} +5 -5
  22. package/dist/_chunks/{calendar-waiting-list-panel-BNQrUndD.js → calendar-waiting-list-panel-CSFJw5np.js} +6 -6
  23. package/dist/_chunks/{calendar.sheets-DcW8A3DI.js → calendar.sheets-DZh3p8HE.js} +13 -13
  24. package/dist/_chunks/{calls-panel-CJNQm7r8.js → calls-panel-CnjAKFgA.js} +92 -90
  25. package/dist/_chunks/{care-plan-card-CjHq6PLo.js → care-plan-card-CkRqA58O.js} +3 -3
  26. package/dist/_chunks/{care-plan-entry-card-DY1toF6E.js → care-plan-entry-card-DurPuYAP.js} +3 -3
  27. package/dist/_chunks/{care-plan-header-CeFXUDnL.js → care-plan-header-C4i93i8H.js} +2 -2
  28. package/dist/_chunks/{chart-D0EeFWst.js → chart-ChNsJf9_.js} +2 -2
  29. package/dist/_chunks/{chat-message-B4TMeZ2m.js → chat-message-IG9uRq6y.js} +2 -2
  30. package/dist/_chunks/{clinical-note-card-D--IwbZa.js → clinical-note-card-D-9xmRpf.js} +68 -52
  31. package/dist/_chunks/{color-picker-CC8ZfntU.js → color-picker-5FKOk_z1.js} +2 -2
  32. package/dist/_chunks/{communications-panel-DBWM9II9.js → communications-panel-MgAuWYBy.js} +5 -5
  33. package/dist/_chunks/{control-room-rail-DcJpHbp4.js → control-room-rail-DBmNpbDE.js} +2 -2
  34. package/dist/_chunks/{cycle-calculator-Cb66X2Pf.js → cycle-calculator-BUCGfEcy.js} +2 -2
  35. package/dist/_chunks/{dashboard-grid-2uVXEe9e.js → dashboard-grid-D2egA1Zu.js} +2 -2
  36. package/dist/_chunks/{data-grid-tabs-D9Y4DeeH.js → data-grid-tabs-Mbj6bSK2.js} +2 -2
  37. package/dist/_chunks/{data-grid-CRUSZcVT.js → data-grid-tyE2kGfx.js} +5 -5
  38. package/dist/_chunks/{data-table-CnLfOwxg.js → data-table-Huk4CNHs.js} +118 -118
  39. package/dist/_chunks/{data-table-tabs-NYLhD8_Z.js → data-table-tabs-D5ujdK56.js} +2 -2
  40. package/dist/_chunks/{date-picker-BmVBVpVu.js → date-picker-CD-PBzXM.js} +2 -2
  41. package/dist/_chunks/{date-range-panel-CT9Pk-HF.js → date-range-panel-BOgfP_V3.js} +2 -2
  42. package/dist/_chunks/{date-range-picker-2Up_FRrM.js → date-range-picker-Z-hI5Vb7.js} +2 -2
  43. package/dist/_chunks/{date-time-picker-C6b_Vymc.js → date-time-picker-DHza1SEH.js} +2 -2
  44. package/dist/_chunks/{default-tabs-CRbVCDSU.js → default-tabs-ChkVzOL8.js} +7 -7
  45. package/dist/_chunks/dialog-239Geb7Z.js +431 -0
  46. package/dist/_chunks/dialog-container-DHR0byah.js +17 -0
  47. package/dist/_chunks/{document-preview-FTCHXYhk.js → document-preview-x_S8V7VC.js} +3 -3
  48. package/dist/_chunks/{dropdown-menu-DBWaW4pq.js → dropdown-menu-Bm1KALnk.js} +2 -2
  49. package/dist/_chunks/{due-date-calculator-Dlqegxx9.js → due-date-calculator-DpN0Z9p4.js} +2 -2
  50. package/dist/_chunks/{editable-currency-cell-renderer-CZMQ5xRT.js → editable-currency-cell-renderer-C6z6ABN_.js} +2 -2
  51. package/dist/_chunks/{entity-summary-CPUHzyil.js → entity-summary-DgZSdp6d.js} +2 -2
  52. package/dist/_chunks/{face-scheme-Bxt7ZnJn.js → face-scheme-S88jbOzl.js} +3 -3
  53. package/dist/_chunks/{file-manager-Bsccb8Jj.js → file-manager-kdPsJq_k.js} +5 -5
  54. package/dist/_chunks/{gestational-age-calculator-DXSPWG8u.js → gestational-age-calculator-CCDIhSMV.js} +3 -3
  55. package/dist/_chunks/{hcg-doubling-Dqbj6PQj.js → hcg-doubling-BekuksBv.js} +2 -2
  56. package/dist/_chunks/{header-settings-Cu-MKOsO.js → header-settings-CvZ7Qii6.js} +3 -3
  57. package/dist/_chunks/{heatmap-CFPaEKD_.js → heatmap-Cb4JSpv_.js} +3 -3
  58. package/dist/_chunks/{help-me-write-templates-DO6vJeP4.js → help-me-write-templates-C84_4iwX.js} +2 -2
  59. package/dist/_chunks/{hover-card-CuRIA4wN.js → hover-card-CIiPOlyM.js} +2 -2
  60. package/dist/_chunks/{icon-button-group-SmkdVCNx.js → icon-button-group-CLhC7wjU.js} +2 -2
  61. package/dist/_chunks/{icon-picker-BmU6gpZT.js → icon-picker-Ct6n8GTa.js} +2 -2
  62. package/dist/_chunks/{info-tip-B3cn3fY2.js → info-tip-CkH2En-i.js} +2 -2
  63. package/dist/_chunks/{invoice-upload-list-BR6vycF7.js → invoice-upload-list-CZ1B9yWh.js} +4 -4
  64. package/dist/_chunks/{kit-extensions-QddOSnIq.js → kit-extensions-C_oZ7WOq.js} +4 -4
  65. package/dist/_chunks/{link-cell-renderer-hAJplRFF.js → link-cell-renderer-Bt_sl4iP.js} +5 -5
  66. package/dist/_chunks/{locale-picker-C86h8Yt1.js → locale-picker-OrojXX6E.js} +2 -2
  67. package/dist/_chunks/{marketplace-app-shell-dMmxI6MT.js → marketplace-app-shell-DnL187-U.js} +4 -4
  68. package/dist/_chunks/{message-card-Bw_q1qKx.js → message-card-DvBjcZgH.js} +10 -9
  69. package/dist/_chunks/{message-tray-pLGgLmoG.js → message-tray-BHaE254g.js} +3 -3
  70. package/dist/_chunks/{muscle-scheme-BB2eBfww.js → muscle-scheme-vNd8wU7V.js} +2 -2
  71. package/dist/_chunks/{non-modal-tab-exit-j3CPOuE3.js → non-modal-tab-exit-DqJao_E-.js} +2 -1
  72. package/dist/_chunks/{notes-panel-C4HSUudf.js → notes-panel-DCKbuZqS.js} +400 -397
  73. package/dist/_chunks/{notification-card-DRMv2_pW.js → notification-card-CDuzAytQ.js} +11 -10
  74. package/dist/_chunks/{notification-tray-mlCfxNRH.js → notification-tray-CnPV8jDA.js} +3 -3
  75. package/dist/_chunks/{optical-prescription-GzeK_2cf.js → optical-prescription-CWwrW4YQ.js} +2 -2
  76. package/dist/_chunks/{pagination-C7N_NiRN.js → pagination-BpXG5jVk.js} +2 -2
  77. package/dist/_chunks/{parts-BOnDDU3E.js → parts-IFiXO68Y.js} +3 -3
  78. package/dist/_chunks/{patient-account-settings-nSvNKKOL.js → patient-account-settings-BQ9bMsJS.js} +3 -3
  79. package/dist/_chunks/{patient-check-in-resume-Cj2wg_NQ.js → patient-check-in-resume-v5lYhMsh.js} +5 -5
  80. package/dist/_chunks/{patient-details-D0PjzALT.js → patient-details-6uJZ27ZL.js} +2 -2
  81. package/dist/_chunks/{patient-field-row-DlpIModg.js → patient-field-row-D8Cu_MQp.js} +5 -5
  82. package/dist/_chunks/{patient-search-aTFd7p9s.js → patient-search-C6-INPjs.js} +2 -2
  83. package/dist/_chunks/{patient-summary-card-BP_K7g_q.js → patient-summary-card-NYjO0IfN.js} +3 -3
  84. package/dist/_chunks/{pdf-viewer-TRC5jEm5.js → pdf-viewer-C8no312t.js} +2 -2
  85. package/dist/_chunks/{phone-input-DRKcJUi4.js → phone-input-DHiYJZ9v.js} +2 -2
  86. package/dist/_chunks/{popover-CN5IsOeS.js → popover-CkvP3rHZ.js} +2 -2
  87. package/dist/_chunks/{popup-region-qz_5_A0V.js → popup-region-BgZ8oeUB.js} +2 -2
  88. package/dist/_chunks/{portal-details-Cnyqf9kY.js → portal-details-CwX3VNxh.js} +2 -2
  89. package/dist/_chunks/{portal-documents-g109Dl0O.js → portal-documents-BWdXhWpZ.js} +5 -5
  90. package/dist/_chunks/{portal-parts-DgDFuED8.js → portal-parts-DbCMuZVl.js} +3 -3
  91. package/dist/_chunks/{practice-results-DaxGw9_f.js → practice-results-BUEsl2Pj.js} +3 -3
  92. package/dist/_chunks/{pregnancy-dating-a6WIg4oy.js → pregnancy-dating-wc9iCN0f.js} +3 -3
  93. package/dist/_chunks/{prescription-history-Bp_JHhdF.js → prescription-history-DPjqflwJ.js} +9 -9
  94. package/dist/_chunks/{product-hub-panel-K4QbULG7.js → product-hub-panel-DiWjSIR2.js} +3 -3
  95. package/dist/_chunks/{public-header.agent-DaeDfLfy.js → public-header.agent-Dsl9zhA2.js} +2 -2
  96. package/dist/_chunks/{radiograph-panel.agent-88VjqlG7.js → radiograph-panel.agent-CSpr2paU.js} +4 -4
  97. package/dist/_chunks/{recaptcha-widget-iglUBIF3.js → recaptcha-widget-D6RwGg8B.js} +35 -35
  98. package/dist/_chunks/{registration-form-Cs9o6e5q.js → registration-form-BEsIjznv.js} +4 -4
  99. package/dist/_chunks/{reserved.agent-L2ElYPuj.js → reserved.agent-C_pr0bHy.js} +4 -4
  100. package/dist/_chunks/{rich-text-editor-orJ-hPgm.js → rich-text-editor-DoCaj0qc.js} +8 -8
  101. package/dist/_chunks/{row-actions-BF2-uizV.js → row-actions-C6d6vy5z.js} +3 -3
  102. package/dist/_chunks/{saved-view-tabs-DLWm88Eq.js → saved-view-tabs-CVUM3Nqz.js} +2 -2
  103. package/dist/_chunks/{select-Bm8s3q-X.js → select-Bw5FvGJ7.js} +2 -2
  104. package/dist/_chunks/{send-registration-link-form-C1vw6H1M.js → send-registration-link-form-D-NkS__p.js} +3 -3
  105. package/dist/_chunks/{sheet-BdhYeQQT.js → sheet-BIAhwdyS.js} +2 -2
  106. package/dist/_chunks/{sign-document-DDZbmYHu.js → sign-document-BUhWw-7S.js} +2 -2
  107. package/dist/_chunks/{signature-request-D3sLLOM6.js → signature-request-BfKo3vOz.js} +4 -4
  108. package/dist/_chunks/{signing-end-screen-BdhbkPKO.js → signing-end-screen-Pmda6tCH.js} +4 -4
  109. package/dist/_chunks/{step-up-dialog-C2JqJmCA.js → step-up-dialog-C1O8ctoh.js} +2 -2
  110. package/dist/_chunks/{sync-tray-BhnkgXKK.js → sync-tray-BgrO4QjH.js} +56 -54
  111. package/dist/_chunks/{tab-bar-CeC2QOwB.js → tab-bar-C6tPDq9s.js} +2 -2
  112. package/dist/_chunks/{tabs-BXr5XeGq.js → tabs-BOf9OO--.js} +3 -3
  113. package/dist/_chunks/{task-editor-DDVDPKJf.js → task-editor-DNkrLbgK.js} +7 -6
  114. package/dist/_chunks/{tasks-panel-BHXaPNOZ.js → tasks-panel-CDFHAHrN.js} +139 -139
  115. package/dist/_chunks/{theme-toggle-BQDFxvVS.js → theme-toggle-C2LPw3xr.js} +3 -3
  116. package/dist/_chunks/{timeline-DXko0M1t.js → timeline-BzGi_3GQ.js} +2 -2
  117. package/dist/_chunks/timestamp-UMF1llBs.js +113 -0
  118. package/dist/_chunks/{token-insert-menu-BLtfMTJd.js → token-insert-menu-sGtftx4Y.js} +2 -2
  119. package/dist/_chunks/{tool-rail-Kup1b7xI.js → tool-rail-mWmYNRCV.js} +226 -222
  120. package/dist/_chunks/{toolbar-B7UHCMSr.js → toolbar-JTR20W-U.js} +3 -3
  121. package/dist/_chunks/{tooth-scheme-BtnFgugP.js → tooth-scheme-DpgciFU8.js} +2 -2
  122. package/dist/_chunks/{unit-converter-OBhSDXee.js → unit-converter-D1e1wZRE.js} +2 -2
  123. package/dist/_chunks/{use-appointment-details-read-DeQnmmZw.js → use-appointment-details-read-xj0PyEhI.js} +591 -576
  124. package/dist/_chunks/use-resolved-theme-B0f1_oyq.js +32 -0
  125. package/dist/_chunks/{verify-identity-types-C6Bam8v6.js → verify-identity-types-CpeJIc9F.js} +2 -2
  126. package/dist/_chunks/{voice-control-panel-Dc_NFH2R.js → voice-control-panel-DqvvZN2A.js} +4 -4
  127. package/dist/_chunks/{widget-picker-D3T7e8a4.js → widget-picker-Ddl0lDWV.js} +2 -2
  128. package/dist/_chunks/{workflow-map-DaZFP9SJ.js → workflow-map-CwfLHuiD.js} +3 -3
  129. package/dist/_chunks/{workflow-status-CO0mxXs2.js → workflow-status-Cg7yjnye.js} +2 -2
  130. package/dist/_chunks/{workflow-webhook-action-BsGSh3h9.js → workflow-webhook-action-BUWc2txJ.js} +2 -2
  131. package/dist/agent-catalog.json +10 -7
  132. package/dist/agent-i18n/en.json +3 -3
  133. package/dist/appointment-editor-panel/index.js +2 -2
  134. package/dist/browser-support.js +1 -1
  135. package/dist/calendar-action-buttons/index.js +1 -1
  136. package/dist/components/_shared/non-modal-tab-exit.d.ts +1 -0
  137. package/dist/components/ai-credits-notice/index.js +1 -1
  138. package/dist/components/ai-permission-notice/index.js +1 -1
  139. package/dist/components/ai-prompt-input/index.js +1 -1
  140. package/dist/components/ai-summary-panel/index.js +1 -1
  141. package/dist/components/anamnesis-card/index.js +1 -1
  142. package/dist/components/appointment-card/index.js +2 -2
  143. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +3 -0
  144. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +5 -0
  145. package/dist/components/appointment-details-panel/index.js +1 -1
  146. package/dist/components/appointment-peek/index.js +1 -1
  147. package/dist/components/appointment-timeline/appointment-timeline.d.ts +27 -0
  148. package/dist/components/appointment-timeline/index.js +1 -1
  149. package/dist/components/audio-recorder/index.js +1 -1
  150. package/dist/components/bill-line-table/index.js +1 -1
  151. package/dist/components/bill-table/index.js +1 -1
  152. package/dist/components/bishop-score/index.js +1 -1
  153. package/dist/components/booking/index.js +1 -1
  154. package/dist/components/button-group/index.js +1 -1
  155. package/dist/components/calculator-dialog/index.js +1 -1
  156. package/dist/components/calls-panel/index.js +1 -1
  157. package/dist/components/care-plan-card/index.js +1 -1
  158. package/dist/components/care-plan-entry-card/index.js +1 -1
  159. package/dist/components/care-plan-header/index.js +1 -1
  160. package/dist/components/chart/index.js +1 -1
  161. package/dist/components/chat-message/index.js +1 -1
  162. package/dist/components/clinical-note-card/clinical-note-card.d.ts +2 -1
  163. package/dist/components/clinical-note-card/index.js +1 -1
  164. package/dist/components/color-picker/index.js +1 -1
  165. package/dist/components/communications-panel/index.js +1 -1
  166. package/dist/components/control-room-rail/index.js +1 -1
  167. package/dist/components/cycle-calculator/index.js +1 -1
  168. package/dist/components/dashboard-grid/index.js +1 -1
  169. package/dist/components/data-grid/index.js +2 -2
  170. package/dist/components/data-grid-tabs/index.js +1 -1
  171. package/dist/components/data-table/index.js +4 -4
  172. package/dist/components/data-table-tabs/index.js +1 -1
  173. package/dist/components/date-picker/index.js +1 -1
  174. package/dist/components/date-range-picker/index.js +1 -1
  175. package/dist/components/date-time-picker/index.js +1 -1
  176. package/dist/components/dialog/dialog-container.d.ts +27 -0
  177. package/dist/components/dialog/dialog.d.ts +12 -2
  178. package/dist/components/dialog/index.d.ts +3 -1
  179. package/dist/components/dialog/index.js +5 -3
  180. package/dist/components/document-preview/index.js +1 -1
  181. package/dist/components/dropdown-menu/index.js +1 -1
  182. package/dist/components/due-date-calculator/index.js +1 -1
  183. package/dist/components/entity-summary/index.js +1 -1
  184. package/dist/components/face-scheme/index.js +1 -1
  185. package/dist/components/file-manager/index.js +1 -1
  186. package/dist/components/gestational-age-calculator/index.js +1 -1
  187. package/dist/components/hcg-doubling/index.js +1 -1
  188. package/dist/components/header-settings/index.js +1 -1
  189. package/dist/components/heatmap/index.js +1 -1
  190. package/dist/components/hover-card/index.js +1 -1
  191. package/dist/components/icon-button-group/index.js +1 -1
  192. package/dist/components/icon-picker/index.js +1 -1
  193. package/dist/components/info-tip/index.js +1 -1
  194. package/dist/components/invoice-upload-list/index.js +1 -1
  195. package/dist/components/locale-picker/index.js +1 -1
  196. package/dist/components/message-card/index.js +1 -1
  197. package/dist/components/message-tray/index.js +1 -1
  198. package/dist/components/muscle-scheme/index.js +1 -1
  199. package/dist/components/notes-panel/index.js +1 -1
  200. package/dist/components/notes-panel/notes-panel.d.ts +5 -4
  201. package/dist/components/notification-card/index.js +1 -1
  202. package/dist/components/notification-tray/index.js +1 -1
  203. package/dist/components/optical-prescription/index.js +1 -1
  204. package/dist/components/pagination/index.js +1 -1
  205. package/dist/components/patient-details/index.js +1 -1
  206. package/dist/components/patient-search/index.js +1 -1
  207. package/dist/components/patient-summary-card/index.js +1 -1
  208. package/dist/components/patient-table/index.js +1 -1
  209. package/dist/components/pdf-viewer/index.js +1 -1
  210. package/dist/components/phone-input/index.js +1 -1
  211. package/dist/components/popover/index.js +1 -1
  212. package/dist/components/practice-results/index.js +1 -1
  213. package/dist/components/pregnancy-dating/index.js +1 -1
  214. package/dist/components/product-hub-tray/index.js +1 -1
  215. package/dist/components/public-header/index.js +1 -1
  216. package/dist/components/radiograph-panel/index.js +1 -1
  217. package/dist/components/recaptcha-widget/index.js +1 -1
  218. package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +1 -1
  219. package/dist/components/rich-text-editor/index.js +2 -2
  220. package/dist/components/row-actions/index.js +1 -1
  221. package/dist/components/select/index.js +1 -1
  222. package/dist/components/sheet/index.js +1 -1
  223. package/dist/components/sign-document/index.js +1 -1
  224. package/dist/components/skeleton-scheme/index.js +1 -1
  225. package/dist/components/step-up-dialog/index.js +1 -1
  226. package/dist/components/sync-tray/index.js +1 -1
  227. package/dist/components/tab-bar/index.js +1 -1
  228. package/dist/components/tabs/index.js +1 -1
  229. package/dist/components/task-editor/index.js +1 -1
  230. package/dist/components/tasks-panel/index.js +1 -1
  231. package/dist/components/theme-toggle/index.js +1 -1
  232. package/dist/components/timeline/index.js +1 -1
  233. package/dist/components/timestamp/index.js +1 -1
  234. package/dist/components/timestamp/timestamp.d.ts +6 -0
  235. package/dist/components/token-insert-menu/index.js +1 -1
  236. package/dist/components/tool-rail/index.js +1 -1
  237. package/dist/components/tooth-scheme/index.js +1 -1
  238. package/dist/components/unit-converter/index.js +1 -1
  239. package/dist/components/voice-control-panel/index.js +1 -1
  240. package/dist/components/widget-picker/index.js +1 -1
  241. package/dist/components/workflow/index.js +1 -1
  242. package/dist/components/workflow-status/index.js +1 -1
  243. package/dist/core.css +1 -1
  244. package/dist/find-free-slots-panel/index.js +1 -1
  245. package/dist/hooks/index.d.ts +2 -0
  246. package/dist/hooks/index.js +58 -56
  247. package/dist/hooks/use-resolved-theme.d.ts +20 -0
  248. package/dist/i18n/locales/ar.d.ts +5 -0
  249. package/dist/i18n/locales/ar.js +5 -0
  250. package/dist/i18n/locales/de.d.ts +5 -0
  251. package/dist/i18n/locales/de.js +5 -0
  252. package/dist/i18n/locales/el.d.ts +5 -0
  253. package/dist/i18n/locales/el.js +5 -0
  254. package/dist/i18n/locales/en.d.ts +5 -0
  255. package/dist/i18n/locales/en.js +5 -0
  256. package/dist/i18n/locales/es.d.ts +5 -0
  257. package/dist/i18n/locales/es.js +5 -0
  258. package/dist/i18n/locales/fr.d.ts +5 -0
  259. package/dist/i18n/locales/fr.js +5 -0
  260. package/dist/i18n/locales/hi.d.ts +5 -0
  261. package/dist/i18n/locales/hi.js +5 -0
  262. package/dist/i18n/locales/it.d.ts +5 -0
  263. package/dist/i18n/locales/it.js +5 -0
  264. package/dist/i18n/locales/ja.d.ts +5 -0
  265. package/dist/i18n/locales/ja.js +5 -0
  266. package/dist/i18n/locales/nl.d.ts +5 -0
  267. package/dist/i18n/locales/nl.js +5 -0
  268. package/dist/i18n/locales/pl.d.ts +5 -0
  269. package/dist/i18n/locales/pl.js +5 -0
  270. package/dist/i18n/locales/pt.d.ts +5 -0
  271. package/dist/i18n/locales/pt.js +5 -0
  272. package/dist/i18n/locales/ro.d.ts +5 -0
  273. package/dist/i18n/locales/ro.js +5 -0
  274. package/dist/i18n/locales/ru.d.ts +5 -0
  275. package/dist/i18n/locales/ru.js +5 -0
  276. package/dist/i18n/locales/sq.d.ts +5 -0
  277. package/dist/i18n/locales/sq.js +5 -0
  278. package/dist/i18n/locales/sv.d.ts +5 -0
  279. package/dist/i18n/locales/sv.js +5 -0
  280. package/dist/i18n/locales/tr.d.ts +5 -0
  281. package/dist/i18n/locales/tr.js +5 -0
  282. package/dist/i18n/locales/zh.d.ts +5 -0
  283. package/dist/i18n/locales/zh.js +5 -0
  284. package/dist/index.js +949 -947
  285. package/dist/locales/ar.json +5 -0
  286. package/dist/locales/de.json +5 -0
  287. package/dist/locales/el.json +5 -0
  288. package/dist/locales/en.json +5 -0
  289. package/dist/locales/es.json +5 -0
  290. package/dist/locales/fr.json +5 -0
  291. package/dist/locales/hi.json +5 -0
  292. package/dist/locales/it.json +5 -0
  293. package/dist/locales/ja.json +5 -0
  294. package/dist/locales/nl.json +5 -0
  295. package/dist/locales/pl.json +5 -0
  296. package/dist/locales/pt.json +5 -0
  297. package/dist/locales/ro.json +5 -0
  298. package/dist/locales/ru.json +5 -0
  299. package/dist/locales/sq.json +5 -0
  300. package/dist/locales/sv.json +5 -0
  301. package/dist/locales/tr.json +5 -0
  302. package/dist/locales/zh.json +5 -0
  303. package/dist/online-bookings-panel/index.js +1 -1
  304. package/dist/patterns/alia-assistant/index.js +1 -1
  305. package/dist/patterns/anamnesis/index.js +1 -1
  306. package/dist/patterns/calendar/index.js +3 -3
  307. package/dist/patterns/help-me-write-templates/index.js +1 -1
  308. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  309. package/dist/patterns/patient-account-settings/index.js +1 -1
  310. package/dist/patterns/patient-check-in/index.js +1 -1
  311. package/dist/patterns/patient-portal/index.js +2 -2
  312. package/dist/patterns/prescription/index.js +1 -1
  313. package/dist/patterns/registration-form/index.js +1 -1
  314. package/dist/patterns/send-registration-link-form/index.js +1 -1
  315. package/dist/patterns/signature-request/index.js +1 -1
  316. package/dist/patterns/signing/index.js +1 -1
  317. package/dist/patterns/verify-identity/index.js +1 -1
  318. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  319. package/dist/tokens.css +1 -1
  320. package/dist/waiting-list-panel/index.js +2 -2
  321. package/package.json +1 -1
  322. package/dist/_chunks/appointment-timeline-Bs-rTMzi.js +0 -689
  323. package/dist/_chunks/dialog-CVTxyR0v.js +0 -349
  324. package/dist/_chunks/timestamp-DPLDWdxA.js +0 -109
@@ -1,29 +1,29 @@
1
- import { jsxs as b, jsx as i, Fragment as Ln } from "react/jsx-runtime";
2
- import { forwardRef as qn, useRef as u, useState as C, useId as _n, useEffect as S, useCallback as W, useMemo as pt, useImperativeHandle as Dn } from "react";
3
- import { c as Et } from "./index-D2ZczOXr.js";
4
- import { useTranslation as kn } from "react-i18next";
5
- import { g as mt } from "./get-error-message-DbFUzuja.js";
6
- import { h as Rt } from "./handled-rejection-C-6Dq0As.js";
7
- import { u as zn } from "./registry-DvAUVLHh.js";
8
- import { C as Hn } from "./clinical-note-card-D--IwbZa.js";
9
- import { R as Mn } from "./rich-text-editor-orJ-hPgm.js";
10
- import { T as Wn } from "./text-area-COMVJ1yE.js";
11
- import { A as j } from "./alert-C4WKViaS.js";
12
- import { B as te } from "./button-DohK_Ak_.js";
13
- import { I as vt } from "./icon-button-S8_weU3g.js";
14
- import { S as $n } from "./switch-DO6uC4HJ.js";
15
- import { T as Bn } from "./tooltip-uEBdD1-5.js";
16
- import { C as yt } from "./card-n6W6LW-N.js";
17
- import { C as Kn, S as ve } from "./skeleton-tTWJpvAq.js";
18
- import { D as L } from "./dialog-CVTxyR0v.js";
19
- import { P as In } from "./panel-header-CbtlTe85.js";
20
- import { a as Yn, u as Gn, R as Jn } from "./use-list-reflow-C7O4Uqnl.js";
21
- import { u as Qn } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
22
- import { u as Un } from "./use-theme-CYGyzFgZ.js";
23
- import { N as Xn } from "./notebook-pen-CO7HoM-W.js";
24
- import { P as Zn } from "./pencil-B1sKKyuT.js";
25
- import { T as er } from "./trash-2-uumy3fy1.js";
26
- const tr = {
1
+ import { jsxs as b, jsx as i, Fragment as qn } from "react/jsx-runtime";
2
+ import { forwardRef as _n, useRef as u, useState as x, useId as Dn, useEffect as C, useCallback as W, useMemo as mt, useImperativeHandle as kn } from "react";
3
+ import { c as Rt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as zn } from "react-i18next";
5
+ import { g as vt } from "./get-error-message-DbFUzuja.js";
6
+ import { h as Nt } from "./handled-rejection-C-6Dq0As.js";
7
+ import { u as Hn } from "./registry-DvAUVLHh.js";
8
+ import { C as Mn } from "./clinical-note-card-D-9xmRpf.js";
9
+ import { R as Wn } from "./rich-text-editor-DoCaj0qc.js";
10
+ import { T as $n } from "./text-area-COMVJ1yE.js";
11
+ import { A as L } from "./alert-C4WKViaS.js";
12
+ import { B as ne } from "./button-DohK_Ak_.js";
13
+ import { I as yt } from "./icon-button-S8_weU3g.js";
14
+ import { S as Bn } from "./switch-DO6uC4HJ.js";
15
+ import { T as Kn } from "./tooltip-uEBdD1-5.js";
16
+ import { C as bt } from "./card-n6W6LW-N.js";
17
+ import { C as In, S as ye } from "./skeleton-tTWJpvAq.js";
18
+ import { D as q } from "./dialog-239Geb7Z.js";
19
+ import { P as Yn } from "./panel-header-CbtlTe85.js";
20
+ import { a as Gn, u as Jn, R as Qn } from "./use-list-reflow-C7O4Uqnl.js";
21
+ import { u as Un } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
22
+ import { u as Xn } from "./use-resolved-theme-B0f1_oyq.js";
23
+ import { N as Zn } from "./notebook-pen-CO7HoM-W.js";
24
+ import { P as er } from "./pencil-B1sKKyuT.js";
25
+ import { T as tr } from "./trash-2-uumy3fy1.js";
26
+ const nr = {
27
27
  id: "notes-panel",
28
28
  // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
29
29
  // with no dedicated capability in the closed vocabulary.
@@ -111,12 +111,12 @@ const tr = {
111
111
  // Reaches the host's data source; the result is the host's promise.
112
112
  openWorld: !0,
113
113
  errors: [
114
- "The panel offers no flag here: no onToggleFlag, no note with this id, or a deleted note.",
114
+ "The panel offers no flag here: no onToggleFlag, no note with this id, a deleted note, or actions.flag is false.",
115
115
  "A flag or delete for this note is still pending. Read notes again once it has settled.",
116
116
  "The host refused the change. The flag is restored and the panel shows the host's message."
117
117
  ],
118
118
  descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
119
- description: "Toggle the flagged state of the note with the given id. Returns the host's promise; a refusal restores the flag and the panel shows the host's message. Rejects without reaching the host when the panel refuses: a deleted note, or a write for the note still pending.",
119
+ description: "Toggle the flagged state of the note with the given id. Returns the host's promise; a refusal restores the flag and the panel shows the host's message. Rejects without reaching the host when the panel refuses: a deleted note, actions.flag false, or a write for the note still pending.",
120
120
  invoke: (o, f) => o.toggleFlag(f.id)
121
121
  }
122
122
  },
@@ -136,7 +136,7 @@ const tr = {
136
136
  description: "Stable note id on each rendered note row. Row controls carry data-note-action: edit, delete, pin or flag."
137
137
  }
138
138
  }
139
- }, nr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", rr = Et(
139
+ }, rr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", sr = Rt(
140
140
  "ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
141
141
  {
142
142
  variants: {
@@ -144,11 +144,11 @@ const tr = {
144
144
  true: "ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
145
145
  false: ""
146
146
  },
147
- washed: { true: nr, false: "" }
147
+ washed: { true: rr, false: "" }
148
148
  },
149
149
  defaultVariants: { current: !1, washed: !1 }
150
150
  }
151
- ), bt = Et(
151
+ ), wt = Rt(
152
152
  "ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]",
153
153
  {
154
154
  variants: {
@@ -164,39 +164,39 @@ const tr = {
164
164
  }
165
165
  }
166
166
  }
167
- ), Nt = [
167
+ ), At = [
168
168
  "ds:rounded-[var(--radius-lg)] ds:outline-none",
169
169
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
170
170
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
171
- ].join(" "), sr = ["ds:flex ds:flex-col", Nt].join(" "), ir = "ds:opacity-0", lr = [
171
+ ].join(" "), ir = ["ds:flex ds:flex-col", At].join(" "), lr = "ds:opacity-0", ar = [
172
172
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
173
173
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
174
- ].join(" "), ar = [3, 2, 3];
175
- function wt(o) {
174
+ ].join(" "), or = [3, 2, 3];
175
+ function Pt(o) {
176
176
  return o ? /<img\b/i.test(o) ? !0 : o.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
177
177
  }
178
- function Pt(o, f, y) {
178
+ function Tt(o, f, y) {
179
179
  const p = o == null ? void 0 : o.toggle(f, y), m = p ? p.refusal : "the panel is not mounted";
180
- return m === void 0 ? p == null ? void 0 : p.result : Rt(new Error(`NotesPanel: ${y} refused (${m}).`));
180
+ return m === void 0 ? p == null ? void 0 : p.result : Nt(new Error(`NotesPanel: ${y} refused (${m}).`));
181
181
  }
182
- const Tt = /* @__PURE__ */ new Map(), xt = /* @__PURE__ */ new Set();
183
- function ye(o) {
182
+ const xt = /* @__PURE__ */ new Map(), Ct = /* @__PURE__ */ new Set();
183
+ function be(o) {
184
184
  return o.map(
185
185
  (f) => `${f.id ?? ""}:${f.pinned ? 1 : 0}${f.flagged ? 1 : 0}${f.deleted ? 1 : 0}`
186
186
  ).join("|");
187
187
  }
188
- function Ct(o) {
188
+ function St(o) {
189
189
  return typeof (o == null ? void 0 : o.then) == "function";
190
190
  }
191
- function St(o, f, y) {
191
+ function Et(o, f, y) {
192
192
  const p = o.indexOf(y);
193
193
  if (p >= 0) return p;
194
194
  const m = f.indexOf(y);
195
195
  if (m < 0) return -1;
196
- const ne = new Set(o);
197
- return f.slice(0, m).filter((E) => ne.has(E)).length;
196
+ const re = new Set(o);
197
+ return f.slice(0, m).filter((S) => re.has(S)).length;
198
198
  }
199
- function or(o) {
199
+ function dr(o) {
200
200
  if (o.hasAttribute("tabindex")) {
201
201
  o.focus();
202
202
  return;
@@ -204,154 +204,154 @@ function or(o) {
204
204
  const f = () => o.removeAttribute("tabindex");
205
205
  o.setAttribute("tabindex", "-1"), o.focus(), document.activeElement === o ? o.addEventListener("blur", f, { once: !0 }) : f();
206
206
  }
207
- const Lr = qn(
207
+ const qr = _n(
208
208
  function({
209
209
  id: f,
210
210
  notes: y,
211
211
  onAddNote: p,
212
212
  status: m = "ready",
213
- onRetry: ne,
214
- currentNoteId: E,
215
- currentNoteKey: qe,
216
- composer: F = "rich",
217
- editorToolbar: At = "standard",
218
- redactor: Ft,
219
- imageUploadUrl: Vt,
220
- showClinicalToggle: Ot = !0,
221
- canAddClinicalNote: re = !0,
222
- clinicalGatedReason: jt,
213
+ onRetry: re,
214
+ currentNoteId: S,
215
+ currentNoteKey: _e,
216
+ composer: A = "rich",
217
+ editorToolbar: Ft = "standard",
218
+ redactor: Vt,
219
+ imageUploadUrl: Ot,
220
+ showClinicalToggle: jt = !0,
221
+ canAddClinicalNote: se = !0,
222
+ clinicalGatedReason: Lt,
223
223
  defaultClinical: $ = !1,
224
- onRequestAiDraft: Lt,
225
- aiDraftFormat: qt,
226
- aiPrivacyNotice: _t,
227
- onDictate: Dt,
228
- onProofread: kt,
229
- onAutoFormat: zt,
230
- aiConsent: Ht,
231
- variables: Mt,
232
- validateVariable: Wt,
233
- onVariableValidityChange: $t,
234
- renderHelpMeWrite: Bt,
235
- aiTemplates: Kt,
236
- onAiApplied: It,
237
- onUploadImage: Yt,
238
- onAiCreditsExhausted: Gt,
239
- showExtensions: Jt,
240
- aiCreditsNotice: Qt,
241
- extensions: Ut,
242
- extensionContext: Xt,
243
- onExtensionRun: Zt,
244
- composerBefore: en,
245
- composerAfter: tn,
246
- onTogglePin: _e,
247
- onToggleFlag: De,
248
- noteActions: ke,
224
+ onRequestAiDraft: qt,
225
+ aiDraftFormat: _t,
226
+ aiPrivacyNotice: Dt,
227
+ onDictate: kt,
228
+ onProofread: zt,
229
+ onAutoFormat: Ht,
230
+ aiConsent: Mt,
231
+ variables: Wt,
232
+ validateVariable: $t,
233
+ onVariableValidityChange: Bt,
234
+ renderHelpMeWrite: Kt,
235
+ aiTemplates: It,
236
+ onAiApplied: Yt,
237
+ onUploadImage: Gt,
238
+ onAiCreditsExhausted: Jt,
239
+ showExtensions: Qt,
240
+ aiCreditsNotice: Ut,
241
+ extensions: Xt,
242
+ extensionContext: Zt,
243
+ onExtensionRun: en,
244
+ composerBefore: tn,
245
+ composerAfter: nn,
246
+ onTogglePin: De,
247
+ onToggleFlag: ke,
248
+ noteActions: ze,
249
249
  onEditNote: B,
250
- editClinical: nn = !1,
250
+ editClinical: rn = !1,
251
251
  onDeleteNote: K,
252
- onWriteError: ze,
253
- confirmDelete: He = !0,
254
- title: rn,
255
- composerPlaceholder: sn,
256
- addNoteLabel: ln,
257
- emptyState: an,
258
- className: on,
259
- "aria-label": be,
260
- ...dn
261
- }, cn) {
262
- var ht;
263
- const { t: a, i18n: Me } = kn("ui"), q = u(null), [k, I] = C(""), [se, ie] = C($), [P, We] = C(!1), [$e, le] = C(null), [g, we] = C(null), Be = u(g);
264
- Be.current = g;
265
- const Ke = u(!1);
266
- m === "loading" && (Ke.current = !0);
267
- const un = Ke.current ? Kn : "", fn = rn ?? a("notesPanel.title", { defaultValue: "Notes" }), Ie = _n(), Ye = sn ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), Ge = g !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), gn = F === "rich" ? wt(k) : k.trim().length > 0, R = u(y);
268
- R.current = y;
269
- const [Y, hn] = C(Tt), N = u(Tt), [pn, mn] = C(xt), G = u(xt), V = u(!0);
270
- S(() => (V.current = !0, () => {
271
- V.current = !1;
252
+ onWriteError: He,
253
+ confirmDelete: Me = !0,
254
+ title: sn,
255
+ composerPlaceholder: ln,
256
+ addNoteLabel: an,
257
+ emptyState: on,
258
+ className: dn,
259
+ "aria-label": we,
260
+ ...cn
261
+ }, un) {
262
+ var pt;
263
+ const { t: a, i18n: We } = zn("ui"), _ = u(null), [k, I] = x(""), [ie, le] = x($), [P, $e] = x(!1), [Be, ae] = x(null), [g, Pe] = x(null), Ke = u(g);
264
+ Ke.current = g;
265
+ const Ie = u(!1);
266
+ m === "loading" && (Ie.current = !0);
267
+ const fn = Ie.current ? In : "", gn = sn ?? a("notesPanel.title", { defaultValue: "Notes" }), Ye = Dn(), Ge = ln ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), Je = g !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), hn = A === "rich" ? Pt(k) : k.trim().length > 0, E = u(y);
268
+ E.current = y;
269
+ const [Y, pn] = x(xt), R = u(xt), [mn, vn] = x(Ct), G = u(Ct), F = u(!0);
270
+ C(() => (F.current = !0, () => {
271
+ F.current = !1;
272
272
  }), []);
273
- const _ = u(null), D = u(ze);
274
- D.current = ze;
275
- const Pe = W(() => {
276
- const e = _.current;
277
- return !V.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
278
- }, []), J = u([]), [vn, yn] = C(0), Te = W((e) => {
279
- if (!V.current) {
273
+ const V = u(null), D = u(He);
274
+ D.current = He;
275
+ const Te = W(() => {
276
+ const e = V.current;
277
+ return !F.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
278
+ }, []), J = u([]), [yn, bn] = x(0), xe = W((e) => {
279
+ if (!F.current) {
280
280
  e(!1);
281
281
  return;
282
282
  }
283
- J.current.push(e), yn((t) => t + 1);
283
+ J.current.push(e), bn((t) => t + 1);
284
284
  }, []);
285
- S(() => {
285
+ C(() => {
286
286
  const e = J.current;
287
287
  J.current = [], e.forEach((t) => t(!0));
288
- }, [vn]), S(
288
+ }, [yn]), C(
289
289
  () => () => {
290
290
  const e = J.current;
291
291
  J.current = [], e.forEach((t) => t(!1));
292
292
  },
293
293
  []
294
294
  );
295
- const Je = (e) => {
296
- const t = new Map(N.current);
297
- e(t), N.current = t, hn(t);
298
- }, xe = (e) => {
295
+ const Qe = (e) => {
296
+ const t = new Map(R.current);
297
+ e(t), R.current = t, pn(t);
298
+ }, Ce = (e) => {
299
299
  const t = new Set(G.current);
300
- e(t), G.current = t, mn(t);
301
- }, ae = (e, t) => {
300
+ e(t), G.current = t, vn(t);
301
+ }, oe = (e, t) => {
302
302
  var n;
303
- return (n = N.current.get(e)) == null ? void 0 : n[t];
304
- }, Q = (e, t, n) => Je((l) => {
303
+ return (n = R.current.get(e)) == null ? void 0 : n[t];
304
+ }, Q = (e, t, n) => Qe((l) => {
305
305
  const s = { ...l.get(e) };
306
306
  n ? s[t] = n : delete s[t], Object.keys(s).length > 0 ? l.set(e, s) : l.delete(e);
307
- }), Qe = (e) => {
307
+ }), Ue = (e) => {
308
308
  var t;
309
- return e != null && !!((t = N.current.get(e)) != null && t.delete);
310
- }, bn = W(() => {
309
+ return e != null && !!((t = R.current.get(e)) != null && t.delete);
310
+ }, wn = W(() => {
311
311
  var h;
312
312
  if (!(g !== null ? B : p) || P) return;
313
- const t = F === "rich", n = t ? ((h = q.current) == null ? void 0 : h.getHTML()) ?? k : k.trim();
314
- if (t ? !wt(n) : !n) return;
313
+ const t = A === "rich", n = t ? ((h = _.current) == null ? void 0 : h.getHTML()) ?? k : k.trim();
314
+ if (t ? !Pt(n) : !n) return;
315
315
  const l = () => {
316
316
  var c;
317
- t && ((c = q.current) == null || c.clear()), I(""), ie($), we(null);
317
+ t && ((c = _.current) == null || c.clear()), I(""), le($), Pe(null);
318
318
  };
319
- le(null);
320
- const s = g, r = (c) => Te((v) => {
321
- var A;
322
- const T = v && (s === null || Be.current === s && R.current.some((x) => x.id === s && !x.deleted));
323
- T && le(mt(c, a("notesPanel.addFailed"))), (A = D.current) == null || A.call(D, {
319
+ ae(null);
320
+ const s = g, r = (c) => xe((v) => {
321
+ var N;
322
+ const T = v && (s === null || Ke.current === s && E.current.some((te) => te.id === s && !te.deleted));
323
+ T && ae(vt(c, a("notesPanel.addFailed"))), (N = D.current) == null || N.call(D, {
324
324
  kind: s !== null ? "edit" : "add",
325
325
  noteId: s ?? void 0,
326
326
  error: c,
327
- shown: T && Pe()
327
+ shown: T && Te()
328
328
  });
329
329
  });
330
330
  let d;
331
331
  try {
332
- d = g !== null && B ? B(g, { content: n, clinical: se }) : p == null ? void 0 : p({ content: n, clinical: se });
332
+ d = g !== null && B ? B(g, { content: n, clinical: ie }) : p == null ? void 0 : p({ content: n, clinical: ie });
333
333
  } catch (c) {
334
334
  r(c);
335
335
  return;
336
336
  }
337
337
  if (!d || typeof d.then != "function") return l();
338
- We(!0), Promise.resolve(d).then(l, r).finally(() => We(!1));
338
+ $e(!0), Promise.resolve(d).then(l, r).finally(() => $e(!1));
339
339
  }, [
340
- F,
340
+ A,
341
341
  k,
342
- se,
342
+ ie,
343
343
  $,
344
344
  g,
345
- Te,
345
+ xe,
346
346
  p,
347
347
  B,
348
- Pe,
348
+ Te,
349
349
  P,
350
350
  a
351
- ]), Ue = Ot && (g === null || nn), wn = g !== null && !!((ht = Y.get(g)) != null && ht.delete), oe = W(
351
+ ]), Xe = jt && (g === null || rn), Pn = g !== null && !!((pt = Y.get(g)) != null && pt.delete), de = W(
352
352
  (e) => {
353
353
  try {
354
- return new Intl.DateTimeFormat(Me.language, {
354
+ return new Intl.DateTimeFormat(We.language, {
355
355
  day: "numeric",
356
356
  month: "long",
357
357
  year: "numeric",
@@ -362,56 +362,56 @@ const Lr = qn(
362
362
  return e.dateIso;
363
363
  }
364
364
  },
365
- [Me.language]
366
- ), Pn = W(
365
+ [We.language]
366
+ ), Tn = W(
367
367
  (e) => {
368
368
  var n, l, s, r;
369
- if (!e.id || P || (n = N.current.get(e.id)) != null && n.delete) return;
369
+ if (!e.id || P || (n = R.current.get(e.id)) != null && n.delete) return;
370
370
  const t = e.content ?? "";
371
- le(null), we(e.id), ie(e.clinical ?? !1), I(t), F === "rich" && ((l = q.current) == null || l.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
371
+ ae(null), Pe(e.id), le(e.clinical ?? !1), I(t), A === "rich" && ((l = _.current) == null || l.clear(), (s = _.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = _.current) == null || r.focus();
372
372
  },
373
- [F, P]
374
- ), de = W(() => {
373
+ [A, P]
374
+ ), ce = W(() => {
375
375
  var e;
376
- F === "rich" && ((e = q.current) == null || e.clear()), I(""), ie($), le(null), we(null);
377
- }, [F, $]), Xe = g === null || y.some((e) => e.id === g && !e.deleted);
378
- S(() => {
379
- Xe || de();
380
- }, [Xe, de]);
381
- const Ce = (e) => {
376
+ A === "rich" && ((e = _.current) == null || e.clear()), I(""), le($), ae(null), Pe(null);
377
+ }, [A, $]), Ze = g === null || y.some((e) => e.id === g && !e.deleted);
378
+ C(() => {
379
+ Ze || ce();
380
+ }, [Ze, ce]);
381
+ const Se = (e) => {
382
382
  var t, n;
383
383
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.pin) == null ? void 0 : n.next : void 0) ?? !!e.pinned;
384
- }, Tn = (e) => {
384
+ }, xn = (e) => {
385
385
  var t, n;
386
386
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.flag) == null ? void 0 : n.next : void 0) ?? !!e.flagged;
387
- }, z = y.filter((e) => !e.id || !pn.has(e.id)).sort((e, t) => Number(Ce(t)) - Number(Ce(e))), Ze = z.flatMap((e) => e.id ? [e.id] : []), H = u([]);
388
- H.current = Ze.filter(
387
+ }, z = y.filter((e) => !e.id || !mn.has(e.id)).sort((e, t) => Number(Se(t)) - Number(Se(e))), et = z.flatMap((e) => e.id ? [e.id] : []), H = u([]);
388
+ H.current = et.filter(
389
389
  (e) => {
390
390
  var t;
391
391
  return !((t = Y.get(e)) != null && t.delete);
392
392
  }
393
393
  );
394
- const Se = u([]);
395
- Se.current = Ze;
396
- const { resolvedTheme: xn } = Un(), et = xn.endsWith("-accessible") || void 0, { containerRef: Cn } = Yn({
394
+ const Ee = u([]);
395
+ Ee.current = et;
396
+ const { isAccessible: Cn } = Xn(V), tt = Cn || void 0, { containerRef: Sn } = Gn({
397
397
  key: z.map((e) => e.id).join(),
398
- reduceMotion: et
399
- }), ce = Gn({ reduceMotion: et }), [w, ue] = C(null), tt = u(0), Ee = u(0), nt = () => {
400
- Ee.current += 1, ue(null);
401
- }, fe = (e, t, n, l = !0) => {
402
- const s = Ee.current;
403
- Te((r) => {
398
+ reduceMotion: tt
399
+ }), ue = Jn({ reduceMotion: tt }), [w, fe] = x(null), nt = u(0), Re = u(0), rt = () => {
400
+ Re.current += 1, fe(null);
401
+ }, ge = (e, t, n, l = !0) => {
402
+ const s = Re.current;
403
+ xe((r) => {
404
404
  var h;
405
- const d = r && l && s === Ee.current && Pe() && R.current.some((c) => c.id === t) && (e === "delete" || !Qe(t) && !G.current.has(t));
406
- d && (tt.current += 1, ue({
405
+ const d = r && l && s === Re.current && Te() && E.current.some((c) => c.id === t) && (e === "delete" || !Ue(t) && !G.current.has(t));
406
+ d && (nt.current += 1, fe({
407
407
  kind: e,
408
408
  noteId: t,
409
- message: mt(n, ""),
410
- seq: tt.current
409
+ message: vt(n, ""),
410
+ seq: nt.current
411
411
  })), (h = D.current) == null || h.call(D, { kind: e, noteId: t, error: n, shown: d });
412
412
  });
413
- }, Sn = (e) => {
414
- const t = y.find((l) => l.id === e.noteId), n = t != null && t.dateIso ? oe(t) : "";
413
+ }, En = (e) => {
414
+ const t = y.find((l) => l.id === e.noteId), n = t != null && t.dateIso ? de(t) : "";
415
415
  if (n)
416
416
  switch (e.kind) {
417
417
  case "delete":
@@ -437,24 +437,24 @@ const Lr = qn(
437
437
  default:
438
438
  return a("notesPanel.unflagFailed");
439
439
  }
440
- }, ge = w !== null && y.some((e) => e.id === w.noteId), rt = u(null);
441
- w && ge && (rt.current = w), S(() => {
442
- w && !ge && ue(null);
443
- }, [w, ge]);
444
- const [Re, st] = C({ text: "", seq: 0 }), Ne = u(void 0), it = (e) => {
445
- st((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(Ne.current), Ne.current = window.setTimeout(
446
- () => st((t) => ({ ...t, text: "" })),
440
+ }, he = w !== null && y.some((e) => e.id === w.noteId), st = u(null);
441
+ w && he && (st.current = w), C(() => {
442
+ w && !he && fe(null);
443
+ }, [w, he]);
444
+ const [Ne, it] = x({ text: "", seq: 0 }), Ae = u(void 0), lt = (e) => {
445
+ it((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(Ae.current), Ae.current = window.setTimeout(
446
+ () => it((t) => ({ ...t, text: "" })),
447
447
  1e3
448
448
  );
449
449
  };
450
- S(() => () => window.clearTimeout(Ne.current), []);
451
- const lt = () => it(a("notesPanel.deleted")), he = u(0), at = u(m);
452
- S(() => {
453
- at.current === "loading" && m === "ready" && (he.current += 1), at.current = m;
450
+ C(() => () => window.clearTimeout(Ae.current), []);
451
+ const at = () => lt(a("notesPanel.deleted")), pe = u(0), ot = u(m);
452
+ C(() => {
453
+ ot.current === "loading" && m === "ready" && (pe.current += 1), ot.current = m;
454
454
  }, [m]);
455
- const ot = () => {
456
- const e = R.current, t = ye(e), n = new Map(e.map((r) => [r.id, r])), l = [];
457
- if (N.current.forEach((r, d) => {
455
+ const dt = () => {
456
+ const e = E.current, t = be(e), n = new Map(e.map((r) => [r.id, r])), l = [];
457
+ if (R.current.forEach((r, d) => {
458
458
  const h = n.get(d);
459
459
  Object.keys(r).forEach((c) => {
460
460
  const v = r[c];
@@ -464,55 +464,57 @@ const Lr = qn(
464
464
  return;
465
465
  }
466
466
  if (!v.settled) return;
467
- const T = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === v.next, A = he.current > v.edgeAtSettle || c !== "delete" && t !== v.sigAtSettle;
468
- (T || A) && l.push([d, c]);
467
+ const T = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === v.next, N = pe.current > v.edgeAtSettle || c !== "delete" && t !== v.sigAtSettle;
468
+ (T || N) && l.push([d, c]);
469
469
  });
470
470
  }), l.length === 0) return;
471
- Je(
471
+ Qe(
472
472
  (r) => l.forEach(([d, h]) => {
473
473
  const c = { ...r.get(d) };
474
474
  delete c[h], Object.keys(c).length > 0 ? r.set(d, c) : r.delete(d);
475
475
  })
476
476
  );
477
477
  const s = l.filter(([, r]) => r === "delete").map(([r]) => r);
478
- s.some((r) => G.current.has(r)) && xe((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ce.cancel(r));
479
- }, dt = (e, t, n) => {
480
- ae(e, t) === n && (Q(e, t, {
478
+ s.some((r) => G.current.has(r)) && Ce((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ue.cancel(r));
479
+ }, ct = (e, t, n) => {
480
+ oe(e, t) === n && (Q(e, t, {
481
481
  ...n,
482
482
  settled: !0,
483
- edgeAtSettle: he.current,
484
- sigAtSettle: ye(R.current)
485
- }), ot());
486
- }, ct = (e, t, n) => ae(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && xe((l) => l.delete(e)), ce.cancel(e)), !0), En = pt(() => ye(y), [y]);
487
- S(() => {
488
- ot();
489
- }, [En, m]);
490
- const Ae = (e, t) => {
491
- var A;
492
- const n = t === "pin" ? _e : De, l = (x) => ({
483
+ edgeAtSettle: pe.current,
484
+ sigAtSettle: be(E.current)
485
+ }), dt());
486
+ }, ut = (e, t, n) => oe(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && Ce((l) => l.delete(e)), ue.cancel(e)), !0), Rn = mt(() => be(y), [y]);
487
+ C(() => {
488
+ dt();
489
+ }, [Rn, m]);
490
+ const Fe = (e, t) => {
491
+ var N, te;
492
+ const n = t === "pin" ? De : ke, l = (j) => ({
493
493
  started: !1,
494
- refusal: x
494
+ refusal: j
495
495
  });
496
496
  if (!n)
497
497
  return l(t === "pin" ? "no onTogglePin" : "no onToggleFlag");
498
- const s = R.current.find((x) => x.id === e);
498
+ const s = E.current.find((j) => j.id === e);
499
499
  if (!s) return l("no note has this id");
500
500
  if (s.deleted) return l("the note is deleted");
501
- if (t === "pin" && ((A = s.actions) == null ? void 0 : A.pin) === !1)
501
+ if (t === "pin" && ((N = s.actions) == null ? void 0 : N.pin) === !1)
502
502
  return l("actions.pin is false for this note");
503
- const r = N.current.get(e);
503
+ if (t === "flag" && ((te = s.actions) == null ? void 0 : te.flag) === !1)
504
+ return l("actions.flag is false for this note");
505
+ const r = R.current.get(e);
504
506
  if (r != null && r.delete) return l("the note is being deleted");
505
507
  if (r != null && r[t])
506
508
  return l(`a ${t} write for this note is still pending`);
507
509
  const d = !(t === "pin" ? s.pinned : s.flagged), h = t === "pin" ? d ? "pin" : "unpin" : d ? "flag" : "unflag";
508
- nt();
510
+ rt();
509
511
  let c;
510
512
  try {
511
513
  c = n(e, d);
512
- } catch (x) {
513
- return fe(h, e, x), { started: !1, result: Rt(x) };
514
+ } catch (j) {
515
+ return ge(h, e, j), { started: !1, result: Nt(j) };
514
516
  }
515
- if (!Ct(c)) return { started: !0, result: c };
517
+ if (!St(c)) return { started: !0, result: c };
516
518
  const v = {
517
519
  next: d,
518
520
  settled: !1,
@@ -523,98 +525,98 @@ const Lr = qn(
523
525
  const T = Promise.resolve(c);
524
526
  return T.then(
525
527
  () => {
526
- V.current && dt(e, t, v);
528
+ F.current && ct(e, t, v);
527
529
  },
528
- (x) => {
529
- const jn = V.current && ct(e, t, v);
530
- fe(h, e, x, jn);
530
+ (j) => {
531
+ const Ln = F.current && ut(e, t, v);
532
+ ge(h, e, j, Ln);
531
533
  }
532
534
  ), { started: !0, result: T };
533
- }, ut = (e) => {
535
+ }, ft = (e) => {
534
536
  var l;
535
537
  if (!K) return !1;
536
- const t = R.current.find((s) => s.id === e);
537
- if (!t || t.deleted || ((l = t.actions) == null ? void 0 : l.delete) === !1 || ae(e, "delete")) return !1;
538
- nt();
538
+ const t = E.current.find((s) => s.id === e);
539
+ if (!t || t.deleted || ((l = t.actions) == null ? void 0 : l.delete) === !1 || oe(e, "delete")) return !1;
540
+ rt();
539
541
  let n;
540
542
  try {
541
543
  n = K(e);
542
544
  } catch (s) {
543
- return fe("delete", e, s), !1;
545
+ return ge("delete", e, s), !1;
544
546
  }
545
- if (Ct(n)) {
547
+ if (St(n)) {
546
548
  const s = {
547
549
  settled: !1,
548
550
  edgeAtSettle: 0,
549
551
  sigAtSettle: ""
550
552
  };
551
- Q(e, "delete", s), t.keptOnDelete && it(
552
- t.dateIso ? a("notesPanel.deletingNamed", { date: oe(t) }) : a("notesPanel.deleting")
553
+ Q(e, "delete", s), t.keptOnDelete && lt(
554
+ t.dateIso ? a("notesPanel.deletingNamed", { date: de(t) }) : a("notesPanel.deleting")
553
555
  ), Promise.resolve(n).then(
554
556
  () => {
555
- V.current && (lt(), dt(e, "delete", s));
557
+ F.current && (at(), ct(e, "delete", s));
556
558
  },
557
559
  (r) => {
558
- const d = V.current && ct(e, "delete", s);
559
- fe("delete", e, r, d);
560
+ const d = F.current && ut(e, "delete", s);
561
+ ge("delete", e, r, d);
560
562
  }
561
563
  );
562
564
  } else
563
565
  Q(e, "delete", {
564
566
  settled: !0,
565
- edgeAtSettle: he.current,
566
- sigAtSettle: ye(R.current)
567
- }), lt();
568
- return t.keptOnDelete || ce.leave(e, () => {
569
- ae(e, "delete") && xe((s) => s.add(e));
567
+ edgeAtSettle: pe.current,
568
+ sigAtSettle: be(E.current)
569
+ }), at();
570
+ return t.keptOnDelete || ue.leave(e, () => {
571
+ oe(e, "delete") && Ce((s) => s.add(e));
570
572
  }), !0;
571
- }, [U, X] = C(null), pe = u(null), Rn = (e) => {
572
- if (!(!K || Qe(e)) && !(P && g === e)) {
573
- if (!He) {
574
- ut(e);
573
+ }, [U, X] = x(null), me = u(null), Nn = (e) => {
574
+ if (!(!K || Ue(e)) && !(P && g === e)) {
575
+ if (!Me) {
576
+ ft(e);
575
577
  return;
576
578
  }
577
- pe.current = { noteId: e, index: -1, started: !1 }, X(e);
579
+ me.current = { noteId: e, index: -1, started: !1 }, X(e);
578
580
  }
579
- }, Nn = () => {
581
+ }, An = () => {
580
582
  const e = U;
581
583
  if (!e) return;
582
584
  const t = H.current.indexOf(e);
583
- ut(e) && (pe.current = { noteId: e, index: t, started: !0 }), X(null);
584
- }, Fe = U !== null && y.some((e) => e.id === U && !e.deleted);
585
- S(() => {
586
- U !== null && !Fe && X(null);
587
- }, [U, Fe]), Dn(cn, () => _.current, []);
585
+ ft(e) && (me.current = { noteId: e, index: t, started: !0 }), X(null);
586
+ }, Ve = U !== null && y.some((e) => e.id === U && !e.deleted);
587
+ C(() => {
588
+ U !== null && !Ve && X(null);
589
+ }, [U, Ve]), kn(un, () => V.current, []);
588
590
  const O = (e, t) => {
589
591
  var n;
590
- return e ? ((n = _.current) == null ? void 0 : n.querySelector(
592
+ return e ? ((n = V.current) == null ? void 0 : n.querySelector(
591
593
  `[data-note-id="${CSS.escape(e)}"] ${t ? `[data-note-action="${CSS.escape(t)}"]` : "[data-note-action]"}`
592
594
  )) ?? null : null;
593
- }, me = (e, t) => {
595
+ }, ve = (e, t) => {
594
596
  const n = H.current;
595
597
  return O(n[e], t) ?? O(n[e - 1], t) ?? O(n[e], null) ?? O(n[e - 1], null);
596
- }, An = () => {
597
- const e = _.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
598
- t && or(t);
598
+ }, Fn = () => {
599
+ const e = V.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
600
+ t && dr(t);
599
601
  }, Z = (e) => {
600
- e ? e.focus() : An();
601
- }, Fn = (e) => {
602
- const t = pe.current;
603
- if (pe.current = null, !t) return;
602
+ e ? e.focus() : Fn();
603
+ }, Vn = (e) => {
604
+ const t = me.current;
605
+ if (me.current = null, !t || e.defaultPrevented) return;
604
606
  e.preventDefault();
605
607
  const n = O(t.noteId, "delete");
606
608
  Z(
607
- t.started ? me(t.index, "delete") ?? n : n
609
+ t.started ? ve(t.index, "delete") ?? n : n
608
610
  );
609
- }, Ve = u(null), ft = (e) => {
611
+ }, Oe = u(null), gt = (e) => {
610
612
  const t = e.kind === "delete" ? "delete" : e.kind.endsWith("pin") ? "pin" : "flag", n = H.current.indexOf(e.noteId);
611
- return O(e.noteId, t) ?? O(e.noteId, null) ?? (n >= 0 ? me(n, t) : null);
612
- }, Vn = (e) => {
613
+ return O(e.noteId, t) ?? O(e.noteId, null) ?? (n >= 0 ? ve(n, t) : null);
614
+ }, On = (e) => {
613
615
  var t;
614
- (t = Ve.current) != null && t.contains(document.activeElement) && Z(ft(e)), ue(null);
616
+ (t = Oe.current) != null && t.contains(document.activeElement) && Z(gt(e)), fe(null);
615
617
  }, M = u(null);
616
- S(() => {
617
- const e = _.current;
618
+ C(() => {
619
+ const e = V.current;
618
620
  if (!e) return;
619
621
  const t = (l) => {
620
622
  var d, h;
@@ -625,7 +627,7 @@ const Lr = qn(
625
627
  el: s,
626
628
  noteId: r,
627
629
  action: ((h = s.closest("[data-note-action]")) == null ? void 0 : h.dataset.noteAction) ?? null,
628
- index: r ? St(H.current, Se.current, r) : -1,
630
+ index: r ? Et(H.current, Ee.current, r) : -1,
629
631
  inWriteError: !!s.closest("[data-notes-panel-write-error]")
630
632
  };
631
633
  }, n = (l) => {
@@ -643,14 +645,14 @@ const Lr = qn(
643
645
  return e.addEventListener("focusin", t), e.addEventListener("focusout", n), () => {
644
646
  e.removeEventListener("focusin", t), e.removeEventListener("focusout", n);
645
647
  };
646
- }, []), Qn(() => {
648
+ }, []), Un(() => {
647
649
  var l;
648
650
  const e = M.current;
649
- if (!e || !_.current) return;
651
+ if (!e || !V.current) return;
650
652
  if (e.el.isConnected) {
651
- const s = e.noteId ? St(
653
+ const s = e.noteId ? Et(
652
654
  H.current,
653
- Se.current,
655
+ Ee.current,
654
656
  e.noteId
655
657
  ) : -1;
656
658
  s >= 0 && (e.index = s);
@@ -662,38 +664,38 @@ const Lr = qn(
662
664
  const n = e.action ? O(e.noteId, e.action) : null;
663
665
  if (n) n.focus();
664
666
  else if (e.noteId)
665
- Z(me(e.index, e.action));
667
+ Z(ve(e.index, e.action));
666
668
  else if (e.el.hasAttribute("data-notes-panel-empty"))
667
- Z(me(0, "delete"));
669
+ Z(ve(0, "delete"));
668
670
  else if (e.inWriteError) {
669
- const s = (l = Ve.current) == null ? void 0 : l.querySelector(
671
+ const s = (l = Oe.current) == null ? void 0 : l.querySelector(
670
672
  "[data-alert-dismiss]"
671
- ), r = rt.current;
672
- s ? s.focus() : Z(r ? ft(r) : null);
673
+ ), r = st.current;
674
+ s ? s.focus() : Z(r ? gt(r) : null);
673
675
  }
674
676
  });
675
- const Oe = u(null);
676
- S(() => {
677
+ const je = u(null);
678
+ C(() => {
677
679
  var e, t;
678
- E && ((e = Oe.current) == null || e.scrollIntoView({ block: "center" }), (t = Oe.current) == null || t.focus());
679
- }, [E, qe]);
680
+ S && ((e = je.current) == null || e.scrollIntoView({ block: "center" }), (t = je.current) == null || t.focus());
681
+ }, [S, _e]);
680
682
  const ee = u(p);
681
683
  ee.current = p;
682
- const je = u(re);
683
- je.current = re;
684
- const gt = u(E);
685
- gt.current = E;
686
- const Le = u(null);
687
- Le.current = { toggle: Ae };
688
- const On = pt(
684
+ const Le = u(se);
685
+ Le.current = se;
686
+ const ht = u(S);
687
+ ht.current = S;
688
+ const qe = u(null);
689
+ qe.current = { toggle: Fe };
690
+ const jn = mt(
689
691
  () => ({
690
692
  // Ids + flags only — never the note body or author (both PHI).
691
- getNotes: () => R.current.filter((e) => {
693
+ getNotes: () => E.current.filter((e) => {
692
694
  var t;
693
- return !(e.id && ((t = N.current.get(e.id)) != null && t.delete));
695
+ return !(e.id && ((t = R.current.get(e.id)) != null && t.delete));
694
696
  }).map((e) => {
695
697
  var n, l;
696
- const t = e.id ? N.current.get(e.id) : void 0;
698
+ const t = e.id ? R.current.get(e.id) : void 0;
697
699
  return {
698
700
  id: e.id,
699
701
  pinned: ((n = t == null ? void 0 : t.pin) == null ? void 0 : n.next) ?? !!e.pinned,
@@ -703,35 +705,35 @@ const Lr = qn(
703
705
  };
704
706
  }),
705
707
  canAddNote: () => !!ee.current,
706
- canAddClinical: () => je.current,
707
- getCurrentNoteId: () => gt.current ?? null,
708
+ canAddClinical: () => Le.current,
709
+ getCurrentNoteId: () => ht.current ?? null,
708
710
  addNote: (e) => {
709
711
  var t;
710
- if (!(e.clinical && !je.current))
712
+ if (!(e.clinical && !Le.current))
711
713
  return (t = ee.current) == null ? void 0 : t.call(ee, e);
712
714
  },
713
- togglePin: (e) => Pt(Le.current, e, "pin"),
714
- toggleFlag: (e) => Pt(Le.current, e, "flag")
715
+ togglePin: (e) => Tt(qe.current, e, "pin"),
716
+ toggleFlag: (e) => Tt(qe.current, e, "flag")
715
717
  }),
716
718
  []
717
719
  );
718
- return zn(tr, On, f), /* @__PURE__ */ b(
720
+ return Hn(nr, jn, f), /* @__PURE__ */ b(
719
721
  "section",
720
722
  {
721
- ref: _,
723
+ ref: V,
722
724
  "data-component": "notes-panel",
723
725
  "data-component-id": f,
724
- "aria-labelledby": be ? void 0 : Ie,
725
- "aria-label": be,
726
- className: [sr, on].filter(Boolean).join(" "),
727
- ...dn,
726
+ "aria-labelledby": we ? void 0 : Ye,
727
+ "aria-label": we,
728
+ className: [ir, dn].filter(Boolean).join(" "),
729
+ ...cn,
728
730
  children: [
729
731
  /* @__PURE__ */ i(
730
- In,
732
+ Yn,
731
733
  {
732
- title: fn,
733
- icon: /* @__PURE__ */ i(Xn, { "aria-hidden": "true" }),
734
- headingId: be ? void 0 : Ie,
734
+ title: gn,
735
+ icon: /* @__PURE__ */ i(Zn, { "aria-hidden": "true" }),
736
+ headingId: we ? void 0 : Ye,
735
737
  sticky: !0,
736
738
  divider: !0
737
739
  }
@@ -743,52 +745,52 @@ const Lr = qn(
743
745
  "data-notes-panel-composer": g !== null ? "edit" : "add",
744
746
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
745
747
  children: [
746
- en,
747
- F === "rich" ? /* @__PURE__ */ i(
748
- Mn,
748
+ tn,
749
+ A === "rich" ? /* @__PURE__ */ i(
750
+ Wn,
749
751
  {
750
- ref: q,
751
- ariaLabel: Ge,
752
- placeholder: Ye,
753
- toolbar: At,
752
+ ref: _,
753
+ ariaLabel: Je,
754
+ placeholder: Ge,
755
+ toolbar: Ft,
754
756
  minHeight: "fill",
755
- redactor: Ft,
756
- imageUploadUrl: Vt,
757
+ redactor: Vt,
758
+ imageUploadUrl: Ot,
757
759
  readOnly: P,
758
760
  onChange: ({ html: e }) => I(e),
759
- onRequestAiDraft: Lt,
760
- aiDraftFormat: qt,
761
- aiPrivacyNotice: _t,
762
- onDictate: Dt,
763
- onProofread: kt,
764
- onAutoFormat: zt,
765
- aiConsent: Ht,
766
- variables: Mt,
767
- validateVariable: Wt,
768
- onVariableValidityChange: $t,
769
- renderHelpMeWrite: Bt,
770
- aiTemplates: Kt,
771
- onAiApplied: It,
772
- onUploadImage: Yt,
773
- onAiCreditsExhausted: Gt,
774
- showExtensions: Jt,
775
- aiCreditsNotice: Qt,
776
- extensions: Ut,
777
- extensionContext: Xt,
778
- onExtensionRun: Zt,
761
+ onRequestAiDraft: qt,
762
+ aiDraftFormat: _t,
763
+ aiPrivacyNotice: Dt,
764
+ onDictate: kt,
765
+ onProofread: zt,
766
+ onAutoFormat: Ht,
767
+ aiConsent: Mt,
768
+ variables: Wt,
769
+ validateVariable: $t,
770
+ onVariableValidityChange: Bt,
771
+ renderHelpMeWrite: Kt,
772
+ aiTemplates: It,
773
+ onAiApplied: Yt,
774
+ onUploadImage: Gt,
775
+ onAiCreditsExhausted: Jt,
776
+ showExtensions: Qt,
777
+ aiCreditsNotice: Ut,
778
+ extensions: Xt,
779
+ extensionContext: Zt,
780
+ onExtensionRun: en,
779
781
  aiConsentHeadingLevel: 3
780
782
  }
781
783
  ) : /* @__PURE__ */ i(
782
- Wn,
784
+ $n,
783
785
  {
784
786
  value: k,
785
787
  readOnly: P,
786
788
  onChange: (e) => I(e.target.value),
787
- placeholder: Ye,
789
+ placeholder: Ge,
788
790
  autoResize: !0,
789
791
  minRows: 2,
790
792
  maxRows: 6,
791
- "aria-label": Ge
793
+ "aria-label": Je
792
794
  }
793
795
  ),
794
796
  /* @__PURE__ */ b(
@@ -796,55 +798,55 @@ const Lr = qn(
796
798
  {
797
799
  className: [
798
800
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
799
- Ue ? "ds:justify-between" : "ds:justify-end"
801
+ Xe ? "ds:justify-between" : "ds:justify-end"
800
802
  ].join(" "),
801
803
  children: [
802
- Ue ? (() => {
803
- const e = P || !re, t = re ? void 0 : jt ?? a("notesPanel.clinicalGated", {
804
+ Xe ? (() => {
805
+ const e = P || !se, t = se ? void 0 : Lt ?? a("notesPanel.clinicalGated", {
804
806
  defaultValue: "You do not have permission to write clinical notes."
805
807
  }), n = /* @__PURE__ */ i(
806
- $n,
808
+ Bn,
807
809
  {
808
810
  size: "sm",
809
811
  label: a("notesPanel.clinicalToggle", {
810
812
  defaultValue: "Clinical note"
811
813
  }),
812
- checked: se,
813
- onCheckedChange: ie,
814
+ checked: ie,
815
+ onCheckedChange: le,
814
816
  disabled: e
815
817
  }
816
818
  );
817
- return e && t ? /* @__PURE__ */ i(Bn, { label: t, children: /* @__PURE__ */ i("span", { tabIndex: 0, children: n }) }) : n;
819
+ return e && t ? /* @__PURE__ */ i(Kn, { label: t, children: /* @__PURE__ */ i("span", { tabIndex: 0, children: n }) }) : n;
818
820
  })() : null,
819
821
  /* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
820
822
  g !== null ? /* @__PURE__ */ i(
821
- te,
823
+ ne,
822
824
  {
823
825
  type: "button",
824
826
  size: "sm",
825
827
  intent: "ghost",
826
- onClick: de,
828
+ onClick: ce,
827
829
  disabled: P,
828
830
  children: a("notesPanel.cancelEdit", { defaultValue: "Cancel" })
829
831
  }
830
832
  ) : null,
831
833
  /* @__PURE__ */ i(
832
- te,
834
+ ne,
833
835
  {
834
836
  type: "button",
835
837
  size: "sm",
836
- onClick: bn,
837
- disabled: !gn || wn,
838
+ onClick: wn,
839
+ disabled: !hn || Pn,
838
840
  loading: P,
839
- children: g !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : ln ?? a("notesPanel.add", { defaultValue: "Add note" })
841
+ children: g !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : an ?? a("notesPanel.add", { defaultValue: "Add note" })
840
842
  }
841
843
  )
842
844
  ] })
843
845
  ]
844
846
  }
845
847
  ),
846
- $e ? /* @__PURE__ */ i(j, { variant: "error", children: /* @__PURE__ */ i(j.Description, { children: $e }) }) : null,
847
- tn
848
+ Be ? /* @__PURE__ */ i(L, { variant: "error", children: /* @__PURE__ */ i(L.Description, { children: Be }) }) : null,
849
+ nn
848
850
  ]
849
851
  }
850
852
  ) : null,
@@ -860,10 +862,10 @@ const Lr = qn(
860
862
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
861
863
  children: [
862
864
  /* @__PURE__ */ i("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }),
863
- ar.map((e, t) => /* @__PURE__ */ i(yt, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ i(yt.Body, { children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
865
+ or.map((e, t) => /* @__PURE__ */ i(bt, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ i(bt.Body, { children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
864
866
  /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
865
867
  /* @__PURE__ */ i(
866
- ve,
868
+ ye,
867
869
  {
868
870
  variant: "circular",
869
871
  size: "sm",
@@ -872,7 +874,7 @@ const Lr = qn(
872
874
  ),
873
875
  /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
874
876
  /* @__PURE__ */ i(
875
- ve,
877
+ ye,
876
878
  {
877
879
  variant: "text",
878
880
  size: "sm",
@@ -881,7 +883,7 @@ const Lr = qn(
881
883
  }
882
884
  ),
883
885
  /* @__PURE__ */ i(
884
- ve,
886
+ ye,
885
887
  {
886
888
  variant: "text",
887
889
  size: "sm",
@@ -892,7 +894,7 @@ const Lr = qn(
892
894
  ] })
893
895
  ] }),
894
896
  /* @__PURE__ */ i(
895
- ve,
897
+ ye,
896
898
  {
897
899
  variant: "text",
898
900
  size: "sm",
@@ -904,23 +906,23 @@ const Lr = qn(
904
906
  ]
905
907
  }
906
908
  )
907
- ) : m === "error" ? /* @__PURE__ */ b(j, { variant: "error", children: [
908
- /* @__PURE__ */ i(j.Description, { children: a("notesPanel.loadError") }),
909
- ne ? /* @__PURE__ */ i(j.Action, { children: /* @__PURE__ */ i(te, { intent: "secondary", size: "sm", onClick: ne, children: a("notesPanel.retry") }) }) : null
909
+ ) : m === "error" ? /* @__PURE__ */ b(L, { variant: "error", children: [
910
+ /* @__PURE__ */ i(L.Description, { children: a("notesPanel.loadError") }),
911
+ re ? /* @__PURE__ */ i(L.Action, { children: /* @__PURE__ */ i(ne, { intent: "secondary", size: "sm", onClick: re, children: a("notesPanel.retry") }) }) : null
910
912
  ] }) : null,
911
- w && ge ? /* @__PURE__ */ b(
912
- j,
913
+ w && he ? /* @__PURE__ */ b(
914
+ L,
913
915
  {
914
- ref: Ve,
916
+ ref: Oe,
915
917
  variant: "error",
916
918
  dismissible: !0,
917
919
  onOpenChange: (e) => {
918
- e || Vn(w);
920
+ e || On(w);
919
921
  },
920
922
  "data-notes-panel-write-error": w.kind,
921
923
  children: [
922
- /* @__PURE__ */ i(j.Title, { as: "p", children: Sn(w) }),
923
- w.message ? /* @__PURE__ */ i(j.Description, { children: w.message }) : null
924
+ /* @__PURE__ */ i(L.Title, { as: "p", children: En(w) }),
925
+ w.message ? /* @__PURE__ */ i(L.Description, { children: w.message }) : null
924
926
  ]
925
927
  },
926
928
  w.seq
@@ -932,22 +934,22 @@ const Lr = qn(
932
934
  "aria-atomic": "true",
933
935
  "data-notes-panel-announcer": "",
934
936
  className: "ds:sr-only",
935
- children: Re.text ? /* @__PURE__ */ i("span", { children: Re.text }, Re.seq) : null
937
+ children: Ne.text ? /* @__PURE__ */ i("span", { children: Ne.text }, Ne.seq) : null
936
938
  }
937
939
  ),
938
940
  m === "loading" && z.length > 0 ? /* @__PURE__ */ i("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }) : null,
939
941
  z.length > 0 ? /* @__PURE__ */ i(
940
942
  "ul",
941
943
  {
942
- ref: Cn,
944
+ ref: Sn,
943
945
  "aria-busy": m === "loading" || void 0,
944
- className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${un}`.trim(),
946
+ className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${fn}`.trim(),
945
947
  children: z.map(({ actions: e, keptOnDelete: t, ...n }, l) => {
946
- const s = E != null && n.id === E, r = n.id, d = r != null && g === r, h = r != null && ce.isLeaving(r), c = r ? Y.get(r) : void 0, v = !!(c != null && c.delete), T = v && !!t, A = P && d;
948
+ const s = S != null && n.id === S, r = n.id, d = r != null && g === r, h = r != null && ue.isLeaving(r), c = r ? Y.get(r) : void 0, v = !!(c != null && c.delete), T = v && !!t, N = P && d;
947
949
  return /* @__PURE__ */ b(
948
950
  "li",
949
951
  {
950
- ref: s ? Oe : void 0,
952
+ ref: s ? je : void 0,
951
953
  "data-note-id": r,
952
954
  tabIndex: s ? -1 : void 0,
953
955
  "aria-current": s ? "true" : void 0,
@@ -956,13 +958,13 @@ const Lr = qn(
956
958
  "data-editing": d ? "" : void 0,
957
959
  "aria-busy": T || void 0,
958
960
  className: [
959
- rr({
961
+ sr({
960
962
  current: s,
961
963
  washed: s || d
962
964
  }),
963
- lr,
964
- Jn,
965
- h ? ir : ""
965
+ ar,
966
+ Qn,
967
+ h ? lr : ""
966
968
  ].filter(Boolean).join(" "),
967
969
  children: [
968
970
  s ? /* @__PURE__ */ i("span", { className: "ds:sr-only", children: a("notesPanel.current", {
@@ -974,35 +976,35 @@ const Lr = qn(
974
976
  {
975
977
  "aria-hidden": "true",
976
978
  "data-notes-panel-wash": "editing",
977
- className: bt({ state: "editing" })
979
+ className: wt({ state: "editing" })
978
980
  }
979
981
  ) : s ? /* @__PURE__ */ i(
980
982
  "span",
981
983
  {
982
984
  "aria-hidden": "true",
983
985
  "data-notes-panel-wash": "addressed",
984
- className: bt({ state: "addressed" })
986
+ className: wt({ state: "addressed" })
985
987
  },
986
- `${E}:${qe ?? ""}`
988
+ `${S}:${_e ?? ""}`
987
989
  ) : null,
988
990
  /* @__PURE__ */ i(
989
- Hn,
991
+ Mn,
990
992
  {
991
993
  surface: "elevated",
992
994
  truncate: !s,
993
- headerActions: /* @__PURE__ */ b(Ln, { children: [
994
- ke ? ke(
995
+ headerActions: /* @__PURE__ */ b(qn, { children: [
996
+ ze ? ze(
995
997
  { ...n, actions: e, keptOnDelete: t },
996
998
  { deleting: v }
997
999
  ) : null,
998
1000
  B && r && !n.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ i(
999
- vt,
1001
+ yt,
1000
1002
  {
1001
- icon: /* @__PURE__ */ i(Zn, {}),
1003
+ icon: /* @__PURE__ */ i(er, {}),
1002
1004
  intent: "ghost",
1003
1005
  size: "sm",
1004
1006
  "aria-label": a("notesPanel.editNamed", {
1005
- date: oe(n),
1007
+ date: de(n),
1006
1008
  defaultValue: "Edit note · {{date}}"
1007
1009
  }),
1008
1010
  tooltip: a("notesPanel.edit", {
@@ -1012,36 +1014,36 @@ const Lr = qn(
1012
1014
  disabled: P || v,
1013
1015
  "data-notes-panel-edit": "",
1014
1016
  "data-note-action": "edit",
1015
- onClick: () => g === r ? de() : Pn(n)
1017
+ onClick: () => g === r ? ce() : Tn(n)
1016
1018
  }
1017
1019
  ) : null,
1018
1020
  K && r && !n.deleted && (e == null ? void 0 : e.delete) !== !1 ? /* @__PURE__ */ i(
1019
- vt,
1021
+ yt,
1020
1022
  {
1021
- icon: /* @__PURE__ */ i(er, {}),
1023
+ icon: /* @__PURE__ */ i(tr, {}),
1022
1024
  intent: "ghost",
1023
1025
  size: "sm",
1024
1026
  "aria-label": a("notesPanel.deleteNamed", {
1025
- date: oe(n),
1027
+ date: de(n),
1026
1028
  defaultValue: "Delete note · {{date}}"
1027
1029
  }),
1028
1030
  tooltip: a("notesPanel.delete", {
1029
1031
  defaultValue: "Delete note"
1030
1032
  }),
1031
1033
  "data-note-action": "delete",
1032
- "aria-disabled": T || A || void 0,
1034
+ "aria-disabled": T || N || void 0,
1033
1035
  "aria-busy": T || void 0,
1034
- onClick: () => Rn(r)
1036
+ onClick: () => Nn(r)
1035
1037
  }
1036
1038
  ) : null
1037
1039
  ] }),
1038
1040
  ...n,
1039
- pinned: Ce(n),
1040
- flagged: Tn(n),
1041
+ pinned: Se(n),
1042
+ flagged: xn(n),
1041
1043
  pinPending: !!(c != null && c.pin) || v,
1042
1044
  flagPending: !!(c != null && c.flag) || v,
1043
- onTogglePin: _e && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Ae(r, "pin") : void 0,
1044
- onToggleFlag: De && r && !n.deleted ? () => Ae(r, "flag") : void 0
1045
+ onTogglePin: De && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Fe(r, "pin") : void 0,
1046
+ onToggleFlag: ke && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => Fe(r, "flag") : void 0
1045
1047
  }
1046
1048
  )
1047
1049
  ]
@@ -1052,30 +1054,31 @@ const Lr = qn(
1052
1054
  }
1053
1055
  ) : m !== "ready" ? null : (
1054
1056
  /* Where focus lands, from script, when the last note leaves. */
1055
- /* @__PURE__ */ i("div", { "data-notes-panel-empty": "", className: Nt, children: an ?? /* @__PURE__ */ i("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1057
+ /* @__PURE__ */ i("div", { "data-notes-panel-empty": "", className: At, children: on ?? /* @__PURE__ */ i("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1056
1058
  )
1057
1059
  ] }),
1058
- K && He ? /* @__PURE__ */ i(
1059
- L,
1060
+ K && Me ? /* @__PURE__ */ i(
1061
+ q,
1060
1062
  {
1061
- open: Fe,
1063
+ scope: "container",
1064
+ open: Ve,
1062
1065
  onOpenChange: (e) => !e && X(null),
1063
1066
  children: /* @__PURE__ */ b(
1064
- L.Content,
1067
+ q.Content,
1065
1068
  {
1066
1069
  variant: "alert",
1067
1070
  size: "sm",
1068
- onCloseAutoFocus: Fn,
1071
+ onCloseAutoFocus: Vn,
1069
1072
  children: [
1070
- /* @__PURE__ */ i(L.Header, { children: /* @__PURE__ */ i(L.Title, { children: a("notesPanel.deleteConfirmTitle", {
1073
+ /* @__PURE__ */ i(q.Header, { children: /* @__PURE__ */ i(q.Title, { children: a("notesPanel.deleteConfirmTitle", {
1071
1074
  defaultValue: "Delete this note?"
1072
1075
  }) }) }),
1073
- /* @__PURE__ */ i(L.Body, { children: /* @__PURE__ */ i(L.Description, { children: a("notesPanel.deleteConfirmBody", {
1076
+ /* @__PURE__ */ i(q.Body, { children: /* @__PURE__ */ i(q.Description, { children: a("notesPanel.deleteConfirmBody", {
1074
1077
  defaultValue: "The note will be removed from the record."
1075
1078
  }) }) }),
1076
- /* @__PURE__ */ b(L.Footer, { children: [
1077
- /* @__PURE__ */ i(L.Close, { asChild: !0, children: /* @__PURE__ */ i(
1078
- te,
1079
+ /* @__PURE__ */ b(q.Footer, { children: [
1080
+ /* @__PURE__ */ i(q.Close, { asChild: !0, children: /* @__PURE__ */ i(
1081
+ ne,
1079
1082
  {
1080
1083
  intent: "secondary",
1081
1084
  size: "sm",
@@ -1086,11 +1089,11 @@ const Lr = qn(
1086
1089
  }
1087
1090
  ) }),
1088
1091
  /* @__PURE__ */ i(
1089
- te,
1092
+ ne,
1090
1093
  {
1091
1094
  intent: "destructive",
1092
1095
  size: "sm",
1093
- onClick: Nn,
1096
+ onClick: An,
1094
1097
  children: a("notesPanel.deleteConfirmAction", {
1095
1098
  defaultValue: "Delete"
1096
1099
  })
@@ -1108,6 +1111,6 @@ const Lr = qn(
1108
1111
  }
1109
1112
  );
1110
1113
  export {
1111
- Lr as N
1114
+ qr as N
1112
1115
  };
1113
- //# sourceMappingURL=notes-panel-C4HSUudf.js.map
1116
+ //# sourceMappingURL=notes-panel-DCKbuZqS.js.map