ryugi-artifacts 1.52.0 → 1.52.1

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 (297) hide show
  1. package/dist/cli.cjs +4 -4
  2. package/dist/server.cjs +1 -1
  3. package/dist/viewer/{DocumentLayout-B7lCSi2S.js → DocumentLayout-CZgCAGIl.js} +2 -2
  4. package/dist/viewer/DocumentPage-42fYT7p1.js +4 -0
  5. package/dist/viewer/{PreviewLayout-BEYL-cxG.js → PreviewLayout-CRr9bjoM.js} +2 -2
  6. package/dist/viewer/SnapshotDocument-BmzSjoZf.js +1 -0
  7. package/dist/viewer/VirtualizedEditor-D9Ivycdp-BwePxWz3.js +1 -0
  8. package/dist/viewer/{VirtualizedRenderer-C_d95FXi-DItHBjY8.js → VirtualizedRenderer-C_d95FXi-BcsPJsQT.js} +1 -1
  9. package/dist/viewer/{abnfDiagram-VCTEODGH-U_J3NQq_.js → abnfDiagram-VCTEODGH-BGayJPB6.js} +1 -1
  10. package/dist/viewer/{ar-SA-G6X2FPQ2-9QlMXZMa.js → ar-SA-G6X2FPQ2-DUOnj7Xx.js} +1 -1
  11. package/dist/viewer/{architectureDiagram-5GKGNRK7-6x9WtX4Y.js → architectureDiagram-5GKGNRK7-DIKIbz04.js} +1 -1
  12. package/dist/viewer/{az-AZ-76LH7QW2-D6JJf7p6.js → az-AZ-76LH7QW2-gcXIOrqR.js} +1 -1
  13. package/dist/viewer/{bg-BG-XCXSNQG7-Da1btUCY.js → bg-BG-XCXSNQG7-CXIXsYs4.js} +1 -1
  14. package/dist/viewer/{blockDiagram-I7D4REHJ-CdzYf_Oz.js → blockDiagram-I7D4REHJ-DNA0zHUm.js} +1 -1
  15. package/dist/viewer/{bn-BD-2XOGV67Q-BrXJy_nt.js → bn-BD-2XOGV67Q-CH2oxK-x.js} +1 -1
  16. package/dist/viewer/{c4Diagram-7LVT6UL2-D_AD-nyI.js → c4Diagram-7LVT6UL2-ClXGkkzV.js} +1 -1
  17. package/dist/viewer/{ca-ES-6MX7JW3Y-CNVDK18r.js → ca-ES-6MX7JW3Y-DhGgq-qu.js} +1 -1
  18. package/dist/viewer/{channel-C_CA0PJa.js → channel-DgDE6QWw.js} +151 -151
  19. package/dist/viewer/{chunk-4HAMMTFA-CSRLh2cV.js → chunk-4HAMMTFA-Bahg3wx0.js} +1 -1
  20. package/dist/viewer/{chunk-EIO257PC-CxGs3er0.js → chunk-EIO257PC-DcaHM1SU.js} +1 -1
  21. package/dist/viewer/{chunk-GMAD6QVW-Kf2IaN9n.js → chunk-GMAD6QVW-C85sr-iq.js} +1 -1
  22. package/dist/viewer/{chunk-GVQU2GXP-1hFULO-B.js → chunk-GVQU2GXP-CH5v7FPO.js} +1 -1
  23. package/dist/viewer/{chunk-IMKFNOWR-NoUq582p.js → chunk-IMKFNOWR-W-LidKxI.js} +1 -1
  24. package/dist/viewer/{chunk-L3NEJ4N5-DDs5IRd7.js → chunk-L3NEJ4N5-CX_WzCcs.js} +1 -1
  25. package/dist/viewer/{chunk-OSK3NFVY-B-h27qZK.js → chunk-OSK3NFVY-DstKrvNk.js} +1 -1
  26. package/dist/viewer/{chunk-PWAF6VOD-mMImR0Qk.js → chunk-PWAF6VOD-C5Kdz7Gq.js} +1 -1
  27. package/dist/viewer/{chunk-SHT3W25Y-B3TQ6GV8.js → chunk-SHT3W25Y-QdrQgUwX.js} +1 -1
  28. package/dist/viewer/{chunk-SVP7TREG-DQ5iEcVM.js → chunk-SVP7TREG-DygUds6s.js} +1 -1
  29. package/dist/viewer/{chunk-TICWLB2K-Cjqe85RE.js → chunk-TICWLB2K-DyaFt7dE.js} +1 -1
  30. package/dist/viewer/{classDiagram-ZZMXUADV-CWXxtBhC.js → classDiagram-ZZMXUADV-HUgr3GEG.js} +1 -1
  31. package/dist/viewer/{classDiagram-v2-VYDZK3BY-CWXxtBhC.js → classDiagram-v2-VYDZK3BY-HUgr3GEG.js} +1 -1
  32. package/dist/viewer/{cs-CZ-2BRQDIVT--RmvnnDY.js → cs-CZ-2BRQDIVT-CA36FChA.js} +1 -1
  33. package/dist/viewer/{cynefinDiagram-5FMLGOSQ-DJs_y3h6.js → cynefinDiagram-5FMLGOSQ-CBO_XisC.js} +1 -1
  34. package/dist/viewer/{da-DK-5WZEPLOC-AtGRzU_N.js → da-DK-5WZEPLOC-DpPEeJYp.js} +1 -1
  35. package/dist/viewer/{dagre-GXQ25YYZ-DbVQO3ew.js → dagre-GXQ25YYZ-CxZv6GTl.js} +1 -1
  36. package/dist/viewer/{de-DE-XR44H4JA-DnLYayke.js → de-DE-XR44H4JA-GEwCuNHI.js} +1 -1
  37. package/dist/viewer/{diagram-S7CK7UJ4-Dr0s5Dsf.js → diagram-S7CK7UJ4-D5px0VxF.js} +1 -1
  38. package/dist/viewer/{diagram-UQ7AKVKN-DJnFcKQU.js → diagram-UQ7AKVKN-DmxTV3Cn.js} +1 -1
  39. package/dist/viewer/{diagram-VX7I27RA-9X6hOK5m.js → diagram-VX7I27RA-BvWiwvdN.js} +1 -1
  40. package/dist/viewer/{diagram-Z3DM3KII-69YBQrCX.js → diagram-Z3DM3KII-BsUyaKx8.js} +1 -1
  41. package/dist/viewer/{dist-C2LQMt7S.js → dist-B1RjNuhI.js} +1 -1
  42. package/dist/viewer/{dist-wx3JQvAx.js → dist-B2h7crOx.js} +2 -2
  43. package/dist/viewer/{dist-PhW25gSO.js → dist-BGgW930J.js} +1 -1
  44. package/dist/viewer/{dist-jrwG2rQv.js → dist-BXX4hjR5.js} +1 -1
  45. package/dist/viewer/{dist-a0GzKSK5.js → dist-BYPFfNN2.js} +4 -4
  46. package/dist/viewer/{dist-Blo59E9E.js → dist-Bc3sdndB.js} +1 -1
  47. package/dist/viewer/{dist-iouHdPKY.js → dist-BplTwMSg.js} +1 -1
  48. package/dist/viewer/{dist-BuykOqZu.js → dist-BwYnO_89.js} +1 -1
  49. package/dist/viewer/{dist-BXNziLMd.js → dist-C1vs4iq0.js} +1 -1
  50. package/dist/viewer/{dist-CShdm9ib.js → dist-CAyd29A0.js} +1 -1
  51. package/dist/viewer/dist-CKerCcD_.js +6 -0
  52. package/dist/viewer/{dist-DLxczLSb.js → dist-Cy6NHe1k.js} +1 -1
  53. package/dist/viewer/{dist-DN2I79vJ.js → dist-DJAdpMFh.js} +1 -1
  54. package/dist/viewer/{dist-DAvpLhQc.js → dist-DM2k9v7r.js} +1 -1
  55. package/dist/viewer/{dist-DaZG7AxI.js → dist-DhbkVdBo.js} +1 -1
  56. package/dist/viewer/{dist-IfEJuSVv.js → dist-Dk3a6I9K.js} +1 -1
  57. package/dist/viewer/{dist-iW4zg_Td.js → dist-DnEmkttq.js} +1 -1
  58. package/dist/viewer/dist-DqSsqXqs.js +9 -0
  59. package/dist/viewer/dist-DrW90jk1.js +23 -0
  60. package/dist/viewer/{dist-CFLvwqFu.js → dist-PZN9832g.js} +1 -1
  61. package/dist/viewer/{dist-DFO469af.js → dist-RzU5m4ef.js} +1 -1
  62. package/dist/viewer/{dist-CuyxTjbs.js → dist-aN6E7sLV.js} +1 -1
  63. package/dist/viewer/{dist-CfZKOKQr.js → dist-li71Pcn8.js} +1 -1
  64. package/dist/viewer/{dist-Dv7aYhGQ.js → dist-zLqPm7oG.js} +5 -5
  65. package/dist/viewer/{ebnfDiagram-PWID7BFC-CFbmSLFo.js → ebnfDiagram-PWID7BFC-27a2Mn_J.js} +1 -1
  66. package/dist/viewer/{el-GR-BZB4AONW-if4mT9ES.js → el-GR-BZB4AONW-Bn_Ts4b0.js} +1 -1
  67. package/dist/viewer/{en-B4ZKOASM-B4UEvQLc.js → en-B4ZKOASM-UUCCJD65.js} +1 -1
  68. package/dist/viewer/{erDiagram-RLTQ6QDP-DdcEfmPi.js → erDiagram-RLTQ6QDP-DKGrhPTR.js} +1 -1
  69. package/dist/viewer/{es-ES-U4NZUMDT-BAEFbb2l.js → es-ES-U4NZUMDT-BlMKimir.js} +1 -1
  70. package/dist/viewer/{eu-ES-A7QVB2H4-C8ZxjvZb.js → eu-ES-A7QVB2H4-B6HR0yoJ.js} +1 -1
  71. package/dist/viewer/{fa-IR-HGAKTJCU-cdtwDQ4r.js → fa-IR-HGAKTJCU-CBI9XTf9.js} +1 -1
  72. package/dist/viewer/{fi-FI-Z5N7JZ37-B2U-Q5t6.js → fi-FI-Z5N7JZ37-D1cn0YwU.js} +1 -1
  73. package/dist/viewer/flowDiagram-HODETNUW-Dkq_DXBN.js +1 -0
  74. package/dist/viewer/{fr-FR-RHASNOE6-B_SmzH7X.js → fr-FR-RHASNOE6-CZ6J2sFJ.js} +1 -1
  75. package/dist/viewer/{ganttDiagram-EL5Y4UJY-D2Kn-WdW.js → ganttDiagram-EL5Y4UJY-Cj0GNZEa.js} +2 -2
  76. package/dist/viewer/{gl-ES-HMX3MZ6V-DCmRbSiO.js → gl-ES-HMX3MZ6V-DJmJKotn.js} +1 -1
  77. package/dist/viewer/{he-IL-6SHJWFNN-CZbdV0mD.js → he-IL-6SHJWFNN-DY3C18Vy.js} +1 -1
  78. package/dist/viewer/{hi-IN-IWLTKZ5I-BhnbzRy1.js → hi-IN-IWLTKZ5I-CWCcDlYJ.js} +1 -1
  79. package/dist/viewer/{hu-HU-A5ZG7DT2-Df3hLCmT.js → hu-HU-A5ZG7DT2-DTuof2ig.js} +1 -1
  80. package/dist/viewer/{id-ID-SAP4L64H-BZiWiUfy.js → id-ID-SAP4L64H-CCNnRADj.js} +1 -1
  81. package/dist/viewer/{image-GAAHSSAO-B70Qt0nE.js → image-GAAHSSAO-Ca-4T7jZ.js} +1 -1
  82. package/dist/viewer/index.js +2 -2
  83. package/dist/viewer/{infoDiagram-27XIBGKW-CbpnsOxC.js → infoDiagram-27XIBGKW-lsWNzfcW.js} +1 -1
  84. package/dist/viewer/{ishikawaDiagram-5VMMS53U-oplhByo0.js → ishikawaDiagram-5VMMS53U-NoZOi9ae.js} +1 -1
  85. package/dist/viewer/{it-IT-JPQ66NNP-1o7wh0bd.js → it-IT-JPQ66NNP-TeOpVMJg.js} +1 -1
  86. package/dist/viewer/{ja-JP-DBVTYXUO-Dp9qWx6G.js → ja-JP-DBVTYXUO-Bnis8eZ8.js} +1 -1
  87. package/dist/viewer/{journeyDiagram-3NMN7TZE-D0JunTQX.js → journeyDiagram-3NMN7TZE-CFR--YYx.js} +1 -1
  88. package/dist/viewer/{kaa-6HZHGXH3-C6rioSHj.js → kaa-6HZHGXH3-DU4HHNCZ.js} +1 -1
  89. package/dist/viewer/{kab-KAB-ZGHBKWFO-BrUzJlXA.js → kab-KAB-ZGHBKWFO-CwJV1_Kv.js} +1 -1
  90. package/dist/viewer/{kanban-definition-UXKFOSKX-BNIlzFrp.js → kanban-definition-UXKFOSKX-3dxmwGI7.js} +1 -1
  91. package/dist/viewer/{kk-KZ-P5N5QNE5-DFBRScQO.js → kk-KZ-P5N5QNE5-DT-dSIvJ.js} +1 -1
  92. package/dist/viewer/{km-KH-HSX4SM5Z-CibDxP_N.js → km-KH-HSX4SM5Z-D1nEhAO9.js} +1 -1
  93. package/dist/viewer/{ko-KR-MTYHY66A-DBGsVIeC.js → ko-KR-MTYHY66A-D12g30SK.js} +1 -1
  94. package/dist/viewer/{ku-TR-6OUDTVRD-tEBzncv7.js → ku-TR-6OUDTVRD-yPL-8VEa.js} +1 -1
  95. package/dist/viewer/{lt-LT-XHIRWOB4-BOJk_f8U.js → lt-LT-XHIRWOB4-YiBZKKWe.js} +1 -1
  96. package/dist/viewer/{lv-LV-5QDEKY6T-E8GC79U8.js → lv-LV-5QDEKY6T-CyYxV4_k.js} +1 -1
  97. package/dist/viewer/{mindmap-definition-YA3MSWOX-DEo68bu2.js → mindmap-definition-YA3MSWOX-BBc2LnMd.js} +1 -1
  98. package/dist/viewer/{mr-IN-CRQNXWMA-DXlddyPK.js → mr-IN-CRQNXWMA-IQi6Ya9B.js} +1 -1
  99. package/dist/viewer/{my-MM-5M5IBNSE-B0Chy1-h.js → my-MM-5M5IBNSE-BvfA_rRK.js} +1 -1
  100. package/dist/viewer/{nb-NO-T6EIAALU-BFrQcMGB.js → nb-NO-T6EIAALU-DDAljowo.js} +1 -1
  101. package/dist/viewer/{nl-NL-IS3SIHDZ-G1aRBNnO.js → nl-NL-IS3SIHDZ-pmqt04_Q.js} +1 -1
  102. package/dist/viewer/{nn-NO-6E72VCQL-COo889DB.js → nn-NO-6E72VCQL-CKarpHgk.js} +1 -1
  103. package/dist/viewer/{oc-FR-POXYY2M6-CV3hG3sd.js → oc-FR-POXYY2M6-Bx3lC-pA.js} +1 -1
  104. package/dist/viewer/{pa-IN-N4M65BXN-CnW7KYQd.js → pa-IN-N4M65BXN-BcmT1Oja.js} +1 -1
  105. package/dist/viewer/{pegDiagram-XKGWAZYB-DBOXCzxH.js → pegDiagram-XKGWAZYB-CB0wWmVp.js} +1 -1
  106. package/dist/viewer/percentages-BXMCSKIN-BHwobpA1.js +1 -0
  107. package/dist/viewer/{pieDiagram-E7YTZNPT-rpofZzJY.js → pieDiagram-E7YTZNPT-DaNoQt8v.js} +1 -1
  108. package/dist/viewer/{pl-PL-T2D74RX3-DI7AZ_Kx.js → pl-PL-T2D74RX3-D3jjWwqJ.js} +1 -1
  109. package/dist/viewer/preview.html +1 -1
  110. package/dist/viewer/preview.js +1 -1
  111. package/dist/viewer/{prod-BfCoZ1Zi.js → prod-C7bLtw1O.js} +9 -9
  112. package/dist/viewer/{pt-BR-5N22H2LF-CSOOpz9E.js → pt-BR-5N22H2LF-BSxAjb0Q.js} +1 -1
  113. package/dist/viewer/{pt-PT-UZXXM6DQ-BAaaVF_f.js → pt-PT-UZXXM6DQ-DfJ8XCxw.js} +1 -1
  114. package/dist/viewer/{quadrantDiagram-AXDQQJYC-DBdKEvBe.js → quadrantDiagram-AXDQQJYC-DJ0-6k0c.js} +1 -1
  115. package/dist/viewer/{railroadDiagram-O6MQD6OU-Gbf83Twz.js → railroadDiagram-O6MQD6OU-BPP8u2p2.js} +1 -1
  116. package/dist/viewer/{requirementDiagram-BXWQKSXE-CDTSBX_Q.js → requirementDiagram-BXWQKSXE-nC8mIqM9.js} +1 -1
  117. package/dist/viewer/{ro-RO-JPDTUUEW-Dc_56IHR.js → ro-RO-JPDTUUEW-VxfGGrkw.js} +1 -1
  118. package/dist/viewer/{ru-RU-B4JR7IUQ-Fn-U4gMM.js → ru-RU-B4JR7IUQ-BwI32B38.js} +1 -1
  119. package/dist/viewer/{sequenceDiagram-WJ2MYXX4-ChGVZL8z.js → sequenceDiagram-WJ2MYXX4-DdlLx4WJ.js} +1 -1
  120. package/dist/viewer/{si-LK-N5RQ5JYF-BnVh94Ki.js → si-LK-N5RQ5JYF-C4rpLZMi.js} +1 -1
  121. package/dist/viewer/{sk-SK-C5VTKIMK-CrdZHCMS.js → sk-SK-C5VTKIMK-CucuqfnL.js} +1 -1
  122. package/dist/viewer/{sl-SI-NN7IZMDC-BllFVBqB.js → sl-SI-NN7IZMDC-MaRnFEil.js} +1 -1
  123. package/dist/viewer/{stateDiagram-D77RDMKH-XZFPCyrv.js → stateDiagram-D77RDMKH-Dyckz0HY.js} +1 -1
  124. package/dist/viewer/{stateDiagram-v2-MP3YSRHH-VdWMOsnX.js → stateDiagram-v2-MP3YSRHH-Dl-JHHC_.js} +1 -1
  125. package/dist/viewer/subset-shared.chunk-CWxXeeCJ.js +1 -0
  126. package/dist/viewer/{subset-worker.chunk-gyv0yHbq.js → subset-worker.chunk-PLrxE69N.js} +1 -1
  127. package/dist/viewer/{sv-SE-XGPEYMSR-DNHyy4_o.js → sv-SE-XGPEYMSR--IcLMrt9.js} +1 -1
  128. package/dist/viewer/{swimlanes-42K2YHIH-CmmegasI.js → swimlanes-42K2YHIH-DxYjZoVM.js} +1 -1
  129. package/dist/viewer/{swimlanesDiagram-VR7AAH4N-IJGF4hbD.js → swimlanesDiagram-VR7AAH4N-Dyu6NewY.js} +1 -1
  130. package/dist/viewer/{ta-IN-2NMHFXQM-CMzNsS5O.js → ta-IN-2NMHFXQM-B0lxt9S_.js} +1 -1
  131. package/dist/viewer/{th-TH-HPSO5L25-C6nTStRU.js → th-TH-HPSO5L25-ay8hQrdh.js} +1 -1
  132. package/dist/viewer/{timeline-definition-24CTP7MA-jtLUlzrM.js → timeline-definition-24CTP7MA-3Kvmw7ZM.js} +1 -1
  133. package/dist/viewer/{tr-TR-DEFEU3FU-WOOkPh5-.js → tr-TR-DEFEU3FU-BwbXThNW.js} +1 -1
  134. package/dist/viewer/{uk-UA-QMV73CPH-Z_rblHaZ.js → uk-UA-QMV73CPH-Cfzqr3GE.js} +1 -1
  135. package/dist/viewer/{vennDiagram-4TSXK5OY-BnWMmJYi.js → vennDiagram-4TSXK5OY-C91joa2b.js} +1 -1
  136. package/dist/viewer/{vi-VN-M7AON7JQ-DYnqigr8.js → vi-VN-M7AON7JQ-DuhLpi-d.js} +1 -1
  137. package/dist/viewer/{viewport-CFJHn_Y6-nVtR7zt0.js → viewport-CFJHn_Y6-p5FTHjPi.js} +1 -1
  138. package/dist/viewer/{wardleyDiagram-VM6X3IG4-YJBlL4KB.js → wardleyDiagram-VM6X3IG4-CnOfLoBk.js} +1 -1
  139. package/dist/viewer/{xychartDiagram-S5SC5T6Z-Bcismawx.js → xychartDiagram-S5SC5T6Z-BACTdEBW.js} +2 -2
  140. package/dist/viewer/{zh-CN-LNUGB5OW-leMSbuNK.js → zh-CN-LNUGB5OW-ioLTOwUr.js} +1 -1
  141. package/dist/viewer/{zh-HK-E62DVLB3-DF1ptRGj.js → zh-HK-E62DVLB3-DV3FbuU0.js} +1 -1
  142. package/dist/viewer/{zh-TW-RAJ6MFWO-ByjpijD0.js → zh-TW-RAJ6MFWO-CEJwsc8V.js} +1 -1
  143. package/dist/viewer-lib/{Canvas-CbzZVjVc.js → Canvas-b0ppbJAj.js} +1 -1
  144. package/dist/viewer-lib/{PreviewView-BW64tR79.js → PreviewView-MJD3gdBC.js} +1 -1
  145. package/dist/viewer-lib/{SnapshotDocument-BPerOtiq.js → SnapshotDocument-Cz1DqfSL.js} +2868 -2868
  146. package/dist/viewer-lib/{VirtualizedEditor-D9Ivycdp-BigbWEKU.js → VirtualizedEditor-D9Ivycdp-BcrxDdxm.js} +2 -2
  147. package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-CLyZhqjE.js → VirtualizedRenderer-C_d95FXi-MBqAImtN.js} +3 -3
  148. package/dist/viewer-lib/{WarningsBadge-ChJ6o1J1.js → WarningsBadge-wICg3yJ4.js} +1 -1
  149. package/dist/viewer-lib/{abnfDiagram-VCTEODGH-DDQwicae.js → abnfDiagram-VCTEODGH-D4H4I_gt.js} +2 -2
  150. package/dist/viewer-lib/{ar-SA-G6X2FPQ2-B02n052d.js → ar-SA-G6X2FPQ2-DA79uckj.js} +1 -1
  151. package/dist/viewer-lib/{architectureDiagram-5GKGNRK7-B2jsO9Bl.js → architectureDiagram-5GKGNRK7-CZMoxL1F.js} +3 -3
  152. package/dist/viewer-lib/{az-AZ-76LH7QW2-BTXcY2JM.js → az-AZ-76LH7QW2-ePXNlriY.js} +1 -1
  153. package/dist/viewer-lib/{bg-BG-XCXSNQG7-Bfchenk7.js → bg-BG-XCXSNQG7-XpfX_63A.js} +1 -1
  154. package/dist/viewer-lib/{blockDiagram-I7D4REHJ-KCTfuaLI.js → blockDiagram-I7D4REHJ-CAJe4heY.js} +5 -5
  155. package/dist/viewer-lib/{bn-BD-2XOGV67Q-B64neeOv.js → bn-BD-2XOGV67Q-CSx8-oSP.js} +1 -1
  156. package/dist/viewer-lib/{c4Diagram-7LVT6UL2-Bko4MtzH.js → c4Diagram-7LVT6UL2-1TEYG8VN.js} +3 -3
  157. package/dist/viewer-lib/{ca-ES-6MX7JW3Y-nJPEPZWm.js → ca-ES-6MX7JW3Y-CjMGo-oS.js} +1 -1
  158. package/dist/viewer-lib/{chunk-4HAMMTFA-BkxwB-eb.js → chunk-4HAMMTFA-CpQPv67Q.js} +2 -2
  159. package/dist/viewer-lib/{chunk-EIO257PC-bHDhuLCd.js → chunk-EIO257PC-BMjUbPYa.js} +1 -1
  160. package/dist/viewer-lib/{chunk-GMAD6QVW-_ZajlNk6.js → chunk-GMAD6QVW-jcz1PuVV.js} +1 -1
  161. package/dist/viewer-lib/{chunk-GVQU2GXP-vqjpfmdI.js → chunk-GVQU2GXP-DWz5pell.js} +1 -1
  162. package/dist/viewer-lib/{chunk-IMKFNOWR-BfQ8bdC6.js → chunk-IMKFNOWR-D0k-YepJ.js} +1 -1
  163. package/dist/viewer-lib/{chunk-L3NEJ4N5-B-vflwlT.js → chunk-L3NEJ4N5-JPCpTx-0.js} +3 -3
  164. package/dist/viewer-lib/{chunk-OSK3NFVY-DUw48R3-.js → chunk-OSK3NFVY-CjazBhYN.js} +4 -4
  165. package/dist/viewer-lib/{chunk-PWAF6VOD-BhIJrr76.js → chunk-PWAF6VOD-B_0CEIlT.js} +1 -1
  166. package/dist/viewer-lib/{chunk-SHT3W25Y-qc6rNZPV.js → chunk-SHT3W25Y-BLxqiwFH.js} +2 -2
  167. package/dist/viewer-lib/{chunk-SVP7TREG-DztXc-V7.js → chunk-SVP7TREG-CH779QgM.js} +1 -1
  168. package/dist/viewer-lib/{chunk-TICWLB2K-C8owKxRk.js → chunk-TICWLB2K-DEq_d-sf.js} +1 -1
  169. package/dist/viewer-lib/{classDiagram-ZZMXUADV-DPjXZV4a.js → classDiagram-ZZMXUADV-C8ln-Zdv.js} +8 -8
  170. package/dist/viewer-lib/{classDiagram-v2-VYDZK3BY-MHT_Bszs.js → classDiagram-v2-VYDZK3BY-DC0xlGKy.js} +8 -8
  171. package/dist/viewer-lib/core.js +1 -1
  172. package/dist/viewer-lib/{cs-CZ-2BRQDIVT-BkSqhrWU.js → cs-CZ-2BRQDIVT-B_Du1qZ3.js} +1 -1
  173. package/dist/viewer-lib/{cynefinDiagram-5FMLGOSQ-BckTpVZv.js → cynefinDiagram-5FMLGOSQ-DjympPt-.js} +1 -1
  174. package/dist/viewer-lib/{da-DK-5WZEPLOC-DUjBE47c.js → da-DK-5WZEPLOC-CzBXYiN1.js} +1 -1
  175. package/dist/viewer-lib/{dagre-GXQ25YYZ-DuYtIsMf.js → dagre-GXQ25YYZ-BGQf0f-M.js} +7 -7
  176. package/dist/viewer-lib/{de-DE-XR44H4JA-BIPpWOZC.js → de-DE-XR44H4JA-zRdUGR3g.js} +1 -1
  177. package/dist/viewer-lib/{diagram-S7CK7UJ4-kGC0oB-n.js → diagram-S7CK7UJ4-CHwSwd07.js} +2 -2
  178. package/dist/viewer-lib/{diagram-UQ7AKVKN-BoOtss6v.js → diagram-UQ7AKVKN-bdsF7AG6.js} +1 -1
  179. package/dist/viewer-lib/{diagram-VX7I27RA-bE55AWUH.js → diagram-VX7I27RA-Ub4kfaFO.js} +2 -2
  180. package/dist/viewer-lib/{diagram-Z3DM3KII-CLIYEJwW.js → diagram-Z3DM3KII-CROreRzG.js} +1 -1
  181. package/dist/viewer-lib/{dist-CP-HEL-H.js → dist-59dJZZwl.js} +3 -3
  182. package/dist/viewer-lib/{dist-C0DuuKNh.js → dist-BJQIMpHq.js} +2 -2
  183. package/dist/viewer-lib/{dist-CFvYZ0jx.js → dist-BMCRH_1-.js} +2 -2
  184. package/dist/viewer-lib/{dist-Co4h9qVP.js → dist-BNsHXoBa.js} +3 -3
  185. package/dist/viewer-lib/{dist-DjH4p_7w.js → dist-BVGbXkEw.js} +3 -3
  186. package/dist/viewer-lib/{dist-C4R4oDso.js → dist-C1XOkO9M.js} +4 -4
  187. package/dist/viewer-lib/{dist-CrsmzP_t.js → dist-C45Qhota.js} +3 -3
  188. package/dist/viewer-lib/{dist-DqOCrJCF.js → dist-CR2EwiLq.js} +2 -2
  189. package/dist/viewer-lib/{dist-BqrZ0W7I.js → dist-CcSyblG8.js} +4 -4
  190. package/dist/viewer-lib/{dist-Dk0LY6Vt.js → dist-CfkWukap.js} +2 -2
  191. package/dist/viewer-lib/{dist-HGn8kyhE.js → dist-ChEH16Ww.js} +3 -3
  192. package/dist/viewer-lib/{dist-Iv_hnPUO.js → dist-Cl_0lpBt.js} +3 -3
  193. package/dist/viewer-lib/{dist-Bzt9ljL8.js → dist-Cq6yeAN3.js} +3 -3
  194. package/dist/viewer-lib/{dist-B98raYZL.js → dist-D5gJUyzI.js} +1 -1
  195. package/dist/viewer-lib/{dist-BiKHoqXb.js → dist-DAWhtR-G.js} +1 -1
  196. package/dist/viewer-lib/{dist-DKGJ0PGo.js → dist-DVVp_C9R.js} +3 -3
  197. package/dist/viewer-lib/{dist-D4ui83uK.js → dist-DVaMjB3t.js} +43 -43
  198. package/dist/viewer-lib/{dist-DPegN7cE.js → dist-DeunwZUl.js} +2 -2
  199. package/dist/viewer-lib/{dist-0x0XvlZ0.js → dist-Dizf1xxI.js} +2 -2
  200. package/dist/viewer-lib/{dist-3QPYZQVn.js → dist-Dx6pxJxJ.js} +2 -2
  201. package/dist/viewer-lib/{dist-DXL3Vvu_.js → dist-FnySM7u5.js} +4 -4
  202. package/dist/viewer-lib/{dist-nIB1PQMe.js → dist-VlLCDC5K.js} +3 -3
  203. package/dist/viewer-lib/{dist-Cxbnmqf-.js → dist-ZzDwvq-n.js} +3 -3
  204. package/dist/viewer-lib/{dist-CNDLTwEe.js → dist-xIgSv2cq.js} +2 -2
  205. package/dist/viewer-lib/document.js +687 -687
  206. package/dist/viewer-lib/{ebnfDiagram-PWID7BFC-CJryZ0Ub.js → ebnfDiagram-PWID7BFC-BQaZd0rA.js} +2 -2
  207. package/dist/viewer-lib/{el-GR-BZB4AONW-CRJO-xlS.js → el-GR-BZB4AONW-C6dTXCNc.js} +1 -1
  208. package/dist/viewer-lib/{en-B4ZKOASM-WDjBo6bb.js → en-B4ZKOASM-BHgyDNZj.js} +1 -1
  209. package/dist/viewer-lib/{erDiagram-RLTQ6QDP-DXhFcXP0.js → erDiagram-RLTQ6QDP-B0Q1gJWp.js} +7 -7
  210. package/dist/viewer-lib/{es-ES-U4NZUMDT-BcadFApl.js → es-ES-U4NZUMDT-IoxABoTV.js} +1 -1
  211. package/dist/viewer-lib/{eu-ES-A7QVB2H4-u489x-EX.js → eu-ES-A7QVB2H4-C6sZZv3c.js} +1 -1
  212. package/dist/viewer-lib/{fa-IR-HGAKTJCU-CZHBc9Y-.js → fa-IR-HGAKTJCU-DfEozz1Q.js} +1 -1
  213. package/dist/viewer-lib/{fi-FI-Z5N7JZ37-CTGhWIDH.js → fi-FI-Z5N7JZ37-BE3FNukW.js} +1 -1
  214. package/dist/viewer-lib/flowDiagram-HODETNUW-CcmEnRWD.js +15 -0
  215. package/dist/viewer-lib/{fr-FR-RHASNOE6-ndP6lVQl.js → fr-FR-RHASNOE6-DO6roGTg.js} +1 -1
  216. package/dist/viewer-lib/{ganttDiagram-EL5Y4UJY-aa2GJiqI.js → ganttDiagram-EL5Y4UJY-Dk5iyJeb.js} +1 -1
  217. package/dist/viewer-lib/{gl-ES-HMX3MZ6V-DlWqT4sK.js → gl-ES-HMX3MZ6V-DQeIqz1T.js} +1 -1
  218. package/dist/viewer-lib/{he-IL-6SHJWFNN-CLWjGAVr.js → he-IL-6SHJWFNN-BLA7Ea7p.js} +1 -1
  219. package/dist/viewer-lib/{hi-IN-IWLTKZ5I-DJqn_uLv.js → hi-IN-IWLTKZ5I-Dw-C2Ol4.js} +1 -1
  220. package/dist/viewer-lib/{hu-HU-A5ZG7DT2-BpeNeLjn.js → hu-HU-A5ZG7DT2-cabz6PUm.js} +1 -1
  221. package/dist/viewer-lib/{id-ID-SAP4L64H-CDwKowVK.js → id-ID-SAP4L64H-CFUQWwHY.js} +1 -1
  222. package/dist/viewer-lib/{image-GAAHSSAO-BY-5ntW4.js → image-GAAHSSAO-CmmBcCWJ.js} +1 -1
  223. package/dist/viewer-lib/index.js +224 -224
  224. package/dist/viewer-lib/{infoDiagram-27XIBGKW-CPfUOOt9.js → infoDiagram-27XIBGKW-nP9nsPet.js} +1 -1
  225. package/dist/viewer-lib/{ishikawaDiagram-5VMMS53U-DtC0gvjX.js → ishikawaDiagram-5VMMS53U-oyxlvVSE.js} +1 -1
  226. package/dist/viewer-lib/{it-IT-JPQ66NNP-CnFwC5Td.js → it-IT-JPQ66NNP-DxVXEV1J.js} +1 -1
  227. package/dist/viewer-lib/{ja-JP-DBVTYXUO-2RSkZuX9.js → ja-JP-DBVTYXUO-gZzwX6eP.js} +1 -1
  228. package/dist/viewer-lib/{journeyDiagram-3NMN7TZE-ifhH7efV.js → journeyDiagram-3NMN7TZE-CHBrfeVO.js} +1 -1
  229. package/dist/viewer-lib/{kaa-6HZHGXH3-D7xTuaJs.js → kaa-6HZHGXH3-kaYHa5ft.js} +1 -1
  230. package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-DX0Iklzw.js → kab-KAB-ZGHBKWFO-DzfB44i8.js} +1 -1
  231. package/dist/viewer-lib/{kanban-definition-UXKFOSKX-D4hxferr.js → kanban-definition-UXKFOSKX-D_Yk9xGo.js} +6 -6
  232. package/dist/viewer-lib/{kk-KZ-P5N5QNE5-DUziqc2-.js → kk-KZ-P5N5QNE5-C2HR3hwW.js} +1 -1
  233. package/dist/viewer-lib/{km-KH-HSX4SM5Z-CYmVyLD8.js → km-KH-HSX4SM5Z-BR79_K2s.js} +1 -1
  234. package/dist/viewer-lib/{ko-KR-MTYHY66A-BRMJLb6m.js → ko-KR-MTYHY66A-C1LobXxS.js} +1 -1
  235. package/dist/viewer-lib/{ku-TR-6OUDTVRD-C06G4-Qw.js → ku-TR-6OUDTVRD-C8IVYpGk.js} +1 -1
  236. package/dist/viewer-lib/{lt-LT-XHIRWOB4-CVC1n_G8.js → lt-LT-XHIRWOB4-CYp_un5X.js} +1 -1
  237. package/dist/viewer-lib/{lv-LV-5QDEKY6T-FVIewb7E.js → lv-LV-5QDEKY6T-C7hf8C7v.js} +1 -1
  238. package/dist/viewer-lib/{mindmap-definition-YA3MSWOX-Bkwmc_3l.js → mindmap-definition-YA3MSWOX-XwL4tJy8.js} +7 -7
  239. package/dist/viewer-lib/{motion-HoyOHy0P.js → motion-DpxJZ7_S.js} +673 -673
  240. package/dist/viewer-lib/{mr-IN-CRQNXWMA-BH7AkqKP.js → mr-IN-CRQNXWMA-C7Wl0OFr.js} +1 -1
  241. package/dist/viewer-lib/{my-MM-5M5IBNSE-ZHweC0Pc.js → my-MM-5M5IBNSE-DZX_FmKj.js} +1 -1
  242. package/dist/viewer-lib/{nb-NO-T6EIAALU-BQ9-CiSy.js → nb-NO-T6EIAALU-szMPcqe8.js} +1 -1
  243. package/dist/viewer-lib/{nl-NL-IS3SIHDZ-CDp8glz2.js → nl-NL-IS3SIHDZ-CjVEZmv4.js} +1 -1
  244. package/dist/viewer-lib/{nn-NO-6E72VCQL-f24ovIpM.js → nn-NO-6E72VCQL-ExNP0yDR.js} +1 -1
  245. package/dist/viewer-lib/{oc-FR-POXYY2M6-BJwjHPSX.js → oc-FR-POXYY2M6-CcyDB7MJ.js} +1 -1
  246. package/dist/viewer-lib/{pa-IN-N4M65BXN-D8lgMhX2.js → pa-IN-N4M65BXN-CyTny9lg.js} +1 -1
  247. package/dist/viewer-lib/{pegDiagram-XKGWAZYB-DA7sRq5g.js → pegDiagram-XKGWAZYB-BTHSJvZ-.js} +2 -2
  248. package/dist/viewer-lib/percentages-BXMCSKIN-2d1FRvGq.js +1 -0
  249. package/dist/viewer-lib/{pieDiagram-E7YTZNPT-1oagcm5S.js → pieDiagram-E7YTZNPT-Bb3ttHf_.js} +2 -2
  250. package/dist/viewer-lib/{pl-PL-T2D74RX3-B8BX2n9J.js → pl-PL-T2D74RX3-Dik9ttGT.js} +1 -1
  251. package/dist/viewer-lib/{plugin-_bGVeqI0-CLL4vVOX.js → plugin-_bGVeqI0-B2vzJ8yV.js} +1 -1
  252. package/dist/viewer-lib/{prod-CNWa0QGl.js → prod-YjE5sezQ.js} +61 -61
  253. package/dist/viewer-lib/{pt-BR-5N22H2LF-B27BjAzC.js → pt-BR-5N22H2LF-IHxOv9uY.js} +1 -1
  254. package/dist/viewer-lib/{pt-PT-UZXXM6DQ-0QfPCRbg.js → pt-PT-UZXXM6DQ-BtnJK2aM.js} +1 -1
  255. package/dist/viewer-lib/{quadrantDiagram-AXDQQJYC-CNUwfmio.js → quadrantDiagram-AXDQQJYC-BtTl2TG1.js} +1 -1
  256. package/dist/viewer-lib/{railroadDiagram-O6MQD6OU-BxKOszBt.js → railroadDiagram-O6MQD6OU-ChHqkjQ1.js} +2 -2
  257. package/dist/viewer-lib/{requirementDiagram-BXWQKSXE-DPAGs4Tf.js → requirementDiagram-BXWQKSXE-CsABC_ZW.js} +7 -7
  258. package/dist/viewer-lib/{ro-RO-JPDTUUEW-DT7gvqe0.js → ro-RO-JPDTUUEW-1OtZw9im.js} +1 -1
  259. package/dist/viewer-lib/{ru-RU-B4JR7IUQ-CTwV5x5h.js → ru-RU-B4JR7IUQ-D4hXwd9n.js} +1 -1
  260. package/dist/viewer-lib/{sequenceDiagram-WJ2MYXX4-BddfVi5c.js → sequenceDiagram-WJ2MYXX4-CncOOme_.js} +1 -1
  261. package/dist/viewer-lib/{si-LK-N5RQ5JYF-DJyTXo4-.js → si-LK-N5RQ5JYF-CPlNyCDf.js} +1 -1
  262. package/dist/viewer-lib/{sk-SK-C5VTKIMK-CUO7noQD.js → sk-SK-C5VTKIMK-DvJKXBny.js} +1 -1
  263. package/dist/viewer-lib/{sl-SI-NN7IZMDC-BX3nq_N7.js → sl-SI-NN7IZMDC-DdSQN6M_.js} +1 -1
  264. package/dist/viewer-lib/{stateDiagram-D77RDMKH-TMLI2DWZ.js → stateDiagram-D77RDMKH-Cin7tWow.js} +9 -9
  265. package/dist/viewer-lib/{stateDiagram-v2-MP3YSRHH-Cl21Lm5F.js → stateDiagram-v2-MP3YSRHH-Bmsj4y6V.js} +8 -8
  266. package/dist/viewer-lib/subset-shared.chunk-DyWG4U8o.js +2 -0
  267. package/dist/viewer-lib/{subset-worker.chunk-BFAOwen_.js → subset-worker.chunk-BwLlCQbv.js} +2 -2
  268. package/dist/viewer-lib/{sv-SE-XGPEYMSR-DgNkrNyF.js → sv-SE-XGPEYMSR-D7q9ib-7.js} +1 -1
  269. package/dist/viewer-lib/{swimlanes-42K2YHIH-Bkgl_R0c.js → swimlanes-42K2YHIH-DOz5JwJj.js} +7 -7
  270. package/dist/viewer-lib/{swimlanesDiagram-VR7AAH4N-7zj1ceIU.js → swimlanesDiagram-VR7AAH4N-Cg7mZJ0J.js} +8 -8
  271. package/dist/viewer-lib/{ta-IN-2NMHFXQM-CyL7jY6Q.js → ta-IN-2NMHFXQM-8LCNavHn.js} +1 -1
  272. package/dist/viewer-lib/{th-TH-HPSO5L25-CfUhBEjR.js → th-TH-HPSO5L25-_bc36XRZ.js} +1 -1
  273. package/dist/viewer-lib/{timeline-definition-24CTP7MA-Ct0iSWUz.js → timeline-definition-24CTP7MA-CrkcDDit.js} +2 -2
  274. package/dist/viewer-lib/{tr-TR-DEFEU3FU-CknQCd8p.js → tr-TR-DEFEU3FU-D_SunJbW.js} +1 -1
  275. package/dist/viewer-lib/types/src/viewer/hooks/useCloudHeader.d.ts +2 -0
  276. package/dist/viewer-lib/{uk-UA-QMV73CPH-ChRpRV40.js → uk-UA-QMV73CPH-CFNB9Slh.js} +1 -1
  277. package/dist/viewer-lib/{vennDiagram-4TSXK5OY-6mkvyJ-F.js → vennDiagram-4TSXK5OY-B3NXGwW5.js} +1 -1
  278. package/dist/viewer-lib/{vi-VN-M7AON7JQ-CZofUFw7.js → vi-VN-M7AON7JQ-B1uhhFl6.js} +1 -1
  279. package/dist/viewer-lib/{viewport-CFJHn_Y6-BBMxfJ46.js → viewport-CFJHn_Y6-27AFfvAr.js} +1 -1
  280. package/dist/viewer-lib/{wardleyDiagram-VM6X3IG4-RdkeHyE3.js → wardleyDiagram-VM6X3IG4-Dk9pNbkF.js} +1 -1
  281. package/dist/viewer-lib/{xychartDiagram-S5SC5T6Z-DXP09DGL.js → xychartDiagram-S5SC5T6Z-weiOiKlC.js} +4 -4
  282. package/dist/viewer-lib/{zh-CN-LNUGB5OW-BMtL-Dyp.js → zh-CN-LNUGB5OW-CZXpLC8p.js} +1 -1
  283. package/dist/viewer-lib/{zh-HK-E62DVLB3-BBZ3Whz3.js → zh-HK-E62DVLB3-_93k9OpB.js} +1 -1
  284. package/dist/viewer-lib/{zh-TW-RAJ6MFWO-Cllh4D3_.js → zh-TW-RAJ6MFWO-CZN30mL-.js} +1 -1
  285. package/package.json +1 -1
  286. package/dist/viewer/DocumentPage-Cip5Kh1A.js +0 -4
  287. package/dist/viewer/SnapshotDocument-CXY8xp6s.js +0 -1
  288. package/dist/viewer/VirtualizedEditor-D9Ivycdp-D8Q5C-Rx.js +0 -1
  289. package/dist/viewer/dist-9vhpflHX.js +0 -6
  290. package/dist/viewer/dist-CtVIi3AD.js +0 -9
  291. package/dist/viewer/dist-DsUQGQBd.js +0 -23
  292. package/dist/viewer/flowDiagram-HODETNUW-i2G2hsfu.js +0 -1
  293. package/dist/viewer/percentages-BXMCSKIN-CbZU-7zq.js +0 -1
  294. package/dist/viewer/subset-shared.chunk-VeVAd_o0.js +0 -1
  295. package/dist/viewer-lib/flowDiagram-HODETNUW-CVBg7PzQ.js +0 -15
  296. package/dist/viewer-lib/percentages-BXMCSKIN-DxHiuSbH.js +0 -1
  297. package/dist/viewer-lib/subset-shared.chunk-MfbLFwss.js +0 -2
@@ -1,15 +1,15 @@
1
1
  import './stylex-Bl4LaHjz.css';
2
2
  import './document-Dvtvl0mY.css';
3
- import { It as e, St as t, _t as n, dt as r, i, kt as a, mt as o, pt as s, t as c, vt as l, xt as u } from "./motion-HoyOHy0P.js";
4
- import { i as d, o as f, r as p, u as m } from "./i18n-DDz6USHU.js";
5
- import { d as h, f as g, n as _, r as v, s as y, t as b } from "./WarningsBadge-ChJ6o1J1.js";
6
- import { t as x } from "./tokens.stylex-BTMziPcA.js";
7
- import { Ar as S, Dr as C, Er as ee, Fn as te, Gn as w, Hn as T, In as E, Jn as ne, Kn as D, Ln as O, Mr as k, Nr as A, Or as j, Pn as M, Qn as re, Rn as ie, Tr as ae, Un as oe, Vn as se, Wn as N, Xn as P, Yn as ce, Zn as F, _n as le, a as ue, at as de, c as fe, cn as pe, cr as I, d as me, dn as he, dt as ge, er as L, f as _e, fn as ve, hn as R, i as ye, ir as be, jr as xe, kr as Se, l as Ce, ln as we, lt as Te, o as Ee, or as De, qn as z, r as Oe, s as ke, sn as Ae, t as je, u as Me, un as Ne, ur as Pe, ut as Fe, vr as Ie, wr as Le, yr as Re, yt as ze, zn as Be } from "./SnapshotDocument-BPerOtiq.js";
8
- import { n as Ve } from "./plugin-_bGVeqI0-CLL4vVOX.js";
9
- import { Fragment as He, cloneElement as Ue, createElement as We, isValidElement as Ge, useCallback as B, useEffect as V, useLayoutEffect as Ke, useMemo as H, useRef as U, useState as W } from "react";
3
+ import { At as e, Ct as t, Lt as n, St as r, _t as i, dt as a, i as o, mt as s, pt as c, t as l, vt as u, yt as d } from "./motion-DpxJZ7_S.js";
4
+ import { i as f, o as p, r as m, u as h } from "./i18n-DDz6USHU.js";
5
+ import { d as g, f as _, n as v, r as y, s as b, t as x } from "./WarningsBadge-wICg3yJ4.js";
6
+ import { t as S } from "./tokens.stylex-BTMziPcA.js";
7
+ import { Ar as C, Dr as w, Er as ee, Fn as te, Gn as T, Hn as E, In as ne, Jn as re, Kn as D, Ln as O, Mr as k, Nr as A, Or as j, Pn as M, Qn as ie, Rn as ae, Tr as oe, Un as se, Vn as ce, Wn as N, Xn as P, Yn as le, Zn as F, _n as ue, a as de, at as fe, c as pe, cn as me, cr as I, d as he, dn as ge, dt as _e, er as L, f as ve, fn as ye, hn as R, i as be, ir as xe, jr as Se, kr as Ce, l as we, ln as Te, lt as Ee, o as De, or as Oe, qn as z, r as ke, s as Ae, sn as je, t as Me, u as Ne, un as Pe, ur as Fe, ut as Ie, vr as Le, wr as Re, yr as ze, yt as Be, zn as Ve } from "./SnapshotDocument-Cz1DqfSL.js";
8
+ import { n as He } from "./plugin-_bGVeqI0-B2vzJ8yV.js";
9
+ import { Fragment as Ue, cloneElement as We, createElement as Ge, isValidElement as Ke, useCallback as B, useEffect as V, useLayoutEffect as qe, useMemo as H, useRef as U, useState as W } from "react";
10
10
  import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
11
- import { ChevronDown as qe, ChevronRight as Je, ChevronUp as Ye, CircleAlert as Xe, Link as Ze, Lock as Qe, MessageSquare as $e, PenLine as et, RotateCw as tt, X as nt } from "lucide-react";
12
- function rt({ editing: e, pending: t, agentActiveAt: n, now: r }) {
11
+ import { ChevronDown as Je, ChevronRight as Ye, ChevronUp as Xe, CircleAlert as Ze, Link as Qe, Lock as $e, MessageSquare as et, PenLine as tt, RotateCw as nt, X as rt } from "lucide-react";
12
+ function it({ editing: e, pending: t, agentActiveAt: n, now: r }) {
13
13
  if (e) return { kind: "editing" };
14
14
  if (t === 0) return { kind: "idle" };
15
15
  if (n === void 0) return {
@@ -28,37 +28,37 @@ function rt({ editing: e, pending: t, agentActiveAt: n, now: r }) {
28
28
  idleMs: i
29
29
  };
30
30
  }
31
- function it(e) {
32
- return e < 6e4 ? p.t("time.seconds", { count: Math.floor(e / 1e3) }) : e < 36e5 ? p.t("time.minutes", { count: Math.floor(e / 6e4) }) : p.t("time.hours", { count: Math.floor(e / 36e5) });
31
+ function at(e) {
32
+ return e < 6e4 ? m.t("time.seconds", { count: Math.floor(e / 1e3) }) : e < 36e5 ? m.t("time.minutes", { count: Math.floor(e / 6e4) }) : m.t("time.hours", { count: Math.floor(e / 36e5) });
33
33
  }
34
- function at(e, t, n) {
34
+ function ot(e, t, n) {
35
35
  switch (e.kind) {
36
- case "editing": return n ? p.t("activity.editingSection", {
36
+ case "editing": return n ? m.t("activity.editingSection", {
37
37
  agent: t,
38
38
  section: n
39
- }) : p.t("activity.editing", { agent: t });
39
+ }) : m.t("activity.editing", { agent: t });
40
40
  case "idle": return null;
41
41
  case "working": {
42
- let n = p.t("activity.pending", {
42
+ let n = m.t("activity.pending", {
43
43
  agent: t,
44
44
  count: e.pending
45
45
  });
46
- return e.idleMs === null ? n : e.idleMs < 1e4 ? p.t("activity.updatedJustNow", { left: n }) : p.t("activity.updatedAgo", {
46
+ return e.idleMs === null ? n : e.idleMs < 1e4 ? m.t("activity.updatedJustNow", { left: n }) : m.t("activity.updatedAgo", {
47
47
  left: n,
48
- duration: it(e.idleMs)
48
+ duration: at(e.idleMs)
49
49
  });
50
50
  }
51
- case "stale": return p.t("activity.stale", {
51
+ case "stale": return m.t("activity.stale", {
52
52
  agent: t,
53
- duration: it(e.idleMs),
53
+ duration: at(e.idleMs),
54
54
  count: e.pending
55
55
  });
56
56
  }
57
57
  }
58
58
  // src/viewer/document/DraftPanel.tsx
59
- function ot({ left: e, top: t, quote: n, wholeBlock: i, initial: a, restored: o, leaving: s, onChange: c, onSubmit: l, onCancel: u, ref: f }) {
59
+ function st({ left: e, top: t, quote: n, wholeBlock: r, initial: i, restored: o, leaving: s, onChange: c, onSubmit: l, onCancel: u, ref: d }) {
60
60
  return /* @__PURE__ */ K("div", {
61
- ref: f,
61
+ ref: d,
62
62
  ...{
63
63
  0: { className: "x10l6tqk x1u8a7rm xj6ak53 xowlrko xllfotl xatqbsq x1u6ievf" },
64
64
  1: { className: "x10l6tqk x1u8a7rm xj6ak53 x1u6ievf xxp0q0x x12l1aco xn0cd8s x47corl" }
@@ -67,21 +67,21 @@ function ot({ left: e, top: t, quote: n, wholeBlock: i, initial: a, restored: o,
67
67
  left: e,
68
68
  top: t
69
69
  },
70
- children: /* @__PURE__ */ q(pe, {
70
+ children: /* @__PURE__ */ q(me, {
71
71
  active: !0,
72
72
  children: [/* @__PURE__ */ q("div", {
73
73
  className: "x78zum5 x1pha0wt x167g77z xz9dl7a x1hr3lfm xqfszdh x1j6dyjg",
74
74
  children: [/* @__PURE__ */ K("span", {
75
75
  className: "x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv xddlp02",
76
- children: i ? n : `“${n}”`
76
+ children: r ? n : `“${n}”`
77
77
  }), o ? /* @__PURE__ */ K("span", {
78
78
  className: "x2lah0s x7zghnd",
79
- children: d("document.draftRestored")
79
+ children: f("document.draftRestored")
80
80
  }) : null]
81
- }), /* @__PURE__ */ K(r, {
81
+ }), /* @__PURE__ */ K(a, {
82
82
  autoFocus: !0,
83
- initial: a,
84
- placeholder: d("document.draftPlaceholder"),
83
+ initial: i,
84
+ placeholder: f("document.draftPlaceholder"),
85
85
  onCancel: u,
86
86
  onChange: c,
87
87
  onSubmit: l
@@ -90,8 +90,8 @@ function ot({ left: e, top: t, quote: n, wholeBlock: i, initial: a, restored: o,
90
90
  });
91
91
  }
92
92
  // src/viewer/document/drafts.ts
93
- var st = (e, t, n, r) => `${JSON.stringify([n ?? [e], r ?? null])}\n${t}`;
94
- function ct() {
93
+ var ct = (e, t, n, r) => `${JSON.stringify([n ?? [e], r ?? null])}\n${t}`;
94
+ function lt() {
95
95
  let e = /* @__PURE__ */ new Map();
96
96
  return {
97
97
  save(t, n) {
@@ -103,7 +103,7 @@ function ct() {
103
103
  };
104
104
  }
105
105
  // src/viewer/document/SelectionToolbar.tsx
106
- function lt({ left: e, top: t, onComment: n, ref: r }) {
106
+ function ut({ left: e, top: t, onComment: n, ref: r }) {
107
107
  return /* @__PURE__ */ K("div", {
108
108
  ref: r,
109
109
  className: "x10l6tqk x1u8a7rm",
@@ -112,20 +112,20 @@ function lt({ left: e, top: t, onComment: n, ref: r }) {
112
112
  top: t
113
113
  },
114
114
  children: /* @__PURE__ */ K("button", {
115
- "aria-label": d("common.comment"),
116
- title: d("common.comment"),
115
+ "aria-label": f("common.comment"),
116
+ title: f("common.comment"),
117
117
  type: "button",
118
118
  className: "x10l6tqk x1u8a7rm xrvj5dj x1ku5rj1 x1td3qas x10w6t97 x1717udv xmkeg23 x1y0btm7 xgcsv5v xur7f20 x12ilycc xj0l527 x17nrqe2 x1d5q07e x1ypdohk xc6r98 x1hl8ikr",
119
119
  onClick: n,
120
120
  onPointerDown: (e) => e.preventDefault(),
121
- children: /* @__PURE__ */ K($e, {
121
+ children: /* @__PURE__ */ K(et, {
122
122
  "aria-hidden": "true",
123
123
  size: 16
124
124
  })
125
125
  })
126
126
  });
127
127
  }
128
- function ut({ left: e, top: t, onComment: n, onCopy: r, ref: i }) {
128
+ function dt({ left: e, top: t, onComment: n, onCopy: r, ref: i }) {
129
129
  return /* @__PURE__ */ q("div", {
130
130
  ref: i,
131
131
  className: "x10l6tqk x1u8a7rm x78zum5 x6s0dn4 x195vfkc xc9qbxq x9f619 x9ms5i6 xmkeg23 x1y0btm7 xgcsv5v x1q4ynmn x12ilycc x1d5q07e xi1bcxy x773k2o xa3vuyk",
@@ -138,10 +138,10 @@ function ut({ left: e, top: t, onComment: n, onCopy: r, ref: i }) {
138
138
  type: "button",
139
139
  onClick: n,
140
140
  className: "x78zum5 x6s0dn4 x17d4w8g x1fgtraw xt970qd x1awh872 xc342km xu4hgxq xjbqb8w xj0l527 x2230gt xo2rkog xqfszdh xfifm61 xk50ysn x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x1fkwv27",
141
- children: [/* @__PURE__ */ K($e, {
141
+ children: [/* @__PURE__ */ K(et, {
142
142
  size: 14,
143
143
  className: "x2lah0s x17nrqe2"
144
- }), d("common.comment")]
144
+ }), f("common.comment")]
145
145
  }), /* @__PURE__ */ K("span", {
146
146
  "aria-hidden": "true",
147
147
  className: "x2lah0s x1i1rx1s xlup9mm xj3msbq xcn5yip"
@@ -149,23 +149,23 @@ function ut({ left: e, top: t, onComment: n, onCopy: r, ref: i }) {
149
149
  type: "button",
150
150
  onClick: r,
151
151
  className: "x78zum5 x6s0dn4 x17d4w8g x1fgtraw xt970qd x1awh872 xc342km xu4hgxq xjbqb8w xj0l527 x2230gt xqfszdh xfifm61 xk50ysn x1ypdohk x1de99jn xaatb59 x1y3gkto x1uczgqu x1fkwv27 x1bo0w0s",
152
- children: d("document.copy")
152
+ children: f("document.copy")
153
153
  })]
154
154
  });
155
155
  }
156
156
  // src/viewer/document/useDraftComment.ts
157
- function dt(e) {
158
- let t = H(ct, []), [n, r] = W(null), [i, a] = W(!1), o = U(""), s = U(0), c = U(null), l = U(null);
159
- he(i ? null : n?.target.range ?? null, i ? void 0 : n?.target.elements);
157
+ function ft(e) {
158
+ let t = H(lt, []), [n, r] = W(null), [i, a] = W(!1), o = U(""), s = U(0), c = U(null), l = U(null);
159
+ ge(i ? null : n?.target.range ?? null, i ? void 0 : n?.target.elements);
160
160
  let u = B((n) => {
161
161
  window.clearTimeout(s.current);
162
- let i = t.take(st(n.blockId, n.quote, n.blockIds, n.textRanges));
162
+ let i = t.take(ct(n.blockId, n.quote, n.blockIds, n.textRanges));
163
163
  o.current = i, a(!1), r({
164
164
  target: n,
165
165
  initial: i
166
166
  }), window.getSelection()?.removeAllRanges(), e();
167
167
  }, [t, e]), d = B((e) => {
168
- n && (t.save(st(n.target.blockId, n.target.quote, n.target.blockIds, n.target.textRanges), e ? o.current : ""), a(!0), s.current = window.setTimeout(() => {
168
+ n && (t.save(ct(n.target.blockId, n.target.quote, n.target.blockIds, n.target.textRanges), e ? o.current : ""), a(!0), s.current = window.setTimeout(() => {
169
169
  r(null), a(!1);
170
170
  }, 120));
171
171
  }, [n, t]);
@@ -194,38 +194,38 @@ function dt(e) {
194
194
  };
195
195
  }
196
196
  // src/viewer/document/DesktopDocument.tsx
197
- function ft(e) {
197
+ function pt(e) {
198
198
  return {
199
199
  left: e.offsetLeft,
200
200
  right: Math.min(e.offsetLeft + e.offsetWidth, window.innerWidth - 16)
201
201
  };
202
202
  }
203
- function pt({ editor: e, threads: t, actions: n, agent: r, canComment: i, selection: a, clearSelection: o, onCreate: s, onMain: c, history: l, children: u }) {
204
- let d = dt(o), { draft: f } = d;
205
- return /* @__PURE__ */ K(Ae, {
203
+ function mt({ editor: e, threads: t, actions: n, agent: r, canComment: i, selection: a, clearSelection: o, onCreate: s, onMain: c, history: l, children: u }) {
204
+ let d = ft(o), { draft: f } = d;
205
+ return /* @__PURE__ */ K(je, {
206
206
  actions: n,
207
207
  agent: r,
208
208
  editor: e,
209
209
  history: l,
210
210
  threads: t,
211
211
  overlay: (e) => /* @__PURE__ */ q(G, { children: [
212
- a && !f && (a.kind === "block" || (a.blockIds?.length ?? 0) > 1) && i ? /* @__PURE__ */ K(lt, {
212
+ a && !f && (a.kind === "block" || (a.blockIds?.length ?? 0) > 1) && i ? /* @__PURE__ */ K(ut, {
213
213
  ref: d.toolbarRef,
214
214
  top: a.top,
215
215
  left: Math.min(a.right + 8, window.innerWidth - (e.offsetParent?.getBoundingClientRect().left ?? 0) - 40),
216
216
  onComment: () => d.open(a)
217
217
  }) : null,
218
- a && !f && a.kind !== "block" && (a.blockIds?.length ?? 0) <= 1 ? /* @__PURE__ */ K(ut, {
218
+ a && !f && a.kind !== "block" && (a.blockIds?.length ?? 0) <= 1 ? /* @__PURE__ */ K(dt, {
219
219
  ref: d.toolbarRef,
220
- ...E(a, ft(e), 128, 36, 8),
220
+ ...ne(a, pt(e), 128, 36, 8),
221
221
  onComment: i ? () => d.open(a) : void 0,
222
222
  onCopy: () => {
223
223
  navigator.clipboard?.writeText(a.quote), window.getSelection()?.removeAllRanges(), o();
224
224
  }
225
225
  }) : null,
226
- f ? /* @__PURE__ */ K(ot, {
226
+ f ? /* @__PURE__ */ K(st, {
227
227
  ref: d.panelRef,
228
- ...te(f.target, ft(e), 340, 8),
228
+ ...te(f.target, pt(e), 340, 8),
229
229
  initial: f.initial,
230
230
  leaving: d.leaving,
231
231
  quote: O(f.target),
@@ -234,14 +234,14 @@ function pt({ editor: e, threads: t, actions: n, agent: r, canComment: i, select
234
234
  onCancel: () => d.close(!0),
235
235
  onChange: d.onText,
236
236
  onSubmit: (e) => s(f.target, e).then((e) => (e && d.close(!1), e))
237
- }, st(f.target.blockId, f.target.quote, f.target.blockIds, f.target.textRanges)) : null
237
+ }, ct(f.target.blockId, f.target.quote, f.target.blockIds, f.target.textRanges)) : null
238
238
  ] }),
239
239
  onMain: c,
240
240
  children: u
241
241
  });
242
242
  }
243
243
  // src/viewer/document/history.ts
244
- async function mt(e) {
244
+ async function ht(e) {
245
245
  await new Promise((e) => setTimeout(e, 0));
246
246
  let t = [...e.getAllChanges().values()].flat().sort((e, t) => e.lamport - t.lamport || e.peer.localeCompare(t.peer) || e.counter - t.counter), n = e.shallowSinceFrontiers(), r = e.frontiersToVV(n), i = [], a = [];
247
247
  try {
@@ -272,20 +272,20 @@ async function mt(e) {
272
272
  shallow: n.length > 0
273
273
  };
274
274
  }
275
- function ht(e, t, n) {
275
+ function gt(e, t, n) {
276
276
  let r = e.fork(), i;
277
277
  try {
278
278
  r.checkout(t);
279
- let e = r.getTree(Ce).roots();
280
- if (e.length !== 1) throw Error(p.t("history.contentUnavailable"));
281
- let a = Re({
279
+ let e = r.getTree(we).roots();
280
+ if (e.length !== 1) throw Error(m.t("history.contentUnavailable"));
281
+ let a = ze({
282
282
  nodes: n,
283
283
  editable: !1,
284
284
  onError: (e) => {
285
285
  throw e;
286
286
  }
287
287
  });
288
- i = Me(a, r);
288
+ i = Ne(a, r);
289
289
  let o = e[0].children() ?? [], s = /* @__PURE__ */ new Map(), c = (e, t) => {
290
290
  s.set(e.id, t), e.children()?.forEach((e) => c(e, t));
291
291
  };
@@ -298,9 +298,9 @@ function ht(e, t, n) {
298
298
  i?.dispose(), r.free();
299
299
  }
300
300
  }
301
- var gt = /^cid:(\d+@\d+):Map$/;
302
- function _t(e, t, n) {
303
- let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(Ce), a = /* @__PURE__ */ new Map(), o = new Map(t.map((e, t) => [e, t])), s = (e, t) => {
301
+ var _t = /^cid:(\d+@\d+):Map$/;
302
+ function vt(e, t, n) {
303
+ let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(we), a = /* @__PURE__ */ new Map(), o = new Map(t.map((e, t) => [e, t])), s = (e, t) => {
304
304
  let n = a.get(e);
305
305
  (!n || o.get(n) < o.get(t)) && a.set(e, t);
306
306
  };
@@ -312,7 +312,7 @@ function _t(e, t, n) {
312
312
  }, a)) {
313
313
  let t = e.getContainerById(o);
314
314
  for (; t;) {
315
- let e = gt.exec(t.id)?.[1], i = e && r.get(e);
315
+ let e = _t.exec(t.id)?.[1], i = e && r.get(e);
316
316
  if (i) {
317
317
  s(i, n);
318
318
  break;
@@ -330,8 +330,8 @@ function _t(e, t, n) {
330
330
  return a;
331
331
  }
332
332
  // ../../node_modules/.pnpm/@lexical+headless@0.53.0_typescript@6.0.3/node_modules/@lexical/headless/dist/LexicalHeadless.prod.js
333
- function vt(e) {
334
- let t = Re(e);
333
+ function yt(e) {
334
+ let t = ze(e);
335
335
  return t._headless = !0, [
336
336
  "registerDecoratorListener",
337
337
  "registerRootListener",
@@ -355,7 +355,7 @@ function vt(e) {
355
355
  }), t;
356
356
  }
357
357
  // ../../node_modules/.pnpm/@haklex+rich-compose@0.63.0_5813979dfe92539e1ee3bb4556f86411/node_modules/@haklex/rich-compose/dist/compose-Bkhp2CMm.js
358
- function yt({ text: e }) {
358
+ function bt({ text: e }) {
359
359
  let t = U(null), n = U(null);
360
360
  return V(() => {
361
361
  let r = t.current;
@@ -372,7 +372,7 @@ function yt({ text: e }) {
372
372
  ref: t
373
373
  });
374
374
  }
375
- var J = (e) => `${k[e]} ${A[e]}`, bt = {
375
+ var J = (e) => `${k[e]} ${A[e]}`, xt = {
376
376
  h1: J("headingH1"),
377
377
  h2: J("headingH2"),
378
378
  h3: J("headingH3"),
@@ -380,14 +380,14 @@ var J = (e) => `${k[e]} ${A[e]}`, bt = {
380
380
  h5: J("headingH5"),
381
381
  h6: J("headingH6")
382
382
  };
383
- function xt(e) {
383
+ function St(e) {
384
384
  return e.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g, "").replaceAll(/[\s_]+/g, "-").replaceAll(/^-+|-+$/g, "");
385
385
  }
386
- function St(e) {
387
- return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(St).join("") : "";
386
+ function Ct(e) {
387
+ return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(Ct).join("") : "";
388
388
  }
389
- var Ct = /^["'«‘“‹「『"']/, wt = /["'»’”›」』"']$/;
390
- function Tt(e, t, n, r, i, a) {
389
+ var wt = /^["'«‘“‹「『"']/, Tt = /["'»’”›」』"']$/;
390
+ function Et(e, t, n, r, i, a) {
391
391
  switch (e.type) {
392
392
  case "root": return /* @__PURE__ */ K(G, { children: n });
393
393
  case "paragraph": {
@@ -399,19 +399,19 @@ function Tt(e, t, n, r, i, a) {
399
399
  }, t);
400
400
  }
401
401
  case "heading": {
402
- let o = e.tag, s = xt(i || St(e)), c = a ?? s;
402
+ let o = e.tag, s = St(i || Ct(e)), c = a ?? s;
403
403
  if (a === void 0 && s) {
404
404
  let e = r.get(s);
405
405
  e === void 0 ? r.set(s, 1) : (c = `${s}-${e}`, r.set(s, e + 1));
406
406
  }
407
407
  return /* @__PURE__ */ q(o, {
408
- className: bt[o],
408
+ className: xt[o],
409
409
  id: c || void 0,
410
410
  children: [c && /* @__PURE__ */ K("a", {
411
411
  className: J("headingAnchor"),
412
412
  href: `#${c}`,
413
413
  tabIndex: 0,
414
- children: /* @__PURE__ */ K(Ze, {
414
+ children: /* @__PURE__ */ K(Qe, {
415
415
  "aria-hidden": !0,
416
416
  size: 14,
417
417
  strokeWidth: 2
@@ -421,7 +421,7 @@ function Tt(e, t, n, r, i, a) {
421
421
  }
422
422
  case "rich-quote":
423
423
  case "quote": {
424
- let r = (i || St(e)).trim(), a = Ct.test(r), o = wt.test(r), s = e.attribution;
424
+ let r = (i || Ct(e)).trim(), a = wt.test(r), o = Tt.test(r), s = e.attribution;
425
425
  return /* @__PURE__ */ q("blockquote", {
426
426
  className: J("quote"),
427
427
  "data-no-close-quote": o ? "" : void 0,
@@ -453,14 +453,14 @@ function Tt(e, t, n, r, i, a) {
453
453
  href: e.url,
454
454
  rel: e.rel || "noopener",
455
455
  target: e.target || "_blank",
456
- children: [/* @__PURE__ */ K(se, { href: e.url }), n]
456
+ children: [/* @__PURE__ */ K(ce, { href: e.url }), n]
457
457
  }, t);
458
458
  case "autolink": return /* @__PURE__ */ q("a", {
459
459
  className: J("link"),
460
460
  href: e.url,
461
461
  rel: "noopener",
462
462
  target: "_blank",
463
- children: [/* @__PURE__ */ K(se, { href: e.url }), n]
463
+ children: [/* @__PURE__ */ K(ce, { href: e.url }), n]
464
464
  }, t);
465
465
  case "horizontalrule": return /* @__PURE__ */ K("hr", { className: J("hr") }, t);
466
466
  case "table": return /* @__PURE__ */ K("div", {
@@ -482,13 +482,13 @@ function Tt(e, t, n, r, i, a) {
482
482
  case "details": {
483
483
  let r = e.summary || "";
484
484
  return /* @__PURE__ */ q("details", {
485
- className: `${w.details} ${D.details}`,
485
+ className: `${T.details} ${D.details}`,
486
486
  open: e.open || void 0,
487
487
  children: [/* @__PURE__ */ q("summary", {
488
- className: `${w.summary} ${D.summary}`,
488
+ className: `${T.summary} ${D.summary}`,
489
489
  children: [/* @__PURE__ */ K("span", {
490
490
  "aria-hidden": "true",
491
- className: `${w.chevron} ${D.chevron}`,
491
+ className: `${T.chevron} ${D.chevron}`,
492
492
  children: /* @__PURE__ */ K("svg", {
493
493
  fill: "none",
494
494
  height: "20",
@@ -501,11 +501,11 @@ function Tt(e, t, n, r, i, a) {
501
501
  children: /* @__PURE__ */ K("path", { d: "M8 6L12 10L8 14" })
502
502
  })
503
503
  }), /* @__PURE__ */ K("span", {
504
- className: `${w.summaryText} ${D.summaryText}`,
504
+ className: `${T.summaryText} ${D.summaryText}`,
505
505
  children: r
506
506
  })]
507
507
  }), /* @__PURE__ */ K("div", {
508
- className: `${w.content} ${D.content}`,
508
+ className: `${T.content} ${D.content}`,
509
509
  children: n
510
510
  })]
511
511
  }, t);
@@ -521,11 +521,11 @@ function Tt(e, t, n, r, i, a) {
521
521
  style: { backgroundColor: F(e.text) },
522
522
  children: e.text
523
523
  }, t);
524
- case "comment": return /* @__PURE__ */ K(yt, { text: e.text ?? "" }, t);
525
- case "ruby": return We(S, {
524
+ case "comment": return /* @__PURE__ */ K(bt, { text: e.text ?? "" }, t);
525
+ case "ruby": return Ge(C, {
526
526
  key: t,
527
527
  rendererKey: "Ruby",
528
- defaultRenderer: Be,
528
+ defaultRenderer: Ve,
529
529
  props: {
530
530
  reading: e.reading ?? "",
531
531
  children: n
@@ -541,7 +541,7 @@ function Tt(e, t, n, r, i, a) {
541
541
  default: return null;
542
542
  }
543
543
  }
544
- var Et = (e) => `${k[e]} ${A[e]}`, Dt = [
544
+ var Dt = (e) => `${k[e]} ${A[e]}`, Ot = [
545
545
  [1, "textBold"],
546
546
  [2, "textItalic"],
547
547
  [4, "textStrikethrough"],
@@ -551,7 +551,7 @@ var Et = (e) => `${k[e]} ${A[e]}`, Dt = [
551
551
  [64, "textSuperscript"],
552
552
  [128, "textHighlight"]
553
553
  ];
554
- function Ot(e) {
554
+ function kt(e) {
555
555
  let t = {};
556
556
  for (let n of e.split(";")) {
557
557
  let e = n.indexOf(":");
@@ -563,18 +563,18 @@ function Ot(e) {
563
563
  }
564
564
  return t;
565
565
  }
566
- function kt(e, t) {
566
+ function At(e, t) {
567
567
  let n = e.text, r = e.format || 0;
568
- for (let [e, i] of Dt) r & e && (n = /* @__PURE__ */ K("span", {
569
- className: Et(i),
568
+ for (let [e, i] of Ot) r & e && (n = /* @__PURE__ */ K("span", {
569
+ className: Dt(i),
570
570
  children: n
571
571
  }, `${t}-${e}`));
572
572
  return e.style && (n = /* @__PURE__ */ K("span", {
573
- style: Ot(e.style),
573
+ style: kt(e.style),
574
574
  children: n
575
575
  }, t)), n;
576
576
  }
577
- function At(e, t = !1) {
577
+ function jt(e, t = !1) {
578
578
  let n = [], r = t ? e.findIndex((e) => e.type === "paragraph") : -1, i = (e) => e.type === "image" && typeof e.layout == "string" && e.layout.startsWith("float-");
579
579
  for (let t = 0; t < e.length; t++) {
580
580
  let a = [t];
@@ -595,7 +595,7 @@ function At(e, t = !1) {
595
595
  for (let t of n) a.length && t.every((t) => e[t].type === "comment") || a.at(-1)?.every((t) => e[t].type === "comment") ? a.at(-1).push(...t) : a.push(t);
596
596
  return a;
597
597
  }
598
- function jt(e) {
598
+ function Mt(e) {
599
599
  let t = {}, n = /* @__PURE__ */ new Set(), r = {}, i = 1;
600
600
  function a(e) {
601
601
  if (e.type === "footnote" && e.identifier) {
@@ -612,35 +612,35 @@ function jt(e) {
612
612
  displayNumberMap: r
613
613
  };
614
614
  }
615
- var Mt = (e) => `${k.alert} ${A.alert} rich-alert-${e}`;
616
- function Nt(e, t, n) {
615
+ var Nt = (e) => `${k.alert} ${A.alert} rich-alert-${e}`;
616
+ function Pt(e, t, n) {
617
617
  switch (e.type) {
618
- case "alert-quote": return We("div", {
618
+ case "alert-quote": return Ge("div", {
619
619
  key: t,
620
- className: Mt(e.alertType)
620
+ className: Nt(e.alertType)
621
621
  }, n);
622
- case "banner": return We("div", {
622
+ case "banner": return Ge("div", {
623
623
  key: t,
624
624
  className: `rich-banner rich-banner-${e.bannerType}`
625
625
  }, n);
626
- case "grid-container": return We("div", {
626
+ case "grid-container": return Ge("div", {
627
627
  key: t,
628
- className: `${z.container} ${ne.container}`
628
+ className: `${z.container} ${re.container}`
629
629
  }, n);
630
- default: return Ge(n) ? Ue(n, { key: t }) : n;
630
+ default: return Ke(n) ? We(n, { key: t }) : n;
631
631
  }
632
632
  }
633
- function Pt(e, t, n) {
634
- return Ge(e) && typeof e.type == "string" ? Ue(e, { "data-block-id": t }) : /* @__PURE__ */ K("div", {
633
+ function Ft(e, t, n) {
634
+ return Ke(e) && typeof e.type == "string" ? We(e, { "data-block-id": t }) : /* @__PURE__ */ K("div", {
635
635
  className: "rich-block-anchor",
636
636
  "data-block-id": t,
637
637
  children: e
638
638
  }, `${n}-block-anchor`);
639
639
  }
640
- function Ft(e, t, n, r) {
641
- return t ? (r.blockAnchor ?? Pt)(e, t, n) : e;
640
+ function It(e, t, n, r) {
641
+ return t ? (r.blockAnchor ?? Ft)(e, t, n) : e;
642
642
  }
643
- function It(e, t, n, r, i, a, o) {
643
+ function Lt(e, t, n, r, i, a, o) {
644
644
  let s = o.recycleKeys ? i : e.getKey ? e.getKey() : i, c = o.headingIds?.get(e.getKey?.()), { builtinNodeOverrides: l } = o;
645
645
  if (typeof e.decorate == "function") {
646
646
  let r = null;
@@ -649,23 +649,23 @@ function It(e, t, n, r, i, a, o) {
649
649
  } catch {}
650
650
  if (r != null) {
651
651
  let t = e.exportJSON ? e.exportJSON() : {}, n = l?.[t.type];
652
- return Ft(n ? n(t, s, [r], () => Nt(t, s, r)) : Nt(t, s, r), a, s, o);
652
+ return It(n ? n(t, s, [r], () => Pt(t, s, r)) : Pt(t, s, r), a, s, o);
653
653
  }
654
654
  }
655
655
  let u = e.exportJSON ? e.exportJSON() : {};
656
656
  if (u.type === "text") {
657
657
  let e = l?.text;
658
- return e ? e(u, s, null, () => kt(u, s)) : kt(u, s);
658
+ return e ? e(u, s, null, () => At(u, s)) : At(u, s);
659
659
  }
660
660
  let d = typeof e.getChildren == "function" ? e.getChildren() : [];
661
661
  Array.isArray(u.children) && u.children.length === 0 && d.length > 0 && (u.children = d.map((e) => ({ type: typeof e.getType == "function" ? e.getType() : e.__type })));
662
662
  let f = null;
663
- d.length > 0 && (f = d.map((e, i) => It(e, t, n, r, `${s}-${i}`, void 0, o)));
663
+ d.length > 0 && (f = d.map((e, i) => Lt(e, t, n, r, `${s}-${i}`, void 0, o)));
664
664
  let p = e.getTextContent ? e.getTextContent() : void 0, m = l?.[u.type];
665
- return Ft(m ? m(u, s, f, () => Tt(u, s, f, r, p, c)) : Tt(u, s, f, r, p, c), a, s, o);
665
+ return It(m ? m(u, s, f, () => Et(u, s, f, r, p, c)) : Et(u, s, f, r, p, c), a, s, o);
666
666
  }
667
- function Lt(e, t, n, r) {
668
- let i = vt({
667
+ function Rt(e, t, n, r) {
668
+ let i = yt({
669
669
  nodes: t,
670
670
  theme: P,
671
671
  editable: !1,
@@ -675,15 +675,15 @@ function Lt(e, t, n, r) {
675
675
  }), a = {
676
676
  namespace: "ssr",
677
677
  theme: P
678
- }, o = T(e), s = i.parseEditorState(o);
678
+ }, o = E(e), s = i.parseEditorState(o);
679
679
  i.setEditorState(s);
680
- let c = jt(o), l = o.root?.children, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = s.read(() => {
680
+ let c = Mt(o), l = o.root?.children, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = s.read(() => {
681
681
  let e = /* @__PURE__ */ new Map(), t = (n, r, i) => {
682
682
  if (f.set(n.getKey(), i), n.getType() === "heading") {
683
- let t = xt(n.getTextContent()), i = e.get(t) ?? 0, a = t ? `${t}${i ? `-${i}` : ""}` : "";
683
+ let t = St(n.getTextContent()), i = e.get(t) ?? 0, a = t ? `${t}${i ? `-${i}` : ""}` : "";
684
684
  e.set(t, i + 1), u.set(n.getKey(), a), a && d.set(a, r);
685
685
  }
686
- Ie(n) && n.getChildren().forEach((e, n) => t(e, r, `${i}.${n}`));
686
+ Le(n) && n.getChildren().forEach((e, n) => t(e, r, `${i}.${n}`));
687
687
  }, n = L().getChildren();
688
688
  return n.forEach((e, n) => t(e, n, `${n}:0`)), n;
689
689
  }), m = /* @__PURE__ */ new Set(), h = p.map((e, t) => {
@@ -698,7 +698,7 @@ function Lt(e, t, n, r) {
698
698
  index: t,
699
699
  pool: `${n.type}:${n.type === "dynamic" ? n.url : n.tag ?? ""}`
700
700
  };
701
- }), g = At(h.map((e) => e.data), r), _ = /* @__PURE__ */ new Map(), v = g.map((e, t) => {
701
+ }), g = jt(h.map((e) => e.data), r), _ = /* @__PURE__ */ new Map(), v = g.map((e, t) => {
702
702
  let n = e.map((e) => (_.set(e, t), h[e])), r = n[0];
703
703
  return {
704
704
  blocks: n,
@@ -714,7 +714,7 @@ function Lt(e, t, n, r) {
714
714
  for (let [e, t] of d) d.set(e, _.get(t));
715
715
  let y = (e, t) => s.read(() => {
716
716
  let r = v[e];
717
- return r ? /* @__PURE__ */ K(He, { children: r.blocks.map((e, r) => It(p[e.index], i, a, /* @__PURE__ */ new Map(), t === void 0 ? `ssr-${e.index}` : `recycler-${t}-${r}`, l?.[e.index]?.$?.blockId, {
717
+ return r ? /* @__PURE__ */ K(Ue, { children: r.blocks.map((e, r) => Lt(p[e.index], i, a, /* @__PURE__ */ new Map(), t === void 0 ? `ssr-${e.index}` : `recycler-${t}-${r}`, l?.[e.index]?.$?.blockId, {
718
718
  ...n,
719
719
  headingIds: u,
720
720
  recycleKeys: t !== void 0
@@ -731,7 +731,7 @@ function Lt(e, t, n, r) {
731
731
  },
732
732
  footnoteData: c,
733
733
  renderNestedContent: (e) => {
734
- let r = vt({
734
+ let r = yt({
735
735
  nodes: t,
736
736
  theme: P,
737
737
  editable: !1,
@@ -741,21 +741,21 @@ function Lt(e, t, n, r) {
741
741
  }), i = {
742
742
  namespace: "ssr-nested",
743
743
  theme: P
744
- }, a = T(e), o = r.parseEditorState(a);
744
+ }, a = E(e), o = r.parseEditorState(a);
745
745
  r.setEditorState(o);
746
746
  let s = null, c = a.root?.children;
747
747
  return o.read(() => {
748
- let e = L(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) => It(e, r, i, t, `nested-${a}`, c?.[a]?.$?.blockId, n));
748
+ let e = L(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) => Lt(e, r, i, t, `nested-${a}`, c?.[a]?.$?.blockId, n));
749
749
  s = /* @__PURE__ */ K(G, { children: a });
750
750
  }), s;
751
751
  }
752
752
  };
753
753
  }
754
- function Rt({ document: e }) {
754
+ function zt({ document: e }) {
755
755
  return e.renderAll();
756
756
  }
757
- function zt({ value: e, variant: t = "article", theme: n = "light", className: r, style: i, as: a = "div", nested: o = !1, rendererConfig: s, extraNodes: c, builtinNodeOverrides: l, blockAnchor: u, surface: d, virtualization: f }) {
758
- let p = xe(t), m = re(), { document: h, footnoteData: g, renderNestedContent: _ } = H(() => Lt(e, c ? [...N, ...c] : N, {
757
+ function Bt({ value: e, variant: t = "article", theme: n = "light", className: r, style: i, as: a = "div", nested: o = !1, rendererConfig: s, extraNodes: c, builtinNodeOverrides: l, blockAnchor: u, surface: d, virtualization: f }) {
758
+ let p = Se(t), m = ie(), { document: h, footnoteData: g, renderNestedContent: _ } = H(() => Rt(e, c ? [...N, ...c] : N, {
759
759
  blockAnchor: u,
760
760
  builtinNodeOverrides: l
761
761
  }, t === "note"), [
@@ -764,12 +764,12 @@ function zt({ value: e, variant: t = "article", theme: n = "light", className: r
764
764
  c,
765
765
  e,
766
766
  t
767
- ]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, te = H(() => C ? Rt : S ? Ve({
767
+ ]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, w = H(() => C ? zt : S ? He({
768
768
  scrollContainer: v,
769
769
  overscan: y,
770
770
  estimateBlockHeight: b,
771
771
  preserveCapacity: x
772
- }) : d ?? Rt, [
772
+ }) : d ?? zt, [
773
773
  d,
774
774
  S,
775
775
  C,
@@ -777,34 +777,34 @@ function zt({ value: e, variant: t = "article", theme: n = "light", className: r
777
777
  y,
778
778
  b,
779
779
  x
780
- ]), w = [
780
+ ]), te = [
781
781
  "rich-content",
782
782
  p,
783
783
  r
784
784
  ].filter(Boolean).join(" "), T = typeof a == "string" ? {
785
785
  suppressHydrationWarning: !0,
786
- className: w,
786
+ className: te,
787
787
  "data-rich-nested": o ? "true" : void 0,
788
788
  "data-theme": n
789
789
  } : {};
790
- return /* @__PURE__ */ K(le, {
790
+ return /* @__PURE__ */ K(ue, {
791
791
  className: p,
792
792
  theme: n,
793
- children: /* @__PURE__ */ K(oe, {
793
+ children: /* @__PURE__ */ K(se, {
794
794
  colorScheme: n,
795
- children: /* @__PURE__ */ K(Se, {
795
+ children: /* @__PURE__ */ K(Ce, {
796
796
  config: s,
797
797
  mode: "renderer",
798
798
  variant: t,
799
799
  children: /* @__PURE__ */ K(ee, {
800
800
  definitions: g.definitions,
801
801
  displayNumberMap: g.displayNumberMap,
802
- children: /* @__PURE__ */ K(ce, {
802
+ children: /* @__PURE__ */ K(le, {
803
803
  value: m ?? _,
804
804
  children: /* @__PURE__ */ K(a, {
805
805
  ...T,
806
806
  style: i,
807
- children: /* @__PURE__ */ K(te, { document: h })
807
+ children: /* @__PURE__ */ K(w, { document: h })
808
808
  })
809
809
  })
810
810
  })
@@ -813,7 +813,7 @@ function zt({ value: e, variant: t = "article", theme: n = "light", className: r
813
813
  });
814
814
  }
815
815
  // ../../node_modules/.pnpm/@haklex+rich-ext-steps@0.63.0_ddc13a64d6adfc41364a9cf24cf46b9c/node_modules/@haklex/rich-ext-steps/dist/node-CEPwMzje.js
816
- var Bt = [Fe], Y = {
816
+ var Vt = [Ie], Y = {
817
817
  text: {
818
818
  kMv6JI: "xqfszdh",
819
819
  kGuDYH: "x4z9k3i",
@@ -1597,14 +1597,14 @@ var Bt = [Fe], Y = {
1597
1597
  kAzted: "xbktkl8",
1598
1598
  $$css: !0
1599
1599
  }
1600
- }, Vt = 864e5, Ht = (e) => String(e).padStart(2, "0"), Ut = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
1601
- function Wt(e, t = Date.now()) {
1602
- if (!(e > 0)) return p.t("time.notRecorded");
1603
- let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((Ut(r) - Ut(n)) / Vt);
1604
- if (i === 0) return p.t("time.today");
1605
- if (i === 1) return p.t("time.yesterday");
1600
+ }, Ht = 864e5, Ut = (e) => String(e).padStart(2, "0"), Wt = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
1601
+ function Gt(e, t = Date.now()) {
1602
+ if (!(e > 0)) return m.t("time.notRecorded");
1603
+ let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((Wt(r) - Wt(n)) / Ht);
1604
+ if (i === 0) return m.t("time.today");
1605
+ if (i === 1) return m.t("time.yesterday");
1606
1606
  let a = n.getFullYear() === r.getFullYear();
1607
- return new Intl.DateTimeFormat(m[p.language], a ? {
1607
+ return new Intl.DateTimeFormat(h[m.language], a ? {
1608
1608
  month: "long",
1609
1609
  day: "numeric"
1610
1610
  } : {
@@ -1613,35 +1613,35 @@ function Wt(e, t = Date.now()) {
1613
1613
  day: "numeric"
1614
1614
  }).format(n);
1615
1615
  }
1616
- function Gt(e, t = !1) {
1616
+ function Kt(e, t = !1) {
1617
1617
  if (!(e > 0)) return "--:--";
1618
- let n = /* @__PURE__ */ new Date(e * 1e3), r = `${Ht(n.getHours())}:${Ht(n.getMinutes())}`;
1619
- return t ? `${r}:${Ht(n.getSeconds())}` : r;
1618
+ let n = /* @__PURE__ */ new Date(e * 1e3), r = `${Ut(n.getHours())}:${Ut(n.getMinutes())}`;
1619
+ return t ? `${r}:${Ut(n.getSeconds())}` : r;
1620
1620
  }
1621
- function Kt(e) {
1622
- return e > 0 ? `${Wt(e)} ${Gt(e)}` : p.t("time.notRecorded");
1621
+ function qt(e) {
1622
+ return e > 0 ? `${Gt(e)} ${Kt(e)}` : m.t("time.notRecorded");
1623
1623
  }
1624
1624
  // src/viewer/document/HistoryPanel.tsx
1625
- var qt = {
1625
+ var Jt = {
1626
1626
  human: "history.sourceHuman",
1627
1627
  agent: "history.sourceAgent",
1628
1628
  session: "history.sourceSession",
1629
1629
  unknown: "history.sourceUnknown"
1630
1630
  };
1631
- function Jt(e) {
1631
+ function Yt(e) {
1632
1632
  let { session: t, selected: n } = e;
1633
1633
  return t && n ? t.history.groups.find((e) => e.entries.includes(n)) : void 0;
1634
1634
  }
1635
- function Yt(e) {
1635
+ function Xt(e) {
1636
1636
  return e.session?.history.entries.at(-1)?.change.timestamp ?? 0;
1637
1637
  }
1638
- function Xt({ model: e, strip: t }) {
1638
+ function Zt({ model: e, strip: t }) {
1639
1639
  let { count: n, changeIndex: r, loading: i } = e;
1640
1640
  return /* @__PURE__ */ q(G, { children: [
1641
1641
  /* @__PURE__ */ q("span", {
1642
1642
  "aria-live": "polite",
1643
1643
  role: "status",
1644
- ...f(Y.count),
1644
+ ...p(Y.count),
1645
1645
  children: [
1646
1646
  n ? r + 1 : 0,
1647
1647
  " / ",
@@ -1649,208 +1649,208 @@ function Xt({ model: e, strip: t }) {
1649
1649
  ]
1650
1650
  }),
1651
1651
  /* @__PURE__ */ K("button", {
1652
- "aria-label": d("history.previousChange"),
1652
+ "aria-label": f("history.previousChange"),
1653
1653
  disabled: r === 0 || i,
1654
1654
  type: "button",
1655
- ...f(Y.buttonBase, Y.icon, t && Y.stripIcon),
1655
+ ...p(Y.buttonBase, Y.icon, t && Y.stripIcon),
1656
1656
  onClick: () => e.navigate(-1),
1657
- children: /* @__PURE__ */ K(Ye, {
1657
+ children: /* @__PURE__ */ K(Xe, {
1658
1658
  "aria-hidden": "true",
1659
1659
  size: 14
1660
1660
  })
1661
1661
  }),
1662
1662
  /* @__PURE__ */ K("button", {
1663
- "aria-label": d("history.nextChange"),
1663
+ "aria-label": f("history.nextChange"),
1664
1664
  disabled: r >= n - 1 || i,
1665
1665
  type: "button",
1666
- ...f(Y.buttonBase, Y.icon, t && Y.stripIcon),
1666
+ ...p(Y.buttonBase, Y.icon, t && Y.stripIcon),
1667
1667
  onClick: () => e.navigate(1),
1668
- children: /* @__PURE__ */ K(qe, {
1668
+ children: /* @__PURE__ */ K(Je, {
1669
1669
  "aria-hidden": "true",
1670
1670
  size: 14
1671
1671
  })
1672
1672
  })
1673
1673
  ] });
1674
1674
  }
1675
- function Zt({ model: e }) {
1675
+ function Qt({ model: e }) {
1676
1676
  return /* @__PURE__ */ K("button", {
1677
1677
  "aria-pressed": e.onlyChanges,
1678
1678
  type: "button",
1679
- ...f(Y.buttonBase, Y.filter, e.onlyChanges && Y.filterOn),
1679
+ ...p(Y.buttonBase, Y.filter, e.onlyChanges && Y.filterOn),
1680
1680
  onClick: e.toggleOnly,
1681
- children: d("history.onlyChanges")
1681
+ children: f("history.onlyChanges")
1682
1682
  });
1683
1683
  }
1684
- function Qt({ compact: e, model: t }) {
1684
+ function $t({ compact: e, model: t }) {
1685
1685
  return t.pending ? /* @__PURE__ */ q("div", {
1686
1686
  role: "status",
1687
- ...f(e ? Y.updateCompact : Y.update),
1687
+ ...p(e ? Y.updateCompact : Y.update),
1688
1688
  children: [/* @__PURE__ */ K("span", {
1689
- ...f(Y.updateText),
1690
- children: t.streaming ? d("history.waitingEdits") : d("history.newContent", { time: Gt(Yt(t)) })
1689
+ ...p(Y.updateText),
1690
+ children: t.streaming ? f("history.waitingEdits") : f("history.newContent", { time: Kt(Xt(t)) })
1691
1691
  }), /* @__PURE__ */ q("button", {
1692
1692
  disabled: t.streaming || t.loading,
1693
1693
  type: "button",
1694
- ...f(Y.buttonBase, Y.updateButton),
1694
+ ...p(Y.buttonBase, Y.updateButton),
1695
1695
  onClick: t.refresh,
1696
- children: [/* @__PURE__ */ K(tt, {
1696
+ children: [/* @__PURE__ */ K(nt, {
1697
1697
  "aria-hidden": "true",
1698
1698
  size: 12
1699
- }), d("history.refresh")]
1699
+ }), f("history.refresh")]
1700
1700
  })]
1701
1701
  }) : null;
1702
1702
  }
1703
- function $t({ model: e }) {
1704
- let { selected: t, blocks: n, count: r } = e, i = Jt(e), a = n.filter((e) => e.kind === "insert" || e.kind === "modify").length, o = n.filter((e) => e.kind === "delete" || e.kind === "modify").length;
1703
+ function en({ model: e }) {
1704
+ let { selected: t, blocks: n, count: r } = e, i = Yt(e), a = n.filter((e) => e.kind === "insert" || e.kind === "modify").length, o = n.filter((e) => e.kind === "delete" || e.kind === "modify").length;
1705
1705
  return /* @__PURE__ */ q("section", {
1706
- "aria-label": d("history.range"),
1707
- ...f(Y.compare),
1706
+ "aria-label": f("history.range"),
1707
+ ...p(Y.compare),
1708
1708
  children: [/* @__PURE__ */ q("dl", {
1709
- ...f(Y.compareList),
1709
+ ...p(Y.compareList),
1710
1710
  children: [
1711
1711
  /* @__PURE__ */ K("dt", {
1712
- ...f(Y.compareTerm),
1713
- children: d("history.from")
1712
+ ...p(Y.compareTerm),
1713
+ children: f("history.from")
1714
1714
  }),
1715
1715
  /* @__PURE__ */ q("dd", {
1716
- ...f(Y.compareValue),
1716
+ ...p(Y.compareValue),
1717
1717
  children: [/* @__PURE__ */ K("strong", {
1718
- ...f(Y.compareStrong),
1719
- children: t ? Kt(t.change.timestamp) : d("history.pickPoint")
1718
+ ...p(Y.compareStrong),
1719
+ children: t ? qt(t.change.timestamp) : f("history.pickPoint")
1720
1720
  }), i ? /* @__PURE__ */ K("span", {
1721
- ...f(Y.compareSpan),
1722
- children: d(qt[i.source])
1721
+ ...p(Y.compareSpan),
1722
+ children: f(Jt[i.source])
1723
1723
  }) : null]
1724
1724
  }),
1725
1725
  /* @__PURE__ */ K("dt", {
1726
- ...f(Y.compareTerm),
1727
- children: d("history.to")
1726
+ ...p(Y.compareTerm),
1727
+ children: f("history.to")
1728
1728
  }),
1729
1729
  /* @__PURE__ */ q("dd", {
1730
- ...f(Y.compareValue),
1730
+ ...p(Y.compareValue),
1731
1731
  children: [/* @__PURE__ */ K("strong", {
1732
- ...f(Y.compareStrong),
1733
- children: d("history.latestVersion")
1732
+ ...p(Y.compareStrong),
1733
+ children: f("history.latestVersion")
1734
1734
  }), /* @__PURE__ */ K("span", {
1735
- ...f(Y.compareSpan),
1736
- children: Kt(Yt(e))
1735
+ ...p(Y.compareSpan),
1736
+ children: qt(Xt(e))
1737
1737
  })]
1738
1738
  })
1739
1739
  ]
1740
1740
  }), /* @__PURE__ */ q("div", {
1741
- ...f(Y.controls),
1741
+ ...p(Y.controls),
1742
1742
  children: [
1743
- /* @__PURE__ */ K("span", { children: d("history.changes", { count: r }) }),
1743
+ /* @__PURE__ */ K("span", { children: f("history.changes", { count: r }) }),
1744
1744
  /* @__PURE__ */ q("span", {
1745
- ...f(Y.plus),
1745
+ ...p(Y.plus),
1746
1746
  children: ["+", a]
1747
1747
  }),
1748
1748
  /* @__PURE__ */ q("span", {
1749
- ...f(Y.minus),
1749
+ ...p(Y.minus),
1750
1750
  children: ["−", o]
1751
1751
  }),
1752
- /* @__PURE__ */ K("span", { ...f(Y.spacer) }),
1753
- /* @__PURE__ */ K(Zt, { model: e }),
1754
- /* @__PURE__ */ K(Xt, { model: e })
1752
+ /* @__PURE__ */ K("span", { ...p(Y.spacer) }),
1753
+ /* @__PURE__ */ K(Qt, { model: e }),
1754
+ /* @__PURE__ */ K(Zt, { model: e })
1755
1755
  ]
1756
1756
  })]
1757
1757
  });
1758
1758
  }
1759
- function en({ model: e, sheet: t }) {
1759
+ function tn({ model: e, sheet: t }) {
1760
1760
  let [n, r] = W(50), [i, a] = W(() => /* @__PURE__ */ new Set()), { session: o, selected: s, blocks: c } = e;
1761
1761
  if (!o) return null;
1762
- let { groups: l, entries: u, shallow: p } = o.history, m = l.findIndex((e) => s !== null && e.entries.includes(s)), h = /* @__PURE__ */ new Map();
1762
+ let { groups: l, entries: u, shallow: d } = o.history, m = l.findIndex((e) => s !== null && e.entries.includes(s)), h = /* @__PURE__ */ new Map();
1763
1763
  for (let e of c) e.group && h.set(e.group, (h.get(e.group) ?? 0) + 1);
1764
- let g = l.slice(0, n), _ = (e) => Wt(e.entries.at(-1).change.timestamp), v = (e) => a((t) => {
1764
+ let g = l.slice(0, n), _ = (e) => Gt(e.entries.at(-1).change.timestamp), v = (e) => a((t) => {
1765
1765
  let n = new Set(t);
1766
1766
  return n.delete(e) || n.add(e), n;
1767
1767
  });
1768
1768
  return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("ol", {
1769
- "aria-label": d("history.timeline"),
1770
- ...f(Y.timeline),
1769
+ "aria-label": f("history.timeline"),
1770
+ ...p(Y.timeline),
1771
1771
  children: g.map((n, r) => {
1772
- let a = n.entries.at(-1), o = _(n), c = r === 0 || o !== _(g[r - 1]), l = r === m ? "selected" : r === 0 ? "latest" : r < m ? "range" : "outside", u = i.has(n.id), p = r < m ? h.get(n) : void 0;
1772
+ let a = n.entries.at(-1), o = _(n), c = r === 0 || o !== _(g[r - 1]), l = r === m ? "selected" : r === 0 ? "latest" : r < m ? "range" : "outside", u = i.has(n.id), d = r < m ? h.get(n) : void 0;
1773
1773
  return /* @__PURE__ */ q("li", {
1774
1774
  "data-day": c ? "" : void 0,
1775
1775
  "data-lower": r < m ? "in" : "out",
1776
1776
  "data-state": l,
1777
1777
  "data-upper": r <= m ? "in" : "out",
1778
- ...f(Y.node),
1778
+ ...p(Y.node),
1779
1779
  children: [
1780
1780
  c ? /* @__PURE__ */ K("div", {
1781
- ...f(Y.day),
1781
+ ...p(Y.day),
1782
1782
  children: o
1783
1783
  }) : null,
1784
1784
  /* @__PURE__ */ q("div", {
1785
- ...f(Y.row),
1785
+ ...p(Y.row),
1786
1786
  children: [
1787
1787
  /* @__PURE__ */ K("span", {
1788
1788
  "aria-hidden": "true",
1789
1789
  "data-state": l,
1790
- ...f(Y.dot)
1790
+ ...p(Y.dot)
1791
1791
  }),
1792
1792
  /* @__PURE__ */ q("button", {
1793
1793
  "aria-current": l === "selected" ? "true" : void 0,
1794
1794
  "data-state": l,
1795
1795
  type: "button",
1796
- ...f(Y.buttonBase, Y.select, t && Y.sheetSelect),
1796
+ ...p(Y.buttonBase, Y.select, t && Y.sheetSelect),
1797
1797
  onClick: () => e.select(a),
1798
1798
  children: [/* @__PURE__ */ q("span", {
1799
- ...f(Y.line),
1799
+ ...p(Y.line),
1800
1800
  children: [
1801
1801
  /* @__PURE__ */ K("strong", {
1802
- ...f(Y.lineStrong),
1803
- children: Gt(a.change.timestamp)
1802
+ ...p(Y.lineStrong),
1803
+ children: Kt(a.change.timestamp)
1804
1804
  }),
1805
1805
  /* @__PURE__ */ K("span", {
1806
- ...f(Y.lineText),
1807
- children: d(qt[n.source])
1806
+ ...p(Y.lineText),
1807
+ children: f(Jt[n.source])
1808
1808
  }),
1809
1809
  l === "latest" ? /* @__PURE__ */ K("span", {
1810
- ...f(Y.tag),
1811
- children: d("history.latest")
1810
+ ...p(Y.tag),
1811
+ children: f("history.latest")
1812
1812
  }) : null,
1813
1813
  l === "selected" ? /* @__PURE__ */ K("span", {
1814
- ...f(Y.tag, Y.tagStart),
1815
- children: d("history.start")
1814
+ ...p(Y.tag, Y.tagStart),
1815
+ children: f("history.start")
1816
1816
  }) : null
1817
1817
  ]
1818
1818
  }), /* @__PURE__ */ q("span", {
1819
- ...f(Y.meta),
1820
- children: [d("history.commits", { count: n.entries.length }), p ? /* @__PURE__ */ K("span", {
1821
- ...f(Y.changed),
1822
- children: d("history.changedSuffix", { count: p })
1819
+ ...p(Y.meta),
1820
+ children: [f("history.commits", { count: n.entries.length }), d ? /* @__PURE__ */ K("span", {
1821
+ ...p(Y.changed),
1822
+ children: f("history.changedSuffix", { count: d })
1823
1823
  }) : null]
1824
1824
  })]
1825
1825
  }),
1826
1826
  /* @__PURE__ */ K("button", {
1827
1827
  "aria-expanded": u,
1828
- "aria-label": d(u ? "history.collapseCommits" : "history.expandCommits"),
1828
+ "aria-label": f(u ? "history.collapseCommits" : "history.expandCommits"),
1829
1829
  type: "button",
1830
- ...f(Y.buttonBase, Y.icon, Y.expand),
1830
+ ...p(Y.buttonBase, Y.icon, Y.expand),
1831
1831
  onClick: () => v(n.id),
1832
- children: /* @__PURE__ */ K(Je, {
1832
+ children: /* @__PURE__ */ K(Ye, {
1833
1833
  "aria-hidden": "true",
1834
1834
  size: 14,
1835
- ...f(Y.expandIcon, u && Y.expandIconOpen)
1835
+ ...p(Y.expandIcon, u && Y.expandIconOpen)
1836
1836
  })
1837
1837
  })
1838
1838
  ]
1839
1839
  }),
1840
1840
  u ? /* @__PURE__ */ K("div", {
1841
- ...f(Y.raw),
1841
+ ...p(Y.raw),
1842
1842
  children: [...n.entries].reverse().map((t) => /* @__PURE__ */ q("button", {
1843
1843
  "aria-current": t === s ? "true" : void 0,
1844
1844
  title: t.change.message,
1845
1845
  type: "button",
1846
- ...f(Y.buttonBase, Y.rawButton),
1846
+ ...p(Y.buttonBase, Y.rawButton),
1847
1847
  onClick: () => e.select(t),
1848
1848
  children: [/* @__PURE__ */ K("span", {
1849
- ...f(Y.rawTime),
1850
- children: Gt(t.change.timestamp, !0)
1849
+ ...p(Y.rawTime),
1850
+ children: Kt(t.change.timestamp, !0)
1851
1851
  }), /* @__PURE__ */ K("code", {
1852
- ...f(Y.rawCode),
1853
- children: t.change.message || d("history.sourceUnknown")
1852
+ ...p(Y.rawCode),
1853
+ children: t.change.message || f("history.sourceUnknown")
1854
1854
  })]
1855
1855
  }, t.id))
1856
1856
  }) : null
@@ -1859,41 +1859,41 @@ function en({ model: e, sheet: t }) {
1859
1859
  })
1860
1860
  }), n < l.length ? /* @__PURE__ */ K("button", {
1861
1861
  type: "button",
1862
- ...f(Y.buttonBase, Y.more),
1862
+ ...p(Y.buttonBase, Y.more),
1863
1863
  onClick: () => r((e) => e + 50),
1864
- children: d("history.loadEarlier")
1864
+ children: f("history.loadEarlier")
1865
1865
  }) : /* @__PURE__ */ q("p", {
1866
- ...f(Y.end),
1866
+ ...p(Y.end),
1867
1867
  children: [
1868
- d(p ? "history.shallow" : "history.earliest"),
1868
+ f(d ? "history.shallow" : "history.earliest"),
1869
1869
  " ·",
1870
1870
  " ",
1871
- d("history.summary", {
1872
- edits: d("history.edits", { count: l.length }),
1873
- commits: d("history.commits", { count: u.length })
1871
+ f("history.summary", {
1872
+ edits: f("history.edits", { count: l.length }),
1873
+ commits: f("history.commits", { count: u.length })
1874
1874
  }),
1875
1875
  /* @__PURE__ */ K("br", {}),
1876
- d("history.clockNote")
1876
+ f("history.clockNote")
1877
1877
  ]
1878
1878
  })] });
1879
1879
  }
1880
- function tn({ streaming: e }) {
1880
+ function nn({ streaming: e }) {
1881
1881
  return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
1882
1882
  role: "status",
1883
- ...f(Y.waitingP),
1883
+ ...p(Y.waitingP),
1884
1884
  children: e ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("strong", {
1885
- ...f(Y.waitingStrong),
1886
- children: d("history.agentEditing")
1885
+ ...p(Y.waitingStrong),
1886
+ children: f("history.agentEditing")
1887
1887
  }), /* @__PURE__ */ K("span", {
1888
- ...f(Y.waitingSpan),
1889
- children: d("history.agentEditingBody")
1888
+ ...p(Y.waitingSpan),
1889
+ children: f("history.agentEditingBody")
1890
1890
  })] }) : /* @__PURE__ */ K("strong", {
1891
- ...f(Y.waitingStrong),
1892
- children: d("history.loading")
1891
+ ...p(Y.waitingStrong),
1892
+ children: f("history.loading")
1893
1893
  })
1894
1894
  }), /* @__PURE__ */ K("div", {
1895
1895
  "aria-hidden": "true",
1896
- ...f(Y.skeleton),
1896
+ ...p(Y.skeleton),
1897
1897
  children: [
1898
1898
  150,
1899
1899
  130,
@@ -1901,76 +1901,76 @@ function tn({ streaming: e }) {
1901
1901
  120
1902
1902
  ].map((e) => /* @__PURE__ */ K("span", {
1903
1903
  style: { width: e },
1904
- ...f(Y.skeletonBar)
1904
+ ...p(Y.skeletonBar)
1905
1905
  }, e))
1906
1906
  })] });
1907
1907
  }
1908
- function nn({ model: e }) {
1908
+ function rn({ model: e }) {
1909
1909
  return /* @__PURE__ */ q("div", {
1910
1910
  role: "alert",
1911
- ...f(Y.failure),
1911
+ ...p(Y.failure),
1912
1912
  children: [
1913
1913
  /* @__PURE__ */ q("strong", {
1914
- ...f(Y.failureStrong),
1915
- children: [/* @__PURE__ */ K(Xe, {
1914
+ ...p(Y.failureStrong),
1915
+ children: [/* @__PURE__ */ K(Ze, {
1916
1916
  "aria-hidden": "true",
1917
1917
  size: 15
1918
- }), d("history.failed")]
1918
+ }), f("history.failed")]
1919
1919
  }),
1920
1920
  /* @__PURE__ */ K("code", {
1921
- ...f(Y.failureCode),
1921
+ ...p(Y.failureCode),
1922
1922
  children: e.error
1923
1923
  }),
1924
1924
  /* @__PURE__ */ K("span", {
1925
- ...f(Y.failureText),
1926
- children: d("history.failedBody")
1925
+ ...p(Y.failureText),
1926
+ children: f("history.failedBody")
1927
1927
  }),
1928
1928
  /* @__PURE__ */ q("span", {
1929
- ...f(Y.actions),
1929
+ ...p(Y.actions),
1930
1930
  children: [/* @__PURE__ */ K("button", {
1931
1931
  disabled: e.streaming,
1932
1932
  type: "button",
1933
- ...f(Y.buttonBase, Y.button),
1933
+ ...p(Y.buttonBase, Y.button),
1934
1934
  onClick: e.refresh,
1935
- children: d("common.retry")
1935
+ children: f("common.retry")
1936
1936
  }), /* @__PURE__ */ K("button", {
1937
1937
  type: "button",
1938
- ...f(Y.buttonBase, Y.quiet),
1938
+ ...p(Y.buttonBase, Y.quiet),
1939
1939
  onClick: e.close,
1940
- children: d("history.backToComments")
1940
+ children: f("history.backToComments")
1941
1941
  })]
1942
1942
  })
1943
1943
  ]
1944
1944
  });
1945
1945
  }
1946
- function rn({ model: e }) {
1947
- let t = [f(Y.text, Y.panel).className, "history-panel"].filter(Boolean).join(" ");
1946
+ function an({ model: e }) {
1947
+ let t = [p(Y.text, Y.panel).className, "history-panel"].filter(Boolean).join(" ");
1948
1948
  return /* @__PURE__ */ q("aside", {
1949
- "aria-label": d("history.title"),
1949
+ "aria-label": f("history.title"),
1950
1950
  className: t,
1951
1951
  children: [
1952
1952
  /* @__PURE__ */ q("header", {
1953
- ...f(Y.panelHead),
1953
+ ...p(Y.panelHead),
1954
1954
  children: [/* @__PURE__ */ K("h2", {
1955
- ...f(Y.panelTitle),
1956
- children: d("history.title")
1955
+ ...p(Y.panelTitle),
1956
+ children: f("history.title")
1957
1957
  }), /* @__PURE__ */ K("button", {
1958
- "aria-label": d("history.close"),
1958
+ "aria-label": f("history.close"),
1959
1959
  type: "button",
1960
- ...f(Y.buttonBase, Y.icon),
1960
+ ...p(Y.buttonBase, Y.icon),
1961
1961
  onClick: e.close,
1962
- children: /* @__PURE__ */ K(nt, {
1962
+ children: /* @__PURE__ */ K(rt, {
1963
1963
  "aria-hidden": "true",
1964
1964
  size: 14
1965
1965
  })
1966
1966
  })]
1967
1967
  }),
1968
- /* @__PURE__ */ K(Qt, { model: e }),
1969
- e.error ? /* @__PURE__ */ K(nn, { model: e }) : e.session ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K($t, { model: e }), /* @__PURE__ */ K(en, { model: e })] }) : /* @__PURE__ */ K(tn, { streaming: e.streaming })
1968
+ /* @__PURE__ */ K($t, { model: e }),
1969
+ e.error ? /* @__PURE__ */ K(rn, { model: e }) : e.session ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(en, { model: e }), /* @__PURE__ */ K(tn, { model: e })] }) : /* @__PURE__ */ K(nn, { streaming: e.streaming })
1970
1970
  ]
1971
1971
  });
1972
1972
  }
1973
- function an({ model: e, onDismiss: t }) {
1973
+ function on({ model: e, onDismiss: t }) {
1974
1974
  let n = U(null);
1975
1975
  V(() => {
1976
1976
  let e = document.activeElement, t = n.current, r = () => [...t?.querySelectorAll("button:not(:disabled), a[href], input:not(:disabled), [tabindex=\"0\"]") ?? []];
@@ -1985,30 +1985,30 @@ function an({ model: e, onDismiss: t }) {
1985
1985
  };
1986
1986
  }, []);
1987
1987
  let r = /* @__PURE__ */ q("div", {
1988
- ...f(Y.sheetHead),
1988
+ ...p(Y.sheetHead),
1989
1989
  children: [/* @__PURE__ */ q("span", {
1990
- ...f(Y.sheetHeadText),
1990
+ ...p(Y.sheetHeadText),
1991
1991
  children: [/* @__PURE__ */ K("strong", {
1992
- ...f(Y.sheetTitle),
1993
- children: d("history.chooseStart")
1992
+ ...p(Y.sheetTitle),
1993
+ children: f("history.chooseStart")
1994
1994
  }), /* @__PURE__ */ K("small", {
1995
- ...f(Y.sheetSmall),
1996
- children: d("history.compareWithLatest", { time: Kt(Yt(e)) })
1995
+ ...p(Y.sheetSmall),
1996
+ children: f("history.compareWithLatest", { time: qt(Xt(e)) })
1997
1997
  })]
1998
1998
  }), /* @__PURE__ */ K("button", {
1999
1999
  type: "button",
2000
- ...f(Y.buttonBase, Y.sheetButton),
2000
+ ...p(Y.buttonBase, Y.sheetButton),
2001
2001
  onClick: t,
2002
- children: d("common.done")
2002
+ children: f("common.done")
2003
2003
  })]
2004
2004
  });
2005
2005
  return /* @__PURE__ */ K("div", {
2006
- "aria-label": d("history.chooseStart"),
2006
+ "aria-label": f("history.chooseStart"),
2007
2007
  "aria-modal": "true",
2008
2008
  ref: n,
2009
2009
  role: "dialog",
2010
- ...f(Y.text, Y.sheet),
2011
- children: /* @__PURE__ */ K(_, {
2010
+ ...p(Y.text, Y.sheet),
2011
+ children: /* @__PURE__ */ K(v, {
2012
2012
  header: r,
2013
2013
  snap: .85,
2014
2014
  snaps: [0, .85],
@@ -2017,8 +2017,8 @@ function an({ model: e, onDismiss: t }) {
2017
2017
  e === 0 && t();
2018
2018
  },
2019
2019
  children: /* @__PURE__ */ K("div", {
2020
- ...f(Y.sheetBody),
2021
- children: /* @__PURE__ */ K(en, {
2020
+ ...p(Y.sheetBody),
2021
+ children: /* @__PURE__ */ K(tn, {
2022
2022
  sheet: !0,
2023
2023
  model: e
2024
2024
  })
@@ -2027,33 +2027,33 @@ function an({ model: e, onDismiss: t }) {
2027
2027
  });
2028
2028
  }
2029
2029
  // src/viewer/document/HistoryContent.tsx
2030
- var on = [
2031
- ze,
2032
- ge,
2033
- ...Bt
2034
- ], sn = {
2035
- [Le]: Te,
2036
- [ae]: de,
2037
- [C]: _e,
2038
- [j]: ke
2039
- }, cn = {
2030
+ var sn = [
2031
+ Be,
2032
+ _e,
2033
+ ...Vt
2034
+ ], cn = {
2035
+ [Re]: Ee,
2036
+ [oe]: fe,
2037
+ [w]: ve,
2038
+ [j]: Ae
2039
+ }, ln = {
2040
2040
  insert: "history.kindInsert",
2041
2041
  delete: "history.kindDelete",
2042
2042
  modify: "history.kindModify"
2043
2043
  };
2044
- function ln({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a }) {
2045
- let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: p, error: m, streaming: h, onlyChanges: g } = e, _ = [f(Y.text).className, "history-view"].filter(Boolean).join(" "), v = [f(Y.hunk).className, "history-hunk"].filter(Boolean).join(" "), y = (e) => /* @__PURE__ */ K(zt, {
2046
- extraNodes: on,
2047
- rendererConfig: sn,
2044
+ function un({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a }) {
2045
+ let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: d, error: m, streaming: h, onlyChanges: g } = e, _ = [p(Y.text).className, "history-view"].filter(Boolean).join(" "), v = [p(Y.hunk).className, "history-hunk"].filter(Boolean).join(" "), y = (e) => /* @__PURE__ */ K(Bt, {
2046
+ extraNodes: sn,
2047
+ rendererConfig: cn,
2048
2048
  theme: t,
2049
2049
  value: e,
2050
2050
  variant: "article"
2051
2051
  }), b = -1, x = (t, n) => {
2052
2052
  if (t.kind === "equal") return g ? /* @__PURE__ */ K("button", {
2053
2053
  type: "button",
2054
- ...f(Y.buttonBase, Y.fold),
2054
+ ...p(Y.buttonBase, Y.fold),
2055
2055
  onClick: e.showAll,
2056
- children: /* @__PURE__ */ K("span", { children: d("history.unchanged", { count: t.value.root.children.length }) })
2056
+ children: /* @__PURE__ */ K("span", { children: f("history.unchanged", { count: t.value.root.children.length }) })
2057
2057
  }, n) : /* @__PURE__ */ K("section", {
2058
2058
  className: v,
2059
2059
  children: y(t.value)
@@ -2061,24 +2061,24 @@ function ln({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
2061
2061
  b++;
2062
2062
  let r = t.before ? null : t.kind === "insert" ? "afterBox" : t.kind === "delete" ? "beforeBox" : "mergedBox";
2063
2063
  return /* @__PURE__ */ q("section", {
2064
- className: [v, f(Y.hunkBox).className].filter(Boolean).join(" "),
2064
+ className: [v, p(Y.hunkBox).className].filter(Boolean).join(" "),
2065
2065
  "data-current": b === u ? "" : void 0,
2066
2066
  "data-history-change": "",
2067
2067
  children: [/* @__PURE__ */ q("div", {
2068
- ...f(Y.caption),
2068
+ ...p(Y.caption),
2069
2069
  children: [/* @__PURE__ */ K("span", {
2070
2070
  "data-kind": t.kind,
2071
- ...f(Y.kind),
2072
- children: d(cn[t.kind])
2073
- }), t.author ? /* @__PURE__ */ q("span", { children: [Kt(t.author.change.timestamp), t.group ? ` · ${d(qt[t.group.source])}` : ""] }) : null]
2071
+ ...p(Y.kind),
2072
+ children: f(ln[t.kind])
2073
+ }), t.author ? /* @__PURE__ */ q("span", { children: [qt(t.author.change.timestamp), t.group ? ` · ${f(Jt[t.group.source])}` : ""] }) : null]
2074
2074
  }), t.before ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("div", {
2075
- ...f(Y.diffBox, Y.beforeBox),
2075
+ ...p(Y.diffBox, Y.beforeBox),
2076
2076
  children: y(t.before)
2077
2077
  }), /* @__PURE__ */ K("div", {
2078
- ...f(Y.diffBox, Y.afterBox, Y.afterGap),
2078
+ ...p(Y.diffBox, Y.afterBox, Y.afterGap),
2079
2079
  children: y(t.value)
2080
2080
  })] }) : /* @__PURE__ */ K("div", {
2081
- ...f(Y.diffBox, Y[r]),
2081
+ ...p(Y.diffBox, Y[r]),
2082
2082
  children: y(t.value)
2083
2083
  })]
2084
2084
  }, n);
@@ -2087,69 +2087,69 @@ function ln({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
2087
2087
  className: _,
2088
2088
  children: [
2089
2089
  r ? /* @__PURE__ */ q("div", {
2090
- ...f(Y.strip),
2090
+ ...p(Y.strip),
2091
2091
  children: [
2092
2092
  /* @__PURE__ */ q("button", {
2093
2093
  type: "button",
2094
- ...f(Y.buttonBase, Y.pick),
2094
+ ...p(Y.buttonBase, Y.pick),
2095
2095
  onClick: a,
2096
2096
  children: [/* @__PURE__ */ K("span", {
2097
- ...f(Y.pickSpan),
2098
- children: d("history.compareFrom")
2097
+ ...p(Y.pickSpan),
2098
+ children: f("history.compareFrom")
2099
2099
  }), /* @__PURE__ */ q("strong", {
2100
- ...f(Y.pickStrong),
2101
- children: [d("history.toLatest", { from: s ? Kt(s.change.timestamp) : d("history.pickPoint") }), /* @__PURE__ */ K(qe, {
2100
+ ...p(Y.pickStrong),
2101
+ children: [f("history.toLatest", { from: s ? qt(s.change.timestamp) : f("history.pickPoint") }), /* @__PURE__ */ K(Je, {
2102
2102
  "aria-hidden": "true",
2103
2103
  size: 12
2104
2104
  })]
2105
2105
  })]
2106
2106
  }),
2107
- /* @__PURE__ */ K(Zt, { model: e }),
2108
- /* @__PURE__ */ K(Xt, {
2107
+ /* @__PURE__ */ K(Qt, { model: e }),
2108
+ /* @__PURE__ */ K(Zt, {
2109
2109
  strip: !0,
2110
2110
  model: e
2111
2111
  })
2112
2112
  ]
2113
2113
  }) : null,
2114
- r ? /* @__PURE__ */ K(Qt, {
2114
+ r ? /* @__PURE__ */ K($t, {
2115
2115
  compact: !0,
2116
2116
  model: e
2117
2117
  }) : null,
2118
2118
  m ? r ? /* @__PURE__ */ q("div", {
2119
2119
  role: "alert",
2120
- ...f(Y.message),
2121
- children: [d("history.readFailed", { error: m }), /* @__PURE__ */ K("button", {
2120
+ ...p(Y.message),
2121
+ children: [f("history.readFailed", { error: m }), /* @__PURE__ */ K("button", {
2122
2122
  disabled: h,
2123
2123
  type: "button",
2124
- ...f(Y.buttonBase, Y.messageButton),
2124
+ ...p(Y.buttonBase, Y.messageButton),
2125
2125
  onClick: e.refresh,
2126
- children: d("common.retry")
2126
+ children: f("common.retry")
2127
2127
  })]
2128
2128
  }) : /* @__PURE__ */ K("p", {
2129
- ...f(Y.message),
2130
- children: d("history.unreadable")
2131
- }) : p || !o ? /* @__PURE__ */ K("div", {
2129
+ ...p(Y.message),
2130
+ children: f("history.unreadable")
2131
+ }) : d || !o ? /* @__PURE__ */ K("div", {
2132
2132
  role: "status",
2133
- ...f(Y.message),
2134
- children: d(h ? "history.waitingEdits" : "history.computing")
2133
+ ...p(Y.message),
2134
+ children: f(h ? "history.waitingEdits" : "history.computing")
2135
2135
  }) : /* @__PURE__ */ q("div", {
2136
- "aria-label": d("history.diffBody"),
2136
+ "aria-label": f("history.diffBody"),
2137
2137
  ref: i,
2138
- ...f(Y.content),
2138
+ ...p(Y.content),
2139
2139
  children: [
2140
2140
  o.latest.value.root.children.some((e) => e.type === "heading" && e.tag === "h1") ? null : /* @__PURE__ */ K("h1", {
2141
- ...f(Y.contentTitle),
2141
+ ...p(Y.contentTitle),
2142
2142
  children: n
2143
2143
  }),
2144
2144
  l ? null : /* @__PURE__ */ K("p", {
2145
2145
  role: "status",
2146
- ...f(Y.note),
2147
- children: d("history.noDiff")
2146
+ ...p(Y.note),
2147
+ children: f("history.noDiff")
2148
2148
  }),
2149
2149
  c.map(x),
2150
2150
  /* @__PURE__ */ K("p", {
2151
- ...f(Y.end),
2152
- children: d("history.endOfDiff")
2151
+ ...p(Y.end),
2152
+ children: f("history.endOfDiff")
2153
2153
  })
2154
2154
  ]
2155
2155
  })
@@ -2157,15 +2157,15 @@ function ln({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
2157
2157
  });
2158
2158
  }
2159
2159
  // ../../node_modules/.pnpm/@haklex+rich-diff-core@0.63.0_lexical@0.53.0_typescript@6.0.3_/node_modules/@haklex/rich-diff-core/dist/index.mjs
2160
- var un = 5e4, dn = "background-color: color-mix(in srgb, var(--rc-alert-caution) 22%, transparent); text-decoration: line-through;", fn = "background-color: color-mix(in srgb, var(--rc-alert-tip) 22%, transparent);";
2160
+ var dn = 5e4, fn = "background-color: color-mix(in srgb, var(--rc-alert-caution) 22%, transparent); text-decoration: line-through;", pn = "background-color: color-mix(in srgb, var(--rc-alert-tip) 22%, transparent);";
2161
2161
  function X(e) {
2162
2162
  let t = e;
2163
2163
  return t.type === "heading" ? `heading:${t.tag}` : t.type === "list" ? `list:${t.listType}` : t.type || "unknown";
2164
2164
  }
2165
- function pn(e, t) {
2165
+ function mn(e, t) {
2166
2166
  return JSON.stringify(e) === JSON.stringify(t);
2167
2167
  }
2168
- function mn(e) {
2168
+ function hn(e) {
2169
2169
  let t = e;
2170
2170
  return t.type === "text" && typeof t.text == "string";
2171
2171
  }
@@ -2173,33 +2173,33 @@ function Z(e) {
2173
2173
  let t = e;
2174
2174
  return Array.isArray(t.children) ? t.children : null;
2175
2175
  }
2176
- function hn(e, t) {
2176
+ function gn(e, t) {
2177
2177
  let n = typeof e == "string" ? e.trim() : "";
2178
2178
  return n ? `${n}${n.endsWith(";") ? "" : ";"} ${t}` : t;
2179
2179
  }
2180
2180
  function Q(e, t, n) {
2181
2181
  let { style: r } = e;
2182
- return n === "delete" ? r = hn(r, dn) : n === "insert" && (r = hn(r, fn)), {
2182
+ return n === "delete" ? r = gn(r, fn) : n === "insert" && (r = gn(r, pn)), {
2183
2183
  ...e,
2184
2184
  text: t,
2185
2185
  style: r
2186
2186
  };
2187
2187
  }
2188
- function gn(e, t) {
2188
+ function _n(e, t) {
2189
2189
  return {
2190
2190
  ...e,
2191
2191
  children: t
2192
2192
  };
2193
2193
  }
2194
2194
  function $(e, t) {
2195
- if (mn(e)) return Q(e, e.text, t);
2195
+ if (hn(e)) return Q(e, e.text, t);
2196
2196
  let n = Z(e);
2197
- return n ? gn(e, n.map((e) => $(e, t))) : e;
2197
+ return n ? _n(e, n.map((e) => $(e, t))) : e;
2198
2198
  }
2199
- function _n(e) {
2199
+ function vn(e) {
2200
2200
  return Array.from(e).reverse().join("");
2201
2201
  }
2202
- function vn(e) {
2202
+ function yn(e) {
2203
2203
  let t = [];
2204
2204
  for (let n of e) {
2205
2205
  if (!n.text) continue;
@@ -2208,7 +2208,7 @@ function vn(e) {
2208
2208
  }
2209
2209
  return t;
2210
2210
  }
2211
- function yn(e, t) {
2211
+ function bn(e, t) {
2212
2212
  let n = e.length, r = t.length;
2213
2213
  if (n === 0 && r === 0) return [];
2214
2214
  if (n === 0) return [{
@@ -2219,7 +2219,7 @@ function yn(e, t) {
2219
2219
  kind: "delete",
2220
2220
  text: e.join("")
2221
2221
  }];
2222
- if (n * r > un) return [{
2222
+ if (n * r > dn) return [{
2223
2223
  kind: "delete",
2224
2224
  text: e.join("")
2225
2225
  }, {
@@ -2262,12 +2262,12 @@ function yn(e, t) {
2262
2262
  text: t[s - 1]
2263
2263
  }), s--;
2264
2264
  }
2265
- return vn(a.reverse().map((e) => ({
2265
+ return yn(a.reverse().map((e) => ({
2266
2266
  kind: e.kind,
2267
- text: _n(e.text)
2267
+ text: vn(e.text)
2268
2268
  })));
2269
2269
  }
2270
- function bn(e, t) {
2270
+ function xn(e, t) {
2271
2271
  let n = Array.from(e), r = Array.from(t), i = 0;
2272
2272
  for (; i < n.length && i < r.length && n[i] === r[i];) i++;
2273
2273
  let a = n.length - 1, o = r.length - 1;
@@ -2276,13 +2276,13 @@ function bn(e, t) {
2276
2276
  return i > 0 && s.push({
2277
2277
  kind: "equal",
2278
2278
  text: n.slice(0, i).join("")
2279
- }), s.push(...yn(n.slice(i, a + 1), r.slice(i, o + 1))), a < n.length - 1 && s.push({
2279
+ }), s.push(...bn(n.slice(i, a + 1), r.slice(i, o + 1))), a < n.length - 1 && s.push({
2280
2280
  kind: "equal",
2281
2281
  text: n.slice(a + 1).join("")
2282
- }), vn(s);
2282
+ }), yn(s);
2283
2283
  }
2284
- function xn(e, t) {
2285
- let n = bn(e.text, t.text), r = [], i = [], a = !1;
2284
+ function Sn(e, t) {
2285
+ let n = xn(e.text, t.text), r = [], i = [], a = !1;
2286
2286
  for (let o of n) o.text && (o.kind === "equal" ? (r.push(Q(e, o.text)), i.push(Q(t, o.text))) : (a = !0, o.kind === "delete" ? r.push(Q(e, o.text, "delete")) : i.push(Q(t, o.text, "insert"))));
2287
2287
  return {
2288
2288
  oldNodes: r.length > 0 ? r : [e],
@@ -2290,19 +2290,19 @@ function xn(e, t) {
2290
2290
  changed: a
2291
2291
  };
2292
2292
  }
2293
- function Sn(e, t) {
2293
+ function Cn(e, t) {
2294
2294
  let n = e.length, r = t.length, i = Array.from({ length: n + 1 }, () => Array.from({ length: r + 1 }).fill(0));
2295
2295
  for (let a = 1; a <= n; a++) for (let n = 1; n <= r; n++) {
2296
2296
  let r = Math.max(i[a - 1][n], i[a][n - 1]);
2297
2297
  if (X(e[a - 1]) === X(t[n - 1])) {
2298
- let o = pn(e[a - 1], t[n - 1]) ? 2 : 1;
2298
+ let o = mn(e[a - 1], t[n - 1]) ? 2 : 1;
2299
2299
  i[a][n] = Math.max(r, i[a - 1][n - 1] + o);
2300
2300
  } else i[a][n] = r;
2301
2301
  }
2302
2302
  let a = [], o = n, s = r;
2303
2303
  for (; o > 0 && s > 0;) {
2304
2304
  if (X(e[o - 1]) === X(t[s - 1])) {
2305
- let n = pn(e[o - 1], t[s - 1]), r = n ? 2 : 1;
2305
+ let n = mn(e[o - 1], t[s - 1]), r = n ? 2 : 1;
2306
2306
  if (i[o][s] === i[o - 1][s - 1] + r) {
2307
2307
  a.push(n ? {
2308
2308
  kind: "equal",
@@ -2333,8 +2333,8 @@ function Sn(e, t) {
2333
2333
  });
2334
2334
  return a.reverse(), a;
2335
2335
  }
2336
- function Cn(e, t) {
2337
- let n = Sn(e, t), r = [], i = [], a = !1;
2336
+ function wn(e, t) {
2337
+ let n = Cn(e, t), r = [], i = [], a = !1;
2338
2338
  for (let e of n) switch (e.kind) {
2339
2339
  case "equal":
2340
2340
  r.push(e.node), i.push(e.node);
@@ -2346,12 +2346,12 @@ function Cn(e, t) {
2346
2346
  a = !0, i.push($(e.node, "insert"));
2347
2347
  break;
2348
2348
  case "modify": {
2349
- if (a = !0, mn(e.oldNode) && mn(e.newNode)) {
2350
- let t = xn(e.oldNode, e.newNode);
2349
+ if (a = !0, hn(e.oldNode) && hn(e.newNode)) {
2350
+ let t = Sn(e.oldNode, e.newNode);
2351
2351
  r.push(...t.oldNodes), i.push(...t.newNodes);
2352
2352
  break;
2353
2353
  }
2354
- let t = wn(e.oldNode, e.newNode);
2354
+ let t = Tn(e.oldNode, e.newNode);
2355
2355
  t ? (r.push(t.oldNode), i.push(t.newNode)) : (r.push($(e.oldNode, "delete")), i.push($(e.newNode, "insert")));
2356
2356
  break;
2357
2357
  }
@@ -2362,19 +2362,19 @@ function Cn(e, t) {
2362
2362
  changed: a
2363
2363
  };
2364
2364
  }
2365
- function wn(e, t) {
2365
+ function Tn(e, t) {
2366
2366
  if (X(e) !== X(t)) return null;
2367
- if (pn(e, t)) return {
2367
+ if (mn(e, t)) return {
2368
2368
  oldNode: e,
2369
2369
  newNode: t,
2370
2370
  changed: !1
2371
2371
  };
2372
2372
  let n = Z(e), r = Z(t);
2373
2373
  if (!n || !r) return null;
2374
- let i = Cn(n, r);
2374
+ let i = wn(n, r);
2375
2375
  return i.changed ? {
2376
- oldNode: gn(e, i.oldChildren),
2377
- newNode: gn(t, i.newChildren),
2376
+ oldNode: _n(e, i.oldChildren),
2377
+ newNode: _n(t, i.newChildren),
2378
2378
  changed: !0
2379
2379
  } : {
2380
2380
  oldNode: e,
@@ -2382,8 +2382,8 @@ function wn(e, t) {
2382
2382
  changed: !1
2383
2383
  };
2384
2384
  }
2385
- function Tn(e, t) {
2386
- let n = wn(e, t);
2385
+ function En(e, t) {
2386
+ let n = Tn(e, t);
2387
2387
  return n ? {
2388
2388
  oldNode: n.oldNode,
2389
2389
  newNode: n.newNode
@@ -2392,13 +2392,13 @@ function Tn(e, t) {
2392
2392
  newNode: $(t, "insert")
2393
2393
  };
2394
2394
  }
2395
- function En(e, t) {
2396
- let n = bn(e.text, t.text), r = [];
2395
+ function Dn(e, t) {
2396
+ let n = xn(e.text, t.text), r = [];
2397
2397
  for (let i of n) i.text && (i.kind === "equal" ? r.push(Q(t, i.text)) : i.kind === "delete" ? r.push(Q(e, i.text, "delete")) : r.push(Q(t, i.text, "insert")));
2398
2398
  return r;
2399
2399
  }
2400
- function Dn(e, t) {
2401
- let n = Sn(e, t), r = [];
2400
+ function On(e, t) {
2401
+ let n = Cn(e, t), r = [];
2402
2402
  for (let e of n) switch (e.kind) {
2403
2403
  case "equal":
2404
2404
  r.push(e.node);
@@ -2410,25 +2410,25 @@ function Dn(e, t) {
2410
2410
  r.push($(e.node, "insert"));
2411
2411
  break;
2412
2412
  case "modify": {
2413
- if (mn(e.oldNode) && mn(e.newNode)) {
2414
- r.push(...En(e.oldNode, e.newNode));
2413
+ if (hn(e.oldNode) && hn(e.newNode)) {
2414
+ r.push(...Dn(e.oldNode, e.newNode));
2415
2415
  break;
2416
2416
  }
2417
2417
  let t = Z(e.oldNode), n = Z(e.newNode);
2418
- t && n ? r.push(gn(e.newNode, Dn(t, n))) : (r.push($(e.oldNode, "delete")), r.push($(e.newNode, "insert")));
2418
+ t && n ? r.push(_n(e.newNode, On(t, n))) : (r.push($(e.oldNode, "delete")), r.push($(e.newNode, "insert")));
2419
2419
  break;
2420
2420
  }
2421
2421
  }
2422
2422
  return r;
2423
2423
  }
2424
- function On(e, t) {
2424
+ function kn(e, t) {
2425
2425
  if (X(e) !== X(t)) return $(t, "insert");
2426
- if (pn(e, t)) return t;
2426
+ if (mn(e, t)) return t;
2427
2427
  let n = Z(e), r = Z(t);
2428
- return !n || !r ? $(t, "insert") : gn(t, Dn(n, r));
2428
+ return !n || !r ? $(t, "insert") : _n(t, On(n, r));
2429
2429
  }
2430
- function kn(e, t) {
2431
- let n = Sn(e.root.children, t.root.children), r = [];
2430
+ function An(e, t) {
2431
+ let n = Cn(e.root.children, t.root.children), r = [];
2432
2432
  for (let e of n) switch (e.kind) {
2433
2433
  case "equal": {
2434
2434
  let t = r.at(-1);
@@ -2440,7 +2440,7 @@ function kn(e, t) {
2440
2440
  }
2441
2441
  case "modify":
2442
2442
  {
2443
- let t = Tn(e.oldNode, e.newNode);
2443
+ let t = En(e.oldNode, e.newNode);
2444
2444
  r.push({
2445
2445
  type: "delete",
2446
2446
  nodes: [t.oldNode]
@@ -2464,19 +2464,19 @@ function kn(e, t) {
2464
2464
  return r;
2465
2465
  }
2466
2466
  // src/viewer/document/historyDiff.ts
2467
- function An(e) {
2467
+ function jn(e) {
2468
2468
  let t = { ...e };
2469
2469
  if (t.$) {
2470
2470
  let { blockId: e, ...n } = t.$;
2471
2471
  Object.keys(n).length ? t.$ = n : delete t.$;
2472
2472
  }
2473
- return t.children &&= t.children.map(An), t;
2473
+ return t.children &&= t.children.map(jn), t;
2474
2474
  }
2475
- function jn(e, t) {
2475
+ function Mn(e, t) {
2476
2476
  let { children: n, text: r, ...i } = e, { children: a, text: o, ...s } = t;
2477
- return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a && Fn(n, a).some((e) => e.kind === "modify" && jn(e.old[0], e.current[0])));
2477
+ return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a && In(n, a).some((e) => e.kind === "modify" && Mn(e.old[0], e.current[0])));
2478
2478
  }
2479
- function Mn(e) {
2479
+ function Nn(e) {
2480
2480
  let t = e;
2481
2481
  return t.type === "dynamic" || t.type === "pending" ? {
2482
2482
  type: "paragraph",
@@ -2487,11 +2487,11 @@ function Mn(e) {
2487
2487
  children: [{
2488
2488
  type: "text",
2489
2489
  version: 1,
2490
- text: t.type === "dynamic" ? p.t("history.dynamic", {
2490
+ text: t.type === "dynamic" ? m.t("history.dynamic", {
2491
2491
  url: t.url,
2492
2492
  height: t.initialHeight ?? 320,
2493
2493
  props: JSON.stringify(t.props ?? {})
2494
- }) : p.t("history.pendingIntent", { intent: t.intent ?? "" }),
2494
+ }) : m.t("history.pendingIntent", { intent: t.intent ?? "" }),
2495
2495
  format: 0,
2496
2496
  detail: 0,
2497
2497
  mode: "normal",
@@ -2499,13 +2499,13 @@ function Mn(e) {
2499
2499
  }]
2500
2500
  } : t.children ? {
2501
2501
  ...t,
2502
- children: t.children.map(Mn)
2502
+ children: t.children.map(Nn)
2503
2503
  } : t;
2504
2504
  }
2505
- function Nn(e) {
2506
- return Pn(e.map(Mn));
2507
- }
2508
2505
  function Pn(e) {
2506
+ return Fn(e.map(Nn));
2507
+ }
2508
+ function Fn(e) {
2509
2509
  return { root: {
2510
2510
  type: "root",
2511
2511
  version: 1,
@@ -2515,8 +2515,8 @@ function Pn(e) {
2515
2515
  children: e
2516
2516
  } };
2517
2517
  }
2518
- function Fn(e, t) {
2519
- let n = kn(Pn(e), Pn(t)), r = [], i = 0, a = 0;
2518
+ function In(e, t) {
2519
+ let n = An(Fn(e), Fn(t)), r = [], i = 0, a = 0;
2520
2520
  for (let o = 0; o < n.length; o++) {
2521
2521
  let s = n[o];
2522
2522
  if (s.type === "equal") {
@@ -2549,43 +2549,43 @@ function Fn(e, t) {
2549
2549
  }
2550
2550
  return r;
2551
2551
  }
2552
- function In(e, t) {
2553
- return Fn(e.root.children.map(An), t.root.children.map(An)).map((e) => {
2552
+ function Ln(e, t) {
2553
+ return In(e.root.children.map(jn), t.root.children.map(jn)).map((e) => {
2554
2554
  let t = {
2555
2555
  oldIndex: e.oldIndex,
2556
2556
  newIndex: e.newIndex
2557
2557
  };
2558
2558
  if (e.kind === "modify") {
2559
2559
  let n = e.old[0], r = e.current[0];
2560
- return n.type === r.type && !jn(n, r) ? {
2560
+ return n.type === r.type && !Mn(n, r) ? {
2561
2561
  kind: "modify",
2562
- value: Nn([On(n, r)]),
2562
+ value: Pn([kn(n, r)]),
2563
2563
  ...t
2564
2564
  } : {
2565
2565
  kind: "modify",
2566
- before: Nn(e.old),
2567
- value: Nn(e.current),
2566
+ before: Pn(e.old),
2567
+ value: Pn(e.current),
2568
2568
  ...t
2569
2569
  };
2570
2570
  }
2571
2571
  let n = e.kind === "delete" ? e.old : e.current;
2572
2572
  return {
2573
2573
  kind: e.kind,
2574
- value: Nn(e.kind === "equal" ? n : n.map((t) => $(t, e.kind))),
2574
+ value: Pn(e.kind === "equal" ? n : n.map((t) => $(t, e.kind))),
2575
2575
  ...t
2576
2576
  };
2577
2577
  });
2578
2578
  }
2579
2579
  // src/viewer/document/DocumentHistory.tsx
2580
- var Ln = (e) => JSON.stringify(e.frontiers()), Rn = (e, t) => t === void 0 ? void 0 : e[t];
2581
- function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClose: o }) {
2582
- let [s, c] = W(null), [u, d] = W(null), f = U(null), p = U(null), m = U(0), [h, g] = W(!0), [_, v] = W(null), [y, b] = W(!1), [x, S] = W([]), [C, ee] = W(!1), [te, w] = W(0), [T, E] = W(!1), ne = l("(max-width: 1100px)"), D = U(null), O = B(async () => {
2580
+ var Rn = (e) => JSON.stringify(e.frontiers()), zn = (e, t) => t === void 0 ? void 0 : e[t];
2581
+ function Bn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClose: o }) {
2582
+ let [s, c] = W(null), [l, d] = W(null), f = U(null), p = U(null), m = U(0), [h, g] = W(!0), [_, v] = W(null), [y, b] = W(!1), [x, S] = W([]), [C, w] = W(!1), [ee, te] = W(0), [T, E] = W(!1), ne = u("(max-width: 1100px)"), re = U(null), D = B(async () => {
2583
2583
  if (!e) return;
2584
2584
  let n = ++m.current;
2585
2585
  g(!0), v(null);
2586
2586
  let r = e.fork();
2587
2587
  try {
2588
- let i = await mt(r), a = ht(r, r.frontiers(), t);
2588
+ let i = await ht(r), a = gt(r, r.frontiers(), t);
2589
2589
  if (m.current !== n) {
2590
2590
  r.free();
2591
2591
  return;
@@ -2597,7 +2597,7 @@ function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
2597
2597
  doc: r,
2598
2598
  history: i,
2599
2599
  latest: a
2600
- }), b(Ln(e) !== Ln(r)), o?.free();
2600
+ }), b(Rn(e) !== Rn(r)), o?.free();
2601
2601
  } catch (e) {
2602
2602
  r.free(), m.current === n && v(e.message);
2603
2603
  } finally {
@@ -2606,16 +2606,16 @@ function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
2606
2606
  }, [e, t]);
2607
2607
  if (V(() => {
2608
2608
  if (a) return () => {
2609
- m.current++, p.current?.free(), p.current = null, f.current = null, c(null), d(null), S([]), b(!1), v(null), g(!0), E(!1), ee(!1);
2609
+ m.current++, p.current?.free(), p.current = null, f.current = null, c(null), d(null), S([]), b(!1), v(null), g(!0), E(!1), w(!1);
2610
2610
  };
2611
2611
  }, [a, e]), V(() => {
2612
- a && !n && !p.current && O();
2612
+ a && !n && !p.current && D();
2613
2613
  }, [
2614
2614
  a,
2615
- O,
2615
+ D,
2616
2616
  n
2617
2617
  ]), V(() => {
2618
- if (a && e) return e.subscribe(() => b(p.current !== null && Ln(e) !== Ln(p.current)));
2618
+ if (a && e) return e.subscribe(() => b(p.current !== null && Rn(e) !== Rn(p.current)));
2619
2619
  }, [e, a]), V(() => {
2620
2620
  if (!a) return;
2621
2621
  let e = (e) => {
@@ -2627,21 +2627,21 @@ function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
2627
2627
  o,
2628
2628
  T
2629
2629
  ]), V(() => {
2630
- if (!s || !u) return;
2630
+ if (!s || !l) return;
2631
2631
  let e = !1;
2632
2632
  g(!0);
2633
2633
  let n = setTimeout(() => {
2634
2634
  try {
2635
- let n = ht(s.doc, u.frontiers, t), { entries: r, groups: i } = s.history, a = _t(s.doc, r.slice(r.indexOf(u) + 1), [n, s.latest]), o = new Map(i.flatMap((e) => e.entries.map((t) => [t, e]))), c = In(n.value, s.latest.value).map((e) => {
2635
+ let n = gt(s.doc, l.frontiers, t), { entries: r, groups: i } = s.history, a = vt(s.doc, r.slice(r.indexOf(l) + 1), [n, s.latest]), o = new Map(i.flatMap((e) => e.entries.map((t) => [t, e]))), c = Ln(n.value, s.latest.value).map((e) => {
2636
2636
  if (e.kind === "equal") return e;
2637
- let t = [Rn(s.latest.ids, e.newIndex), Rn(n.ids, e.oldIndex)].map((e) => e && a.get(e)).find(Boolean);
2637
+ let t = [zn(s.latest.ids, e.newIndex), zn(n.ids, e.oldIndex)].map((e) => e && a.get(e)).find(Boolean);
2638
2638
  return t ? {
2639
2639
  ...e,
2640
2640
  author: t,
2641
2641
  group: o.get(t)
2642
2642
  } : e;
2643
2643
  });
2644
- e || (S(c), w(0), v(null));
2644
+ e || (S(c), te(0), v(null));
2645
2645
  } catch (t) {
2646
2646
  e || v(t.message);
2647
2647
  } finally {
@@ -2653,15 +2653,15 @@ function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
2653
2653
  };
2654
2654
  }, [
2655
2655
  s,
2656
- u,
2656
+ l,
2657
2657
  t
2658
2658
  ]), !a || !e) return null;
2659
- let k = x.filter((e) => e.kind !== "equal").length, A = {
2659
+ let O = x.filter((e) => e.kind !== "equal").length, k = {
2660
2660
  session: s,
2661
- selected: u,
2661
+ selected: l,
2662
2662
  blocks: x,
2663
- count: k,
2664
- changeIndex: te,
2663
+ count: O,
2664
+ changeIndex: ee,
2665
2665
  loading: h,
2666
2666
  error: _,
2667
2667
  pending: y,
@@ -2671,47 +2671,47 @@ function zn({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
2671
2671
  f.current = e, d(e), E(!1);
2672
2672
  },
2673
2673
  navigate: (e) => {
2674
- let t = Math.max(0, Math.min(k - 1, te + e));
2675
- w(t), (D.current?.querySelectorAll("[data-history-change]"))?.[t]?.scrollIntoView?.({
2674
+ let t = Math.max(0, Math.min(O - 1, ee + e));
2675
+ te(t), (re.current?.querySelectorAll("[data-history-change]"))?.[t]?.scrollIntoView?.({
2676
2676
  block: "center",
2677
2677
  behavior: "instant"
2678
2678
  });
2679
2679
  },
2680
- toggleOnly: () => ee((e) => !e),
2681
- showAll: () => ee(!1),
2682
- refresh: () => void O(),
2680
+ toggleOnly: () => w((e) => !e),
2681
+ showAll: () => w(!1),
2682
+ refresh: () => void D(),
2683
2683
  close: o
2684
2684
  };
2685
2685
  return {
2686
- content: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(ln, {
2687
- bodyRef: D,
2688
- model: A,
2686
+ content: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(un, {
2687
+ bodyRef: re,
2688
+ model: k,
2689
2689
  narrow: ne,
2690
2690
  theme: r,
2691
2691
  title: i,
2692
2692
  onPick: () => E(!0)
2693
- }), ne && T ? /* @__PURE__ */ K(an, {
2694
- model: A,
2693
+ }), ne && T ? /* @__PURE__ */ K(on, {
2694
+ model: k,
2695
2695
  onDismiss: () => E(!1)
2696
2696
  }) : null] }),
2697
- panel: ne ? null : /* @__PURE__ */ K(rn, { model: A })
2697
+ panel: ne ? null : /* @__PURE__ */ K(an, { model: k })
2698
2698
  };
2699
2699
  }
2700
2700
  // src/viewer/document/PhoneEditMenu.tsx
2701
- function Bn({ left: e, top: t, placement: n, canComment: r, canEdit: a, onComment: o, onEdit: s }) {
2702
- let l = U(null), u = [r ? {
2703
- label: d("common.comment"),
2704
- Icon: $e,
2705
- run: o,
2706
- primary: !0
2707
- } : null, a ? {
2708
- label: d("document.editText"),
2701
+ function Vn({ left: e, top: t, placement: n, canComment: r, canEdit: i, onComment: a, onEdit: s }) {
2702
+ let c = U(null), u = [r ? {
2703
+ label: f("common.comment"),
2709
2704
  Icon: et,
2705
+ run: a,
2706
+ primary: !0
2707
+ } : null, i ? {
2708
+ label: f("document.editText"),
2709
+ Icon: tt,
2710
2710
  run: s,
2711
2711
  primary: !1
2712
2712
  } : null].filter((e) => e !== null);
2713
- return Ke(() => {
2714
- i(l.current, [{
2713
+ return qe(() => {
2714
+ o(c.current, [{
2715
2715
  opacity: 0,
2716
2716
  transform: "scale(0.96)"
2717
2717
  }, {
@@ -2719,12 +2719,12 @@ function Bn({ left: e, top: t, placement: n, canComment: r, canEdit: a, onCommen
2719
2719
  transform: "none"
2720
2720
  }], {
2721
2721
  duration: 160,
2722
- easing: c
2722
+ easing: l
2723
2723
  });
2724
2724
  }, []), u.length === 0 ? null : /* @__PURE__ */ q("div", {
2725
2725
  "data-edit-menu": !0,
2726
2726
  "data-placement": n,
2727
- ref: l,
2727
+ ref: c,
2728
2728
  ...{
2729
2729
  0: { className: "x10l6tqk x1u8a7rm x78zum5 xdt5ytf x1cy8zhl" },
2730
2730
  1: { className: "x10l6tqk x1u8a7rm x78zum5 x1cy8zhl x3ieub6" }
@@ -2753,7 +2753,7 @@ function Bn({ left: e, top: t, placement: n, canComment: r, canEdit: a, onCommen
2753
2753
  });
2754
2754
  }
2755
2755
  // src/viewer/document/PhoneThread.tsx
2756
- var Vn = {
2756
+ var Hn = {
2757
2757
  state: {
2758
2758
  kmuXW: "x2lah0s",
2759
2759
  kGuDYH: "xfifm61",
@@ -2771,46 +2771,46 @@ var Vn = {
2771
2771
  kMwMTN: "xddlp02",
2772
2772
  $$css: !0
2773
2773
  }
2774
- }, Hn = (e) => new Date(e).toLocaleTimeString([], {
2774
+ }, Un = (e) => new Date(e).toLocaleTimeString([], {
2775
2775
  hour: "2-digit",
2776
2776
  minute: "2-digit"
2777
2777
  });
2778
- function Un({ thread: t, agent: n = "Agent", actions: i, active: a = !1, offline: c = !1 }) {
2779
- let l = e(t), u = t.status === "resolved", p = u ? {
2780
- label: d("common.resolved"),
2781
- tone: Vn.resolved
2778
+ function Wn({ thread: e, agent: t = "Agent", actions: r, active: i = !1, offline: o = !1 }) {
2779
+ let l = n(e), u = e.status === "resolved", d = u ? {
2780
+ label: f("common.resolved"),
2781
+ tone: Hn.resolved
2782
2782
  } : l === "agent" ? {
2783
- label: d("document.waitingAgentReply", { agent: n }),
2784
- tone: Vn.waitingAgent
2783
+ label: f("document.waitingAgentReply", { agent: t }),
2784
+ tone: Hn.waitingAgent
2785
2785
  } : l === "human" ? {
2786
- label: d("document.agentReplied", { agent: n }),
2787
- tone: Vn.answered
2786
+ label: f("document.agentReplied", { agent: t }),
2787
+ tone: Hn.answered
2788
2788
  } : null;
2789
2789
  return /* @__PURE__ */ q("div", {
2790
- "data-thread": t.id,
2790
+ "data-thread": e.id,
2791
2791
  ...{
2792
2792
  0: { className: "xxlmvz2 x178xt8z x13fuv20 xxu5053 xqfszdh xo2rkog" },
2793
2793
  1: { className: "xxlmvz2 x178xt8z x13fuv20 xxu5053 xqfszdh xo2rkog xggygye" }
2794
- }[!!a | 0],
2794
+ }[!!i | 0],
2795
2795
  children: [
2796
2796
  /* @__PURE__ */ q("div", {
2797
2797
  className: "x78zum5 x1pha0wt x167g77z x1lqa7cf x1vo0akb x19ypqd9 x1o5kxid x4z9k3i",
2798
2798
  children: [/* @__PURE__ */ K("span", {
2799
2799
  className: "x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv x1bo0w0s",
2800
- children: O(t.anchor)
2801
- }), p ? /* @__PURE__ */ K("span", {
2802
- ...f(Vn.state, p.tone),
2803
- children: p.label
2800
+ children: O(e.anchor)
2801
+ }), d ? /* @__PURE__ */ K("span", {
2802
+ ...p(Hn.state, d.tone),
2803
+ children: d.label
2804
2804
  }) : null]
2805
2805
  }),
2806
- u && !a ? null : t.messages.map((e) => {
2807
- let { label: t, initial: n } = o(e);
2806
+ u && !i ? null : e.messages.map((e) => {
2807
+ let { label: t, initial: n } = s(e);
2808
2808
  return /* @__PURE__ */ q("div", {
2809
2809
  className: "x14vqqas",
2810
2810
  children: [/* @__PURE__ */ q("div", {
2811
2811
  className: "x78zum5 x6s0dn4 x167g77z x4z9k3i x1s688f",
2812
2812
  children: [
2813
- /* @__PURE__ */ K(s, {
2813
+ /* @__PURE__ */ K(c, {
2814
2814
  human: e.author === "human",
2815
2815
  initial: n,
2816
2816
  name: e.name,
@@ -2819,7 +2819,7 @@ function Un({ thread: t, agent: n = "Agent", actions: i, active: a = !1, offline
2819
2819
  t,
2820
2820
  /* @__PURE__ */ K("span", {
2821
2821
  className: "xddlp02 xo1l8bm xfifm61",
2822
- children: Hn(e.editedAt ?? e.at)
2822
+ children: Un(e.editedAt ?? e.at)
2823
2823
  })
2824
2824
  ]
2825
2825
  }), /* @__PURE__ */ K("div", {
@@ -2827,65 +2827,65 @@ function Un({ thread: t, agent: n = "Agent", actions: i, active: a = !1, offline
2827
2827
  0: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe" },
2828
2828
  1: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe xc7n51q" }
2829
2829
  }[!!e.deleted | 0],
2830
- children: e.deleted ? d("common.deleted") : e.text
2830
+ children: e.deleted ? f("common.deleted") : e.text
2831
2831
  })]
2832
2832
  }, e.id);
2833
2833
  }),
2834
- i ? /* @__PURE__ */ q("div", {
2834
+ r ? /* @__PURE__ */ q("div", {
2835
2835
  className: "x78zum5 x6s0dn4 xou54vl x1anpbxc xxpkpgd",
2836
2836
  children: [u ? null : /* @__PURE__ */ K("div", {
2837
2837
  className: "x98rzlu xeuugli x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
2838
- children: /* @__PURE__ */ K(r, {
2839
- placeholder: d("common.reply"),
2840
- onSubmit: (e) => i.reply(t.id, e)
2838
+ children: /* @__PURE__ */ K(a, {
2839
+ placeholder: f("common.reply"),
2840
+ onSubmit: (t) => r.reply(e.id, t)
2841
2841
  })
2842
- }), c ? null : /* @__PURE__ */ K("button", {
2842
+ }), o ? null : /* @__PURE__ */ K("button", {
2843
2843
  type: "button",
2844
- onClick: () => u ? i.reopen(t.id) : i.resolve(t.id),
2844
+ onClick: () => u ? r.reopen(e.id) : r.resolve(e.id),
2845
2845
  className: "x2lah0s x1gg8mnh xt970qd xdqyycr x1w5wx5t xc342km xjbqb8w x1bo0w0s xqfszdh x4z9k3i x1ypdohk",
2846
- children: d(u ? "common.reopen" : "common.resolve")
2846
+ children: f(u ? "common.reopen" : "common.resolve")
2847
2847
  })]
2848
2848
  }) : null
2849
2849
  ]
2850
2850
  });
2851
2851
  }
2852
- var Wn = .5, Gn = (e) => e === 78 ? Wn : e;
2853
- function Kn({ threads: t, agent: n = "Agent", actions: a, offline: o, draft: s, onCreate: l, onCancelDraft: u, activeId: f, snap: p, onSnap: m }) {
2854
- let h = U(null), g = t.filter((e) => !e.messages.every((e) => e.deleted)), v = g.filter((t) => e(t) === "agent").length, y = o ? d("document.offlineNoComments") : v > 0 ? d("document.waitingCount", {
2855
- count: v,
2856
- agent: n
2852
+ var Gn = .5, Kn = (e) => e === 78 ? Gn : e;
2853
+ function qn({ threads: e, agent: t = "Agent", actions: r, offline: i, draft: s, onCreate: c, onCancelDraft: u, activeId: d, snap: p, onSnap: m }) {
2854
+ let h = U(null), g = e.filter((e) => !e.messages.every((e) => e.deleted)), _ = g.filter((e) => n(e) === "agent").length, y = i ? f("document.offlineNoComments") : _ > 0 ? f("document.waitingCount", {
2855
+ count: _,
2856
+ agent: t
2857
2857
  }) : null;
2858
2858
  return V(() => {
2859
- let e = f ? h.current?.querySelector(`[data-thread="${CSS.escape(f)}"]`) : null, t = e?.closest("[data-sheet-body]");
2859
+ let e = d ? h.current?.querySelector(`[data-thread="${CSS.escape(d)}"]`) : null, t = e?.closest("[data-sheet-body]");
2860
2860
  e && t && (t.scrollTo({
2861
2861
  top: t.scrollTop + e.getBoundingClientRect().top - t.getBoundingClientRect().top - 8,
2862
2862
  behavior: "smooth"
2863
- }), i(e, [{ backgroundColor: x.warningChip }, { backgroundColor: "transparent" }], {
2863
+ }), o(e, [{ backgroundColor: S.warningChip }, { backgroundColor: "transparent" }], {
2864
2864
  duration: 600,
2865
2865
  delay: 250,
2866
- easing: c
2866
+ easing: l
2867
2867
  }));
2868
- }, [f]), /* @__PURE__ */ K(_, {
2868
+ }, [d]), /* @__PURE__ */ K(v, {
2869
2869
  snap: p,
2870
2870
  snaps: [
2871
2871
  78,
2872
- Wn,
2872
+ Gn,
2873
2873
  1
2874
2874
  ],
2875
2875
  header: /* @__PURE__ */ q("span", {
2876
2876
  className: "x78zum5 x1pha0wt x17d4w8g xu0aao5 x17qtykl xwib8y2 xqfszdh x1jvydc1 x1s688f",
2877
- children: [d("document.sheetComments", { count: g.length }), y ? /* @__PURE__ */ q("span", {
2877
+ children: [f("document.sheetComments", { count: g.length }), y ? /* @__PURE__ */ q("span", {
2878
2878
  className: "xddlp02 xfifm61 xo1l8bm",
2879
2879
  children: ["· ", y]
2880
2880
  }) : null]
2881
2881
  }),
2882
- onScrim: () => m(Wn),
2882
+ onScrim: () => m(Gn),
2883
2883
  onSnap: m,
2884
2884
  children: /* @__PURE__ */ q("div", {
2885
2885
  ref: h,
2886
2886
  className: "x17qtykl xwxc41k",
2887
2887
  children: [
2888
- s && a ? /* @__PURE__ */ q("div", {
2888
+ s && r ? /* @__PURE__ */ q("div", {
2889
2889
  className: "x10dr8xq xqfszdh",
2890
2890
  children: [/* @__PURE__ */ q("div", {
2891
2891
  className: "x78zum5 x1pha0wt x167g77z x4z9k3i",
@@ -2896,26 +2896,26 @@ function Kn({ threads: t, agent: n = "Agent", actions: a, offline: o, draft: s,
2896
2896
  type: "button",
2897
2897
  onClick: u,
2898
2898
  className: "x1717udv xc342km xjbqb8w xddlp02 x4z9k3i x1ypdohk",
2899
- children: d("common.cancel")
2899
+ children: f("common.cancel")
2900
2900
  })]
2901
2901
  }), /* @__PURE__ */ K("div", {
2902
2902
  className: "x1xmf6yo x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
2903
- children: /* @__PURE__ */ K(r, {
2903
+ children: /* @__PURE__ */ K(a, {
2904
2904
  autoFocus: !0,
2905
- placeholder: d("document.agentPlaceholder"),
2906
- onSubmit: (e) => l(s, e).then((e) => (e && u(), e))
2905
+ placeholder: f("document.agentPlaceholder"),
2906
+ onSubmit: (e) => c(s, e).then((e) => (e && u(), e))
2907
2907
  })
2908
2908
  })]
2909
2909
  }) : null,
2910
2910
  g.length === 0 && !s ? /* @__PURE__ */ K("div", {
2911
2911
  className: "xr9q8rw xddlp02 xqfszdh x4z9k3i x2b8uid",
2912
- children: d("document.noComments")
2912
+ children: f("document.noComments")
2913
2913
  }) : null,
2914
- g.map((e) => /* @__PURE__ */ K(Un, {
2915
- actions: a,
2916
- active: e.id === f,
2917
- agent: n,
2918
- offline: o,
2914
+ g.map((e) => /* @__PURE__ */ K(Wn, {
2915
+ actions: r,
2916
+ active: e.id === d,
2917
+ agent: t,
2918
+ offline: i,
2919
2919
  thread: e
2920
2920
  }, e.id))
2921
2921
  ]
@@ -2923,11 +2923,11 @@ function Kn({ threads: t, agent: n = "Agent", actions: a, offline: o, draft: s,
2923
2923
  });
2924
2924
  }
2925
2925
  // src/viewer/document/PhoneLayout.tsx
2926
- var qn = 52;
2927
- function Jn({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdit: a, offline: o, selection: s, clearSelection: c, onCreate: l, onEdit: u, onMain: d, history: f, children: p }) {
2928
- let [m, h] = W(null), [g, _] = W(null), [y, b] = W(78), [x, S] = W(null), C = Ne(e, t, m);
2929
- ve(C, t, g), he(x?.range ?? null, x?.elements);
2930
- let ee = () => {
2926
+ var Jn = 52;
2927
+ function Yn({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdit: a, offline: o, selection: s, clearSelection: c, onCreate: l, onEdit: u, onMain: d, history: f, children: p }) {
2928
+ let [m, h] = W(null), [g, _] = W(null), [v, b] = W(78), [x, S] = W(null), C = Pe(e, t, m);
2929
+ ye(C, t, g), ge(x?.range ?? null, x?.elements);
2930
+ let w = () => {
2931
2931
  window.getSelection()?.removeAllRanges(), c();
2932
2932
  };
2933
2933
  return /* @__PURE__ */ q("main", {
@@ -2938,27 +2938,27 @@ function Jn({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
2938
2938
  children: [
2939
2939
  /* @__PURE__ */ q("article", {
2940
2940
  onClick: (e) => {
2941
- let t = we(C, e.clientX, e.clientY);
2942
- _(t), t && b(Gn);
2941
+ let t = Te(C, e.clientX, e.clientY);
2942
+ _(t), t && b(Kn);
2943
2943
  },
2944
2944
  children: [f?.content, /* @__PURE__ */ K("div", {
2945
2945
  hidden: !!f,
2946
2946
  children: p
2947
2947
  })]
2948
2948
  }),
2949
- s && !x && !f ? /* @__PURE__ */ K(Bn, {
2949
+ s && !x && !f ? /* @__PURE__ */ K(Vn, {
2950
2950
  ...M(s, {
2951
2951
  left: 8,
2952
2952
  right: (m?.clientWidth ?? 0) - 8
2953
2953
  }, 170, 44, {
2954
2954
  top: m?.getBoundingClientRect().top ?? 0,
2955
2955
  height: window.innerHeight,
2956
- reserved: v(y, window.innerHeight - qn)
2956
+ reserved: y(v, window.innerHeight - Jn)
2957
2957
  }),
2958
2958
  canComment: i,
2959
2959
  canEdit: a && s.kind !== "block",
2960
2960
  onComment: () => {
2961
- S(s), b(Wn), ee();
2961
+ S(s), b(Gn), w();
2962
2962
  },
2963
2963
  onEdit: () => {
2964
2964
  u(s), c();
@@ -2967,13 +2967,13 @@ function Jn({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
2967
2967
  /* @__PURE__ */ K("div", {
2968
2968
  hidden: !!f,
2969
2969
  className: "xixxii4 x1ozmhy9 xu96u03 x3m8u43 x1ey2m1c x1355qak x47corl",
2970
- children: /* @__PURE__ */ K(Kn, {
2970
+ children: /* @__PURE__ */ K(qn, {
2971
2971
  actions: n,
2972
2972
  activeId: g,
2973
2973
  agent: r,
2974
2974
  draft: x,
2975
2975
  offline: o,
2976
- snap: y,
2976
+ snap: v,
2977
2977
  threads: t,
2978
2978
  onCancelDraft: () => S(null),
2979
2979
  onCreate: l,
@@ -2984,25 +2984,25 @@ function Jn({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
2984
2984
  });
2985
2985
  }
2986
2986
  // src/viewer/document/TopBar.tsx
2987
- function Yn({ id: e, title: n, activity: r, agentSection: i, offline: a, openComments: o, cloud: s, compact: c = !1, onDone: l, actions: f, agent: p = "Agent", history: m }) {
2988
- let h = at(r, p, i);
2989
- return u(e, s ? {
2987
+ function Xn({ id: e, title: n, activity: i, agentSection: a, offline: o, openComments: s, cloud: c, compact: l = !1, onDone: u, actions: d, agent: p = "Agent", history: m }) {
2988
+ let h = ot(i, p, a);
2989
+ return r(e, c ? {
2990
2990
  ...n ? { title: n } : {},
2991
- online: s.online,
2992
- comments: o,
2991
+ online: c.online,
2992
+ comments: s,
2993
2993
  activity: h,
2994
- activityTone: r.kind === "stale" ? "warning" : r.kind === "working" ? "quiet" : "live",
2995
- retrying: a,
2996
- reason: s.reason,
2994
+ activityTone: i.kind === "stale" ? "warning" : i.kind === "working" ? "quiet" : "live",
2995
+ retrying: o,
2996
+ reason: c.reason,
2997
2997
  history: m?.available,
2998
2998
  historyOpen: m?.open
2999
- } : null) && !c ? null : /* @__PURE__ */ q("header", {
2999
+ } : null) && !l ? null : /* @__PURE__ */ q("header", {
3000
3000
  ...{
3001
3001
  0: { className: "x7wzq59 x13vifvy x1n327nk xdd8jsf x78zum5 x6s0dn4 x1v2ro7d x4l9tsp x1rozbrz xqfszdh" },
3002
3002
  1: { className: "x7wzq59 x13vifvy x1n327nk xdd8jsf x78zum5 x6s0dn4 x1rozbrz xqfszdh x1hr3lfm x883omv" }
3003
- }[!!c | 0],
3003
+ }[!!l | 0],
3004
3004
  children: [
3005
- c ? null : /* @__PURE__ */ q("span", {
3005
+ l ? null : /* @__PURE__ */ q("span", {
3006
3006
  className: "xddlp02 xfifm61 xuxw1ft",
3007
3007
  children: ["document / ", /* @__PURE__ */ K("span", {
3008
3008
  className: "xo2rkog x1s688f",
@@ -3015,58 +3015,58 @@ function Yn({ id: e, title: n, activity: r, agentSection: i, offline: a, openCom
3015
3015
  2: { className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xahzvm9 x1bo0w0s" },
3016
3016
  1: { className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xqdcvd7 x7zghnd" },
3017
3017
  3: { className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xqdcvd7 x7zghnd" }
3018
- }[(r.kind === "working") << 1 | r.kind === "stale"],
3019
- children: [r.kind === "stale" ? null : /* @__PURE__ */ K("i", { className: "x1v4s8kt xols6we x16rqkct xtwfq29" }), h]
3018
+ }[(i.kind === "working") << 1 | i.kind === "stale"],
3019
+ children: [i.kind === "stale" ? null : /* @__PURE__ */ K("i", { className: "x1v4s8kt xols6we x16rqkct xtwfq29" }), h]
3020
3020
  }) : null,
3021
- a ? /* @__PURE__ */ K("span", {
3021
+ o ? /* @__PURE__ */ K("span", {
3022
3022
  className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xqdcvd7 x7zghnd",
3023
- children: d("document.notSynced")
3023
+ children: f("document.notSynced")
3024
3024
  }) : null,
3025
3025
  m?.open ? /* @__PURE__ */ q("span", {
3026
3026
  className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xahzvm9 x1bo0w0s",
3027
- children: [/* @__PURE__ */ K(Qe, {
3027
+ children: [/* @__PURE__ */ K($e, {
3028
3028
  "aria-hidden": "true",
3029
3029
  size: 11
3030
- }), d("document.readOnlyHistory")]
3030
+ }), f("document.readOnlyHistory")]
3031
3031
  }) : null,
3032
- s?.reason && !c ? /* @__PURE__ */ K("span", {
3032
+ c?.reason && !l ? /* @__PURE__ */ K("span", {
3033
3033
  className: "xb3r6kr xddlp02 xfifm61 xuxw1ft xlyipyv",
3034
- children: s.reason
3034
+ children: c.reason
3035
3035
  }) : null,
3036
3036
  /* @__PURE__ */ K("span", { className: "x98rzlu" }),
3037
- s ? /* @__PURE__ */ q("span", {
3037
+ c ? /* @__PURE__ */ q("span", {
3038
3038
  className: "x78zum5 x6s0dn4 x17d4w8g x1bo0w0s xfifm61 xuxw1ft",
3039
3039
  children: [/* @__PURE__ */ K("i", { ...{
3040
3040
  0: { className: "xci0xqf x1hagigm x16rqkct xxwmxtg" },
3041
3041
  1: { className: "xci0xqf x1hagigm x16rqkct xux1nz0" }
3042
- }[!!s.online | 0] }), s.online ? d("share.computerOnline") : d("share.computerOffline")]
3042
+ }[!!c.online | 0] }), c.online ? f("share.computerOnline") : f("share.computerOffline")]
3043
3043
  }) : null,
3044
3044
  m ? /* @__PURE__ */ K(t, {
3045
3045
  available: m.available,
3046
- comments: o,
3046
+ comments: s,
3047
3047
  open: m.open,
3048
3048
  onComments: m.close,
3049
3049
  onHistory: m.toggle
3050
3050
  }) : null,
3051
- l ? /* @__PURE__ */ K("button", {
3051
+ u ? /* @__PURE__ */ K("button", {
3052
3052
  type: "button",
3053
- onClick: l,
3053
+ onClick: u,
3054
3054
  className: "x12ulsxz xaope02 xc342km x1kogg8i x19ckca5 xs0jrwl xqfszdh x4z9k3i x1s688f x1ypdohk",
3055
- children: d("common.done")
3056
- }) : s || c ? null : f
3055
+ children: f("common.done")
3056
+ }) : c || l ? null : d
3057
3057
  ]
3058
3058
  });
3059
3059
  }
3060
3060
  // src/viewer/document/selectionContext.ts
3061
- function Xn(e, t, n) {
3061
+ function Zn(e, t, n) {
3062
3062
  let [r, i] = t <= n ? [t, n] : [n, t];
3063
3063
  return {
3064
- blockIds: e.slice(r, i + 1).flatMap((e) => e.id ? [e.id] : []).slice(0, y.blockIds),
3064
+ blockIds: e.slice(r, i + 1).flatMap((e) => e.id ? [e.id] : []).slice(0, b.blockIds),
3065
3065
  heading: e.slice(0, r + 1).filter((e) => e.heading).pop()?.text ?? ""
3066
3066
  };
3067
3067
  }
3068
3068
  // src/viewer/document/textSelection.ts
3069
- function Zn(e, t) {
3069
+ function Qn(e, t) {
3070
3070
  return L().getChildren().flatMap((n) => {
3071
3071
  let r = I(n, R), i = e.getElementByKey(n.getKey());
3072
3072
  if (!r || !i || !t.intersectsNode(i)) return [];
@@ -3083,65 +3083,65 @@ function Zn(e, t) {
3083
3083
  });
3084
3084
  }
3085
3085
  // src/viewer/document/useDocumentSelectionSync.ts
3086
- var Qn = crypto.randomUUID(), $n = 300, er = {
3086
+ var $n = crypto.randomUUID(), er = 300, tr = {
3087
3087
  quote: "",
3088
3088
  blockIds: [],
3089
3089
  heading: ""
3090
3090
  };
3091
- function tr(e) {
3091
+ function nr(e) {
3092
3092
  let t = e.read(() => {
3093
- let e = be();
3094
- if (!De(e)) return null;
3093
+ let e = xe();
3094
+ if (!Oe(e)) return null;
3095
3095
  let t = L().getChildren(), n = t.filter((t) => e.has(t.getKey()));
3096
3096
  if (!n.length) return null;
3097
- let r = t.indexOf(n[0]), { heading: i } = Xn(t.map((e) => ({
3097
+ let r = t.indexOf(n[0]), { heading: i } = Zn(t.map((e) => ({
3098
3098
  id: I(e, R),
3099
3099
  heading: e.getType() === "heading",
3100
3100
  text: e.getTextContent()
3101
3101
  })), r, r);
3102
3102
  return {
3103
- heading: i.slice(0, y.heading),
3104
- blockIds: n.map((e) => I(e, R)).filter(Boolean).slice(0, y.blockIds),
3105
- quote: n.map((e) => e.getTextContent()).join("\n\n").slice(0, y.quote)
3103
+ heading: i.slice(0, b.heading),
3104
+ blockIds: n.map((e) => I(e, R)).filter(Boolean).slice(0, b.blockIds),
3105
+ quote: n.map((e) => e.getTextContent()).join("\n\n").slice(0, b.quote)
3106
3106
  };
3107
3107
  });
3108
3108
  if (t) return t;
3109
3109
  let n = window.getSelection(), r = e.getRootElement();
3110
- if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return er;
3111
- let i = n.toString().trim().slice(0, y.quote);
3110
+ if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return tr;
3111
+ let i = n.toString().trim().slice(0, b.quote);
3112
3112
  return i ? e.read(() => {
3113
- let t = L().getChildren(), r = Zn(e, n.getRangeAt(0));
3113
+ let t = L().getChildren(), r = Qn(e, n.getRangeAt(0));
3114
3114
  if (!r.length) return {
3115
- ...er,
3115
+ ...tr,
3116
3116
  quote: i
3117
3117
  };
3118
- let a = t.findIndex((e) => I(e, R) === r[0].blockId), { heading: o } = Xn(t.map((e) => ({
3118
+ let a = t.findIndex((e) => I(e, R) === r[0].blockId), { heading: o } = Zn(t.map((e) => ({
3119
3119
  id: I(e, R) || "",
3120
3120
  heading: e.getType() === "heading",
3121
- text: e.getTextContent().slice(0, y.heading)
3121
+ text: e.getTextContent().slice(0, b.heading)
3122
3122
  })), a, a);
3123
3123
  return {
3124
3124
  quote: i,
3125
3125
  heading: o,
3126
- blockIds: r.map((e) => e.blockId).slice(0, y.blockIds)
3126
+ blockIds: r.map((e) => e.blockId).slice(0, b.blockIds)
3127
3127
  };
3128
- }) : er;
3128
+ }) : tr;
3129
3129
  }
3130
- function nr(e, t, n, r) {
3131
- let i = U(er);
3130
+ function rr(e, t, n, r) {
3131
+ let i = U(tr);
3132
3132
  V(() => {
3133
3133
  if (!e) return;
3134
3134
  let n = 0, a = () => {
3135
- let n = tr(e);
3135
+ let n = nr(e);
3136
3136
  JSON.stringify(n) !== JSON.stringify(i.current) && (i.current = n, r({
3137
3137
  type: "selection",
3138
3138
  artifact: t,
3139
- tab: Qn,
3139
+ tab: $n,
3140
3140
  human: !0,
3141
3141
  ...n
3142
3142
  }));
3143
3143
  }, o = () => {
3144
- clearTimeout(n), n = window.setTimeout(a, $n);
3144
+ clearTimeout(n), n = window.setTimeout(a, er);
3145
3145
  };
3146
3146
  document.addEventListener("selectionchange", o);
3147
3147
  let s = e.registerUpdateListener(o);
@@ -3156,7 +3156,7 @@ function nr(e, t, n, r) {
3156
3156
  n && (i.current.quote || i.current.blockIds.length) && r({
3157
3157
  type: "selection",
3158
3158
  artifact: t,
3159
- tab: Qn,
3159
+ tab: $n,
3160
3160
  human: !1,
3161
3161
  ...i.current
3162
3162
  });
@@ -3167,28 +3167,28 @@ function nr(e, t, n, r) {
3167
3167
  ]);
3168
3168
  }
3169
3169
  // src/viewer/document/usePendingBlocks.ts
3170
- var rr = {
3170
+ var ir = {
3171
3171
  count: 0,
3172
3172
  firstKey: null
3173
- }, ir = (e) => e.read(() => {
3173
+ }, ar = (e) => e.read(() => {
3174
3174
  let e = L().getChildren().filter((e) => e.getType() === "pending").map((e) => e.getKey());
3175
3175
  return {
3176
3176
  count: e.length,
3177
3177
  firstKey: e[0] ?? null
3178
3178
  };
3179
3179
  });
3180
- function ar(e) {
3181
- let [t, n] = W(rr);
3180
+ function or(e) {
3181
+ let [t, n] = W(ir);
3182
3182
  return V(() => {
3183
3183
  if (!e) {
3184
- n(rr);
3184
+ n(ir);
3185
3185
  return;
3186
3186
  }
3187
3187
  let t = (e) => n((t) => t.count === e.count && t.firstKey === e.firstKey ? t : e);
3188
- return t(ir(e.getEditorState())), e.registerUpdateListener(({ editorState: e }) => t(ir(e)));
3188
+ return t(ar(e.getEditorState())), e.registerUpdateListener(({ editorState: e }) => t(ar(e)));
3189
3189
  }, [e]), t;
3190
3190
  }
3191
- function or(e, t = 15e3) {
3191
+ function sr(e, t = 15e3) {
3192
3192
  let [n, r] = W(() => Date.now());
3193
3193
  return V(() => {
3194
3194
  if (!e) return;
@@ -3198,15 +3198,15 @@ function or(e, t = 15e3) {
3198
3198
  }, [e, t]), n;
3199
3199
  }
3200
3200
  // src/viewer/document/useSelectionComment.ts
3201
- var sr = 200;
3202
- function cr(e, t) {
3201
+ var cr = 200;
3202
+ function lr(e, t) {
3203
3203
  let [n, r] = W(null);
3204
3204
  return V(() => {
3205
3205
  if (!e || !t) return;
3206
3206
  let n = 0, i = () => {
3207
3207
  let n = e.read(() => {
3208
- let t = be();
3209
- return De(t) ? L().getChildren().flatMap((n) => {
3208
+ let t = xe();
3209
+ return Oe(t) ? L().getChildren().flatMap((n) => {
3210
3210
  if (!t.has(n.getKey())) return [];
3211
3211
  let r = I(n, R), i = e.getElementByKey(n.getKey());
3212
3212
  return r && i ? [{
@@ -3236,7 +3236,7 @@ function cr(e, t) {
3236
3236
  r(null);
3237
3237
  return;
3238
3238
  }
3239
- let o = i.toString().trim(), s = i.getRangeAt(0), c = e.read(() => Zn(e, s));
3239
+ let o = i.toString().trim(), s = i.getRangeAt(0), c = e.read(() => Qn(e, s));
3240
3240
  if (!c.length || !o) {
3241
3241
  r(null);
3242
3242
  return;
@@ -3256,7 +3256,7 @@ function cr(e, t) {
3256
3256
  range: s.cloneRange()
3257
3257
  });
3258
3258
  }, a = () => {
3259
- clearTimeout(n), n = window.setTimeout(i, sr);
3259
+ clearTimeout(n), n = window.setTimeout(i, cr);
3260
3260
  };
3261
3261
  document.addEventListener("selectionchange", a);
3262
3262
  let o = e.registerUpdateListener(a);
@@ -3266,139 +3266,139 @@ function cr(e, t) {
3266
3266
  clearTimeout(n), document.removeEventListener("selectionchange", a), o(), window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a), s.disconnect();
3267
3267
  };
3268
3268
  }, [e, t]), [n, B(() => {
3269
- r(null), e?.read(() => De(be())) && e.update(() => Pe(null));
3269
+ r(null), e?.read(() => Oe(xe())) && e.update(() => Fe(null));
3270
3270
  }, [e])];
3271
3271
  }
3272
3272
  // src/viewer/document/DocumentView.tsx
3273
- var lr = [...N.filter((e) => !ue.some((t) => t.getType() === ("getType" in e ? e.getType() : e.replace.getType()))), ...ue];
3274
- function ur() {
3273
+ var ur = [...N.filter((e) => !de.some((t) => t.getType() === ("getType" in e ? e.getType() : e.replace.getType()))), ...de];
3274
+ function dr() {
3275
3275
  let e = H(() => window.matchMedia("(prefers-color-scheme: dark)"), []), [t, n] = W(e.matches);
3276
3276
  return V(() => {
3277
3277
  let t = () => n(e.matches);
3278
3278
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
3279
3279
  }, [e]), t;
3280
3280
  }
3281
- function dr(e) {
3281
+ function fr(e) {
3282
3282
  V(() => {
3283
3283
  if (!e) return;
3284
3284
  let t = document.createElement("base");
3285
3285
  return t.href = e, document.head.prepend(t), () => t.remove();
3286
3286
  }, [e]);
3287
3287
  }
3288
- var fr = {
3288
+ var pr = {
3289
3289
  playing: !1,
3290
3290
  section: null
3291
3291
  };
3292
- function pr({ id: e, transport: t, live: r, cloud: i, fallback: o, actions: s }) {
3293
- let [c, u] = W(null), [f, p] = W(null), [m, g] = W(a), [_, v] = W(null), [y, x] = W(!1), [S, C] = W(void 0), [ee, te] = W(0), w = B((e) => {
3292
+ function mr({ id: t, transport: n, live: r, cloud: a, fallback: o, actions: s }) {
3293
+ let [c, l] = W(null), [p, m] = W(null), [h, _] = W(e), [v, y] = W(null), [b, S] = W(!1), [C, w] = W(void 0), [ee, te] = W(0), T = B((e) => {
3294
3294
  e !== void 0 && te(e - Date.now());
3295
- }, []), [T, E] = W(fr), [ne, D] = W(!1), [O, k] = W(!1), A = !i || i.online && !ne, j = O && A;
3295
+ }, []), [E, ne] = W(pr), [re, D] = W(!1), [O, k] = W(!1), A = !a || a.online && !re, j = O && A;
3296
3296
  V(() => {
3297
3297
  A || k(!1);
3298
3298
  }, [A]), V(() => {
3299
- if (!i) return;
3300
- let t = (t) => {
3301
- t.source === window.parent && t.origin === location.origin && t.data?.type === "ryugi:document-history" && t.data.id === e && (t.data.action === "close" ? k(!1) : t.data.action === "toggle" && A && k((e) => !e));
3299
+ if (!a) return;
3300
+ let e = (e) => {
3301
+ d(e) && e.data?.type === "ryugi:document-history" && e.data.id === t && (e.data.action === "close" ? k(!1) : e.data.action === "toggle" && A && k((e) => !e));
3302
3302
  };
3303
- return window.addEventListener("message", t), () => window.removeEventListener("message", t);
3303
+ return window.addEventListener("message", e), () => window.removeEventListener("message", e);
3304
3304
  }, [
3305
- e,
3306
- i,
3305
+ t,
3306
+ a,
3307
3307
  A
3308
3308
  ]);
3309
- let [M, re] = W(null), [ae, oe] = W(null), se = ur(), { artifact: N, channel: P } = t, ce = !i || i.online, F = !i || i.canEdit, le = l(n), [ue, de] = W(!1), pe = le ? ue && F : F, I = B(async () => {
3310
- let e = await t.meta();
3311
- e && u(e);
3312
- }, [t]), he = o != null;
3309
+ let [M, ie] = W(null), [oe, se] = W(null), ce = dr(), { artifact: N, channel: P } = n, le = !a || a.online, F = !a || a.canEdit, ue = u(i), [de, fe] = W(!1), me = ue ? de && F : F, I = B(async () => {
3310
+ let e = await n.meta();
3311
+ e && l(e);
3312
+ }, [n]), ge = o != null;
3313
3313
  V(() => {
3314
- let e = !1;
3314
+ let t = !1;
3315
3315
  return (async () => {
3316
3316
  try {
3317
3317
  await I();
3318
- let n = await t.state();
3319
- if (e) return;
3320
- let r = new ie();
3321
- r.setRecordTimestamp(!0), r.setChangeMergeInterval(20), r.import(fe(n.snapshot)), x(!!n.streaming), C(n.agentActiveAt), w(n.now), g(n.comments ?? a());
3322
- let i = he ? {
3318
+ let r = await n.state();
3319
+ if (t) return;
3320
+ let i = new ae();
3321
+ i.setRecordTimestamp(!0), i.setChangeMergeInterval(20), i.import(pe(r.snapshot)), S(!!r.streaming), w(r.agentActiveAt), T(r.now), _(r.comments ?? e());
3322
+ let a = ge ? {
3323
3323
  left: window.scrollX,
3324
3324
  top: window.scrollY,
3325
3325
  behavior: "instant"
3326
3326
  } : null;
3327
- p(r), i && requestAnimationFrame(() => {
3328
- e || window.scrollTo(i);
3327
+ m(i), a && requestAnimationFrame(() => {
3328
+ t || window.scrollTo(a);
3329
3329
  });
3330
- } catch (t) {
3331
- e || v(t.message);
3330
+ } catch (e) {
3331
+ t || y(e.message);
3332
3332
  }
3333
3333
  })(), () => {
3334
- e = !0;
3334
+ t = !0;
3335
3335
  };
3336
3336
  }, [
3337
- t,
3337
+ n,
3338
3338
  I,
3339
- w,
3340
- he
3339
+ T,
3340
+ ge
3341
3341
  ]), V(() => P.subscribe((e) => {
3342
- e.type === "change" ? I() : e.type === "doc-status" ? (x(e.streaming), C(e.agentActiveAt), w(e.now)) : e.type === "doc-comments" && g(e.comments);
3342
+ e.type === "change" ? I() : e.type === "doc-status" ? (S(e.streaming), w(e.agentActiveAt), T(e.now)) : e.type === "doc-comments" && _(e.comments);
3343
3343
  }), [
3344
3344
  P,
3345
3345
  I,
3346
- w
3346
+ T
3347
3347
  ]), V(() => {
3348
- M?.setEditable(pe && !j);
3348
+ M?.setEditable(me && !j);
3349
3349
  }, [
3350
3350
  M,
3351
- pe,
3351
+ me,
3352
3352
  j
3353
3353
  ]), V(() => {
3354
- F || de(!1);
3354
+ F || fe(!1);
3355
3355
  }, [F]);
3356
- let ge = B((e) => {
3357
- x(!!e.streaming), C(e.agentActiveAt), w(e.now), e.comments && g(e.comments);
3358
- }, [w]);
3359
- dr(c?.contentBase), nr(M, N, r && !j, t.send);
3356
+ let _e = B((e) => {
3357
+ S(!!e.streaming), w(e.agentActiveAt), T(e.now), e.comments && _(e.comments);
3358
+ }, [T]);
3359
+ fr(c?.contentBase), rr(M, N, r && !j, n.send);
3360
3360
  let L = H(() => ({
3361
3361
  artifact: N,
3362
3362
  contentBase: c?.contentBase ?? "",
3363
3363
  channel: P,
3364
- send: t.send
3364
+ send: n.send
3365
3365
  }), [
3366
3366
  N,
3367
3367
  c?.contentBase,
3368
3368
  P,
3369
- t
3369
+ n
3370
3370
  ]);
3371
3371
  V(() => {
3372
- document.title = c?.title || e;
3373
- }, [c?.title, e]), h("document");
3374
- let _e = ar(M), ve = or(_e.count > 0 && !y), R = rt({
3375
- editing: T.playing || y,
3376
- pending: _e.count,
3377
- agentActiveAt: S,
3378
- now: ve + ee
3379
- }), be = c?.agent ?? "Agent", xe = H(() => ({
3380
- nextKey: _e.firstKey,
3381
- agent: be,
3372
+ document.title = c?.title || t;
3373
+ }, [c?.title, t]), g("document");
3374
+ let ve = or(M), ye = sr(ve.count > 0 && !b), R = it({
3375
+ editing: E.playing || b,
3376
+ pending: ve.count,
3377
+ agentActiveAt: C,
3378
+ now: ye + ee
3379
+ }), xe = c?.agent ?? "Agent", Se = H(() => ({
3380
+ nextKey: ve.firstKey,
3381
+ agent: xe,
3382
3382
  activity: R.kind
3383
3383
  }), [
3384
- _e.firstKey,
3385
- be,
3384
+ ve.firstKey,
3385
+ xe,
3386
3386
  R.kind
3387
- ]), Se = m.threads.filter((e) => e.status === "open").length, [Ce, we] = cr(M, ae), Te = B(() => k(!1), []), De = zn({
3388
- doc: f,
3389
- nodes: lr,
3390
- streaming: y,
3391
- theme: se ? "dark" : "light",
3392
- title: c?.title || e,
3387
+ ]), Ce = h.threads.filter((e) => e.status === "open").length, [we, Te] = lr(M, oe), Ee = B(() => k(!1), []), Oe = Bn({
3388
+ doc: p,
3389
+ nodes: ur,
3390
+ streaming: b,
3391
+ theme: ce ? "dark" : "light",
3392
+ title: c?.title || t,
3393
3393
  open: j,
3394
- onClose: Te
3394
+ onClose: Ee
3395
3395
  }), z = B(async (e) => {
3396
3396
  try {
3397
- return g(await t.comment(e)), !0;
3397
+ return _(await n.comment(e)), !0;
3398
3398
  } catch {
3399
3399
  return !1;
3400
3400
  }
3401
- }, [t]), Oe = H(() => ({
3401
+ }, [n]), ke = H(() => ({
3402
3402
  reply: (e, t) => z({
3403
3403
  op: "reply",
3404
3404
  threadId: e,
@@ -3423,40 +3423,40 @@ function pr({ id: e, transport: t, live: r, cloud: i, fallback: o, actions: s })
3423
3423
  op: "reopen",
3424
3424
  threadId: e
3425
3425
  })
3426
- }), [z]), ke = B((e, t) => z({
3426
+ }), [z]), Ae = B((e, t) => z({
3427
3427
  op: "create",
3428
3428
  blockId: e.blockId,
3429
3429
  ...e.blockIds ? { blockIds: e.blockIds } : {},
3430
3430
  ...e.textRanges ? { textRanges: e.textRanges } : {},
3431
3431
  quote: e.quote,
3432
3432
  text: t
3433
- }), [z]), Ae = B((e) => {
3433
+ }), [z]), je = B((e) => {
3434
3434
  if (!M) return;
3435
- M.setEditable(!0), de(!0), M.getRootElement()?.focus({ preventScroll: !0 });
3435
+ M.setEditable(!0), fe(!0), M.getRootElement()?.focus({ preventScroll: !0 });
3436
3436
  let t = window.getSelection();
3437
3437
  t?.removeAllRanges(), t?.addRange(e.range);
3438
3438
  }, [M]);
3439
- if (_) return /* @__PURE__ */ K("div", {
3439
+ if (v) return /* @__PURE__ */ K("div", {
3440
3440
  className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
3441
- children: _
3441
+ children: v
3442
3442
  });
3443
- if (!f) return o ?? /* @__PURE__ */ K("div", {
3443
+ if (!p) return o ?? /* @__PURE__ */ K("div", {
3444
3444
  className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
3445
- children: d("common.loading")
3445
+ children: f("common.loading")
3446
3446
  });
3447
- let je = /* @__PURE__ */ K(me.Provider, {
3447
+ let Me = /* @__PURE__ */ K(he.Provider, {
3448
3448
  value: L,
3449
- children: /* @__PURE__ */ K(Ee.Provider, {
3450
- value: xe,
3451
- children: /* @__PURE__ */ K(ye, {
3449
+ children: /* @__PURE__ */ K(De.Provider, {
3450
+ value: Se,
3451
+ children: /* @__PURE__ */ K(be, {
3452
3452
  agent: c?.agent,
3453
- doc: f,
3454
- theme: se ? "dark" : "light",
3455
- transport: t,
3456
- onAgentPlayback: E,
3457
- onEditorReady: re,
3453
+ doc: p,
3454
+ theme: ce ? "dark" : "light",
3455
+ transport: n,
3456
+ onAgentPlayback: ne,
3457
+ onEditorReady: ie,
3458
3458
  onOffline: D,
3459
- onState: ge
3459
+ onState: _e
3460
3460
  })
3461
3461
  })
3462
3462
  });
@@ -3464,65 +3464,65 @@ function pr({ id: e, transport: t, live: r, cloud: i, fallback: o, actions: s })
3464
3464
  className: "x1us19tq x1rozbrz xo2rkog",
3465
3465
  className: `ryugi-doc ${{ className: "x1us19tq x1rozbrz xo2rkog" }.className ?? ""}`,
3466
3466
  children: [
3467
- /* @__PURE__ */ K(Yn, {
3467
+ /* @__PURE__ */ K(Xn, {
3468
3468
  actions: s,
3469
3469
  activity: R,
3470
3470
  agent: c?.agent,
3471
- agentSection: T.section,
3472
- cloud: i,
3473
- compact: le,
3474
- id: e,
3475
- offline: ne,
3476
- openComments: Se,
3477
- title: c?.title || e,
3471
+ agentSection: E.section,
3472
+ cloud: a,
3473
+ compact: ue,
3474
+ id: t,
3475
+ offline: re,
3476
+ openComments: Ce,
3477
+ title: c?.title || t,
3478
3478
  history: {
3479
3479
  available: A,
3480
3480
  open: j,
3481
3481
  toggle: () => k((e) => !e),
3482
- close: Te
3482
+ close: Ee
3483
3483
  },
3484
- onDone: le && ue ? () => de(!1) : void 0
3484
+ onDone: ue && de ? () => fe(!1) : void 0
3485
3485
  }),
3486
- le ? /* @__PURE__ */ K(Jn, {
3487
- actions: Oe,
3486
+ ue ? /* @__PURE__ */ K(Yn, {
3487
+ actions: ke,
3488
3488
  agent: c?.agent,
3489
- canComment: ce,
3489
+ canComment: le,
3490
3490
  canEdit: F,
3491
- clearSelection: we,
3491
+ clearSelection: Te,
3492
3492
  editor: M,
3493
- history: De,
3494
- offline: !(!i || i.online),
3495
- selection: ue ? null : Ce,
3496
- threads: m.threads,
3497
- onCreate: ke,
3498
- onEdit: Ae,
3499
- onMain: oe,
3500
- children: je
3501
- }) : /* @__PURE__ */ K(pt, {
3502
- actions: Oe,
3493
+ history: Oe,
3494
+ offline: !(!a || a.online),
3495
+ selection: de ? null : we,
3496
+ threads: h.threads,
3497
+ onCreate: Ae,
3498
+ onEdit: je,
3499
+ onMain: se,
3500
+ children: Me
3501
+ }) : /* @__PURE__ */ K(mt, {
3502
+ actions: ke,
3503
3503
  agent: c?.agent,
3504
- canComment: ce,
3505
- clearSelection: we,
3504
+ canComment: le,
3505
+ clearSelection: Te,
3506
3506
  editor: M,
3507
- history: De,
3508
- selection: Ce,
3509
- threads: m.threads,
3510
- onCreate: ke,
3511
- onMain: oe,
3512
- children: je
3507
+ history: Oe,
3508
+ selection: we,
3509
+ threads: h.threads,
3510
+ onCreate: Ae,
3511
+ onMain: se,
3512
+ children: Me
3513
3513
  }),
3514
- /* @__PURE__ */ K(b, { warnings: c?.warnings ?? [] })
3514
+ /* @__PURE__ */ K(x, { warnings: c?.warnings ?? [] })
3515
3515
  ]
3516
3516
  });
3517
3517
  }
3518
3518
  // src/shared/document-features.ts
3519
- var mr = ["pending"], hr = (e) => {
3519
+ var hr = ["pending"], gr = (e) => {
3520
3520
  let t = "";
3521
3521
  for (let n = 0; n < e.length; n += 32768) t += String.fromCharCode(...e.subarray(n, n + 32768));
3522
3522
  return btoa(t);
3523
3523
  };
3524
- function gr(e) {
3525
- let t = Oe(), n = (e.connect ?? g)({
3524
+ function _r(e) {
3525
+ let t = ke(), n = (e.connect ?? _)({
3526
3526
  url: e.url,
3527
3527
  artifact: e.artifact,
3528
3528
  WebSocket: e.WebSocket,
@@ -3547,8 +3547,8 @@ function gr(e) {
3547
3547
  async update(e) {
3548
3548
  await n.request({
3549
3549
  op: "update",
3550
- bytes: hr(e),
3551
- features: mr
3550
+ bytes: gr(e),
3551
+ features: hr
3552
3552
  });
3553
3553
  },
3554
3554
  async comment(e) {
@@ -3569,4 +3569,4 @@ function gr(e) {
3569
3569
  }
3570
3570
  };
3571
3571
  }
3572
- export { pr as DocumentView, je as SnapshotDocument, gr as createRelayTransport };
3572
+ export { mr as DocumentView, Me as SnapshotDocument, _r as createRelayTransport };