@alfadocs/ui-kit 0.68.0 → 0.70.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 (440) hide show
  1. package/dist/_chunks/{accordion-9lJSMMsZ.js → accordion-DnIa7OHX.js} +69 -47
  2. package/dist/_chunks/address-autocomplete-BEX9PXty.js +496 -0
  3. package/dist/_chunks/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
  4. package/dist/_chunks/{agenda-card.agent-B_R47-c9.js → agenda-card.agent-mTCrkKSZ.js} +6 -1
  5. package/dist/_chunks/{agenda-tray-T-BumlGZ.js → agenda-tray-CGXRk58j.js} +37 -25
  6. package/dist/_chunks/{ai-consent-banner-Dxtx_WAh.js → ai-consent-banner-Be-h9mRI.js} +5 -5
  7. package/dist/_chunks/{ai-prompt-input-BwEACCPm.js → ai-prompt-input-CuhTo9mh.js} +80 -61
  8. package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
  9. package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
  10. package/dist/_chunks/{alia-sidebar-Ckv0yCKi.js → alia-sidebar-B47qRQb5.js} +5 -5
  11. package/dist/_chunks/{anamnesis-card-N8pIKWuS.js → anamnesis-card-DvYCa16e.js} +3 -3
  12. package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
  13. package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
  14. package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
  15. package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
  16. package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
  17. package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
  18. package/dist/_chunks/{audio-recorder-DjXLP4aF.js → audio-recorder-Cpdk5qpQ.js} +60 -57
  19. package/dist/_chunks/{autocomplete-CcCFlVf-.js → autocomplete-DOeGouCL.js} +157 -132
  20. package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
  21. package/dist/_chunks/bishop-score-DnYWtZa_.js +304 -0
  22. package/dist/_chunks/bmi-calculator-zjeY4E7J.js +434 -0
  23. package/dist/_chunks/{booking-L8-YP8BJ.js → booking-DUBI0oqt.js} +422 -399
  24. package/dist/_chunks/{breadcrumb-OTbaY70e.js → breadcrumb-CchdeG7d.js} +42 -28
  25. package/dist/_chunks/{calculator-dialog-CFk4I91b.js → calculator-dialog-BR5iU0kf.js} +2 -2
  26. package/dist/_chunks/{calendar-oYWOCrnf.js → calendar-CZUjL8SZ.js} +258 -201
  27. package/dist/_chunks/{care-plan-card-BwVUyUBb.js → care-plan-card-C5sTfY9G.js} +13 -9
  28. package/dist/_chunks/{care-plan-entry-card-VzdQHcOL.js → care-plan-entry-card-CXnxGCWA.js} +20 -16
  29. package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
  30. package/dist/_chunks/{carousel.agent-vt21A_el.js → carousel.agent-4v8Emr9E.js} +219 -198
  31. package/dist/_chunks/{chart-Cg3e9EH9.js → chart-CMr3eW62.js} +150 -109
  32. package/dist/_chunks/{chat-container-ogB4OskO.js → chat-container-DWho5hPR.js} +47 -34
  33. package/dist/_chunks/{chat-input-B5zjNEUN.js → chat-input-BcXTetgM.js} +57 -41
  34. package/dist/_chunks/{checkbox-DRcOdmXv.js → checkbox-BuZ1u__2.js} +41 -27
  35. package/dist/_chunks/{checkbox-group-CpUwlHug.js → checkbox-group-PqNmQ-cE.js} +3 -3
  36. package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
  37. package/dist/_chunks/{collapsible-X3oaLPU3.js → collapsible-BrnRiCC6.js} +26 -23
  38. package/dist/_chunks/{color-picker-FXpItIaF.js → color-picker-C_fZl6sA.js} +124 -112
  39. package/dist/_chunks/{combobox-BC-DFx8G.js → combobox-Clum7gJ1.js} +165 -128
  40. package/dist/_chunks/{command-palette-BiPAAno-.js → command-palette-CJzmc5pC.js} +87 -64
  41. package/dist/_chunks/{contact-profile-card-7BMB85T6.js → contact-profile-card-DDPwRFiP.js} +13 -11
  42. package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
  43. package/dist/_chunks/{copy-field-CCq7j6Zc.js → copy-field-Bjw9u2cV.js} +42 -35
  44. package/dist/_chunks/counter-dRlTNC_y.js +55 -0
  45. package/dist/_chunks/{cycle-calculator-BF0ointe.js → cycle-calculator-CCmPwcBl.js} +4 -4
  46. package/dist/_chunks/{date-picker-oGg5BnXL.js → date-picker-Dl9RKxaV.js} +76 -57
  47. package/dist/_chunks/{date-range-picker-C5BWfH_T.js → date-range-picker-CTUeR6Bj.js} +73 -46
  48. package/dist/_chunks/{date-time-picker-Ze1My59T.js → date-time-picker-BhoogS5Q.js} +64 -40
  49. package/dist/_chunks/{dependent-selector-DpzGtr_J.js → dependent-selector-DUV4thxX.js} +45 -31
  50. package/dist/_chunks/{dialog-DMGnSelc.js → dialog-ZNuboNmy.js} +35 -28
  51. package/dist/_chunks/{document-scanner-D2qehl3-.js → document-scanner-C_AxLooF.js} +13 -5
  52. package/dist/_chunks/{dropdown-menu-DwwPovMZ.js → dropdown-menu-qrxjymfw.js} +94 -93
  53. package/dist/_chunks/{due-date-calculator-DU9AEWNy.js → due-date-calculator-Brdj-euS.js} +6 -6
  54. package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
  55. package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
  56. package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
  57. package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
  58. package/dist/_chunks/{fetal-weight-BVSzOhuR.js → fetal-weight-DNCkyeVo.js} +3 -3
  59. package/dist/_chunks/field-value-NXYczdpO.js +415 -0
  60. package/dist/_chunks/{file-upload-BosbPDb1.js → file-upload-DwZcAK8D.js} +119 -100
  61. package/dist/_chunks/{fiscal-code-input-DPtqluVb.js → fiscal-code-input-Cf-8O4Fj.js} +76 -63
  62. package/dist/_chunks/{freemium-paywall-CkWjv3o6.js → freemium-paywall-WYlNO7yT.js} +78 -71
  63. package/dist/_chunks/{gestational-age-calculator-DBlFdoiP.js → gestational-age-calculator-CF2ISaYQ.js} +7 -7
  64. package/dist/_chunks/hash-CysBBS_N.js +17 -0
  65. package/dist/_chunks/{hcg-doubling-if4Q8aSX.js → hcg-doubling-C7bmuaU3.js} +4 -4
  66. package/dist/_chunks/{header-settings-CNOqIhoW.js → header-settings-DJqoAl5m.js} +86 -46
  67. package/dist/_chunks/{index.modern-D2LGACWg.js → index.modern-Zta-A4Jm.js} +3 -3
  68. package/dist/_chunks/link-cell-renderer-CTXqtXV-.js +2184 -0
  69. package/dist/_chunks/{list-BOwqwy03.js → list-DgE1xWBM.js} +99 -84
  70. package/dist/_chunks/{locale-picker-C9JmBht3.js → locale-picker-ChYYSX2N.js} +47 -35
  71. package/dist/_chunks/lock-CKOIn0IK.js +15 -0
  72. package/dist/_chunks/{map-view-Tb5VfK9Y.js → map-view-BkOoGoX2.js} +160 -115
  73. package/dist/_chunks/{marketplace-app-shell-D4-T9Qzz.js → marketplace-app-shell-Skhfp6vK.js} +6 -6
  74. package/dist/_chunks/{message-card.agent-4IeIgrnJ.js → message-card.agent-ZLhx3Bs5.js} +6 -1
  75. package/dist/_chunks/{message-tray-CVyJajVJ.js → message-tray-DwrBLJlf.js} +90 -48
  76. package/dist/_chunks/{multi-select-BcPylvHR.js → multi-select-BdHHDrRN.js} +196 -153
  77. package/dist/_chunks/{navigation-menu-C6lBYVv9.js → navigation-menu-DRUi6sSj.js} +75 -42
  78. package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
  79. package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
  80. package/dist/_chunks/{notification-card.agent-Rqt3ofk9.js → notification-card.agent-DxGBZb8T.js} +5 -1
  81. package/dist/_chunks/{notification-tray-DlgenTEe.js → notification-tray-AEun6DN2.js} +112 -97
  82. package/dist/_chunks/{number-input-Dj5L3pXK.js → number-input-DxphVG_A.js} +36 -27
  83. package/dist/_chunks/{operator-hero-f_KaRhw5.js → operator-hero-CR0Rqh4-.js} +14 -10
  84. package/dist/_chunks/{otp-input-xQ4Ps5VY.js → otp-input-DzBQ-CpE.js} +52 -33
  85. package/dist/_chunks/{pagination-DQOgnxxw.js → pagination-D58kglCr.js} +181 -162
  86. package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
  87. package/dist/_chunks/{patient-search-DR9XUYRQ.js → patient-search-Be6cLrHR.js} +70 -61
  88. package/dist/_chunks/{patient-shell-BfgufL_q.js → patient-shell-DV3XEtIB.js} +3 -3
  89. package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
  90. package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
  91. package/dist/_chunks/{payment-form-nXocS_MX.js → payment-form-CxqIXqw7.js} +57 -45
  92. package/dist/_chunks/{payment-request-card-CYE5vhZ0.js → payment-request-card-BcZJwu9z.js} +125 -136
  93. package/dist/_chunks/{pdf-viewer-GsfNqeeT.js → pdf-viewer-QfebdLOd.js} +317 -291
  94. package/dist/_chunks/{periodontal-chart-card-Dh3KgvYG.js → periodontal-chart-card-hRRJY1NN.js} +3 -3
  95. package/dist/_chunks/{phone-input-DVXhNlIl.js → phone-input-DjU-XmO_.js} +64 -47
  96. package/dist/_chunks/{popover-DTbfAuR0.js → popover-B2qCDhJC.js} +37 -32
  97. package/dist/_chunks/{practice-results-DND2SAt7.js → practice-results-C6qDfxos.js} +280 -244
  98. package/dist/_chunks/{pregnancy-dating-QY-sqpvj.js → pregnancy-dating-CRVWswD-.js} +8 -8
  99. package/dist/_chunks/{pregnancy-weight-gain-DOJXXNYP.js → pregnancy-weight-gain-BUNpTsH-.js} +4 -4
  100. package/dist/_chunks/{privacy-lock-C7JyMf0y.js → privacy-lock-BzMLQu-j.js} +32 -28
  101. package/dist/_chunks/{product-hub-panel-CAXDFeGP.js → product-hub-panel-e6pW220e.js} +45 -27
  102. package/dist/_chunks/{progress-kzIRcdaq.js → progress-DA413-zn.js} +2 -2
  103. package/dist/_chunks/{public-footer.agent-CfXuW1x6.js → public-footer.agent-D0cFbjWl.js} +151 -146
  104. package/dist/_chunks/{public-header.agent-BOhJgZEU.js → public-header.agent-DqkqA-ca.js} +107 -102
  105. package/dist/_chunks/{qr-code-DNXhi6se.js → qr-code-CPkEs5mG.js} +52 -46
  106. package/dist/_chunks/{radio-group-CLjK-SlK.js → radio-group-BPt7pKZW.js} +5 -5
  107. package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
  108. package/dist/_chunks/{recaptcha-widget-BCNHsgqt.js → recaptcha-widget-BC-4To9b.js} +9 -2
  109. package/dist/_chunks/registry-DvAUVLHh.js +51 -0
  110. package/dist/_chunks/{resizable-3vzqDlg6.js → resizable-DVGcfOrk.js} +193 -173
  111. package/dist/_chunks/{reviews-panel-DBktKm7i.js → reviews-panel-Dq7LMDcH.js} +87 -68
  112. package/dist/_chunks/{rich-text-editor-VawKN1FI.js → rich-text-editor-DlCqPixb.js} +833 -728
  113. package/dist/_chunks/{search-bar-SY2BcV2N.js → search-bar-C_T3pBJn.js} +105 -78
  114. package/dist/_chunks/{search-input-DbxrnHkW.js → search-input-DQvGxR74.js} +2 -2
  115. package/dist/_chunks/{search-input.agent-CfZvViOd.js → search-input.agent-DRH54coT.js} +19 -4
  116. package/dist/_chunks/{select-CEtRcon5.js → select-DMLG44F5.js} +72 -56
  117. package/dist/_chunks/{session-countdown-LPnhTHjn.js → session-countdown-X1Ki6i0M.js} +3 -3
  118. package/dist/_chunks/{sheet-taJer-Ha.js → sheet-BxsE7eQm.js} +59 -45
  119. package/dist/_chunks/{sidebar-DaB4ulxH.js → sidebar-DY9jGjgt.js} +254 -248
  120. package/dist/_chunks/{sign-document-CdAiHiCh.js → sign-document-By6hMOra.js} +75 -49
  121. package/dist/_chunks/{signature-capture-COi0Uiqu.js → signature-capture-Ct_4Md4e.js} +138 -104
  122. package/dist/_chunks/{slider-BHWzXdjt.js → slider-DN1CWkKB.js} +85 -65
  123. package/dist/_chunks/{sparkline-DGhCSw8M.js → sparkline-iOXYgvJe.js} +75 -53
  124. package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
  125. package/dist/_chunks/{stepper-accordion.agent-C4quJ-MD.js → stepper-accordion.agent-cmEguIdx.js} +7 -1
  126. package/dist/_chunks/{stepper-progress-DDjq5nei.js → stepper-progress-Bv0njx4g.js} +30 -24
  127. package/dist/_chunks/{suggestion-chip.agent-6sNWFj7m.js → suggestion-chip.agent-Brn3CiFE.js} +9 -8
  128. package/dist/_chunks/{switch-BJ6HD3Mn.js → switch-OILsBLWo.js} +25 -19
  129. package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
  130. package/dist/_chunks/{tabs-BIQ0ew1T.js → tabs-BxcOziCo.js} +67 -58
  131. package/dist/_chunks/{task-card.agent-CUPKYd7w.js → task-card.agent-Bt14CzUd.js} +4 -1
  132. package/dist/_chunks/{task-tray-CAncV-QQ.js → task-tray-qOEQflu4.js} +74 -57
  133. package/dist/_chunks/{text-area-BIx0tZ05.js → text-area-Bt3p7Pt0.js} +41 -34
  134. package/dist/_chunks/{text-input-BaClJL8Y.js → text-input-B-OWQ1Je.js} +15 -8
  135. package/dist/_chunks/{theme-toggle-DETmSu_h.js → theme-toggle-XB6o_lgs.js} +38 -26
  136. package/dist/_chunks/{time-picker-B5umYwfv.js → time-picker-BPlJWm8w.js} +41 -31
  137. package/dist/_chunks/{timeline-DQa5Tyz4.js → timeline-CqA4nKTI.js} +33 -25
  138. package/dist/_chunks/{toast.agent-vuLRRn2a.js → toast.agent-57UzyR9U.js} +62 -45
  139. package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
  140. package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
  141. package/dist/_chunks/{transcript-panel-CLHmv83g.js → transcript-panel-3THQX6nJ.js} +47 -33
  142. package/dist/_chunks/unit-converter-YEpD9evj.js +337 -0
  143. package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
  144. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
  145. package/dist/_chunks/{use-password-requirements-DsgduV1x.js → use-password-requirements-BXvS2MBS.js} +131 -117
  146. package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
  147. package/dist/_chunks/users-MBVtUzwd.js +17 -0
  148. package/dist/_chunks/warning-stack--sTrrBDA.js +268 -0
  149. package/dist/_chunks/{whatsapp-button-DUjlWGKf.js → whatsapp-button-BIy6NaJK.js} +6 -3
  150. package/dist/_chunks/{workflow-map-JAZryZJr.js → workflow-map-Dy8mLCqF.js} +101 -90
  151. package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
  152. package/dist/agent/index.d.ts +4 -4
  153. package/dist/agent/index.js +37 -0
  154. package/dist/agent/registry.d.ts +33 -0
  155. package/dist/agent/types.d.ts +97 -4
  156. package/dist/agent-catalog.json +8081 -518
  157. package/dist/agent-i18n/en.json +1277 -0
  158. package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
  159. package/dist/components/_shared/entity-card/index.d.ts +1 -1
  160. package/dist/components/_shared/field-value.d.ts +21 -0
  161. package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
  162. package/dist/components/_shared/field-visibility.d.ts +36 -0
  163. package/dist/components/_shared/patient-fields.d.ts +119 -0
  164. package/dist/components/accordion/index.js +1 -1
  165. package/dist/components/address-autocomplete/address-autocomplete.agent.d.ts +4 -0
  166. package/dist/components/address-autocomplete/address-autocomplete.d.ts +18 -0
  167. package/dist/components/address-autocomplete/index.d.ts +2 -1
  168. package/dist/components/address-autocomplete/index.js +3 -2
  169. package/dist/components/agenda-card/index.js +2 -2
  170. package/dist/components/agenda-tray/index.js +1 -1
  171. package/dist/components/ai-consent-banner/index.js +1 -1
  172. package/dist/components/ai-prompt-input/index.js +1 -1
  173. package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
  174. package/dist/components/ai-tools-rail/index.js +1 -1
  175. package/dist/components/alert/alert.d.ts +5 -0
  176. package/dist/components/alert/index.js +1 -1
  177. package/dist/components/anamnesis-card/index.js +1 -1
  178. package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
  179. package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
  180. package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
  181. package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
  182. package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
  183. package/dist/components/anatomy-scheme/index.d.ts +6 -0
  184. package/dist/components/anatomy-scheme/index.js +17 -0
  185. package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
  186. package/dist/components/annotation-marker/index.d.ts +3 -0
  187. package/dist/components/annotation-marker/index.js +7 -0
  188. package/dist/components/appointment-card/appointment-card.d.ts +25 -1
  189. package/dist/components/appointment-card/index.js +6 -5
  190. package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
  191. package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
  192. package/dist/components/appointment-timeline/index.d.ts +4 -0
  193. package/dist/components/appointment-timeline/index.js +6 -0
  194. package/dist/components/audio-recorder/index.js +1 -1
  195. package/dist/components/autocomplete/index.js +1 -1
  196. package/dist/components/badge/badge.d.ts +6 -2
  197. package/dist/components/badge/index.js +1 -1
  198. package/dist/components/bishop-score/bishop-score.agent.d.ts +4 -0
  199. package/dist/components/bishop-score/bishop-score.d.ts +17 -1
  200. package/dist/components/bishop-score/index.js +1 -1
  201. package/dist/components/bmi-calculator/bmi-calculator.agent.d.ts +4 -0
  202. package/dist/components/bmi-calculator/bmi-calculator.d.ts +26 -0
  203. package/dist/components/bmi-calculator/index.js +1 -1
  204. package/dist/components/booking/index.js +1 -1
  205. package/dist/components/breadcrumb/index.js +1 -1
  206. package/dist/components/calculator-dialog/index.js +1 -1
  207. package/dist/components/calendar/index.js +1 -1
  208. package/dist/components/care-plan-card/index.js +1 -1
  209. package/dist/components/care-plan-entry-card/index.js +1 -1
  210. package/dist/components/care-plan-header/care-plan-header.agent.d.ts +4 -0
  211. package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
  212. package/dist/components/care-plan-header/index.d.ts +4 -0
  213. package/dist/components/care-plan-header/index.js +6 -0
  214. package/dist/components/carousel/index.js +1 -1
  215. package/dist/components/chart/index.js +1 -1
  216. package/dist/components/chat-container/index.js +1 -1
  217. package/dist/components/chat-input/index.js +1 -1
  218. package/dist/components/checkbox/index.js +1 -1
  219. package/dist/components/checkbox-group/index.js +1 -1
  220. package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
  221. package/dist/components/clinical-note-card/index.js +1 -1
  222. package/dist/components/collapsible/index.js +1 -1
  223. package/dist/components/color-picker/index.js +1 -1
  224. package/dist/components/combobox/index.js +1 -1
  225. package/dist/components/command-palette/index.js +1 -1
  226. package/dist/components/contact-profile-card/index.js +1 -1
  227. package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
  228. package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
  229. package/dist/components/control-room-rail/index.d.ts +5 -0
  230. package/dist/components/control-room-rail/index.js +9 -0
  231. package/dist/components/copy-field/index.js +1 -1
  232. package/dist/components/counter/counter.d.ts +22 -0
  233. package/dist/components/counter/index.d.ts +3 -0
  234. package/dist/components/counter/index.js +5 -0
  235. package/dist/components/cycle-calculator/index.js +1 -1
  236. package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
  237. package/dist/components/data-table/index.d.ts +1 -1
  238. package/dist/components/data-table/index.js +32 -30
  239. package/dist/components/date-picker/index.js +1 -1
  240. package/dist/components/date-range-picker/index.js +1 -1
  241. package/dist/components/date-time-picker/index.js +1 -1
  242. package/dist/components/dependent-selector/index.js +1 -1
  243. package/dist/components/dialog/index.js +1 -1
  244. package/dist/components/document-scanner/index.js +1 -1
  245. package/dist/components/dropdown-menu/index.js +1 -1
  246. package/dist/components/due-date-calculator/index.js +2 -2
  247. package/dist/components/email-input/index.js +1 -1
  248. package/dist/components/entity-summary/entity-summary.d.ts +43 -0
  249. package/dist/components/entity-summary/index.d.ts +3 -0
  250. package/dist/components/entity-summary/index.js +5 -0
  251. package/dist/components/fetal-weight/index.js +1 -1
  252. package/dist/components/file-upload/index.js +1 -1
  253. package/dist/components/fiscal-code-input/index.js +1 -1
  254. package/dist/components/freemium-paywall/freemium-paywall.d.ts +6 -0
  255. package/dist/components/freemium-paywall/index.js +1 -1
  256. package/dist/components/gestational-age-calculator/index.js +1 -1
  257. package/dist/components/hcg-doubling/index.js +1 -1
  258. package/dist/components/header-settings/index.js +1 -1
  259. package/dist/components/index.d.ts +11 -0
  260. package/dist/components/list/index.js +1 -1
  261. package/dist/components/locale-picker/index.js +1 -1
  262. package/dist/components/map-view/index.js +1 -1
  263. package/dist/components/message-card/index.js +1 -1
  264. package/dist/components/message-tray/index.js +1 -1
  265. package/dist/components/multi-select/index.js +1 -1
  266. package/dist/components/navigation-menu/index.js +1 -1
  267. package/dist/components/notes-panel/index.d.ts +3 -0
  268. package/dist/components/notes-panel/index.js +5 -0
  269. package/dist/components/notes-panel/notes-panel.d.ts +64 -0
  270. package/dist/components/notification-card/index.js +2 -2
  271. package/dist/components/notification-tray/index.js +1 -1
  272. package/dist/components/number-input/index.js +1 -1
  273. package/dist/components/operator-hero/index.js +1 -1
  274. package/dist/components/otp-input/index.js +1 -1
  275. package/dist/components/pagination/index.js +1 -1
  276. package/dist/components/password-input/index.js +1 -1
  277. package/dist/components/patient-details/index.d.ts +5 -0
  278. package/dist/components/patient-details/index.js +6 -0
  279. package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
  280. package/dist/components/patient-details/patient-details.d.ts +96 -0
  281. package/dist/components/patient-search/index.js +1 -1
  282. package/dist/components/patient-summary-card/index.js +1 -1
  283. package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
  284. package/dist/components/patient-table/cell-renderers/balance-badge-cell.d.ts +13 -0
  285. package/dist/components/patient-table/cell-renderers/care-plan-status-cell.d.ts +43 -0
  286. package/dist/components/patient-table/cell-renderers/next-appointment-cell.d.ts +24 -0
  287. package/dist/components/patient-table/columns.d.ts +131 -0
  288. package/dist/components/patient-table/index.d.ts +20 -0
  289. package/dist/components/patient-table/index.js +12 -0
  290. package/dist/components/patient-table/patient-table.d.ts +172 -0
  291. package/dist/components/patient-table/types.d.ts +222 -0
  292. package/dist/components/patient-table/use-responsive-columns.d.ts +111 -0
  293. package/dist/components/payment-card/index.js +1 -1
  294. package/dist/components/payment-form/index.js +1 -1
  295. package/dist/components/pdf-viewer/index.js +1 -1
  296. package/dist/components/periodontal-chart-card/index.js +1 -1
  297. package/dist/components/phone-input/index.js +1 -1
  298. package/dist/components/popover/index.js +1 -1
  299. package/dist/components/practice-results/index.js +1 -1
  300. package/dist/components/pregnancy-dating/index.js +1 -1
  301. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  302. package/dist/components/privacy-lock/index.js +1 -1
  303. package/dist/components/product-hub-tray/index.js +1 -1
  304. package/dist/components/progress/index.js +1 -1
  305. package/dist/components/public-footer/index.js +1 -1
  306. package/dist/components/public-header/index.js +1 -1
  307. package/dist/components/qr-code/index.js +1 -1
  308. package/dist/components/radio-group/index.js +1 -1
  309. package/dist/components/radiograph-panel/index.d.ts +4 -0
  310. package/dist/components/radiograph-panel/index.js +7 -0
  311. package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
  312. package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
  313. package/dist/components/recaptcha-widget/index.js +1 -1
  314. package/dist/components/resizable/index.js +1 -1
  315. package/dist/components/reviews-panel/index.js +1 -1
  316. package/dist/components/rich-text-editor/index.js +1 -1
  317. package/dist/components/search-bar/index.js +1 -1
  318. package/dist/components/search-input/index.js +2 -2
  319. package/dist/components/select/index.js +1 -1
  320. package/dist/components/session-countdown/index.js +1 -1
  321. package/dist/components/sheet/index.js +1 -1
  322. package/dist/components/sidebar/index.js +2 -2
  323. package/dist/components/sidebar/sidebar.d.ts +7 -0
  324. package/dist/components/sign-document/index.js +1 -1
  325. package/dist/components/signature-capture/index.js +1 -1
  326. package/dist/components/slider/index.js +1 -1
  327. package/dist/components/sparkline/index.js +1 -1
  328. package/dist/components/stepper-accordion/index.js +2 -2
  329. package/dist/components/stepper-progress/index.js +1 -1
  330. package/dist/components/suggestion-chip/index.js +1 -1
  331. package/dist/components/switch/index.js +1 -1
  332. package/dist/components/tab-bar/index.js +1 -1
  333. package/dist/components/tab-bar/tab-bar.d.ts +18 -1
  334. package/dist/components/tabs/index.js +1 -1
  335. package/dist/components/task-card/index.js +1 -1
  336. package/dist/components/task-tray/index.js +1 -1
  337. package/dist/components/text-area/index.js +1 -1
  338. package/dist/components/text-input/index.js +1 -1
  339. package/dist/components/theme-toggle/index.js +1 -1
  340. package/dist/components/time-picker/index.js +1 -1
  341. package/dist/components/timeline/index.js +1 -1
  342. package/dist/components/toast/index.js +1 -1
  343. package/dist/components/tooth-scheme/index.d.ts +2 -2
  344. package/dist/components/tooth-scheme/index.js +30 -23
  345. package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
  346. package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
  347. package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
  348. package/dist/components/transaction-chip/index.js +1 -1
  349. package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
  350. package/dist/components/transcript-panel/index.js +1 -1
  351. package/dist/components/unit-converter/index.js +1 -1
  352. package/dist/components/unit-converter/unit-converter.agent.d.ts +4 -0
  353. package/dist/components/unit-converter/unit-converter.d.ts +27 -0
  354. package/dist/components/warning-stack/index.js +1 -1
  355. package/dist/components/warning-stack/warning-stack.d.ts +14 -2
  356. package/dist/components/whatsapp-button/index.d.ts +1 -1
  357. package/dist/components/whatsapp-button/index.js +3 -2
  358. package/dist/components/whatsapp-button/whatsapp-button.d.ts +3 -0
  359. package/dist/components/workflow/index.js +1 -1
  360. package/dist/hooks/index.d.ts +1 -0
  361. package/dist/hooks/index.js +24 -22
  362. package/dist/hooks/use-clamp-overflow.d.ts +19 -0
  363. package/dist/hooks/use-overflow-collapse.d.ts +46 -0
  364. package/dist/hooks/use-persistent-state.d.ts +7 -1
  365. package/dist/hooks/use-scroll-overflow.d.ts +36 -0
  366. package/dist/i18n/locales/ar.d.ts +356 -0
  367. package/dist/i18n/locales/ar.js +370 -3
  368. package/dist/i18n/locales/de.d.ts +356 -0
  369. package/dist/i18n/locales/de.js +370 -3
  370. package/dist/i18n/locales/el.d.ts +356 -0
  371. package/dist/i18n/locales/el.js +370 -3
  372. package/dist/i18n/locales/en.d.ts +367 -0
  373. package/dist/i18n/locales/en.js +381 -3
  374. package/dist/i18n/locales/es.d.ts +356 -0
  375. package/dist/i18n/locales/es.js +370 -3
  376. package/dist/i18n/locales/fr.d.ts +356 -0
  377. package/dist/i18n/locales/fr.js +370 -3
  378. package/dist/i18n/locales/hi.d.ts +356 -0
  379. package/dist/i18n/locales/hi.js +370 -3
  380. package/dist/i18n/locales/it.d.ts +356 -0
  381. package/dist/i18n/locales/it.js +370 -3
  382. package/dist/i18n/locales/ja.d.ts +356 -0
  383. package/dist/i18n/locales/ja.js +370 -3
  384. package/dist/i18n/locales/nl.d.ts +356 -0
  385. package/dist/i18n/locales/nl.js +370 -3
  386. package/dist/i18n/locales/pl.d.ts +356 -0
  387. package/dist/i18n/locales/pl.js +370 -3
  388. package/dist/i18n/locales/pt.d.ts +356 -0
  389. package/dist/i18n/locales/pt.js +370 -3
  390. package/dist/i18n/locales/ro.d.ts +356 -0
  391. package/dist/i18n/locales/ro.js +370 -3
  392. package/dist/i18n/locales/ru.d.ts +356 -0
  393. package/dist/i18n/locales/ru.js +370 -3
  394. package/dist/i18n/locales/sq.d.ts +356 -0
  395. package/dist/i18n/locales/sq.js +370 -3
  396. package/dist/i18n/locales/sv.d.ts +356 -0
  397. package/dist/i18n/locales/sv.js +370 -3
  398. package/dist/i18n/locales/tr.d.ts +356 -0
  399. package/dist/i18n/locales/tr.js +370 -3
  400. package/dist/i18n/locales/zh.d.ts +356 -0
  401. package/dist/i18n/locales/zh.js +370 -3
  402. package/dist/index.js +740 -676
  403. package/dist/locales/ar.json +359 -3
  404. package/dist/locales/de.json +359 -3
  405. package/dist/locales/el.json +359 -3
  406. package/dist/locales/en.json +359 -3
  407. package/dist/locales/es.json +359 -3
  408. package/dist/locales/fr.json +359 -3
  409. package/dist/locales/hi.json +359 -3
  410. package/dist/locales/it.json +359 -3
  411. package/dist/locales/ja.json +359 -3
  412. package/dist/locales/nl.json +359 -3
  413. package/dist/locales/pl.json +359 -3
  414. package/dist/locales/pt.json +359 -3
  415. package/dist/locales/ro.json +359 -3
  416. package/dist/locales/ru.json +359 -3
  417. package/dist/locales/sq.json +359 -3
  418. package/dist/locales/sv.json +359 -3
  419. package/dist/locales/tr.json +359 -3
  420. package/dist/locales/zh.json +359 -3
  421. package/dist/patterns/alia-assistant/index.js +1 -1
  422. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  423. package/dist/patterns/patient-shell/index.js +1 -1
  424. package/dist/tokens.css +3 -2
  425. package/package.json +50 -1
  426. package/dist/_chunks/address-autocomplete-CT-9AOli.js +0 -358
  427. package/dist/_chunks/ai-tools-rail-CInA_1-E.js +0 -356
  428. package/dist/_chunks/appointment-tray-BMl89NPW.js +0 -419
  429. package/dist/_chunks/bishop-score-CjsB9bM-.js +0 -185
  430. package/dist/_chunks/bmi-calculator-n-823_1V.js +0 -258
  431. package/dist/_chunks/clinical-note-card-gtrxv6zn.js +0 -333
  432. package/dist/_chunks/editable-currency-cell-renderer-DHOspPee.js +0 -2409
  433. package/dist/_chunks/email-input-lQivsFrw.js +0 -396
  434. package/dist/_chunks/patient-summary-card-hEmr4eTW.js +0 -443
  435. package/dist/_chunks/registry-nPAVE19X.js +0 -21
  436. package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
  437. package/dist/_chunks/tooth-scheme-BIx1O2aJ.js +0 -1257
  438. package/dist/_chunks/unit-converter-C1V3ACM9.js +0 -196
  439. package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
  440. package/dist/_chunks/warning-stack-Cv4fr5zo.js +0 -220
@@ -1,56 +1,56 @@
1
- import { jsx as e, jsxs as y, Fragment as Oe } from "react/jsx-runtime";
2
- import { useId as le, useState as z, useRef as L, useCallback as C, useEffect as K, Fragment as nt, forwardRef as Nt, useMemo as Je, useImperativeHandle as zt } from "react";
3
- import { c as De } from "./index-D2ZczOXr.js";
1
+ import { jsx as e, jsxs as y, Fragment as De } from "react/jsx-runtime";
2
+ import { useId as de, useState as T, useRef as $, useCallback as C, useEffect as W, Fragment as at, forwardRef as Tt, useMemo as et, useImperativeHandle as zt } from "react";
3
+ import { c as je } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Z } from "react-i18next";
5
- import { SafeHtml as Tt, sanitiseHtml as _t } from "../safe-html/index.js";
6
- import { u as Mt } from "./registry-nPAVE19X.js";
7
- import { S as Le } from "./spinner-hbwuKwMf.js";
8
- import { I as P } from "./icon-button-LqoiKcUN.js";
9
- import { T as Rt } from "./text-area-BIx0tZ05.js";
10
- import { E as St } from "./editor-overlay-wYm22wZK.js";
11
- import { X as Ke } from "./x-CCcI3eJp.js";
12
- import { R as At } from "./rotate-ccw-BWANpitO.js";
13
- import { C as Et } from "./check-DPdL_Sm7.js";
14
- import { S as ot } from "./square-CZoGU14v.js";
15
- import { M as at } from "./mic-B4Gog3Gi.js";
16
- import { S as Ht } from "./send-CySZIRPJ.js";
17
- import { B as ne } from "./button-DD_0Xdmr.js";
18
- import { a as $t } from "./tooltip-DvmfrNvB.js";
19
- import { P as B } from "./popover-DTbfAuR0.js";
20
- import { D as ze } from "./dropdown-menu-DwwPovMZ.js";
21
- import { D as j } from "./dialog-DMGnSelc.js";
22
- import { C as qe } from "./color-picker-FXpItIaF.js";
23
- import { T as _e } from "./text-input-BaClJL8Y.js";
24
- import { C as It } from "./checkbox-DRcOdmXv.js";
25
- import { F as Lt } from "./file-upload-BosbPDb1.js";
26
- import { c as _ } from "./createLucideIcon-CrFbzy84.js";
27
- import { C as Ot } from "./chevron-down-BX_NP2Yh.js";
5
+ import { SafeHtml as Mt, sanitiseHtml as _t } from "../safe-html/index.js";
6
+ import { u as Rt } from "./registry-DvAUVLHh.js";
7
+ import { S as it } from "./spinner-hbwuKwMf.js";
8
+ import { I as B } from "./icon-button-LqoiKcUN.js";
9
+ import { T as St } from "./text-area-Bt3p7Pt0.js";
10
+ import { E as At } from "./editor-overlay-wYm22wZK.js";
11
+ import { X as tt } from "./x-CCcI3eJp.js";
12
+ import { R as Et } from "./rotate-ccw-BWANpitO.js";
13
+ import { C as Ht } from "./check-DPdL_Sm7.js";
14
+ import { S as _e } from "./square-CZoGU14v.js";
15
+ import { M as lt } from "./mic-B4Gog3Gi.js";
16
+ import { S as It } from "./send-CySZIRPJ.js";
17
+ import { B as oe } from "./button-DD_0Xdmr.js";
18
+ import { a as Lt } from "./tooltip-DvmfrNvB.js";
19
+ import { P as F } from "./popover-B2qCDhJC.js";
20
+ import { D as ze } from "./dropdown-menu-qrxjymfw.js";
21
+ import { D as P } from "./dialog-ZNuboNmy.js";
22
+ import { C as Pe } from "./color-picker-C_fZl6sA.js";
23
+ import { T as Re } from "./text-input-B-OWQ1Je.js";
24
+ import { C as $t } from "./checkbox-BuZ1u__2.js";
25
+ import { F as Ot } from "./file-upload-DwZcAK8D.js";
26
+ import { c as M } from "./createLucideIcon-CrFbzy84.js";
27
+ import { C as qt } from "./chevron-down-BX_NP2Yh.js";
28
28
  import { I as Dt } from "./image-C6RM5hfF.js";
29
- import { C as qt } from "./columns-2-BTOBZbep.js";
30
- import { T as jt } from "./trash-2-rPAKaRgB.js";
31
- import { S as Pt } from "./sparkles-CuYXqQLg.js";
29
+ import { C as jt } from "./columns-2-BTOBZbep.js";
30
+ import { T as Pt } from "./trash-2-rPAKaRgB.js";
31
+ import { S as Bt } from "./sparkles-CuYXqQLg.js";
32
32
  /**
33
33
  * @license lucide-react v1.8.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const Bt = [
38
+ const Ft = [
39
39
  ["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
40
40
  ["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
41
41
  ["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
42
- ], Ft = _("between-horizontal-end", Bt);
42
+ ], Vt = M("between-horizontal-end", Ft);
43
43
  /**
44
44
  * @license lucide-react v1.8.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
48
  */
49
- const Vt = [
49
+ const Kt = [
50
50
  ["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
51
51
  ["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
52
52
  ["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
53
- ], Gt = _("between-horizontal-start", Vt);
53
+ ], Gt = M("between-horizontal-start", Kt);
54
54
  /**
55
55
  * @license lucide-react v1.8.0 - ISC
56
56
  *
@@ -61,18 +61,18 @@ const Wt = [
61
61
  ["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
62
62
  ["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
63
63
  ["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
64
- ], Xt = _("between-vertical-end", Wt);
64
+ ], Ut = M("between-vertical-end", Wt);
65
65
  /**
66
66
  * @license lucide-react v1.8.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
70
  */
71
- const Ut = [
71
+ const Xt = [
72
72
  ["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
73
73
  ["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
74
74
  ["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
75
- ], Qt = _("between-vertical-start", Ut);
75
+ ], Qt = M("between-vertical-start", Xt);
76
76
  /**
77
77
  * @license lucide-react v1.8.0 - ISC
78
78
  *
@@ -84,7 +84,7 @@ const Zt = [
84
84
  "path",
85
85
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
86
86
  ]
87
- ], Yt = _("bold", Zt);
87
+ ], Yt = M("bold", Zt);
88
88
  /**
89
89
  * @license lucide-react v1.8.0 - ISC
90
90
  *
@@ -96,86 +96,86 @@ const Jt = [
96
96
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
97
97
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
98
98
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
99
- ], Kt = _("heading-2", Jt);
99
+ ], er = M("heading-2", Jt);
100
100
  /**
101
101
  * @license lucide-react v1.8.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
105
  */
106
- const er = [
106
+ const tr = [
107
107
  ["path", { d: "M4 12h8", key: "17cfdx" }],
108
108
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
109
109
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
110
110
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
111
111
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
112
- ], tr = _("heading-3", er);
112
+ ], rr = M("heading-3", tr);
113
113
  /**
114
114
  * @license lucide-react v1.8.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
118
  */
119
- const rr = [
119
+ const nr = [
120
120
  ["path", { d: "m9 11-6 6v3h9l3-3", key: "1a3l36" }],
121
121
  ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4", key: "14a9rk" }]
122
- ], nr = _("highlighter", rr);
122
+ ], or = M("highlighter", nr);
123
123
  /**
124
124
  * @license lucide-react v1.8.0 - ISC
125
125
  *
126
126
  * This source code is licensed under the ISC license.
127
127
  * See the LICENSE file in the root directory of this source tree.
128
128
  */
129
- const or = [
129
+ const ar = [
130
130
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
131
131
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
132
132
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
133
- ], ar = _("italic", or);
133
+ ], ir = M("italic", ar);
134
134
  /**
135
135
  * @license lucide-react v1.8.0 - ISC
136
136
  *
137
137
  * This source code is licensed under the ISC license.
138
138
  * See the LICENSE file in the root directory of this source tree.
139
139
  */
140
- const ir = [
140
+ const lr = [
141
141
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
142
142
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
143
- ], lr = _("link", ir);
143
+ ], sr = M("link", lr);
144
144
  /**
145
145
  * @license lucide-react v1.8.0 - ISC
146
146
  *
147
147
  * This source code is licensed under the ISC license.
148
148
  * See the LICENSE file in the root directory of this source tree.
149
149
  */
150
- const sr = [
150
+ const dr = [
151
151
  ["path", { d: "M11 5h10", key: "1cz7ny" }],
152
152
  ["path", { d: "M11 12h10", key: "1438ji" }],
153
153
  ["path", { d: "M11 19h10", key: "11t30w" }],
154
154
  ["path", { d: "M4 4h1v5", key: "10yrso" }],
155
155
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
156
156
  ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
157
- ], dr = _("list-ordered", sr);
157
+ ], cr = M("list-ordered", dr);
158
158
  /**
159
159
  * @license lucide-react v1.8.0 - ISC
160
160
  *
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const cr = [
164
+ const ur = [
165
165
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
166
166
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
167
167
  ["path", { d: "M3 19h.01", key: "noohij" }],
168
168
  ["path", { d: "M8 5h13", key: "1pao27" }],
169
169
  ["path", { d: "M8 12h13", key: "1za7za" }],
170
170
  ["path", { d: "M8 19h13", key: "m83p4d" }]
171
- ], ur = _("list", cr);
171
+ ], mr = M("list", ur);
172
172
  /**
173
173
  * @license lucide-react v1.8.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
177
  */
178
- const mr = [
178
+ const hr = [
179
179
  ["path", { d: "M11 7 6 2", key: "1jwth8" }],
180
180
  ["path", { d: "M18.992 12H2.041", key: "xw1gg" }],
181
181
  [
@@ -192,25 +192,25 @@ const mr = [
192
192
  key: "1nk1rd"
193
193
  }
194
194
  ]
195
- ], hr = _("paint-bucket", mr);
195
+ ], fr = M("paint-bucket", hr);
196
196
  /**
197
197
  * @license lucide-react v1.8.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
201
  */
202
- const fr = [
202
+ const gr = [
203
203
  ["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
204
204
  ["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
205
205
  ["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
206
- ], gr = _("paint-roller", fr);
206
+ ], pr = M("paint-roller", gr);
207
207
  /**
208
208
  * @license lucide-react v1.8.0 - ISC
209
209
  *
210
210
  * This source code is licensed under the ISC license.
211
211
  * See the LICENSE file in the root directory of this source tree.
212
212
  */
213
- const pr = [
213
+ const br = [
214
214
  [
215
215
  "path",
216
216
  {
@@ -222,48 +222,48 @@ const pr = [
222
222
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
223
223
  ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
224
224
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
225
- ], br = _("palette", pr);
225
+ ], yr = M("palette", br);
226
226
  /**
227
227
  * @license lucide-react v1.8.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
231
  */
232
- const yr = [
232
+ const vr = [
233
233
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
234
234
  ["path", { d: "M14 9h1", key: "l0svgy" }],
235
235
  ["path", { d: "M19 9h2", key: "te2zfg" }],
236
236
  ["path", { d: "M3 9h2", key: "1h4ldw" }],
237
237
  ["path", { d: "M9 9h1", key: "15jzuz" }]
238
- ], vr = _("panel-top-dashed", yr);
238
+ ], kr = M("panel-top-dashed", vr);
239
239
  /**
240
240
  * @license lucide-react v1.8.0 - ISC
241
241
  *
242
242
  * This source code is licensed under the ISC license.
243
243
  * See the LICENSE file in the root directory of this source tree.
244
244
  */
245
- const kr = [
245
+ const wr = [
246
246
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
247
247
  ["path", { d: "M3 9h18", key: "1pudct" }]
248
- ], wr = _("panel-top", kr);
248
+ ], xr = M("panel-top", wr);
249
249
  /**
250
250
  * @license lucide-react v1.8.0 - ISC
251
251
  *
252
252
  * This source code is licensed under the ISC license.
253
253
  * See the LICENSE file in the root directory of this source tree.
254
254
  */
255
- const xr = [
255
+ const Cr = [
256
256
  ["path", { d: "M13 4v16", key: "8vvj80" }],
257
257
  ["path", { d: "M17 4v16", key: "7dpous" }],
258
258
  ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
259
- ], Cr = _("pilcrow", xr);
259
+ ], Nr = M("pilcrow", Cr);
260
260
  /**
261
261
  * @license lucide-react v1.8.0 - ISC
262
262
  *
263
263
  * This source code is licensed under the ISC license.
264
264
  * See the LICENSE file in the root directory of this source tree.
265
265
  */
266
- const Nr = [
266
+ const Tr = [
267
267
  [
268
268
  "path",
269
269
  {
@@ -278,68 +278,68 @@ const Nr = [
278
278
  key: "1ymkrd"
279
279
  }
280
280
  ]
281
- ], zr = _("quote", Nr);
281
+ ], zr = M("quote", Tr);
282
282
  /**
283
283
  * @license lucide-react v1.8.0 - ISC
284
284
  *
285
285
  * This source code is licensed under the ISC license.
286
286
  * See the LICENSE file in the root directory of this source tree.
287
287
  */
288
- const Tr = [
288
+ const Mr = [
289
289
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
290
290
  ["path", { d: "M3 12h18", key: "1i2n21" }]
291
- ], _r = _("rows-2", Tr);
291
+ ], _r = M("rows-2", Mr);
292
292
  /**
293
293
  * @license lucide-react v1.8.0 - ISC
294
294
  *
295
295
  * This source code is licensed under the ISC license.
296
296
  * See the LICENSE file in the root directory of this source tree.
297
297
  */
298
- const Mr = [
298
+ const Rr = [
299
299
  ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
300
300
  ["path", { d: "M8 12h8", key: "1wcyev" }],
301
301
  ["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
302
- ], Rr = _("spell-check", Mr);
302
+ ], Sr = M("spell-check", Rr);
303
303
  /**
304
304
  * @license lucide-react v1.8.0 - ISC
305
305
  *
306
306
  * This source code is licensed under the ISC license.
307
307
  * See the LICENSE file in the root directory of this source tree.
308
308
  */
309
- const Sr = [
309
+ const Ar = [
310
310
  ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
311
311
  ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
312
312
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
313
- ], Ar = _("strikethrough", Sr);
313
+ ], Er = M("strikethrough", Ar);
314
314
  /**
315
315
  * @license lucide-react v1.8.0 - ISC
316
316
  *
317
317
  * This source code is licensed under the ISC license.
318
318
  * See the LICENSE file in the root directory of this source tree.
319
319
  */
320
- const Er = [
320
+ const Hr = [
321
321
  ["path", { d: "M12 3v18", key: "108xh3" }],
322
322
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
323
323
  ["path", { d: "M3 9h18", key: "1pudct" }],
324
324
  ["path", { d: "M3 15h18", key: "5xshup" }]
325
- ], Hr = _("table", Er);
325
+ ], Ir = M("table", Hr);
326
326
  /**
327
327
  * @license lucide-react v1.8.0 - ISC
328
328
  *
329
329
  * This source code is licensed under the ISC license.
330
330
  * See the LICENSE file in the root directory of this source tree.
331
331
  */
332
- const $r = [
332
+ const Lr = [
333
333
  ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
334
334
  ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
335
- ], Ir = _("underline", $r);
335
+ ], $r = M("underline", Lr);
336
336
  /**
337
337
  * @license lucide-react v1.8.0 - ISC
338
338
  *
339
339
  * This source code is licensed under the ISC license.
340
340
  * See the LICENSE file in the root directory of this source tree.
341
341
  */
342
- const Lr = [
342
+ const Or = [
343
343
  [
344
344
  "path",
345
345
  {
@@ -354,7 +354,7 @@ const Lr = [
354
354
  ["path", { d: "M7 8H3", key: "zfb6yr" }],
355
355
  ["path", { d: "M21 16h-4", key: "1cnmox" }],
356
356
  ["path", { d: "M11 3H9", key: "1obp7u" }]
357
- ], Or = _("wand-sparkles", Lr);
357
+ ], qr = M("wand-sparkles", Or);
358
358
  /**
359
359
  * @license lucide-react v1.8.0 - ISC
360
360
  *
@@ -369,53 +369,117 @@ const Dr = [
369
369
  key: "1ngwbx"
370
370
  }
371
371
  ]
372
- ], qr = _("wrench", Dr), jr = {
372
+ ], jr = M("wrench", Dr), Pr = {
373
373
  id: "rich-text-editor",
374
374
  capabilities: ["edit_inline"],
375
375
  state: {
376
376
  html: {
377
377
  type: "string",
378
+ descriptionKey: "ui.agent.richTextEditor.state.html",
378
379
  description: "Sanitised HTML representation of the editor content.",
379
380
  read: (o) => o.getHTML()
380
381
  },
381
382
  text: {
382
383
  type: "string",
384
+ descriptionKey: "ui.agent.richTextEditor.state.text",
383
385
  description: "Plain-text content of the editor (tags stripped).",
384
386
  read: (o) => o.getText()
385
387
  },
386
388
  markdown: {
387
389
  type: "string",
390
+ descriptionKey: "ui.agent.richTextEditor.state.markdown",
388
391
  description: "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
389
392
  read: (o) => o.getMarkdown()
390
393
  }
391
394
  },
392
395
  actions: {
393
396
  set_content: {
397
+ // Replaces the whole document — discards whatever the user had typed.
394
398
  safety: "destructive",
395
399
  argsType: "{ html: string }",
400
+ argsSchema: {
401
+ type: "object",
402
+ properties: {
403
+ html: {
404
+ type: "string",
405
+ description: "Replacement HTML (sanitised via DOMPurify)."
406
+ }
407
+ },
408
+ required: ["html"]
409
+ },
410
+ idempotent: !0,
411
+ descriptionKey: "ui.agent.richTextEditor.actions.setContent",
396
412
  description: "Replace the editor content. Loses unsaved input.",
397
413
  invoke: (o, a) => {
398
414
  o.setContent(a.html);
399
415
  }
400
416
  },
401
417
  insert_at_cursor: {
402
- safety: "destructive",
418
+ // Reversible via the editor's own undo stack — write, not destructive.
419
+ safety: "write",
403
420
  argsType: "{ content: string; asHtml?: boolean }",
421
+ argsSchema: {
422
+ type: "object",
423
+ properties: {
424
+ content: {
425
+ type: "string",
426
+ description: "Content to insert at the caret."
427
+ },
428
+ asHtml: {
429
+ type: "boolean",
430
+ description: "Treat content as HTML (sanitised). Pass false for plain text. Defaults to true."
431
+ }
432
+ },
433
+ required: ["content"]
434
+ },
435
+ descriptionKey: "ui.agent.richTextEditor.actions.insertAtCursor",
404
436
  description: "Insert content at the caret (replacing any selection). HTML is sanitised; pass asHtml:false for plain text. Seam for merge/template variables and AI-generated drafts.",
437
+ examples: [
438
+ {
439
+ args: { content: "{{patient.firstName}}", asHtml: !1 },
440
+ note: "Insert a merge variable as plain text."
441
+ }
442
+ ],
405
443
  invoke: (o, a) => {
406
444
  o.insertAtCursor(a.content, { asHtml: a.asHtml });
407
445
  }
408
446
  },
409
447
  apply_format: {
410
- safety: "destructive",
448
+ // Reversible via undo — write, not destructive.
449
+ safety: "write",
411
450
  argsType: "{ format: 'bold' | 'italic' | 'strikethrough' | 'bulletedList' | 'numberedList' | 'heading' | 'quote' | 'paragraph' }",
451
+ argsSchema: {
452
+ type: "object",
453
+ properties: {
454
+ format: {
455
+ type: "string",
456
+ enum: [
457
+ "bold",
458
+ "italic",
459
+ "strikethrough",
460
+ "bulletedList",
461
+ "numberedList",
462
+ "heading",
463
+ "quote",
464
+ "paragraph"
465
+ ],
466
+ description: "Block or inline format to toggle/apply."
467
+ }
468
+ },
469
+ required: ["format"]
470
+ },
471
+ descriptionKey: "ui.agent.richTextEditor.actions.applyFormat",
412
472
  description: "Toggle/apply a block or inline format on the current selection (bold, italic, strikethrough, bulleted/numbered list, heading, quote, paragraph).",
473
+ examples: [{ args: { format: "bold" }, note: "Bold the selection." }],
413
474
  invoke: (o, a) => {
414
475
  o.applyFormat(a.format);
415
476
  }
416
477
  },
417
478
  clear: {
479
+ // Empties the document — loses unsaved input.
418
480
  safety: "destructive",
481
+ idempotent: !0,
482
+ descriptionKey: "ui.agent.richTextEditor.actions.clear",
419
483
  description: "Empty the editor. Loses unsaved input.",
420
484
  invoke: (o) => {
421
485
  o.clear();
@@ -423,6 +487,8 @@ const Dr = [
423
487
  },
424
488
  focus: {
425
489
  safety: "read",
490
+ idempotent: !0,
491
+ descriptionKey: "ui.agent.richTextEditor.actions.focus",
426
492
  description: "Move keyboard focus to the editor surface.",
427
493
  invoke: (o) => {
428
494
  o.focus();
@@ -437,97 +503,97 @@ const Dr = [
437
503
  description: "Sourced from the id prop."
438
504
  }
439
505
  }
440
- }, Pr = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", ie = "ds:!size-[var(--min-target-size)]", Br = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Fr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", et = [
506
+ }, Br = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", se = "ds:!size-[var(--min-target-size)]", Fr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Vr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", rt = [
441
507
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
442
508
  "ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
443
509
  "ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
444
510
  "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]"
445
511
  ].join(" ");
446
- function tt(o, a) {
512
+ function nt(o, a) {
447
513
  return a ? o ? /\s$/.test(o) ? `${o}${a}` : `${o} ${a}` : a : o;
448
514
  }
449
- function Vr({
515
+ function Kr({
450
516
  open: o,
451
517
  onClose: a,
452
518
  onRequestAiDraft: c,
453
- onInsert: l,
454
- previewAsHtml: s = !0,
455
- privacyNotice: f,
456
- onDictate: g
519
+ onInsert: s,
520
+ previewAsHtml: d = !0,
521
+ privacyNotice: g,
522
+ onDictate: p
457
523
  }) {
458
- const { t: i } = Z(), p = le(), v = le(), [T, H] = z(""), [S, w] = z(!1), [O, u] = z(!1), [h, k] = z(null), A = L(null), [M, E] = z(!1), [Y, $] = z(""), [D, I] = z(""), J = L(null), ee = C(() => {
459
- var x;
460
- (x = J.current) == null || x.abort();
461
- }, []), de = C(() => {
462
- if (!g) return;
463
- const x = new AbortController();
464
- J.current = x, E(!0), $(""), I(i("editor.ai.listening")), g({
465
- signal: x.signal,
466
- onPartialTranscript: (q) => {
467
- x.signal.aborted || $(q);
524
+ const { t: l } = Z(), b = de(), v = de(), [z, I] = T(""), [S, x] = T(!1), [O, m] = T(!1), [f, k] = T(null), A = $(null), [_, E] = T(!1), [Y, L] = T(""), [q, H] = T(""), J = $(null), ee = C(() => {
525
+ var w;
526
+ (w = J.current) == null || w.abort();
527
+ }, []), me = C(() => {
528
+ if (!p) return;
529
+ const w = new AbortController();
530
+ J.current = w, E(!0), L(""), H(l("editor.ai.listening")), p({
531
+ signal: w.signal,
532
+ onPartialTranscript: (D) => {
533
+ w.signal.aborted || L(D);
468
534
  },
469
- onFinalTranscript: (q) => {
470
- if (x.signal.aborted) return;
471
- const F = q.trim();
472
- $(""), F && (H((X) => tt(X, F)), I(F));
535
+ onFinalTranscript: (D) => {
536
+ if (w.signal.aborted) return;
537
+ const j = D.trim();
538
+ L(""), j && (I((U) => nt(U, j)), H(j));
473
539
  }
474
540
  }).catch(() => {
475
541
  }).finally(() => {
476
- $(""), J.current === x && (J.current = null, E(!1), I(""));
542
+ L(""), J.current === w && (J.current = null, E(!1), H(""));
477
543
  });
478
- }, [g, i]), R = C(() => {
479
- M ? ee() : de();
480
- }, [M, de, ee]);
481
- K(() => {
482
- var x, q;
483
- o ? (H(""), w(!1), u(!1), k(null), $(""), I("")) : ((x = A.current) == null || x.abort(), A.current = null, (q = J.current) == null || q.abort());
484
- }, [o]), K(
544
+ }, [p, l]), R = C(() => {
545
+ _ ? ee() : me();
546
+ }, [_, me, ee]);
547
+ W(() => {
548
+ var w, D;
549
+ o ? (I(""), x(!1), m(!1), k(null), L(""), H("")) : ((w = A.current) == null || w.abort(), A.current = null, (D = J.current) == null || D.abort());
550
+ }, [o]), W(
485
551
  () => () => {
486
- var x, q;
487
- (x = A.current) == null || x.abort(), (q = J.current) == null || q.abort();
552
+ var w, D;
553
+ (w = A.current) == null || w.abort(), (D = J.current) == null || D.abort();
488
554
  },
489
555
  []
490
556
  );
491
- const W = C(() => {
492
- var F;
493
- const x = T.trim();
494
- if (!x || S) return;
495
- ee(), (F = A.current) == null || F.abort();
496
- const q = new AbortController();
497
- A.current = q, u(!1), w(!0), c({ prompt: x, signal: q.signal }).then((X) => {
498
- q.signal.aborted || (k(X), w(!1));
499
- }).catch((X) => {
500
- q.signal.aborted || X && typeof X == "object" && "name" in X && X.name === "AbortError" || (u(!0), w(!1));
557
+ const G = C(() => {
558
+ var j;
559
+ const w = z.trim();
560
+ if (!w || S) return;
561
+ ee(), (j = A.current) == null || j.abort();
562
+ const D = new AbortController();
563
+ A.current = D, m(!1), x(!0), c({ prompt: w, signal: D.signal }).then((U) => {
564
+ D.signal.aborted || (k(U), x(!1));
565
+ }).catch((U) => {
566
+ D.signal.aborted || U && typeof U == "object" && "name" in U && U.name === "AbortError" || (m(!0), x(!1));
501
567
  });
502
- }, [T, S, c, ee]), G = C(() => {
503
- h != null && (l(h), a());
504
- }, [h, l, a]), ce = h != null, ye = M ? tt(T, Y) : T;
568
+ }, [z, S, c, ee]), K = C(() => {
569
+ f != null && (s(f), a());
570
+ }, [f, s, a]), he = f != null, fe = _ ? nt(z, Y) : z;
505
571
  return /* @__PURE__ */ e(
506
- St,
572
+ At,
507
573
  {
508
574
  open: o,
509
575
  onClose: a,
510
- ariaLabel: i("editor.ai.dialogTitle"),
511
- children: ce ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
576
+ ariaLabel: l("editor.ai.dialogTitle"),
577
+ children: he ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
512
578
  /* @__PURE__ */ e(
513
- P,
579
+ B,
514
580
  {
515
581
  size: "md",
516
582
  intent: "outline",
517
- className: ie,
518
- icon: /* @__PURE__ */ e(Ke, {}),
519
- "aria-label": i("common.close"),
583
+ className: se,
584
+ icon: /* @__PURE__ */ e(tt, {}),
585
+ "aria-label": l("common.close"),
520
586
  onClick: a
521
587
  }
522
588
  ),
523
- /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: s ? /* @__PURE__ */ e(
524
- Tt,
589
+ /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: d ? /* @__PURE__ */ e(
590
+ Mt,
525
591
  {
526
- html: h,
592
+ html: f,
527
593
  profile: "rich-text",
528
- className: et,
594
+ className: rt,
529
595
  tabIndex: 0,
530
- "aria-label": i("editor.ai.dialogTitle")
596
+ "aria-label": l("editor.ai.dialogTitle")
531
597
  }
532
598
  ) : (
533
599
  // Focusable so a keyboard user can scroll a long draft preview
@@ -535,89 +601,89 @@ function Vr({
535
601
  // tabIndex allowlist doesn't cover a scrollable, non-interactive
536
602
  // text region.
537
603
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
538
- /* @__PURE__ */ e("p", { className: et, tabIndex: 0, children: h })
604
+ /* @__PURE__ */ e("p", { className: rt, tabIndex: 0, children: f })
539
605
  ) }),
540
606
  /* @__PURE__ */ e(
541
- P,
607
+ B,
542
608
  {
543
609
  size: "md",
544
610
  intent: "outline",
545
- className: `${ie} ds:rounded-full`,
546
- icon: /* @__PURE__ */ e(At, {}),
547
- "aria-label": i("editor.ai.retry"),
611
+ className: `${se} ds:rounded-full`,
612
+ icon: /* @__PURE__ */ e(Et, {}),
613
+ "aria-label": l("editor.ai.retry"),
548
614
  onClick: () => k(null)
549
615
  }
550
616
  ),
551
617
  /* @__PURE__ */ e(
552
- P,
618
+ B,
553
619
  {
554
620
  size: "md",
555
621
  intent: "primary",
556
- className: `${ie} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
557
- icon: /* @__PURE__ */ e(Et, {}),
558
- "aria-label": i("common.confirm"),
559
- onClick: G
622
+ className: `${se} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
623
+ icon: /* @__PURE__ */ e(Ht, {}),
624
+ "aria-label": l("common.confirm"),
625
+ onClick: K
560
626
  }
561
627
  )
562
- ] }) : /* @__PURE__ */ y(Oe, { children: [
628
+ ] }) : /* @__PURE__ */ y(De, { children: [
563
629
  /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
564
630
  /* @__PURE__ */ e(
565
- P,
631
+ B,
566
632
  {
567
633
  size: "md",
568
634
  intent: "outline",
569
- className: ie,
570
- icon: /* @__PURE__ */ e(Ke, {}),
571
- "aria-label": i("common.close"),
635
+ className: se,
636
+ icon: /* @__PURE__ */ e(tt, {}),
637
+ "aria-label": l("common.close"),
572
638
  onClick: a
573
639
  }
574
640
  ),
575
641
  /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ e(
576
- Rt,
642
+ St,
577
643
  {
578
- id: p,
644
+ id: b,
579
645
  size: "md",
580
646
  className: "ds:content-center",
581
- value: ye,
582
- onChange: (x) => H(x.target.value),
583
- placeholder: i("editor.ai.promptPlaceholder"),
584
- "aria-label": i("editor.ai.promptLabel"),
647
+ value: fe,
648
+ onChange: (w) => I(w.target.value),
649
+ placeholder: l("editor.ai.promptPlaceholder"),
650
+ "aria-label": l("editor.ai.promptLabel"),
585
651
  autoResize: !0,
586
652
  minRows: 1,
587
653
  maxRows: 3,
588
- readOnly: M,
654
+ readOnly: _,
589
655
  tone: O ? "error" : "default",
590
656
  "aria-describedby": O ? v : void 0
591
657
  }
592
658
  ) }),
593
- g ? /* @__PURE__ */ e(
594
- P,
659
+ p ? /* @__PURE__ */ e(
660
+ B,
595
661
  {
596
662
  size: "md",
597
663
  intent: "outline",
598
- className: M ? `${ie} ${Pr}` : ie,
599
- icon: M ? /* @__PURE__ */ e(ot, { className: "ds:fill-current" }) : /* @__PURE__ */ e(at, {}),
600
- "aria-pressed": M,
601
- "aria-label": i(M ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
664
+ className: _ ? `${se} ${Br}` : se,
665
+ icon: _ ? /* @__PURE__ */ e(_e, { className: "ds:fill-current" }) : /* @__PURE__ */ e(lt, {}),
666
+ "aria-pressed": _,
667
+ "aria-label": l(_ ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
602
668
  onClick: R
603
669
  }
604
670
  ) : null,
605
671
  /* @__PURE__ */ e(
606
- P,
672
+ B,
607
673
  {
608
674
  size: "md",
609
675
  intent: "primary",
610
- icon: S ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Ht, {}),
611
- className: `${ie} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
612
- disabled: S || !T.trim(),
676
+ icon: S ? /* @__PURE__ */ e(it, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(It, {}),
677
+ className: `${se} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
678
+ disabled: S || !z.trim(),
613
679
  "aria-busy": S || void 0,
614
- "aria-label": i("editor.ai.generate"),
615
- onClick: W
680
+ "aria-label": l("editor.ai.generate"),
681
+ onClick: G
616
682
  }
617
683
  )
618
684
  ] }),
619
- g ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: D }) : null,
620
- O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Fr, children: i("editor.ai.error") }) : f ? /* @__PURE__ */ e("p", { className: Br, children: f }) : null
685
+ p ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: q }) : null,
686
+ O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Vr, children: l("editor.ai.error") }) : g ? /* @__PURE__ */ e("p", { className: Fr, children: g }) : null
621
687
  ] })
622
688
  }
623
689
  );
@@ -632,56 +698,56 @@ const Gr = {
632
698
  },
633
699
  italic: {
634
700
  id: "italic",
635
- icon: /* @__PURE__ */ e(ar, {}),
701
+ icon: /* @__PURE__ */ e(ir, {}),
636
702
  label: ["editor.italic", "Italic"],
637
703
  command: ["module.inline.format", { tag: "i" }],
638
704
  toggle: "italic"
639
705
  },
640
706
  underline: {
641
707
  id: "underline",
642
- icon: /* @__PURE__ */ e(Ir, {}),
708
+ icon: /* @__PURE__ */ e($r, {}),
643
709
  label: ["editor.underline", "Underline"],
644
710
  command: ["module.inline.format", { tag: "u" }],
645
711
  toggle: "underline"
646
712
  },
647
713
  strike: {
648
714
  id: "strike",
649
- icon: /* @__PURE__ */ e(Ar, {}),
715
+ icon: /* @__PURE__ */ e(Er, {}),
650
716
  label: ["editor.strike", "Strikethrough"],
651
717
  command: ["module.inline.format", { tag: "del" }],
652
718
  toggle: "strike"
653
719
  },
654
720
  ul: {
655
721
  id: "ul",
656
- icon: /* @__PURE__ */ e(ur, {}),
722
+ icon: /* @__PURE__ */ e(mr, {}),
657
723
  label: ["editor.list.bullet", "Bulleted list"],
658
724
  command: ["module.list.toggle", "ul"],
659
725
  toggle: "ul"
660
726
  },
661
727
  ol: {
662
728
  id: "ol",
663
- icon: /* @__PURE__ */ e(dr, {}),
729
+ icon: /* @__PURE__ */ e(cr, {}),
664
730
  label: ["editor.list.ordered", "Numbered list"],
665
731
  command: ["module.list.toggle", "ol"],
666
732
  toggle: "ol"
667
733
  }
668
- }, $e = [
734
+ }, Oe = [
669
735
  {
670
736
  id: "paragraph",
671
737
  tag: "p",
672
- icon: /* @__PURE__ */ e(Cr, {}),
738
+ icon: /* @__PURE__ */ e(Nr, {}),
673
739
  label: ["editor.paragraph", "Paragraph"]
674
740
  },
675
741
  {
676
742
  id: "h2",
677
743
  tag: "h2",
678
- icon: /* @__PURE__ */ e(Kt, {}),
744
+ icon: /* @__PURE__ */ e(er, {}),
679
745
  label: ["editor.heading2", "Heading 2"]
680
746
  },
681
747
  {
682
748
  id: "h3",
683
749
  tag: "h3",
684
- icon: /* @__PURE__ */ e(tr, {}),
750
+ icon: /* @__PURE__ */ e(rr, {}),
685
751
  label: ["editor.heading3", "Heading 3"]
686
752
  },
687
753
  {
@@ -691,7 +757,7 @@ const Gr = {
691
757
  label: ["editor.quote", "Quote"]
692
758
  }
693
759
  ], Wr = {
694
- minimal: ["bold", "italic", "link"],
760
+ minimal: ["bold", "italic", "underline", "link"],
695
761
  standard: [
696
762
  "format",
697
763
  "bold",
@@ -703,7 +769,7 @@ const Gr = {
703
769
  "link"
704
770
  ],
705
771
  full: ["format", "bold", "italic", "underline", "strike", "ul", "ol", "link"]
706
- }, it = [
772
+ }, st = [
707
773
  {
708
774
  id: "rowAbove",
709
775
  command: "plugin.table.addRowAbove",
@@ -713,7 +779,7 @@ const Gr = {
713
779
  {
714
780
  id: "rowBelow",
715
781
  command: "plugin.table.addRowBelow",
716
- icon: /* @__PURE__ */ e(Ft, {}),
782
+ icon: /* @__PURE__ */ e(Vt, {}),
717
783
  label: ["editor.table.rowBelow", "Add row below"]
718
784
  },
719
785
  {
@@ -725,19 +791,19 @@ const Gr = {
725
791
  {
726
792
  id: "colRight",
727
793
  command: "plugin.table.addColumnRight",
728
- icon: /* @__PURE__ */ e(Xt, {}),
794
+ icon: /* @__PURE__ */ e(Ut, {}),
729
795
  label: ["editor.table.columnRight", "Add column right"]
730
796
  },
731
797
  {
732
798
  id: "addHead",
733
799
  command: "plugin.table.addHead",
734
- icon: /* @__PURE__ */ e(wr, {}),
800
+ icon: /* @__PURE__ */ e(xr, {}),
735
801
  label: ["editor.table.addHeader", "Add header row"]
736
802
  },
737
803
  {
738
804
  id: "deleteHead",
739
805
  command: "plugin.table.deleteHead",
740
- icon: /* @__PURE__ */ e(vr, {}),
806
+ icon: /* @__PURE__ */ e(kr, {}),
741
807
  label: ["editor.table.deleteHeader", "Remove header row"]
742
808
  },
743
809
  {
@@ -749,53 +815,53 @@ const Gr = {
749
815
  {
750
816
  id: "deleteColumn",
751
817
  command: "plugin.table.deleteColumn",
752
- icon: /* @__PURE__ */ e(qt, {}),
818
+ icon: /* @__PURE__ */ e(jt, {}),
753
819
  label: ["editor.table.deleteColumn", "Delete column"]
754
820
  },
755
821
  {
756
822
  id: "deleteTable",
757
823
  command: "plugin.table.deleteTable",
758
- icon: /* @__PURE__ */ e(jt, {}),
824
+ icon: /* @__PURE__ */ e(Pt, {}),
759
825
  label: ["editor.table.deleteTable", "Delete table"]
760
826
  }
761
- ], Te = 6, Xr = De(
827
+ ], Me = 6, Ur = je(
762
828
  [
763
829
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
764
830
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
765
831
  "ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
766
832
  "ds:shadow-[var(--shadow-md)]"
767
833
  ].join(" ")
768
- ), lt = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", be = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
769
- function Me(o) {
834
+ ), dt = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", ve = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
835
+ function Se(o) {
770
836
  return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
771
837
  }
772
- function Ur({
838
+ function Xr({
773
839
  run: o,
774
840
  active: a,
775
841
  onTriggerDown: c
776
842
  }) {
777
- const { t: l } = Z(), s = $e.find((f) => a.has(f.id)) ?? $e[0];
843
+ const { t: s } = Z(), d = Oe.find((g) => a.has(g.id)) ?? Oe[0];
778
844
  return /* @__PURE__ */ y(ze.Root, { children: [
779
845
  /* @__PURE__ */ e(ze.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
780
- ne,
846
+ oe,
781
847
  {
782
848
  size: "sm",
783
849
  intent: "ghost",
784
- startIcon: s.icon,
785
- endIcon: /* @__PURE__ */ e(Ot, {}),
786
- "aria-label": l("editor.format", "Paragraph style"),
850
+ startIcon: d.icon,
851
+ endIcon: /* @__PURE__ */ e(qt, {}),
852
+ "aria-label": s("editor.format", "Paragraph style"),
787
853
  onMouseDown: c,
788
- children: l(s.label[0], s.label[1])
854
+ children: s(d.label[0], d.label[1])
789
855
  }
790
856
  ) }),
791
- /* @__PURE__ */ e(ze.Content, { align: "start", children: $e.map((f) => /* @__PURE__ */ e(
857
+ /* @__PURE__ */ e(ze.Content, { align: "start", children: Oe.map((g) => /* @__PURE__ */ e(
792
858
  ze.Item,
793
859
  {
794
- startIcon: f.icon,
795
- onSelect: () => o("module.block.format", { tag: f.tag }),
796
- children: l(f.label[0], f.label[1])
860
+ startIcon: g.icon,
861
+ onSelect: () => o("module.block.format", { tag: g.tag }),
862
+ children: s(g.label[0], g.label[1])
797
863
  },
798
- f.id
864
+ g.id
799
865
  )) })
800
866
  ] });
801
867
  }
@@ -803,71 +869,71 @@ function Qr({
803
869
  insertHtml: o,
804
870
  saveSelection: a,
805
871
  restoreSelection: c,
806
- getSelectedText: l
872
+ getSelectedText: s
807
873
  }) {
808
- const { t: s } = Z(), [f, g] = z(!1), [i, p] = z(""), [v, T] = z(""), [H, S] = z(!1), w = le(), O = le(), u = () => {
809
- p(""), T(""), S(!1);
810
- }, h = () => {
811
- const k = i.trim();
874
+ const { t: d } = Z(), [g, p] = T(!1), [l, b] = T(""), [v, z] = T(""), [I, S] = T(!1), x = de(), O = de(), m = () => {
875
+ b(""), z(""), S(!1);
876
+ }, f = () => {
877
+ const k = l.trim();
812
878
  if (!k) return;
813
- const A = v.trim() || k, M = H ? ' target="_blank" rel="noopener noreferrer"' : "", E = `<a href="${Me(k)}"${M}>${Me(A)}</a>`;
814
- g(!1), u(), window.requestAnimationFrame(() => {
879
+ const A = v.trim() || k, _ = I ? ' target="_blank" rel="noopener noreferrer"' : "", E = `<a href="${Se(k)}"${_}>${Se(A)}</a>`;
880
+ p(!1), m(), window.requestAnimationFrame(() => {
815
881
  c(), o(E);
816
882
  });
817
883
  };
818
- return /* @__PURE__ */ y(j.Root, { open: f, onOpenChange: g, children: [
819
- /* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
820
- P,
884
+ return /* @__PURE__ */ y(P.Root, { open: g, onOpenChange: p, children: [
885
+ /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
886
+ B,
821
887
  {
822
888
  size: "sm",
823
889
  intent: "ghost",
824
- icon: /* @__PURE__ */ e(lr, {}),
825
- "aria-label": s("editor.link.insert", "Insert link"),
890
+ icon: /* @__PURE__ */ e(sr, {}),
891
+ "aria-label": d("editor.link.insert", "Insert link"),
826
892
  onMouseDown: () => {
827
- a(), T(l());
893
+ a(), z(s());
828
894
  }
829
895
  }
830
896
  ) }),
831
- /* @__PURE__ */ y(j.Content, { children: [
832
- /* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: s("editor.link.insert", "Insert link") }) }),
833
- /* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
897
+ /* @__PURE__ */ y(P.Content, { children: [
898
+ /* @__PURE__ */ e(P.Header, { children: /* @__PURE__ */ e(P.Title, { children: d("editor.link.insert", "Insert link") }) }),
899
+ /* @__PURE__ */ y(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
834
900
  /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
835
- /* @__PURE__ */ e("label", { htmlFor: w, className: be, children: s("editor.link.url", "URL") }),
901
+ /* @__PURE__ */ e("label", { htmlFor: x, className: ve, children: d("editor.link.url", "URL") }),
836
902
  /* @__PURE__ */ e(
837
- _e,
903
+ Re,
838
904
  {
839
- id: w,
905
+ id: x,
840
906
  type: "url",
841
- value: i,
842
- onChange: (k) => p(k.target.value),
907
+ value: l,
908
+ onChange: (k) => b(k.target.value),
843
909
  placeholder: "https://…"
844
910
  }
845
911
  )
846
912
  ] }),
847
913
  /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
848
- /* @__PURE__ */ e("label", { htmlFor: O, className: be, children: s("editor.link.text", "Text to display") }),
914
+ /* @__PURE__ */ e("label", { htmlFor: O, className: ve, children: d("editor.link.text", "Text to display") }),
849
915
  /* @__PURE__ */ e(
850
- _e,
916
+ Re,
851
917
  {
852
918
  id: O,
853
919
  value: v,
854
- onChange: (k) => T(k.target.value),
855
- placeholder: s("editor.link.textPlaceholder", "Link text")
920
+ onChange: (k) => z(k.target.value),
921
+ placeholder: d("editor.link.textPlaceholder", "Link text")
856
922
  }
857
923
  )
858
924
  ] }),
859
925
  /* @__PURE__ */ e(
860
- It,
926
+ $t,
861
927
  {
862
- checked: H,
928
+ checked: I,
863
929
  onCheckedChange: (k) => S(k === !0),
864
- label: s("editor.link.newTab", "Open in new tab")
930
+ label: d("editor.link.newTab", "Open in new tab")
865
931
  }
866
932
  )
867
933
  ] }),
868
- /* @__PURE__ */ y(j.Footer, { children: [
869
- /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(ne, { intent: "secondary", children: s("common.cancel") }) }),
870
- /* @__PURE__ */ e(ne, { onClick: h, disabled: !i.trim(), children: s("editor.link.insertAction", "Insert") })
934
+ /* @__PURE__ */ y(P.Footer, { children: [
935
+ /* @__PURE__ */ e(P.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
936
+ /* @__PURE__ */ e(oe, { onClick: f, disabled: !l.trim(), children: d("editor.link.insertAction", "Insert") })
871
937
  ] })
872
938
  ] })
873
939
  ] });
@@ -876,71 +942,71 @@ function Zr({
876
942
  insertHtml: o,
877
943
  saveSelection: a,
878
944
  restoreSelection: c,
879
- uploadImage: l
945
+ uploadImage: s
880
946
  }) {
881
- const { t: s } = Z(), [f, g] = z(!1), [i, p] = z(""), [v, T] = z(""), H = le(), S = le(), w = (u, h) => {
882
- const k = `<img src="${Me(u)}" alt="${Me(h)}" loading="lazy">`;
883
- g(!1), p(""), T(""), window.requestAnimationFrame(() => {
947
+ const { t: d } = Z(), [g, p] = T(!1), [l, b] = T(""), [v, z] = T(""), I = de(), S = de(), x = (m, f) => {
948
+ const k = `<img src="${Se(m)}" alt="${Se(f)}" loading="lazy">`;
949
+ p(!1), b(""), z(""), window.requestAnimationFrame(() => {
884
950
  c(), o(k);
885
951
  });
886
952
  }, O = () => {
887
- const u = i.trim();
888
- u && w(u, v.trim());
953
+ const m = l.trim();
954
+ m && x(m, v.trim());
889
955
  };
890
- return /* @__PURE__ */ y(j.Root, { open: f, onOpenChange: g, children: [
891
- /* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
892
- P,
956
+ return /* @__PURE__ */ y(P.Root, { open: g, onOpenChange: p, children: [
957
+ /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
958
+ B,
893
959
  {
894
960
  size: "sm",
895
961
  intent: "ghost",
896
962
  icon: /* @__PURE__ */ e(Dt, {}),
897
- "aria-label": s("editor.image.insert", "Insert image"),
963
+ "aria-label": d("editor.image.insert", "Insert image"),
898
964
  onMouseDown: () => a()
899
965
  }
900
966
  ) }),
901
- /* @__PURE__ */ y(j.Content, { children: [
902
- /* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: s("editor.image.insert", "Insert image") }) }),
903
- /* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
904
- l ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
905
- /* @__PURE__ */ e("span", { className: be, children: s("editor.image.upload", "Upload") }),
967
+ /* @__PURE__ */ y(P.Content, { children: [
968
+ /* @__PURE__ */ e(P.Header, { children: /* @__PURE__ */ e(P.Title, { children: d("editor.image.insert", "Insert image") }) }),
969
+ /* @__PURE__ */ y(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
970
+ s ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
971
+ /* @__PURE__ */ e("span", { className: ve, children: d("editor.image.upload", "Upload") }),
906
972
  /* @__PURE__ */ e(
907
- Lt,
973
+ Ot,
908
974
  {
909
975
  variant: "dropzone",
910
976
  accept: {
911
977
  "image/*": [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg"]
912
978
  },
913
979
  maxFiles: 1,
914
- onUpload: async (u, { signal: h }) => {
915
- const k = await l(u, h);
916
- w(k, u.name);
980
+ onUpload: async (m, { signal: f }) => {
981
+ const k = await s(m, f);
982
+ x(k, m.name);
917
983
  }
918
984
  }
919
985
  ),
920
- /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s("editor.image.orUrl", "Or paste an image URL") })
986
+ /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: d("editor.image.orUrl", "Or paste an image URL") })
921
987
  ] }) : null,
922
988
  /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
923
- /* @__PURE__ */ e("label", { htmlFor: H, className: be, children: s("editor.image.url", "Image URL") }),
989
+ /* @__PURE__ */ e("label", { htmlFor: I, className: ve, children: d("editor.image.url", "Image URL") }),
924
990
  /* @__PURE__ */ e(
925
- _e,
991
+ Re,
926
992
  {
927
- id: H,
993
+ id: I,
928
994
  type: "url",
929
- value: i,
930
- onChange: (u) => p(u.target.value),
995
+ value: l,
996
+ onChange: (m) => b(m.target.value),
931
997
  placeholder: "https://…"
932
998
  }
933
999
  )
934
1000
  ] }),
935
1001
  /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
936
- /* @__PURE__ */ e("label", { htmlFor: S, className: be, children: s("editor.image.alt", "Alt text") }),
1002
+ /* @__PURE__ */ e("label", { htmlFor: S, className: ve, children: d("editor.image.alt", "Alt text") }),
937
1003
  /* @__PURE__ */ e(
938
- _e,
1004
+ Re,
939
1005
  {
940
1006
  id: S,
941
1007
  value: v,
942
- onChange: (u) => T(u.target.value),
943
- placeholder: s(
1008
+ onChange: (m) => z(m.target.value),
1009
+ placeholder: d(
944
1010
  "editor.image.altPlaceholder",
945
1011
  "Describe the image"
946
1012
  )
@@ -948,9 +1014,9 @@ function Zr({
948
1014
  )
949
1015
  ] })
950
1016
  ] }),
951
- /* @__PURE__ */ y(j.Footer, { children: [
952
- /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(ne, { intent: "secondary", children: s("common.cancel") }) }),
953
- /* @__PURE__ */ e(ne, { onClick: O, disabled: !i.trim(), children: s("editor.image.insertAction", "Insert") })
1017
+ /* @__PURE__ */ y(P.Footer, { children: [
1018
+ /* @__PURE__ */ e(P.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
1019
+ /* @__PURE__ */ e(oe, { onClick: O, disabled: !l.trim(), children: d("editor.image.insertAction", "Insert") })
954
1020
  ] })
955
1021
  ] })
956
1022
  ] });
@@ -960,40 +1026,40 @@ function Yr({
960
1026
  saveSelection: a,
961
1027
  restoreSelection: c
962
1028
  }) {
963
- const { t: l } = Z(), [s, f] = z("#1f2a5c"), g = (p) => {
964
- f(p), c(), o("module.inline.format", {
1029
+ const { t: s } = Z(), [d, g] = T("#1f2a5c"), p = (b) => {
1030
+ g(b), c(), o("module.inline.format", {
965
1031
  tag: "span",
966
- style: { color: p },
1032
+ style: { color: b },
967
1033
  type: "toggle"
968
1034
  });
969
- }, i = () => {
1035
+ }, l = () => {
970
1036
  c(), o("module.inline.remove", { style: "color" });
971
1037
  };
972
- return /* @__PURE__ */ y(B, { onOpenChange: (p) => p && a(), children: [
973
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
974
- P,
1038
+ return /* @__PURE__ */ y(F, { onOpenChange: (b) => b && a(), children: [
1039
+ /* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1040
+ B,
975
1041
  {
976
1042
  size: "sm",
977
1043
  intent: "ghost",
978
- icon: /* @__PURE__ */ e(br, {}),
979
- "aria-label": l("editor.textColor", "Text colour"),
980
- onMouseDown: (p) => {
981
- p.preventDefault(), a();
1044
+ icon: /* @__PURE__ */ e(yr, {}),
1045
+ "aria-label": s("editor.textColor", "Text colour"),
1046
+ onMouseDown: (b) => {
1047
+ b.preventDefault(), a();
982
1048
  }
983
1049
  }
984
1050
  ) }),
985
- /* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
986
- /* @__PURE__ */ e(B.Heading, { children: l("editor.textColor", "Text colour") }),
1051
+ /* @__PURE__ */ y(F.Content, { side: "bottom", align: "start", children: [
1052
+ /* @__PURE__ */ e(F.Heading, { children: s("editor.textColor", "Text colour") }),
987
1053
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
988
- qe,
1054
+ Pe,
989
1055
  {
990
1056
  variant: "inline",
991
1057
  size: "sm",
992
- value: s,
993
- onChange: g
1058
+ value: d,
1059
+ onChange: p
994
1060
  }
995
1061
  ) }),
996
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ne, { size: "sm", intent: "secondary", onClick: i, children: l("editor.color.remove", "Remove colour") }) })
1062
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick: l, children: s("editor.color.remove", "Remove colour") }) })
997
1063
  ] })
998
1064
  ] });
999
1065
  }
@@ -1002,73 +1068,73 @@ function Jr({
1002
1068
  saveSelection: a,
1003
1069
  restoreSelection: c
1004
1070
  }) {
1005
- const { t: l } = Z(), [s, f] = z("#fff3a3"), g = (p) => {
1006
- f(p), c(), o("module.inline.format", {
1071
+ const { t: s } = Z(), [d, g] = T("#fff3a3"), p = (b) => {
1072
+ g(b), c(), o("module.inline.format", {
1007
1073
  tag: "span",
1008
- style: { "background-color": p },
1074
+ style: { "background-color": b },
1009
1075
  type: "toggle"
1010
1076
  });
1011
- }, i = () => {
1077
+ }, l = () => {
1012
1078
  c(), o("module.inline.remove", { style: "background-color" });
1013
1079
  };
1014
- return /* @__PURE__ */ y(B, { onOpenChange: (p) => p && a(), children: [
1015
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1016
- P,
1080
+ return /* @__PURE__ */ y(F, { onOpenChange: (b) => b && a(), children: [
1081
+ /* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1082
+ B,
1017
1083
  {
1018
1084
  size: "sm",
1019
1085
  intent: "ghost",
1020
- icon: /* @__PURE__ */ e(nr, {}),
1021
- "aria-label": l("editor.highlightColor", "Highlight"),
1022
- onMouseDown: (p) => {
1023
- p.preventDefault(), a();
1086
+ icon: /* @__PURE__ */ e(or, {}),
1087
+ "aria-label": s("editor.highlightColor", "Highlight"),
1088
+ onMouseDown: (b) => {
1089
+ b.preventDefault(), a();
1024
1090
  }
1025
1091
  }
1026
1092
  ) }),
1027
- /* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
1028
- /* @__PURE__ */ e(B.Heading, { children: l("editor.highlightColor", "Highlight") }),
1093
+ /* @__PURE__ */ y(F.Content, { side: "bottom", align: "start", children: [
1094
+ /* @__PURE__ */ e(F.Heading, { children: s("editor.highlightColor", "Highlight") }),
1029
1095
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
1030
- qe,
1096
+ Pe,
1031
1097
  {
1032
1098
  variant: "inline",
1033
1099
  size: "sm",
1034
- value: s,
1035
- onChange: g
1100
+ value: d,
1101
+ onChange: p
1036
1102
  }
1037
1103
  ) }),
1038
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ne, { size: "sm", intent: "secondary", onClick: i, children: l("editor.highlight.remove", "Remove highlight") }) })
1104
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick: l, children: s("editor.highlight.remove", "Remove highlight") }) })
1039
1105
  ] })
1040
1106
  ] });
1041
1107
  }
1042
- function Kr(o, a) {
1108
+ function en(o, a) {
1043
1109
  const c = Array.from({ length: a }, () => "<td><br></td>").join("");
1044
1110
  return `<table><tbody>${Array.from({ length: o }, () => `<tr>${c}</tr>`).join("")}</tbody></table>`;
1045
1111
  }
1046
- function en({
1112
+ function tn({
1047
1113
  run: o,
1048
1114
  insertTable: a,
1049
1115
  active: c
1050
1116
  }) {
1051
- const { t: l } = Z(), [s, f] = z({ r: 0, c: 0 }), g = c.has("table");
1052
- return /* @__PURE__ */ y(B, { onOpenChange: (i) => !i && f({ r: 0, c: 0 }), children: [
1053
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1054
- P,
1117
+ const { t: s } = Z(), [d, g] = T({ r: 0, c: 0 }), p = c.has("table");
1118
+ return /* @__PURE__ */ y(F, { onOpenChange: (l) => !l && g({ r: 0, c: 0 }), children: [
1119
+ /* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1120
+ B,
1055
1121
  {
1056
1122
  size: "sm",
1057
1123
  intent: "ghost",
1058
- icon: /* @__PURE__ */ e(Hr, {}),
1059
- "aria-label": l("editor.table.insert", "Insert table"),
1060
- onMouseDown: (i) => i.preventDefault()
1124
+ icon: /* @__PURE__ */ e(Ir, {}),
1125
+ "aria-label": s("editor.table.insert", "Insert table"),
1126
+ onMouseDown: (l) => l.preventDefault()
1061
1127
  }
1062
1128
  ) }),
1063
- /* @__PURE__ */ e(B.Content, { side: "bottom", align: "start", children: g ? (
1129
+ /* @__PURE__ */ e(F.Content, { side: "bottom", align: "start", children: p ? (
1064
1130
  // Caret is already inside a table — offer the manage ops only, never
1065
1131
  // a nested-table insert (mirrors Redactor's native dropdown, which
1066
1132
  // disables "insert table" while the caret is in a table).
1067
- /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: it.map((i) => /* @__PURE__ */ y(
1133
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: st.map((l) => /* @__PURE__ */ y(
1068
1134
  "button",
1069
1135
  {
1070
1136
  type: "button",
1071
- onClick: () => o(i.command),
1137
+ onClick: () => o(l.command),
1072
1138
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-2xs)] ds:text-start ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]",
1073
1139
  children: [
1074
1140
  /* @__PURE__ */ e(
@@ -1076,73 +1142,73 @@ function en({
1076
1142
  {
1077
1143
  "aria-hidden": "true",
1078
1144
  className: "ds:inline-flex ds:size-4 ds:shrink-0 ds:items-center ds:justify-center ds:text-[color:var(--muted-foreground)]",
1079
- children: i.icon
1145
+ children: l.icon
1080
1146
  }
1081
1147
  ),
1082
- l(i.label[0], i.label[1])
1148
+ s(l.label[0], l.label[1])
1083
1149
  ]
1084
1150
  },
1085
- i.id
1151
+ l.id
1086
1152
  )) })
1087
- ) : /* @__PURE__ */ y(Oe, { children: [
1088
- /* @__PURE__ */ e(B.Heading, { children: l("editor.table.insert", "Insert table") }),
1153
+ ) : /* @__PURE__ */ y(De, { children: [
1154
+ /* @__PURE__ */ e(F.Heading, { children: s("editor.table.insert", "Insert table") }),
1089
1155
  /* @__PURE__ */ e(
1090
1156
  "div",
1091
1157
  {
1092
1158
  role: "group",
1093
- "aria-label": l("editor.table.sizePicker", "Table size"),
1159
+ "aria-label": s("editor.table.sizePicker", "Table size"),
1094
1160
  className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
1095
- onMouseLeave: () => f({ r: 0, c: 0 }),
1096
- children: Array.from({ length: Te * Te }, (i, p) => {
1097
- const v = Math.floor(p / Te) + 1, T = p % Te + 1, H = v <= s.r && T <= s.c;
1161
+ onMouseLeave: () => g({ r: 0, c: 0 }),
1162
+ children: Array.from({ length: Me * Me }, (l, b) => {
1163
+ const v = Math.floor(b / Me) + 1, z = b % Me + 1, I = v <= d.r && z <= d.c;
1098
1164
  return /* @__PURE__ */ e(
1099
1165
  "button",
1100
1166
  {
1101
1167
  type: "button",
1102
- "aria-label": l("editor.table.sizeCell", "{{r}}×{{c}}", {
1168
+ "aria-label": s("editor.table.sizeCell", "{{r}}×{{c}}", {
1103
1169
  r: v,
1104
- c: T
1170
+ c: z
1105
1171
  }),
1106
- onMouseEnter: () => f({ r: v, c: T }),
1107
- onClick: () => a(Kr(v, T)),
1108
- className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${H ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1172
+ onMouseEnter: () => g({ r: v, c: z }),
1173
+ onClick: () => a(en(v, z)),
1174
+ className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${I ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1109
1175
  },
1110
- p
1176
+ b
1111
1177
  );
1112
1178
  })
1113
1179
  }
1114
1180
  ),
1115
- /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s.r > 0 ? l("editor.table.sizeCell", "{{r}}×{{c}}", {
1116
- r: s.r,
1117
- c: s.c
1118
- }) : l("editor.table.sizeHint", "Pick a size") })
1181
+ /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: d.r > 0 ? s("editor.table.sizeCell", "{{r}}×{{c}}", {
1182
+ r: d.r,
1183
+ c: d.c
1184
+ }) : s("editor.table.sizeHint", "Pick a size") })
1119
1185
  ] }) })
1120
1186
  ] });
1121
1187
  }
1122
- const tn = Object.fromEntries(it.map((o) => [o.id, o])), rn = [
1188
+ const rn = Object.fromEntries(st.map((o) => [o.id, o])), nn = [
1123
1189
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1124
1190
  "ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
1125
1191
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1126
1192
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1127
- ].join(" "), nn = "#fde68a";
1128
- function rt({
1193
+ ].join(" "), on = "#fde68a";
1194
+ function ot({
1129
1195
  scope: o,
1130
1196
  icon: a,
1131
1197
  label: c,
1132
- onOpenChange: l,
1133
- saveTableCell: s,
1134
- applyTableBackground: f
1198
+ onOpenChange: s,
1199
+ saveTableCell: d,
1200
+ applyTableBackground: g
1135
1201
  }) {
1136
- const { t: g } = Z(), [i, p] = z(nn);
1202
+ const { t: p } = Z(), [l, b] = T(on);
1137
1203
  return /* @__PURE__ */ y(
1138
- B,
1204
+ F,
1139
1205
  {
1140
1206
  onOpenChange: (v) => {
1141
- l(v), v && s();
1207
+ s(v), v && d();
1142
1208
  },
1143
1209
  children: [
1144
- /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1145
- P,
1210
+ /* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1211
+ B,
1146
1212
  {
1147
1213
  size: "sm",
1148
1214
  intent: "ghost",
@@ -1151,26 +1217,26 @@ function rt({
1151
1217
  onMouseDown: (v) => v.preventDefault()
1152
1218
  }
1153
1219
  ) }),
1154
- /* @__PURE__ */ y(B.Content, { side: "bottom", align: "center", children: [
1220
+ /* @__PURE__ */ y(F.Content, { side: "bottom", align: "center", children: [
1155
1221
  /* @__PURE__ */ e(
1156
- qe,
1222
+ Pe,
1157
1223
  {
1158
1224
  variant: "inline",
1159
1225
  size: "sm",
1160
- value: i,
1226
+ value: l,
1161
1227
  onChange: (v) => {
1162
- p(v), f(o, v);
1228
+ b(v), g(o, v);
1163
1229
  }
1164
1230
  }
1165
1231
  ),
1166
1232
  /* @__PURE__ */ e(
1167
- ne,
1233
+ oe,
1168
1234
  {
1169
1235
  size: "sm",
1170
1236
  intent: "ghost",
1171
1237
  className: "ds:mt-[var(--spacing-xs)] ds:w-full",
1172
- onClick: () => f(o, null),
1173
- children: g("editor.table.clearColor", "Clear colour")
1238
+ onClick: () => g(o, null),
1239
+ children: p("editor.table.clearColor", "Clear colour")
1174
1240
  }
1175
1241
  )
1176
1242
  ] })
@@ -1178,47 +1244,47 @@ function rt({
1178
1244
  }
1179
1245
  );
1180
1246
  }
1181
- function on({
1247
+ function an({
1182
1248
  active: o,
1183
1249
  run: a,
1184
1250
  areaRef: c,
1185
- getActiveTableEl: l,
1186
- enableColor: s = !1,
1187
- saveTableCell: f,
1188
- applyTableBackground: g
1251
+ getActiveTableEl: s,
1252
+ enableColor: d = !1,
1253
+ saveTableCell: g,
1254
+ applyTableBackground: p
1189
1255
  }) {
1190
- const { t: i } = Z(), p = o.has("table"), [v, T] = z(null), H = L(0), [S, w] = z(!1), O = C((h) => {
1191
- H.current = Math.max(
1256
+ const { t: l } = Z(), b = o.has("table"), [v, z] = T(null), I = $(0), [S, x] = T(!1), O = C((f) => {
1257
+ I.current = Math.max(
1192
1258
  0,
1193
- H.current + (h ? 1 : -1)
1194
- ), w(H.current > 0);
1259
+ I.current + (f ? 1 : -1)
1260
+ ), x(I.current > 0);
1195
1261
  }, []);
1196
- if (K(() => {
1262
+ if (W(() => {
1197
1263
  if (S) return;
1198
- if (!p || typeof window > "u") {
1199
- T(null);
1264
+ if (!b || typeof window > "u") {
1265
+ z(null);
1200
1266
  return;
1201
1267
  }
1202
- const h = () => {
1203
- const E = c.current, Y = l();
1268
+ const f = () => {
1269
+ const E = c.current, Y = s();
1204
1270
  if (!E || !Y) {
1205
- T(null);
1271
+ z(null);
1206
1272
  return;
1207
1273
  }
1208
- const $ = E.getBoundingClientRect(), D = Y.getBoundingClientRect(), I = getComputedStyle(E).direction === "rtl", J = Math.max(0, D.top - $.top - 44), ee = I ? $.right - D.right + D.width / 2 : D.left - $.left + D.width / 2;
1209
- T({ top: J, start: Math.max(0, ee), rtl: I });
1274
+ const L = E.getBoundingClientRect(), q = Y.getBoundingClientRect(), H = getComputedStyle(E).direction === "rtl", J = Math.max(0, q.top - L.top - 44), ee = H ? L.right - q.right + q.width / 2 : q.left - L.left + q.width / 2;
1275
+ z({ top: J, start: Math.max(0, ee), rtl: H });
1210
1276
  };
1211
- h();
1212
- const k = new ResizeObserver(h), A = c.current, M = l();
1213
- return A && k.observe(A), M && k.observe(M), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
1214
- k.disconnect(), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
1277
+ f();
1278
+ const k = new ResizeObserver(f), A = c.current, _ = s();
1279
+ return A && k.observe(A), _ && k.observe(_), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1280
+ k.disconnect(), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1215
1281
  };
1216
- }, [p, S, c, l]), !p && !S || !v) return null;
1217
- const u = [
1282
+ }, [b, S, c, s]), !b && !S || !v) return null;
1283
+ const m = [
1218
1284
  ["rowAbove", "rowBelow"],
1219
1285
  ["colLeft", "colRight"],
1220
1286
  ["addHead"],
1221
- ...s ? ["colour"] : [],
1287
+ ...d ? ["colour"] : [],
1222
1288
  ["deleteRow", "deleteColumn"],
1223
1289
  ["deleteTable"]
1224
1290
  ];
@@ -1226,154 +1292,154 @@ function on({
1226
1292
  // Tooltips disambiguate the icon-only ops on hover (and provide each
1227
1293
  // button's accessible name via IconButton's `tooltip` prop). Radix Tooltip
1228
1294
  // needs a provider ancestor, so scope one to the bar.
1229
- /* @__PURE__ */ e($t, { children: /* @__PURE__ */ e(
1295
+ /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ e(
1230
1296
  "div",
1231
1297
  {
1232
1298
  role: "group",
1233
- "aria-label": i("editor.table.toolbar", "Table tools"),
1234
- className: `${rn} ${v.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1299
+ "aria-label": l("editor.table.toolbar", "Table tools"),
1300
+ className: `${nn} ${v.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1235
1301
  style: {
1236
1302
  "--rte-tt-top": `${v.top}px`,
1237
1303
  "--rte-tt-start": `${v.start}px`
1238
1304
  },
1239
- children: u.map((h, k) => /* @__PURE__ */ y(nt, { children: [
1240
- k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }) : null,
1241
- h === "colour" ? /* @__PURE__ */ y(Oe, { children: [
1305
+ children: m.map((f, k) => /* @__PURE__ */ y(at, { children: [
1306
+ k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: dt }) : null,
1307
+ f === "colour" ? /* @__PURE__ */ y(De, { children: [
1242
1308
  /* @__PURE__ */ e(
1243
- rt,
1309
+ ot,
1244
1310
  {
1245
1311
  scope: "cell",
1246
- icon: /* @__PURE__ */ e(hr, {}),
1247
- label: i("editor.table.cellColor", "Cell colour"),
1312
+ icon: /* @__PURE__ */ e(fr, {}),
1313
+ label: l("editor.table.cellColor", "Cell colour"),
1248
1314
  onOpenChange: O,
1249
- saveTableCell: f,
1250
- applyTableBackground: g
1315
+ saveTableCell: g,
1316
+ applyTableBackground: p
1251
1317
  }
1252
1318
  ),
1253
1319
  /* @__PURE__ */ e(
1254
- rt,
1320
+ ot,
1255
1321
  {
1256
1322
  scope: "row",
1257
- icon: /* @__PURE__ */ e(gr, {}),
1258
- label: i("editor.table.rowColor", "Row colour"),
1323
+ icon: /* @__PURE__ */ e(pr, {}),
1324
+ label: l("editor.table.rowColor", "Row colour"),
1259
1325
  onOpenChange: O,
1260
- saveTableCell: f,
1261
- applyTableBackground: g
1326
+ saveTableCell: g,
1327
+ applyTableBackground: p
1262
1328
  }
1263
1329
  )
1264
- ] }) : h.map((A) => {
1265
- const M = tn[A];
1330
+ ] }) : f.map((A) => {
1331
+ const _ = rn[A];
1266
1332
  return /* @__PURE__ */ e(
1267
- P,
1333
+ B,
1268
1334
  {
1269
1335
  size: "sm",
1270
1336
  intent: "ghost",
1271
- icon: M.icon,
1272
- tooltip: i(M.label[0], M.label[1]),
1337
+ icon: _.icon,
1338
+ tooltip: l(_.label[0], _.label[1]),
1273
1339
  onMouseDown: (E) => E.preventDefault(),
1274
- onClick: () => a(M.command)
1340
+ onClick: () => a(_.command)
1275
1341
  },
1276
1342
  A
1277
1343
  );
1278
1344
  })
1279
- ] }, h === "colour" ? "colour" : h[0]))
1345
+ ] }, f === "colour" ? "colour" : f[0]))
1280
1346
  }
1281
1347
  ) })
1282
1348
  );
1283
1349
  }
1284
- function an({
1350
+ function ln({
1285
1351
  run: o,
1286
1352
  active: a,
1287
1353
  preset: c,
1288
- insertHtml: l,
1289
- insertTable: s,
1290
- saveSelection: f,
1291
- restoreSelection: g,
1292
- getSelectedText: i,
1293
- uploadImage: p,
1354
+ insertHtml: s,
1355
+ insertTable: d,
1356
+ saveSelection: g,
1357
+ restoreSelection: p,
1358
+ getSelectedText: l,
1359
+ uploadImage: b,
1294
1360
  enableColor: v = !1,
1295
- enableImage: T = !1,
1296
- enableTable: H = !1,
1361
+ enableImage: z = !1,
1362
+ enableTable: I = !1,
1297
1363
  showExtensions: S = !1
1298
1364
  }) {
1299
- const { t: w } = Z(), O = ($) => $.preventDefault(), u = ($) => Wr[c].includes($), h = ($) => {
1300
- if (!u($)) return null;
1301
- const D = Gr[$];
1365
+ const { t: x } = Z(), O = (L) => L.preventDefault(), m = (L) => Wr[c].includes(L), f = (L) => {
1366
+ if (!m(L)) return null;
1367
+ const q = Gr[L];
1302
1368
  return /* @__PURE__ */ e(
1303
- P,
1369
+ B,
1304
1370
  {
1305
1371
  size: "sm",
1306
1372
  intent: "ghost",
1307
- icon: D.icon,
1308
- "aria-label": w(D.label[0], D.label[1]),
1309
- "aria-pressed": D.toggle ? a.has(D.toggle) : void 0,
1373
+ icon: q.icon,
1374
+ "aria-label": x(q.label[0], q.label[1]),
1375
+ "aria-pressed": q.toggle ? a.has(q.toggle) : void 0,
1310
1376
  onMouseDown: O,
1311
- onClick: () => o(...D.command)
1377
+ onClick: () => o(...q.command)
1312
1378
  },
1313
- D.id
1379
+ q.id
1314
1380
  );
1315
- }, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }), A = u("format"), M = u("bold") || u("italic") || u("underline") || u("strike") || v, E = u("ul") || u("ol"), Y = u("link") || T || H;
1381
+ }, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: dt }), A = m("format"), _ = m("bold") || m("italic") || m("underline") || m("strike") || v, E = m("ul") || m("ol"), Y = m("link") || z || I;
1316
1382
  return /* @__PURE__ */ y(
1317
1383
  "div",
1318
1384
  {
1319
1385
  role: "group",
1320
- "aria-label": w("editor.toolbarLabel"),
1321
- className: Xr(),
1386
+ "aria-label": x("editor.toolbarLabel"),
1387
+ className: Ur(),
1322
1388
  "data-component": "editor-toolbar",
1323
1389
  children: [
1324
- A ? /* @__PURE__ */ e(Ur, { run: o, active: a, onTriggerDown: O }) : null,
1325
- A && M ? /* @__PURE__ */ e(k, {}) : null,
1326
- h("bold"),
1327
- h("italic"),
1328
- h("underline"),
1329
- h("strike"),
1390
+ A ? /* @__PURE__ */ e(Xr, { run: o, active: a, onTriggerDown: O }) : null,
1391
+ A && _ ? /* @__PURE__ */ e(k, {}) : null,
1392
+ f("bold"),
1393
+ f("italic"),
1394
+ f("underline"),
1395
+ f("strike"),
1330
1396
  v ? /* @__PURE__ */ e(
1331
1397
  Yr,
1332
1398
  {
1333
1399
  run: o,
1334
- saveSelection: f,
1335
- restoreSelection: g
1400
+ saveSelection: g,
1401
+ restoreSelection: p
1336
1402
  }
1337
1403
  ) : null,
1338
1404
  v ? /* @__PURE__ */ e(
1339
1405
  Jr,
1340
1406
  {
1341
1407
  run: o,
1342
- saveSelection: f,
1343
- restoreSelection: g
1408
+ saveSelection: g,
1409
+ restoreSelection: p
1344
1410
  }
1345
1411
  ) : null,
1346
- (A || M) && E ? /* @__PURE__ */ e(k, {}) : null,
1347
- h("ul"),
1348
- h("ol"),
1349
- (A || M || E) && Y ? /* @__PURE__ */ e(k, {}) : null,
1350
- u("link") ? /* @__PURE__ */ e(
1412
+ (A || _) && E ? /* @__PURE__ */ e(k, {}) : null,
1413
+ f("ul"),
1414
+ f("ol"),
1415
+ (A || _ || E) && Y ? /* @__PURE__ */ e(k, {}) : null,
1416
+ m("link") ? /* @__PURE__ */ e(
1351
1417
  Qr,
1352
1418
  {
1353
- insertHtml: l,
1354
- saveSelection: f,
1355
- restoreSelection: g,
1356
- getSelectedText: i
1419
+ insertHtml: s,
1420
+ saveSelection: g,
1421
+ restoreSelection: p,
1422
+ getSelectedText: l
1357
1423
  }
1358
1424
  ) : null,
1359
- T ? /* @__PURE__ */ e(
1425
+ z ? /* @__PURE__ */ e(
1360
1426
  Zr,
1361
1427
  {
1362
- insertHtml: l,
1363
- saveSelection: f,
1364
- restoreSelection: g,
1365
- uploadImage: p
1428
+ insertHtml: s,
1429
+ saveSelection: g,
1430
+ restoreSelection: p,
1431
+ uploadImage: b
1366
1432
  }
1367
1433
  ) : null,
1368
- H ? /* @__PURE__ */ e(en, { run: o, insertTable: s, active: a }) : null,
1369
- S && (A || M || E || Y) ? /* @__PURE__ */ e(k, {}) : null,
1434
+ I ? /* @__PURE__ */ e(tn, { run: o, insertTable: d, active: a }) : null,
1435
+ S && (A || _ || E || Y) ? /* @__PURE__ */ e(k, {}) : null,
1370
1436
  S ? /* @__PURE__ */ e(
1371
- P,
1437
+ B,
1372
1438
  {
1373
1439
  size: "sm",
1374
1440
  intent: "ghost",
1375
- icon: /* @__PURE__ */ e(qr, {}),
1376
- "aria-label": w("editor.extensions", "Editor extensions"),
1441
+ icon: /* @__PURE__ */ e(jr, {}),
1442
+ "aria-label": x("editor.extensions", "Editor extensions"),
1377
1443
  disabled: !0,
1378
1444
  onMouseDown: O
1379
1445
  }
@@ -1382,39 +1448,39 @@ function an({
1382
1448
  }
1383
1449
  );
1384
1450
  }
1385
- function te(o) {
1451
+ function re(o) {
1386
1452
  return _t(o, "rich-text");
1387
1453
  }
1388
- function Ie(o = "") {
1454
+ function qe(o = "") {
1389
1455
  const a = String(o).trim();
1390
1456
  if (a === "" || a === "<p><br></p>" || a === "<p>&nbsp;</p>")
1391
1457
  return "";
1392
1458
  const c = a.replace(/<br\s*\/?>/gi, "").replace(/&nbsp;/gi, "").replace(/<[^>]+>/g, "").trim();
1393
1459
  return c === "" && /<img\b[^>]*>/i.test(a) ? a : c === "" ? "" : a;
1394
1460
  }
1395
- function ln(o) {
1461
+ function sn(o) {
1396
1462
  return o.replace(
1397
1463
  /<img(?![^>]*\sloading=)([^>]*)>/gi,
1398
1464
  '<img loading="lazy"$1>'
1399
1465
  );
1400
1466
  }
1401
- function sn(o) {
1467
+ function dn(o) {
1402
1468
  if (!o || typeof o != "object") return;
1403
- const a = o, c = (l) => {
1404
- if (l && typeof l == "object" && "url" in l) {
1405
- const s = l.url;
1406
- return typeof s == "string" ? s : void 0;
1469
+ const a = o, c = (s) => {
1470
+ if (s && typeof s == "object" && "url" in s) {
1471
+ const d = s.url;
1472
+ return typeof d == "string" ? d : void 0;
1407
1473
  }
1408
1474
  };
1409
1475
  return typeof a.url == "string" ? a.url : c(a.file) ?? c(a.data) ?? Object.values(a).map(c).find(Boolean);
1410
1476
  }
1411
- function dn(o) {
1477
+ function cn(o) {
1412
1478
  if (o) return o;
1413
1479
  if (typeof window > "u") return null;
1414
1480
  const a = window;
1415
1481
  return a.$R ?? a.Redactor ?? null;
1416
1482
  }
1417
- const cn = {
1483
+ const un = {
1418
1484
  bold: ["module.inline.format", { tag: "b" }],
1419
1485
  italic: ["module.inline.format", { tag: "i" }],
1420
1486
  strikethrough: ["module.inline.format", { tag: "del" }],
@@ -1423,17 +1489,17 @@ const cn = {
1423
1489
  heading: ["module.block.format", { tag: "h2" }],
1424
1490
  quote: ["module.block.format", { tag: "blockquote" }],
1425
1491
  paragraph: ["module.block.format", { tag: "p" }]
1426
- }, un = {
1492
+ }, mn = {
1427
1493
  zh: "zh_cn",
1428
1494
  pt: "pt_br"
1429
1495
  };
1430
- function mn(o) {
1496
+ function hn(o) {
1431
1497
  const a = o.split("-")[0];
1432
- return un[a] ?? a ?? "en";
1498
+ return mn[a] ?? a ?? "en";
1433
1499
  }
1434
- const hn = De(
1500
+ const fn = je(
1435
1501
  "redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
1436
- ), fn = De(
1502
+ ), gn = je(
1437
1503
  [
1438
1504
  "ds:block ds:[inline-size:100%]",
1439
1505
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
@@ -1447,7 +1513,7 @@ const hn = De(
1447
1513
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1448
1514
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1449
1515
  ].join(" ")
1450
- ), st = [
1516
+ ), ct = [
1451
1517
  "ds:inline-flex ds:items-center ds:justify-center",
1452
1518
  "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
1453
1519
  "ds:text-[color:var(--primary-foreground)]",
@@ -1456,62 +1522,62 @@ const hn = De(
1456
1522
  "ds:focus-visible:outline-solid",
1457
1523
  "ds:focus-visible:outline-[var(--primary-foreground)]",
1458
1524
  "ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
1459
- ].join(" "), gn = `${st} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, pn = `${st} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, bn = Nt(
1525
+ ].join(" "), pn = `${ct} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, bn = `${ct} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, yn = Tt(
1460
1526
  ({
1461
1527
  id: o,
1462
1528
  defaultValue: a,
1463
1529
  value: c,
1464
- onChange: l,
1465
- toolbar: s = "standard",
1466
- placeholder: f,
1467
- readOnly: g = !1,
1468
- ariaLabel: i,
1469
- minHeight: p,
1530
+ onChange: s,
1531
+ toolbar: d = "standard",
1532
+ placeholder: g,
1533
+ readOnly: p = !1,
1534
+ ariaLabel: l,
1535
+ minHeight: b,
1470
1536
  showExtensions: v,
1471
- className: T,
1472
- redactor: H,
1537
+ className: z,
1538
+ redactor: I,
1473
1539
  options: S,
1474
- plugins: w,
1540
+ plugins: x,
1475
1541
  lang: O,
1476
- imageUploadUrl: u,
1477
- onKeyDown: h,
1542
+ imageUploadUrl: m,
1543
+ onKeyDown: f,
1478
1544
  onRequestAiDraft: k,
1479
1545
  aiDraftFormat: A = "html",
1480
- aiPrivacyNotice: M,
1546
+ aiPrivacyNotice: _,
1481
1547
  onDictate: E,
1482
1548
  onProofread: Y,
1483
- onAutoFormat: $
1484
- }, D) => {
1485
- const { t: I, i18n: J } = Z(), ee = le(), de = Je(
1549
+ onAutoFormat: L
1550
+ }, q) => {
1551
+ const { t: H, i18n: J } = Z(), ee = de(), me = et(
1486
1552
  () => `rte-${ee.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1487
1553
  [ee]
1488
- ), R = `#${de}`, W = L(null), G = L(null), ce = L(!1), ye = L(g), x = L(null), q = L(null), [F, X] = z(!1), [dt, je] = z(!1), [Pe, ct] = z(
1554
+ ), R = `#${me}`, G = $(null), K = $(null), he = $(!1), fe = $(p), w = $(null), D = $(null), [j, U] = T(!1), [ut, Be] = T(!1), [Fe, mt] = T(
1489
1555
  () => /* @__PURE__ */ new Set()
1490
- ), ue = L(null), V = L(l), ve = L(h);
1491
- K(() => {
1492
- V.current = l, ve.current = h;
1493
- }, [l, h]);
1494
- const ut = L(
1556
+ ), ge = $(null), V = $(s), ke = $(f);
1557
+ W(() => {
1558
+ V.current = s, ke.current = f;
1559
+ }, [s, f]);
1560
+ const ht = $(
1495
1561
  (() => {
1496
1562
  const t = c ?? a ?? "";
1497
- return t ? te(t) : "";
1563
+ return t ? re(t) : "";
1498
1564
  })()
1499
- ), oe = C(() => {
1565
+ ), ae = C(() => {
1500
1566
  var r;
1501
- const t = G.current;
1567
+ const t = K.current;
1502
1568
  if (t)
1503
1569
  try {
1504
1570
  const n = t(R, "source.getCode");
1505
1571
  if (typeof n == "string") return n;
1506
1572
  } catch {
1507
1573
  }
1508
- return ((r = W.current) == null ? void 0 : r.value) ?? "";
1509
- }, [R]), U = C(
1574
+ return ((r = G.current) == null ? void 0 : r.value) ?? "";
1575
+ }, [R]), X = C(
1510
1576
  (t, ...r) => {
1511
- const n = G.current;
1577
+ const n = K.current;
1512
1578
  if (!n) return !1;
1513
- const d = ye.current;
1514
- if (d)
1579
+ const i = fe.current;
1580
+ if (i)
1515
1581
  try {
1516
1582
  n(R, "disableReadOnly");
1517
1583
  } catch {
@@ -1521,7 +1587,7 @@ const hn = De(
1521
1587
  } catch {
1522
1588
  return !1;
1523
1589
  } finally {
1524
- if (d)
1590
+ if (i)
1525
1591
  try {
1526
1592
  n(R, "enableReadOnly");
1527
1593
  } catch {
@@ -1529,68 +1595,85 @@ const hn = De(
1529
1595
  }
1530
1596
  },
1531
1597
  [R]
1532
- ), ae = C(
1598
+ ), ie = C(
1533
1599
  (t, r) => {
1534
- var pe;
1535
- const n = (r == null ? void 0 : r.asHtml) ?? !0, d = n ? te(t) : t;
1536
- if (U(n ? "insertion.insertHtml" : "insertion.insertText", d)) return;
1537
- const b = W.current;
1538
- if (!b) return;
1539
- const N = b.selectionStart ?? b.value.length, Q = b.selectionEnd ?? b.value.length;
1540
- b.value = b.value.slice(0, N) + d + b.value.slice(Q);
1541
- const Ne = N + d.length;
1600
+ var ye;
1601
+ const n = (r == null ? void 0 : r.asHtml) ?? !0, i = n ? re(t) : t;
1602
+ if (X(n ? "insertion.insertHtml" : "insertion.insertText", i)) return;
1603
+ const h = G.current;
1604
+ if (!h) return;
1605
+ const N = h.selectionStart ?? h.value.length, Q = h.selectionEnd ?? h.value.length;
1606
+ h.value = h.value.slice(0, N) + i + h.value.slice(Q);
1607
+ const Te = N + i.length;
1542
1608
  try {
1543
- b.setSelectionRange(Ne, Ne);
1609
+ h.setSelectionRange(Te, Te);
1544
1610
  } catch {
1545
1611
  }
1546
- (pe = V.current) == null || pe.call(V, { html: te(b.value), markdown: "" });
1612
+ (ye = V.current) == null || ye.call(V, { html: re(h.value), markdown: "" });
1547
1613
  },
1548
- [U]
1549
- ), Re = L(null), re = C(() => {
1550
- var d;
1551
- const t = (d = x.current) == null ? void 0 : d.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
1614
+ [X]
1615
+ ), Ae = $(null), ne = C(() => {
1616
+ var i;
1617
+ const t = (i = w.current) == null ? void 0 : i.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
1552
1618
  if (t && r && r.anchorNode && t.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
1553
- r.rangeCount > 0 && (Re.current = r.getRangeAt(0).cloneRange());
1619
+ r.rangeCount > 0 && (Ae.current = r.getRangeAt(0).cloneRange());
1554
1620
  try {
1555
1621
  document.queryCommandState("bold") && n.add("bold"), document.queryCommandState("italic") && n.add("italic"), document.queryCommandState("underline") && n.add("underline"), document.queryCommandState("strikeThrough") && n.add("strike"), document.queryCommandState("insertUnorderedList") && n.add("ul"), document.queryCommandState("insertOrderedList") && n.add("ol");
1556
- const m = String(
1622
+ const u = String(
1557
1623
  document.queryCommandValue("formatBlock") || ""
1558
1624
  ).toLowerCase();
1559
- /^h[1-6]$/.test(m) ? (n.add("heading"), n.add(m)) : m === "blockquote" ? n.add("quote") : n.add("paragraph");
1560
- const b = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
1561
- b && t.contains(b) && b.closest("table") && n.add("table");
1625
+ /^h[1-6]$/.test(u) ? (n.add("heading"), n.add(u)) : u === "blockquote" ? n.add("quote") : n.add("paragraph");
1626
+ const h = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
1627
+ h && t.contains(h) && h.closest("table") && n.add("table");
1562
1628
  } catch {
1563
1629
  }
1564
1630
  }
1565
- ct(
1566
- (m) => m.size === n.size && [...n].every((b) => m.has(b)) ? m : n
1631
+ mt(
1632
+ (u) => u.size === n.size && [...n].every((h) => u.has(h)) ? u : n
1567
1633
  );
1568
- }, []), ke = C(
1634
+ }, []), ce = C(
1569
1635
  (t, ...r) => {
1570
- U(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => re()) : re();
1636
+ X(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => ne()) : ne();
1571
1637
  },
1572
- [U, re]
1573
- ), Se = C(
1638
+ [X, ne]
1639
+ );
1640
+ W(() => {
1641
+ const t = w.current;
1642
+ if (!t) return;
1643
+ const r = {
1644
+ b: ["module.inline.format", { tag: "b" }],
1645
+ i: ["module.inline.format", { tag: "i" }],
1646
+ u: ["module.inline.format", { tag: "u" }]
1647
+ }, n = (i) => {
1648
+ if (!(i.metaKey || i.ctrlKey) || i.altKey || i.shiftKey || i.isComposing) return;
1649
+ const u = r[i.key.toLowerCase()];
1650
+ if (!u) return;
1651
+ const h = t.querySelector(".redactor-in");
1652
+ !h || !(i.target instanceof Node) || !h.contains(i.target) || fe.current || (i.preventDefault(), i.stopImmediatePropagation(), ce(...u));
1653
+ };
1654
+ return t.addEventListener("keydown", n, !0), () => t.removeEventListener("keydown", n, !0);
1655
+ }, [ce]);
1656
+ const Ee = C(
1574
1657
  (t) => {
1575
- ae(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => re());
1658
+ ie(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ne());
1576
1659
  },
1577
- [ae, re]
1578
- ), Be = C(() => {
1660
+ [ie, ne]
1661
+ ), Ve = C(() => {
1579
1662
  var r;
1580
1663
  if (typeof window < "u") {
1581
- const n = (r = x.current) == null ? void 0 : r.querySelector(".redactor-in"), d = window.getSelection();
1582
- n && d && d.rangeCount > 0 && d.anchorNode && n.contains(d.anchorNode) && (Re.current = d.getRangeAt(0).cloneRange());
1664
+ const n = (r = w.current) == null ? void 0 : r.querySelector(".redactor-in"), i = window.getSelection();
1665
+ n && i && i.rangeCount > 0 && i.anchorNode && n.contains(i.anchorNode) && (Ae.current = i.getRangeAt(0).cloneRange());
1583
1666
  }
1584
- const t = G.current;
1667
+ const t = K.current;
1585
1668
  if (t)
1586
1669
  try {
1587
1670
  t(R, "selection.save");
1588
1671
  } catch {
1589
1672
  }
1590
- }, [R]), Fe = C(() => {
1591
- const t = G.current;
1673
+ }, [R]), Ke = C(() => {
1674
+ const t = K.current;
1592
1675
  if (!t) return;
1593
- const r = Re.current;
1676
+ const r = Ae.current;
1594
1677
  try {
1595
1678
  t(R, "editor.focus");
1596
1679
  } catch {
@@ -1608,120 +1691,120 @@ const hn = De(
1608
1691
  t(R, "selection.restore");
1609
1692
  } catch {
1610
1693
  }
1611
- }, [R]), mt = C(() => {
1694
+ }, [R]), ft = C(() => {
1612
1695
  var n;
1613
1696
  if (typeof window > "u") return "";
1614
- const t = (n = x.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
1697
+ const t = (n = w.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
1615
1698
  return !t || !r || !r.anchorNode || !t.contains(r.anchorNode) ? "" : r.toString();
1616
- }, []), ht = C(() => {
1617
- var m;
1699
+ }, []), gt = C(() => {
1700
+ var u;
1618
1701
  if (typeof window > "u") return null;
1619
- const t = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in"), r = window.getSelection();
1702
+ const t = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
1620
1703
  if (!t || !r || r.rangeCount === 0) return null;
1621
- const n = r.anchorNode, d = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1622
- return !d || !t.contains(d) ? null : d.closest("table");
1623
- }, []), Ve = L(null), we = C(() => {
1624
- var m;
1704
+ const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1705
+ return !i || !t.contains(i) ? null : i.closest("table");
1706
+ }, []), Ge = $(null), we = C(() => {
1707
+ var u;
1625
1708
  if (typeof window > "u") return null;
1626
- const t = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in"), r = window.getSelection();
1709
+ const t = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
1627
1710
  if (!t || !r || r.rangeCount === 0) return null;
1628
- const n = r.anchorNode, d = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1629
- return !d || !t.contains(d) ? null : d.closest("td,th");
1630
- }, []), ft = C(() => {
1631
- Ve.current = we();
1632
- }, [we]), gt = C(
1711
+ const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1712
+ return !i || !t.contains(i) ? null : i.closest("td,th");
1713
+ }, []), pt = C(() => {
1714
+ Ge.current = we();
1715
+ }, [we]), bt = C(
1633
1716
  (t, r) => {
1634
- var b;
1635
- const n = Ve.current ?? we();
1717
+ var h;
1718
+ const n = Ge.current ?? we();
1636
1719
  if (!n) return;
1637
- const d = t === "row" ? Array.from(((b = n.closest("tr")) == null ? void 0 : b.children) ?? [n]).filter(
1720
+ const i = t === "row" ? Array.from(((h = n.closest("tr")) == null ? void 0 : h.children) ?? [n]).filter(
1638
1721
  (N) => N instanceof HTMLElement && (N.tagName === "TD" || N.tagName === "TH")
1639
- ) : [n], m = G.current;
1640
- if (m)
1722
+ ) : [n], u = K.current;
1723
+ if (u)
1641
1724
  try {
1642
- m(R, "module.buffer.trigger");
1725
+ u(R, "module.buffer.trigger");
1643
1726
  } catch {
1644
1727
  }
1645
- for (const N of d)
1728
+ for (const N of i)
1646
1729
  r ? N.style.setProperty("background-color", r) : N.style.removeProperty("background-color");
1647
- if (m)
1730
+ if (u)
1648
1731
  try {
1649
- m(R, "broadcast", "hardsync");
1732
+ u(R, "broadcast", "hardsync");
1650
1733
  } catch {
1651
1734
  }
1652
- typeof window < "u" && window.requestAnimationFrame(() => re());
1735
+ typeof window < "u" && window.requestAnimationFrame(() => ne());
1653
1736
  },
1654
- [we, R, re]
1655
- ), pt = C(
1737
+ [we, R, ne]
1738
+ ), yt = C(
1656
1739
  (t) => {
1657
1740
  var n;
1658
- const r = G.current;
1741
+ const r = K.current;
1659
1742
  if (r && typeof window < "u") {
1660
- const d = (n = x.current) == null ? void 0 : n.querySelector(".redactor-in"), m = window.getSelection(), b = m == null ? void 0 : m.anchorNode, N = b && b.nodeType === Node.TEXT_NODE ? b.parentElement : b, Q = N && (d != null && d.contains(N)) ? N.closest("ul,ol") : null;
1743
+ const i = (n = w.current) == null ? void 0 : n.querySelector(".redactor-in"), u = window.getSelection(), h = u == null ? void 0 : u.anchorNode, N = h && h.nodeType === Node.TEXT_NODE ? h.parentElement : h, Q = N && (i != null && i.contains(N)) ? N.closest("ul,ol") : null;
1661
1744
  if (Q)
1662
1745
  try {
1663
1746
  r(R, "caret.setAfter", Q);
1664
1747
  } catch {
1665
1748
  }
1666
1749
  }
1667
- Se(t), typeof window < "u" && window.requestAnimationFrame(() => {
1668
- var m;
1669
- const d = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in");
1670
- d == null || d.querySelectorAll("table td, table th").forEach((b) => {
1671
- let N = b.lastChild;
1750
+ Ee(t), typeof window < "u" && window.requestAnimationFrame(() => {
1751
+ var u;
1752
+ const i = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in");
1753
+ i == null || i.querySelectorAll("table td, table th").forEach((h) => {
1754
+ let N = h.lastChild;
1672
1755
  for (; N && N.nodeType === Node.TEXT_NODE && !(N.textContent ?? "").trim(); ) {
1673
1756
  const Q = N.previousSibling;
1674
- b.removeChild(N), N = Q;
1757
+ h.removeChild(N), N = Q;
1675
1758
  }
1676
1759
  });
1677
1760
  });
1678
1761
  },
1679
- [Se, R]
1680
- ), bt = C(
1762
+ [Ee, R]
1763
+ ), vt = C(
1681
1764
  async (t, r) => {
1682
- if (!u) throw new Error("No image upload URL configured.");
1765
+ if (!m) throw new Error("No image upload URL configured.");
1683
1766
  const n = new FormData();
1684
1767
  n.append("file", t);
1685
- const d = await fetch(u, {
1768
+ const i = await fetch(m, {
1686
1769
  method: "POST",
1687
1770
  body: n,
1688
1771
  credentials: "same-origin",
1689
1772
  signal: r
1690
1773
  });
1691
- if (!d.ok) throw new Error(`Image upload failed (${d.status}).`);
1692
- const m = sn(await d.json());
1693
- if (!m) throw new Error("Image upload response contained no URL.");
1694
- return m;
1774
+ if (!i.ok) throw new Error(`Image upload failed (${i.status}).`);
1775
+ const u = dn(await i.json());
1776
+ if (!u) throw new Error("Image upload response contained no URL.");
1777
+ return u;
1695
1778
  },
1696
- [u]
1697
- ), me = L(null), xe = L(null), [he, Ge] = z(!1), [yt, We] = z(!1), [vt, Ae] = z(""), Ce = C(() => {
1779
+ [m]
1780
+ ), pe = $(null), xe = $(null), [be, We] = T(!1), [kt, Ue] = T(!1), [wt, He] = T(""), Ce = C(() => {
1698
1781
  const t = xe.current;
1699
1782
  t != null && t.parentNode && t.parentNode.removeChild(t), xe.current = null;
1700
1783
  }, []), Xe = C((t) => {
1701
- var d;
1702
- const r = (d = x.current) == null ? void 0 : d.querySelector(
1784
+ var i;
1785
+ const r = (i = w.current) == null ? void 0 : i.querySelector(
1703
1786
  ".redactor-in"
1704
1787
  );
1705
1788
  if (!r) return;
1706
1789
  let n = xe.current;
1707
1790
  if (!n || !r.contains(n)) {
1708
1791
  n = document.createElement("span"), n.setAttribute("data-rte-interim", ""), n.setAttribute("contenteditable", "false");
1709
- const m = window.getSelection();
1710
- if (m && m.rangeCount > 0 && r.contains(m.anchorNode)) {
1711
- const b = m.getRangeAt(0);
1712
- b.collapse(!1), b.insertNode(n);
1792
+ const u = window.getSelection();
1793
+ if (u && u.rangeCount > 0 && r.contains(u.anchorNode)) {
1794
+ const h = u.getRangeAt(0);
1795
+ h.collapse(!1), h.insertNode(n);
1713
1796
  } else
1714
1797
  r.appendChild(n);
1715
1798
  xe.current = n;
1716
1799
  }
1717
1800
  n.textContent = t;
1718
- }, []), Ue = C(() => {
1719
- var t;
1720
- (t = me.current) == null || t.abort();
1721
1801
  }, []), Qe = C(() => {
1802
+ var t;
1803
+ (t = pe.current) == null || t.abort();
1804
+ }, []), Ze = C(() => {
1722
1805
  if (!E) return;
1723
1806
  const t = new AbortController();
1724
- me.current = t, We(!1), Ge(!0), Ae(I("editor.ai.listening")), Ce(), E({
1807
+ pe.current = t, Ue(!1), We(!0), He(H("editor.ai.listening")), Ce(), E({
1725
1808
  signal: t.signal,
1726
1809
  // Interim text shows live in the editor (grey + caret); each final
1727
1810
  // replaces it with committed text at the caret.
@@ -1732,66 +1815,69 @@ const hn = De(
1732
1815
  if (t.signal.aborted) return;
1733
1816
  Ce();
1734
1817
  const n = r.trim();
1735
- n && (ae(`${n} `, { asHtml: !1 }), Ae(n));
1818
+ n && (ie(`${n} `, { asHtml: !1 }), He(n));
1736
1819
  }
1737
1820
  }).catch((r) => {
1738
- t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || We(!0);
1821
+ t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || Ue(!0);
1739
1822
  }).finally(() => {
1740
- Ce(), me.current === t && (me.current = null, Ge(!1), Ae(""));
1823
+ Ce(), pe.current === t && (pe.current = null, We(!1), He(""));
1741
1824
  });
1742
- }, [E, ae, Ce, Xe, I]), kt = C(() => {
1743
- he ? Ue() : Qe();
1744
- }, [he, Qe, Ue]);
1745
- K(() => () => {
1825
+ }, [E, ie, Ce, Xe, H]), xt = C(() => {
1826
+ be ? Qe() : Ze();
1827
+ }, [be, Ze, Qe]);
1828
+ W(() => () => {
1746
1829
  var t;
1747
- return (t = me.current) == null ? void 0 : t.abort();
1830
+ return (t = pe.current) == null ? void 0 : t.abort();
1748
1831
  }, []);
1749
- const [fe, Ze] = z(null), ge = L(null), Ye = C(
1832
+ const [te, Ie] = T(null), le = $(null), Ye = C(
1750
1833
  (t, r) => {
1751
- if (ge.current) return;
1834
+ if (le.current) return;
1752
1835
  const n = new AbortController();
1753
- ge.current = n, Ze(t);
1754
- const d = oe();
1755
- Promise.resolve(r({ html: d, signal: n.signal })).then((m) => {
1836
+ le.current = n, Ie(t);
1837
+ const i = ae();
1838
+ Promise.resolve(r({ html: i, signal: n.signal })).then((u) => {
1756
1839
  var N;
1757
1840
  if (n.signal.aborted) return;
1758
- const b = te(String(m ?? ""));
1759
- U("source.setCode", b), (N = V.current) == null || N.call(V, { html: b, markdown: "" });
1841
+ const h = re(String(u ?? ""));
1842
+ X("source.setCode", h), (N = V.current) == null || N.call(V, { html: h, markdown: "" });
1760
1843
  }).catch(() => {
1761
1844
  }).finally(() => {
1762
- ge.current === n && (ge.current = null, Ze(null));
1845
+ le.current === n && (le.current = null, Ie(null));
1763
1846
  });
1764
1847
  },
1765
- [oe, U]
1766
- );
1767
- K(() => () => {
1848
+ [ae, X]
1849
+ ), Je = C(() => {
1850
+ var t;
1851
+ (t = le.current) == null || t.abort(), le.current = null, Ie(null);
1852
+ }, []);
1853
+ W(() => () => {
1768
1854
  var t;
1769
- return (t = ge.current) == null ? void 0 : t.abort();
1770
- }, []), K(() => {
1771
- const t = W.current;
1855
+ return (t = le.current) == null ? void 0 : t.abort();
1856
+ }, []), W(() => {
1857
+ const t = G.current;
1772
1858
  if (!t) return;
1773
- t.value = ut.current;
1774
- const r = dn(H);
1859
+ t.value = ht.current;
1860
+ const r = cn(I);
1775
1861
  if (!r) {
1776
- X(!0);
1862
+ U(!0);
1777
1863
  return;
1778
1864
  }
1779
- G.current = r;
1865
+ K.current = r;
1780
1866
  const n = {
1781
- lang: O ?? mn(J.language || "en"),
1867
+ lang: O ?? hn(J.language || "en"),
1782
1868
  // The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
1783
1869
  // via the command API, so Redactor's native toolbar is suppressed.
1784
1870
  toolbar: !1,
1785
- plugins: w ?? [],
1786
- placeholder: f ?? I("editor.placeholder"),
1871
+ plugins: x ?? [],
1872
+ placeholder: g ?? H("editor.placeholder"),
1787
1873
  toolbarFixed: !1,
1788
1874
  // Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
1789
1875
  shortcodes: !1,
1790
1876
  imageEditable: !1,
1791
1877
  imageResizable: !0
1792
- }, d = u ? { imageUpload: u } : {}, m = (S == null ? void 0 : S.callbacks) ?? {}, b = {
1878
+ }, i = m ? { imageUpload: m } : {}, u = (S == null ? void 0 : S.callbacks) ?? {}, h = {
1793
1879
  ...n,
1794
- ...d,
1880
+ ...i,
1795
1881
  ...S ?? {},
1796
1882
  // Re-pin safety-critical keys LAST so consumer `options` can't override
1797
1883
  // the sanitising change handler, re-enable image editing, or turn off
@@ -1799,187 +1885,206 @@ const hn = De(
1799
1885
  imageEditable: !1,
1800
1886
  imageResizable: !0,
1801
1887
  callbacks: {
1802
- ...m,
1888
+ ...u,
1803
1889
  changed(N) {
1804
- const Q = Ie(ln(N)), Ne = te(Q);
1805
- ce.current = !0, V.current && (ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
1806
- var pe;
1807
- (pe = V.current) == null || pe.call(V, { html: Ne, markdown: "" });
1890
+ const Q = qe(sn(N)), Te = re(Q);
1891
+ he.current = !0, V.current && (ge.current && clearTimeout(ge.current), ge.current = setTimeout(() => {
1892
+ var ye;
1893
+ (ye = V.current) == null || ye.call(V, { html: Te, markdown: "" });
1808
1894
  }, 100));
1809
1895
  },
1810
1896
  keydown(N) {
1811
1897
  var Q;
1812
- (Q = ve.current) == null || Q.call(ve, N);
1898
+ (Q = ke.current) == null || Q.call(ke, N);
1813
1899
  },
1814
1900
  observe() {
1815
- re();
1901
+ ne();
1816
1902
  }
1817
1903
  }
1818
1904
  };
1819
1905
  try {
1820
- if (r(R, b), g)
1906
+ if (r(R, h), p)
1821
1907
  try {
1822
1908
  r(R, "enableReadOnly");
1823
1909
  } catch {
1824
1910
  }
1825
1911
  } catch {
1826
- X(!0);
1912
+ U(!0);
1827
1913
  }
1828
1914
  return () => {
1829
- ue.current && clearTimeout(ue.current);
1915
+ ge.current && clearTimeout(ge.current);
1830
1916
  try {
1831
1917
  r(R, "destroy");
1832
1918
  } catch {
1833
1919
  }
1834
- G.current = null;
1920
+ K.current = null;
1835
1921
  };
1836
- }, []), K(() => {
1837
- if (!G.current || c === void 0) return;
1838
- if (ce.current) {
1839
- ce.current = !1;
1922
+ }, []), W(() => {
1923
+ if (!K.current || c === void 0) return;
1924
+ if (he.current) {
1925
+ he.current = !1;
1840
1926
  return;
1841
1927
  }
1842
- const t = te(Ie(c));
1843
- Ie(oe()) !== t && U("source.setCode", t);
1844
- }, [c, oe, U]), K(() => {
1845
- ye.current = g;
1846
- const t = G.current;
1928
+ const t = re(qe(c));
1929
+ qe(ae()) !== t && X("source.setCode", t);
1930
+ }, [c, ae, X]), W(() => {
1931
+ fe.current = p;
1932
+ const t = K.current;
1847
1933
  if (t)
1848
1934
  try {
1849
- t(R, g ? "enableReadOnly" : "disableReadOnly");
1935
+ t(R, p ? "enableReadOnly" : "disableReadOnly");
1850
1936
  } catch {
1851
1937
  }
1852
- }, [g, R]), K(() => {
1853
- if (!F || c === void 0) return;
1854
- const t = W.current;
1938
+ }, [p, R]), W(() => {
1939
+ if (!j || c === void 0) return;
1940
+ const t = G.current;
1855
1941
  if (!t) return;
1856
- const r = te(c);
1942
+ const r = re(c);
1857
1943
  t.value !== r && document.activeElement !== t && (t.value = r);
1858
- }, [F, c]);
1859
- const Ee = Je(
1944
+ }, [j, c]);
1945
+ const Le = et(
1860
1946
  () => ({
1861
1947
  getHTML() {
1862
- return oe();
1948
+ return ae();
1863
1949
  },
1864
1950
  getText() {
1865
- return oe().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
1951
+ return ae().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
1866
1952
  },
1867
1953
  getMarkdown() {
1868
1954
  return "";
1869
1955
  },
1870
1956
  setContent(t) {
1871
- const r = te(t);
1872
- U("source.setCode", r) || W.current && (W.current.value = r);
1957
+ const r = re(t);
1958
+ X("source.setCode", r) || G.current && (G.current.value = r);
1873
1959
  },
1874
- insertAtCursor: ae,
1960
+ insertAtCursor: ie,
1875
1961
  applyFormat(t) {
1876
- const r = cn[t];
1877
- r && ke(...r);
1962
+ const r = un[t];
1963
+ r && ce(...r);
1878
1964
  },
1879
1965
  focus() {
1880
1966
  var r;
1881
- const t = G.current;
1967
+ const t = K.current;
1882
1968
  if (t)
1883
1969
  try {
1884
1970
  t(R, "editor.focus");
1885
1971
  return;
1886
1972
  } catch {
1887
1973
  }
1888
- (r = W.current) == null || r.focus();
1974
+ (r = G.current) == null || r.focus();
1889
1975
  },
1890
1976
  clear() {
1891
- U("source.setCode", "") || W.current && (W.current.value = "");
1977
+ X("source.setCode", "") || G.current && (G.current.value = "");
1892
1978
  }
1893
1979
  }),
1894
- [R, oe, U, ae, ke]
1980
+ [R, ae, X, ie, ce]
1895
1981
  );
1896
- zt(D, () => Ee, [Ee]), Mt(jr, Ee, o);
1897
- const wt = C(
1982
+ zt(q, () => Le, [Le]), Rt(Pr, Le, o);
1983
+ const Ct = C(
1898
1984
  (t) => {
1899
1985
  var r;
1900
1986
  (r = V.current) == null || r.call(V, {
1901
- html: te(t.target.value),
1987
+ html: re(t.target.value),
1902
1988
  markdown: ""
1903
1989
  });
1904
1990
  },
1905
1991
  []
1906
- ), xt = i ?? I("editor.regionLabel"), Ct = f ?? I("editor.placeholder"), He = fe !== null, se = [];
1907
- return E && se.push({
1992
+ ), Ne = l ?? H("editor.regionLabel"), Nt = g ?? H("editor.placeholder");
1993
+ W(() => {
1994
+ var i;
1995
+ if (j) return;
1996
+ const t = (i = w.current) == null ? void 0 : i.querySelector(".redactor-in");
1997
+ if (!t) return;
1998
+ const r = () => {
1999
+ t.getAttribute("role") !== "textbox" && t.setAttribute("role", "textbox"), t.getAttribute("aria-multiline") !== "true" && t.setAttribute("aria-multiline", "true"), t.getAttribute("aria-label") !== Ne && t.setAttribute("aria-label", Ne), t.hasAttribute("aria-labelledby") && t.removeAttribute("aria-labelledby");
2000
+ };
2001
+ r();
2002
+ const n = new MutationObserver(r);
2003
+ return n.observe(t, {
2004
+ attributes: !0,
2005
+ attributeFilter: ["role", "aria-labelledby"]
2006
+ }), () => n.disconnect();
2007
+ }, [j, Ne]);
2008
+ const $e = te !== null, ue = [];
2009
+ return E && ue.push({
1908
2010
  key: "dictate",
1909
- icon: he ? /* @__PURE__ */ e(ot, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(at, { "aria-hidden": "true", className: "ds:size-5" }),
1910
- label: I(he ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
1911
- onClick: kt,
1912
- recording: he
1913
- }), Y && se.push({
2011
+ icon: be ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(lt, { "aria-hidden": "true", className: "ds:size-5" }),
2012
+ label: H(be ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
2013
+ onClick: xt,
2014
+ recording: be
2015
+ }), Y && ue.push({
1914
2016
  key: "proofread",
1915
- icon: fe === "proofread" ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Rr, { "aria-hidden": "true", className: "ds:size-5" }),
1916
- label: I("editor.ai.proofread", "Check spelling & grammar"),
1917
- onClick: () => Ye("proofread", Y),
1918
- running: fe === "proofread"
1919
- }), $ && se.push({
2017
+ // While running, the segment becomes a STOP/cancel button (progress is
2018
+ // shown by the scrim spinner).
2019
+ icon: te === "proofread" ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Sr, { "aria-hidden": "true", className: "ds:size-5" }),
2020
+ label: te === "proofread" ? H("common.cancel") : H("editor.ai.proofread", "Check spelling & grammar"),
2021
+ onClick: te === "proofread" ? Je : () => Ye("proofread", Y),
2022
+ running: te === "proofread"
2023
+ }), L && ue.push({
1920
2024
  key: "format",
1921
- icon: fe === "format" ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Or, { "aria-hidden": "true", className: "ds:size-5" }),
1922
- label: I("editor.ai.autoFormat", "Auto-format document"),
1923
- onClick: () => Ye("format", $),
1924
- running: fe === "format"
1925
- }), k && se.push({
2025
+ icon: te === "format" ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(qr, { "aria-hidden": "true", className: "ds:size-5" }),
2026
+ label: te === "format" ? H("common.cancel") : H("editor.ai.autoFormat", "Auto-format document"),
2027
+ onClick: te === "format" ? Je : () => Ye("format", L),
2028
+ running: te === "format"
2029
+ }), k && ue.push({
1926
2030
  key: "write",
1927
- icon: /* @__PURE__ */ e(Pt, { "aria-hidden": "true", className: "ds:size-5" }),
1928
- label: I("editor.ai.helpMeWrite"),
2031
+ icon: /* @__PURE__ */ e(Bt, { "aria-hidden": "true", className: "ds:size-5" }),
2032
+ label: H("editor.ai.helpMeWrite"),
1929
2033
  onClick: () => {
1930
- Be(), je(!0);
2034
+ Ve(), Be(!0);
1931
2035
  }
1932
2036
  }), /* @__PURE__ */ y(
1933
2037
  "div",
1934
2038
  {
1935
- ref: x,
1936
- className: [hn(), T].filter(Boolean).join(" "),
2039
+ ref: w,
2040
+ className: [fn(), z].filter(Boolean).join(" "),
1937
2041
  "data-component": "rich-text-editor",
1938
2042
  "data-component-id": o,
1939
- "data-min-height": p,
2043
+ "data-min-height": b,
1940
2044
  children: [
1941
- !F && !g ? /* @__PURE__ */ e(
1942
- an,
2045
+ !j && !p ? /* @__PURE__ */ e(
2046
+ ln,
1943
2047
  {
1944
- run: ke,
1945
- active: Pe,
1946
- preset: s,
1947
- insertHtml: Se,
1948
- insertTable: pt,
1949
- saveSelection: Be,
1950
- restoreSelection: Fe,
1951
- getSelectedText: mt,
1952
- uploadImage: u ? bt : void 0,
1953
- enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
1954
- enableImage: !!u,
1955
- enableTable: (w == null ? void 0 : w.includes("table")) ?? !1,
2048
+ run: ce,
2049
+ active: Fe,
2050
+ preset: d,
2051
+ insertHtml: Ee,
2052
+ insertTable: yt,
2053
+ saveSelection: Ve,
2054
+ restoreSelection: Ke,
2055
+ getSelectedText: ft,
2056
+ uploadImage: m ? vt : void 0,
2057
+ enableColor: (x == null ? void 0 : x.includes("fontcolor")) ?? !1,
2058
+ enableImage: !!m,
2059
+ enableTable: (x == null ? void 0 : x.includes("table")) ?? !1,
1956
2060
  showExtensions: v
1957
2061
  }
1958
2062
  ) : null,
1959
- /* @__PURE__ */ y("div", { className: "ds:relative", ref: q, children: [
2063
+ /* @__PURE__ */ y("div", { className: "ds:relative", ref: D, children: [
1960
2064
  /* @__PURE__ */ e(
1961
2065
  "textarea",
1962
2066
  {
1963
- ref: W,
1964
- id: de,
1965
- "aria-label": xt,
2067
+ ref: G,
2068
+ id: me,
2069
+ "aria-label": Ne,
1966
2070
  "aria-multiline": "true",
1967
- "aria-busy": He || void 0,
1968
- placeholder: Ct,
1969
- onChange: F ? wt : void 0,
1970
- readOnly: F ? g : void 0,
1971
- className: F ? fn() : void 0
2071
+ "aria-busy": $e || void 0,
2072
+ placeholder: Nt,
2073
+ onChange: j ? Ct : void 0,
2074
+ readOnly: j ? p : void 0,
2075
+ className: j ? gn() : void 0
1972
2076
  }
1973
2077
  ),
1974
- He ? /* @__PURE__ */ e(
2078
+ $e ? /* @__PURE__ */ e(
1975
2079
  "div",
1976
2080
  {
1977
2081
  "aria-hidden": "true",
1978
- className: "ds:absolute ds:inset-0 ds:z-[5] ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]"
2082
+ className: "ds:absolute ds:inset-0 ds:z-[5] ds:flex ds:items-center ds:justify-center ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]",
2083
+ children: /* @__PURE__ */ e(it, { size: "lg", variant: "prism" })
1979
2084
  }
1980
2085
  ) : null,
1981
2086
  /* @__PURE__ */ y("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
1982
- se.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: se.map((t, r) => /* @__PURE__ */ y(nt, { children: [
2087
+ ue.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: ue.map((t, r) => /* @__PURE__ */ y(at, { children: [
1983
2088
  r > 0 ? /* @__PURE__ */ e(
1984
2089
  "span",
1985
2090
  {
@@ -1994,49 +2099,49 @@ const hn = De(
1994
2099
  onClick: t.onClick,
1995
2100
  "aria-pressed": t.recording || void 0,
1996
2101
  "aria-busy": t.running || void 0,
1997
- disabled: He && !t.running || void 0,
2102
+ disabled: $e && !t.running || void 0,
1998
2103
  "aria-label": t.label,
1999
2104
  title: t.label,
2000
- className: t.recording ? pn : gn,
2105
+ className: t.recording ? bn : pn,
2001
2106
  children: t.icon
2002
2107
  }
2003
2108
  )
2004
2109
  ] }, t.key)) }) : null,
2005
2110
  k ? /* @__PURE__ */ e(
2006
- Vr,
2111
+ Kr,
2007
2112
  {
2008
- open: dt,
2009
- onClose: () => je(!1),
2113
+ open: ut,
2114
+ onClose: () => Be(!1),
2010
2115
  onRequestAiDraft: k,
2011
2116
  onInsert: (t) => {
2012
- Fe(), ae(t, { asHtml: A !== "text" });
2117
+ Ke(), ie(t, { asHtml: A !== "text" });
2013
2118
  },
2014
2119
  previewAsHtml: A !== "text",
2015
- privacyNotice: M,
2120
+ privacyNotice: _,
2016
2121
  onDictate: E
2017
2122
  }
2018
2123
  ) : null
2019
2124
  ] }),
2020
- !F && !g && ((w == null ? void 0 : w.includes("table")) ?? !1) ? /* @__PURE__ */ e(
2021
- on,
2125
+ !j && !p && ((x == null ? void 0 : x.includes("table")) ?? !1) ? /* @__PURE__ */ e(
2126
+ an,
2022
2127
  {
2023
- active: Pe,
2024
- run: ke,
2025
- areaRef: q,
2026
- getActiveTableEl: ht,
2027
- enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
2028
- saveTableCell: ft,
2029
- applyTableBackground: gt
2128
+ active: Fe,
2129
+ run: ce,
2130
+ areaRef: D,
2131
+ getActiveTableEl: gt,
2132
+ enableColor: (x == null ? void 0 : x.includes("fontcolor")) ?? !1,
2133
+ saveTableCell: pt,
2134
+ applyTableBackground: bt
2030
2135
  }
2031
2136
  ) : null
2032
2137
  ] }),
2033
- E ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: vt }) : null,
2034
- E && yt ? /* @__PURE__ */ e(
2138
+ E ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: wt }) : null,
2139
+ E && kt ? /* @__PURE__ */ e(
2035
2140
  "p",
2036
2141
  {
2037
2142
  role: "alert",
2038
2143
  className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
2039
- children: I("editor.ai.dictationError")
2144
+ children: H("editor.ai.dictationError")
2040
2145
  }
2041
2146
  ) : null
2042
2147
  ]
@@ -2044,10 +2149,10 @@ const hn = De(
2044
2149
  );
2045
2150
  }
2046
2151
  );
2047
- bn.displayName = "RichTextEditor";
2152
+ yn.displayName = "RichTextEditor";
2048
2153
  export {
2049
- bn as R,
2050
- jr as r,
2051
- hn as w
2154
+ yn as R,
2155
+ Pr as r,
2156
+ fn as w
2052
2157
  };
2053
- //# sourceMappingURL=rich-text-editor-VawKN1FI.js.map
2158
+ //# sourceMappingURL=rich-text-editor-DlCqPixb.js.map