@alfadocs/ui-kit 1.143.0 → 1.144.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 (332) hide show
  1. package/dist/_chunks/{actions-cell-renderer-CPNyF6ye.js → actions-cell-renderer-BA1FB6cT.js} +3 -3
  2. package/dist/_chunks/{address-autocomplete-yDLqg43e.js → address-autocomplete-_LeOFdM7.js} +2 -2
  3. package/dist/_chunks/{address-fields-Bh9JZJHZ.js → address-fields-C4khof4C.js} +2 -2
  4. package/dist/_chunks/{agenda-tray-CGcS_qoM.js → agenda-tray-NgxPuAAz.js} +3 -3
  5. package/dist/_chunks/{ai-credits-exhausted-notice-Lws3113e.js → ai-credits-exhausted-notice-DCq27xy2.js} +2 -2
  6. package/dist/_chunks/{ai-credits-notice-D_Zm_N2A.js → ai-credits-notice-B6buIgmV.js} +3 -3
  7. package/dist/_chunks/{ai-permission-notice-CEDEWE2-.js → ai-permission-notice-C_YB3MBA.js} +2 -2
  8. package/dist/_chunks/{ai-prompt-input-y4-dtQIT.js → ai-prompt-input-Bwoa8gNc.js} +2 -2
  9. package/dist/_chunks/{ai-summary-panel-CJVOjr2I.js → ai-summary-panel-Cdsve-XN.js} +7 -7
  10. package/dist/_chunks/{alia-sidebar-AKz42_XE.js → alia-sidebar-Bjuxk8mU.js} +7 -7
  11. package/dist/_chunks/{anamnesis-card-W8ZaDytS.js → anamnesis-card-G0qzw0Oi.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-wUl7oXBO.js → anamnesis-summary-rows-QCv6zW-J.js} +7 -7
  13. package/dist/_chunks/{appointment-details-panel.history-B8R8XfGe.js → appointment-details-panel.history-eqPMKmW0.js} +3 -3
  14. package/dist/_chunks/{appointment-details-panel.identity-C20Y9xNC.js → appointment-details-panel.identity--_j07UG1.js} +2 -2
  15. package/dist/_chunks/{appointment-peek-BCzekfWh.js → appointment-peek-B3raO90X.js} +3 -3
  16. package/dist/_chunks/{appointment-timeline-CMc_3C74.js → appointment-timeline-D5qbZ7in.js} +5 -5
  17. package/dist/_chunks/{appointment-tray-D8k5YKLU.js → appointment-tray-CFCxukwq.js} +3 -3
  18. package/dist/_chunks/{audio-recorder-DxhCiLqG.js → audio-recorder-DcUIVMWj.js} +3 -3
  19. package/dist/_chunks/{balance-badge-cell-10BdaOQ8.js → balance-badge-cell-BPz9bQAB.js} +4 -4
  20. package/dist/_chunks/{bill-line-table-qAdmV19W.js → bill-line-table-DnkFqMnM.js} +2 -2
  21. package/dist/_chunks/{bishop-score-DbvfBlBM.js → bishop-score-fJRN0MtR.js} +2 -2
  22. package/dist/_chunks/{bmi-calculator-rq3ZsKp0.js → bmi-calculator-FmXBHbot.js} +2 -2
  23. package/dist/_chunks/{button-DohK_Ak_.js → button-Dp4j9ygh.js} +6 -6
  24. package/dist/_chunks/{button-group-DoKG16Fy.js → button-group-N60L3HMa.js} +2 -2
  25. package/dist/_chunks/{calendar-CyLtLBNP.js → calendar-DDTWUYnw.js} +2 -2
  26. package/dist/_chunks/{calendar-appointment-editor-dialog-9kVppi9f.js → calendar-appointment-editor-dialog-CA69bdbI.js} +21 -21
  27. package/dist/_chunks/{calendar-editor-discard-host-BblBxMqT.js → calendar-editor-discard-host-DWS_kM-a.js} +6 -6
  28. package/dist/_chunks/{calendar-waiting-list-panel-CSFJw5np.js → calendar-waiting-list-panel-Du_jtVbl.js} +9 -9
  29. package/dist/_chunks/{calendar-workspace.model-B8yPwuBv.js → calendar-workspace.model-4zmA3BFE.js} +2 -2
  30. package/dist/_chunks/{calendar.sheets-DZh3p8HE.js → calendar.sheets-CGwr4t2p.js} +15 -15
  31. package/dist/_chunks/{calls-panel-CnjAKFgA.js → calls-panel-BTTfHnPD.js} +5 -5
  32. package/dist/_chunks/{care-plan-card-CkRqA58O.js → care-plan-card-2U2LuIJD.js} +2 -2
  33. package/dist/_chunks/{care-plan-entry-card-DurPuYAP.js → care-plan-entry-card-CUAlQv1c.js} +2 -2
  34. package/dist/_chunks/{care-plan-header-C4i93i8H.js → care-plan-header-Dm9KZ41y.js} +2 -2
  35. package/dist/_chunks/{carousel.agent-CkDXR3-8.js → carousel.agent-CN78qTiR.js} +2 -2
  36. package/dist/_chunks/{chart-ChNsJf9_.js → chart-EUdS8caO.js} +3 -3
  37. package/dist/_chunks/{chat-input-BmvnuZqj.js → chat-input-kduOKc5Q.js} +2 -2
  38. package/dist/_chunks/{chat-message-IG9uRq6y.js → chat-message-Db7cWCgO.js} +3 -3
  39. package/dist/_chunks/{check-in-documents-CEVcgcYZ.js → check-in-documents-v1jFfDE1.js} +2 -2
  40. package/dist/_chunks/{code-block-BTsCXVGI.js → code-block-BpmhaXp_.js} +2 -2
  41. package/dist/_chunks/{communications-panel-MgAuWYBy.js → communications-panel-DDzUyoHi.js} +6 -6
  42. package/dist/_chunks/{connection-status-DWClakYw.js → connection-status-Bi6KPTlh.js} +3 -3
  43. package/dist/_chunks/{contact-profile-card-CsZNMlws.js → contact-profile-card-BxnBI1z1.js} +3 -3
  44. package/dist/_chunks/{control-room-rail-DBmNpbDE.js → control-room-rail-BQvaYowi.js} +3 -3
  45. package/dist/_chunks/{copy-field-BaYEDJ9f.js → copy-field-Bp0rH_YO.js} +2 -2
  46. package/dist/_chunks/{cycle-calculator-BUCGfEcy.js → cycle-calculator-Dd-dNPyR.js} +2 -2
  47. package/dist/_chunks/{dashboard-grid-D2egA1Zu.js → dashboard-grid-C_cby1Cf.js} +2 -2
  48. package/dist/_chunks/{data-grid-tyE2kGfx.js → data-grid-CujX-2tF.js} +6 -6
  49. package/dist/_chunks/{data-grid-tabs-Mbj6bSK2.js → data-grid-tabs-3NIWrciW.js} +2 -2
  50. package/dist/_chunks/{data-table-Huk4CNHs.js → data-table-DFAYYsSc.js} +6 -6
  51. package/dist/_chunks/{data-table-tabs-D5ujdK56.js → data-table-tabs-BKdmGcyD.js} +2 -2
  52. package/dist/_chunks/{date-range-panel-BOgfP_V3.js → date-range-panel-B86RANxB.js} +2 -2
  53. package/dist/_chunks/{default-tabs-ChkVzOL8.js → default-tabs-CqP1uWdx.js} +9 -9
  54. package/dist/_chunks/{description-list-BxzDN9o2.js → description-list-DA4TgL_I.js} +2 -2
  55. package/dist/_chunks/{dev-bypass-button-B7ePcJcg.js → dev-bypass-button-BzfYGPuf.js} +2 -2
  56. package/dist/_chunks/{document-preview-x_S8V7VC.js → document-preview-oSuJsJ3k.js} +4 -4
  57. package/dist/_chunks/{document-scanner-CETscDea.js → document-scanner-C_9P-ysi.js} +2 -2
  58. package/dist/_chunks/{due-date-calculator-DpN0Z9p4.js → due-date-calculator-CcYdmiCI.js} +2 -2
  59. package/dist/_chunks/{editable-currency-cell-renderer-C6z6ABN_.js → editable-currency-cell-renderer-DXJI0fnU.js} +3 -3
  60. package/dist/_chunks/{editable-description-KU56SP4P.js → editable-description-BQauSuCG.js} +3 -3
  61. package/dist/_chunks/{editor-overlay-Dc8uVxEp.js → editor-overlay-Cl6IhKNG.js} +2 -2
  62. package/dist/_chunks/{empty-state-DwJ5YNzz.js → empty-state-5REM7oDM.js} +2 -2
  63. package/dist/_chunks/{entity-summary-DgZSdp6d.js → entity-summary-CZmGcWi2.js} +3 -3
  64. package/dist/_chunks/{error-boundary-tAn_GuCu.js → error-boundary-BQ5mRqEd.js} +2 -2
  65. package/dist/_chunks/{error-page-WLhmWUTq.js → error-page-CdNGIezW.js} +2 -2
  66. package/dist/_chunks/{face-scheme-S88jbOzl.js → face-scheme-ByYeboH9.js} +5 -5
  67. package/dist/_chunks/{fetal-weight-DWj-_ME8.js → fetal-weight-BZql9VkN.js} +2 -2
  68. package/dist/_chunks/{field-array-CA-gn526.js → field-array-kwUgFOIr.js} +3 -3
  69. package/dist/_chunks/{file-manager-kdPsJq_k.js → file-manager-Cp3Z4VvM.js} +7 -7
  70. package/dist/_chunks/{finished-terminal-unDnXT4j.js → finished-terminal-YrhOLYbx.js} +2 -2
  71. package/dist/_chunks/{fiscal-code-input-DZlpaMGg.js → fiscal-code-input-BsQS8gaD.js} +2 -2
  72. package/dist/_chunks/{forgot-password-form-B4ufmBFn.js → forgot-password-form-BUC_hDCJ.js} +2 -2
  73. package/dist/_chunks/{freemium-paywall-BDeq9QWR.js → freemium-paywall-DafloSRi.js} +2 -2
  74. package/dist/_chunks/{gestational-age-calculator-CCDIhSMV.js → gestational-age-calculator-DrVw8arH.js} +2 -2
  75. package/dist/_chunks/{hcg-doubling-BekuksBv.js → hcg-doubling-XWQ6IhEg.js} +2 -2
  76. package/dist/_chunks/{header-l_B8MV0g.js → header-lzhNZEij.js} +2 -2
  77. package/dist/_chunks/{header-settings-CvZ7Qii6.js → header-settings-BIiYXX9_.js} +4 -4
  78. package/dist/_chunks/{heatmap-Cb4JSpv_.js → heatmap-DvsZ-mcL.js} +6 -6
  79. package/dist/_chunks/{help-me-write-templates-C84_4iwX.js → help-me-write-templates-BdCQ-kFO.js} +6 -6
  80. package/dist/_chunks/{hover-card-CIiPOlyM.js → hover-card-CS8ulBf9.js} +2 -2
  81. package/dist/_chunks/{icon-button-group-CLhC7wjU.js → icon-button-group-DEAx9M5v.js} +2 -2
  82. package/dist/_chunks/{icon-button-S8_weU3g.js → icon-button-u9VMQn3x.js} +2 -2
  83. package/dist/_chunks/{icon-picker-Ct6n8GTa.js → icon-picker-CF4nDCzC.js} +3 -3
  84. package/dist/_chunks/{image-cropper-Ch80rFdt.js → image-cropper-CfaSPVt3.js} +2 -2
  85. package/dist/_chunks/{info-tip-CkH2En-i.js → info-tip-cCppV1fD.js} +2 -2
  86. package/dist/_chunks/{insert-result-CDMMt7q8.js → insert-result-UUow9IIY.js} +2 -2
  87. package/dist/_chunks/{invoice-upload-list-CZ1B9yWh.js → invoice-upload-list-srvWy5_d.js} +5 -5
  88. package/dist/_chunks/{key-value-pair-DOTl68_U.js → key-value-pair-BykhMTcP.js} +2 -2
  89. package/dist/_chunks/{kit-extensions-C_oZ7WOq.js → kit-extensions-CSPGIdcn.js} +7 -7
  90. package/dist/_chunks/{link-cell-renderer-Bt_sl4iP.js → link-cell-renderer-CWLArl5e.js} +3 -3
  91. package/dist/_chunks/{locale-picker-OrojXX6E.js → locale-picker-BEJjNGCO.js} +3 -3
  92. package/dist/_chunks/{login-dev-card-oRh9h7N2.js → login-dev-card-DqUNJcd7.js} +2 -2
  93. package/dist/_chunks/{map-view-Cm69dCnY.js → map-view-n6GiDRWM.js} +3 -3
  94. package/dist/_chunks/{marketplace-app-shell-DnL187-U.js → marketplace-app-shell-CGA-R-zt.js} +4 -4
  95. package/dist/_chunks/{medication-line-BohqbCYD.js → medication-line-DFa5oFhf.js} +2 -2
  96. package/dist/_chunks/{medication-search-DoEDakoM.js → medication-search-CTUtXuPT.js} +2 -2
  97. package/dist/_chunks/{message-card-DvBjcZgH.js → message-card-DQML_W8I.js} +3 -3
  98. package/dist/_chunks/{message-tray-BHaE254g.js → message-tray-Dx2HPcKB.js} +4 -4
  99. package/dist/_chunks/{muscle-scheme-vNd8wU7V.js → muscle-scheme-BMFuuKGh.js} +2 -2
  100. package/dist/_chunks/{notes-panel-DCKbuZqS.js → notes-panel-DnBmONPb.js} +4 -4
  101. package/dist/_chunks/{notification-card-CDuzAytQ.js → notification-card-BPGZhE5t.js} +3 -3
  102. package/dist/_chunks/{notification-tray-CnPV8jDA.js → notification-tray-BnC5OItw.js} +4 -4
  103. package/dist/_chunks/{optical-prescription-CWwrW4YQ.js → optical-prescription-DZvauMiM.js} +2 -2
  104. package/dist/_chunks/{panel-subview-DCyvn-49.js → panel-subview-DjBwNV16.js} +2 -2
  105. package/dist/_chunks/{parts-IFiXO68Y.js → parts-DyCxaRF0.js} +4 -4
  106. package/dist/_chunks/{patient-account-settings-BQ9bMsJS.js → patient-account-settings-Do0QbDJe.js} +5 -5
  107. package/dist/_chunks/{patient-card-Cpr8iD19.js → patient-card-D1DrK4BT.js} +2 -2
  108. package/dist/_chunks/{patient-check-in-resume-v5lYhMsh.js → patient-check-in-resume-Bxy1_Pfo.js} +8 -8
  109. package/dist/_chunks/{patient-details-6uJZ27ZL.js → patient-details-Cj3dp9GB.js} +3 -3
  110. package/dist/_chunks/{patient-field-row-D8Cu_MQp.js → patient-field-row-DDjsUsc_.js} +6 -6
  111. package/dist/_chunks/{patient-picker-CQNsqYn2.js → patient-picker-Dm74jHIk.js} +2 -2
  112. package/dist/_chunks/{patient-search-C6-INPjs.js → patient-search-5nLD0jpg.js} +3 -3
  113. package/dist/_chunks/{patient-sign-in-pin-DmMBwWet.js → patient-sign-in-pin-da7C8DOd.js} +3 -3
  114. package/dist/_chunks/{patient-sign-in-steps-BKcxNkdY.js → patient-sign-in-steps-kS2ktytw.js} +5 -5
  115. package/dist/_chunks/{patient-summary-card-NYjO0IfN.js → patient-summary-card-roM9Esfb.js} +5 -5
  116. package/dist/_chunks/{payment-automation-upsell-CGdG2Mwk.js → payment-automation-upsell-N1A_IIw0.js} +2 -2
  117. package/dist/_chunks/{payment-request-card-CNW00DCx.js → payment-request-card-C9VglWsV.js} +3 -3
  118. package/dist/_chunks/{periodontal-chart-DqHrQY4e.js → periodontal-chart-C5JFeQS7.js} +2 -2
  119. package/dist/_chunks/{periodontal-chart-card-q9WSHRC2.js → periodontal-chart-card-DiZYn_60.js} +2 -2
  120. package/dist/_chunks/{popover-CkvP3rHZ.js → popover-C9O7my6h.js} +2 -2
  121. package/dist/_chunks/{portal-details-CwX3VNxh.js → portal-details-CKF4yFHs.js} +5 -5
  122. package/dist/_chunks/{portal-documents-BWdXhWpZ.js → portal-documents-DvpAwmSI.js} +5 -5
  123. package/dist/_chunks/{portal-parts-DbCMuZVl.js → portal-parts-Cvu4PfIY.js} +4 -4
  124. package/dist/_chunks/{practice-results-BUEsl2Pj.js → practice-results-D0TAgL8v.js} +6 -6
  125. package/dist/_chunks/{pregnancy-dating-wc9iCN0f.js → pregnancy-dating-BEVI6zvu.js} +2 -2
  126. package/dist/_chunks/{pregnancy-weight-gain-DmrVHk9y.js → pregnancy-weight-gain-CDkFYcWW.js} +2 -2
  127. package/dist/_chunks/{prescription-history-DPjqflwJ.js → prescription-history-CD3e3U3I.js} +14 -14
  128. package/dist/_chunks/{privacy-lock-CcrjIbBv.js → privacy-lock-C25IybCx.js} +3 -3
  129. package/dist/_chunks/{privacy-mask-C2ZLKrMh.js → privacy-mask-zVh0ntm0.js} +2 -2
  130. package/dist/_chunks/{product-hub-panel-DiWjSIR2.js → product-hub-panel-NVpRuJeW.js} +3 -3
  131. package/dist/_chunks/{public-header.agent-Dsl9zhA2.js → public-header.agent-Dzo6ujrE.js} +3 -3
  132. package/dist/_chunks/{radiograph-panel.agent-CSpr2paU.js → radiograph-panel.agent-BUZPsuSP.js} +4 -4
  133. package/dist/_chunks/{registration-form-BEsIjznv.js → registration-form-AtRCt8n5.js} +3 -3
  134. package/dist/_chunks/{reserved.agent-C_pr0bHy.js → reserved.agent-DjvapRF1.js} +6 -6
  135. package/dist/_chunks/{reset-password-form-DwtSNhnA.js → reset-password-form-AMUxqdAS.js} +2 -2
  136. package/dist/_chunks/{reviews-panel-CdHUSndF.js → reviews-panel-Cw5ygAxs.js} +4 -4
  137. package/dist/_chunks/{rich-text-editor-DoCaj0qc.js → rich-text-editor-Cx9cA4pd.js} +1346 -1305
  138. package/dist/_chunks/{row-actions-C6d6vy5z.js → row-actions-CA938TAd.js} +3 -3
  139. package/dist/_chunks/{saved-view-tabs-CVUM3Nqz.js → saved-view-tabs-COU4bT59.js} +3 -3
  140. package/dist/_chunks/{send-registration-link-form-D-NkS__p.js → send-registration-link-form-D1lPdOPC.js} +2 -2
  141. package/dist/_chunks/{session-countdown-StcyUU5O.js → session-countdown-CGsIG01-.js} +2 -2
  142. package/dist/_chunks/{sheet-BIAhwdyS.js → sheet-CZDjW9Q-.js} +2 -2
  143. package/dist/_chunks/{sign-in-with-alfadocs-button-DzrNgbWv.js → sign-in-with-alfadocs-button-D7JQVzZK.js} +2 -2
  144. package/dist/_chunks/{signature-request-BfKo3vOz.js → signature-request-CfHfAEQt.js} +3 -3
  145. package/dist/_chunks/{signed-out-frame-Oa2e1yps.js → signed-out-frame-CC25CgKo.js} +3 -3
  146. package/dist/_chunks/{signing-end-screen-Pmda6tCH.js → signing-end-screen-Bq6tkFE6.js} +5 -5
  147. package/dist/_chunks/{slot-grid-CfA5zeMv.js → slot-grid-khIpy8Gx.js} +4 -4
  148. package/dist/_chunks/{sms-code-entry-Dgp4GwlM.js → sms-code-entry-C70L3m6-.js} +2 -2
  149. package/dist/_chunks/{specialty-list-BzalHR8_.js → specialty-list-1tltjGRG.js} +2 -2
  150. package/dist/_chunks/{step-up-dialog-C1O8ctoh.js → step-up-dialog-NkVLEV9z.js} +3 -3
  151. package/dist/_chunks/{streaming-text-Nb3Q7L94.js → streaming-text-BXoHgx0l.js} +2 -2
  152. package/dist/_chunks/{sync-tray-BgrO4QjH.js → sync-tray-BQD-HuA4.js} +3 -3
  153. package/dist/_chunks/{task-editor-DNkrLbgK.js → task-editor-B9YpfwcW.js} +7 -7
  154. package/dist/_chunks/{task-tray-Bmi9wCHq.js → task-tray-CxxcGGgx.js} +3 -3
  155. package/dist/_chunks/{tasks-panel-CDFHAHrN.js → tasks-panel-DsjfS_k5.js} +5 -5
  156. package/dist/_chunks/{theme-toggle-C2LPw3xr.js → theme-toggle-DAqT_Yxy.js} +3 -3
  157. package/dist/_chunks/{toast-DQ1Zu1kk.js → toast-Cgmh1cvj.js} +2 -2
  158. package/dist/_chunks/{token-insert-menu-sGtftx4Y.js → token-insert-menu-BxqGMrZN.js} +2 -2
  159. package/dist/_chunks/{tool-rail-mWmYNRCV.js → tool-rail-DjPEiBa2.js} +2 -2
  160. package/dist/_chunks/{toolbar-JTR20W-U.js → toolbar-z_6tE7zG.js} +3 -3
  161. package/dist/_chunks/{tooth-scheme-DpgciFU8.js → tooth-scheme-C7xJEzaK.js} +2 -2
  162. package/dist/_chunks/{types-BrJRsnSG.js → types-DjQeiZXC.js} +2 -2
  163. package/dist/_chunks/{unit-converter-D1e1wZRE.js → unit-converter-CdrdnDlr.js} +2 -2
  164. package/dist/_chunks/{use-appointment-details-read-xj0PyEhI.js → use-appointment-details-read-Dod21IxM.js} +109 -101
  165. package/dist/_chunks/{verify-identity-types-CpeJIc9F.js → verify-identity-types-D0-sw1Qk.js} +2 -2
  166. package/dist/_chunks/{voice-control-panel-DqvvZN2A.js → voice-control-panel-DeWo646r.js} +6 -6
  167. package/dist/_chunks/{warning-stack-Dx7cpj10.js → warning-stack-BvfxZNfR.js} +3 -3
  168. package/dist/_chunks/{week-availability-CsTiwtYj.js → week-availability-D0tTll4q.js} +2 -2
  169. package/dist/_chunks/{weekly-hours-editor-BsVsgeOc.js → weekly-hours-editor-pTLyK8tt.js} +2 -2
  170. package/dist/_chunks/{workflow-map-CwfLHuiD.js → workflow-map-F7OThorL.js} +5 -5
  171. package/dist/_chunks/{workflow-webhook-action-BUWc2txJ.js → workflow-webhook-action-FImC6mwH.js} +6 -6
  172. package/dist/agent-catalog.json +1 -1
  173. package/dist/appointment-editor-panel/index.js +4 -4
  174. package/dist/booking-tools-data/index.js +1 -1
  175. package/dist/browser-support.js +1 -1
  176. package/dist/calendar-action-buttons/index.js +4 -4
  177. package/dist/components/address-autocomplete/index.js +1 -1
  178. package/dist/components/address-fields/index.js +1 -1
  179. package/dist/components/agenda-tray/index.js +1 -1
  180. package/dist/components/ai-credits-notice/index.js +2 -2
  181. package/dist/components/ai-permission-notice/index.js +1 -1
  182. package/dist/components/ai-prompt-input/index.js +1 -1
  183. package/dist/components/ai-summary-panel/index.js +1 -1
  184. package/dist/components/anamnesis-card/index.js +1 -1
  185. package/dist/components/appointment-card/index.js +1 -1
  186. package/dist/components/appointment-details-panel/index.js +2 -2
  187. package/dist/components/appointment-peek/index.js +1 -1
  188. package/dist/components/appointment-timeline/index.js +1 -1
  189. package/dist/components/audio-recorder/index.js +1 -1
  190. package/dist/components/bill-line-table/index.js +1 -1
  191. package/dist/components/bill-table/index.js +1 -1
  192. package/dist/components/bishop-score/index.js +1 -1
  193. package/dist/components/bmi-calculator/index.js +1 -1
  194. package/dist/components/booking/index.js +1 -1
  195. package/dist/components/button/index.js +2 -2
  196. package/dist/components/button-group/index.js +1 -1
  197. package/dist/components/calendar/index.js +1 -1
  198. package/dist/components/calls-panel/index.js +1 -1
  199. package/dist/components/care-plan-card/index.js +1 -1
  200. package/dist/components/care-plan-entry-card/index.js +1 -1
  201. package/dist/components/care-plan-header/index.js +1 -1
  202. package/dist/components/carousel/index.js +1 -1
  203. package/dist/components/chart/index.js +1 -1
  204. package/dist/components/chat-input/index.js +1 -1
  205. package/dist/components/chat-message/index.js +1 -1
  206. package/dist/components/communications-panel/index.js +1 -1
  207. package/dist/components/connection-status/index.js +1 -1
  208. package/dist/components/contact-profile-card/index.js +1 -1
  209. package/dist/components/control-room-rail/index.js +1 -1
  210. package/dist/components/copy-field/index.js +1 -1
  211. package/dist/components/cycle-calculator/index.js +1 -1
  212. package/dist/components/dashboard-grid/index.js +1 -1
  213. package/dist/components/data-grid/index.js +2 -2
  214. package/dist/components/data-grid-tabs/index.js +1 -1
  215. package/dist/components/data-table/index.js +4 -4
  216. package/dist/components/data-table-tabs/index.js +1 -1
  217. package/dist/components/description-list/index.js +1 -1
  218. package/dist/components/dev-bypass-button/index.js +1 -1
  219. package/dist/components/document-preview/index.js +1 -1
  220. package/dist/components/document-scanner/index.js +1 -1
  221. package/dist/components/due-date-calculator/index.js +1 -1
  222. package/dist/components/editable-description/index.js +1 -1
  223. package/dist/components/editor-overlay/index.js +1 -1
  224. package/dist/components/empty-state/index.js +1 -1
  225. package/dist/components/entity-summary/index.js +1 -1
  226. package/dist/components/error-boundary/index.js +1 -1
  227. package/dist/components/face-scheme/index.js +1 -1
  228. package/dist/components/fetal-weight/index.js +1 -1
  229. package/dist/components/field-array/index.js +1 -1
  230. package/dist/components/file-manager/index.js +1 -1
  231. package/dist/components/finished-terminal/index.js +1 -1
  232. package/dist/components/fiscal-code-input/index.js +1 -1
  233. package/dist/components/freemium-paywall/index.js +1 -1
  234. package/dist/components/gestational-age-calculator/index.js +1 -1
  235. package/dist/components/hcg-doubling/index.js +1 -1
  236. package/dist/components/header/index.js +1 -1
  237. package/dist/components/header-settings/index.js +1 -1
  238. package/dist/components/heatmap/index.js +1 -1
  239. package/dist/components/hover-card/index.js +1 -1
  240. package/dist/components/icon-button/index.js +1 -1
  241. package/dist/components/icon-button-group/index.js +1 -1
  242. package/dist/components/icon-picker/index.js +1 -1
  243. package/dist/components/image-cropper/index.js +1 -1
  244. package/dist/components/info-tip/index.js +1 -1
  245. package/dist/components/invoice-upload/index.js +1 -1
  246. package/dist/components/invoice-upload-list/index.js +1 -1
  247. package/dist/components/key-value-pair/index.js +1 -1
  248. package/dist/components/locale-picker/index.js +1 -1
  249. package/dist/components/map-view/index.js +1 -1
  250. package/dist/components/medication-line/index.js +1 -1
  251. package/dist/components/medication-search/index.js +1 -1
  252. package/dist/components/message-card/index.js +1 -1
  253. package/dist/components/message-tray/index.js +1 -1
  254. package/dist/components/muscle-scheme/index.js +1 -1
  255. package/dist/components/notes-panel/index.js +1 -1
  256. package/dist/components/notification-card/index.js +1 -1
  257. package/dist/components/notification-tray/index.js +1 -1
  258. package/dist/components/optical-prescription/index.js +1 -1
  259. package/dist/components/panel-subview/index.js +1 -1
  260. package/dist/components/patient-details/index.js +1 -1
  261. package/dist/components/patient-search/index.js +1 -1
  262. package/dist/components/patient-summary-card/index.js +1 -1
  263. package/dist/components/patient-table/index.js +1 -1
  264. package/dist/components/payment-card/index.js +1 -1
  265. package/dist/components/periodontal-chart/index.js +1 -1
  266. package/dist/components/periodontal-chart-card/index.js +1 -1
  267. package/dist/components/popover/index.js +1 -1
  268. package/dist/components/practice-results/index.js +1 -1
  269. package/dist/components/pregnancy-dating/index.js +1 -1
  270. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  271. package/dist/components/privacy-lock/index.js +1 -1
  272. package/dist/components/product-hub-tray/index.js +1 -1
  273. package/dist/components/public-header/index.js +1 -1
  274. package/dist/components/radiograph-panel/index.js +1 -1
  275. package/dist/components/reviews-panel/index.js +1 -1
  276. package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -0
  277. package/dist/components/rich-text-editor/index.js +2 -2
  278. package/dist/components/row-actions/index.js +1 -1
  279. package/dist/components/session-countdown/index.js +1 -1
  280. package/dist/components/sheet/index.js +1 -1
  281. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  282. package/dist/components/slot-grid/index.js +1 -1
  283. package/dist/components/sms-code-entry/index.js +1 -1
  284. package/dist/components/specialty-list/index.js +1 -1
  285. package/dist/components/step-up-dialog/index.js +1 -1
  286. package/dist/components/streaming-text/index.js +1 -1
  287. package/dist/components/sync-tray/index.js +1 -1
  288. package/dist/components/task-editor/index.js +1 -1
  289. package/dist/components/task-tray/index.js +1 -1
  290. package/dist/components/tasks-panel/index.js +1 -1
  291. package/dist/components/theme-toggle/index.js +1 -1
  292. package/dist/components/toast/index.js +1 -1
  293. package/dist/components/token-insert-menu/index.js +1 -1
  294. package/dist/components/tool-rail/index.js +1 -1
  295. package/dist/components/tooth-scheme/index.js +1 -1
  296. package/dist/components/unit-converter/index.js +1 -1
  297. package/dist/components/voice-control-panel/index.js +1 -1
  298. package/dist/components/warning-stack/index.js +1 -1
  299. package/dist/components/week-availability/index.js +1 -1
  300. package/dist/components/weekly-hours-editor/index.js +1 -1
  301. package/dist/components/workflow/index.js +1 -1
  302. package/dist/core.css +1 -1
  303. package/dist/find-free-slots-panel/index.js +1 -1
  304. package/dist/host-calendar-selection.css +89 -0
  305. package/dist/index.js +157 -157
  306. package/dist/online-bookings-panel/index.js +2 -2
  307. package/dist/patterns/alia-assistant/index.js +1 -1
  308. package/dist/patterns/anamnesis/index.js +1 -1
  309. package/dist/patterns/calendar/index.js +4 -4
  310. package/dist/patterns/check-in-documents/index.js +1 -1
  311. package/dist/patterns/error-page/index.js +1 -1
  312. package/dist/patterns/forgot-password-form/index.js +1 -1
  313. package/dist/patterns/help-me-write-templates/index.js +2 -2
  314. package/dist/patterns/login-form/index.js +1 -1
  315. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  316. package/dist/patterns/patient-account-settings/index.js +1 -1
  317. package/dist/patterns/patient-check-in/index.js +1 -1
  318. package/dist/patterns/patient-portal/index.js +2 -2
  319. package/dist/patterns/patient-sign-in/index.js +2 -2
  320. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  321. package/dist/patterns/prescription/index.js +1 -1
  322. package/dist/patterns/registration-form/index.js +1 -1
  323. package/dist/patterns/reset-password-form/index.js +1 -1
  324. package/dist/patterns/send-registration-link-form/index.js +1 -1
  325. package/dist/patterns/signature-request/index.js +1 -1
  326. package/dist/patterns/signed-out-frame/index.js +1 -1
  327. package/dist/patterns/signing/index.js +1 -1
  328. package/dist/patterns/verify-identity/index.js +1 -1
  329. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  330. package/dist/tokens.css +1 -1
  331. package/dist/waiting-list-panel/index.js +4 -4
  332. package/package.json +7 -2
@@ -1,46 +1,46 @@
1
- import { jsx as t, jsxs as C, Fragment as De } from "react/jsx-runtime";
2
- import { useId as je, useState as E, useRef as x, useCallback as k, useEffect as I, Fragment as vt, useLayoutEffect as ti, forwardRef as ni, useMemo as gt, useImperativeHandle as ri } from "react";
1
+ import { jsx as t, jsxs as A, Fragment as qe } from "react/jsx-runtime";
2
+ import { useId as je, useState as E, useRef as C, useCallback as w, useEffect as I, Fragment as vt, useLayoutEffect as ti, forwardRef as ni, useMemo as gt, useImperativeHandle as ri } from "react";
3
3
  import { c as yt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ie } from "react-i18next";
4
+ import { useTranslation as ae } from "react-i18next";
5
5
  import { SafeHtml as oi, sanitiseHtml as ii } from "../safe-html/index.js";
6
6
  import { a as ai, c as si, d as li, b as Yr } from "./ai-fab-pill-BOu96kCx.js";
7
7
  import { u as ci } from "./registry-DvAUVLHh.js";
8
8
  import { u as di } from "./use-ai-sparkle-Cf4yVTLB.js";
9
- import { S as Kn } from "./spinner-CoflYlEx.js";
9
+ import { S as Vn } from "./spinner-CoflYlEx.js";
10
10
  import { A as ui } from "./ai-sparkle-D23NT8Z_.js";
11
- import { B as Ne } from "./button-DohK_Ak_.js";
12
- import { I as W } from "./icon-button-S8_weU3g.js";
13
- import { A as mi } from "./ai-permission-notice-CEDEWE2-.js";
11
+ import { B as Ee } from "./button-Dp4j9ygh.js";
12
+ import { I as U } from "./icon-button-u9VMQn3x.js";
13
+ import { A as mi } from "./ai-permission-notice-C_YB3MBA.js";
14
14
  import { T as fi } from "./text-area-COMVJ1yE.js";
15
- import { E as Dn } from "./editor-overlay-Dc8uVxEp.js";
15
+ import { E as Dn } from "./editor-overlay-Cl6IhKNG.js";
16
16
  import { u as gi } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
17
17
  import { X as hi } from "./x-B5YnXwCz.js";
18
18
  import { R as pi } from "./rotate-ccw-BBQnIVTr.js";
19
19
  import { C as bi } from "./check-DrFSN__t.js";
20
- import { S as zt } from "./square-DASBRZ0U.js";
20
+ import { S as St } from "./square-DASBRZ0U.js";
21
21
  import { M as qn } from "./mic-CUklMZGF.js";
22
22
  import { S as vi } from "./send-C5kDJ-Mz.js";
23
23
  import { D as G } from "./dropdown-menu-Bm1KALnk.js";
24
24
  import * as rn from "@radix-ui/react-popover";
25
25
  import { u as yi, f as wi } from "./non-modal-tab-exit-DqJao_E-.js";
26
26
  import { V as eo } from "./variables-menu-C4NcClKi.js";
27
- import { a as Vn } from "./tooltip-uEBdD1-5.js";
28
- import { P as oe } from "./popover-CkvP3rHZ.js";
27
+ import { a as Wn } from "./tooltip-uEBdD1-5.js";
28
+ import { P as ie } from "./popover-C9O7my6h.js";
29
29
  import { D as le } from "./dialog-239Geb7Z.js";
30
- import { C as Wn } from "./color-picker-5FKOk_z1.js";
30
+ import { C as Xn } from "./color-picker-5FKOk_z1.js";
31
31
  import { S as cn } from "./state-backed-text-input-DVETOhSS.js";
32
32
  import { C as ki } from "./checkbox-DV4sNDeB.js";
33
33
  import { F as xi } from "./file-upload-DQc0LsBM.js";
34
- import { c as $ } from "./createLucideIcon-DhHxpK9K.js";
34
+ import { c as H } from "./createLucideIcon-DhHxpK9K.js";
35
35
  import { E as Ci } from "./ellipsis-dRo9ouSU.js";
36
36
  import { H as Ai } from "./highlighter-DSkckT2Q.js";
37
- import { C as Xn } from "./chevron-down-DWE7GSq9.js";
37
+ import { C as Un } from "./chevron-down-DWE7GSq9.js";
38
38
  import { I as Ni } from "./image-B_5MNK0x.js";
39
39
  import { P as Ti } from "./plus-DzMQ_c6b.js";
40
40
  import { S as Ei } from "./settings-d25ju_6L.js";
41
41
  import { U as Ri } from "./undo-2-EBxWjj1W.js";
42
42
  import { T as Mi } from "./trash-2-uumy3fy1.js";
43
- import { u as zi, w as ht } from "./ai-credits-notice-D_Zm_N2A.js";
43
+ import { u as zi, w as ht } from "./ai-credits-notice-B6buIgmV.js";
44
44
  /**
45
45
  * @license lucide-react v1.22.0 - ISC
46
46
  *
@@ -51,7 +51,7 @@ const Si = [
51
51
  ["path", { d: "M4 20h16", key: "14thso" }],
52
52
  ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
53
53
  ["path", { d: "M8 12h8", key: "1wcyev" }]
54
- ], Li = $("baseline", Si);
54
+ ], Li = H("baseline", Si);
55
55
  /**
56
56
  * @license lucide-react v1.22.0 - ISC
57
57
  *
@@ -62,7 +62,7 @@ const _i = [
62
62
  ["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
63
63
  ["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
64
64
  ["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
65
- ], Ii = $("between-horizontal-end", _i);
65
+ ], Ii = H("between-horizontal-end", _i);
66
66
  /**
67
67
  * @license lucide-react v1.22.0 - ISC
68
68
  *
@@ -73,7 +73,7 @@ const $i = [
73
73
  ["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
74
74
  ["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
75
75
  ["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
76
- ], Hi = $("between-horizontal-start", $i);
76
+ ], Hi = H("between-horizontal-start", $i);
77
77
  /**
78
78
  * @license lucide-react v1.22.0 - ISC
79
79
  *
@@ -84,7 +84,7 @@ const Oi = [
84
84
  ["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
85
85
  ["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
86
86
  ["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
87
- ], Di = $("between-vertical-end", Oi);
87
+ ], Di = H("between-vertical-end", Oi);
88
88
  /**
89
89
  * @license lucide-react v1.22.0 - ISC
90
90
  *
@@ -95,7 +95,7 @@ const qi = [
95
95
  ["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
96
96
  ["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
97
97
  ["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
98
- ], Pi = $("between-vertical-start", qi);
98
+ ], Pi = H("between-vertical-start", qi);
99
99
  /**
100
100
  * @license lucide-react v1.22.0 - ISC
101
101
  *
@@ -111,7 +111,7 @@ const Bi = [
111
111
  }
112
112
  ],
113
113
  ["rect", { x: "14", y: "2", width: "8", height: "8", rx: "1", key: "88lufb" }]
114
- ], Pn = $("blocks", Bi);
114
+ ], Pn = H("blocks", Bi);
115
115
  /**
116
116
  * @license lucide-react v1.22.0 - ISC
117
117
  *
@@ -123,7 +123,7 @@ const Fi = [
123
123
  "path",
124
124
  { 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" }
125
125
  ]
126
- ], ji = $("bold", Fi);
126
+ ], ji = H("bold", Fi);
127
127
  /**
128
128
  * @license lucide-react v1.22.0 - ISC
129
129
  *
@@ -142,7 +142,7 @@ const Gi = [
142
142
  key: "e1hn23"
143
143
  }
144
144
  ]
145
- ], Ki = $("braces", Gi);
145
+ ], Ki = H("braces", Gi);
146
146
  /**
147
147
  * @license lucide-react v1.22.0 - ISC
148
148
  *
@@ -152,7 +152,7 @@ const Gi = [
152
152
  const Vi = [
153
153
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
154
154
  ["path", { d: "M12 3v18", key: "108xh3" }]
155
- ], Wi = $("columns-2", Vi);
155
+ ], Wi = H("columns-2", Vi);
156
156
  /**
157
157
  * @license lucide-react v1.22.0 - ISC
158
158
  *
@@ -164,7 +164,7 @@ const Xi = [
164
164
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
165
165
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
166
166
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
167
- ], Ui = $("heading-2", Xi);
167
+ ], Ui = H("heading-2", Xi);
168
168
  /**
169
169
  * @license lucide-react v1.22.0 - ISC
170
170
  *
@@ -177,7 +177,7 @@ const Zi = [
177
177
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
178
178
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
179
179
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
180
- ], Qi = $("heading-3", Zi);
180
+ ], Qi = H("heading-3", Zi);
181
181
  /**
182
182
  * @license lucide-react v1.22.0 - ISC
183
183
  *
@@ -188,7 +188,7 @@ const Ji = [
188
188
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
189
189
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
190
190
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
191
- ], Yi = $("italic", Ji);
191
+ ], Yi = H("italic", Ji);
192
192
  /**
193
193
  * @license lucide-react v1.22.0 - ISC
194
194
  *
@@ -198,7 +198,7 @@ const Ji = [
198
198
  const ea = [
199
199
  ["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" }],
200
200
  ["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" }]
201
- ], ta = $("link", ea);
201
+ ], ta = H("link", ea);
202
202
  /**
203
203
  * @license lucide-react v1.22.0 - ISC
204
204
  *
@@ -212,7 +212,7 @@ const na = [
212
212
  ["path", { d: "M4 4h1v5", key: "10yrso" }],
213
213
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
214
214
  ["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" }]
215
- ], ra = $("list-ordered", na);
215
+ ], ra = H("list-ordered", na);
216
216
  /**
217
217
  * @license lucide-react v1.22.0 - ISC
218
218
  *
@@ -226,7 +226,7 @@ const oa = [
226
226
  ["path", { d: "M8 5h13", key: "1pao27" }],
227
227
  ["path", { d: "M8 12h13", key: "1za7za" }],
228
228
  ["path", { d: "M8 19h13", key: "m83p4d" }]
229
- ], ia = $("list", oa);
229
+ ], ia = H("list", oa);
230
230
  /**
231
231
  * @license lucide-react v1.22.0 - ISC
232
232
  *
@@ -250,7 +250,7 @@ const aa = [
250
250
  key: "1nk1rd"
251
251
  }
252
252
  ]
253
- ], sa = $("paint-bucket", aa);
253
+ ], sa = H("paint-bucket", aa);
254
254
  /**
255
255
  * @license lucide-react v1.22.0 - ISC
256
256
  *
@@ -261,7 +261,7 @@ const la = [
261
261
  ["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
262
262
  ["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" }],
263
263
  ["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
264
- ], ca = $("paint-roller", la);
264
+ ], ca = H("paint-roller", la);
265
265
  /**
266
266
  * @license lucide-react v1.22.0 - ISC
267
267
  *
@@ -280,7 +280,7 @@ const da = [
280
280
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
281
281
  ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
282
282
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
283
- ], ua = $("palette", da);
283
+ ], ua = H("palette", da);
284
284
  /**
285
285
  * @license lucide-react v1.22.0 - ISC
286
286
  *
@@ -290,7 +290,7 @@ const da = [
290
290
  const ma = [
291
291
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
292
292
  ["path", { d: "M9 3v18", key: "fh3hqa" }]
293
- ], fa = $("panel-left", ma);
293
+ ], fa = H("panel-left", ma);
294
294
  /**
295
295
  * @license lucide-react v1.22.0 - ISC
296
296
  *
@@ -300,7 +300,7 @@ const ma = [
300
300
  const ga = [
301
301
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
302
302
  ["path", { d: "M15 3v18", key: "14nvp0" }]
303
- ], ha = $("panel-right", ga);
303
+ ], ha = H("panel-right", ga);
304
304
  /**
305
305
  * @license lucide-react v1.22.0 - ISC
306
306
  *
@@ -313,7 +313,7 @@ const pa = [
313
313
  ["path", { d: "M19 9h2", key: "te2zfg" }],
314
314
  ["path", { d: "M3 9h2", key: "1h4ldw" }],
315
315
  ["path", { d: "M9 9h1", key: "15jzuz" }]
316
- ], ba = $("panel-top-dashed", pa);
316
+ ], ba = H("panel-top-dashed", pa);
317
317
  /**
318
318
  * @license lucide-react v1.22.0 - ISC
319
319
  *
@@ -323,7 +323,7 @@ const pa = [
323
323
  const va = [
324
324
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
325
325
  ["path", { d: "M3 9h18", key: "1pudct" }]
326
- ], ya = $("panel-top", va);
326
+ ], ya = H("panel-top", va);
327
327
  /**
328
328
  * @license lucide-react v1.22.0 - ISC
329
329
  *
@@ -345,7 +345,7 @@ const wa = [
345
345
  ["path", { d: "M4 5v4", key: "13jjxc" }],
346
346
  ["path", { d: "M6 7H2", key: "8zbtv0" }],
347
347
  ["path", { d: "M9 2v2", key: "165o2o" }]
348
- ], Ir = $("pencil-sparkles", wa);
348
+ ], $r = H("pencil-sparkles", wa);
349
349
  /**
350
350
  * @license lucide-react v1.22.0 - ISC
351
351
  *
@@ -356,7 +356,7 @@ const ka = [
356
356
  ["path", { d: "M13 4v16", key: "8vvj80" }],
357
357
  ["path", { d: "M17 4v16", key: "7dpous" }],
358
358
  ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
359
- ], xa = $("pilcrow", ka);
359
+ ], xa = H("pilcrow", ka);
360
360
  /**
361
361
  * @license lucide-react v1.22.0 - ISC
362
362
  *
@@ -378,7 +378,7 @@ const Ca = [
378
378
  key: "1ymkrd"
379
379
  }
380
380
  ]
381
- ], Aa = $("quote", Ca);
381
+ ], Aa = H("quote", Ca);
382
382
  /**
383
383
  * @license lucide-react v1.22.0 - ISC
384
384
  *
@@ -388,7 +388,7 @@ const Ca = [
388
388
  const Na = [
389
389
  ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
390
390
  ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
391
- ], Ta = $("redo-2", Na);
391
+ ], Ta = H("redo-2", Na);
392
392
  /**
393
393
  * @license lucide-react v1.22.0 - ISC
394
394
  *
@@ -398,7 +398,7 @@ const Na = [
398
398
  const Ea = [
399
399
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
400
400
  ["path", { d: "M3 12h18", key: "1i2n21" }]
401
- ], Ra = $("rows-2", Ea);
401
+ ], Ra = H("rows-2", Ea);
402
402
  /**
403
403
  * @license lucide-react v1.22.0 - ISC
404
404
  *
@@ -409,7 +409,7 @@ const Ma = [
409
409
  ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
410
410
  ["path", { d: "M8 12h8", key: "1wcyev" }],
411
411
  ["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
412
- ], $r = $("spell-check", Ma);
412
+ ], Hr = H("spell-check", Ma);
413
413
  /**
414
414
  * @license lucide-react v1.22.0 - ISC
415
415
  *
@@ -420,7 +420,7 @@ const za = [
420
420
  ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
421
421
  ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
422
422
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
423
- ], Sa = $("strikethrough", za);
423
+ ], Sa = H("strikethrough", za);
424
424
  /**
425
425
  * @license lucide-react v1.22.0 - ISC
426
426
  *
@@ -432,7 +432,7 @@ const La = [
432
432
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
433
433
  ["path", { d: "M3 9h18", key: "1pudct" }],
434
434
  ["path", { d: "M3 15h18", key: "5xshup" }]
435
- ], _a = $("table", La);
435
+ ], _a = H("table", La);
436
436
  /**
437
437
  * @license lucide-react v1.22.0 - ISC
438
438
  *
@@ -443,7 +443,7 @@ const Ia = [
443
443
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
444
444
  ["path", { d: "M17 12H7", key: "16if0g" }],
445
445
  ["path", { d: "M19 19H5", key: "vjpgq2" }]
446
- ], to = $("text-align-center", Ia);
446
+ ], to = H("text-align-center", Ia);
447
447
  /**
448
448
  * @license lucide-react v1.22.0 - ISC
449
449
  *
@@ -454,7 +454,7 @@ const $a = [
454
454
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
455
455
  ["path", { d: "M21 12H9", key: "dn1m92" }],
456
456
  ["path", { d: "M21 19H7", key: "4cu937" }]
457
- ], no = $("text-align-end", $a);
457
+ ], no = H("text-align-end", $a);
458
458
  /**
459
459
  * @license lucide-react v1.22.0 - ISC
460
460
  *
@@ -465,7 +465,7 @@ const Ha = [
465
465
  ["path", { d: "M3 5h18", key: "1u36vt" }],
466
466
  ["path", { d: "M3 12h18", key: "1i2n21" }],
467
467
  ["path", { d: "M3 19h18", key: "awlh7x" }]
468
- ], Oa = $("text-align-justify", Ha);
468
+ ], Oa = H("text-align-justify", Ha);
469
469
  /**
470
470
  * @license lucide-react v1.22.0 - ISC
471
471
  *
@@ -476,7 +476,7 @@ const Da = [
476
476
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
477
477
  ["path", { d: "M15 12H3", key: "6jk70r" }],
478
478
  ["path", { d: "M17 19H3", key: "z6ezky" }]
479
- ], ro = $("text-align-start", Da);
479
+ ], ro = H("text-align-start", Da);
480
480
  /**
481
481
  * @license lucide-react v1.22.0 - ISC
482
482
  *
@@ -487,7 +487,7 @@ const qa = [
487
487
  ["rect", { width: "18", height: "12", x: "3", y: "8", rx: "1", key: "158fvp" }],
488
488
  ["path", { d: "M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3", key: "s0042v" }],
489
489
  ["path", { d: "M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3", key: "9wmeh2" }]
490
- ], Bn = $("toy-brick", qa);
490
+ ], Bn = H("toy-brick", qa);
491
491
  /**
492
492
  * @license lucide-react v1.22.0 - ISC
493
493
  *
@@ -497,7 +497,7 @@ const qa = [
497
497
  const Pa = [
498
498
  ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
499
499
  ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
500
- ], Ba = $("underline", Pa);
500
+ ], Ba = H("underline", Pa);
501
501
  /**
502
502
  * @license lucide-react v1.22.0 - ISC
503
503
  *
@@ -519,8 +519,8 @@ const Fa = [
519
519
  ["path", { d: "M7 8H3", key: "zfb6yr" }],
520
520
  ["path", { d: "M21 16h-4", key: "1cnmox" }],
521
521
  ["path", { d: "M11 3H9", key: "1obp7u" }]
522
- ], Hr = $("wand-sparkles", Fa);
523
- function Or(n) {
522
+ ], Or = H("wand-sparkles", Fa);
523
+ function Dr(n) {
524
524
  return {
525
525
  format: n("editor.vendor.format"),
526
526
  image: n("editor.vendor.image"),
@@ -740,16 +740,16 @@ const ja = {
740
740
  description: "Sourced from the id prop."
741
741
  }
742
742
  }
743
- }, Ga = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", pt = "ds:!size-[var(--min-target-size)]", Ka = 384, Va = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", Dr = yt("ds:flex ds:gap-[var(--spacing-sm)]", {
743
+ }, Ga = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", pt = "ds:!size-[var(--min-target-size)]", Ka = 384, Va = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", qr = yt("ds:flex ds:gap-[var(--spacing-sm)]", {
744
744
  variants: { stacked: { true: "ds:flex-col", false: "ds:items-center" } }
745
- }), qr = yt("ds:min-w-0", {
745
+ }), Pr = yt("ds:min-w-0", {
746
746
  variants: { stacked: { true: "", false: "ds:flex-1" } }
747
- }), Pr = yt(
747
+ }), Br = yt(
748
748
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
749
749
  { variants: { stacked: { true: "ds:justify-end", false: "" } } }
750
750
  ), Wa = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Xa = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]";
751
751
  function oo({ id: n }) {
752
- const { t: a } = ie("ui");
752
+ const { t: a } = ae("ui");
753
753
  return /* @__PURE__ */ t(
754
754
  "p",
755
755
  {
@@ -761,7 +761,7 @@ function oo({ id: n }) {
761
761
  }
762
762
  );
763
763
  }
764
- const Br = [
764
+ const Fr = [
765
765
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
766
766
  "ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
767
767
  "ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
@@ -775,7 +775,7 @@ const Br = [
775
775
  "ds:[&_ul]:list-disc ds:[&_ol]:list-decimal",
776
776
  "ds:[&_ul]:ps-[var(--spacing-md)] ds:[&_ol]:ps-[var(--spacing-md)]"
777
777
  ].join(" ");
778
- function Fr(n, a) {
778
+ function jr(n, a) {
779
779
  return a ? n ? /\s$/.test(n) ? `${n}${a}` : `${n} ${a}` : a : n;
780
780
  }
781
781
  function Ua({
@@ -784,80 +784,80 @@ function Ua({
784
784
  onRequestAiDraft: d,
785
785
  onInsert: l,
786
786
  previewAsHtml: p = !0,
787
- privacyNotice: g,
787
+ privacyNotice: h,
788
788
  onDictate: b
789
789
  }) {
790
- const { t: f } = ie("ui"), y = je(), A = je(), [w, N] = E(""), [z, R] = E(!1), [q, m] = E(!1), [u, h] = E(null), L = x(null), [M, P] = E(!1), [U, O] = E(""), [F, T] = E(""), J = x(null), j = x(null), Z = k((B = !1) => {
791
- var K;
792
- j.current && (j.current.keepLate = B), (K = J.current) == null || K.abort();
793
- }, []), pe = k(() => {
790
+ const { t: g } = ae("ui"), y = je(), N = je(), [k, T] = E(""), [S, z] = E(!1), [D, f] = E(!1), [u, v] = E(null), M = C(null), [L, O] = E(!1), [W, j] = E(""), [P, x] = E(""), Q = C(null), K = C(null), Y = w((B = !1) => {
791
+ var X;
792
+ K.current && (K.current.keepLate = B), (X = Q.current) == null || X.abort();
793
+ }, []), se = w(() => {
794
794
  if (!b) return;
795
795
  const B = new AbortController();
796
- J.current = B;
797
- const K = { keepLate: !1 };
798
- j.current = K;
799
- let Ee = !1;
800
- const me = () => !Ee && (!B.signal.aborted || K.keepLate);
801
- P(!0), O(""), T(f("editor.ai.listening")), b({
796
+ Q.current = B;
797
+ const X = { keepLate: !1 };
798
+ K.current = X;
799
+ let Me = !1;
800
+ const ge = () => !Me && (!B.signal.aborted || X.keepLate);
801
+ O(!0), j(""), x(g("editor.ai.listening")), b({
802
802
  signal: B.signal,
803
803
  onPartialTranscript: (_) => {
804
- me() && O(_);
804
+ ge() && j(_);
805
805
  },
806
806
  onFinalTranscript: (_) => {
807
- if (!me()) return;
807
+ if (!ge()) return;
808
808
  const it = _.trim();
809
- O(""), it && (N((_t) => Fr(_t, it)), T(it));
809
+ j(""), it && (T((It) => jr(It, it)), x(it));
810
810
  }
811
811
  }).catch(() => {
812
812
  }).finally(() => {
813
- Ee = !0, O(""), J.current === B && (J.current = null, j.current = null, P(!1), T(""));
813
+ Me = !0, j(""), Q.current === B && (Q.current = null, K.current = null, O(!1), x(""));
814
814
  });
815
- }, [b, f]), Y = k(() => {
816
- M ? Z(!0) : pe();
817
- }, [M, pe, Z]);
815
+ }, [b, g]), te = w(() => {
816
+ L ? Y(!0) : se();
817
+ }, [L, se, Y]);
818
818
  I(() => {
819
- var B, K;
820
- n ? (N(""), R(!1), m(!1), h(null), O(""), T("")) : ((B = L.current) == null || B.abort(), L.current = null, (K = J.current) == null || K.abort());
819
+ var B, X;
820
+ n ? (T(""), z(!1), f(!1), v(null), j(""), x("")) : ((B = M.current) == null || B.abort(), M.current = null, (X = Q.current) == null || X.abort());
821
821
  }, [n]), I(
822
822
  () => () => {
823
- var B, K;
824
- (B = L.current) == null || B.abort(), (K = J.current) == null || K.abort();
823
+ var B, X;
824
+ (B = M.current) == null || B.abort(), (X = Q.current) == null || X.abort();
825
825
  },
826
826
  []
827
827
  );
828
- const Te = k(() => {
829
- var Ee;
830
- const B = w.trim();
831
- if (!B || z) return;
832
- Z(), (Ee = L.current) == null || Ee.abort();
833
- const K = new AbortController();
834
- L.current = K, m(!1), R(!0), d({ prompt: B, signal: K.signal }).then((me) => {
835
- K.signal.aborted || (h(me), R(!1));
836
- }).catch((me) => {
837
- K.signal.aborted || me && typeof me == "object" && "name" in me && me.name === "AbortError" || (m(!0), R(!1));
828
+ const Ae = w(() => {
829
+ var Me;
830
+ const B = k.trim();
831
+ if (!B || S) return;
832
+ Y(), (Me = M.current) == null || Me.abort();
833
+ const X = new AbortController();
834
+ M.current = X, f(!1), z(!0), d({ prompt: B, signal: X.signal }).then((ge) => {
835
+ X.signal.aborted || (v(ge), z(!1));
836
+ }).catch((ge) => {
837
+ X.signal.aborted || ge && typeof ge == "object" && "name" in ge && ge.name === "AbortError" || (f(!0), z(!1));
838
838
  });
839
- }, [w, z, d, Z]), X = k(() => {
839
+ }, [k, S, d, Y]), J = w(() => {
840
840
  u != null && (l(u), a());
841
- }, [u, l, a]), ze = x(null), [D, ae] = E(!1);
841
+ }, [u, l, a]), Re = C(null), [q, ne] = E(!1);
842
842
  gi(() => {
843
- const B = ze.current;
843
+ const B = Re.current;
844
844
  if (!n || !B) return;
845
- const K = () => {
846
- const me = B.clientWidth;
847
- ae(me > 0 && me < Ka);
845
+ const X = () => {
846
+ const ge = B.clientWidth;
847
+ ne(ge > 0 && ge < Ka);
848
848
  };
849
- if (K(), typeof ResizeObserver > "u") return;
850
- const Ee = new ResizeObserver(K);
851
- return Ee.observe(B), () => Ee.disconnect();
849
+ if (X(), typeof ResizeObserver > "u") return;
850
+ const Me = new ResizeObserver(X);
851
+ return Me.observe(B), () => Me.disconnect();
852
852
  }, [n]);
853
- const se = u != null, qe = M ? Fr(w, U) : w, ot = D ? null : /* @__PURE__ */ t(
854
- W,
853
+ const ce = u != null, Ne = L ? jr(k, W) : k, ot = q ? null : /* @__PURE__ */ t(
854
+ U,
855
855
  {
856
856
  size: "md",
857
857
  intent: "outline",
858
858
  className: pt,
859
859
  icon: /* @__PURE__ */ t(hi, {}),
860
- "aria-label": f("common.close"),
860
+ "aria-label": g("common.close"),
861
861
  onClick: a
862
862
  }
863
863
  );
@@ -866,18 +866,18 @@ function Ua({
866
866
  {
867
867
  open: n,
868
868
  onClose: a,
869
- title: D ? f("editor.ai.dialogTitle") : void 0,
870
- ariaLabel: f("editor.ai.dialogTitle"),
871
- children: /* @__PURE__ */ t("div", { ref: ze, className: Va, children: se ? /* @__PURE__ */ C("div", { className: Dr({ stacked: D }), children: [
869
+ title: q ? g("editor.ai.dialogTitle") : void 0,
870
+ ariaLabel: g("editor.ai.dialogTitle"),
871
+ children: /* @__PURE__ */ t("div", { ref: Re, className: Va, children: ce ? /* @__PURE__ */ A("div", { className: qr({ stacked: q }), children: [
872
872
  ot,
873
- /* @__PURE__ */ t("div", { className: qr({ stacked: D }), children: p ? /* @__PURE__ */ t(
873
+ /* @__PURE__ */ t("div", { className: Pr({ stacked: q }), children: p ? /* @__PURE__ */ t(
874
874
  oi,
875
875
  {
876
876
  html: u,
877
877
  profile: "rich-text",
878
- className: Br,
878
+ className: Fr,
879
879
  tabIndex: 0,
880
- "aria-label": f("editor.ai.dialogTitle")
880
+ "aria-label": g("editor.ai.dialogTitle")
881
881
  }
882
882
  ) : (
883
883
  // Focusable so a keyboard user can scroll a long draft preview
@@ -885,82 +885,82 @@ function Ua({
885
885
  // tabIndex allowlist doesn't cover a scrollable, non-interactive
886
886
  // text region.
887
887
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
888
- /* @__PURE__ */ t("p", { className: Br, tabIndex: 0, children: u })
888
+ /* @__PURE__ */ t("p", { className: Fr, tabIndex: 0, children: u })
889
889
  ) }),
890
- /* @__PURE__ */ C("div", { className: Pr({ stacked: D }), children: [
890
+ /* @__PURE__ */ A("div", { className: Br({ stacked: q }), children: [
891
891
  /* @__PURE__ */ t(
892
- W,
892
+ U,
893
893
  {
894
894
  size: "md",
895
895
  intent: "outline",
896
896
  className: `${pt} ds:rounded-full`,
897
897
  icon: /* @__PURE__ */ t(pi, {}),
898
- "aria-label": f("editor.ai.retry"),
899
- onClick: () => h(null)
898
+ "aria-label": g("editor.ai.retry"),
899
+ onClick: () => v(null)
900
900
  }
901
901
  ),
902
902
  /* @__PURE__ */ t(
903
- W,
903
+ U,
904
904
  {
905
905
  size: "md",
906
906
  intent: "primary",
907
907
  className: `${pt} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
908
908
  icon: /* @__PURE__ */ t(bi, {}),
909
- "aria-label": f("common.confirm"),
910
- onClick: X
909
+ "aria-label": g("common.confirm"),
910
+ onClick: J
911
911
  }
912
912
  )
913
913
  ] })
914
- ] }) : /* @__PURE__ */ C(De, { children: [
915
- /* @__PURE__ */ C("div", { className: Dr({ stacked: D }), children: [
914
+ ] }) : /* @__PURE__ */ A(qe, { children: [
915
+ /* @__PURE__ */ A("div", { className: qr({ stacked: q }), children: [
916
916
  ot,
917
- /* @__PURE__ */ t("div", { className: qr({ stacked: D }), children: /* @__PURE__ */ t(
917
+ /* @__PURE__ */ t("div", { className: Pr({ stacked: q }), children: /* @__PURE__ */ t(
918
918
  fi,
919
919
  {
920
920
  id: y,
921
921
  size: "md",
922
- value: qe,
923
- onChange: (B) => N(B.target.value),
924
- placeholder: f("editor.ai.promptPlaceholder"),
925
- "aria-label": f("editor.ai.promptLabel"),
922
+ value: Ne,
923
+ onChange: (B) => T(B.target.value),
924
+ placeholder: g("editor.ai.promptPlaceholder"),
925
+ "aria-label": g("editor.ai.promptLabel"),
926
926
  autoResize: !0,
927
927
  minRows: 1,
928
928
  maxRows: 3,
929
- readOnly: M,
930
- tone: q ? "error" : "default",
931
- "aria-describedby": q ? A : void 0
929
+ readOnly: L,
930
+ tone: D ? "error" : "default",
931
+ "aria-describedby": D ? N : void 0
932
932
  }
933
933
  ) }),
934
- /* @__PURE__ */ C("div", { className: Pr({ stacked: D }), children: [
934
+ /* @__PURE__ */ A("div", { className: Br({ stacked: q }), children: [
935
935
  b ? /* @__PURE__ */ t(
936
- W,
936
+ U,
937
937
  {
938
938
  size: "md",
939
939
  intent: "outline",
940
- className: M ? `${pt} ${Ga}` : pt,
941
- icon: M ? /* @__PURE__ */ t(zt, { className: "ds:fill-current" }) : /* @__PURE__ */ t(qn, {}),
942
- "aria-pressed": M,
943
- "aria-label": f(M ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
944
- onClick: Y
940
+ className: L ? `${pt} ${Ga}` : pt,
941
+ icon: L ? /* @__PURE__ */ t(St, { className: "ds:fill-current" }) : /* @__PURE__ */ t(qn, {}),
942
+ "aria-pressed": L,
943
+ "aria-label": g(L ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
944
+ onClick: te
945
945
  }
946
946
  ) : null,
947
947
  /* @__PURE__ */ t(
948
- W,
948
+ U,
949
949
  {
950
950
  size: "md",
951
951
  intent: "primary",
952
- icon: z ? /* @__PURE__ */ t(Kn, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ t(vi, {}),
952
+ icon: S ? /* @__PURE__ */ t(Vn, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ t(vi, {}),
953
953
  className: `${pt} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
954
- disabled: z || !w.trim(),
955
- "aria-busy": z || void 0,
956
- "aria-label": f("editor.ai.generate"),
957
- onClick: Te
954
+ disabled: S || !k.trim(),
955
+ "aria-busy": S || void 0,
956
+ "aria-label": g("editor.ai.generate"),
957
+ onClick: Ae
958
958
  }
959
959
  )
960
960
  ] })
961
961
  ] }),
962
- b ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: F }) : null,
963
- q ? /* @__PURE__ */ t(oo, { id: A }) : g ? /* @__PURE__ */ t("p", { className: Wa, children: g }) : null
962
+ b ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: P }) : null,
963
+ D ? /* @__PURE__ */ t(oo, { id: N }) : h ? /* @__PURE__ */ t("p", { className: Wa, children: h }) : null
964
964
  ] }) })
965
965
  }
966
966
  );
@@ -1071,7 +1071,7 @@ const ao = {
1071
1071
  icon: /* @__PURE__ */ t(Oa, {}),
1072
1072
  label: ["editor.align.justify", "Justify"]
1073
1073
  }
1074
- ], jr = [
1074
+ ], Fn = [
1075
1075
  "p",
1076
1076
  "div",
1077
1077
  "blockquote",
@@ -1174,32 +1174,36 @@ const ao = {
1174
1174
  "ds:shadow-[var(--shadow-md)]",
1175
1175
  lo
1176
1176
  ].join(" ")
1177
- ), Ja = "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", un = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", St = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
1177
+ ), Ja = "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", un = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", Lt = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
1178
1178
  function dn(n) {
1179
1179
  return n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1180
1180
  }
1181
- function Ya({
1181
+ function Ya(n) {
1182
+ const a = n.trim();
1183
+ return a && (/^([^\s/:@]+\.[^\s/:@]+|localhost):\d+([/?#]|$)/i.test(a) ? `https://${a}` : /^[a-z][a-z0-9+.-]*:/i.test(a) || /^[/#?]/.test(a) || a.startsWith("[[") ? a : /^[^\s@/]+@[^\s@/]+\.[^\s@/]+$/.test(a) ? `mailto:${a}` : `https://${a}`);
1184
+ }
1185
+ function es({
1182
1186
  variables: n,
1183
1187
  recentVariableTokens: a,
1184
1188
  insertVariable: d,
1185
1189
  saveSelection: l
1186
1190
  }) {
1187
- const { t: p } = ie("ui"), [g, b] = E(!1), [f, y] = E(""), A = x(null), w = x(!1), N = yi(!0, {
1191
+ const { t: p } = ae("ui"), [h, b] = E(!1), [g, y] = E(""), N = C(null), k = C(!1), T = yi(!0, {
1188
1192
  getAnchor: wi,
1189
1193
  onReturnToTrigger: () => b(!1)
1190
- }), z = n;
1191
- return /* @__PURE__ */ C(
1194
+ }), S = n;
1195
+ return /* @__PURE__ */ A(
1192
1196
  rn.Root,
1193
1197
  {
1194
- open: g,
1195
- onOpenChange: (R) => {
1196
- R && l(), b(R), R && y("");
1198
+ open: h,
1199
+ onOpenChange: (z) => {
1200
+ z && l(), b(z), z && y("");
1197
1201
  },
1198
1202
  children: [
1199
1203
  /* @__PURE__ */ t(rn.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1200
- W,
1204
+ U,
1201
1205
  {
1202
- ref: A,
1206
+ ref: N,
1203
1207
  size: "sm",
1204
1208
  intent: "ghost",
1205
1209
  icon: /* @__PURE__ */ t(Ki, {}),
@@ -1212,21 +1216,21 @@ function Ya({
1212
1216
  align: "start",
1213
1217
  sideOffset: 4,
1214
1218
  className: "ds:z-[var(--z-popover)]",
1215
- onKeyDown: N,
1216
- onCloseAutoFocus: (R) => {
1217
- w.current && (R.preventDefault(), w.current = !1);
1219
+ onKeyDown: T,
1220
+ onCloseAutoFocus: (z) => {
1221
+ k.current && (z.preventDefault(), k.current = !1);
1218
1222
  },
1219
1223
  children: /* @__PURE__ */ t(
1220
1224
  eo,
1221
1225
  {
1222
- variables: z,
1226
+ variables: S,
1223
1227
  recentTokens: a,
1224
- query: f,
1228
+ query: g,
1225
1229
  onQueryChange: y,
1226
1230
  searchFocusable: !0,
1227
1231
  "aria-label": p("editor.insertVariable", "Insert variable"),
1228
- onSelect: (R) => {
1229
- w.current = !0, d(R.token), b(!1);
1232
+ onSelect: (z) => {
1233
+ k.current = !0, d(z.token), b(!1);
1230
1234
  },
1231
1235
  onClose: () => b(!1)
1232
1236
  }
@@ -1237,20 +1241,20 @@ function Ya({
1237
1241
  }
1238
1242
  );
1239
1243
  }
1240
- function es({
1244
+ function ts({
1241
1245
  run: n,
1242
1246
  active: a,
1243
1247
  onTriggerDown: d
1244
1248
  }) {
1245
- const { t: l } = ie("ui"), p = Hn.find((g) => a.has(g.id)) ?? Hn[0];
1246
- return /* @__PURE__ */ C(G.Root, { children: [
1249
+ const { t: l } = ae("ui"), p = Hn.find((h) => a.has(h.id)) ?? Hn[0];
1250
+ return /* @__PURE__ */ A(G.Root, { children: [
1247
1251
  /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1248
- Ne,
1252
+ Ee,
1249
1253
  {
1250
1254
  size: "sm",
1251
1255
  intent: "ghost",
1252
1256
  startIcon: p.icon,
1253
- endIcon: /* @__PURE__ */ t(Xn, {}),
1257
+ endIcon: /* @__PURE__ */ t(Un, {}),
1254
1258
  "aria-label": `${l("editor.format", "Paragraph style")}: ${l(
1255
1259
  p.label[0],
1256
1260
  p.label[1]
@@ -1259,104 +1263,104 @@ function es({
1259
1263
  children: /* @__PURE__ */ t("span", { className: "ds:hidden ds:@[448px]/toolbar:inline", children: l(p.label[0], p.label[1]) })
1260
1264
  }
1261
1265
  ) }),
1262
- /* @__PURE__ */ t(G.Content, { align: "start", children: Hn.map((g) => /* @__PURE__ */ t(
1266
+ /* @__PURE__ */ t(G.Content, { align: "start", children: Hn.map((h) => /* @__PURE__ */ t(
1263
1267
  G.Item,
1264
1268
  {
1265
- startIcon: g.icon,
1266
- onSelect: () => n("module.block.format", { tag: g.tag }),
1267
- children: l(g.label[0], g.label[1])
1269
+ startIcon: h.icon,
1270
+ onSelect: () => n("module.block.format", { tag: h.tag }),
1271
+ children: l(h.label[0], h.label[1])
1268
1272
  },
1269
- g.id
1273
+ h.id
1270
1274
  )) })
1271
1275
  ] });
1272
1276
  }
1273
- function ts({
1277
+ function ns({
1274
1278
  run: n,
1275
1279
  active: a,
1276
1280
  onTriggerDown: d
1277
1281
  }) {
1278
- const { t: l } = ie("ui"), p = x(null), [g, b] = E(!1);
1282
+ const { t: l } = ae("ui"), p = C(null), [h, b] = E(!1);
1279
1283
  ti(() => {
1280
- const N = p.current;
1281
- N && b(getComputedStyle(N).direction === "rtl");
1284
+ const T = p.current;
1285
+ T && b(getComputedStyle(T).direction === "rtl");
1282
1286
  }, []);
1283
- const f = g ? "right" : "left", y = on.find((N) => a.has(`align-${N.id}`)) ?? on.find((N) => N.id === f) ?? on[0], A = (N) => {
1284
- N === f ? n("module.block.remove", { style: "text-align" }, jr) : n("module.block.add", { style: { "text-align": N } }, jr), N === f || N === "justify" ? n("module.block.remove", { style: "list-style-position" }, ["li"]) : n("module.block.add", { style: { "list-style-position": "inside" } }, [
1287
+ const g = h ? "right" : "left", y = on.find((T) => a.has(`align-${T.id}`)) ?? on.find((T) => T.id === g) ?? on[0], N = (T) => {
1288
+ T === g ? n("module.block.remove", { style: "text-align" }, Fn) : n("module.block.add", { style: { "text-align": T } }, Fn), T === g || T === "justify" ? n("module.block.remove", { style: "list-style-position" }, ["li"]) : n("module.block.add", { style: { "list-style-position": "inside" } }, [
1285
1289
  "li"
1286
1290
  ]);
1287
- }, w = `${l("editor.align.label", "Text alignment")}: ${l(
1291
+ }, k = `${l("editor.align.label", "Text alignment")}: ${l(
1288
1292
  y.label[0],
1289
1293
  y.label[1]
1290
1294
  )}`;
1291
- return /* @__PURE__ */ C(G.Root, { children: [
1295
+ return /* @__PURE__ */ A(G.Root, { children: [
1292
1296
  /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1293
- Ne,
1297
+ Ee,
1294
1298
  {
1295
1299
  ref: p,
1296
1300
  size: "sm",
1297
1301
  intent: "ghost",
1298
1302
  startIcon: y.icon,
1299
- endIcon: /* @__PURE__ */ t(Xn, {}),
1300
- "aria-label": w,
1303
+ endIcon: /* @__PURE__ */ t(Un, {}),
1304
+ "aria-label": k,
1301
1305
  onMouseDown: d
1302
1306
  }
1303
1307
  ) }),
1304
- /* @__PURE__ */ t(G.Content, { align: "start", children: /* @__PURE__ */ t(G.RadioGroup, { value: y.id, onValueChange: A, children: on.map((N) => /* @__PURE__ */ t(G.RadioItem, { value: N.id, children: l(N.label[0], N.label[1]) }, N.id)) }) })
1308
+ /* @__PURE__ */ t(G.Content, { align: "start", children: /* @__PURE__ */ t(G.RadioGroup, { value: y.id, onValueChange: N, children: on.map((T) => /* @__PURE__ */ t(G.RadioItem, { value: T.id, children: l(T.label[0], T.label[1]) }, T.id)) }) })
1305
1309
  ] });
1306
1310
  }
1307
- function ns({
1311
+ function rs({
1308
1312
  insertHtml: n,
1309
1313
  saveSelection: a,
1310
1314
  restoreSelection: d,
1311
1315
  getSelectedText: l
1312
1316
  }) {
1313
- const { t: p } = ie("ui"), [g, b] = E(!1), [f, y] = E(""), [A, w] = E(""), [N, z] = E(!1), R = je(), q = je(), m = () => {
1314
- y(""), w(""), z(!1);
1317
+ const { t: p } = ae("ui"), [h, b] = E(!1), [g, y] = E(""), [N, k] = E(""), [T, S] = E(!1), z = je(), D = je(), f = () => {
1318
+ y(""), k(""), S(!1);
1315
1319
  }, u = () => {
1316
- const h = f.trim();
1317
- if (!h) return;
1318
- const L = A.trim() || h, M = N ? ' target="_blank" rel="noopener noreferrer"' : "", P = `<a href="${dn(h)}"${M}>${dn(L)}</a>`;
1319
- b(!1), m(), window.requestAnimationFrame(() => {
1320
- d(), n(P);
1320
+ const v = g.trim();
1321
+ if (!v) return;
1322
+ const M = Ya(v), L = N.trim() || v, O = T ? ' target="_blank" rel="noopener noreferrer"' : "", W = `<a href="${dn(M)}"${O}>${dn(L)}</a>`;
1323
+ b(!1), f(), window.requestAnimationFrame(() => {
1324
+ d(), n(W);
1321
1325
  });
1322
1326
  };
1323
- return /* @__PURE__ */ C(le.Root, { open: g, onOpenChange: b, children: [
1327
+ return /* @__PURE__ */ A(le.Root, { open: h, onOpenChange: b, children: [
1324
1328
  /* @__PURE__ */ t(le.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1325
- W,
1329
+ U,
1326
1330
  {
1327
1331
  size: "sm",
1328
1332
  intent: "ghost",
1329
1333
  icon: /* @__PURE__ */ t(ta, {}),
1330
1334
  "aria-label": p("editor.link.insert", "Insert link"),
1331
1335
  onMouseDown: () => {
1332
- a(), w(l());
1336
+ a(), k(l());
1333
1337
  }
1334
1338
  }
1335
1339
  ) }),
1336
- /* @__PURE__ */ C(le.Content, { children: [
1340
+ /* @__PURE__ */ A(le.Content, { children: [
1337
1341
  /* @__PURE__ */ t(le.Header, { children: /* @__PURE__ */ t(le.Title, { children: p("editor.link.insert", "Insert link") }) }),
1338
- /* @__PURE__ */ C(le.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1339
- /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1340
- /* @__PURE__ */ t("label", { htmlFor: R, className: St, children: p("editor.link.url", "URL") }),
1342
+ /* @__PURE__ */ A(le.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1343
+ /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1344
+ /* @__PURE__ */ t("label", { htmlFor: z, className: Lt, children: p("editor.link.url", "URL") }),
1341
1345
  /* @__PURE__ */ t(
1342
1346
  cn,
1343
1347
  {
1344
- id: R,
1348
+ id: z,
1345
1349
  type: "url",
1346
- value: f,
1347
- onChange: (h) => y(h.target.value),
1350
+ value: g,
1351
+ onChange: (v) => y(v.target.value),
1348
1352
  placeholder: "https://…"
1349
1353
  }
1350
1354
  )
1351
1355
  ] }),
1352
- /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1353
- /* @__PURE__ */ t("label", { htmlFor: q, className: St, children: p("editor.link.text", "Text to display") }),
1356
+ /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1357
+ /* @__PURE__ */ t("label", { htmlFor: D, className: Lt, children: p("editor.link.text", "Text to display") }),
1354
1358
  /* @__PURE__ */ t(
1355
1359
  cn,
1356
1360
  {
1357
- id: q,
1358
- value: A,
1359
- onChange: (h) => w(h.target.value),
1361
+ id: D,
1362
+ value: N,
1363
+ onChange: (v) => k(v.target.value),
1360
1364
  placeholder: p("editor.link.textPlaceholder", "Link text")
1361
1365
  }
1362
1366
  )
@@ -1364,37 +1368,37 @@ function ns({
1364
1368
  /* @__PURE__ */ t(
1365
1369
  ki,
1366
1370
  {
1367
- checked: N,
1368
- onCheckedChange: (h) => z(h === !0),
1371
+ checked: T,
1372
+ onCheckedChange: (v) => S(v === !0),
1369
1373
  label: p("editor.link.newTab", "Open in new tab")
1370
1374
  }
1371
1375
  )
1372
1376
  ] }),
1373
- /* @__PURE__ */ C(le.Footer, { children: [
1374
- /* @__PURE__ */ t(le.Close, { asChild: !0, children: /* @__PURE__ */ t(Ne, { intent: "secondary", children: p("common.cancel") }) }),
1375
- /* @__PURE__ */ t(Ne, { onClick: u, disabled: !f.trim(), children: p("editor.link.insertAction", "Insert") })
1377
+ /* @__PURE__ */ A(le.Footer, { children: [
1378
+ /* @__PURE__ */ t(le.Close, { asChild: !0, children: /* @__PURE__ */ t(Ee, { intent: "secondary", children: p("common.cancel") }) }),
1379
+ /* @__PURE__ */ t(Ee, { onClick: u, disabled: !g.trim(), children: p("editor.link.insertAction", "Insert") })
1376
1380
  ] })
1377
1381
  ] })
1378
1382
  ] });
1379
1383
  }
1380
- function rs({
1384
+ function os({
1381
1385
  insertHtml: n,
1382
1386
  saveSelection: a,
1383
1387
  restoreSelection: d,
1384
1388
  uploadImage: l
1385
1389
  }) {
1386
- const { t: p } = ie("ui"), [g, b] = E(!1), [f, y] = E(""), [A, w] = E(""), N = je(), z = je(), R = (m, u) => {
1387
- const h = `<img src="${dn(m)}" alt="${dn(u)}" loading="lazy">`;
1388
- b(!1), y(""), w(""), window.requestAnimationFrame(() => {
1389
- d(), n(h);
1390
+ const { t: p } = ae("ui"), [h, b] = E(!1), [g, y] = E(""), [N, k] = E(""), T = je(), S = je(), z = (f, u) => {
1391
+ const v = `<img src="${dn(f)}" alt="${dn(u)}" loading="lazy">`;
1392
+ b(!1), y(""), k(""), window.requestAnimationFrame(() => {
1393
+ d(), n(v);
1390
1394
  });
1391
- }, q = () => {
1392
- const m = f.trim();
1393
- m && R(m, A.trim());
1395
+ }, D = () => {
1396
+ const f = g.trim();
1397
+ f && z(f, N.trim());
1394
1398
  };
1395
- return /* @__PURE__ */ C(le.Root, { open: g, onOpenChange: b, children: [
1399
+ return /* @__PURE__ */ A(le.Root, { open: h, onOpenChange: b, children: [
1396
1400
  /* @__PURE__ */ t(le.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1397
- W,
1401
+ U,
1398
1402
  {
1399
1403
  size: "sm",
1400
1404
  intent: "ghost",
@@ -1403,11 +1407,11 @@ function rs({
1403
1407
  onMouseDown: () => a()
1404
1408
  }
1405
1409
  ) }),
1406
- /* @__PURE__ */ C(le.Content, { children: [
1410
+ /* @__PURE__ */ A(le.Content, { children: [
1407
1411
  /* @__PURE__ */ t(le.Header, { children: /* @__PURE__ */ t(le.Title, { children: p("editor.image.insert", "Insert image") }) }),
1408
- /* @__PURE__ */ C(le.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1409
- l ? /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1410
- /* @__PURE__ */ t("span", { className: St, children: p("editor.image.upload", "Upload") }),
1412
+ /* @__PURE__ */ A(le.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1413
+ l ? /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1414
+ /* @__PURE__ */ t("span", { className: Lt, children: p("editor.image.upload", "Upload") }),
1411
1415
  /* @__PURE__ */ t(
1412
1416
  xi,
1413
1417
  {
@@ -1416,35 +1420,35 @@ function rs({
1416
1420
  "image/*": [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg"]
1417
1421
  },
1418
1422
  maxFiles: 1,
1419
- onUpload: async (m, { signal: u }) => {
1420
- const h = await l(m, u);
1421
- R(h, m.name);
1423
+ onUpload: async (f, { signal: u }) => {
1424
+ const v = await l(f, u);
1425
+ z(v, f.name);
1422
1426
  }
1423
1427
  }
1424
1428
  ),
1425
1429
  /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: p("editor.image.orUrl", "Or paste an image URL") })
1426
1430
  ] }) : null,
1427
- /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1428
- /* @__PURE__ */ t("label", { htmlFor: N, className: St, children: p("editor.image.url", "Image URL") }),
1431
+ /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1432
+ /* @__PURE__ */ t("label", { htmlFor: T, className: Lt, children: p("editor.image.url", "Image URL") }),
1429
1433
  /* @__PURE__ */ t(
1430
1434
  cn,
1431
1435
  {
1432
- id: N,
1436
+ id: T,
1433
1437
  type: "url",
1434
- value: f,
1435
- onChange: (m) => y(m.target.value),
1438
+ value: g,
1439
+ onChange: (f) => y(f.target.value),
1436
1440
  placeholder: "https://…"
1437
1441
  }
1438
1442
  )
1439
1443
  ] }),
1440
- /* @__PURE__ */ C("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1441
- /* @__PURE__ */ t("label", { htmlFor: z, className: St, children: p("editor.image.alt", "Alt text") }),
1444
+ /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1445
+ /* @__PURE__ */ t("label", { htmlFor: S, className: Lt, children: p("editor.image.alt", "Alt text") }),
1442
1446
  /* @__PURE__ */ t(
1443
1447
  cn,
1444
1448
  {
1445
- id: z,
1446
- value: A,
1447
- onChange: (m) => w(m.target.value),
1449
+ id: S,
1450
+ value: N,
1451
+ onChange: (f) => k(f.target.value),
1448
1452
  placeholder: p(
1449
1453
  "editor.image.altPlaceholder",
1450
1454
  "Describe the image"
@@ -1453,30 +1457,30 @@ function rs({
1453
1457
  )
1454
1458
  ] })
1455
1459
  ] }),
1456
- /* @__PURE__ */ C(le.Footer, { children: [
1457
- /* @__PURE__ */ t(le.Close, { asChild: !0, children: /* @__PURE__ */ t(Ne, { intent: "secondary", children: p("common.cancel") }) }),
1458
- /* @__PURE__ */ t(Ne, { onClick: q, disabled: !f.trim(), children: p("editor.image.insertAction", "Insert") })
1460
+ /* @__PURE__ */ A(le.Footer, { children: [
1461
+ /* @__PURE__ */ t(le.Close, { asChild: !0, children: /* @__PURE__ */ t(Ee, { intent: "secondary", children: p("common.cancel") }) }),
1462
+ /* @__PURE__ */ t(Ee, { onClick: D, disabled: !g.trim(), children: p("editor.image.insertAction", "Insert") })
1459
1463
  ] })
1460
1464
  ] })
1461
1465
  ] });
1462
1466
  }
1463
- function os({
1467
+ function is({
1464
1468
  run: n,
1465
1469
  saveSelection: a,
1466
1470
  restoreSelection: d
1467
1471
  }) {
1468
- const { t: l } = ie("ui"), [p, g] = E("#1f2a5c"), b = (y) => {
1469
- g(y), d(), n("module.inline.format", {
1472
+ const { t: l } = ae("ui"), [p, h] = E("#1f2a5c"), b = (y) => {
1473
+ h(y), d(), n("module.inline.format", {
1470
1474
  tag: "span",
1471
1475
  style: { color: y },
1472
1476
  type: "toggle"
1473
1477
  });
1474
- }, f = () => {
1478
+ }, g = () => {
1475
1479
  d(), n("module.inline.remove", { style: "color" });
1476
1480
  };
1477
- return /* @__PURE__ */ C(oe, { onOpenChange: (y) => y && a(), children: [
1478
- /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1479
- W,
1481
+ return /* @__PURE__ */ A(ie, { onOpenChange: (y) => y && a(), children: [
1482
+ /* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1483
+ U,
1480
1484
  {
1481
1485
  size: "sm",
1482
1486
  intent: "ghost",
@@ -1487,10 +1491,10 @@ function os({
1487
1491
  }
1488
1492
  }
1489
1493
  ) }),
1490
- /* @__PURE__ */ C(oe.Content, { side: "bottom", align: "start", children: [
1491
- /* @__PURE__ */ t(oe.Heading, { children: l("editor.textColor", "Text colour") }),
1494
+ /* @__PURE__ */ A(ie.Content, { side: "bottom", align: "start", children: [
1495
+ /* @__PURE__ */ t(ie.Heading, { children: l("editor.textColor", "Text colour") }),
1492
1496
  /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
1493
- Wn,
1497
+ Xn,
1494
1498
  {
1495
1499
  variant: "inline",
1496
1500
  size: "sm",
@@ -1498,27 +1502,27 @@ function os({
1498
1502
  onChange: b
1499
1503
  }
1500
1504
  ) }),
1501
- /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ t(Ne, { size: "sm", intent: "secondary", onClick: f, children: l("editor.color.remove", "Remove colour") }) })
1505
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ t(Ee, { size: "sm", intent: "secondary", onClick: g, children: l("editor.color.remove", "Remove colour") }) })
1502
1506
  ] })
1503
1507
  ] });
1504
1508
  }
1505
- function is({
1509
+ function as({
1506
1510
  run: n,
1507
1511
  saveSelection: a,
1508
1512
  restoreSelection: d
1509
1513
  }) {
1510
- const { t: l } = ie("ui"), [p, g] = E("#fff3a3"), b = (y) => {
1511
- g(y), d(), n("module.inline.format", {
1514
+ const { t: l } = ae("ui"), [p, h] = E("#fff3a3"), b = (y) => {
1515
+ h(y), d(), n("module.inline.format", {
1512
1516
  tag: "span",
1513
1517
  style: { "background-color": y },
1514
1518
  type: "toggle"
1515
1519
  });
1516
- }, f = () => {
1520
+ }, g = () => {
1517
1521
  d(), n("module.inline.remove", { style: "background-color" });
1518
1522
  };
1519
- return /* @__PURE__ */ C(oe, { onOpenChange: (y) => y && a(), children: [
1520
- /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1521
- W,
1523
+ return /* @__PURE__ */ A(ie, { onOpenChange: (y) => y && a(), children: [
1524
+ /* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1525
+ U,
1522
1526
  {
1523
1527
  size: "sm",
1524
1528
  intent: "ghost",
@@ -1529,10 +1533,10 @@ function is({
1529
1533
  }
1530
1534
  }
1531
1535
  ) }),
1532
- /* @__PURE__ */ C(oe.Content, { side: "bottom", align: "start", children: [
1533
- /* @__PURE__ */ t(oe.Heading, { children: l("editor.highlightColor", "Highlight") }),
1536
+ /* @__PURE__ */ A(ie.Content, { side: "bottom", align: "start", children: [
1537
+ /* @__PURE__ */ t(ie.Heading, { children: l("editor.highlightColor", "Highlight") }),
1534
1538
  /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
1535
- Wn,
1539
+ Xn,
1536
1540
  {
1537
1541
  variant: "inline",
1538
1542
  size: "sm",
@@ -1540,66 +1544,66 @@ function is({
1540
1544
  onChange: b
1541
1545
  }
1542
1546
  ) }),
1543
- /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ t(Ne, { size: "sm", intent: "secondary", onClick: f, children: l("editor.highlight.remove", "Remove highlight") }) })
1547
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ t(Ee, { size: "sm", intent: "secondary", onClick: g, children: l("editor.highlight.remove", "Remove highlight") }) })
1544
1548
  ] })
1545
1549
  ] });
1546
1550
  }
1547
- function as(n, a) {
1551
+ function ss(n, a) {
1548
1552
  const d = Array.from({ length: a }, () => "<td><br></td>").join("");
1549
1553
  return `<table><tbody>${Array.from({ length: n }, () => `<tr>${d}</tr>`).join("")}</tbody></table>`;
1550
1554
  }
1551
- function ss({
1555
+ function ls({
1552
1556
  run: n,
1553
1557
  insertTable: a,
1554
1558
  active: d
1555
1559
  }) {
1556
- const { t: l } = ie("ui"), [p, g] = E({ r: 0, c: 0 }), [b, f] = E(!1), y = d.has("table") || b, A = /* @__PURE__ */ t(
1557
- W,
1560
+ const { t: l } = ae("ui"), [p, h] = E({ r: 0, c: 0 }), [b, g] = E(!1), y = d.has("table") || b, N = /* @__PURE__ */ t(
1561
+ U,
1558
1562
  {
1559
1563
  size: "sm",
1560
1564
  intent: "ghost",
1561
1565
  icon: /* @__PURE__ */ t(_a, {}),
1562
1566
  "aria-label": l("editor.table.insert", "Insert table"),
1563
- onMouseDown: (w) => w.preventDefault()
1567
+ onMouseDown: (k) => k.preventDefault()
1564
1568
  }
1565
1569
  );
1566
- return y ? /* @__PURE__ */ C(G.Root, { open: b, onOpenChange: f, children: [
1567
- /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: A }),
1568
- /* @__PURE__ */ t(G.Content, { side: "bottom", align: "start", children: so.map((w) => /* @__PURE__ */ t(
1570
+ return y ? /* @__PURE__ */ A(G.Root, { open: b, onOpenChange: g, children: [
1571
+ /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: N }),
1572
+ /* @__PURE__ */ t(G.Content, { side: "bottom", align: "start", children: so.map((k) => /* @__PURE__ */ t(
1569
1573
  G.Item,
1570
1574
  {
1571
- startIcon: w.icon,
1572
- onSelect: () => n(w.command),
1573
- children: l(w.label[0], w.label[1])
1575
+ startIcon: k.icon,
1576
+ onSelect: () => n(k.command),
1577
+ children: l(k.label[0], k.label[1])
1574
1578
  },
1575
- w.id
1579
+ k.id
1576
1580
  )) })
1577
- ] }) : /* @__PURE__ */ C(oe, { onOpenChange: (w) => !w && g({ r: 0, c: 0 }), children: [
1578
- /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: A }),
1579
- /* @__PURE__ */ C(oe.Content, { side: "bottom", align: "start", children: [
1580
- /* @__PURE__ */ t(oe.Heading, { children: l("editor.table.insert", "Insert table") }),
1581
+ ] }) : /* @__PURE__ */ A(ie, { onOpenChange: (k) => !k && h({ r: 0, c: 0 }), children: [
1582
+ /* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: N }),
1583
+ /* @__PURE__ */ A(ie.Content, { side: "bottom", align: "start", children: [
1584
+ /* @__PURE__ */ t(ie.Heading, { children: l("editor.table.insert", "Insert table") }),
1581
1585
  /* @__PURE__ */ t(
1582
1586
  "div",
1583
1587
  {
1584
1588
  role: "group",
1585
1589
  "aria-label": l("editor.table.sizePicker", "Table size"),
1586
1590
  className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
1587
- onMouseLeave: () => g({ r: 0, c: 0 }),
1588
- children: Array.from({ length: an * an }, (w, N) => {
1589
- const z = Math.floor(N / an) + 1, R = N % an + 1, q = z <= p.r && R <= p.c;
1591
+ onMouseLeave: () => h({ r: 0, c: 0 }),
1592
+ children: Array.from({ length: an * an }, (k, T) => {
1593
+ const S = Math.floor(T / an) + 1, z = T % an + 1, D = S <= p.r && z <= p.c;
1590
1594
  return /* @__PURE__ */ t(
1591
1595
  "button",
1592
1596
  {
1593
1597
  type: "button",
1594
1598
  "aria-label": l("editor.table.sizeCell", "{{r}}×{{c}}", {
1595
- r: z,
1596
- c: R
1599
+ r: S,
1600
+ c: z
1597
1601
  }),
1598
- onMouseEnter: () => g({ r: z, c: R }),
1599
- onClick: () => a(as(z, R)),
1600
- className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${q ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1602
+ onMouseEnter: () => h({ r: S, c: z }),
1603
+ onClick: () => a(ss(S, z)),
1604
+ className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${D ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1601
1605
  },
1602
- N
1606
+ T
1603
1607
  );
1604
1608
  })
1605
1609
  }
@@ -1611,57 +1615,57 @@ function ss({
1611
1615
  ] })
1612
1616
  ] });
1613
1617
  }
1614
- const ls = Object.fromEntries(so.map((n) => [n.id, n])), cs = [
1618
+ const cs = Object.fromEntries(so.map((n) => [n.id, n])), ds = [
1615
1619
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1616
1620
  "ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
1617
1621
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1618
1622
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1619
- ].join(" "), ds = "#fde68a";
1623
+ ].join(" "), us = "#fde68a";
1620
1624
  function Gr({
1621
1625
  scope: n,
1622
1626
  icon: a,
1623
1627
  label: d,
1624
1628
  onOpenChange: l,
1625
1629
  saveTableCell: p,
1626
- applyTableBackground: g
1630
+ applyTableBackground: h
1627
1631
  }) {
1628
- const { t: b } = ie("ui"), [f, y] = E(ds);
1629
- return /* @__PURE__ */ C(
1630
- oe,
1632
+ const { t: b } = ae("ui"), [g, y] = E(us);
1633
+ return /* @__PURE__ */ A(
1634
+ ie,
1631
1635
  {
1632
- onOpenChange: (A) => {
1633
- l(A), A && p();
1636
+ onOpenChange: (N) => {
1637
+ l(N), N && p();
1634
1638
  },
1635
1639
  children: [
1636
- /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1637
- W,
1640
+ /* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
1641
+ U,
1638
1642
  {
1639
1643
  size: "sm",
1640
1644
  intent: "ghost",
1641
1645
  icon: a,
1642
1646
  tooltip: d,
1643
- onMouseDown: (A) => A.preventDefault()
1647
+ onMouseDown: (N) => N.preventDefault()
1644
1648
  }
1645
1649
  ) }),
1646
- /* @__PURE__ */ C(oe.Content, { side: "bottom", align: "center", children: [
1650
+ /* @__PURE__ */ A(ie.Content, { side: "bottom", align: "center", children: [
1647
1651
  /* @__PURE__ */ t(
1648
- Wn,
1652
+ Xn,
1649
1653
  {
1650
1654
  variant: "inline",
1651
1655
  size: "sm",
1652
- value: f,
1653
- onChange: (A) => {
1654
- y(A), g(n, A);
1656
+ value: g,
1657
+ onChange: (N) => {
1658
+ y(N), h(n, N);
1655
1659
  }
1656
1660
  }
1657
1661
  ),
1658
1662
  /* @__PURE__ */ t(
1659
- Ne,
1663
+ Ee,
1660
1664
  {
1661
1665
  size: "sm",
1662
1666
  intent: "ghost",
1663
1667
  className: "ds:mt-[var(--spacing-xs)] ds:w-full",
1664
- onClick: () => g(n, null),
1668
+ onClick: () => h(n, null),
1665
1669
  children: b("editor.table.clearColor", "Clear colour")
1666
1670
  }
1667
1671
  )
@@ -1670,43 +1674,43 @@ function Gr({
1670
1674
  }
1671
1675
  );
1672
1676
  }
1673
- function us({
1677
+ function ms({
1674
1678
  active: n,
1675
1679
  run: a,
1676
1680
  areaRef: d,
1677
1681
  getActiveTableEl: l,
1678
1682
  enableColor: p = !1,
1679
- saveTableCell: g,
1683
+ saveTableCell: h,
1680
1684
  applyTableBackground: b
1681
1685
  }) {
1682
- const { t: f } = ie("ui"), y = n.has("table"), [A, w] = E(null), N = x(0), [z, R] = E(!1), q = k((u) => {
1683
- N.current = Math.max(
1686
+ const { t: g } = ae("ui"), y = n.has("table"), [N, k] = E(null), T = C(0), [S, z] = E(!1), D = w((u) => {
1687
+ T.current = Math.max(
1684
1688
  0,
1685
- N.current + (u ? 1 : -1)
1686
- ), R(N.current > 0);
1689
+ T.current + (u ? 1 : -1)
1690
+ ), z(T.current > 0);
1687
1691
  }, []);
1688
1692
  if (I(() => {
1689
- if (z) return;
1693
+ if (S) return;
1690
1694
  if (!y || typeof window > "u") {
1691
- w(null);
1695
+ k(null);
1692
1696
  return;
1693
1697
  }
1694
1698
  const u = () => {
1695
- const P = d.current, U = l();
1696
- if (!P || !U) {
1697
- w(null);
1699
+ const O = d.current, W = l();
1700
+ if (!O || !W) {
1701
+ k(null);
1698
1702
  return;
1699
1703
  }
1700
- const O = P.getBoundingClientRect(), F = U.getBoundingClientRect(), T = getComputedStyle(P).direction === "rtl", J = Math.max(0, F.top - O.top - 44), j = T ? O.right - F.right + F.width / 2 : F.left - O.left + F.width / 2;
1701
- w({ top: J, start: Math.max(0, j), rtl: T });
1704
+ const j = O.getBoundingClientRect(), P = W.getBoundingClientRect(), x = getComputedStyle(O).direction === "rtl", Q = Math.max(0, P.top - j.top - 44), K = x ? j.right - P.right + P.width / 2 : P.left - j.left + P.width / 2;
1705
+ k({ top: Q, start: Math.max(0, K), rtl: x });
1702
1706
  };
1703
1707
  u();
1704
- const h = new ResizeObserver(u), L = d.current, M = l();
1705
- return L && h.observe(L), M && h.observe(M), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1706
- h.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1708
+ const v = new ResizeObserver(u), M = d.current, L = l();
1709
+ return M && v.observe(M), L && v.observe(L), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
1710
+ v.disconnect(), window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
1707
1711
  };
1708
- }, [y, z, d, l]), !y && !z || !A) return null;
1709
- const m = [
1712
+ }, [y, S, d, l]), !y && !S || !N) return null;
1713
+ const f = [
1710
1714
  ["rowAbove", "rowBelow"],
1711
1715
  ["colLeft", "colRight"],
1712
1716
  ["addHead"],
@@ -1718,27 +1722,27 @@ function us({
1718
1722
  // Tooltips disambiguate the icon-only ops on hover (and provide each
1719
1723
  // button's accessible name via IconButton's `tooltip` prop). Radix Tooltip
1720
1724
  // needs a provider ancestor, so scope one to the bar.
1721
- /* @__PURE__ */ t(Vn, { children: /* @__PURE__ */ t(
1725
+ /* @__PURE__ */ t(Wn, { children: /* @__PURE__ */ t(
1722
1726
  "div",
1723
1727
  {
1724
1728
  role: "group",
1725
- "aria-label": f("editor.table.toolbar", "Table tools"),
1726
- className: `${cs} ${A.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1729
+ "aria-label": g("editor.table.toolbar", "Table tools"),
1730
+ className: `${ds} ${N.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1727
1731
  style: {
1728
- "--rte-tt-top": `${A.top}px`,
1729
- "--rte-tt-start": `${A.start}px`
1732
+ "--rte-tt-top": `${N.top}px`,
1733
+ "--rte-tt-start": `${N.start}px`
1730
1734
  },
1731
- children: m.map((u, h) => /* @__PURE__ */ C(vt, { children: [
1732
- h > 0 ? /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }) : null,
1733
- u === "colour" ? /* @__PURE__ */ C(De, { children: [
1735
+ children: f.map((u, v) => /* @__PURE__ */ A(vt, { children: [
1736
+ v > 0 ? /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }) : null,
1737
+ u === "colour" ? /* @__PURE__ */ A(qe, { children: [
1734
1738
  /* @__PURE__ */ t(
1735
1739
  Gr,
1736
1740
  {
1737
1741
  scope: "cell",
1738
1742
  icon: /* @__PURE__ */ t(sa, {}),
1739
- label: f("editor.table.cellColor", "Cell colour"),
1740
- onOpenChange: q,
1741
- saveTableCell: g,
1743
+ label: g("editor.table.cellColor", "Cell colour"),
1744
+ onOpenChange: D,
1745
+ saveTableCell: h,
1742
1746
  applyTableBackground: b
1743
1747
  }
1744
1748
  ),
@@ -1747,25 +1751,25 @@ function us({
1747
1751
  {
1748
1752
  scope: "row",
1749
1753
  icon: /* @__PURE__ */ t(ca, {}),
1750
- label: f("editor.table.rowColor", "Row colour"),
1751
- onOpenChange: q,
1752
- saveTableCell: g,
1754
+ label: g("editor.table.rowColor", "Row colour"),
1755
+ onOpenChange: D,
1756
+ saveTableCell: h,
1753
1757
  applyTableBackground: b
1754
1758
  }
1755
1759
  )
1756
- ] }) : u.map((L) => {
1757
- const M = ls[L];
1760
+ ] }) : u.map((M) => {
1761
+ const L = cs[M];
1758
1762
  return /* @__PURE__ */ t(
1759
- W,
1763
+ U,
1760
1764
  {
1761
1765
  size: "sm",
1762
1766
  intent: "ghost",
1763
- icon: M.icon,
1764
- tooltip: f(M.label[0], M.label[1]),
1765
- onMouseDown: (P) => P.preventDefault(),
1766
- onClick: () => a(M.command)
1767
+ icon: L.icon,
1768
+ tooltip: g(L.label[0], L.label[1]),
1769
+ onMouseDown: (O) => O.preventDefault(),
1770
+ onClick: () => a(L.command)
1767
1771
  },
1768
- L
1772
+ M
1769
1773
  );
1770
1774
  })
1771
1775
  ] }, u === "colour" ? "colour" : u[0]))
@@ -1773,7 +1777,7 @@ function us({
1773
1777
  ) })
1774
1778
  );
1775
1779
  }
1776
- const Fn = [
1780
+ const jn = [
1777
1781
  "wysiwyg-img-inline",
1778
1782
  "wysiwyg-img-wrap-left",
1779
1783
  "wysiwyg-img-wrap-right"
@@ -1785,11 +1789,11 @@ const Fn = [
1785
1789
  function Kr(n, a) {
1786
1790
  return a.find((d) => n.classList.contains(d)) ?? "";
1787
1791
  }
1788
- function ms(n) {
1792
+ function fs(n) {
1789
1793
  const a = n.closest(".redactor-in"), d = a instanceof HTMLElement ? a.clientWidth : 0, l = n.getBoundingClientRect().width;
1790
- return d <= 0 || l <= 0 ? Lt : Math.round(Math.min(Lt, l / d * 100));
1794
+ return d <= 0 || l <= 0 ? _t : Math.round(Math.min(_t, l / d * 100));
1791
1795
  }
1792
- const jn = 10, Lt = 100, fs = 5, gs = 10, Vr = (n) => Math.min(Lt, Math.max(jn, Math.round(n))), hs = [
1796
+ const Gn = 10, _t = 100, gs = 5, hs = 10, Vr = (n) => Math.min(_t, Math.max(Gn, Math.round(n))), ps = [
1793
1797
  {
1794
1798
  id: "wysiwyg-img-inline",
1795
1799
  icon: /* @__PURE__ */ t(Li, {}),
@@ -1805,7 +1809,7 @@ const jn = 10, Lt = 100, fs = 5, gs = 10, Vr = (n) => Math.min(Lt, Math.max(jn,
1805
1809
  icon: /* @__PURE__ */ t(ha, {}),
1806
1810
  label: ["editor.image.wrapRight", "Wrap right"]
1807
1811
  }
1808
- ], ps = [
1812
+ ], bs = [
1809
1813
  {
1810
1814
  id: "wysiwyg-img-align-left",
1811
1815
  icon: /* @__PURE__ */ t(ro, {}),
@@ -1821,7 +1825,7 @@ const jn = 10, Lt = 100, fs = 5, gs = 10, Vr = (n) => Math.min(Lt, Math.max(jn,
1821
1825
  icon: /* @__PURE__ */ t(no, {}),
1822
1826
  label: ["editor.image.alignRight", "Align right"]
1823
1827
  }
1824
- ], bs = [
1828
+ ], vs = [
1825
1829
  {
1826
1830
  id: "tl",
1827
1831
  pos: "ds:[inset-block-start:calc(var(--spacing-md)*-0.5)] ds:[inset-inline-start:calc(var(--spacing-md)*-0.5)]",
@@ -1854,14 +1858,14 @@ const jn = 10, Lt = 100, fs = 5, gs = 10, Vr = (n) => Math.min(Lt, Math.max(jn,
1854
1858
  labelKey: "editor.image.resizeBottomEnd",
1855
1859
  labelFallback: "Resize image, bottom-end corner"
1856
1860
  }
1857
- ], vs = [
1861
+ ], ys = [
1858
1862
  "ds:absolute ds:z-20 ds:pointer-events-none",
1859
1863
  "ds:[inset-block-start:var(--rte-img-top)] ds:[inset-inline-start:var(--rte-img-start)]",
1860
1864
  "ds:[inline-size:var(--rte-img-width)] ds:[block-size:var(--rte-img-height)]",
1861
1865
  "ds:rounded-[var(--radius-2xs)]",
1862
1866
  "ds:[outline-style:solid] ds:[outline-width:var(--border-width-md)]",
1863
1867
  "ds:[outline-color:var(--accent)] ds:[outline-offset:var(--focus-ring-offset)]"
1864
- ].join(" "), ys = [
1868
+ ].join(" "), ws = [
1865
1869
  "ds:absolute ds:pointer-events-auto ds:touch-none",
1866
1870
  "ds:[inline-size:var(--spacing-md)] ds:[block-size:var(--spacing-md)]",
1867
1871
  "ds:rounded-[var(--radius-2xs)] ds:shadow-[var(--shadow-sm)]",
@@ -1870,178 +1874,178 @@ const jn = 10, Lt = 100, fs = 5, gs = 10, Vr = (n) => Math.min(Lt, Math.max(jn,
1870
1874
  "ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)]",
1871
1875
  "ds:focus-visible:[outline-offset:var(--focus-ring-offset)]",
1872
1876
  "ds:forced-colors:bg-[CanvasText]"
1873
- ].join(" "), ws = [
1877
+ ].join(" "), ks = [
1874
1878
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1875
1879
  "ds:[inset-block-start:var(--rte-img-bar-top)] ds:[inset-inline-start:var(--rte-img-center)]",
1876
1880
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1877
1881
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1878
1882
  ].join(" ");
1879
- function ks({
1883
+ function xs({
1880
1884
  areaRef: n,
1881
1885
  activeImageEl: a,
1882
1886
  applyImageClass: d,
1883
1887
  setImageWidth: l
1884
1888
  }) {
1885
- const { t: p } = ie("ui"), [g, b] = E(null), f = x(null);
1889
+ const { t: p } = ae("ui"), [h, b] = E(null), g = C(null);
1886
1890
  I(() => {
1887
1891
  if (!a || typeof window > "u") {
1888
1892
  b(null);
1889
1893
  return;
1890
1894
  }
1891
- const m = () => {
1892
- const P = n.current;
1893
- if (!P) {
1895
+ const f = () => {
1896
+ const O = n.current;
1897
+ if (!O) {
1894
1898
  b(null);
1895
1899
  return;
1896
1900
  }
1897
- const U = P.getBoundingClientRect(), O = a.getBoundingClientRect(), F = getComputedStyle(P).direction === "rtl", T = O.top - U.top, J = F ? U.right - O.right : O.left - U.left, j = J + O.width / 2, Z = Math.max(0, T - 44);
1901
+ const W = O.getBoundingClientRect(), j = a.getBoundingClientRect(), P = getComputedStyle(O).direction === "rtl", x = j.top - W.top, Q = P ? W.right - j.right : j.left - W.left, K = Q + j.width / 2, Y = Math.max(0, x - 44);
1898
1902
  b({
1899
- top: T,
1900
- start: Math.max(0, J),
1901
- width: O.width,
1902
- height: O.height,
1903
- center: Math.max(0, j),
1904
- barTop: Z,
1905
- pct: ms(a),
1906
- rtl: F
1903
+ top: x,
1904
+ start: Math.max(0, Q),
1905
+ width: j.width,
1906
+ height: j.height,
1907
+ center: Math.max(0, K),
1908
+ barTop: Y,
1909
+ pct: fs(a),
1910
+ rtl: P
1907
1911
  });
1908
1912
  };
1909
- m();
1910
- const u = new ResizeObserver(m);
1913
+ f();
1914
+ const u = new ResizeObserver(f);
1911
1915
  u.observe(a);
1912
- const h = n.current;
1913
- h && u.observe(h);
1914
- const L = a.closest(".redactor-in");
1915
- let M = null;
1916
- return L && (M = new MutationObserver(m), M.observe(L, {
1916
+ const v = n.current;
1917
+ v && u.observe(v);
1918
+ const M = a.closest(".redactor-in");
1919
+ let L = null;
1920
+ return M && (L = new MutationObserver(f), L.observe(M, {
1917
1921
  subtree: !0,
1918
1922
  childList: !0,
1919
1923
  characterData: !0,
1920
1924
  attributes: !0,
1921
1925
  attributeFilter: ["class", "style", "width", "height", "src"]
1922
- })), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
1923
- u.disconnect(), M == null || M.disconnect(), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
1926
+ })), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
1927
+ u.disconnect(), L == null || L.disconnect(), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
1924
1928
  };
1925
1929
  }, [a, n]);
1926
- const y = k(
1927
- (m) => (u) => {
1928
- !u.isPrimary || !g || (u.preventDefault(), u.currentTarget.setPointerCapture(u.pointerId), f.current = {
1930
+ const y = w(
1931
+ (f) => (u) => {
1932
+ !u.isPrimary || !h || (u.preventDefault(), u.currentTarget.setPointerCapture(u.pointerId), g.current = {
1929
1933
  pointerId: u.pointerId,
1930
1934
  startX: u.clientX,
1931
- startPct: g.pct,
1932
- sign: m.sign * (g.rtl ? -1 : 1)
1935
+ startPct: h.pct,
1936
+ sign: f.sign * (h.rtl ? -1 : 1)
1933
1937
  });
1934
1938
  },
1935
- [g]
1936
- ), A = k(
1937
- (m) => {
1938
- const u = f.current;
1939
- if (!u || m.pointerId !== u.pointerId || !a) return;
1940
- const h = a.closest(".redactor-in"), L = h instanceof HTMLElement ? h.clientWidth : 0;
1941
- if (L <= 0) return;
1942
- const M = u.sign * (m.clientX - u.startX) / L * 100;
1943
- l(Vr(u.startPct + M));
1939
+ [h]
1940
+ ), N = w(
1941
+ (f) => {
1942
+ const u = g.current;
1943
+ if (!u || f.pointerId !== u.pointerId || !a) return;
1944
+ const v = a.closest(".redactor-in"), M = v instanceof HTMLElement ? v.clientWidth : 0;
1945
+ if (M <= 0) return;
1946
+ const L = u.sign * (f.clientX - u.startX) / M * 100;
1947
+ l(Vr(u.startPct + L));
1944
1948
  },
1945
1949
  [a, l]
1946
- ), w = k(
1947
- (m) => {
1948
- const u = f.current;
1949
- !u || m.pointerId !== u.pointerId || (m.currentTarget.releasePointerCapture(m.pointerId), f.current = null);
1950
+ ), k = w(
1951
+ (f) => {
1952
+ const u = g.current;
1953
+ !u || f.pointerId !== u.pointerId || (f.currentTarget.releasePointerCapture(f.pointerId), g.current = null);
1950
1954
  },
1951
1955
  []
1952
- ), N = k(
1953
- (m) => {
1954
- if (!g) return;
1956
+ ), T = w(
1957
+ (f) => {
1958
+ if (!h) return;
1955
1959
  let u = null;
1956
- const h = m.shiftKey ? gs : fs;
1957
- switch (m.key) {
1960
+ const v = f.shiftKey ? hs : gs;
1961
+ switch (f.key) {
1958
1962
  // Up / right always grow; down / left always shrink — independent of
1959
1963
  // which corner has focus, so the gesture reads the same everywhere.
1960
1964
  case "ArrowRight":
1961
1965
  case "ArrowUp":
1962
- u = g.pct + h;
1966
+ u = h.pct + v;
1963
1967
  break;
1964
1968
  case "ArrowLeft":
1965
1969
  case "ArrowDown":
1966
- u = g.pct - h;
1970
+ u = h.pct - v;
1967
1971
  break;
1968
1972
  case "Home":
1969
- u = jn;
1973
+ u = Gn;
1970
1974
  break;
1971
1975
  case "End":
1972
- u = Lt;
1976
+ u = _t;
1973
1977
  break;
1974
1978
  default:
1975
1979
  return;
1976
1980
  }
1977
- m.preventDefault(), l(Vr(u));
1981
+ f.preventDefault(), l(Vr(u));
1978
1982
  },
1979
- [g, l]
1983
+ [h, l]
1980
1984
  );
1981
- if (!a || !g) return null;
1982
- const z = Kr(a, Fn), R = Kr(a, co), q = p("editor.image.widthAnnounce", {
1983
- width: g.pct,
1985
+ if (!a || !h) return null;
1986
+ const S = Kr(a, jn), z = Kr(a, co), D = p("editor.image.widthAnnounce", {
1987
+ width: h.pct,
1984
1988
  defaultValue: "{{width}} percent"
1985
1989
  });
1986
- return /* @__PURE__ */ C(De, { children: [
1990
+ return /* @__PURE__ */ A(qe, { children: [
1987
1991
  /* @__PURE__ */ t(
1988
1992
  "div",
1989
1993
  {
1990
- className: vs,
1994
+ className: ys,
1991
1995
  style: {
1992
- "--rte-img-top": `${g.top}px`,
1993
- "--rte-img-start": `${g.start}px`,
1994
- "--rte-img-width": `${g.width}px`,
1995
- "--rte-img-height": `${g.height}px`
1996
+ "--rte-img-top": `${h.top}px`,
1997
+ "--rte-img-start": `${h.start}px`,
1998
+ "--rte-img-width": `${h.width}px`,
1999
+ "--rte-img-height": `${h.height}px`
1996
2000
  },
1997
- children: bs.map((m) => /* @__PURE__ */ t(
2001
+ children: vs.map((f) => /* @__PURE__ */ t(
1998
2002
  "div",
1999
2003
  {
2000
2004
  role: "slider",
2001
2005
  tabIndex: 0,
2002
- "aria-label": p(m.labelKey, m.labelFallback),
2006
+ "aria-label": p(f.labelKey, f.labelFallback),
2003
2007
  "aria-orientation": "horizontal",
2004
- "aria-valuemin": jn,
2005
- "aria-valuemax": Lt,
2006
- "aria-valuenow": g.pct,
2007
- "aria-valuetext": q,
2008
- className: `${ys} ${m.pos} ${m.cursor}`,
2009
- onPointerDown: y(m),
2010
- onPointerMove: A,
2011
- onPointerUp: w,
2012
- onPointerCancel: w,
2013
- onKeyDown: N
2008
+ "aria-valuemin": Gn,
2009
+ "aria-valuemax": _t,
2010
+ "aria-valuenow": h.pct,
2011
+ "aria-valuetext": D,
2012
+ className: `${ws} ${f.pos} ${f.cursor}`,
2013
+ onPointerDown: y(f),
2014
+ onPointerMove: N,
2015
+ onPointerUp: k,
2016
+ onPointerCancel: k,
2017
+ onKeyDown: T
2014
2018
  },
2015
- m.id
2019
+ f.id
2016
2020
  ))
2017
2021
  }
2018
2022
  ),
2019
- /* @__PURE__ */ t(Vn, { children: /* @__PURE__ */ t(
2023
+ /* @__PURE__ */ t(Wn, { children: /* @__PURE__ */ t(
2020
2024
  "div",
2021
2025
  {
2022
2026
  role: "group",
2023
2027
  "aria-label": p("editor.image.toolbar", "Image tools"),
2024
- className: `${ws} ${g.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
2028
+ className: `${ks} ${h.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
2025
2029
  style: {
2026
- "--rte-img-bar-top": `${g.barTop}px`,
2027
- "--rte-img-center": `${g.center}px`
2030
+ "--rte-img-bar-top": `${h.barTop}px`,
2031
+ "--rte-img-center": `${h.center}px`
2028
2032
  },
2029
- children: [hs, ps].map((m, u) => /* @__PURE__ */ C(vt, { children: [
2033
+ children: [ps, bs].map((f, u) => /* @__PURE__ */ A(vt, { children: [
2030
2034
  u > 0 ? /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }) : null,
2031
- m.map((h) => {
2032
- const L = u === 0 ? z === h.id : R === h.id;
2035
+ f.map((v) => {
2036
+ const M = u === 0 ? S === v.id : z === v.id;
2033
2037
  return /* @__PURE__ */ t(
2034
- W,
2038
+ U,
2035
2039
  {
2036
2040
  size: "sm",
2037
2041
  intent: "ghost",
2038
- icon: h.icon,
2039
- "aria-pressed": L,
2040
- tooltip: p(h.label[0], h.label[1]),
2041
- onMouseDown: (M) => M.preventDefault(),
2042
- onClick: () => d(h.id)
2042
+ icon: v.icon,
2043
+ "aria-pressed": M,
2044
+ tooltip: p(v.label[0], v.label[1]),
2045
+ onMouseDown: (L) => L.preventDefault(),
2046
+ onClick: () => d(v.id)
2043
2047
  },
2044
- h.id
2048
+ v.id
2045
2049
  );
2046
2050
  })
2047
2051
  ] }, u === 0 ? "flow" : "align"))
@@ -2049,45 +2053,45 @@ function ks({
2049
2053
  ) })
2050
2054
  ] });
2051
2055
  }
2052
- function xs({
2056
+ function Cs({
2053
2057
  templates: n,
2054
2058
  onPick: a,
2055
2059
  onManage: d,
2056
2060
  noteEmpty: l,
2057
2061
  onOpenChange: p,
2058
- trigger: g,
2062
+ trigger: h,
2059
2063
  side: b = "top"
2060
2064
  }) {
2061
- const { t: f } = ie("ui"), y = je();
2062
- return /* @__PURE__ */ C(G.Root, { onOpenChange: p, children: [
2063
- /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: g }),
2064
- /* @__PURE__ */ C(G.Content, { side: b, align: "end", sideOffset: 8, children: [
2065
- /* @__PURE__ */ t(G.Label, { children: n.length > 0 ? f("editor.ai.templatesGroup") : f("editor.ai.noTemplates") }),
2066
- n.map((A) => /* @__PURE__ */ t(
2065
+ const { t: g } = ae("ui"), y = je();
2066
+ return /* @__PURE__ */ A(G.Root, { onOpenChange: p, children: [
2067
+ /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: h }),
2068
+ /* @__PURE__ */ A(G.Content, { side: b, align: "end", sideOffset: 8, children: [
2069
+ /* @__PURE__ */ t(G.Label, { children: n.length > 0 ? g("editor.ai.templatesGroup") : g("editor.ai.noTemplates") }),
2070
+ n.map((N) => /* @__PURE__ */ t(
2067
2071
  G.Item,
2068
2072
  {
2069
2073
  startIcon: /* @__PURE__ */ t(Pn, {}),
2070
- description: A.description || void 0,
2074
+ description: N.description || void 0,
2071
2075
  "aria-disabled": l || void 0,
2072
2076
  "aria-describedby": l ? y : void 0,
2073
2077
  className: "ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed",
2074
- onSelect: (w) => {
2078
+ onSelect: (k) => {
2075
2079
  if (l) {
2076
- w.preventDefault();
2080
+ k.preventDefault();
2077
2081
  return;
2078
2082
  }
2079
- a(A);
2083
+ a(N);
2080
2084
  },
2081
- children: A.name
2085
+ children: N.name
2082
2086
  },
2083
- A.id
2087
+ N.id
2084
2088
  )),
2085
2089
  l && n.length > 0 ? /* @__PURE__ */ t(
2086
2090
  "p",
2087
2091
  {
2088
2092
  id: y,
2089
2093
  className: "ds:m-0 ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-2xs)] ds:text-[length:var(--font-size-xs)] ds:text-[color:var(--muted-foreground)]",
2090
- children: f("editor.ai.templatesNoteEmpty")
2094
+ children: g("editor.ai.templatesNoteEmpty")
2091
2095
  }
2092
2096
  ) : null,
2093
2097
  d && n.length === 0 ? /* @__PURE__ */ t(
@@ -2095,121 +2099,123 @@ function xs({
2095
2099
  {
2096
2100
  startIcon: /* @__PURE__ */ t(Ti, {}),
2097
2101
  onSelect: () => d("create"),
2098
- children: f("editor.ai.createFirstTemplate")
2102
+ children: g("editor.ai.createFirstTemplate")
2099
2103
  }
2100
2104
  ) : null,
2101
- d && n.length > 0 ? /* @__PURE__ */ C(De, { children: [
2105
+ d && n.length > 0 ? /* @__PURE__ */ A(qe, { children: [
2102
2106
  /* @__PURE__ */ t(G.Separator, {}),
2103
2107
  /* @__PURE__ */ t(
2104
2108
  G.Item,
2105
2109
  {
2106
2110
  startIcon: /* @__PURE__ */ t(Ei, {}),
2107
2111
  onSelect: () => d("list"),
2108
- children: f("editor.ai.manageTemplates")
2112
+ children: g("editor.ai.manageTemplates")
2109
2113
  }
2110
2114
  )
2111
2115
  ] }) : null
2112
2116
  ] })
2113
2117
  ] });
2114
2118
  }
2115
- const Cs = [
2119
+ const As = [
2116
2120
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
2117
2121
  "ds:[inset-block-start:var(--rte-sel-top)] ds:[inset-inline-start:var(--rte-sel-start)]",
2118
2122
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
2119
2123
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]",
2120
2124
  lo
2121
- ].join(" "), As = ["bold", "italic", "underline", "strike"];
2122
- function Ns({
2125
+ ].join(" "), Ns = ["bold", "italic", "underline", "strike"];
2126
+ function Ts({
2123
2127
  active: n,
2124
2128
  run: a,
2125
2129
  areaRef: d,
2126
2130
  getEditorRoot: l,
2127
2131
  suppressed: p = !1,
2128
- holdOpen: g = !1,
2132
+ holdOpen: h = !1,
2129
2133
  children: b
2130
2134
  }) {
2131
- const { t: f } = ie("ui"), y = x(null), [A, w] = E(null), N = x(g);
2135
+ const { t: g } = ae("ui"), y = C(null), [N, k] = E(null), T = C(h);
2132
2136
  return I(() => {
2133
- N.current = g;
2134
- }, [g]), I(() => {
2137
+ T.current = h;
2138
+ }, [h]), I(() => {
2135
2139
  if (p || typeof window > "u") {
2136
- w(null);
2140
+ k(null);
2137
2141
  return;
2138
2142
  }
2139
- let z = !1, R = 0, q = !1, m = !1;
2143
+ let S = !1, z = 0, D = !1, f = !1;
2140
2144
  const u = () => {
2141
- var se;
2142
- if (N.current || z) return;
2143
- if (m) {
2144
- w(null);
2145
+ D = !1, k(null);
2146
+ }, v = () => {
2147
+ var Ne;
2148
+ if (T.current || S) return;
2149
+ if (f) {
2150
+ u();
2145
2151
  return;
2146
2152
  }
2147
- const O = d.current, F = l(), T = window.getSelection();
2148
- if (!O || !F || !T || T.rangeCount === 0 || T.isCollapsed || !O.contains(document.activeElement)) {
2149
- w(null);
2153
+ const P = d.current, x = l(), Q = window.getSelection();
2154
+ if (!P || !x || !Q || Q.rangeCount === 0 || Q.isCollapsed || !P.contains(document.activeElement)) {
2155
+ u();
2150
2156
  return;
2151
2157
  }
2152
- const J = T.getRangeAt(0);
2153
- if (!F.contains(J.commonAncestorContainer)) {
2154
- w(null);
2158
+ const K = Q.getRangeAt(0);
2159
+ if (!x.contains(K.commonAncestorContainer)) {
2160
+ u();
2155
2161
  return;
2156
2162
  }
2157
- if (!J.toString().trim()) {
2158
- w(null);
2163
+ if (!K.toString().trim()) {
2164
+ u();
2159
2165
  return;
2160
2166
  }
2161
- const j = O.getBoundingClientRect(), Z = J.getBoundingClientRect(), pe = getComputedStyle(O).direction === "rtl", Y = Z.top - j.top - 48, Te = Y >= 0 ? Y : Z.bottom - j.top + 8, X = ((se = y.current) == null ? void 0 : se.offsetWidth) ?? 0, ze = pe ? j.right - Z.right + Z.width / 2 : Z.left - j.left + Z.width / 2, D = X / 2, ae = Math.min(
2162
- Math.max(ze, D),
2163
- Math.max(D, j.width - D)
2167
+ const Y = P.getBoundingClientRect(), se = K.getBoundingClientRect(), te = getComputedStyle(P).direction === "rtl", Ae = se.top - Y.top - 48, J = Ae >= 0 ? Ae : se.bottom - Y.top + 8, Re = ((Ne = y.current) == null ? void 0 : Ne.offsetWidth) ?? 0, q = te ? Y.right - se.right + se.width / 2 : se.left - Y.left + se.width / 2, ne = Re / 2, ce = Math.min(
2168
+ Math.max(q, ne),
2169
+ Math.max(ne, Y.width - ne)
2164
2170
  );
2165
- w({ top: Te, start: ae, rtl: pe }), X === 0 && !q && (q = !0, R = requestAnimationFrame(u));
2166
- }, h = () => {
2167
- cancelAnimationFrame(R), R = requestAnimationFrame(u);
2168
- }, L = (O) => {
2169
- const F = l();
2170
- F && O.target instanceof Node && F.contains(O.target) && (z = !0, w(null));
2171
+ k({ top: J, start: ce, rtl: te }), Re === 0 && !D && (D = !0, z = requestAnimationFrame(v));
2171
2172
  }, M = () => {
2172
- z && (z = !1, h());
2173
- }, P = (O) => {
2174
- if (O.key !== "Escape") return;
2175
- const F = d.current;
2176
- !F || !F.contains(document.activeElement) || (m = !0, w(null));
2177
- }, U = () => {
2178
- m = !1, h();
2173
+ cancelAnimationFrame(z), z = requestAnimationFrame(v);
2174
+ }, L = (P) => {
2175
+ const x = l();
2176
+ x && P.target instanceof Node && x.contains(P.target) && (S = !0, u());
2177
+ }, O = () => {
2178
+ S && (S = !1, M());
2179
+ }, W = (P) => {
2180
+ if (P.key !== "Escape") return;
2181
+ const x = d.current;
2182
+ !x || !x.contains(document.activeElement) || (f = !0, u());
2183
+ }, j = () => {
2184
+ f = !1, M();
2179
2185
  };
2180
- return document.addEventListener("selectionchange", U), document.addEventListener("focusin", h), document.addEventListener("keydown", P, !0), document.addEventListener("pointerdown", L, !0), document.addEventListener("pointerup", M, !0), document.addEventListener("pointercancel", M, !0), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), h(), () => {
2181
- cancelAnimationFrame(R), document.removeEventListener("selectionchange", U), document.removeEventListener("focusin", h), document.removeEventListener("keydown", P, !0), document.removeEventListener("pointerdown", L, !0), document.removeEventListener("pointerup", M, !0), document.removeEventListener("pointercancel", M, !0), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
2186
+ return document.addEventListener("selectionchange", j), document.addEventListener("focusin", M), document.addEventListener("keydown", W, !0), document.addEventListener("pointerdown", L, !0), document.addEventListener("pointerup", O, !0), document.addEventListener("pointercancel", O, !0), window.addEventListener("scroll", M, !0), window.addEventListener("resize", M), M(), () => {
2187
+ cancelAnimationFrame(z), document.removeEventListener("selectionchange", j), document.removeEventListener("focusin", M), document.removeEventListener("keydown", W, !0), document.removeEventListener("pointerdown", L, !0), document.removeEventListener("pointerup", O, !0), document.removeEventListener("pointercancel", O, !0), window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M);
2182
2188
  };
2183
- }, [p, d, l]), p || !A ? null : /* @__PURE__ */ t(Vn, { children: /* @__PURE__ */ C(
2189
+ }, [p, d, l]), p || !N ? null : /* @__PURE__ */ t(Wn, { children: /* @__PURE__ */ A(
2184
2190
  "div",
2185
2191
  {
2186
2192
  ref: y,
2187
2193
  role: "group",
2188
- "aria-label": f("editor.ai.selectionTools"),
2194
+ "aria-label": g("editor.ai.selectionTools"),
2189
2195
  "data-component-part": "selection-toolbar",
2190
- className: `${Cs} ${A.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
2196
+ className: `${As} ${N.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
2191
2197
  style: {
2192
- "--rte-sel-top": `${A.top}px`,
2193
- "--rte-sel-start": `${A.start}px`
2198
+ "--rte-sel-top": `${N.top}px`,
2199
+ "--rte-sel-start": `${N.start}px`
2194
2200
  },
2195
2201
  children: [
2196
- As.map((z) => {
2197
- const R = ao[z];
2202
+ Ns.map((S) => {
2203
+ const z = ao[S];
2198
2204
  return /* @__PURE__ */ t(
2199
- W,
2205
+ U,
2200
2206
  {
2201
2207
  size: "sm",
2202
2208
  intent: "ghost",
2203
- icon: R.icon,
2204
- tooltip: f(R.label[0], R.label[1]),
2205
- "aria-pressed": R.toggle ? n.has(R.toggle) : void 0,
2206
- onMouseDown: (q) => q.preventDefault(),
2207
- onClick: () => a(...R.command)
2209
+ icon: z.icon,
2210
+ tooltip: g(z.label[0], z.label[1]),
2211
+ "aria-pressed": z.toggle ? n.has(z.toggle) : void 0,
2212
+ onMouseDown: (D) => D.preventDefault(),
2213
+ onClick: () => a(...z.command)
2208
2214
  },
2209
- z
2215
+ S
2210
2216
  );
2211
2217
  }),
2212
- b ? /* @__PURE__ */ C(De, { children: [
2218
+ b ? /* @__PURE__ */ A(qe, { children: [
2213
2219
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }),
2214
2220
  b
2215
2221
  ] }) : null
@@ -2217,97 +2223,97 @@ function Ns({
2217
2223
  }
2218
2224
  ) });
2219
2225
  }
2220
- function Ts({
2226
+ function Es({
2221
2227
  run: n,
2222
2228
  active: a,
2223
2229
  preset: d,
2224
2230
  insertHtml: l,
2225
2231
  insertTable: p,
2226
- saveSelection: g,
2232
+ saveSelection: h,
2227
2233
  restoreSelection: b,
2228
- getSelectedText: f,
2234
+ getSelectedText: g,
2229
2235
  uploadImage: y,
2230
- enableColor: A = !1,
2231
- enableImage: w = !1,
2232
- enableTable: N = !1,
2233
- showExtensions: z = !1,
2234
- extensionControl: R,
2235
- variables: q,
2236
- recentVariableTokens: m,
2236
+ enableColor: N = !1,
2237
+ enableImage: k = !1,
2238
+ enableTable: T = !1,
2239
+ showExtensions: S = !1,
2240
+ extensionControl: z,
2241
+ variables: D,
2242
+ recentVariableTokens: f,
2237
2243
  insertVariable: u
2238
2244
  }) {
2239
- const { t: h } = ie("ui"), L = (D) => D.preventDefault(), M = (D) => Za[d].includes(D), P = (D) => {
2240
- if (!M(D)) return null;
2241
- const ae = ao[D];
2245
+ const { t: v } = ae("ui"), M = (q) => q.preventDefault(), L = (q) => Za[d].includes(q), O = (q) => {
2246
+ if (!L(q)) return null;
2247
+ const ne = ao[q];
2242
2248
  return /* @__PURE__ */ t(
2243
- W,
2249
+ U,
2244
2250
  {
2245
2251
  size: "sm",
2246
2252
  intent: "ghost",
2247
- icon: ae.icon,
2248
- "aria-label": h(ae.label[0], ae.label[1]),
2249
- "aria-pressed": ae.toggle ? a.has(ae.toggle) : void 0,
2250
- onMouseDown: L,
2251
- onClick: () => n(...ae.command)
2253
+ icon: ne.icon,
2254
+ "aria-label": v(ne.label[0], ne.label[1]),
2255
+ "aria-pressed": ne.toggle ? a.has(ne.toggle) : void 0,
2256
+ onMouseDown: M,
2257
+ onClick: () => n(...ne.command)
2252
2258
  },
2253
- ae.id
2259
+ ne.id
2254
2260
  );
2255
- }, U = () => /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }), O = M("format"), F = [P("undo"), P("redo")].filter(Boolean), T = [
2256
- P("bold"),
2257
- P("italic"),
2258
- P("underline"),
2259
- P("strike"),
2260
- A ? /* @__PURE__ */ t(
2261
- os,
2261
+ }, W = () => /* @__PURE__ */ t("span", { "aria-hidden": "true", className: un }), j = L("format"), P = [O("undo"), O("redo")].filter(Boolean), x = [
2262
+ O("bold"),
2263
+ O("italic"),
2264
+ O("underline"),
2265
+ O("strike"),
2266
+ N ? /* @__PURE__ */ t(
2267
+ is,
2262
2268
  {
2263
2269
  run: n,
2264
- saveSelection: g,
2270
+ saveSelection: h,
2265
2271
  restoreSelection: b
2266
2272
  },
2267
2273
  "colour"
2268
2274
  ) : null,
2269
- A ? /* @__PURE__ */ t(
2270
- is,
2275
+ N ? /* @__PURE__ */ t(
2276
+ as,
2271
2277
  {
2272
2278
  run: n,
2273
- saveSelection: g,
2279
+ saveSelection: h,
2274
2280
  restoreSelection: b
2275
2281
  },
2276
2282
  "highlight"
2277
2283
  ) : null
2278
- ].filter(Boolean), J = F.length > 0 || O || T.length > 0, j = M("align") ? [
2284
+ ].filter(Boolean), Q = P.length > 0 || j || x.length > 0, K = L("align") ? [
2279
2285
  /* @__PURE__ */ t(
2280
- ts,
2286
+ ns,
2281
2287
  {
2282
2288
  run: n,
2283
2289
  active: a,
2284
- onTriggerDown: L
2290
+ onTriggerDown: M
2285
2291
  },
2286
2292
  "align"
2287
2293
  )
2288
- ] : [], Z = [P("ul"), P("ol")].filter(Boolean), pe = [
2289
- M("link") ? /* @__PURE__ */ t(
2290
- ns,
2294
+ ] : [], Y = [O("ul"), O("ol")].filter(Boolean), se = [
2295
+ L("link") ? /* @__PURE__ */ t(
2296
+ rs,
2291
2297
  {
2292
2298
  insertHtml: l,
2293
- saveSelection: g,
2299
+ saveSelection: h,
2294
2300
  restoreSelection: b,
2295
- getSelectedText: f
2301
+ getSelectedText: g
2296
2302
  },
2297
2303
  "link"
2298
2304
  ) : null,
2299
- w ? /* @__PURE__ */ t(
2300
- rs,
2305
+ k ? /* @__PURE__ */ t(
2306
+ os,
2301
2307
  {
2302
2308
  insertHtml: l,
2303
- saveSelection: g,
2309
+ saveSelection: h,
2304
2310
  restoreSelection: b,
2305
2311
  uploadImage: y
2306
2312
  },
2307
2313
  "image"
2308
2314
  ) : null,
2309
- N ? /* @__PURE__ */ t(
2310
- ss,
2315
+ T ? /* @__PURE__ */ t(
2316
+ ls,
2311
2317
  {
2312
2318
  run: n,
2313
2319
  insertTable: p,
@@ -2315,70 +2321,70 @@ function Ts({
2315
2321
  },
2316
2322
  "table"
2317
2323
  ) : null,
2318
- q && q.length > 0 && u ? /* @__PURE__ */ t(
2319
- Ya,
2324
+ D && D.length > 0 && u ? /* @__PURE__ */ t(
2325
+ es,
2320
2326
  {
2321
- variables: q,
2322
- recentVariableTokens: m,
2327
+ variables: D,
2328
+ recentVariableTokens: f,
2323
2329
  insertVariable: u,
2324
- saveSelection: g
2330
+ saveSelection: h
2325
2331
  },
2326
2332
  "variables"
2327
2333
  ) : null
2328
- ].filter(Boolean), Y = R ? [/* @__PURE__ */ t(vt, { children: R }, "extensions")] : z ? [
2334
+ ].filter(Boolean), te = z ? [/* @__PURE__ */ t(vt, { children: z }, "extensions")] : S ? [
2329
2335
  /* @__PURE__ */ t(
2330
- W,
2336
+ U,
2331
2337
  {
2332
2338
  size: "sm",
2333
2339
  intent: "ghost",
2334
2340
  icon: /* @__PURE__ */ t(Bn, {}),
2335
- "aria-label": h("editor.extensions", "Editor extensions"),
2341
+ "aria-label": v("editor.extensions", "Editor extensions"),
2336
2342
  disabled: !0,
2337
- onMouseDown: L
2343
+ onMouseDown: M
2338
2344
  },
2339
2345
  "extensions"
2340
2346
  )
2341
- ] : [], Te = [
2342
- j,
2343
- Z,
2344
- pe,
2345
- Y
2346
- ].filter((D) => D.length > 0), X = Te.length > 0, ze = (D) => Te.map((ae, se) => /* @__PURE__ */ C(vt, { children: [
2347
- se > 0 || D ? /* @__PURE__ */ t(U, {}) : null,
2348
- ae
2349
- ] }, se));
2347
+ ] : [], Ae = [
2348
+ K,
2349
+ Y,
2350
+ se,
2351
+ te
2352
+ ].filter((q) => q.length > 0), J = Ae.length > 0, Re = (q) => Ae.map((ne, ce) => /* @__PURE__ */ A(vt, { children: [
2353
+ ce > 0 || q ? /* @__PURE__ */ t(W, {}) : null,
2354
+ ne
2355
+ ] }, ce));
2350
2356
  return (
2351
2357
  // Outer element is the query container + visual chrome; the flex row is an
2352
2358
  // inner child so `container-type` never lands on the flex parent (which
2353
2359
  // would blockify the inline controls).
2354
- /* @__PURE__ */ t("div", { className: Qa(), "data-component": "editor-toolbar", children: /* @__PURE__ */ C(
2360
+ /* @__PURE__ */ t("div", { className: Qa(), "data-component": "editor-toolbar", children: /* @__PURE__ */ A(
2355
2361
  "div",
2356
2362
  {
2357
2363
  role: "group",
2358
- "aria-label": h("editor.toolbarLabel"),
2364
+ "aria-label": v("editor.toolbarLabel"),
2359
2365
  className: Ja,
2360
2366
  children: [
2361
- F,
2362
- F.length > 0 && (O || T.length > 0) ? /* @__PURE__ */ t(U, {}) : null,
2363
- O ? /* @__PURE__ */ t(es, { run: n, active: a, onTriggerDown: L }) : null,
2364
- O && T.length > 0 ? /* @__PURE__ */ t(U, {}) : null,
2365
- T,
2366
- X ? /* @__PURE__ */ C(De, { children: [
2367
- /* @__PURE__ */ t("div", { className: "ds:hidden ds:@[384px]/toolbar:contents", children: ze(J) }),
2368
- /* @__PURE__ */ C("div", { className: "ds:contents ds:@[384px]/toolbar:hidden", children: [
2369
- J ? /* @__PURE__ */ t(U, {}) : null,
2370
- /* @__PURE__ */ C(oe, { children: [
2371
- /* @__PURE__ */ t(oe.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
2372
- W,
2367
+ P,
2368
+ P.length > 0 && (j || x.length > 0) ? /* @__PURE__ */ t(W, {}) : null,
2369
+ j ? /* @__PURE__ */ t(ts, { run: n, active: a, onTriggerDown: M }) : null,
2370
+ j && x.length > 0 ? /* @__PURE__ */ t(W, {}) : null,
2371
+ x,
2372
+ J ? /* @__PURE__ */ A(qe, { children: [
2373
+ /* @__PURE__ */ t("div", { className: "ds:hidden ds:@[384px]/toolbar:contents", children: Re(Q) }),
2374
+ /* @__PURE__ */ A("div", { className: "ds:contents ds:@[384px]/toolbar:hidden", children: [
2375
+ Q ? /* @__PURE__ */ t(W, {}) : null,
2376
+ /* @__PURE__ */ A(ie, { children: [
2377
+ /* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
2378
+ U,
2373
2379
  {
2374
2380
  size: "sm",
2375
2381
  intent: "ghost",
2376
2382
  icon: /* @__PURE__ */ t(Ci, {}),
2377
- "aria-label": h("editor.more", "More options"),
2378
- onMouseDown: L
2383
+ "aria-label": v("editor.more", "More options"),
2384
+ onMouseDown: M
2379
2385
  }
2380
2386
  ) }),
2381
- /* @__PURE__ */ t(oe.Content, { side: "bottom", align: "end", children: /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: ze(!1) }) })
2387
+ /* @__PURE__ */ t(ie.Content, { side: "bottom", align: "end", children: /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: Re(!1) }) })
2382
2388
  ] })
2383
2389
  ] })
2384
2390
  ] }) : null
@@ -2387,7 +2393,7 @@ function Ts({
2387
2393
  ) })
2388
2394
  );
2389
2395
  }
2390
- function Ae(n) {
2396
+ function Te(n) {
2391
2397
  return ii(n, "rich-text");
2392
2398
  }
2393
2399
  function sn(n = "") {
@@ -2403,27 +2409,27 @@ function Wr(n) {
2403
2409
  '<img loading="lazy"$1>'
2404
2410
  );
2405
2411
  }
2406
- const On = /^[A-Za-z0-9_]+$/, uo = /\[\[([A-Za-z0-9_]+)\]\]/g, Gn = "rte-variable-invalid", Es = new RegExp(
2407
- `\\s*\\b${Gn}\\b`,
2412
+ const Rs = Fn.join(", "), Ms = 10, On = /^[A-Za-z0-9_]+$/, uo = /\[\[([A-Za-z0-9_]+)\]\]/g, Kn = "rte-variable-invalid", zs = new RegExp(
2413
+ `\\s*\\b${Kn}\\b`,
2408
2414
  "g"
2409
2415
  );
2410
2416
  function Xr(n) {
2411
2417
  return n.includes('data-redactor-type="variable"') ? n.replace(
2412
2418
  /<span\b[^>]*data-redactor-type="variable"[^>]*>/g,
2413
- (a) => a.replace(/\s(?:data-label|title)="[^"]*"/g, "").replace(Es, "").replace(/\sclass=""/g, "")
2419
+ (a) => a.replace(/\s(?:data-label|title)="[^"]*"/g, "").replace(zs, "").replace(/\sclass=""/g, "")
2414
2420
  ) : n;
2415
2421
  }
2416
- function Rs(n) {
2422
+ function Ss(n) {
2417
2423
  const a = n.replace(/<[^>]*>/g, " ");
2418
2424
  return Array.from(a.matchAll(uo), (d) => d[1]);
2419
2425
  }
2420
2426
  function Ur(n) {
2421
2427
  return typeof n == "object" && n !== null && "name" in n && n.name === "AiCreditsExhaustedError";
2422
2428
  }
2423
- function Ms(n) {
2429
+ function Ls(n) {
2424
2430
  return typeof n == "object" && n !== null && "name" in n && n.name === "AbortError";
2425
2431
  }
2426
- function zs(n) {
2432
+ function _s(n) {
2427
2433
  const a = document.createElement("template");
2428
2434
  return a.content.appendChild(n), a.innerHTML;
2429
2435
  }
@@ -2434,7 +2440,7 @@ function Zr(n) {
2434
2440
  function Qr(n) {
2435
2441
  return n.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, "").replace(/[\s\u200B\uFEFF]+/g, "");
2436
2442
  }
2437
- function Ss(n) {
2443
+ function Is(n) {
2438
2444
  const a = window.getSelection();
2439
2445
  if (!a || a.rangeCount === 0) return null;
2440
2446
  const d = a.getRangeAt(0);
@@ -2442,22 +2448,22 @@ function Ss(n) {
2442
2448
  const l = document.createRange();
2443
2449
  return l.selectNodeContents(n), l.setEnd(d.startContainer, d.startOffset), l.toString().length;
2444
2450
  }
2445
- function Ls(n, a) {
2446
- var g;
2451
+ function $s(n, a) {
2452
+ var h;
2447
2453
  const d = window.getSelection();
2448
2454
  if (!d) return;
2449
2455
  const l = document.createTreeWalker(n, NodeFilter.SHOW_TEXT);
2450
2456
  let p = 0;
2451
2457
  for (let b = l.nextNode(); b; b = l.nextNode()) {
2452
- const f = b;
2453
- if (p + f.data.length >= a) {
2454
- const y = document.createRange(), A = (g = f.parentElement) == null ? void 0 : g.closest(
2458
+ const g = b;
2459
+ if (p + g.data.length >= a) {
2460
+ const y = document.createRange(), N = (h = g.parentElement) == null ? void 0 : h.closest(
2455
2461
  '[data-redactor-type="variable"]'
2456
2462
  );
2457
- A ? y.setStartAfter(A) : y.setStart(f, a - p), y.collapse(!0), d.removeAllRanges(), d.addRange(y);
2463
+ N ? y.setStartAfter(N) : y.setStart(g, a - p), y.collapse(!0), d.removeAllRanges(), d.addRange(y);
2458
2464
  return;
2459
2465
  }
2460
- p += f.data.length;
2466
+ p += g.data.length;
2461
2467
  }
2462
2468
  }
2463
2469
  function Jr(n) {
@@ -2471,26 +2477,26 @@ function bt(n, a) {
2471
2477
  `<body>${n}</body>`,
2472
2478
  "text/html"
2473
2479
  ), l = d.createTreeWalker(d.body, NodeFilter.SHOW_TEXT), p = [];
2474
- for (let f = l.nextNode(); f; f = l.nextNode()) {
2475
- const y = f;
2480
+ for (let g = l.nextNode(); g; g = l.nextNode()) {
2481
+ const y = g;
2476
2482
  (b = y.parentElement) != null && b.closest('[data-redactor-type="variable"]') || y.data.includes("[[") && p.push(y);
2477
2483
  }
2478
- let g = !1;
2479
- for (const f of p) {
2484
+ let h = !1;
2485
+ for (const g of p) {
2480
2486
  const y = d.createDocumentFragment();
2481
- let A = 0;
2482
- for (const w of f.data.matchAll(uo)) {
2483
- const N = a.get(w[1].toLowerCase());
2484
- if (!N || w.index === void 0) continue;
2485
- y.append(f.data.slice(A, w.index));
2486
- const z = d.createElement("span");
2487
- z.setAttribute("data-redactor-type", "variable"), z.textContent = `[[${N}]]`, y.append(z), A = w.index + w[0].length;
2487
+ let N = 0;
2488
+ for (const k of g.data.matchAll(uo)) {
2489
+ const T = a.get(k[1].toLowerCase());
2490
+ if (!T || k.index === void 0) continue;
2491
+ y.append(g.data.slice(N, k.index));
2492
+ const S = d.createElement("span");
2493
+ S.setAttribute("data-redactor-type", "variable"), S.textContent = `[[${T}]]`, y.append(S), N = k.index + k[0].length;
2488
2494
  }
2489
- A !== 0 && (y.append(f.data.slice(A)), f.replaceWith(y), g = !0);
2495
+ N !== 0 && (y.append(g.data.slice(N)), g.replaceWith(y), h = !0);
2490
2496
  }
2491
- return g ? d.body.innerHTML : n;
2497
+ return h ? d.body.innerHTML : n;
2492
2498
  }
2493
- function _s(n) {
2499
+ function Hs(n) {
2494
2500
  if (!n || typeof n != "object") return;
2495
2501
  const a = n, d = (l) => {
2496
2502
  if (l && typeof l == "object" && "url" in l) {
@@ -2500,13 +2506,13 @@ function _s(n) {
2500
2506
  };
2501
2507
  return typeof a.url == "string" ? a.url : d(a.file) ?? d(a.data) ?? Object.values(a).map(d).find(Boolean);
2502
2508
  }
2503
- function Is(n) {
2509
+ function Os(n) {
2504
2510
  if (n) return n;
2505
2511
  if (typeof window > "u") return null;
2506
2512
  const a = window;
2507
2513
  return a.$R ?? a.Redactor ?? null;
2508
2514
  }
2509
- const $s = {
2515
+ const Ds = {
2510
2516
  bold: ["module.inline.format", { tag: "b" }],
2511
2517
  italic: ["module.inline.format", { tag: "i" }],
2512
2518
  strikethrough: ["module.inline.format", { tag: "del" }],
@@ -2515,20 +2521,20 @@ const $s = {
2515
2521
  heading: ["module.block.format", { tag: "h2" }],
2516
2522
  quote: ["module.block.format", { tag: "blockquote" }],
2517
2523
  paragraph: ["module.block.format", { tag: "p" }]
2518
- }, Hs = {
2524
+ }, qs = {
2519
2525
  zh: "zh_cn",
2520
2526
  pt: "pt_br"
2521
2527
  };
2522
- function Os(n) {
2528
+ function Ps(n) {
2523
2529
  const a = n.split("-")[0];
2524
- return Hs[a] ?? a ?? "en";
2530
+ return qs[a] ?? a ?? "en";
2525
2531
  }
2526
- const Ds = yt(
2532
+ const Bs = yt(
2527
2533
  "redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
2528
- ), qs = [
2534
+ ), Fs = [
2529
2535
  "ds:absolute ds:z-30",
2530
2536
  "ds:[inset-inline-start:var(--rte-typeahead-x)] ds:[inset-block-start:var(--rte-typeahead-y)]"
2531
- ].join(" "), Ps = yt(
2537
+ ].join(" "), js = yt(
2532
2538
  [
2533
2539
  "ds:block ds:[inline-size:100%]",
2534
2540
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--control-border)]",
@@ -2542,94 +2548,94 @@ const Ds = yt(
2542
2548
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2543
2549
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
2544
2550
  ].join(" ")
2545
- ), Bs = Yr({ recording: !1 }), Fs = Yr({ recording: !0 });
2551
+ ), Gs = Yr({ recording: !1 }), Ks = Yr({ recording: !0 });
2546
2552
  function ln(n, a) {
2547
2553
  return a ? { "aria-label": n } : { tooltip: n };
2548
2554
  }
2549
2555
  const mo = ["kit", "marketplace"];
2550
- function js({
2556
+ function Vs({
2551
2557
  groupedExtensions: n,
2552
2558
  showExtensionGroups: a,
2553
2559
  extensionPending: d,
2554
2560
  extensionSession: l,
2555
2561
  extensionError: p,
2556
- openExtension: g,
2562
+ openExtension: h,
2557
2563
  closeExtension: b,
2558
- saveSelection: f,
2564
+ saveSelection: g,
2559
2565
  closeSignal: y,
2560
- restoreFocusOnCloseRef: A
2566
+ restoreFocusOnCloseRef: N
2561
2567
  }) {
2562
- const { t: w } = ie("ui"), [N, z] = E(!1), R = x(null), q = x(!1);
2568
+ const { t: k } = ae("ui"), [T, S] = E(!1), z = C(null), D = C(!1);
2563
2569
  return I(() => {
2564
- z(!1);
2570
+ S(!1);
2565
2571
  }, [y]), I(() => {
2566
- q.current && !l && (q.current = !1, A.current && window.requestAnimationFrame(() => {
2567
- var m;
2568
- return (m = R.current) == null ? void 0 : m.focus();
2572
+ D.current && !l && (D.current = !1, N.current && window.requestAnimationFrame(() => {
2573
+ var f;
2574
+ return (f = z.current) == null ? void 0 : f.focus();
2569
2575
  }));
2570
- }, [l, A]), /* @__PURE__ */ C(
2576
+ }, [l, N]), /* @__PURE__ */ A(
2571
2577
  G.Root,
2572
2578
  {
2573
- open: N,
2574
- onOpenChange: (m) => {
2575
- m ? (f(), z(!0)) : (z(!1), d && b());
2579
+ open: T,
2580
+ onOpenChange: (f) => {
2581
+ f ? (g(), S(!0)) : (S(!1), d && b());
2576
2582
  },
2577
2583
  children: [
2578
2584
  /* @__PURE__ */ t(G.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
2579
- W,
2585
+ U,
2580
2586
  {
2581
- ref: R,
2587
+ ref: z,
2582
2588
  "data-component-part": "extensions-trigger",
2583
2589
  size: "sm",
2584
2590
  intent: "ghost",
2585
2591
  icon: /* @__PURE__ */ t(Bn, {}),
2586
- "aria-label": w("editor.extensions"),
2587
- onPointerDown: () => f()
2592
+ "aria-label": k("editor.extensions"),
2593
+ onPointerDown: () => g()
2588
2594
  }
2589
2595
  ) }),
2590
2596
  /* @__PURE__ */ t(
2591
2597
  G.Content,
2592
2598
  {
2593
2599
  align: "end",
2594
- onCloseAutoFocus: (m) => {
2595
- (l == null ? void 0 : l.extension.kind) === "panel" && !p && m.preventDefault();
2600
+ onCloseAutoFocus: (f) => {
2601
+ (l == null ? void 0 : l.extension.kind) === "panel" && !p && f.preventDefault();
2596
2602
  },
2597
2603
  children: n.map(
2598
- (m, u) => m.length > 0 ? /* @__PURE__ */ C(vt, { children: [
2599
- a ? /* @__PURE__ */ t(G.Label, { children: w(
2604
+ (f, u) => f.length > 0 ? /* @__PURE__ */ A(vt, { children: [
2605
+ a ? /* @__PURE__ */ t(G.Label, { children: k(
2600
2606
  u === 0 ? "editor.extensionsKit" : "editor.extensionsMarketplace"
2601
2607
  ) }) : null,
2602
- m.map((h) => {
2603
- var L;
2604
- return /* @__PURE__ */ C(
2608
+ f.map((v) => {
2609
+ var M;
2610
+ return /* @__PURE__ */ A(
2605
2611
  G.Item,
2606
2612
  {
2607
- "data-extension-id": h.id,
2608
- disabled: d && (l == null ? void 0 : l.extension.id) !== h.id,
2609
- "aria-busy": d && (l == null ? void 0 : l.extension.id) === h.id || void 0,
2610
- onSelect: (M) => {
2611
- h.kind === "action" && M.preventDefault(), q.current = !0, g(h);
2613
+ "data-extension-id": v.id,
2614
+ disabled: d && (l == null ? void 0 : l.extension.id) !== v.id,
2615
+ "aria-busy": d && (l == null ? void 0 : l.extension.id) === v.id || void 0,
2616
+ onSelect: (L) => {
2617
+ v.kind === "action" && L.preventDefault(), D.current = !0, h(v);
2612
2618
  },
2613
2619
  children: [
2614
- d && (l == null ? void 0 : l.extension.id) === h.id ? /* @__PURE__ */ t(Kn, { size: "sm" }) : h.icon ?? /* @__PURE__ */ t(Bn, {}),
2615
- /* @__PURE__ */ C("span", { className: "ds:flex ds:min-w-0 ds:flex-col ds:text-start", children: [
2616
- /* @__PURE__ */ t("span", { children: io(w, h.label) }),
2617
- h.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: h.description }) : null,
2618
- ((L = h.source) == null ? void 0 : L.kind) === "marketplace" ? /* @__PURE__ */ C("span", { className: "type-meta ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-muted-foreground", children: [
2619
- h.source.appIconUrl ? /* @__PURE__ */ t(
2620
+ d && (l == null ? void 0 : l.extension.id) === v.id ? /* @__PURE__ */ t(Vn, { size: "sm" }) : v.icon ?? /* @__PURE__ */ t(Bn, {}),
2621
+ /* @__PURE__ */ A("span", { className: "ds:flex ds:min-w-0 ds:flex-col ds:text-start", children: [
2622
+ /* @__PURE__ */ t("span", { children: io(k, v.label) }),
2623
+ v.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: v.description }) : null,
2624
+ ((M = v.source) == null ? void 0 : M.kind) === "marketplace" ? /* @__PURE__ */ A("span", { className: "type-meta ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-muted-foreground", children: [
2625
+ v.source.appIconUrl ? /* @__PURE__ */ t(
2620
2626
  "img",
2621
2627
  {
2622
- src: h.source.appIconUrl,
2628
+ src: v.source.appIconUrl,
2623
2629
  alt: "",
2624
2630
  className: "ds:size-[var(--spacing-md)]"
2625
2631
  }
2626
2632
  ) : null,
2627
- h.source.appName
2633
+ v.source.appName
2628
2634
  ] }) : null
2629
2635
  ] })
2630
2636
  ]
2631
2637
  },
2632
- h.id
2638
+ v.id
2633
2639
  );
2634
2640
  })
2635
2641
  ] }, mo[u]) : null
@@ -2640,62 +2646,62 @@ function js({
2640
2646
  }
2641
2647
  );
2642
2648
  }
2643
- const Gs = ni(
2649
+ const Ws = ni(
2644
2650
  ({
2645
2651
  id: n,
2646
2652
  defaultValue: a,
2647
2653
  value: d,
2648
2654
  onChange: l,
2649
2655
  toolbar: p = "standard",
2650
- placeholder: g,
2656
+ placeholder: h,
2651
2657
  readOnly: b = !1,
2652
- ariaLabel: f,
2658
+ ariaLabel: g,
2653
2659
  minHeight: y,
2654
- showExtensions: A,
2655
- extensions: w,
2656
- extensionContext: N,
2657
- onExtensionRun: z,
2658
- className: R,
2659
- redactor: q,
2660
- options: m,
2660
+ showExtensions: N,
2661
+ extensions: k,
2662
+ extensionContext: T,
2663
+ onExtensionRun: S,
2664
+ className: z,
2665
+ redactor: D,
2666
+ options: f,
2661
2667
  plugins: u,
2662
- lang: h,
2663
- imageUploadUrl: L,
2664
- onUploadImage: M,
2665
- onKeyDown: P,
2666
- onRequestAiDraft: U,
2667
- aiDraftFormat: O = "html",
2668
- aiPrivacyNotice: F,
2669
- aiConsent: T,
2670
- aiConsentHeadingLevel: J,
2671
- onDictate: j,
2672
- onProofread: Z,
2673
- onAutoFormat: pe,
2674
- aiTemplates: Y,
2675
- onAiApplied: Te,
2676
- aiSparkle: X = !0,
2677
- selectionToolbar: ze,
2678
- variables: D,
2679
- recentVariableTokens: ae,
2680
- onVariableInserted: se,
2681
- validateVariable: qe,
2668
+ lang: v,
2669
+ imageUploadUrl: M,
2670
+ onUploadImage: L,
2671
+ onKeyDown: O,
2672
+ onRequestAiDraft: W,
2673
+ aiDraftFormat: j = "html",
2674
+ aiPrivacyNotice: P,
2675
+ aiConsent: x,
2676
+ aiConsentHeadingLevel: Q,
2677
+ onDictate: K,
2678
+ onProofread: Y,
2679
+ onAutoFormat: se,
2680
+ aiTemplates: te,
2681
+ onAiApplied: Ae,
2682
+ aiSparkle: J = !0,
2683
+ selectionToolbar: Re,
2684
+ variables: q,
2685
+ recentVariableTokens: ne,
2686
+ onVariableInserted: ce,
2687
+ validateVariable: Ne,
2682
2688
  onVariableValidityChange: ot,
2683
2689
  renderHelpMeWrite: B,
2684
- onAiCreditsExhausted: K,
2685
- aiCreditsNotice: Ee
2686
- }, me) => {
2687
- var Lr, _r;
2688
- const { t: _, i18n: it } = ie("ui"), _t = je(), Ge = gt(
2689
- () => `rte-${_t.replace(/[^a-zA-Z0-9-_]/g, "")}`,
2690
- [_t]
2691
- ), H = `#${Ge}`, ee = x(null), te = x(null), Se = x(null), mn = x(!1), It = x(b), Q = x(null), wt = x(null), [fe, Un] = E(!1), [kt, Pe] = E(!1), [ve, Zn] = E(null), [fn, Qn] = E(!1), [gn, hn] = E(!1), xt = x(null), $t = x(z);
2692
- $t.current = z;
2693
- const Ke = x(null), [fo, go] = E(0), Jn = x(!0), pn = k((e = !0) => {
2694
- Jn.current = e, go((r) => r + 1);
2695
- }, []), bn = k(() => {
2690
+ onAiCreditsExhausted: X,
2691
+ aiCreditsNotice: Me
2692
+ }, ge) => {
2693
+ var _r, Ir;
2694
+ const { t: _, i18n: it } = ae("ui"), It = je(), Ge = gt(
2695
+ () => `rte-${It.replace(/[^a-zA-Z0-9-_]/g, "")}`,
2696
+ [It]
2697
+ ), $ = `#${Ge}`, re = C(null), ee = C(null), Le = C(null), mn = C(!1), wt = C(b), Z = C(null), kt = C(null), [he, Zn] = E(!1), [xt, Pe] = E(!1), [we, Qn] = E(null), [fn, Jn] = E(!1), [gn, hn] = E(!1), Ct = C(null), $t = C(S);
2698
+ $t.current = S;
2699
+ const Ke = C(null), [fo, go] = E(0), Yn = C(!0), pn = w((e = !0) => {
2700
+ Yn.current = e, go((r) => r + 1);
2701
+ }, []), bn = w(() => {
2696
2702
  var e, r;
2697
- (e = xt.current) == null || e.abort(), xt.current = null, (r = Ke.current) == null || r.call(Ke, { status: "aborted" }), Zn(null), hn(!1), Qn(!1);
2698
- }, []), Le = k(
2703
+ (e = Ct.current) == null || e.abort(), Ct.current = null, (r = Ke.current) == null || r.call(Ke, { status: "aborted" }), Qn(null), hn(!1), Jn(!1);
2704
+ }, []), _e = w(
2699
2705
  (e = !0) => {
2700
2706
  bn(), pn(e);
2701
2707
  },
@@ -2704,159 +2710,159 @@ const Gs = ni(
2704
2710
  I(
2705
2711
  () => () => {
2706
2712
  var e, r;
2707
- (e = xt.current) == null || e.abort(), (r = Ke.current) == null || r.call(Ke, { status: "aborted" });
2713
+ (e = Ct.current) == null || e.abort(), (r = Ke.current) == null || r.call(Ke, { status: "aborted" });
2708
2714
  },
2709
2715
  []
2710
2716
  );
2711
2717
  const [ho, po] = E(""), [bo, vo] = E(
2712
2718
  "document"
2713
- ), [yo, vn] = E(!1), Ve = x(K), yn = x(B);
2719
+ ), [yo, vn] = E(!1), Ve = C(X), yn = C(B);
2714
2720
  I(() => {
2715
- Ve.current = K, yn.current = B;
2716
- }, [K, B]);
2717
- const Ht = x(null), ge = gt(
2721
+ Ve.current = X, yn.current = B;
2722
+ }, [X, B]);
2723
+ const Ht = C(null), pe = gt(
2718
2724
  () => new Map(
2719
- (D ?? []).map((e) => e.token).filter((e) => On.test(e)).map((e) => [e.toLowerCase(), e])
2725
+ (q ?? []).map((e) => e.token).filter((e) => On.test(e)).map((e) => [e.toLowerCase(), e])
2720
2726
  ),
2721
- [D]
2722
- ), Yn = gt(
2727
+ [q]
2728
+ ), er = gt(
2723
2729
  () => new Map(
2724
- (D ?? []).map(
2730
+ (q ?? []).map(
2725
2731
  (e) => [e.token.toLowerCase(), e.label]
2726
2732
  )
2727
2733
  ),
2728
- [D]
2729
- ), at = x(ge);
2734
+ [q]
2735
+ ), at = C(pe);
2730
2736
  I(() => {
2731
- at.current = ge;
2732
- }, [ge]);
2733
- const er = gt(
2734
- () => (D ?? []).filter((e) => On.test(e.token)),
2735
- [D]
2736
- ), wn = x(qe);
2737
+ at.current = pe;
2738
+ }, [pe]);
2739
+ const tr = gt(
2740
+ () => (q ?? []).filter((e) => On.test(e.token)),
2741
+ [q]
2742
+ ), wn = C(Ne);
2737
2743
  I(() => {
2738
- wn.current = qe;
2739
- }, [qe]);
2740
- const kn = qe !== void 0, xn = k(
2741
- (e) => kn && wn.current ? wn.current(e) : ge.has(e.toLowerCase()),
2742
- [kn, ge]
2743
- ), st = ge.size > 0 || kn, [lt, tr] = E([]), We = x(ot);
2744
+ wn.current = Ne;
2745
+ }, [Ne]);
2746
+ const kn = Ne !== void 0, xn = w(
2747
+ (e) => kn && wn.current ? wn.current(e) : pe.has(e.toLowerCase()),
2748
+ [kn, pe]
2749
+ ), st = pe.size > 0 || kn, [lt, nr] = E([]), We = C(ot);
2744
2750
  I(() => {
2745
2751
  We.current = ot;
2746
2752
  }, [ot]);
2747
- const _e = x(() => {
2753
+ const Ie = C(() => {
2748
2754
  }), [Cn, wo] = E(
2749
2755
  () => /* @__PURE__ */ new Set()
2750
- ), Ot = x(null), [ko, xo] = E(
2756
+ ), Ot = C(null), [ko, xo] = E(
2751
2757
  null
2752
- ), Dt = k((e) => {
2758
+ ), Dt = w((e) => {
2753
2759
  Ot.current = e, xo(e);
2754
- }, []), Ct = x(null), qt = x(null), he = x(l), Pt = x(P);
2760
+ }, []), At = C(null), qt = C(null), be = C(l), Pt = C(O);
2755
2761
  I(() => {
2756
- he.current = l, Pt.current = P;
2757
- }, [l, P]);
2758
- const Co = x(
2762
+ be.current = l, Pt.current = O;
2763
+ }, [l, O]);
2764
+ const Co = C(
2759
2765
  (() => {
2760
2766
  const e = d ?? a ?? "";
2761
- return e ? Ae(e) : "";
2767
+ return e ? Te(e) : "";
2762
2768
  })()
2763
- ), ce = k(() => {
2769
+ ), de = w(() => {
2764
2770
  var r;
2765
- const e = te.current;
2771
+ const e = ee.current;
2766
2772
  if (e)
2767
2773
  try {
2768
- const o = e(H, "source.getCode");
2774
+ const o = e($, "source.getCode");
2769
2775
  if (typeof o == "string") return Xr(o);
2770
2776
  } catch {
2771
2777
  }
2772
- return ((r = ee.current) == null ? void 0 : r.value) ?? "";
2773
- }, [H]);
2778
+ return ((r = re.current) == null ? void 0 : r.value) ?? "";
2779
+ }, [$]);
2774
2780
  I(() => {
2775
- _e.current = () => {
2781
+ Ie.current = () => {
2776
2782
  var o;
2777
2783
  if (!st) {
2778
- tr((i) => i.length ? [] : i);
2784
+ nr((i) => i.length ? [] : i);
2779
2785
  return;
2780
2786
  }
2781
- const e = (o = Q.current) == null ? void 0 : o.querySelector(".redactor-in");
2787
+ const e = (o = Z.current) == null ? void 0 : o.querySelector(".redactor-in");
2782
2788
  e == null || e.querySelectorAll('[data-redactor-type="variable"]').forEach((i) => {
2783
2789
  const s = /^\[\[([A-Za-z0-9_]+)\]\]$/.exec(
2784
2790
  i.textContent ?? ""
2785
2791
  ), c = !s || !xn(s[1]);
2786
- i.classList.contains(Gn) !== c && i.classList.toggle(Gn, c);
2787
- const v = s ? Yn.get(s[1].toLowerCase()) ?? s[1] : i.textContent ?? "";
2788
- i.getAttribute("data-label") !== v && i.setAttribute("data-label", v);
2789
- const S = i.textContent ?? "";
2790
- i.getAttribute("title") !== S && i.setAttribute("title", S);
2792
+ i.classList.contains(Kn) !== c && i.classList.toggle(Kn, c);
2793
+ const m = s ? er.get(s[1].toLowerCase()) ?? s[1] : i.textContent ?? "";
2794
+ i.getAttribute("data-label") !== m && i.setAttribute("data-label", m);
2795
+ const R = i.textContent ?? "";
2796
+ i.getAttribute("title") !== R && i.setAttribute("title", R);
2791
2797
  });
2792
2798
  const r = Array.from(
2793
2799
  new Set(
2794
- Rs(ce()).filter(
2800
+ Ss(de()).filter(
2795
2801
  (i) => !xn(i)
2796
2802
  )
2797
2803
  )
2798
2804
  );
2799
- tr(
2805
+ nr(
2800
2806
  (i) => i.length === r.length && i.every((s, c) => s === r[c]) ? i : r
2801
2807
  );
2802
- }, _e.current();
2803
- }, [st, xn, Yn, ce]), I(() => {
2808
+ }, Ie.current();
2809
+ }, [st, xn, er, de]), I(() => {
2804
2810
  var o;
2805
- const r = ((o = Q.current) == null ? void 0 : o.querySelector(".redactor-in")) ?? ee.current;
2811
+ const r = ((o = Z.current) == null ? void 0 : o.querySelector(".redactor-in")) ?? re.current;
2806
2812
  r && (lt.length > 0 ? (r.setAttribute("aria-invalid", "true"), r.setAttribute("aria-describedby", `${Ge}-variables-error`)) : (r.removeAttribute("aria-invalid"), r.removeAttribute("aria-describedby")));
2807
- }, [lt, Ge, fe]);
2808
- const An = x(!1);
2813
+ }, [lt, Ge, he]);
2814
+ const An = C(!1);
2809
2815
  I(() => {
2810
2816
  var e, r;
2811
2817
  st ? (An.current = !0, (e = We.current) == null || e.call(We, lt)) : An.current && (An.current = !1, (r = We.current) == null || r.call(We, []));
2812
2818
  }, [lt, st]), I(() => {
2813
- qe && _e.current();
2814
- }, [qe]);
2815
- const de = k(
2819
+ Ne && Ie.current();
2820
+ }, [Ne]);
2821
+ const ue = w(
2816
2822
  (e, ...r) => {
2817
- const o = te.current;
2823
+ const o = ee.current;
2818
2824
  if (!o) return !1;
2819
- const i = It.current;
2825
+ const i = wt.current;
2820
2826
  if (i)
2821
2827
  try {
2822
- o(H, "disableReadOnly");
2828
+ o($, "disableReadOnly");
2823
2829
  } catch {
2824
2830
  }
2825
2831
  try {
2826
- return o(H, e, ...r), !0;
2832
+ return o($, e, ...r), !0;
2827
2833
  } catch {
2828
2834
  return !1;
2829
2835
  } finally {
2830
2836
  if (i)
2831
2837
  try {
2832
- o(H, "enableReadOnly");
2838
+ o($, "enableReadOnly");
2833
2839
  } catch {
2834
2840
  }
2835
2841
  }
2836
2842
  },
2837
- [H]
2838
- ), ue = k(
2843
+ [$]
2844
+ ), me = w(
2839
2845
  (e, r) => {
2840
- var ne;
2841
- const o = (r == null ? void 0 : r.asHtml) ?? !0, i = o ? Ae(e) : e;
2842
- if (de(o ? "insertion.insertHtml" : "insertion.insertText", i)) return;
2843
- const c = ee.current;
2846
+ var V;
2847
+ const o = (r == null ? void 0 : r.asHtml) ?? !0, i = o ? Te(e) : e;
2848
+ if (ue(o ? "insertion.insertHtml" : "insertion.insertText", i)) return;
2849
+ const c = re.current;
2844
2850
  if (!c) return;
2845
- const v = c.selectionStart ?? c.value.length, S = c.selectionEnd ?? c.value.length;
2846
- c.value = c.value.slice(0, v) + i + c.value.slice(S);
2847
- const V = v + i.length;
2851
+ const m = c.selectionStart ?? c.value.length, R = c.selectionEnd ?? c.value.length;
2852
+ c.value = c.value.slice(0, m) + i + c.value.slice(R);
2853
+ const F = m + i.length;
2848
2854
  try {
2849
- c.setSelectionRange(V, V);
2855
+ c.setSelectionRange(F, F);
2850
2856
  } catch {
2851
2857
  }
2852
- (ne = he.current) == null || ne.call(he, { html: Ae(c.value), markdown: "" });
2858
+ (V = be.current) == null || V.call(be, { html: Te(c.value), markdown: "" });
2853
2859
  },
2854
- [de]
2855
- ), ye = x(null), we = k(() => {
2860
+ [ue]
2861
+ ), ke = C(null), ve = w(() => {
2856
2862
  var i;
2857
- const e = (i = Q.current) == null ? void 0 : i.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, o = /* @__PURE__ */ new Set();
2863
+ const e = (i = Z.current) == null ? void 0 : i.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, o = /* @__PURE__ */ new Set();
2858
2864
  if (e && r && r.anchorNode && e.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
2859
- r.rangeCount > 0 && (ye.current = r.getRangeAt(0).cloneRange());
2865
+ r.rangeCount > 0 && (ke.current = r.getRangeAt(0).cloneRange());
2860
2866
  try {
2861
2867
  document.queryCommandState("bold") && o.add("bold"), document.queryCommandState("italic") && o.add("italic"), document.queryCommandState("underline") && o.add("underline"), document.queryCommandState("strikeThrough") && o.add("strike"), document.queryCommandState("insertUnorderedList") && o.add("ul"), document.queryCommandState("insertOrderedList") && o.add("ol");
2862
2868
  const s = String(
@@ -2865,12 +2871,12 @@ const Gs = ni(
2865
2871
  /^h[1-6]$/.test(s) ? (o.add("heading"), o.add(s)) : s === "blockquote" ? o.add("quote") : o.add("paragraph");
2866
2872
  const c = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
2867
2873
  c && e.contains(c) && c.closest("table") && o.add("table");
2868
- const v = c == null ? void 0 : c.closest(
2874
+ const m = c == null ? void 0 : c.closest(
2869
2875
  "p, div, blockquote, pre, h1, h2, h3, h4, h5, h6, li, td, th"
2870
2876
  );
2871
- if (v && e.contains(v) && v !== e) {
2872
- const S = getComputedStyle(v), V = S.direction === "rtl", ne = S.textAlign.replace(/^-webkit-/, ""), Ce = V ? "right" : "left", Fe = V ? "left" : "right", re = ["left", "center", "right", "justify"].includes(ne) ? ne : ne === "end" ? Fe : Ce;
2873
- o.add(`align-${re}`);
2877
+ if (m && e.contains(m) && m !== e) {
2878
+ const R = getComputedStyle(m), F = R.direction === "rtl", V = R.textAlign.replace(/^-webkit-/, ""), fe = F ? "right" : "left", Fe = F ? "left" : "right", oe = ["left", "center", "right", "justify"].includes(V) ? V : V === "end" ? Fe : fe;
2879
+ o.add(`align-${oe}`);
2874
2880
  }
2875
2881
  } catch {
2876
2882
  }
@@ -2878,14 +2884,14 @@ const Gs = ni(
2878
2884
  wo(
2879
2885
  (s) => s.size === o.size && [...o].every((c) => s.has(c)) ? s : o
2880
2886
  );
2881
- }, []), Xe = k(
2887
+ }, []), Xe = w(
2882
2888
  (e, ...r) => {
2883
- de(e, ...r), typeof window < "u" ? window.requestAnimationFrame(() => we()) : we();
2889
+ ue(e, ...r), typeof window < "u" ? window.requestAnimationFrame(() => ve()) : ve();
2884
2890
  },
2885
- [de, we]
2891
+ [ue, ve]
2886
2892
  );
2887
2893
  I(() => {
2888
- const e = Q.current;
2894
+ const e = Z.current;
2889
2895
  if (!e) return;
2890
2896
  const r = {
2891
2897
  b: ["module.inline.format", { tag: "b" }],
@@ -2896,120 +2902,155 @@ const Gs = ni(
2896
2902
  const s = r[i.key.toLowerCase()];
2897
2903
  if (!s) return;
2898
2904
  const c = e.querySelector(".redactor-in");
2899
- !c || !(i.target instanceof Node) || !c.contains(i.target) || It.current || (i.preventDefault(), i.stopImmediatePropagation(), Xe(...s));
2905
+ !c || !(i.target instanceof Node) || !c.contains(i.target) || wt.current || (i.preventDefault(), i.stopImmediatePropagation(), Xe(...s));
2900
2906
  };
2901
2907
  return e.addEventListener("keydown", o, !0), () => e.removeEventListener("keydown", o, !0);
2902
- }, [Xe]);
2903
- const Ue = k(
2908
+ }, [Xe]), I(() => {
2909
+ const e = Z.current;
2910
+ if (!e) return;
2911
+ let r;
2912
+ const o = (s) => {
2913
+ var F;
2914
+ const c = (F = window.getSelection()) == null ? void 0 : F.anchorNode;
2915
+ if (!c) return null;
2916
+ const m = c.nodeType === Node.TEXT_NODE ? c.parentElement : c, R = (m == null ? void 0 : m.closest(Rs)) ?? null;
2917
+ return R && R !== s && s.contains(R) ? R : null;
2918
+ }, i = (s) => {
2919
+ if (s.key !== "Enter" || s.shiftKey || s.isComposing)
2920
+ return;
2921
+ const c = e.querySelector(".redactor-in");
2922
+ if (!c || !(s.target instanceof Node) || !c.contains(s.target) || wt.current)
2923
+ return;
2924
+ const m = o(c), R = m == null ? void 0 : m.style.textAlign;
2925
+ if (!m || !R) return;
2926
+ const F = m.tagName === "LI" ? m.style.listStylePosition : "";
2927
+ clearTimeout(r), r = setTimeout(() => {
2928
+ const V = o(c);
2929
+ if (!V || V === m || V.style.textAlign) return;
2930
+ V.style.textAlign = R, F && V.tagName === "LI" && (V.style.listStylePosition = F);
2931
+ const fe = ee.current;
2932
+ if (fe)
2933
+ try {
2934
+ fe($, "broadcast", "hardsync");
2935
+ } catch {
2936
+ }
2937
+ ve();
2938
+ }, Ms);
2939
+ };
2940
+ return e.addEventListener("keydown", i, !0), () => {
2941
+ clearTimeout(r), e.removeEventListener("keydown", i, !0);
2942
+ };
2943
+ }, [$, ve]);
2944
+ const Ue = w(
2904
2945
  (e) => {
2905
- ue(e, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => we());
2946
+ me(e, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ve());
2906
2947
  },
2907
- [ue, we]
2908
- ), [ct, Nn] = E(null), Bt = x(null), Tn = `${Ge}-variables`, nr = x(null), [En, Ao] = E(void 0), Re = k(() => {
2948
+ [me, ve]
2949
+ ), [ct, Nn] = E(null), Bt = C(null), Tn = `${Ge}-variables`, rr = C(null), [En, Ao] = E(void 0), ze = w(() => {
2909
2950
  Bt.current = null, Nn(null);
2910
- }, []), Ft = k(
2951
+ }, []), Ft = w(
2911
2952
  (e, r) => {
2912
2953
  const o = window.getSelection();
2913
2954
  if (!o) return;
2914
2955
  const i = document.createRange();
2915
- i.setStart(r.node, r.start), i.setEnd(r.node, r.end), o.removeAllRanges(), o.addRange(i), Ue(Jr(e)), window.requestAnimationFrame(() => _e.current());
2956
+ i.setStart(r.node, r.start), i.setEnd(r.node, r.end), o.removeAllRanges(), o.addRange(i), Ue(Jr(e)), window.requestAnimationFrame(() => Ie.current());
2916
2957
  },
2917
2958
  [Ue]
2918
2959
  );
2919
2960
  I(() => {
2920
- const e = Q.current;
2961
+ const e = Z.current;
2921
2962
  if (!e || !st) return;
2922
2963
  const r = () => {
2923
- var Oe;
2964
+ var De;
2924
2965
  const s = e.querySelector(".redactor-in"), c = window.getSelection();
2925
2966
  if (!s || !c || c.rangeCount === 0 || !c.isCollapsed) {
2926
- Re();
2967
+ ze();
2927
2968
  return;
2928
2969
  }
2929
- const { startContainer: v, startOffset: S } = c.getRangeAt(0);
2930
- if (v.nodeType !== Node.TEXT_NODE || !s.contains(v) || (((Oe = v.parentElement) == null ? void 0 : Oe.closest(
2970
+ const { startContainer: m, startOffset: R } = c.getRangeAt(0);
2971
+ if (m.nodeType !== Node.TEXT_NODE || !s.contains(m) || (((De = m.parentElement) == null ? void 0 : De.closest(
2931
2972
  '[data-redactor-type="variable"]'
2932
2973
  )) ?? null) !== null) {
2933
- Re();
2974
+ ze();
2934
2975
  return;
2935
2976
  }
2936
- const V = v, ne = V.data.slice(0, S), Ce = /\[\[([A-Za-z0-9_]+)\]\]$/.exec(ne);
2937
- if (Ce) {
2938
- Re(), Ft(
2939
- ge.get(Ce[1].toLowerCase()) ?? Ce[1],
2940
- { node: V, start: S - Ce[0].length, end: S }
2977
+ const F = m, V = F.data.slice(0, R), fe = /\[\[([A-Za-z0-9_]+)\]\]$/.exec(V);
2978
+ if (fe) {
2979
+ ze(), Ft(
2980
+ pe.get(fe[1].toLowerCase()) ?? fe[1],
2981
+ { node: F, start: R - fe[0].length, end: R }
2941
2982
  );
2942
2983
  return;
2943
2984
  }
2944
- const Fe = /\[\[([A-Za-z0-9_ ]{0,40})$/.exec(ne), re = wt.current;
2945
- if (!Fe || !re || (D ?? []).length === 0) {
2946
- Re();
2985
+ const Fe = /\[\[([A-Za-z0-9_ ]{0,40})$/.exec(V), oe = kt.current;
2986
+ if (!Fe || !oe || (q ?? []).length === 0) {
2987
+ ze();
2947
2988
  return;
2948
2989
  }
2949
- const He = {
2950
- node: V,
2951
- start: S - Fe[0].length,
2952
- end: S
2990
+ const Oe = {
2991
+ node: F,
2992
+ start: R - Fe[0].length,
2993
+ end: R
2953
2994
  };
2954
- Bt.current = He;
2995
+ Bt.current = Oe;
2955
2996
  const ft = document.createRange();
2956
- ft.setStart(V, He.start), ft.setEnd(V, He.end);
2957
- const rt = ft.getBoundingClientRect(), Mt = re.getBoundingClientRect(), $n = getComputedStyle(re).direction === "rtl";
2997
+ ft.setStart(F, Oe.start), ft.setEnd(F, Oe.end);
2998
+ const rt = ft.getBoundingClientRect(), zt = oe.getBoundingClientRect(), $n = getComputedStyle(oe).direction === "rtl";
2958
2999
  Nn({
2959
3000
  query: Fe[1],
2960
- left: $n ? Mt.right - rt.right : rt.left - Mt.left,
2961
- top: rt.bottom - Mt.top + 4
3001
+ left: $n ? zt.right - rt.right : rt.left - zt.left,
3002
+ top: rt.bottom - zt.top + 4
2962
3003
  });
2963
3004
  }, o = (s) => {
2964
- var v;
3005
+ var m;
2965
3006
  if (!Bt.current || !["ArrowDown", "ArrowUp", "Home", "End", "Enter", "Escape"].includes(
2966
3007
  s.key
2967
3008
  ))
2968
3009
  return;
2969
- (((v = nr.current) == null ? void 0 : v.handleKeyDown(s)) ?? !1) && (s.preventDefault(), s.stopImmediatePropagation());
2970
- }, i = () => Re();
3010
+ (((m = rr.current) == null ? void 0 : m.handleKeyDown(s)) ?? !1) && (s.preventDefault(), s.stopImmediatePropagation());
3011
+ }, i = () => ze();
2971
3012
  return e.addEventListener("input", r), e.addEventListener("keydown", o, !0), e.addEventListener("focusout", i), () => {
2972
3013
  e.removeEventListener("input", r), e.removeEventListener("keydown", o, !0), e.removeEventListener("focusout", i);
2973
3014
  };
2974
3015
  }, [
2975
3016
  st,
2976
- ge,
2977
- D,
3017
+ pe,
3018
+ q,
2978
3019
  Ft,
2979
- Re
3020
+ ze
2980
3021
  ]), I(() => {
2981
3022
  var r;
2982
- const e = (r = Q.current) == null ? void 0 : r.querySelector(".redactor-in");
3023
+ const e = (r = Z.current) == null ? void 0 : r.querySelector(".redactor-in");
2983
3024
  e && (ct ? (e.setAttribute("aria-expanded", "true"), e.setAttribute("aria-controls", `${Tn}-list`), En ? e.setAttribute("aria-activedescendant", En) : e.removeAttribute("aria-activedescendant")) : (e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant")));
2984
3025
  }, [ct, Tn, En]);
2985
- const No = k(
3026
+ const No = w(
2986
3027
  (e) => {
2987
3028
  const r = Bt.current;
2988
- Re(), r && Ft(e.token, r), se == null || se(e.token);
3029
+ ze(), r && Ft(e.token, r), ce == null || ce(e.token);
2989
3030
  },
2990
- [Re, Ft, se]
2991
- ), To = k(() => {
2992
- Re();
2993
- }, [Re]), Eo = k((e) => {
3031
+ [ze, Ft, ce]
3032
+ ), To = w(() => {
3033
+ ze();
3034
+ }, [ze]), Eo = w((e) => {
2994
3035
  Nn((r) => r && { ...r, query: e });
2995
- }, []), dt = k(() => {
3036
+ }, []), dt = w(() => {
2996
3037
  var r;
2997
3038
  if (typeof window < "u") {
2998
- const o = (r = Q.current) == null ? void 0 : r.querySelector(".redactor-in"), i = window.getSelection();
2999
- o && i && i.rangeCount > 0 && i.anchorNode && o.contains(i.anchorNode) && (ye.current = i.getRangeAt(0).cloneRange());
3039
+ const o = (r = Z.current) == null ? void 0 : r.querySelector(".redactor-in"), i = window.getSelection();
3040
+ o && i && i.rangeCount > 0 && i.anchorNode && o.contains(i.anchorNode) && (ke.current = i.getRangeAt(0).cloneRange());
3000
3041
  }
3001
- const e = te.current;
3042
+ const e = ee.current;
3002
3043
  if (e)
3003
3044
  try {
3004
- e(H, "selection.save");
3045
+ e($, "selection.save");
3005
3046
  } catch {
3006
3047
  }
3007
- }, [H]), be = k(() => {
3008
- const e = te.current;
3048
+ }, [$]), ye = w(() => {
3049
+ const e = ee.current;
3009
3050
  if (!e) return;
3010
- const r = ye.current;
3051
+ const r = ke.current;
3011
3052
  try {
3012
- e(H, "editor.focus");
3053
+ e($, "editor.focus");
3013
3054
  } catch {
3014
3055
  }
3015
3056
  if (r && typeof window < "u") {
@@ -3022,63 +3063,63 @@ const Gs = ni(
3022
3063
  }
3023
3064
  }
3024
3065
  try {
3025
- e(H, "selection.restore");
3066
+ e($, "selection.restore");
3026
3067
  } catch {
3027
3068
  }
3028
- }, [H]), Ro = k(() => {
3069
+ }, [$]), Ro = w(() => {
3029
3070
  var o;
3030
3071
  if (typeof window > "u") return "";
3031
- const e = (o = Q.current) == null ? void 0 : o.querySelector(".redactor-in"), r = window.getSelection();
3072
+ const e = (o = Z.current) == null ? void 0 : o.querySelector(".redactor-in"), r = window.getSelection();
3032
3073
  return !e || !r || !r.anchorNode || !e.contains(r.anchorNode) ? "" : r.toString();
3033
- }, []), Mo = k(() => {
3074
+ }, []), Mo = w(() => {
3034
3075
  var s;
3035
3076
  if (typeof window > "u") return null;
3036
- const e = (s = Q.current) == null ? void 0 : s.querySelector(".redactor-in"), r = window.getSelection();
3077
+ const e = (s = Z.current) == null ? void 0 : s.querySelector(".redactor-in"), r = window.getSelection();
3037
3078
  if (!e || !r || r.rangeCount === 0) return null;
3038
3079
  const o = r.anchorNode, i = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
3039
3080
  return !i || !e.contains(i) ? null : i.closest("table");
3040
- }, []), rr = x(null), jt = k(() => {
3081
+ }, []), or = C(null), jt = w(() => {
3041
3082
  var s;
3042
3083
  if (typeof window > "u") return null;
3043
- const e = (s = Q.current) == null ? void 0 : s.querySelector(".redactor-in"), r = window.getSelection();
3084
+ const e = (s = Z.current) == null ? void 0 : s.querySelector(".redactor-in"), r = window.getSelection();
3044
3085
  if (!e || !r || r.rangeCount === 0) return null;
3045
3086
  const o = r.anchorNode, i = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
3046
3087
  return !i || !e.contains(i) ? null : i.closest("td,th");
3047
- }, []), zo = k(() => {
3048
- rr.current = jt();
3049
- }, [jt]), So = k(
3088
+ }, []), zo = w(() => {
3089
+ or.current = jt();
3090
+ }, [jt]), So = w(
3050
3091
  (e, r) => {
3051
3092
  var c;
3052
- const o = rr.current ?? jt();
3093
+ const o = or.current ?? jt();
3053
3094
  if (!o) return;
3054
3095
  const i = e === "row" ? Array.from(((c = o.closest("tr")) == null ? void 0 : c.children) ?? [o]).filter(
3055
- (v) => v instanceof HTMLElement && (v.tagName === "TD" || v.tagName === "TH")
3056
- ) : [o], s = te.current;
3096
+ (m) => m instanceof HTMLElement && (m.tagName === "TD" || m.tagName === "TH")
3097
+ ) : [o], s = ee.current;
3057
3098
  if (s)
3058
3099
  try {
3059
- s(H, "module.buffer.trigger");
3100
+ s($, "module.buffer.trigger");
3060
3101
  } catch {
3061
3102
  }
3062
- for (const v of i)
3063
- r ? v.style.setProperty("background-color", r) : v.style.removeProperty("background-color");
3103
+ for (const m of i)
3104
+ r ? m.style.setProperty("background-color", r) : m.style.removeProperty("background-color");
3064
3105
  if (s)
3065
3106
  try {
3066
- s(H, "broadcast", "hardsync");
3107
+ s($, "broadcast", "hardsync");
3067
3108
  } catch {
3068
3109
  }
3069
- typeof window < "u" && window.requestAnimationFrame(() => we());
3110
+ typeof window < "u" && window.requestAnimationFrame(() => ve());
3070
3111
  },
3071
- [jt, H, we]
3112
+ [jt, $, ve]
3072
3113
  );
3073
3114
  I(() => {
3074
- const e = Q.current;
3115
+ const e = Z.current;
3075
3116
  if (typeof window > "u" || !e) return;
3076
3117
  const r = (s) => {
3077
- const c = e.querySelector(".redactor-in"), v = s.target;
3078
- if (!c || !(v instanceof Node) || !c.contains(v))
3118
+ const c = e.querySelector(".redactor-in"), m = s.target;
3119
+ if (!c || !(m instanceof Node) || !c.contains(m))
3079
3120
  return;
3080
- const S = v instanceof Element ? v.closest("img") : null;
3081
- Dt(S && c.contains(S) ? S : null);
3121
+ const R = m instanceof Element ? m.closest("img") : null;
3122
+ Dt(R && c.contains(R) ? R : null);
3082
3123
  }, o = (s) => {
3083
3124
  s.key === "Escape" && Ot.current && Dt(null);
3084
3125
  }, i = (s) => {
@@ -3089,98 +3130,98 @@ const Gs = ni(
3089
3130
  e.removeEventListener("click", r), e.removeEventListener("keydown", o), e.removeEventListener("focusout", i);
3090
3131
  };
3091
3132
  }, [Dt]);
3092
- const Lo = k(
3133
+ const Lo = w(
3093
3134
  (e) => {
3094
3135
  const r = Ot.current;
3095
3136
  if (!r) return;
3096
- const o = Fn.includes(
3137
+ const o = jn.includes(
3097
3138
  e
3098
- ) ? Fn : co, i = te.current;
3139
+ ) ? jn : co, i = ee.current;
3099
3140
  if (i)
3100
3141
  try {
3101
- i(H, "module.buffer.trigger");
3142
+ i($, "module.buffer.trigger");
3102
3143
  } catch {
3103
3144
  }
3104
3145
  for (const s of o) r.classList.remove(s);
3105
3146
  if (r.classList.add(e), i)
3106
3147
  try {
3107
- i(H, "broadcast", "hardsync");
3148
+ i($, "broadcast", "hardsync");
3108
3149
  } catch {
3109
3150
  }
3110
- typeof window < "u" && window.requestAnimationFrame(() => we());
3151
+ typeof window < "u" && window.requestAnimationFrame(() => ve());
3111
3152
  },
3112
- [H, we]
3113
- ), _o = k(
3153
+ [$, ve]
3154
+ ), _o = w(
3114
3155
  (e) => {
3115
3156
  const r = Ot.current;
3116
3157
  if (!r) return;
3117
- const o = te.current;
3158
+ const o = ee.current;
3118
3159
  if (o)
3119
3160
  try {
3120
- o(H, "module.buffer.trigger");
3161
+ o($, "module.buffer.trigger");
3121
3162
  } catch {
3122
3163
  }
3123
3164
  if (r.style.setProperty("width", `${e}%`), o)
3124
3165
  try {
3125
- o(H, "broadcast", "hardsync");
3166
+ o($, "broadcast", "hardsync");
3126
3167
  } catch {
3127
3168
  }
3128
- typeof window < "u" && window.requestAnimationFrame(() => we());
3169
+ typeof window < "u" && window.requestAnimationFrame(() => ve());
3129
3170
  },
3130
- [H, we]
3131
- ), Io = k(
3171
+ [$, ve]
3172
+ ), Io = w(
3132
3173
  (e) => {
3133
3174
  var o;
3134
- const r = te.current;
3175
+ const r = ee.current;
3135
3176
  if (r && typeof window < "u") {
3136
- const i = (o = Q.current) == null ? void 0 : o.querySelector(".redactor-in"), s = window.getSelection(), c = s == null ? void 0 : s.anchorNode, v = c && c.nodeType === Node.TEXT_NODE ? c.parentElement : c, S = v && (i != null && i.contains(v)) ? v.closest("ul,ol") : null;
3137
- if (S)
3177
+ const i = (o = Z.current) == null ? void 0 : o.querySelector(".redactor-in"), s = window.getSelection(), c = s == null ? void 0 : s.anchorNode, m = c && c.nodeType === Node.TEXT_NODE ? c.parentElement : c, R = m && (i != null && i.contains(m)) ? m.closest("ul,ol") : null;
3178
+ if (R)
3138
3179
  try {
3139
- r(H, "caret.setAfter", S);
3180
+ r($, "caret.setAfter", R);
3140
3181
  } catch {
3141
3182
  }
3142
3183
  }
3143
3184
  Ue(e), typeof window < "u" && window.requestAnimationFrame(() => {
3144
3185
  var s;
3145
- const i = (s = Q.current) == null ? void 0 : s.querySelector(".redactor-in");
3186
+ const i = (s = Z.current) == null ? void 0 : s.querySelector(".redactor-in");
3146
3187
  i == null || i.querySelectorAll("table td, table th").forEach((c) => {
3147
- let v = c.lastChild;
3148
- for (; v && v.nodeType === Node.TEXT_NODE && !(v.textContent ?? "").trim(); ) {
3149
- const S = v.previousSibling;
3150
- c.removeChild(v), v = S;
3188
+ let m = c.lastChild;
3189
+ for (; m && m.nodeType === Node.TEXT_NODE && !(m.textContent ?? "").trim(); ) {
3190
+ const R = m.previousSibling;
3191
+ c.removeChild(m), m = R;
3151
3192
  }
3152
3193
  });
3153
3194
  });
3154
3195
  },
3155
- [Ue, H]
3156
- ), or = k(
3196
+ [Ue, $]
3197
+ ), ir = w(
3157
3198
  async (e, r) => {
3158
- if (M) return M(e, r);
3159
- if (!L) throw new Error("No image upload URL configured.");
3199
+ if (L) return L(e, r);
3200
+ if (!M) throw new Error("No image upload URL configured.");
3160
3201
  const o = new FormData();
3161
3202
  o.append("file", e);
3162
- const i = await fetch(L, {
3203
+ const i = await fetch(M, {
3163
3204
  method: "POST",
3164
3205
  body: o,
3165
3206
  credentials: "same-origin",
3166
3207
  signal: r
3167
3208
  });
3168
3209
  if (!i.ok) throw new Error(`Image upload failed (${i.status}).`);
3169
- const s = _s(await i.json());
3210
+ const s = Hs(await i.json());
3170
3211
  if (!s) throw new Error("Image upload response contained no URL.");
3171
3212
  return s;
3172
3213
  },
3173
- [L, M]
3174
- ), Ze = di({ enabled: X }), {
3214
+ [M, L]
3215
+ ), Ze = di({ enabled: J }), {
3175
3216
  start: ut,
3176
- land: Ie,
3217
+ land: $e,
3177
3218
  reset: mt
3178
- } = Ze, At = x(null), Gt = x(null), [ke, ir] = E(!1), [$o, ar] = E(!1), [Ho, Kt] = E(""), Vt = k(() => {
3219
+ } = Ze, Nt = C(null), Gt = C(null), [xe, ar] = E(!1), [$o, sr] = E(!1), [Ho, Kt] = E(""), Vt = w(() => {
3179
3220
  const e = Gt.current;
3180
3221
  e != null && e.parentNode && e.parentNode.removeChild(e), Gt.current = null;
3181
- }, []), sr = k((e) => {
3222
+ }, []), lr = w((e) => {
3182
3223
  var i;
3183
- const r = (i = Q.current) == null ? void 0 : i.querySelector(
3224
+ const r = (i = Z.current) == null ? void 0 : i.querySelector(
3184
3225
  ".redactor-in"
3185
3226
  );
3186
3227
  if (!r) return;
@@ -3196,46 +3237,46 @@ const Gs = ni(
3196
3237
  Gt.current = o;
3197
3238
  }
3198
3239
  o.textContent = e;
3199
- }, []), Wt = x(null), Xt = k((e = !1) => {
3240
+ }, []), Wt = C(null), Xt = w((e = !1) => {
3200
3241
  var r;
3201
- Wt.current && (Wt.current.keepLate = e), (r = At.current) == null || r.abort();
3202
- }, []), lr = k(() => {
3242
+ Wt.current && (Wt.current.keepLate = e), (r = Nt.current) == null || r.abort();
3243
+ }, []), cr = w(() => {
3203
3244
  var c;
3204
3245
  if (typeof window > "u") return !1;
3205
- const e = window.getSelection(), r = (c = Q.current) == null ? void 0 : c.querySelector(".redactor-in");
3246
+ const e = window.getSelection(), r = (c = Z.current) == null ? void 0 : c.querySelector(".redactor-in");
3206
3247
  if (!e || e.rangeCount === 0 || !r) return !1;
3207
3248
  const { startContainer: o, startOffset: i } = e.getRangeAt(0);
3208
3249
  if (!r.contains(o) || o.nodeType !== Node.TEXT_NODE || i === 0)
3209
3250
  return !1;
3210
3251
  const s = o.data.charAt(i - 1);
3211
3252
  return /\S/.test(s) && s !== " ";
3212
- }, []), xe = T !== void 0 && !T.granted, Rn = x(null), Ut = k(() => {
3213
- if (!j || xe) return;
3253
+ }, []), Ce = x !== void 0 && !x.granted, Rn = C(null), Ut = w(() => {
3254
+ if (!K || Ce) return;
3214
3255
  const e = new AbortController();
3215
- At.current = e;
3256
+ Nt.current = e;
3216
3257
  const r = { keepLate: !1 };
3217
3258
  Wt.current = r;
3218
3259
  let o = !1;
3219
3260
  const i = () => !o && (!e.signal.aborted || r.keepLate);
3220
- ar(!1), ir(!0), Kt(_("editor.ai.listening")), X && ut(), Vt(), j({
3261
+ sr(!1), ar(!0), Kt(_("editor.ai.listening")), J && ut(), Vt(), K({
3221
3262
  signal: e.signal,
3222
3263
  // Interim text shows live in the editor (grey + caret); each final
3223
3264
  // replaces it with committed text at the caret.
3224
3265
  onPartialTranscript: (s) => {
3225
- i() && sr(s);
3266
+ i() && lr(s);
3226
3267
  },
3227
3268
  onFinalTranscript: (s) => {
3228
3269
  if (!i()) return;
3229
3270
  Vt();
3230
3271
  const c = s.trim();
3231
3272
  if (c) {
3232
- const v = Rn.current;
3233
- if (v) {
3234
- Rn.current = null, ye.current = v, be(), ue(`${c} `, { asHtml: !1 }), X && Ie(), Kt(c);
3273
+ const m = Rn.current;
3274
+ if (m) {
3275
+ Rn.current = null, ke.current = m, ye(), me(`${c} `, { asHtml: !1 }), J && $e(), Kt(c);
3235
3276
  return;
3236
3277
  }
3237
- const S = lr() ? " " : "";
3238
- ue(`${S}${c} `, { asHtml: !1 }), X && Ie(), Kt(c);
3278
+ const R = cr() ? " " : "";
3279
+ me(`${R}${c} `, { asHtml: !1 }), J && $e(), Kt(c);
3239
3280
  }
3240
3281
  }
3241
3282
  }).catch((s) => {
@@ -3245,153 +3286,153 @@ const Gs = ni(
3245
3286
  vn(!0), Pe(!0);
3246
3287
  return;
3247
3288
  }
3248
- ar(!0);
3289
+ sr(!0);
3249
3290
  }
3250
3291
  }).finally(() => {
3251
- o = !0, Vt(), At.current === e && (At.current = null, Wt.current = null, ir(!1), Kt(""), X && !$e.current && mt());
3292
+ o = !0, Vt(), Nt.current === e && (Nt.current = null, Wt.current = null, ar(!1), Kt(""), J && !He.current && mt());
3252
3293
  });
3253
3294
  }, [
3254
- j,
3255
- xe,
3256
- ue,
3257
- be,
3295
+ K,
3296
+ Ce,
3297
+ me,
3298
+ ye,
3258
3299
  Vt,
3259
- sr,
3260
3300
  lr,
3261
- X,
3301
+ cr,
3302
+ J,
3262
3303
  ut,
3263
- Ie,
3304
+ $e,
3264
3305
  mt,
3265
3306
  _
3266
3307
  ]);
3267
3308
  I(() => () => {
3268
3309
  var e;
3269
- return (e = At.current) == null ? void 0 : e.abort();
3310
+ return (e = Nt.current) == null ? void 0 : e.abort();
3270
3311
  }, []);
3271
- const [Zt, Nt] = E(null), Qe = x(null), Qt = x(null), [Oo, cr] = E(!1), Do = ((T == null ? void 0 : T.pending) ?? !1) || Oo, Jt = x(!1), Mn = k(() => {
3272
- Qe.current = null, Qt.current = null, Jt.current = !1, Nt(null);
3273
- }, []), qo = k(() => {
3312
+ const [Zt, Tt] = E(null), Qe = C(null), Qt = C(null), [Oo, dr] = E(!1), Do = ((x == null ? void 0 : x.pending) ?? !1) || Oo, Jt = C(!1), Mn = w(() => {
3313
+ Qe.current = null, Qt.current = null, Jt.current = !1, Tt(null);
3314
+ }, []), qo = w(() => {
3274
3315
  var r;
3275
3316
  Jt.current = !0;
3276
- const e = (r = T == null ? void 0 : T.onGrant) == null ? void 0 : r.call(T);
3277
- e && typeof e.then == "function" && (cr(!0), Promise.resolve(e).catch(() => {
3278
- }).finally(() => cr(!1)));
3279
- }, [T]), dr = x((T == null ? void 0 : T.granted) ?? !0);
3317
+ const e = (r = x == null ? void 0 : x.onGrant) == null ? void 0 : r.call(x);
3318
+ e && typeof e.then == "function" && (dr(!0), Promise.resolve(e).catch(() => {
3319
+ }).finally(() => dr(!1)));
3320
+ }, [x]), ur = C((x == null ? void 0 : x.granted) ?? !0);
3280
3321
  I(() => {
3281
- const e = dr.current;
3282
- if (dr.current = (T == null ? void 0 : T.granted) ?? !0, !e && (T != null && T.granted) && Qe.current) {
3322
+ const e = ur.current;
3323
+ if (ur.current = (x == null ? void 0 : x.granted) ?? !0, !e && (x != null && x.granted) && Qe.current) {
3283
3324
  const r = Qe.current, o = Jt.current;
3284
- Qe.current = null, Jt.current = !1, Nt(null);
3325
+ Qe.current = null, Jt.current = !1, Tt(null);
3285
3326
  const i = Qt.current;
3286
3327
  if (Qt.current = null, !o) return;
3287
- r === "write" ? Pe(!0) : r === "action" ? i == null || i() : (be(), Ut());
3328
+ r === "write" ? Pe(!0) : r === "action" ? i == null || i() : (ye(), Ut());
3288
3329
  }
3289
- }, [T == null ? void 0 : T.granted, be, Ut]), I(() => {
3290
- xe && (Pe(!1), ke && Xt());
3291
- }, [xe, ke, Xt]);
3292
- const ur = k(
3330
+ }, [x == null ? void 0 : x.granted, ye, Ut]), I(() => {
3331
+ Ce && (Pe(!1), xe && Xt());
3332
+ }, [Ce, xe, Xt]);
3333
+ const mr = w(
3293
3334
  (e = "document") => {
3294
- if (ke) {
3335
+ if (xe) {
3295
3336
  Xt(!0);
3296
3337
  return;
3297
3338
  }
3298
3339
  dt();
3299
- const r = ye.current;
3300
- if (Rn.current = e === "selection" && r && !r.collapsed ? r.cloneRange() : null, xe) {
3301
- Qe.current = "dictate", Nt("dictate");
3340
+ const r = ke.current;
3341
+ if (Rn.current = e === "selection" && r && !r.collapsed ? r.cloneRange() : null, Ce) {
3342
+ Qe.current = "dictate", Tt("dictate");
3302
3343
  return;
3303
3344
  }
3304
3345
  Ut();
3305
3346
  },
3306
- [ke, Xt, xe, dt, Ut]
3307
- ), mr = k(
3347
+ [xe, Xt, Ce, dt, Ut]
3348
+ ), fr = w(
3308
3349
  (e = "document") => {
3309
3350
  dt();
3310
- const r = ye.current, o = r ? r.cloneRange() : null, i = e === "selection" && !!(o && !o.collapsed);
3311
- if (o && !i && o.collapse(!1), Ht.current = o, vo(i ? "selection" : "document"), po(i && o ? o.toString() : ""), xe) {
3312
- Qe.current = "write", Nt("write");
3351
+ const r = ke.current, o = r ? r.cloneRange() : null, i = e === "selection" && !!(o && !o.collapsed);
3352
+ if (o && !i && o.collapse(!1), Ht.current = o, vo(i ? "selection" : "document"), po(i && o ? o.toString() : ""), Ce) {
3353
+ Qe.current = "write", Tt("write");
3313
3354
  return;
3314
3355
  }
3315
3356
  Pe(!0);
3316
3357
  },
3317
- [dt, xe]
3318
- ), fr = gt(() => T != null && T.granted ? /* @__PURE__ */ C(De, { children: [
3358
+ [dt, Ce]
3359
+ ), gr = gt(() => x != null && x.granted ? /* @__PURE__ */ A(qe, { children: [
3319
3360
  _(
3320
3361
  "editor.ai.consentRecorded",
3321
3362
  "AI assistance consent has been recorded."
3322
3363
  ),
3323
- F ? /* @__PURE__ */ C(De, { children: [
3364
+ P ? /* @__PURE__ */ A(qe, { children: [
3324
3365
  " ",
3325
- F
3366
+ P
3326
3367
  ] }) : null
3327
- ] }) : F, [T, F, _]), [Je, zn] = E(null), [Po, Yt] = E(!1), [gr, hr] = E(!1), [Bo, Ye] = E(""), pr = x(null), $e = x(null), en = x(Te);
3368
+ ] }) : P, [x, P, _]), [Je, zn] = E(null), [Po, Yt] = E(!1), [hr, pr] = E(!1), [Bo, Ye] = E(""), br = C(null), He = C(null), en = C(Ae);
3328
3369
  I(() => {
3329
- en.current = Te;
3330
- }, [Te]), I(() => {
3331
- X && (!ke && Je === null || Ze.state === null && ut());
3332
- }, [X, ke, Je, Ze.state, ut]);
3333
- const Tt = (e) => e.preventDefault(), br = k(
3370
+ en.current = Ae;
3371
+ }, [Ae]), I(() => {
3372
+ J && (!xe && Je === null || Ze.state === null && ut());
3373
+ }, [J, xe, Je, Ze.state, ut]);
3374
+ const Et = (e) => e.preventDefault(), vr = w(
3334
3375
  (e) => {
3335
3376
  var o;
3336
- const r = te.current;
3377
+ const r = ee.current;
3337
3378
  if (r)
3338
3379
  try {
3339
- const i = r(H);
3380
+ const i = r($);
3340
3381
  (o = i == null ? void 0 : i.broadcast) == null || o.call(i, "state", !1, e);
3341
3382
  } catch {
3342
3383
  }
3343
3384
  },
3344
- [H]
3345
- ), vr = x(!1), et = k(
3385
+ [$]
3386
+ ), yr = C(!1), et = w(
3346
3387
  (e) => {
3347
- const r = te.current;
3348
- if (!r || vr.current === e) return;
3349
- vr.current = e;
3388
+ const r = ee.current;
3389
+ if (!r || yr.current === e) return;
3390
+ yr.current = e;
3350
3391
  const o = e || b;
3351
- It.current = o;
3392
+ wt.current = o;
3352
3393
  try {
3353
- r(H, o ? "enableReadOnly" : "disableReadOnly");
3394
+ r($, o ? "enableReadOnly" : "disableReadOnly");
3354
3395
  } catch {
3355
3396
  }
3356
3397
  },
3357
- [H, b]
3358
- ), Sn = k(
3398
+ [$, b]
3399
+ ), Sn = w(
3359
3400
  (e) => {
3360
3401
  var o;
3361
3402
  const r = bt(
3362
- Ae(e),
3403
+ Te(e),
3363
3404
  at.current
3364
3405
  );
3365
- !de("source.setCode", r) && ee.current && (ee.current.value = r), (o = he.current) == null || o.call(he, { html: r, markdown: "" });
3406
+ !ue("source.setCode", r) && re.current && (re.current.value = r), (o = be.current) == null || o.call(be, { html: r, markdown: "" });
3366
3407
  },
3367
- [de]
3368
- ), tt = k(
3408
+ [ue]
3409
+ ), tt = w(
3369
3410
  (e) => {
3370
3411
  var s;
3371
- const r = (s = Q.current) == null ? void 0 : s.querySelector(".redactor-in"), o = typeof window < "u" ? window.getSelection() : null;
3412
+ const r = (s = Z.current) == null ? void 0 : s.querySelector(".redactor-in"), o = typeof window < "u" ? window.getSelection() : null;
3372
3413
  if (e === "selection" && r && o && o.rangeCount > 0 && !o.isCollapsed) {
3373
3414
  const c = o.getRangeAt(0);
3374
3415
  if (r.contains(c.commonAncestorContainer)) {
3375
- const v = c.toString();
3376
- if (v.trim())
3416
+ const m = c.toString();
3417
+ if (m.trim())
3377
3418
  return {
3378
3419
  scope: "selection",
3379
3420
  range: c.cloneRange(),
3380
- html: zs(c.cloneContents()),
3381
- text: v
3421
+ html: _s(c.cloneContents()),
3422
+ text: m
3382
3423
  };
3383
3424
  }
3384
3425
  }
3385
- const i = ce();
3426
+ const i = de();
3386
3427
  return { scope: "document", range: null, html: i, text: Zr(i) };
3387
3428
  },
3388
- [ce]
3389
- ), Ln = k(
3429
+ [de]
3430
+ ), Ln = w(
3390
3431
  (e, r, o, i) => {
3391
- if ($e.current || !o.text.trim()) return;
3432
+ if (He.current || !o.text.trim()) return;
3392
3433
  const s = new AbortController();
3393
- $e.current = s, zn(e), hr(!1), pr.current = e, Ye(_("editor.ai.generating")), Yt(!1), X && ut();
3394
- const c = ce();
3434
+ He.current = s, zn(e), pr(!1), br.current = e, Ye(_("editor.ai.generating")), Yt(!1), J && ut();
3435
+ const c = de();
3395
3436
  et(!0), Promise.resolve(
3396
3437
  r({
3397
3438
  html: o.html,
@@ -3399,122 +3440,122 @@ const Gs = ni(
3399
3440
  scope: o.scope,
3400
3441
  signal: s.signal
3401
3442
  })
3402
- ).then((v) => {
3403
- var V;
3443
+ ).then((m) => {
3444
+ var F;
3404
3445
  if (s.signal.aborted) return;
3405
3446
  et(!1);
3406
- const S = String(v ?? "");
3407
- if (ce() !== c) {
3408
- hr(!0), Ye("");
3447
+ const R = String(m ?? "");
3448
+ if (de() !== c) {
3449
+ pr(!0), Ye("");
3409
3450
  return;
3410
3451
  }
3411
- if (!Zr(S)) {
3452
+ if (!Zr(R)) {
3412
3453
  Yt(!0), Ye("");
3413
3454
  return;
3414
3455
  }
3415
- if (br(c), o.scope === "selection" && o.range) {
3456
+ if (vr(c), o.scope === "selection" && o.range) {
3416
3457
  if (!o.range.startContainer.isConnected) {
3417
3458
  Yt(!0), Ye("");
3418
3459
  return;
3419
3460
  }
3420
- ye.current = o.range, be();
3421
- const ne = bt(
3422
- Ae(S),
3461
+ ke.current = o.range, ye();
3462
+ const V = bt(
3463
+ Te(R),
3423
3464
  at.current
3424
3465
  );
3425
- de("insertion.insertHtml", ne) || ue(S, { asHtml: !0 });
3466
+ ue("insertion.insertHtml", V) || me(R, { asHtml: !0 });
3426
3467
  } else
3427
- Sn(S);
3428
- X && Ie(), Ye(_("editor.ai.actionDone")), (V = en.current) == null || V.call(en, {
3468
+ Sn(R);
3469
+ J && $e(), Ye(_("editor.ai.actionDone")), (F = en.current) == null || F.call(en, {
3429
3470
  action: e,
3430
3471
  template: i,
3431
3472
  scope: o.scope,
3432
3473
  previousHtml: c,
3433
3474
  undo: () => Sn(c)
3434
3475
  });
3435
- }).catch((v) => {
3436
- var S;
3437
- if (et(!1), !(s.signal.aborted || Ms(v))) {
3438
- if (Ur(v) && ((S = Ve.current) == null || S.call(Ve), yn.current)) {
3476
+ }).catch((m) => {
3477
+ var R;
3478
+ if (et(!1), !(s.signal.aborted || Ls(m))) {
3479
+ if (Ur(m) && ((R = Ve.current) == null || R.call(Ve), yn.current)) {
3439
3480
  vn(!0), Pe(!0);
3440
3481
  return;
3441
3482
  }
3442
3483
  Yt(!0), Ye("");
3443
3484
  }
3444
3485
  }).finally(() => {
3445
- $e.current === s && ($e.current = null, et(!1), zn(null), mt());
3486
+ He.current === s && (He.current = null, et(!1), zn(null), mt());
3446
3487
  });
3447
3488
  },
3448
3489
  [
3449
- X,
3490
+ J,
3450
3491
  ut,
3451
- Ie,
3492
+ $e,
3452
3493
  mt,
3453
3494
  et,
3454
- ce,
3455
- be,
3456
3495
  de,
3496
+ ye,
3457
3497
  ue,
3498
+ me,
3458
3499
  Sn,
3459
- br,
3500
+ vr,
3460
3501
  _
3461
3502
  ]
3462
- ), Et = k(
3503
+ ), Rt = w(
3463
3504
  (e, r, o, i) => {
3464
- if (xe) {
3465
- Qt.current = () => Ln(e, r, o, i), Qe.current = "action", Nt("action");
3505
+ if (Ce) {
3506
+ Qt.current = () => Ln(e, r, o, i), Qe.current = "action", Tt("action");
3466
3507
  return;
3467
3508
  }
3468
3509
  Ln(e, r, o, i);
3469
3510
  },
3470
- [xe, Ln]
3471
- ), yr = k(
3511
+ [Ce, Ln]
3512
+ ), wr = w(
3472
3513
  (e, r) => {
3473
- const o = Y == null ? void 0 : Y.onRun;
3474
- o && Et(
3514
+ const o = te == null ? void 0 : te.onRun;
3515
+ o && Rt(
3475
3516
  "template",
3476
3517
  (i) => o({ ...i, template: e }),
3477
3518
  r,
3478
3519
  e
3479
3520
  );
3480
3521
  },
3481
- [Y, Et]
3482
- ), wr = k(() => {
3522
+ [te, Rt]
3523
+ ), kr = w(() => {
3483
3524
  var e;
3484
- (e = $e.current) == null || e.abort(), $e.current = null, et(!1), zn(null), Ye(""), mt();
3485
- }, [et, mt]), kr = x(null);
3525
+ (e = He.current) == null || e.abort(), He.current = null, et(!1), zn(null), Ye(""), mt();
3526
+ }, [et, mt]), xr = C(null);
3486
3527
  I(() => {
3487
- const e = Je ?? pr.current;
3528
+ const e = Je ?? br.current;
3488
3529
  if (!e) return;
3489
3530
  const r = e === "template" ? "ai-templates" : `ai-${e}`, o = requestAnimationFrame(() => {
3490
3531
  var s, c;
3491
3532
  const i = document.activeElement;
3492
- i && i !== document.body && i.isConnected || (c = (s = kr.current) == null ? void 0 : s.querySelector(`[data-component-part="${r}"]`)) == null || c.focus();
3533
+ i && i !== document.body && i.isConnected || (c = (s = xr.current) == null ? void 0 : s.querySelector(`[data-component-part="${r}"]`)) == null || c.focus();
3493
3534
  });
3494
3535
  return () => cancelAnimationFrame(o);
3495
3536
  }, [Je]), I(() => () => {
3496
3537
  var e;
3497
- return (e = $e.current) == null ? void 0 : e.abort();
3538
+ return (e = He.current) == null ? void 0 : e.abort();
3498
3539
  }, []), I(() => {
3499
- const e = ee.current;
3540
+ const e = re.current;
3500
3541
  if (!e) return;
3501
- e.value = Co.current, _e.current();
3502
- const r = Is(q);
3542
+ e.value = Co.current, Ie.current();
3543
+ const r = Os(D);
3503
3544
  if (!r) {
3504
- Un(!0);
3545
+ Zn(!0);
3505
3546
  return;
3506
3547
  }
3507
- if (te.current = r, e.value = bt(e.value, at.current), h === void 0 && (m == null ? void 0 : m.lang) === void 0 && r.addLang && r.lang) {
3508
- const v = `alfadocs-${Ge}`;
3509
- r.addLang(v, Or(_)), Se.current = v;
3548
+ if (ee.current = r, e.value = bt(e.value, at.current), v === void 0 && (f == null ? void 0 : f.lang) === void 0 && r.addLang && r.lang) {
3549
+ const m = `alfadocs-${Ge}`;
3550
+ r.addLang(m, Dr(_)), Le.current = m;
3510
3551
  }
3511
3552
  const o = {
3512
- lang: Se.current ?? h ?? Os(it.language || "en"),
3553
+ lang: Le.current ?? v ?? Ps(it.language || "en"),
3513
3554
  // The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
3514
3555
  // via the command API, so Redactor's native toolbar is suppressed.
3515
3556
  toolbar: !1,
3516
3557
  plugins: u ?? [],
3517
- placeholder: g ?? _("editor.placeholder"),
3558
+ placeholder: h ?? _("editor.placeholder"),
3518
3559
  toolbarFixed: !1,
3519
3560
  // Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
3520
3561
  shortcodes: !1,
@@ -3524,10 +3565,10 @@ const Gs = ni(
3524
3565
  // second, untokenised, mouse-only UI competing with ours.
3525
3566
  imageEditable: !1,
3526
3567
  imageResizable: !1
3527
- }, i = L ? { imageUpload: L } : {}, s = (m == null ? void 0 : m.callbacks) ?? {}, c = {
3568
+ }, i = M ? { imageUpload: M } : {}, s = (f == null ? void 0 : f.callbacks) ?? {}, c = {
3528
3569
  ...o,
3529
3570
  ...i,
3530
- ...m ?? {},
3571
+ ...f ?? {},
3531
3572
  // Re-pin safety-critical keys LAST so consumer `options` can't override
3532
3573
  // the sanitising change handler or re-enable Redactor's native image UI
3533
3574
  // (the kit's ImageFloatingToolbar replaces both — see kitDefaults above).
@@ -3535,162 +3576,162 @@ const Gs = ni(
3535
3576
  imageResizable: !1,
3536
3577
  callbacks: {
3537
3578
  ...s,
3538
- changed(v) {
3539
- _e.current();
3540
- const S = sn(
3541
- Wr(Xr(v))
3542
- ), V = Ae(S), ne = Cr.current;
3543
- if (ne && Date.now() < ne.until && Qr(V) === ne.text) {
3544
- qt.current = V;
3579
+ changed(m) {
3580
+ Ie.current();
3581
+ const R = sn(
3582
+ Wr(Xr(m))
3583
+ ), F = Te(R), V = Ar.current;
3584
+ if (V && Date.now() < V.until && Qr(F) === V.text) {
3585
+ qt.current = F;
3545
3586
  return;
3546
3587
  }
3547
- V !== qt.current && (qt.current = V, mn.current = !0, he.current && (Ct.current && clearTimeout(Ct.current), Ct.current = setTimeout(() => {
3548
- var Ce;
3549
- (Ce = he.current) == null || Ce.call(he, { html: V, markdown: "" });
3588
+ F !== qt.current && (qt.current = F, mn.current = !0, be.current && (At.current && clearTimeout(At.current), At.current = setTimeout(() => {
3589
+ var fe;
3590
+ (fe = be.current) == null || fe.call(be, { html: F, markdown: "" });
3550
3591
  }, 100)));
3551
3592
  },
3552
- keydown(v) {
3553
- var S;
3554
- (S = Pt.current) == null || S.call(Pt, v);
3593
+ keydown(m) {
3594
+ var R;
3595
+ (R = Pt.current) == null || R.call(Pt, m);
3555
3596
  },
3556
3597
  observe() {
3557
- we();
3598
+ ve();
3558
3599
  }
3559
3600
  }
3560
3601
  };
3561
3602
  try {
3562
- if (r(H, c), qt.current = Ae(
3563
- sn(Wr(ce()))
3564
- ), _e.current(), b)
3603
+ if (r($, c), qt.current = Te(
3604
+ sn(Wr(de()))
3605
+ ), Ie.current(), b)
3565
3606
  try {
3566
- r(H, "enableReadOnly");
3607
+ r($, "enableReadOnly");
3567
3608
  } catch {
3568
3609
  }
3569
3610
  } catch {
3570
- Se.current && r.lang && delete r.lang[Se.current], Se.current = null, te.current = null, Un(!0);
3611
+ Le.current && r.lang && delete r.lang[Le.current], Le.current = null, ee.current = null, Zn(!0);
3571
3612
  }
3572
3613
  return () => {
3573
- Ct.current && clearTimeout(Ct.current);
3614
+ At.current && clearTimeout(At.current);
3574
3615
  try {
3575
- r(H, "destroy");
3616
+ r($, "destroy");
3576
3617
  } catch {
3577
3618
  }
3578
- Se.current && r.lang && delete r.lang[Se.current], Se.current = null, te.current = null;
3619
+ Le.current && r.lang && delete r.lang[Le.current], Le.current = null, ee.current = null;
3579
3620
  };
3580
3621
  }, []), I(() => {
3581
- const e = te.current, r = Se.current;
3622
+ const e = ee.current, r = Le.current;
3582
3623
  if (!(!(e != null && e.addLang) || !r)) {
3583
- e.addLang(r, Or(_));
3624
+ e.addLang(r, Dr(_));
3584
3625
  try {
3585
- e(H, "lang.rebuild", r);
3626
+ e($, "lang.rebuild", r);
3586
3627
  } catch {
3587
3628
  }
3588
3629
  }
3589
- }, [_, it.language, H]);
3590
- const xr = x(ge), Cr = x(
3630
+ }, [_, it.language, $]);
3631
+ const Cr = C(pe), Ar = C(
3591
3632
  null
3592
3633
  );
3593
3634
  I(() => {
3594
3635
  var o, i;
3595
- if (xr.current === ge || (xr.current = ge, !te.current || ge.size === 0)) return;
3596
- const e = ce(), r = bt(e, ge);
3636
+ if (Cr.current === pe || (Cr.current = pe, !ee.current || pe.size === 0)) return;
3637
+ const e = de(), r = bt(e, pe);
3597
3638
  if (r !== e) {
3598
- const s = (o = Q.current) == null ? void 0 : o.querySelector(".redactor-in"), v = s != null && s.contains(document.activeElement) && s ? Ss(s) : null;
3599
- Cr.current = {
3639
+ const s = (o = Z.current) == null ? void 0 : o.querySelector(".redactor-in"), m = s != null && s.contains(document.activeElement) && s ? Is(s) : null;
3640
+ Ar.current = {
3600
3641
  text: Qr(e),
3601
3642
  until: Date.now() + 1e3
3602
- }, de("source.setCode", r);
3603
- const S = (i = Q.current) == null ? void 0 : i.querySelector(".redactor-in");
3604
- v !== null && S && Ls(S, v);
3643
+ }, ue("source.setCode", r);
3644
+ const R = (i = Z.current) == null ? void 0 : i.querySelector(".redactor-in");
3645
+ m !== null && R && $s(R, m);
3605
3646
  }
3606
- window.requestAnimationFrame(() => _e.current());
3607
- }, [ge, ce, de]), I(() => {
3608
- if (!te.current || d === void 0) return;
3647
+ window.requestAnimationFrame(() => Ie.current());
3648
+ }, [pe, de, ue]), I(() => {
3649
+ if (!ee.current || d === void 0) return;
3609
3650
  if (mn.current) {
3610
3651
  mn.current = !1;
3611
3652
  return;
3612
3653
  }
3613
3654
  const e = bt(
3614
- Ae(sn(d)),
3655
+ Te(sn(d)),
3615
3656
  at.current
3616
3657
  );
3617
- sn(ce()) !== e && de("source.setCode", e);
3618
- }, [d, ce, de]), I(() => {
3619
- It.current = b;
3620
- const e = te.current;
3658
+ sn(de()) !== e && ue("source.setCode", e);
3659
+ }, [d, de, ue]), I(() => {
3660
+ wt.current = b;
3661
+ const e = ee.current;
3621
3662
  if (e)
3622
3663
  try {
3623
- e(H, b ? "enableReadOnly" : "disableReadOnly");
3664
+ e($, b ? "enableReadOnly" : "disableReadOnly");
3624
3665
  } catch {
3625
3666
  }
3626
- }, [b, H]), I(() => {
3627
- if (!fe || d === void 0) return;
3628
- const e = ee.current;
3667
+ }, [b, $]), I(() => {
3668
+ if (!he || d === void 0) return;
3669
+ const e = re.current;
3629
3670
  if (!e) return;
3630
- const r = Ae(d);
3671
+ const r = Te(d);
3631
3672
  e.value !== r && document.activeElement !== e && (e.value = r);
3632
- }, [fe, d]);
3673
+ }, [he, d]);
3633
3674
  const Be = gt(
3634
3675
  () => ({
3635
3676
  getHTML() {
3636
- return ce();
3677
+ return de();
3637
3678
  },
3638
3679
  getText() {
3639
- return ce().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
3680
+ return de().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
3640
3681
  },
3641
3682
  getMarkdown() {
3642
3683
  return "";
3643
3684
  },
3644
3685
  isAiBusy() {
3645
- return $e.current !== null;
3686
+ return He.current !== null;
3646
3687
  },
3647
3688
  setContent(e) {
3648
- const r = Ae(e);
3649
- de(
3689
+ const r = Te(e);
3690
+ ue(
3650
3691
  "source.setCode",
3651
3692
  bt(r, at.current)
3652
- ) || ee.current && (ee.current.value = r);
3693
+ ) || re.current && (re.current.value = r);
3653
3694
  },
3654
- insertAtCursor: ue,
3695
+ insertAtCursor: me,
3655
3696
  applyFormat(e) {
3656
- const r = $s[e];
3697
+ const r = Ds[e];
3657
3698
  r && Xe(...r);
3658
3699
  },
3659
3700
  focus() {
3660
3701
  var r;
3661
- const e = te.current;
3702
+ const e = ee.current;
3662
3703
  if (e)
3663
3704
  try {
3664
- e(H, "editor.focus");
3705
+ e($, "editor.focus");
3665
3706
  return;
3666
3707
  } catch {
3667
3708
  }
3668
- (r = ee.current) == null || r.focus();
3709
+ (r = re.current) == null || r.focus();
3669
3710
  },
3670
3711
  clear() {
3671
- de("source.setCode", "") || ee.current && (ee.current.value = "");
3712
+ ue("source.setCode", "") || re.current && (re.current.value = "");
3672
3713
  }
3673
3714
  }),
3674
- [H, ce, de, ue, Xe]
3715
+ [$, de, ue, me, Xe]
3675
3716
  );
3676
- ri(me, () => Be, [Be]), ci(ja, Be, n);
3677
- const Fo = k(
3717
+ ri(ge, () => Be, [Be]), ci(ja, Be, n);
3718
+ const Fo = w(
3678
3719
  (e) => {
3679
3720
  var r;
3680
- _e.current(), (r = he.current) == null || r.call(he, {
3681
- html: Ae(e.target.value),
3721
+ Ie.current(), (r = be.current) == null || r.call(be, {
3722
+ html: Te(e.target.value),
3682
3723
  markdown: ""
3683
3724
  });
3684
3725
  },
3685
3726
  []
3686
- ), tn = f ?? _("editor.regionLabel"), _n = m == null ? void 0 : m.placeholder, Rt = typeof _n == "string" || _n === !1 ? _n : g ?? _("editor.placeholder");
3727
+ ), tn = g ?? _("editor.regionLabel"), _n = f == null ? void 0 : f.placeholder, Mt = typeof _n == "string" || _n === !1 ? _n : h ?? _("editor.placeholder");
3687
3728
  I(() => {
3688
3729
  var i;
3689
- if (fe) return;
3690
- const e = (i = Q.current) == null ? void 0 : i.querySelector(".redactor-in");
3730
+ if (he) return;
3731
+ const e = (i = Z.current) == null ? void 0 : i.querySelector(".redactor-in");
3691
3732
  if (!e) return;
3692
3733
  const r = () => {
3693
- e.getAttribute("role") !== "textbox" && e.setAttribute("role", "textbox"), e.getAttribute("aria-multiline") !== "true" && e.setAttribute("aria-multiline", "true"), e.getAttribute("aria-label") !== tn && e.setAttribute("aria-label", tn), Rt === !1 ? e.hasAttribute("placeholder") && e.removeAttribute("placeholder") : e.getAttribute("placeholder") !== Rt && e.setAttribute("placeholder", Rt), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby");
3734
+ e.getAttribute("role") !== "textbox" && e.setAttribute("role", "textbox"), e.getAttribute("aria-multiline") !== "true" && e.setAttribute("aria-multiline", "true"), e.getAttribute("aria-label") !== tn && e.setAttribute("aria-label", tn), Mt === !1 ? e.hasAttribute("placeholder") && e.removeAttribute("placeholder") : e.getAttribute("placeholder") !== Mt && e.setAttribute("placeholder", Mt), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby");
3694
3735
  };
3695
3736
  r();
3696
3737
  const o = new MutationObserver(r);
@@ -3698,193 +3739,193 @@ const Gs = ni(
3698
3739
  attributes: !0,
3699
3740
  attributeFilter: ["role", "aria-labelledby", "placeholder"]
3700
3741
  }), () => o.disconnect();
3701
- }, [fe, tn, Rt]);
3702
- const nn = Je !== null, jo = k(
3742
+ }, [he, tn, Mt]);
3743
+ const nn = Je !== null, jo = w(
3703
3744
  (e) => {
3704
- On.test(e) && (fe ? ue(`[[${e}]]`, { asHtml: !1 }) : (be(), Ue(Jr(e))), se == null || se(e));
3745
+ On.test(e) && (he ? me(`[[${e}]]`, { asHtml: !1 }) : (ye(), Ue(Jr(e))), ce == null || ce(e));
3705
3746
  },
3706
3747
  [
3707
- fe,
3708
- ue,
3709
- be,
3748
+ he,
3749
+ me,
3750
+ ye,
3710
3751
  Ue,
3711
- se
3752
+ ce
3712
3753
  ]
3713
- ), In = x(null), [Go, Ko] = E(!1), [Vo, Wo] = E(!1), Xo = k(
3754
+ ), In = C(null), [Go, Ko] = E(!1), [Vo, Wo] = E(!1), Xo = w(
3714
3755
  (e, r) => {
3715
3756
  if (Wo(e), !e) return;
3716
3757
  const o = tt(r);
3717
3758
  In.current = o, Ko(!o.text.trim());
3718
3759
  },
3719
3760
  [tt]
3720
- ), Uo = k(
3761
+ ), Uo = w(
3721
3762
  (e) => {
3722
3763
  const r = In.current ?? tt("document");
3723
- In.current = null, yr(e, r);
3764
+ In.current = null, wr(e, r);
3724
3765
  },
3725
- [tt, yr]
3726
- ), Ar = (e, r) => {
3766
+ [tt, wr]
3767
+ ), Nr = (e, r) => {
3727
3768
  if (!r) return null;
3728
3769
  const o = Je === e;
3729
3770
  return {
3730
3771
  key: e,
3731
3772
  // While running, the segment becomes a Stop/Cancel button (progress
3732
3773
  // shows on the scrim spinner).
3733
- icon: o ? /* @__PURE__ */ t(zt, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : e === "proofread" ? /* @__PURE__ */ t($r, { "aria-hidden": "true", className: "ds:size-5" }) : /* @__PURE__ */ t(Hr, { "aria-hidden": "true", className: "ds:size-5" }),
3774
+ icon: o ? /* @__PURE__ */ t(St, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : e === "proofread" ? /* @__PURE__ */ t(Hr, { "aria-hidden": "true", className: "ds:size-5" }) : /* @__PURE__ */ t(Or, { "aria-hidden": "true", className: "ds:size-5" }),
3734
3775
  label: o ? _("common.cancel") : e === "proofread" ? _("editor.ai.proofread", "Check spelling & grammar") : _("editor.ai.autoFormat", "Auto-format document"),
3735
- onClick: o ? wr : () => Et(e, r, tt("document")),
3776
+ onClick: o ? kr : () => Rt(e, r, tt("document")),
3736
3777
  running: o
3737
3778
  };
3738
- }, Me = zi(Ee), nt = [];
3739
- if (j && nt.push({
3779
+ }, Se = zi(Me), nt = [];
3780
+ if (K && nt.push({
3740
3781
  key: "dictate",
3741
- icon: ke ? /* @__PURE__ */ t(zt, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(qn, { "aria-hidden": "true", className: "ds:size-5" }),
3742
- label: _(ke ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
3743
- onClick: () => ur("document"),
3744
- recording: ke
3745
- }), Y) {
3782
+ icon: xe ? /* @__PURE__ */ t(St, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(qn, { "aria-hidden": "true", className: "ds:size-5" }),
3783
+ label: _(xe ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
3784
+ onClick: () => mr("document"),
3785
+ recording: xe
3786
+ }), te) {
3746
3787
  const e = Je === "template";
3747
3788
  nt.push({
3748
3789
  key: "templates",
3749
- icon: e ? /* @__PURE__ */ t(zt, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(Pn, { "aria-hidden": "true", className: "ds:size-5" }),
3790
+ icon: e ? /* @__PURE__ */ t(St, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(Pn, { "aria-hidden": "true", className: "ds:size-5" }),
3750
3791
  label: _(e ? "common.cancel" : "editor.ai.templates"),
3751
- onClick: e ? wr : void 0,
3792
+ onClick: e ? kr : void 0,
3752
3793
  running: e,
3753
3794
  menu: !e
3754
3795
  });
3755
3796
  }
3756
- const Nr = Ar("proofread", Z);
3757
- Nr && nt.push(Nr);
3758
- const Tr = Ar("format", pe);
3759
- Tr && nt.push(Tr), (U || B) && nt.push({
3797
+ const Tr = Nr("proofread", Y);
3798
+ Tr && nt.push(Tr);
3799
+ const Er = Nr("format", se);
3800
+ Er && nt.push(Er), (W || B) && nt.push({
3760
3801
  key: "write",
3761
- icon: /* @__PURE__ */ t(Ir, { "aria-hidden": "true", className: "ds:size-5" }),
3802
+ icon: /* @__PURE__ */ t($r, { "aria-hidden": "true", className: "ds:size-5" }),
3762
3803
  label: _("editor.ai.helpMeWrite"),
3763
- onClick: () => mr("document")
3804
+ onClick: () => fr("document")
3764
3805
  });
3765
- const Er = (e, r) => Y ? /* @__PURE__ */ t(
3766
- xs,
3806
+ const Rr = (e, r) => te ? /* @__PURE__ */ t(
3807
+ Cs,
3767
3808
  {
3768
3809
  side: r === "document" ? "top" : "bottom",
3769
- templates: Y.templates,
3810
+ templates: te.templates,
3770
3811
  onPick: Uo,
3771
- onManage: Y.onManage,
3812
+ onManage: te.onManage,
3772
3813
  noteEmpty: Go,
3773
3814
  onOpenChange: (o) => Xo(o, r),
3774
3815
  trigger: e
3775
3816
  }
3776
- ) : null, Rr = (w ?? []).filter(
3777
- (e) => !e.contexts || N !== void 0 && e.contexts.includes(N)
3817
+ ) : null, Mr = (k ?? []).filter(
3818
+ (e) => !e.contexts || T !== void 0 && e.contexts.includes(T)
3778
3819
  );
3779
3820
  I(() => {
3780
- (kt || Zt !== null || b) && Le(!1);
3781
- }, [kt, Zt, b, Le]), I(() => {
3782
- ve && !(w ?? []).some(
3783
- (e) => e.id === ve.extension.id && (!e.contexts || N !== void 0 && e.contexts.includes(N))
3784
- ) && Le();
3785
- }, [w, N, ve, Le]);
3821
+ (xt || Zt !== null || b) && _e(!1);
3822
+ }, [xt, Zt, b, _e]), I(() => {
3823
+ we && !(k ?? []).some(
3824
+ (e) => e.id === we.extension.id && (!e.contexts || T !== void 0 && e.contexts.includes(T))
3825
+ ) && _e();
3826
+ }, [k, T, we, _e]);
3786
3827
  const Zo = (e) => {
3787
- var Ce, Fe;
3828
+ var fe, Fe;
3788
3829
  if (gn) return;
3789
3830
  bn(), Pe(!1), Mn();
3790
3831
  const r = new AbortController();
3791
- xt.current = r;
3792
- const o = (Ce = ye.current) == null ? void 0 : Ce.cloneRange(), i = ee.current ? [
3793
- ee.current.selectionStart,
3794
- ee.current.selectionEnd
3795
- ] : null, s = (o == null ? void 0 : o.toString()) ?? (i ? (((Fe = ee.current) == null ? void 0 : Fe.value) ?? "").slice(...i) : "");
3832
+ Ct.current = r;
3833
+ const o = (fe = ke.current) == null ? void 0 : fe.cloneRange(), i = re.current ? [
3834
+ re.current.selectionStart,
3835
+ re.current.selectionEnd
3836
+ ] : null, s = (o == null ? void 0 : o.toString()) ?? (i ? (((Fe = re.current) == null ? void 0 : Fe.value) ?? "").slice(...i) : "");
3796
3837
  let c = !1;
3797
- const v = (re) => {
3798
- var He;
3799
- c || (c = !0, (He = $t.current) == null || He.call($t, e.id, re));
3838
+ const m = (oe) => {
3839
+ var Oe;
3840
+ c || (c = !0, (Oe = $t.current) == null || Oe.call($t, e.id, oe));
3800
3841
  };
3801
- Ke.current = v;
3802
- const S = () => {
3803
- r.signal.aborted || (v({ status: "error" }), r.abort(), hn(!1), Qn(!0), pn());
3804
- }, V = async (re) => {
3842
+ Ke.current = m;
3843
+ const R = () => {
3844
+ r.signal.aborted || (m({ status: "error" }), r.abort(), hn(!1), Jn(!0), pn());
3845
+ }, F = async (oe) => {
3805
3846
  var ft;
3806
3847
  if (r.signal.aborted) return;
3807
- let He = re.mode === "image" ? "" : re.html;
3808
- if (re.mode !== "text") {
3809
- const rt = await re.pngDataUri();
3848
+ let Oe = oe.mode === "image" ? "" : oe.html;
3849
+ if (oe.mode !== "text") {
3850
+ const rt = await oe.pngDataUri();
3810
3851
  if (r.signal.aborted) return;
3811
- const Mt = await (await fetch(rt.dataUri, { signal: r.signal })).blob(), $n = await or(
3812
- new File([Mt], "extension-result.png", { type: "image/png" }),
3852
+ const zt = await (await fetch(rt.dataUri, { signal: r.signal })).blob(), $n = await ir(
3853
+ new File([zt], "extension-result.png", { type: "image/png" }),
3813
3854
  r.signal
3814
3855
  );
3815
3856
  if (r.signal.aborted) return;
3816
- const Oe = document.createElement("img");
3817
- Oe.src = $n, Oe.alt = re.text, Oe.width = rt.width, Oe.height = rt.height, Oe.loading = "lazy", He += Oe.outerHTML;
3857
+ const De = document.createElement("img");
3858
+ De.src = $n, De.alt = oe.text, De.width = rt.width, De.height = rt.height, De.loading = "lazy", Oe += De.outerHTML;
3818
3859
  }
3819
- r.signal.aborted || (o && (ye.current = o.cloneRange()), i && ((ft = ee.current) == null || ft.setSelectionRange(...i)), be(), ue(He, { asHtml: !0 }), v({ status: "success" }), Le());
3820
- }, ne = {
3860
+ r.signal.aborted || (o && (ke.current = o.cloneRange()), i && ((ft = re.current) == null || ft.setSelectionRange(...i)), ye(), me(Oe, { asHtml: !0 }), m({ status: "success" }), _e());
3861
+ }, V = {
3821
3862
  html: Be.getHTML(),
3822
3863
  text: Be.getText(),
3823
3864
  selectionText: s,
3824
3865
  scope: s ? "selection" : "document",
3825
3866
  signal: r.signal,
3826
3867
  close: () => {
3827
- xt.current === r && Le();
3868
+ Ct.current === r && _e();
3828
3869
  },
3829
- insert: async (re) => {
3870
+ insert: async (oe) => {
3830
3871
  try {
3831
- await V(re);
3872
+ await F(oe);
3832
3873
  } catch {
3833
- S();
3874
+ R();
3834
3875
  }
3835
3876
  }
3836
3877
  };
3837
- Zn({ extension: e, context: ne }), e.kind === "action" && (hn(!0), (async () => {
3878
+ Qn({ extension: e, context: V }), e.kind === "action" && (hn(!0), (async () => {
3838
3879
  try {
3839
3880
  if (!e.run) throw new Error("Missing extension run");
3840
- const re = await e.run(ne);
3881
+ const oe = await e.run(V);
3841
3882
  if (r.signal.aborted) return;
3842
- re ? await V(re) : (v({ status: "success" }), Le());
3883
+ oe ? await F(oe) : (m({ status: "success" }), _e());
3843
3884
  } catch {
3844
- S();
3885
+ R();
3845
3886
  }
3846
3887
  })());
3847
- }, Mr = mo.map(
3848
- (e) => Rr.filter(
3888
+ }, zr = mo.map(
3889
+ (e) => Mr.filter(
3849
3890
  (r) => {
3850
3891
  var o;
3851
3892
  return (((o = r.source) == null ? void 0 : o.kind) ?? "kit") === e;
3852
3893
  }
3853
3894
  )
3854
- ), Qo = Mr.every(
3895
+ ), Qo = zr.every(
3855
3896
  (e) => e.length > 0
3856
- ), Jo = Rr.length > 0 ? /* @__PURE__ */ t(
3857
- js,
3897
+ ), Jo = Mr.length > 0 ? /* @__PURE__ */ t(
3898
+ Vs,
3858
3899
  {
3859
- groupedExtensions: Mr,
3900
+ groupedExtensions: zr,
3860
3901
  showExtensionGroups: Qo,
3861
3902
  extensionPending: gn,
3862
- extensionSession: ve,
3903
+ extensionSession: we,
3863
3904
  extensionError: fn,
3864
3905
  openExtension: Zo,
3865
- closeExtension: Le,
3906
+ closeExtension: _e,
3866
3907
  saveSelection: dt,
3867
3908
  closeSignal: fo,
3868
- restoreFocusOnCloseRef: Jn
3909
+ restoreFocusOnCloseRef: Yn
3869
3910
  }
3870
- ) : void 0, zr = !!(U || B), Sr = !!(Y || Z || pe || zr || j), Yo = !fe && !b && (ze ?? Sr), ei = k(
3911
+ ) : void 0, Sr = !!(W || B), Lr = !!(te || Y || se || Sr || K), Yo = !he && !b && (Re ?? Lr), ei = w(
3871
3912
  () => {
3872
3913
  var e;
3873
- return ((e = Q.current) == null ? void 0 : e.querySelector(".redactor-in")) ?? null;
3914
+ return ((e = Z.current) == null ? void 0 : e.querySelector(".redactor-in")) ?? null;
3874
3915
  },
3875
3916
  []
3876
3917
  );
3877
- return /* @__PURE__ */ C(
3918
+ return /* @__PURE__ */ A(
3878
3919
  "div",
3879
3920
  {
3880
- ref: Q,
3881
- className: [Ds(), R].filter(Boolean).join(" "),
3921
+ ref: Z,
3922
+ className: [Bs(), z].filter(Boolean).join(" "),
3882
3923
  "data-component": "rich-text-editor",
3883
3924
  "data-component-id": n,
3884
3925
  "data-min-height": y,
3885
3926
  children: [
3886
- !fe && !b ? /* @__PURE__ */ t(
3887
- Ts,
3927
+ !he && !b ? /* @__PURE__ */ t(
3928
+ Es,
3888
3929
  {
3889
3930
  run: Xe,
3890
3931
  active: Cn,
@@ -3892,32 +3933,32 @@ const Gs = ni(
3892
3933
  insertHtml: Ue,
3893
3934
  insertTable: Io,
3894
3935
  saveSelection: dt,
3895
- restoreSelection: be,
3936
+ restoreSelection: ye,
3896
3937
  getSelectedText: Ro,
3897
- uploadImage: L || M ? or : void 0,
3938
+ uploadImage: M || L ? ir : void 0,
3898
3939
  enableColor: (u == null ? void 0 : u.includes("fontcolor")) ?? !1,
3899
- enableImage: !!(L || M),
3940
+ enableImage: !!(M || L),
3900
3941
  enableTable: (u == null ? void 0 : u.includes("table")) ?? !1,
3901
- showExtensions: A,
3942
+ showExtensions: N,
3902
3943
  extensionControl: Jo,
3903
- variables: er,
3904
- recentVariableTokens: ae,
3944
+ variables: tr,
3945
+ recentVariableTokens: ne,
3905
3946
  insertVariable: jo
3906
3947
  }
3907
3948
  ) : null,
3908
- /* @__PURE__ */ C("div", { className: "ds:relative", ref: wt, children: [
3949
+ /* @__PURE__ */ A("div", { className: "ds:relative", ref: kt, children: [
3909
3950
  /* @__PURE__ */ t(
3910
3951
  "textarea",
3911
3952
  {
3912
- ref: ee,
3953
+ ref: re,
3913
3954
  id: Ge,
3914
3955
  "aria-label": tn,
3915
3956
  "aria-multiline": "true",
3916
3957
  "aria-busy": nn || void 0,
3917
- placeholder: Rt || void 0,
3918
- onChange: fe ? Fo : void 0,
3919
- readOnly: fe ? b : void 0,
3920
- className: fe ? Ps() : void 0
3958
+ placeholder: Mt || void 0,
3959
+ onChange: he ? Fo : void 0,
3960
+ readOnly: he ? b : void 0,
3961
+ className: he ? js() : void 0
3921
3962
  }
3922
3963
  ),
3923
3964
  nn ? /* @__PURE__ */ t(
@@ -3925,18 +3966,18 @@ const Gs = ni(
3925
3966
  {
3926
3967
  "aria-hidden": "true",
3927
3968
  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)]",
3928
- children: /* @__PURE__ */ t(Kn, { size: "lg", variant: "prism" })
3969
+ children: /* @__PURE__ */ t(Vn, { size: "lg", variant: "prism" })
3929
3970
  }
3930
3971
  ) : null,
3931
- /* @__PURE__ */ C("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
3932
- nt.length > 0 ? /* @__PURE__ */ C(
3972
+ /* @__PURE__ */ A("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
3973
+ nt.length > 0 ? /* @__PURE__ */ A(
3933
3974
  "div",
3934
3975
  {
3935
- ref: kr,
3976
+ ref: xr,
3936
3977
  className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10",
3937
3978
  "data-ai-sparkle": Ze.props["data-ai-sparkle"],
3938
3979
  children: [
3939
- /* @__PURE__ */ C("div", { className: ai, children: [
3980
+ /* @__PURE__ */ A("div", { className: ai, children: [
3940
3981
  nt.map((e, r) => {
3941
3982
  const o = /* @__PURE__ */ t(
3942
3983
  "button",
@@ -3949,11 +3990,11 @@ const Gs = ni(
3949
3990
  "data-component-part": `ai-${e.key}`,
3950
3991
  disabled: nn && !e.running || void 0,
3951
3992
  "aria-label": e.label,
3952
- className: e.recording ? Fs : Bs,
3993
+ className: e.recording ? Ks : Gs,
3953
3994
  children: e.icon
3954
3995
  }
3955
3996
  );
3956
- return /* @__PURE__ */ C(vt, { children: [
3997
+ return /* @__PURE__ */ A(vt, { children: [
3957
3998
  r > 0 ? /* @__PURE__ */ t(
3958
3999
  "span",
3959
4000
  {
@@ -3962,8 +4003,8 @@ const Gs = ni(
3962
4003
  }
3963
4004
  ) : null,
3964
4005
  ht(
3965
- e.menu ? Er(o, "document") : o,
3966
- Me
4006
+ e.menu ? Rr(o, "document") : o,
4007
+ Se
3967
4008
  )
3968
4009
  ] }, e.key);
3969
4010
  }),
@@ -3982,17 +4023,17 @@ const Gs = ni(
3982
4023
  /* @__PURE__ */ t(
3983
4024
  Dn,
3984
4025
  {
3985
- open: !!(ve && (!gn || fn)),
3986
- onClose: Le,
3987
- title: ve ? io(_, ve.extension.label) : void 0,
3988
- children: fn ? /* @__PURE__ */ t(oo, {}) : /* @__PURE__ */ t("div", { className: "ds:overflow-y-auto ds:[max-block-size:min(60dvh,calc(var(--rich-text-editor-min-block-size)*3))]", children: (_r = ve == null ? void 0 : (Lr = ve.extension).render) == null ? void 0 : _r.call(
3989
- Lr,
3990
- ve.context
4026
+ open: !!(we && (!gn || fn)),
4027
+ onClose: _e,
4028
+ title: we ? io(_, we.extension.label) : void 0,
4029
+ children: fn ? /* @__PURE__ */ t(oo, {}) : /* @__PURE__ */ t("div", { className: "ds:overflow-y-auto ds:[max-block-size:min(60dvh,calc(var(--rich-text-editor-min-block-size)*3))]", children: (Ir = we == null ? void 0 : (_r = we.extension).render) == null ? void 0 : Ir.call(
4030
+ _r,
4031
+ we.context
3991
4032
  ) })
3992
4033
  }
3993
4034
  ),
3994
4035
  B ? B({
3995
- open: kt && !xe,
4036
+ open: xt && !Ce,
3996
4037
  onClose: () => {
3997
4038
  Pe(!1), vn(!1);
3998
4039
  },
@@ -4004,36 +4045,36 @@ const Gs = ni(
4004
4045
  // All three write seams put AI output into the note, so
4005
4046
  // each one is an action landing and sparkles the pill.
4006
4047
  insertAtSelection: (e) => {
4007
- Ht.current && (ye.current = Ht.current.cloneRange()), be(), ue(e, { asHtml: !0 }), X && Ie();
4048
+ Ht.current && (ke.current = Ht.current.cloneRange()), ye(), me(e, { asHtml: !0 }), J && $e();
4008
4049
  },
4009
4050
  insertAfterSelection: (e) => {
4010
- const r = Ht.current ?? ye.current;
4051
+ const r = Ht.current ?? ke.current;
4011
4052
  if (r) {
4012
4053
  const o = r.cloneRange();
4013
- o.collapse(!1), ye.current = o;
4054
+ o.collapse(!1), ke.current = o;
4014
4055
  }
4015
- be(), ue(e, { asHtml: !0 }), X && Ie();
4056
+ ye(), me(e, { asHtml: !0 }), J && $e();
4016
4057
  },
4017
4058
  setContent: (e) => {
4018
- Be.setContent(e), X && Ie();
4059
+ Be.setContent(e), J && $e();
4019
4060
  },
4020
- onDictate: j,
4021
- privacyNotice: fr
4022
- }) : U ? /* @__PURE__ */ t(
4061
+ onDictate: K,
4062
+ privacyNotice: gr
4063
+ }) : W ? /* @__PURE__ */ t(
4023
4064
  Ua,
4024
4065
  {
4025
- open: kt && !xe,
4066
+ open: xt && !Ce,
4026
4067
  onClose: () => Pe(!1),
4027
- onRequestAiDraft: U,
4068
+ onRequestAiDraft: W,
4028
4069
  onInsert: (e) => {
4029
- be(), ue(e, { asHtml: O !== "text" }), X && Ie();
4070
+ ye(), me(e, { asHtml: j !== "text" }), J && $e();
4030
4071
  },
4031
- previewAsHtml: O !== "text",
4032
- privacyNotice: fr,
4033
- onDictate: j
4072
+ previewAsHtml: j !== "text",
4073
+ privacyNotice: gr,
4074
+ onDictate: K
4034
4075
  }
4035
4076
  ) : null,
4036
- T ? /* @__PURE__ */ t(
4077
+ x ? /* @__PURE__ */ t(
4037
4078
  Dn,
4038
4079
  {
4039
4080
  open: Zt !== null,
@@ -4042,17 +4083,17 @@ const Gs = ni(
4042
4083
  "editor.ai.consentRegionLabel",
4043
4084
  "AI assistance consent for this document"
4044
4085
  ),
4045
- footer: /* @__PURE__ */ t(Ne, { intent: "ghost", size: "sm", onClick: Mn, children: _("common.close") }),
4086
+ footer: /* @__PURE__ */ t(Ee, { intent: "ghost", size: "sm", onClick: Mn, children: _("common.close") }),
4046
4087
  children: /* @__PURE__ */ t(
4047
4088
  mi,
4048
4089
  {
4049
- granted: T.granted,
4050
- grantedAt: T.grantedAt,
4051
- grantedBy: T.grantedBy,
4052
- canGrant: (T.canGrant ?? !0) && T.onGrant !== void 0,
4090
+ granted: x.granted,
4091
+ grantedAt: x.grantedAt,
4092
+ grantedBy: x.grantedBy,
4093
+ canGrant: (x.canGrant ?? !0) && x.onGrant !== void 0,
4053
4094
  pending: Do,
4054
4095
  onGrantConsent: qo,
4055
- headingLevel: J,
4096
+ headingLevel: Q,
4056
4097
  "aria-label": _(
4057
4098
  "editor.ai.consentRegionLabel",
4058
4099
  "AI assistance consent for this document"
@@ -4062,135 +4103,135 @@ const Gs = ni(
4062
4103
  }
4063
4104
  ) : null
4064
4105
  ] }),
4065
- !fe && !b && ((u == null ? void 0 : u.includes("table")) ?? !1) ? /* @__PURE__ */ t(
4066
- us,
4106
+ !he && !b && ((u == null ? void 0 : u.includes("table")) ?? !1) ? /* @__PURE__ */ t(
4107
+ ms,
4067
4108
  {
4068
4109
  active: Cn,
4069
4110
  run: Xe,
4070
- areaRef: wt,
4111
+ areaRef: kt,
4071
4112
  getActiveTableEl: Mo,
4072
4113
  enableColor: (u == null ? void 0 : u.includes("fontcolor")) ?? !1,
4073
4114
  saveTableCell: zo,
4074
4115
  applyTableBackground: So
4075
4116
  }
4076
4117
  ) : null,
4077
- !fe && !b ? /* @__PURE__ */ t(
4078
- ks,
4118
+ !he && !b ? /* @__PURE__ */ t(
4119
+ xs,
4079
4120
  {
4080
- areaRef: wt,
4121
+ areaRef: kt,
4081
4122
  activeImageEl: ko,
4082
4123
  applyImageClass: Lo,
4083
4124
  setImageWidth: _o
4084
4125
  }
4085
4126
  ) : null,
4086
4127
  Yo ? /* @__PURE__ */ t(
4087
- Ns,
4128
+ Ts,
4088
4129
  {
4089
4130
  active: Cn,
4090
4131
  run: Xe,
4091
- areaRef: wt,
4132
+ areaRef: kt,
4092
4133
  getEditorRoot: ei,
4093
- suppressed: nn || kt || Zt !== null || ve !== null,
4134
+ suppressed: nn || xt || Zt !== null || we !== null,
4094
4135
  holdOpen: Vo,
4095
- children: Sr ? /* @__PURE__ */ C(De, { children: [
4096
- j ? ht(
4136
+ children: Lr ? /* @__PURE__ */ A(qe, { children: [
4137
+ K ? ht(
4097
4138
  /* @__PURE__ */ t(
4098
- W,
4139
+ U,
4099
4140
  {
4100
4141
  size: "sm",
4101
4142
  intent: "ghost",
4102
4143
  "data-component-part": "selection-ai-dictate",
4103
- onMouseDown: Tt,
4104
- icon: ke ? /* @__PURE__ */ t(zt, {}) : /* @__PURE__ */ t(qn, {}),
4105
- "aria-pressed": ke,
4144
+ onMouseDown: Et,
4145
+ icon: xe ? /* @__PURE__ */ t(St, {}) : /* @__PURE__ */ t(qn, {}),
4146
+ "aria-pressed": xe,
4106
4147
  ...ln(
4107
- _(ke ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
4108
- !!Me
4148
+ _(xe ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
4149
+ !!Se
4109
4150
  ),
4110
- onClick: () => ur("selection")
4151
+ onClick: () => mr("selection")
4111
4152
  }
4112
4153
  ),
4113
- Me
4154
+ Se
4114
4155
  ) : null,
4115
- Y ? ht(
4116
- Er(
4156
+ te ? ht(
4157
+ Rr(
4117
4158
  /* @__PURE__ */ t(
4118
- Ne,
4159
+ Ee,
4119
4160
  {
4120
4161
  size: "sm",
4121
4162
  intent: "ghost",
4122
4163
  "data-component-part": "selection-ai-templates",
4123
- onMouseDown: Tt,
4164
+ onMouseDown: Et,
4124
4165
  startIcon: /* @__PURE__ */ t(Pn, {}),
4125
- endIcon: /* @__PURE__ */ t(Xn, {}),
4166
+ endIcon: /* @__PURE__ */ t(Un, {}),
4126
4167
  children: _("editor.ai.templates")
4127
4168
  }
4128
4169
  ),
4129
4170
  "selection"
4130
4171
  ),
4131
- Me
4172
+ Se
4132
4173
  ) : null,
4133
- Z ? ht(
4174
+ Y ? ht(
4134
4175
  /* @__PURE__ */ t(
4135
- W,
4176
+ U,
4136
4177
  {
4137
4178
  size: "sm",
4138
4179
  intent: "ghost",
4139
4180
  "data-component-part": "selection-ai-proofread",
4140
- onMouseDown: Tt,
4141
- icon: /* @__PURE__ */ t($r, {}),
4181
+ onMouseDown: Et,
4182
+ icon: /* @__PURE__ */ t(Hr, {}),
4142
4183
  ...ln(
4143
4184
  _("editor.ai.proofread"),
4144
- !!Me
4185
+ !!Se
4145
4186
  ),
4146
- onClick: () => Et(
4187
+ onClick: () => Rt(
4147
4188
  "proofread",
4148
- Z,
4189
+ Y,
4149
4190
  tt("selection")
4150
4191
  )
4151
4192
  }
4152
4193
  ),
4153
- Me
4194
+ Se
4154
4195
  ) : null,
4155
- pe ? ht(
4196
+ se ? ht(
4156
4197
  /* @__PURE__ */ t(
4157
- W,
4198
+ U,
4158
4199
  {
4159
4200
  size: "sm",
4160
4201
  intent: "ghost",
4161
4202
  "data-component-part": "selection-ai-format",
4162
- onMouseDown: Tt,
4163
- icon: /* @__PURE__ */ t(Hr, {}),
4203
+ onMouseDown: Et,
4204
+ icon: /* @__PURE__ */ t(Or, {}),
4164
4205
  ...ln(
4165
4206
  _("editor.ai.autoFormat"),
4166
- !!Me
4207
+ !!Se
4167
4208
  ),
4168
- onClick: () => Et(
4209
+ onClick: () => Rt(
4169
4210
  "format",
4170
- pe,
4211
+ se,
4171
4212
  tt("selection")
4172
4213
  )
4173
4214
  }
4174
4215
  ),
4175
- Me
4216
+ Se
4176
4217
  ) : null,
4177
- zr ? ht(
4218
+ Sr ? ht(
4178
4219
  /* @__PURE__ */ t(
4179
- W,
4220
+ U,
4180
4221
  {
4181
4222
  size: "sm",
4182
4223
  intent: "ghost",
4183
4224
  "data-component-part": "selection-ai-write",
4184
- onMouseDown: Tt,
4185
- icon: /* @__PURE__ */ t(Ir, {}),
4225
+ onMouseDown: Et,
4226
+ icon: /* @__PURE__ */ t($r, {}),
4186
4227
  ...ln(
4187
4228
  _("editor.ai.helpMeWrite"),
4188
- !!Me
4229
+ !!Se
4189
4230
  ),
4190
- onClick: () => mr("selection")
4231
+ onClick: () => fr("selection")
4191
4232
  }
4192
4233
  ),
4193
- Me
4234
+ Se
4194
4235
  ) : null
4195
4236
  ] }) : null
4196
4237
  }
@@ -4198,7 +4239,7 @@ const Gs = ni(
4198
4239
  ct ? /* @__PURE__ */ t(
4199
4240
  "div",
4200
4241
  {
4201
- className: qs,
4242
+ className: Fs,
4202
4243
  style: {
4203
4244
  "--rte-typeahead-x": `${ct.left}px`,
4204
4245
  "--rte-typeahead-y": `${ct.top}px`
@@ -4206,10 +4247,10 @@ const Gs = ni(
4206
4247
  children: /* @__PURE__ */ t(
4207
4248
  eo,
4208
4249
  {
4209
- ref: nr,
4250
+ ref: rr,
4210
4251
  id: Tn,
4211
- variables: er,
4212
- recentTokens: ae,
4252
+ variables: tr,
4253
+ recentTokens: ne,
4213
4254
  query: ct.query,
4214
4255
  onQueryChange: Eo,
4215
4256
  onSelect: No,
@@ -4221,7 +4262,7 @@ const Gs = ni(
4221
4262
  }
4222
4263
  ) : null
4223
4264
  ] }),
4224
- j ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Ho }) : null,
4265
+ K ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Ho }) : null,
4225
4266
  lt.length > 0 ? /* @__PURE__ */ t(
4226
4267
  "p",
4227
4268
  {
@@ -4233,7 +4274,7 @@ const Gs = ni(
4233
4274
  })
4234
4275
  }
4235
4276
  ) : null,
4236
- j && $o ? /* @__PURE__ */ t(
4277
+ K && $o ? /* @__PURE__ */ t(
4237
4278
  "p",
4238
4279
  {
4239
4280
  role: "alert",
@@ -4241,13 +4282,13 @@ const Gs = ni(
4241
4282
  children: _("editor.ai.dictationError")
4242
4283
  }
4243
4284
  ) : null,
4244
- Y || Z || pe ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Bo }) : null,
4245
- Po || gr ? /* @__PURE__ */ t(
4285
+ te || Y || se ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: Bo }) : null,
4286
+ Po || hr ? /* @__PURE__ */ t(
4246
4287
  "p",
4247
4288
  {
4248
4289
  role: "alert",
4249
4290
  className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
4250
- children: _(gr ? "editor.ai.actionStale" : "editor.ai.actionError")
4291
+ children: _(hr ? "editor.ai.actionStale" : "editor.ai.actionError")
4251
4292
  }
4252
4293
  ) : null
4253
4294
  ]
@@ -4255,10 +4296,10 @@ const Gs = ni(
4255
4296
  );
4256
4297
  }
4257
4298
  );
4258
- Gs.displayName = "RichTextEditor";
4299
+ Ws.displayName = "RichTextEditor";
4259
4300
  export {
4260
- Gs as R,
4301
+ Ws as R,
4261
4302
  ja as r,
4262
- Ds as w
4303
+ Bs as w
4263
4304
  };
4264
- //# sourceMappingURL=rich-text-editor-DoCaj0qc.js.map
4305
+ //# sourceMappingURL=rich-text-editor-Cx9cA4pd.js.map