ryugi-artifacts 1.69.0 → 1.70.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.
- package/dist/cli.cjs +3 -3
- package/dist/server.cjs +7 -2
- package/dist/viewer/{AgentStatusPill-CxFpJS9T.js → AgentStatusPill-exn8kG-H.js} +1 -1
- package/dist/viewer/ArtboardLayout-Dz0spzAj.js +12 -0
- package/dist/viewer/ArtifactList-DKmeVnKi.js +2 -0
- package/dist/viewer/{AutoPublishPrompt-DkGEIW9t.js → AutoPublishPrompt-BYAg2V0y.js} +1 -1
- package/dist/viewer/{Avatar-VUQPY4DD.js → Avatar-Cr9OW8YH.js} +1 -1
- package/dist/viewer/{Avatar-BhOg2BXZ.js → Avatar-NMdjRnIS.js} +1 -1
- package/dist/viewer/{BottomSheet-AqG81d_M.js → BottomSheet-BQnGJL4p.js} +1 -1
- package/dist/viewer/{Canvas-4Utk2C18.js → Canvas-DxaQjjSK.js} +1 -1
- package/dist/viewer/{CompositeItem-ClMglprA.js → CompositeItem-tvyaiM7D.js} +1 -1
- package/dist/viewer/DocumentLayout-_U2M-QV_.js +2 -0
- package/dist/viewer/DocumentPage-ox4EQvxU.js +4 -0
- package/dist/viewer/DropdownMenu-DQRhgqL-.js +1 -0
- package/dist/viewer/{HtmlLayout-89ZuJNxJ.js → HtmlLayout-DzcNJHBz.js} +1 -1
- package/dist/viewer/{MenuSubmenuTrigger-B9c8QfBG.js → MenuSubmenuTrigger-CFAM5XEZ.js} +1 -1
- package/dist/viewer/{MenuTrigger-yVEYn1Ao.js → MenuTrigger-COssWqPW.js} +1 -1
- package/dist/viewer/{PhoneArtboardBar-Bzffd2nB.js → PhoneArtboardBar-B6JoWeSs.js} +1 -1
- package/dist/viewer/{PhoneSheet-CN4Ewszx.js → PhoneSheet-F7YTU--u.js} +1 -1
- package/dist/viewer/{Popover-J_7ZaGFR.js → Popover-4xoki5-K.js} +1 -1
- package/dist/viewer/PreviewLayout-CTH3onR8.js +2 -0
- package/dist/viewer/{Segmented-DhJdw1_a.js → Segmented-CFwxjVOk.js} +1 -1
- package/dist/viewer/{Select-Cqb37-IZ.js → Select-CwMZ_V48.js} +1 -1
- package/dist/viewer/{SelectScrollUpArrow-DYO27Q2D.js → SelectScrollUpArrow-D1wI2boK.js} +1 -1
- package/dist/viewer/{SettingsDialog-BpwMMImH.js → SettingsDialog-ytisgF60.js} +1 -1
- package/dist/viewer/{SnapshotDocument-Cca8g4SA.js → SnapshotDocument-IbfxlwGq.js} +1 -1
- package/dist/viewer/{SplitShell-lfa8K-76.js → SplitShell-BT_RNQiE.js} +1 -1
- package/dist/viewer/{ThreadView-CNiDFkdG.js → ThreadView-CxcjZsZO.js} +1 -1
- package/dist/viewer/{TooltipPopup-DsKnBNAK.js → TooltipPopup-D7gvHCZl.js} +1 -1
- package/dist/viewer/{VirtualizedEditor-uWe43zaI-lgt127eM.js → VirtualizedEditor-uWe43zaI-BMW7pyKh.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-GNEopmGk.js → VirtualizedRenderer-C_d95FXi-D1_QNgkv.js} +1 -1
- package/dist/viewer/{WarningsBadge-DT8IiYtX.js → WarningsBadge-yykGlxIS.js} +1 -1
- package/dist/viewer/WhiteboardLayout-DdKyBMil.js +3 -0
- package/dist/viewer/{WritingCursor-DQcBMO0U.js → WritingCursor-BmvJsfI4.js} +1 -1
- package/dist/viewer/{abnfDiagram-VCTEODGH-CTyAnl0Z.js → abnfDiagram-VCTEODGH-BcWo9FwK.js} +1 -1
- package/dist/viewer/{agentLook-C2_12glW.js → agentLook-t-qk7xG-.js} +1 -1
- package/dist/viewer/{anchor-B2Eea6vf.js → anchor-CMDdppxq.js} +1 -1
- package/dist/viewer/{ar-SA-G6X2FPQ2-Co8NUjyx.js → ar-SA-G6X2FPQ2-Cm_ExiPk.js} +1 -1
- package/dist/viewer/{architecture-7GRP2DOG-B0zVjmxn.js → architecture-7GRP2DOG-B0ELn-r9.js} +1 -1
- package/dist/viewer/{architectureDiagram-5GKGNRK7-CGcFQF9y.js → architectureDiagram-5GKGNRK7-pjk1bmyn.js} +1 -1
- package/dist/viewer/{az-AZ-76LH7QW2-De3Qkr8D.js → az-AZ-76LH7QW2-C3xDoCfK.js} +1 -1
- package/dist/viewer/{bg-BG-XCXSNQG7-BzK_v3Xv.js → bg-BG-XCXSNQG7-BuqoExRt.js} +1 -1
- package/dist/viewer/{blockDiagram-I7D4REHJ-mTBluH4Q.js → blockDiagram-I7D4REHJ-Bt5Fgmbw.js} +1 -1
- package/dist/viewer/{bn-BD-2XOGV67Q-BDqCkFBJ.js → bn-BD-2XOGV67Q-Cb6R-JhO.js} +1 -1
- package/dist/viewer/{c4Diagram-7LVT6UL2-D-nVvYcu.js → c4Diagram-7LVT6UL2-DVoqgVNh.js} +1 -1
- package/dist/viewer/{ca-ES-6MX7JW3Y-Di897XK8.js → ca-ES-6MX7JW3Y-C9x3VZP6.js} +1 -1
- package/dist/viewer/{channel-D9zHsUWH.js → channel-DH0VKMTa.js} +8 -8
- package/dist/viewer/channel-fe5QTu-s.js +1 -0
- package/dist/viewer/{chunk-4HAMMTFA-QTbQqNtn.js → chunk-4HAMMTFA-CTdlWrtX.js} +1 -1
- package/dist/viewer/{chunk-75Z2AOVW-BbYnGlO9.js → chunk-75Z2AOVW-C_A1Se9D.js} +1 -1
- package/dist/viewer/{chunk-DU6HZSFF-D25kbUvc.js → chunk-DU6HZSFF-Dr7PaN7b.js} +1 -1
- package/dist/viewer/{chunk-EIO257PC-BqMFp5wN.js → chunk-EIO257PC-oHJkbpFs.js} +1 -1
- package/dist/viewer/{chunk-F27PBJKO-C7JmXEA_.js → chunk-F27PBJKO-BBCDjN53.js} +1 -1
- package/dist/viewer/{chunk-GMAD6QVW-C27INOB_.js → chunk-GMAD6QVW-BFHBOVJq.js} +1 -1
- package/dist/viewer/{chunk-GVQU2GXP-CEY5vytX.js → chunk-GVQU2GXP-BIpEZyzS.js} +1 -1
- package/dist/viewer/{chunk-IMKFNOWR-BQSAfnnl.js → chunk-IMKFNOWR-KEawvx8K.js} +1 -1
- package/dist/viewer/{chunk-L3NEJ4N5-DlFoBxMY.js → chunk-L3NEJ4N5-IwBcwkuk.js} +1 -1
- package/dist/viewer/{chunk-OSK3NFVY-F3_Phybw.js → chunk-OSK3NFVY-C3k_p7-w.js} +1 -1
- package/dist/viewer/{chunk-P2QGCYS3-09egvNok.js → chunk-P2QGCYS3-Dtm_7Lz7.js} +1 -1
- package/dist/viewer/{chunk-POPQ4Y6H-CV8YIoqC.js → chunk-POPQ4Y6H-CytCoNkh.js} +1 -1
- package/dist/viewer/{chunk-PWAF6VOD-Bz8UB2mc.js → chunk-PWAF6VOD-CyHOdyql.js} +1 -1
- package/dist/viewer/{chunk-SHT3W25Y-DDp6zMvV.js → chunk-SHT3W25Y-DD7pl4JI.js} +1 -1
- package/dist/viewer/{chunk-SVP7TREG-C8P_HXcE.js → chunk-SVP7TREG-Bu4mLQNH.js} +1 -1
- package/dist/viewer/{chunk-TICWLB2K-CqNIbLdD.js → chunk-TICWLB2K-sZ8FCdF0.js} +1 -1
- package/dist/viewer/classDiagram-ZZMXUADV-B-zT7lnC.js +1 -0
- package/dist/viewer/classDiagram-v2-VYDZK3BY-B-zT7lnC.js +1 -0
- package/dist/viewer/{cs-CZ-2BRQDIVT-BqCK2YiO.js → cs-CZ-2BRQDIVT-BYzmp2zB.js} +1 -1
- package/dist/viewer/{cynefin-OW5HDTMX-Cj8F5cxd.js → cynefin-OW5HDTMX-BRRxGfUD.js} +1 -1
- package/dist/viewer/{cynefinDiagram-5FMLGOSQ-ao8tcFtS.js → cynefinDiagram-5FMLGOSQ-BJJG-W2c.js} +1 -1
- package/dist/viewer/{da-DK-5WZEPLOC-D8GWiO3u.js → da-DK-5WZEPLOC-BQMUVHri.js} +1 -1
- package/dist/viewer/{dagre-GXQ25YYZ-DsGmxha_.js → dagre-GXQ25YYZ-18YALgQ_.js} +1 -1
- package/dist/viewer/{de-DE-XR44H4JA-OJKx5xur.js → de-DE-XR44H4JA-CXVFrfP-.js} +1 -1
- package/dist/viewer/{diagram-S7CK7UJ4-BPqNSGqm.js → diagram-S7CK7UJ4-BxB2LRSe.js} +1 -1
- package/dist/viewer/{diagram-UQ7AKVKN-Hyylpo16.js → diagram-UQ7AKVKN-BcJ9Tkbs.js} +1 -1
- package/dist/viewer/{diagram-VSXAHHWV-CqqVLGLK.js → diagram-VSXAHHWV-_UeBcZmY.js} +1 -1
- package/dist/viewer/{diagram-VX7I27RA-QDUSbpnl.js → diagram-VX7I27RA-Bc9iy24S.js} +1 -1
- package/dist/viewer/{diagram-Z3DM3KII-BlSnfIUw.js → diagram-Z3DM3KII-gU89rmSx.js} +1 -1
- package/dist/viewer/{dist-PC_089aX.js → dist-0mKY9eI7.js} +1 -1
- package/dist/viewer/{dist-BFQmsjpz.js → dist-B01tJOMA.js} +1 -1
- package/dist/viewer/{dist-8PA9S6LL.js → dist-B2jUGLcW.js} +1 -1
- package/dist/viewer/{dist-y47EP8TD.js → dist-BhkEYAHc.js} +1 -1
- package/dist/viewer/{dist-dHcM14_b.js → dist-Bo6d3UKT.js} +1 -1
- package/dist/viewer/{dist-BLAIDSVI.js → dist-BqnvFgk0.js} +1 -1
- package/dist/viewer/{dist-Cwm7m3VK.js → dist-C0qQs54I.js} +1 -1
- package/dist/viewer/{dist-BjVw2B6k.js → dist-C3CTurMw.js} +1 -1
- package/dist/viewer/{dist-BKcrjsO1.js → dist-C3WYDtp3.js} +1 -1
- package/dist/viewer/{dist-CY5pHbTR.js → dist-COTHq9_Y.js} +1 -1
- package/dist/viewer/{dist-DS3MMXtI.js → dist-CRyNsNEn.js} +1 -1
- package/dist/viewer/{dist-DlY6E9WS.js → dist-CTW5Mm7j.js} +1 -1
- package/dist/viewer/{dist-C6PBT5lE.js → dist-D3D--6Bp.js} +1 -1
- package/dist/viewer/{dist-Bo8QJSW2.js → dist-DJY0rxct.js} +1 -1
- package/dist/viewer/{dist-D8bHZTnA.js → dist-DJY6L8B9.js} +1 -1
- package/dist/viewer/{dist-Cc-_5Hcx.js → dist-DVq4uFIZ.js} +1 -1
- package/dist/viewer/{dist-DpV8-atf.js → dist-DZdqkKNN.js} +1 -1
- package/dist/viewer/{dist-Bot6IVVV.js → dist-DcqWCvRw.js} +1 -1
- package/dist/viewer/{dist-CwxBiwOj.js → dist-DhcQ70Kn.js} +1 -1
- package/dist/viewer/{dist-BB7KGjDd.js → dist-GsD7M9aH.js} +1 -1
- package/dist/viewer/{dist-CnQsaM53.js → dist-Hb3V0HyK.js} +1 -1
- package/dist/viewer/{dist-XKj_gvVl.js → dist-QjnQrlMe.js} +4 -4
- package/dist/viewer/{dist-BIiCOFkh.js → dist-_PSM37a1.js} +1 -1
- package/dist/viewer/{dist-CdS13Sm9.js → dist-hFUF3Lsa.js} +1 -1
- package/dist/viewer/{ebnfDiagram-PWID7BFC-Cv8jFIx3.js → ebnfDiagram-PWID7BFC-C8HSoSRy.js} +1 -1
- package/dist/viewer/{el-GR-BZB4AONW-Bgcc_mhT.js → el-GR-BZB4AONW-ow3fFVLT.js} +1 -1
- package/dist/viewer/{en-B4ZKOASM-xfJgNr4J.js → en-B4ZKOASM-CaY3r9HU.js} +1 -1
- package/dist/viewer/{erDiagram-RLTQ6QDP-DlKwxifM.js → erDiagram-RLTQ6QDP-BxJx7rlQ.js} +1 -1
- package/dist/viewer/{es-ES-U4NZUMDT-DjVCDf-d.js → es-ES-U4NZUMDT-BMjMaVCY.js} +1 -1
- package/dist/viewer/{eu-ES-A7QVB2H4-B9DLpn4i.js → eu-ES-A7QVB2H4-CM4bkpMu.js} +1 -1
- package/dist/viewer/{eventmodeling-NTZA5JFV-DBsen_iq.js → eventmodeling-NTZA5JFV-DnbDCfB2.js} +1 -1
- package/dist/viewer/{fa-IR-HGAKTJCU-mcJehgzb.js → fa-IR-HGAKTJCU-BLD2tQpT.js} +1 -1
- package/dist/viewer/{fi-FI-Z5N7JZ37-DNSkiCdk.js → fi-FI-Z5N7JZ37-Bgn7EPoz.js} +1 -1
- package/dist/viewer/flowDiagram-HODETNUW-CXlFZEEj.js +1 -0
- package/dist/viewer/{fr-FR-RHASNOE6-Bpxco8-f.js → fr-FR-RHASNOE6-Bkw82-6W.js} +1 -1
- package/dist/viewer/{ganttDiagram-EL5Y4UJY-B9_jTP-f.js → ganttDiagram-EL5Y4UJY-DOR_e0je.js} +1 -1
- package/dist/viewer/{gitGraph-4MIJSDKK-DQ5l_Czp.js → gitGraph-4MIJSDKK-SVRQ5W4D.js} +1 -1
- package/dist/viewer/{gitGraphDiagram-WWUBYQGX-CNheUmFp.js → gitGraphDiagram-WWUBYQGX-CDiQ0mCt.js} +1 -1
- package/dist/viewer/{gl-ES-HMX3MZ6V-BDlXQ8Mo.js → gl-ES-HMX3MZ6V-BLzHqZN8.js} +1 -1
- package/dist/viewer/{he-IL-6SHJWFNN-D_oWBOT_.js → he-IL-6SHJWFNN-D8wU25du.js} +1 -1
- package/dist/viewer/{hi-IN-IWLTKZ5I-B00j5Akq.js → hi-IN-IWLTKZ5I-BL-e61Xu.js} +1 -1
- package/dist/viewer/{hu-HU-A5ZG7DT2-Dir0Uxpm.js → hu-HU-A5ZG7DT2-DbYToYgQ.js} +1 -1
- package/dist/viewer/{id-ID-SAP4L64H-CIWlaa2K.js → id-ID-SAP4L64H-CCT_QszX.js} +1 -1
- package/dist/viewer/{image-GAAHSSAO-eNNIIQuo.js → image-GAAHSSAO-DKoD4XKV.js} +1 -1
- package/dist/viewer/index.html +5 -5
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index2.css +1 -1
- package/dist/viewer/index3.css +88 -0
- package/dist/viewer/{info-A6RAGUB7-Cg2ZMBgH.js → info-A6RAGUB7-CX2C9N30.js} +1 -1
- package/dist/viewer/{infoDiagram-27XIBGKW-D4PQhgAE.js → infoDiagram-27XIBGKW-CN86my9R.js} +1 -1
- package/dist/viewer/{ishikawaDiagram-5VMMS53U-ST2q8zVR.js → ishikawaDiagram-5VMMS53U-5BluWj2f.js} +1 -1
- package/dist/viewer/{it-IT-JPQ66NNP-pmEG31XC.js → it-IT-JPQ66NNP-afXtP8Ww.js} +1 -1
- package/dist/viewer/{ja-JP-DBVTYXUO-B4zqTUsM.js → ja-JP-DBVTYXUO-DekQisaL.js} +1 -1
- package/dist/viewer/{journeyDiagram-3NMN7TZE-jw9cozQW.js → journeyDiagram-3NMN7TZE-CJC3KFyX.js} +1 -1
- package/dist/viewer/{kaa-6HZHGXH3-BbZXuqjx.js → kaa-6HZHGXH3-tRph-_T2.js} +1 -1
- package/dist/viewer/{kab-KAB-ZGHBKWFO-B6Dpy25G.js → kab-KAB-ZGHBKWFO-BE4QoOsA.js} +1 -1
- package/dist/viewer/{kanban-definition-UXKFOSKX-kKtBGERG.js → kanban-definition-UXKFOSKX-B18ysZ84.js} +1 -1
- package/dist/viewer/{kk-KZ-P5N5QNE5-BlT2i9fi.js → kk-KZ-P5N5QNE5-CVRotJxc.js} +1 -1
- package/dist/viewer/{km-KH-HSX4SM5Z-It93cDWb.js → km-KH-HSX4SM5Z-hAYTx672.js} +1 -1
- package/dist/viewer/{ko-KR-MTYHY66A-BE5d6K1R.js → ko-KR-MTYHY66A-QEVtuRm5.js} +1 -1
- package/dist/viewer/{ku-TR-6OUDTVRD-CyJeB7Dj.js → ku-TR-6OUDTVRD-CRm854Ze.js} +1 -1
- package/dist/viewer/{local-split-host-DwGe1ki5.js → local-split-host-B8nXcoph.js} +1 -1
- package/dist/viewer/{lt-LT-XHIRWOB4-B90xeOxU.js → lt-LT-XHIRWOB4-CKPgIz76.js} +1 -1
- package/dist/viewer/{lv-LV-5QDEKY6T-CItjDmqr.js → lv-LV-5QDEKY6T-ChfyCJQM.js} +1 -1
- package/dist/viewer/{mermaid-parser.core-0b8QyWBB.js → mermaid-parser.core-BVnYCq41.js} +3 -3
- package/dist/viewer/{mindmap-definition-YA3MSWOX-aI29Qvpk.js → mindmap-definition-YA3MSWOX-DHv3E1P_.js} +1 -1
- package/dist/viewer/{mr-IN-CRQNXWMA-Tce1KbsQ.js → mr-IN-CRQNXWMA-BJLGlD17.js} +1 -1
- package/dist/viewer/{my-MM-5M5IBNSE-CpUB2CXI.js → my-MM-5M5IBNSE-9rLlVOlt.js} +1 -1
- package/dist/viewer/{nb-NO-T6EIAALU-DsRuGO1k.js → nb-NO-T6EIAALU-B8VMz4zh.js} +1 -1
- package/dist/viewer/{nl-NL-IS3SIHDZ-BjF2156S.js → nl-NL-IS3SIHDZ-DqLxBYZV.js} +1 -1
- package/dist/viewer/{nn-NO-6E72VCQL-CGeF_3vr.js → nn-NO-6E72VCQL-Bo0PPFBQ.js} +1 -1
- package/dist/viewer/{oc-FR-POXYY2M6-DLnQnEGu.js → oc-FR-POXYY2M6-CWWRWFHX.js} +1 -1
- package/dist/viewer/{pa-IN-N4M65BXN-BAx2ywdg.js → pa-IN-N4M65BXN-DT0tg3Sk.js} +1 -1
- package/dist/viewer/{packet-AYTQ26CC-DK170Gd5.js → packet-AYTQ26CC-KGzO-wcr.js} +1 -1
- package/dist/viewer/{parseTrigger-YW1R9ofU.js → parseTrigger-Bu-PV9CL.js} +1 -1
- package/dist/viewer/{pegDiagram-XKGWAZYB-DHp6Wg_9.js → pegDiagram-XKGWAZYB-Dic4eBsi.js} +1 -1
- package/dist/viewer/percentages-BXMCSKIN-BS0t4tWg.js +1 -0
- package/dist/viewer/{pie-WAS4IAKB-BSUWPbAv.js → pie-WAS4IAKB-BYfJrbuD.js} +1 -1
- package/dist/viewer/{pieDiagram-E7YTZNPT-wfRRTiyk.js → pieDiagram-E7YTZNPT-CjUaUWV2.js} +1 -1
- package/dist/viewer/{pl-PL-T2D74RX3-BiWBdXLi.js → pl-PL-T2D74RX3-Ch27cnOo.js} +1 -1
- package/dist/viewer/preview.html +4 -4
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{prod-CLoF9GCs.js → prod-TT-J6Nam.js} +8 -8
- package/dist/viewer/{pt-BR-5N22H2LF-CQSzKbCy.js → pt-BR-5N22H2LF-8J6Vfb7V.js} +1 -1
- package/dist/viewer/{pt-PT-UZXXM6DQ-CIlCAlTv.js → pt-PT-UZXXM6DQ-BX7qQNlR.js} +1 -1
- package/dist/viewer/{quadrantDiagram-AXDQQJYC-BtPMYaDQ.js → quadrantDiagram-AXDQQJYC-r9uBJJoA.js} +1 -1
- package/dist/viewer/{radar-RG4KPBEZ-BcVxV4zy.js → radar-RG4KPBEZ-DDBCvrzl.js} +1 -1
- package/dist/viewer/{railroad-74A4TZTK-CTa8S3gO.js → railroad-74A4TZTK-DHdJAn7o.js} +1 -1
- package/dist/viewer/{railroad-abnf-HS5TGJTU-OAwQkYAd.js → railroad-abnf-HS5TGJTU-D9wWd5uO.js} +1 -1
- package/dist/viewer/{railroad-ebnf-LZEXJU2U-C5cc5X65.js → railroad-ebnf-LZEXJU2U-D-NZ6dqJ.js} +1 -1
- package/dist/viewer/{railroad-peg-WCYAUIDC-BDnKRxE1.js → railroad-peg-WCYAUIDC-CyPMQZm7.js} +1 -1
- package/dist/viewer/{railroadDiagram-O6MQD6OU-jnRSJdUv.js → railroadDiagram-O6MQD6OU-CWrubsQf.js} +1 -1
- package/dist/viewer/{ref-cwone_vf.js → ref-BF7Dk-nb.js} +1 -1
- package/dist/viewer/{requirementDiagram-BXWQKSXE-BNTKDL1i.js → requirementDiagram-BXWQKSXE-YIdQ9sc_.js} +1 -1
- package/dist/viewer/{ro-RO-JPDTUUEW-QX3jx-nb.js → ro-RO-JPDTUUEW-2Pp-dKmW.js} +1 -1
- package/dist/viewer/route-CDT5H7Dv.js +64 -0
- package/dist/viewer/{route-messages-DNqJY8RF.js → route-messages-Bgmu6wjw.js} +1 -1
- package/dist/viewer/{ru-RU-B4JR7IUQ-C9FGD7Cs.js → ru-RU-B4JR7IUQ-DPkLOvY0.js} +1 -1
- package/dist/viewer/{sankeyDiagram-P5KCCOFB-Sqlj0O4h.js → sankeyDiagram-P5KCCOFB-BQftNXO2.js} +1 -1
- package/dist/viewer/{selection--wknfKoX.js → selection-BTJrtSto.js} +1 -1
- package/dist/viewer/{sequenceDiagram-WJ2MYXX4-CPdR8yLJ.js → sequenceDiagram-WJ2MYXX4-C90CSvsu.js} +1 -1
- package/dist/viewer/{si-LK-N5RQ5JYF-f_2YLEad.js → si-LK-N5RQ5JYF-DjQ-ynCO.js} +1 -1
- package/dist/viewer/{sk-SK-C5VTKIMK-DkKosukU.js → sk-SK-C5VTKIMK-Do9H8uzR.js} +1 -1
- package/dist/viewer/{sl-SI-NN7IZMDC-DMIQDLDl.js → sl-SI-NN7IZMDC-bJ5rRome.js} +1 -1
- package/dist/viewer/{split-url-EQlIwqCq.js → split-url-D0Eu87y4.js} +3 -3
- package/dist/viewer/{stateDiagram-D77RDMKH-Dk8vgDDZ.js → stateDiagram-D77RDMKH-pBFTeHBj.js} +1 -1
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-aanK4VsX.js +1 -0
- package/dist/viewer/subset-shared.chunk-BiJjRqIa.js +1 -0
- package/dist/viewer/{subset-worker.chunk-B_8bLook.js → subset-worker.chunk-3zYap8Q-.js} +1 -1
- package/dist/viewer/{sv-SE-XGPEYMSR-B7-5iBmq.js → sv-SE-XGPEYMSR-C0oEs72p.js} +1 -1
- package/dist/viewer/{swimlanes-42K2YHIH-C8ikgnYd.js → swimlanes-42K2YHIH-CTsMizz_.js} +1 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-Bgny_WIB.js +8 -0
- package/dist/viewer/{ta-IN-2NMHFXQM-CCuxmYHa.js → ta-IN-2NMHFXQM-B3AATr70.js} +1 -1
- package/dist/viewer/{th-TH-HPSO5L25-555yyoqZ.js → th-TH-HPSO5L25-DQBS-yab.js} +1 -1
- package/dist/viewer/{timeline-definition-24CTP7MA-C2dpylBO.js → timeline-definition-24CTP7MA-C-XiBPgr.js} +1 -1
- package/dist/viewer/{tr-TR-DEFEU3FU-BzupxUte.js → tr-TR-DEFEU3FU-ag7nD5kA.js} +1 -1
- package/dist/viewer/{treeView-Q6P3EWNA-Bo2ovp6d.js → treeView-Q6P3EWNA-SVlfuIv-.js} +1 -1
- package/dist/viewer/{treemap-WGGIJYW6-B_JgUt2a.js → treemap-WGGIJYW6-_ZShzHPs.js} +1 -1
- package/dist/viewer/{uk-UA-QMV73CPH-DRep9RrQ.js → uk-UA-QMV73CPH-BSQfUSoA.js} +1 -1
- package/dist/viewer/{useAriaLabelledBy-qrGtdh85.js → useAriaLabelledBy-BuWax2Z2.js} +1 -1
- package/dist/viewer/{useArtifactFeed-C3070Mi8.js → useArtifactFeed-BDiYn0gP.js} +1 -1
- package/dist/viewer/useCloudStatus-JY8n58HL.js +1 -0
- package/dist/viewer/{useOpenInteractionType-B0XlD3Xc.js → useOpenInteractionType-DH5mUVhj.js} +1 -1
- package/dist/viewer/{useTranslation-D3df1rHG.js → useTranslation-BNqJXci1.js} +1 -1
- package/dist/viewer/{useTypeFavicon-COeOH_8h.js → useTypeFavicon-B3gDp1sZ.js} +1 -1
- package/dist/viewer/{vennDiagram-4TSXK5OY-BmwVNbSU.js → vennDiagram-4TSXK5OY-BV0PYWnH.js} +1 -1
- package/dist/viewer/{vi-VN-M7AON7JQ-HxuRLuM7.js → vi-VN-M7AON7JQ-Dl7QA_Y_.js} +1 -1
- package/dist/viewer/{view-Q3sf2djn.js → view--v3LsuO9.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-CLCrXOsP.js → viewport-CFJHn_Y6-D8gntZjd.js} +1 -1
- package/dist/viewer/{wardley-WFR3VGLG-D6GPmsYf.js → wardley-WFR3VGLG-BNvAuofQ.js} +1 -1
- package/dist/viewer/{wardleyDiagram-VM6X3IG4-BL1YKfSh.js → wardleyDiagram-VM6X3IG4-B12XuiXU.js} +1 -1
- package/dist/viewer/{xychartDiagram-S5SC5T6Z-9WjSzaRU.js → xychartDiagram-S5SC5T6Z-CNASGt-y.js} +1 -1
- package/dist/viewer/{zh-CN-LNUGB5OW-C_gHexkj.js → zh-CN-LNUGB5OW-BN9rjxsZ.js} +1 -1
- package/dist/viewer/{zh-HK-E62DVLB3-Dhwq5Laa.js → zh-HK-E62DVLB3-DVH9Q1Iz.js} +1 -1
- package/dist/viewer/{zh-TW-RAJ6MFWO-CfId5kew.js → zh-TW-RAJ6MFWO-CZYgWnVr.js} +1 -1
- package/dist/viewer-lib/{Canvas-BpIyaqFN.js → Canvas-Cz4jc5_1.js} +3 -3
- package/dist/viewer-lib/PageLoader-M5KGHqfg.js +32 -0
- package/dist/viewer-lib/{PhoneArtboardBar-DYEcy0Qa.js → PhoneArtboardBar-MV_lMiiq.js} +2 -2
- package/dist/viewer-lib/{PreviewView-DX6HLiL0.js → PreviewView-C0pRJ1cs.js} +117 -110
- package/dist/viewer-lib/{ReadOnlyWhiteboard-C9v2Zbtp.js → ReadOnlyWhiteboard-B5wXA3u9.js} +90 -89
- package/dist/viewer-lib/{i18n-QksLzzWi.js → RyugiLoader-_MZxEs2s.js} +145 -20
- package/dist/viewer-lib/{SnapshotDocument-CMVvuBUw.css → SnapshotDocument-BV29XJk4.css} +1 -1
- package/dist/viewer-lib/{SnapshotDocument-BbgwNfWB.js → SnapshotDocument-DiIRfl5L.js} +75 -75
- package/dist/viewer-lib/{VirtualizedEditor-uWe43zaI-CmgTXS-p.js → VirtualizedEditor-uWe43zaI-DktBg0M1.js} +2 -2
- package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-BuckUTnS.js → VirtualizedRenderer-C_d95FXi-B39OU9Je.js} +3 -3
- package/dist/viewer-lib/{WarningsBadge-1xR7QoZB.js → WarningsBadge-p7-QKPVW.js} +1 -1
- package/dist/viewer-lib/{agentLook-xSyYY25N.js → agentLook-Pf_kpgWG.js} +1 -1
- package/dist/viewer-lib/{ar-SA-G6X2FPQ2-CEJUrUcf.js → ar-SA-G6X2FPQ2-qbH69ISs.js} +1 -1
- package/dist/viewer-lib/{az-AZ-76LH7QW2-D3FZr56u.js → az-AZ-76LH7QW2-CfO7QPHE.js} +1 -1
- package/dist/viewer-lib/{bg-BG-XCXSNQG7-DV2gd8SJ.js → bg-BG-XCXSNQG7-JgeW4H2C.js} +1 -1
- package/dist/viewer-lib/{bn-BD-2XOGV67Q-fNhYcJwe.js → bn-BD-2XOGV67Q-AoN4Z5CP.js} +1 -1
- package/dist/viewer-lib/{ca-ES-6MX7JW3Y-p45OBk_B.js → ca-ES-6MX7JW3Y-BaoeIvfa.js} +1 -1
- package/dist/viewer-lib/{chunk-EIO257PC-CXXH8Md3.js → chunk-EIO257PC-Ac80GdCI.js} +1 -1
- package/dist/viewer-lib/core.js +5 -4
- package/dist/viewer-lib/{cs-CZ-2BRQDIVT-CY75gnzI.js → cs-CZ-2BRQDIVT-DhxT4nbh.js} +1 -1
- package/dist/viewer-lib/{da-DK-5WZEPLOC-DmMaYPrm.js → da-DK-5WZEPLOC-E4_32hvX.js} +1 -1
- package/dist/viewer-lib/{de-DE-XR44H4JA-DYfV8p9-.js → de-DE-XR44H4JA-CH1m2Hyu.js} +1 -1
- package/dist/viewer-lib/{dist-CByhej7K.js → dist-4N9VL_Qo.js} +3 -3
- package/dist/viewer-lib/{dist-DXfPN4Ec.js → dist-BGqKudtK.js} +3 -3
- package/dist/viewer-lib/{dist-BC4KdWXx.js → dist-BUWnxmmt.js} +2 -2
- package/dist/viewer-lib/{dist-Bj7f3YVM.js → dist-Bf3vx8tA.js} +3 -3
- package/dist/viewer-lib/{dist-B2Nu28kR.js → dist-C2-8CMJG.js} +3 -3
- package/dist/viewer-lib/{dist-BTsSLXre.js → dist-COGc35cY.js} +1 -1
- package/dist/viewer-lib/{dist-C1rZNGDI.js → dist-CxLJJRFh.js} +3 -3
- package/dist/viewer-lib/{dist-Dk0VPjYJ.js → dist-D-eZ6Mt_.js} +4 -4
- package/dist/viewer-lib/{dist-CLtlsvg1.js → dist-D4hVC50-.js} +2 -2
- package/dist/viewer-lib/{dist-B4fnnsge.js → dist-DCoCMlKT.js} +2 -2
- package/dist/viewer-lib/{dist-DBjTRRIP.js → dist-DNSST2rW.js} +3 -3
- package/dist/viewer-lib/{dist-BIGmzfNO.js → dist-DjyhCAJp.js} +3 -3
- package/dist/viewer-lib/{dist-ot8vVTH3.js → dist-DpLE-ZgU.js} +2 -2
- package/dist/viewer-lib/{dist-DXMlNYXL.js → dist-DpdpsTAT.js} +2 -2
- package/dist/viewer-lib/{dist-C4KWXAoU.js → dist-DrhJ9opW.js} +2 -2
- package/dist/viewer-lib/{dist-BCKU1e8H.js → dist-Dt0ohtTi.js} +4 -4
- package/dist/viewer-lib/{dist-lmMdFW_t.js → dist-GyL4PJ8b.js} +3 -3
- package/dist/viewer-lib/{dist-CcDaSD_g.js → dist-JKcrLRtX.js} +2 -2
- package/dist/viewer-lib/{dist-3pnICcdO.js → dist-K_XrbIQp.js} +2 -2
- package/dist/viewer-lib/{dist-BHOz-HOQ.js → dist-YCAwO-Nd.js} +3 -3
- package/dist/viewer-lib/{dist-BqK2glT6.js → dist-e2LB4sJU.js} +4 -4
- package/dist/viewer-lib/{dist-DJ5tvY8x.js → dist-elxdtjg5.js} +1 -1
- package/dist/viewer-lib/{dist-kESmUvgx.js → dist-xhmSGfbo.js} +3 -3
- package/dist/viewer-lib/document.js +676 -674
- package/dist/viewer-lib/{el-GR-BZB4AONW-C0-Rg3rY.js → el-GR-BZB4AONW-CxMbipHk.js} +1 -1
- package/dist/viewer-lib/{en-B4ZKOASM-CWwARfdU.js → en-B4ZKOASM-Ch0kGhap.js} +1 -1
- package/dist/viewer-lib/{es-ES-U4NZUMDT-Di1ZUIVa.js → es-ES-U4NZUMDT-B9x-x6lF.js} +1 -1
- package/dist/viewer-lib/{eu-ES-A7QVB2H4-DfxpIbwQ.js → eu-ES-A7QVB2H4-C3VIhLkt.js} +1 -1
- package/dist/viewer-lib/{fa-IR-HGAKTJCU-BzJgn5bY.js → fa-IR-HGAKTJCU-Ch3qRpCM.js} +1 -1
- package/dist/viewer-lib/{fi-FI-Z5N7JZ37-Dgh9WYA8.js → fi-FI-Z5N7JZ37-DUj1GHLS.js} +1 -1
- package/dist/viewer-lib/{fr-FR-RHASNOE6-FxbVo7Yh.js → fr-FR-RHASNOE6-DHTtAWgo.js} +1 -1
- package/dist/viewer-lib/{gl-ES-HMX3MZ6V-BwezJSl-.js → gl-ES-HMX3MZ6V-Cze-1U2w.js} +1 -1
- package/dist/viewer-lib/{he-IL-6SHJWFNN-CMKZRRs9.js → he-IL-6SHJWFNN-CNXnKism.js} +1 -1
- package/dist/viewer-lib/{hi-IN-IWLTKZ5I-4-ZNp-DM.js → hi-IN-IWLTKZ5I-flVZhrNs.js} +1 -1
- package/dist/viewer-lib/{hu-HU-A5ZG7DT2-Cao8cecF.js → hu-HU-A5ZG7DT2-C37EVmEa.js} +1 -1
- package/dist/viewer-lib/{id-ID-SAP4L64H-CWnVrU2u.js → id-ID-SAP4L64H-ClyjpOWe.js} +1 -1
- package/dist/viewer-lib/{image-GAAHSSAO-5jYfRo5K.js → image-GAAHSSAO-uUIN58iQ.js} +1 -1
- package/dist/viewer-lib/index.js +1776 -1778
- package/dist/viewer-lib/{it-IT-JPQ66NNP-DiPCKoa_.js → it-IT-JPQ66NNP-Blbj9-RE.js} +1 -1
- package/dist/viewer-lib/{ja-JP-DBVTYXUO-CXbGOVTd.js → ja-JP-DBVTYXUO-d4IkMycP.js} +1 -1
- package/dist/viewer-lib/{kaa-6HZHGXH3-BkMVWloD.js → kaa-6HZHGXH3-BLfJ-cuB.js} +1 -1
- package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-FA3Rofsx.js → kab-KAB-ZGHBKWFO-CE_PEjYa.js} +1 -1
- package/dist/viewer-lib/{kk-KZ-P5N5QNE5-CsDnxzrG.js → kk-KZ-P5N5QNE5-MSQ0edn8.js} +1 -1
- package/dist/viewer-lib/{km-KH-HSX4SM5Z-BxCiwgzA.js → km-KH-HSX4SM5Z-BYOvIsAB.js} +1 -1
- package/dist/viewer-lib/{ko-KR-MTYHY66A-C-7uFPlL.js → ko-KR-MTYHY66A-DBp6P6uI.js} +1 -1
- package/dist/viewer-lib/{ku-TR-6OUDTVRD-BILRBU5_.js → ku-TR-6OUDTVRD-DXb7ijNZ.js} +1 -1
- package/dist/viewer-lib/{lib-DwpunbxQ.js → lib-0D5Lgp7R.js} +1 -1
- package/dist/viewer-lib/{lt-LT-XHIRWOB4-B6TKZcXY.js → lt-LT-XHIRWOB4-tWY6xBEJ.js} +1 -1
- package/dist/viewer-lib/{lv-LV-5QDEKY6T-C-K90vIy.js → lv-LV-5QDEKY6T-B8Ew_8za.js} +1 -1
- package/dist/viewer-lib/{mr-IN-CRQNXWMA-K0hO9NLW.js → mr-IN-CRQNXWMA-C6A0bvr8.js} +1 -1
- package/dist/viewer-lib/{my-MM-5M5IBNSE-Da5X6e7B.js → my-MM-5M5IBNSE-B4eEg06F.js} +1 -1
- package/dist/viewer-lib/{nb-NO-T6EIAALU-D9WwGGq8.js → nb-NO-T6EIAALU-BST0y_U9.js} +1 -1
- package/dist/viewer-lib/{nl-NL-IS3SIHDZ-BOYOn6bl.js → nl-NL-IS3SIHDZ-R2rJHctU.js} +1 -1
- package/dist/viewer-lib/{nn-NO-6E72VCQL-Bwi6kGD3.js → nn-NO-6E72VCQL-DFgpBRTv.js} +1 -1
- package/dist/viewer-lib/{oc-FR-POXYY2M6-h8Hb5RCQ.js → oc-FR-POXYY2M6-Dfgf8Rar.js} +1 -1
- package/dist/viewer-lib/{pa-IN-N4M65BXN-DHJ5ZqCB.js → pa-IN-N4M65BXN-pRdhmMMX.js} +1 -1
- package/dist/viewer-lib/percentages-BXMCSKIN-tIRAqLi6.js +1 -0
- package/dist/viewer-lib/{pl-PL-T2D74RX3-DSrRpGY_.js → pl-PL-T2D74RX3-CWXo_n8w.js} +1 -1
- package/dist/viewer-lib/{plugin-_bGVeqI0-CUWLVkLE.js → plugin-_bGVeqI0-CEaMOsSS.js} +1 -1
- package/dist/viewer-lib/{prod-IPTdmVn7.js → prod-C-Yl3reA.js} +59 -59
- package/dist/viewer-lib/{pt-BR-5N22H2LF-Cnku-mHw.js → pt-BR-5N22H2LF-QYaR1bwz.js} +1 -1
- package/dist/viewer-lib/{pt-PT-UZXXM6DQ-CI4Lw12R.js → pt-PT-UZXXM6DQ-B3Xmhk77.js} +1 -1
- package/dist/viewer-lib/{ro-RO-JPDTUUEW-Z0rMTCBA.js → ro-RO-JPDTUUEW-c4iCK_Pl.js} +1 -1
- package/dist/viewer-lib/{route-messages-BHovJ4nB.js → route-messages-BOdX3qq4.js} +20 -20
- package/dist/viewer-lib/{ru-RU-B4JR7IUQ-DH7fwhiu.js → ru-RU-B4JR7IUQ-D6bje_j4.js} +1 -1
- package/dist/viewer-lib/{si-LK-N5RQ5JYF-BFG1Q032.js → si-LK-N5RQ5JYF-CSCCQJ8w.js} +1 -1
- package/dist/viewer-lib/{sk-SK-C5VTKIMK-nKDfxLLq.js → sk-SK-C5VTKIMK-Y0-0nXpW.js} +1 -1
- package/dist/viewer-lib/{sl-SI-NN7IZMDC-zdGtFnJ4.js → sl-SI-NN7IZMDC-LLRODh8d.js} +1 -1
- package/dist/viewer-lib/{stylex-H52XSOyN.css → stylex-CCivaCRo.css} +88 -0
- package/dist/viewer-lib/subset-shared.chunk-Bkt4jbTb.js +2 -0
- package/dist/viewer-lib/{subset-worker.chunk-DHe1FqQ-.js → subset-worker.chunk-CFZCkpb_.js} +2 -2
- package/dist/viewer-lib/{sv-SE-XGPEYMSR-MVhH_h3w.js → sv-SE-XGPEYMSR-r-pwNhnE.js} +1 -1
- package/dist/viewer-lib/{ta-IN-2NMHFXQM-C_I2r20T.js → ta-IN-2NMHFXQM-BpeAXDlG.js} +1 -1
- package/dist/viewer-lib/{th-TH-HPSO5L25-DQ6MPZ1r.js → th-TH-HPSO5L25-DVXFh9KL.js} +1 -1
- package/dist/viewer-lib/{tr-TR-DEFEU3FU-BNz_PazH.js → tr-TR-DEFEU3FU-CywClmkn.js} +1 -1
- package/dist/viewer-lib/types/src/shared/brand.d.ts +2 -1
- package/dist/viewer-lib/types/src/viewer/components/PageLoader.d.ts +3 -0
- package/dist/viewer-lib/types/src/viewer/components/RyugiLoader.d.ts +5 -0
- package/dist/viewer-lib/types/src/viewer/lib/pageSettle.d.ts +2 -0
- package/dist/viewer-lib/types/src/viewer/library/core.d.ts +3 -0
- package/dist/viewer-lib/{uk-UA-QMV73CPH-Dn_Qrdeq.js → uk-UA-QMV73CPH-CBuRoxji.js} +1 -1
- package/dist/viewer-lib/{vi-VN-M7AON7JQ-C777_3GC.js → vi-VN-M7AON7JQ-CUq13H3z.js} +1 -1
- package/dist/viewer-lib/{viewport-CFJHn_Y6-BrrKKQGr.js → viewport-CFJHn_Y6-NgIgENqw.js} +1 -1
- package/dist/viewer-lib/{zh-CN-LNUGB5OW-yPc5aNBV.js → zh-CN-LNUGB5OW-BRivCR5s.js} +1 -1
- package/dist/viewer-lib/{zh-HK-E62DVLB3-DL9Y2kPe.js → zh-HK-E62DVLB3-DaZXYMh5.js} +1 -1
- package/dist/viewer-lib/{zh-TW-RAJ6MFWO-3VDE8SB2.js → zh-TW-RAJ6MFWO-B7IvI564.js} +1 -1
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-9iOfvOR4.js +0 -12
- package/dist/viewer/ArtifactList-Binw79VZ.js +0 -2
- package/dist/viewer/DocumentLayout-D7hzy6qw.js +0 -2
- package/dist/viewer/DocumentPage-whdrobXS.js +0 -4
- package/dist/viewer/DropdownMenu-CZUIT5ss.js +0 -1
- package/dist/viewer/PreviewLayout-Dvv4xVya.js +0 -2
- package/dist/viewer/WhiteboardLayout-fX2Dx4Ro.js +0 -3
- package/dist/viewer/channel-OqtHMQX0.js +0 -1
- package/dist/viewer/classDiagram-ZZMXUADV-CVstJoyx.js +0 -1
- package/dist/viewer/classDiagram-v2-VYDZK3BY-CVstJoyx.js +0 -1
- package/dist/viewer/flowDiagram-HODETNUW-CzgiVLhq.js +0 -1
- package/dist/viewer/percentages-BXMCSKIN-DvCjqEYt.js +0 -1
- package/dist/viewer/route-BWL5AGYx.js +0 -64
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-Ds741M59.js +0 -1
- package/dist/viewer/subset-shared.chunk-BwlAfs_X.js +0 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-CIbxLGch.js +0 -8
- package/dist/viewer/useCloudStatus-BJMLC8Dr.js +0 -1
- package/dist/viewer-lib/percentages-BXMCSKIN-CN_vO7hH.js +0 -1
- package/dist/viewer-lib/subset-shared.chunk-BI1a3Hz4.js +0 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import './stylex-
|
|
1
|
+
import './stylex-CCivaCRo.css';
|
|
2
2
|
import './document-Dvtvl0mY.css';
|
|
3
|
-
import { Bt as e, Cn as t, Ft as n, It as r, Kt as i, Lt as a, Ot as o, Rt as s, Tn as c, Wt as l, an as u, bn as d, d as f, en as p, h as m, nn as h, on as g, pn as _, tn as v, u as y, v as b, xn as x } from "./route-messages-
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import { a as ie, i as ae } from "./agentLook-
|
|
7
|
-
import { $t as oe, An as se, At as ce, Bt as
|
|
8
|
-
import { n as
|
|
9
|
-
import { Fragment as
|
|
3
|
+
import { Bt as e, Cn as t, Ft as n, It as r, Kt as i, Lt as a, Ot as o, Rt as s, Tn as c, Wt as l, an as u, bn as d, d as f, en as p, h as m, nn as h, on as g, pn as _, tn as v, u as y, v as b, xn as x } from "./route-messages-BOdX3qq4.js";
|
|
4
|
+
import { c as S, l as C, o as w, p as T, s as E, t as D } from "./RyugiLoader-_MZxEs2s.js";
|
|
5
|
+
import { c as O, d as ee, l as te, n as k, o as A, s as j, t as ne, u as re } from "./WarningsBadge-p7-QKPVW.js";
|
|
6
|
+
import { a as ie, i as ae } from "./agentLook-Pf_kpgWG.js";
|
|
7
|
+
import { $t as oe, An as se, At as ce, Bt as M, Cn as N, Ct as P, Fn as le, Gt as ue, Ht as de, In as fe, Jt as pe, Kt as me, Ln as he, Lt as ge, Mn as _e, Nn as ve, On as F, Ot as I, Pn as ye, Qt as be, Rt as xe, Sn as Se, St as Ce, Tt as we, Ut as Te, Vt as Ee, Wt as De, Xt as Oe, Yt as L, Zt as ke, _ as Ae, _t as je, a as Me, bt as Ne, c as Pe, cn as Fe, d as Ie, dt as Le, en as Re, f as ze, fn as R, ft as Be, g as Ve, gt as z, h as He, ht as Ue, i as We, in as B, jn as Ge, kn as Ke, l as qe, m as Je, mn as Ye, mt as Xe, nn as Ze, o as Qe, p as $e, pt as et, qt as tt, r as nt, rn as rt, s as it, t as at, tn as ot, u as st, un as ct, ut as lt, vt as ut, wt as dt, xt as ft, yt as pt, zt as mt } from "./SnapshotDocument-DiIRfl5L.js";
|
|
8
|
+
import { n as ht } from "./plugin-_bGVeqI0-CEaMOsSS.js";
|
|
9
|
+
import { Fragment as gt, cloneElement as _t, createContext as vt, createElement as yt, isValidElement as bt, useCallback as V, useContext as xt, useEffect as H, useLayoutEffect as St, useMemo as U, useRef as W, useState as G, useSyncExternalStore as Ct } from "react";
|
|
10
10
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
11
|
-
import { ArrowDown as
|
|
11
|
+
import { ArrowDown as wt, ChevronDown as Tt, ChevronRight as Et, ChevronUp as Dt, CircleAlert as Ot, LayoutDashboard as kt, Link as At, Lock as jt, MessageSquare as Mt, PanelRightOpen as Nt, PenLine as Pt, RotateCw as Ft, X as It } from "lucide-react";
|
|
12
12
|
// src/viewer/hooks/useEmbedPainted.ts
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let r =
|
|
13
|
+
var Lt = vt(() => {});
|
|
14
|
+
function Rt(t) {
|
|
15
|
+
let r = xt(Lt);
|
|
16
16
|
H(() => {
|
|
17
17
|
if (!t) return;
|
|
18
18
|
let i = 0, a = requestAnimationFrame(() => {
|
|
@@ -26,7 +26,7 @@ function Lt(t) {
|
|
|
26
26
|
}, [t, r]);
|
|
27
27
|
}
|
|
28
28
|
// src/viewer/split/useSplitHeader.ts
|
|
29
|
-
function
|
|
29
|
+
function zt(t, n) {
|
|
30
30
|
let r = U(() => a(), []), [i, o] = G(!1), c = W(n);
|
|
31
31
|
c.current = n, H(() => {
|
|
32
32
|
if (r) return s((e) => {
|
|
@@ -51,37 +51,37 @@ function Rt(t, n) {
|
|
|
51
51
|
]), r && i;
|
|
52
52
|
}
|
|
53
53
|
// src/viewer/document/agentActivity.ts
|
|
54
|
-
function
|
|
54
|
+
function Bt({ editing: e, pending: t, agentActiveAt: n, now: r }) {
|
|
55
55
|
return e ? { kind: "editing" } : t === 0 ? { kind: "idle" } : {
|
|
56
56
|
kind: "working",
|
|
57
57
|
pending: t,
|
|
58
58
|
idleMs: n === void 0 ? null : Math.max(0, r - n)
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return e < 6e4 ?
|
|
61
|
+
function Vt(e) {
|
|
62
|
+
return e < 6e4 ? w.t("time.seconds", { count: Math.floor(e / 1e3) }) : e < 36e5 ? w.t("time.minutes", { count: Math.floor(e / 6e4) }) : w.t("time.hours", { count: Math.floor(e / 36e5) });
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Ht(e, t, n) {
|
|
65
65
|
switch (e.kind) {
|
|
66
|
-
case "editing": return n ?
|
|
66
|
+
case "editing": return n ? w.t("activity.editingSection", {
|
|
67
67
|
agent: t,
|
|
68
68
|
section: n
|
|
69
|
-
}) :
|
|
69
|
+
}) : w.t("activity.editing", { agent: t });
|
|
70
70
|
case "idle": return null;
|
|
71
71
|
case "working": {
|
|
72
|
-
let n =
|
|
72
|
+
let n = w.t("activity.pending", {
|
|
73
73
|
agent: t,
|
|
74
74
|
count: e.pending
|
|
75
75
|
});
|
|
76
|
-
return e.idleMs === null ? n : e.idleMs < 1e4 ?
|
|
76
|
+
return e.idleMs === null ? n : e.idleMs < 1e4 ? w.t("activity.updatedJustNow", { left: n }) : w.t("activity.updatedAgo", {
|
|
77
77
|
left: n,
|
|
78
|
-
duration:
|
|
78
|
+
duration: Vt(e.idleMs)
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
// src/viewer/document/DraftPanel.tsx
|
|
84
|
-
function
|
|
84
|
+
function Ut({ left: e, top: t, quote: n, wholeBlock: r, initial: i, restored: a, leaving: o, onChange: s, onSubmit: c, onCancel: u, ref: d }) {
|
|
85
85
|
return /* @__PURE__ */ q("div", {
|
|
86
86
|
ref: d,
|
|
87
87
|
...{
|
|
@@ -92,7 +92,7 @@ function Ht({ left: e, top: t, quote: n, wholeBlock: r, initial: i, restored: a,
|
|
|
92
92
|
left: e,
|
|
93
93
|
top: t
|
|
94
94
|
},
|
|
95
|
-
children: /* @__PURE__ */ J(
|
|
95
|
+
children: /* @__PURE__ */ J(ft, {
|
|
96
96
|
active: !0,
|
|
97
97
|
children: [/* @__PURE__ */ J("div", {
|
|
98
98
|
className: "x78zum5 x1pha0wt x167g77z xz9dl7a x1hr3lfm xqfszdh x1j6dyjg",
|
|
@@ -101,12 +101,12 @@ function Ht({ left: e, top: t, quote: n, wholeBlock: r, initial: i, restored: a,
|
|
|
101
101
|
children: r ? n : `“${n}”`
|
|
102
102
|
}), a ? /* @__PURE__ */ q("span", {
|
|
103
103
|
className: "x2lah0s x7zghnd",
|
|
104
|
-
children:
|
|
104
|
+
children: E("document.draftRestored")
|
|
105
105
|
}) : null]
|
|
106
106
|
}), /* @__PURE__ */ q(l, {
|
|
107
107
|
autoFocus: !0,
|
|
108
108
|
initial: i,
|
|
109
|
-
placeholder:
|
|
109
|
+
placeholder: E("document.draftPlaceholder"),
|
|
110
110
|
onCancel: u,
|
|
111
111
|
onChange: s,
|
|
112
112
|
onSubmit: c
|
|
@@ -115,8 +115,8 @@ function Ht({ left: e, top: t, quote: n, wholeBlock: r, initial: i, restored: a,
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
// src/viewer/document/drafts.ts
|
|
118
|
-
var
|
|
119
|
-
function
|
|
118
|
+
var Wt = (e, t, n, r) => `${JSON.stringify([n ?? [e], r ?? null])}\n${t}`;
|
|
119
|
+
function Gt() {
|
|
120
120
|
let e = /* @__PURE__ */ new Map();
|
|
121
121
|
return {
|
|
122
122
|
save(t, n) {
|
|
@@ -128,18 +128,18 @@ function Wt() {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
// src/viewer/document/useDraftComment.ts
|
|
131
|
-
function
|
|
132
|
-
let t = U(
|
|
133
|
-
|
|
131
|
+
function Kt(e) {
|
|
132
|
+
let t = U(Gt, []), [n, r] = G(null), [i, a] = G(!1), o = W(""), s = W(0), c = W(null), l = W(null);
|
|
133
|
+
dt(i ? null : n?.target.range ?? null, i ? void 0 : n?.target.elements);
|
|
134
134
|
let u = V((n) => {
|
|
135
135
|
window.clearTimeout(s.current);
|
|
136
|
-
let i = t.take(
|
|
136
|
+
let i = t.take(Wt(n.blockId, n.quote, n.blockIds, n.textRanges));
|
|
137
137
|
o.current = i, a(!1), r({
|
|
138
138
|
target: n,
|
|
139
139
|
initial: i
|
|
140
140
|
}), window.getSelection()?.removeAllRanges(), e();
|
|
141
141
|
}, [t, e]), d = V((e) => {
|
|
142
|
-
n && (t.save(
|
|
142
|
+
n && (t.save(Wt(n.target.blockId, n.target.quote, n.target.blockIds, n.target.textRanges), e ? o.current : ""), a(!0), s.current = window.setTimeout(() => {
|
|
143
143
|
r(null), a(!1);
|
|
144
144
|
}, 120));
|
|
145
145
|
}, [n, t]);
|
|
@@ -168,16 +168,16 @@ function Gt(e) {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
// src/viewer/document/DesktopDocument.tsx
|
|
171
|
-
function
|
|
171
|
+
function qt(e) {
|
|
172
172
|
return {
|
|
173
173
|
left: e.offsetLeft,
|
|
174
174
|
right: Math.min(e.offsetLeft + e.offsetWidth, window.innerWidth - 16)
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let p =
|
|
177
|
+
function Jt({ editor: e, threads: t, actions: n, agent: r, canComment: i, selection: a, clearSelection: o, resolveSelection: s, onCreate: c, onMain: l, history: u, shareBase: d, children: f }) {
|
|
178
|
+
let p = Kt(o), { draft: m, open: h } = p, [g, _] = G(null), v = U(() => ({
|
|
179
179
|
toolbarSlot: g,
|
|
180
|
-
selectionActions: m ? null : /* @__PURE__ */ q(
|
|
180
|
+
selectionActions: m ? null : /* @__PURE__ */ q(je, {
|
|
181
181
|
onComment: i ? () => {
|
|
182
182
|
let e = s();
|
|
183
183
|
e && h(e);
|
|
@@ -198,63 +198,63 @@ function qt({ editor: e, threads: t, actions: n, agent: r, canComment: i, select
|
|
|
198
198
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
199
199
|
className: "ryugi-editor-toolbar-slot",
|
|
200
200
|
ref: _
|
|
201
|
-
}), /* @__PURE__ */ q(
|
|
201
|
+
}), /* @__PURE__ */ q(ut, {
|
|
202
202
|
actions: n,
|
|
203
203
|
agent: r,
|
|
204
204
|
editor: e,
|
|
205
205
|
history: u,
|
|
206
206
|
shareBase: d,
|
|
207
207
|
threads: t,
|
|
208
|
-
overlay: (e) => /* @__PURE__ */ J(K, { children: [a && !m && a.kind === "block" && i ? /* @__PURE__ */ q(
|
|
208
|
+
overlay: (e) => /* @__PURE__ */ J(K, { children: [a && !m && a.kind === "block" && i ? /* @__PURE__ */ q(z, {
|
|
209
209
|
ref: p.toolbarRef,
|
|
210
210
|
top: a.top,
|
|
211
211
|
left: Math.min(a.right + 8, window.innerWidth - (e.offsetParent?.getBoundingClientRect().left ?? 0) - 40),
|
|
212
212
|
onComment: () => p.open(a)
|
|
213
|
-
}) : null, m ? /* @__PURE__ */ q(
|
|
213
|
+
}) : null, m ? /* @__PURE__ */ q(Ut, {
|
|
214
214
|
ref: p.panelRef,
|
|
215
|
-
...
|
|
215
|
+
...xe(m.target, qt(e), 340, 8),
|
|
216
216
|
initial: m.initial,
|
|
217
217
|
leaving: p.leaving,
|
|
218
|
-
quote:
|
|
218
|
+
quote: M(m.target),
|
|
219
219
|
restored: p.restored,
|
|
220
220
|
wholeBlock: m.target.kind === "block",
|
|
221
221
|
onCancel: () => p.close(!0),
|
|
222
222
|
onChange: p.onText,
|
|
223
223
|
onSubmit: (e) => c(m.target, e).then((e) => (e && p.close(!1), e))
|
|
224
|
-
},
|
|
224
|
+
}, Wt(m.target.blockId, m.target.quote, m.target.blockIds, m.target.textRanges)) : null] }),
|
|
225
225
|
onMain: l,
|
|
226
|
-
children: /* @__PURE__ */ q(
|
|
226
|
+
children: /* @__PURE__ */ q(mt, {
|
|
227
227
|
value: v,
|
|
228
228
|
children: f
|
|
229
229
|
})
|
|
230
230
|
})] });
|
|
231
231
|
}
|
|
232
232
|
// src/viewer/document/AskBar.tsx
|
|
233
|
-
function
|
|
233
|
+
function Yt({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, bottom: a, onSubmit: o, onWithdraw: s, onJump: c }) {
|
|
234
234
|
let { t: l } = S(), u = a === void 0 ? void 0 : { bottom: a };
|
|
235
235
|
if (!t) return null;
|
|
236
236
|
let d = e.filter((e) => e.state === "draft");
|
|
237
237
|
if (d.length) {
|
|
238
238
|
let e = d.filter((e) => e.changed).length, t = d.filter((e) => e.choice === null && e.text === null);
|
|
239
|
-
return /* @__PURE__ */ J(
|
|
239
|
+
return /* @__PURE__ */ J(A, {
|
|
240
240
|
"data-ask-bar": !0,
|
|
241
241
|
"data-chrome": "ask-bar",
|
|
242
242
|
position: "fixed",
|
|
243
243
|
style: u,
|
|
244
244
|
children: [
|
|
245
|
-
/* @__PURE__ */ q(
|
|
246
|
-
e > 0 && /* @__PURE__ */ q(
|
|
245
|
+
/* @__PURE__ */ q(te, { children: l("asks.questions", { count: d.length }) }),
|
|
246
|
+
e > 0 && /* @__PURE__ */ q(te, {
|
|
247
247
|
tone: "changed",
|
|
248
248
|
children: l("asks.changedCount", { count: e })
|
|
249
249
|
}),
|
|
250
|
-
t.length > 0 && /* @__PURE__ */ J(
|
|
250
|
+
t.length > 0 && /* @__PURE__ */ J(j, {
|
|
251
251
|
"data-ask-jump": !0,
|
|
252
252
|
variant: "link",
|
|
253
253
|
onClick: () => c(t[0].id),
|
|
254
|
-
children: [l("asks.pendingCount", { count: t.length }), /* @__PURE__ */ q(
|
|
254
|
+
children: [l("asks.pendingCount", { count: t.length }), /* @__PURE__ */ q(wt, { size: 12 })]
|
|
255
255
|
}),
|
|
256
|
-
/* @__PURE__ */ q(
|
|
257
|
-
/* @__PURE__ */ q(
|
|
256
|
+
/* @__PURE__ */ q(O, {}),
|
|
257
|
+
/* @__PURE__ */ q(j, {
|
|
258
258
|
"data-ask-submit": !0,
|
|
259
259
|
variant: "primary",
|
|
260
260
|
onClick: o,
|
|
@@ -263,15 +263,15 @@ function Jt({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, botto
|
|
|
263
263
|
]
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
|
-
return e.some((e) => e.state === "submitted") ? /* @__PURE__ */ J(
|
|
266
|
+
return e.some((e) => e.state === "submitted") ? /* @__PURE__ */ J(A, {
|
|
267
267
|
"data-ask-bar": !0,
|
|
268
268
|
"data-chrome": "ask-bar",
|
|
269
269
|
position: "fixed",
|
|
270
270
|
style: u,
|
|
271
|
-
children: [/* @__PURE__ */ q(
|
|
271
|
+
children: [/* @__PURE__ */ q(te, {
|
|
272
272
|
tone: "muted",
|
|
273
273
|
children: r ? l("asks.waiting", { agent: i }) : l("asks.sayDone")
|
|
274
|
-
}), n && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
274
|
+
}), n && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(O, {}), /* @__PURE__ */ q(j, {
|
|
275
275
|
"data-ask-withdraw": !0,
|
|
276
276
|
variant: "quiet",
|
|
277
277
|
onClick: s,
|
|
@@ -280,7 +280,7 @@ function Jt({ views: e, canAct: t, canWithdraw: n, listening: r, agent: i, botto
|
|
|
280
280
|
}) : null;
|
|
281
281
|
}
|
|
282
282
|
// src/viewer/document/PhoneThread.tsx
|
|
283
|
-
var
|
|
283
|
+
var Xt = {
|
|
284
284
|
state: {
|
|
285
285
|
kmuXW: "x2lah0s",
|
|
286
286
|
kGuDYH: "xfifm61",
|
|
@@ -298,20 +298,20 @@ var Yt = {
|
|
|
298
298
|
kMwMTN: "xddlp02",
|
|
299
299
|
$$css: !0
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, Zt = (e) => new Date(e).toLocaleTimeString([], {
|
|
302
302
|
hour: "2-digit",
|
|
303
303
|
minute: "2-digit"
|
|
304
304
|
});
|
|
305
|
-
function
|
|
305
|
+
function Qt({ thread: e, agent: t = "Agent", actions: n, active: r = !1, offline: a = !1 }) {
|
|
306
306
|
let o = d(e), s = e.status === "resolved", c = s ? {
|
|
307
|
-
label:
|
|
308
|
-
tone:
|
|
307
|
+
label: E("common.resolved"),
|
|
308
|
+
tone: Xt.resolved
|
|
309
309
|
} : o === "agent" ? {
|
|
310
|
-
label:
|
|
311
|
-
tone:
|
|
310
|
+
label: E("document.waitingAgentReply", { agent: t }),
|
|
311
|
+
tone: Xt.waitingAgent
|
|
312
312
|
} : o === "human" ? {
|
|
313
|
-
label:
|
|
314
|
-
tone:
|
|
313
|
+
label: E("document.agentReplied", { agent: t }),
|
|
314
|
+
tone: Xt.answered
|
|
315
315
|
} : null;
|
|
316
316
|
return /* @__PURE__ */ J("div", {
|
|
317
317
|
"data-thread": e.id,
|
|
@@ -324,9 +324,9 @@ function Zt({ thread: e, agent: t = "Agent", actions: n, active: r = !1, offline
|
|
|
324
324
|
className: "x78zum5 x1pha0wt x167g77z x1lqa7cf x1vo0akb x19ypqd9 x1o5kxid x4z9k3i",
|
|
325
325
|
children: [/* @__PURE__ */ q("span", {
|
|
326
326
|
className: "x98rzlu xeuugli xb3r6kr xuxw1ft xlyipyv x1bo0w0s",
|
|
327
|
-
children:
|
|
327
|
+
children: M(e.anchor)
|
|
328
328
|
}), c ? /* @__PURE__ */ q("span", {
|
|
329
|
-
...
|
|
329
|
+
...C(Xt.state, c.tone),
|
|
330
330
|
children: c.label
|
|
331
331
|
}) : null]
|
|
332
332
|
}),
|
|
@@ -346,7 +346,7 @@ function Zt({ thread: e, agent: t = "Agent", actions: n, active: r = !1, offline
|
|
|
346
346
|
t,
|
|
347
347
|
/* @__PURE__ */ q("span", {
|
|
348
348
|
className: "xddlp02 xo1l8bm xfifm61",
|
|
349
|
-
children:
|
|
349
|
+
children: Zt(e.editedAt ?? e.at)
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
352
|
}), /* @__PURE__ */ q("div", {
|
|
@@ -354,7 +354,7 @@ function Zt({ thread: e, agent: t = "Agent", actions: n, active: r = !1, offline
|
|
|
354
354
|
0: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe" },
|
|
355
355
|
1: { className: "x1gslohp xxpkpgd x1jvydc1 x1dbl2gt x126k92a xj0a0fe xc7n51q" }
|
|
356
356
|
}[!!e.deleted | 0],
|
|
357
|
-
children: e.deleted ?
|
|
357
|
+
children: e.deleted ? E("common.deleted") : e.text
|
|
358
358
|
})]
|
|
359
359
|
}, e.id);
|
|
360
360
|
}),
|
|
@@ -363,22 +363,22 @@ function Zt({ thread: e, agent: t = "Agent", actions: n, active: r = !1, offline
|
|
|
363
363
|
children: [s ? null : /* @__PURE__ */ q("div", {
|
|
364
364
|
className: "x98rzlu xeuugli x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
|
|
365
365
|
children: /* @__PURE__ */ q(l, {
|
|
366
|
-
placeholder:
|
|
366
|
+
placeholder: E("common.reply"),
|
|
367
367
|
onSubmit: (t) => n.reply(e.id, t)
|
|
368
368
|
})
|
|
369
369
|
}), a ? null : /* @__PURE__ */ q("button", {
|
|
370
370
|
type: "button",
|
|
371
371
|
onClick: () => s ? n.reopen(e.id) : n.resolve(e.id),
|
|
372
372
|
className: "x2lah0s x1gg8mnh xt970qd xdqyycr x1w5wx5t xc342km xjbqb8w x1bo0w0s xqfszdh x4z9k3i x1ypdohk",
|
|
373
|
-
children:
|
|
373
|
+
children: E(s ? "common.reopen" : "common.resolve")
|
|
374
374
|
})]
|
|
375
375
|
}) : null
|
|
376
376
|
]
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
var
|
|
380
|
-
function
|
|
381
|
-
let f = W(null), p = e.filter((e) => !e.messages.every((e) => e.deleted)), h = p.filter((e) => d(e) === "agent").length, g = r ?
|
|
379
|
+
var $t = .5, en = (e) => e === 78 ? $t : e;
|
|
380
|
+
function tn({ threads: e, agent: t = "Agent", actions: n, offline: r, draft: i, onCreate: a, onCancelDraft: o, activeId: s, snap: c, onSnap: u }) {
|
|
381
|
+
let f = W(null), p = e.filter((e) => !e.messages.every((e) => e.deleted)), h = p.filter((e) => d(e) === "agent").length, g = r ? E("document.offlineNoComments") : h > 0 ? E("document.waitingCount", {
|
|
382
382
|
count: h,
|
|
383
383
|
agent: t
|
|
384
384
|
}) : null;
|
|
@@ -396,17 +396,17 @@ function en({ threads: e, agent: t = "Agent", actions: n, offline: r, draft: i,
|
|
|
396
396
|
snap: c,
|
|
397
397
|
snaps: [
|
|
398
398
|
78,
|
|
399
|
-
|
|
399
|
+
$t,
|
|
400
400
|
1
|
|
401
401
|
],
|
|
402
402
|
header: /* @__PURE__ */ J("span", {
|
|
403
403
|
className: "x78zum5 x1pha0wt x17d4w8g xu0aao5 x17qtykl xwib8y2 xqfszdh x1jvydc1 x1s688f",
|
|
404
|
-
children: [
|
|
404
|
+
children: [E("document.sheetComments", { count: p.length }), g ? /* @__PURE__ */ J("span", {
|
|
405
405
|
className: "xddlp02 xfifm61 xo1l8bm",
|
|
406
406
|
children: ["· ", g]
|
|
407
407
|
}) : null]
|
|
408
408
|
}),
|
|
409
|
-
onScrim: () => u(
|
|
409
|
+
onScrim: () => u($t),
|
|
410
410
|
onSnap: u,
|
|
411
411
|
children: /* @__PURE__ */ J("div", {
|
|
412
412
|
ref: f,
|
|
@@ -418,27 +418,27 @@ function en({ threads: e, agent: t = "Agent", actions: n, offline: r, draft: i,
|
|
|
418
418
|
className: "x78zum5 x1pha0wt x167g77z x4z9k3i",
|
|
419
419
|
children: [/* @__PURE__ */ q("span", {
|
|
420
420
|
className: "x98rzlu xeuugli x1lqa7cf x1vo0akb x19ypqd9 x1o5kxid xb3r6kr xuxw1ft xlyipyv x1bo0w0s",
|
|
421
|
-
children:
|
|
421
|
+
children: M(i)
|
|
422
422
|
}), /* @__PURE__ */ q("button", {
|
|
423
423
|
type: "button",
|
|
424
424
|
onClick: o,
|
|
425
425
|
className: "x1717udv xc342km xjbqb8w xddlp02 x4z9k3i x1ypdohk",
|
|
426
|
-
children:
|
|
426
|
+
children: E("common.cancel")
|
|
427
427
|
})]
|
|
428
428
|
}), /* @__PURE__ */ q("div", {
|
|
429
429
|
className: "x1xmf6yo x1qyh8g1 xso031l x1q0q8m5 x1iz93xd",
|
|
430
430
|
children: /* @__PURE__ */ q(l, {
|
|
431
431
|
autoFocus: !0,
|
|
432
|
-
placeholder:
|
|
432
|
+
placeholder: E("document.agentPlaceholder"),
|
|
433
433
|
onSubmit: (e) => a(i, e).then((e) => (e && o(), e))
|
|
434
434
|
})
|
|
435
435
|
})]
|
|
436
436
|
}) : null,
|
|
437
437
|
p.length === 0 && !i ? /* @__PURE__ */ q("div", {
|
|
438
438
|
className: "xr9q8rw xddlp02 xqfszdh x4z9k3i x2b8uid",
|
|
439
|
-
children:
|
|
439
|
+
children: E("document.noComments")
|
|
440
440
|
}) : null,
|
|
441
|
-
p.map((e) => /* @__PURE__ */ q(
|
|
441
|
+
p.map((e) => /* @__PURE__ */ q(Qt, {
|
|
442
442
|
actions: n,
|
|
443
443
|
active: e.id === s,
|
|
444
444
|
agent: t,
|
|
@@ -450,49 +450,49 @@ function en({ threads: e, agent: t = "Agent", actions: n, offline: r, draft: i,
|
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
452
|
// src/viewer/document/useDocumentAsks.ts
|
|
453
|
-
var
|
|
454
|
-
function
|
|
455
|
-
let [t, n] = G(() =>
|
|
453
|
+
var nn = (e) => e ? c(e.getEditorState().toJSON()) : [], rn = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
454
|
+
function an(e) {
|
|
455
|
+
let [t, n] = G(() => nn(e));
|
|
456
456
|
return H(() => {
|
|
457
457
|
if (!e) return;
|
|
458
458
|
let t = () => n((t) => {
|
|
459
|
-
let n =
|
|
460
|
-
return
|
|
459
|
+
let n = nn(e);
|
|
460
|
+
return rn(t, n) ? t : n;
|
|
461
461
|
});
|
|
462
462
|
return t(), e.registerUpdateListener(t);
|
|
463
463
|
}, [e]), t;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return e.registerMutationListener(
|
|
465
|
+
function on(e) {
|
|
466
|
+
return e.registerMutationListener(Ue, (t) => {
|
|
467
467
|
let n = [...t].filter(([, e]) => e === "created").map(([e]) => e);
|
|
468
468
|
n.length && e.update(() => {
|
|
469
469
|
let t = /* @__PURE__ */ new Map();
|
|
470
|
-
for (let [r, i] of e.getEditorState()._nodeMap) i instanceof
|
|
470
|
+
for (let [r, i] of e.getEditorState()._nodeMap) i instanceof Ue && !n.includes(r) && t.set(i.__ask.askId, r);
|
|
471
471
|
for (let e of n) {
|
|
472
|
-
let n =
|
|
473
|
-
n instanceof
|
|
472
|
+
let n = rt(e);
|
|
473
|
+
n instanceof Ue && (t.has(n.__ask.askId) ? n.remove() : t.set(n.__ask.askId, e));
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
// src/viewer/document/DocumentAsks.tsx
|
|
479
|
-
var
|
|
479
|
+
var sn = (e) => ({
|
|
480
480
|
op: "create",
|
|
481
481
|
blockId: "*",
|
|
482
482
|
quote: "",
|
|
483
483
|
submit: e,
|
|
484
484
|
text: e ? "Submitted the answers" : "Withdrew the submit"
|
|
485
485
|
});
|
|
486
|
-
function
|
|
486
|
+
function cn(e) {
|
|
487
487
|
let t = document.querySelector(`[data-ask-tag="${CSS.escape(e)}"]`);
|
|
488
488
|
t?.scrollIntoView({
|
|
489
489
|
block: "center",
|
|
490
490
|
behavior: "smooth"
|
|
491
491
|
}), t?.focus({ preventScroll: !0 });
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
let c =
|
|
495
|
-
H(() => e && i ?
|
|
493
|
+
function ln({ editor: e, threads: n, send: r, canAct: i, listening: a, agent: o, phone: s }) {
|
|
494
|
+
let c = an(e);
|
|
495
|
+
H(() => e && i ? on(e) : void 0, [e, i]);
|
|
496
496
|
let l = U(() => x(c, n).filter((e) => e.state !== "orphan"), [c, n]), u = U(() => {
|
|
497
497
|
try {
|
|
498
498
|
return t(n), !0;
|
|
@@ -500,20 +500,20 @@ function cn({ editor: e, threads: n, send: r, canAct: i, listening: a, agent: o,
|
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
}, [n]);
|
|
503
|
-
return l.length ? /* @__PURE__ */ q(
|
|
503
|
+
return l.length ? /* @__PURE__ */ q(Yt, {
|
|
504
504
|
agent: o,
|
|
505
505
|
bottom: s ? 90 : void 0,
|
|
506
506
|
canAct: i,
|
|
507
507
|
canWithdraw: u,
|
|
508
508
|
listening: a,
|
|
509
509
|
views: l,
|
|
510
|
-
onJump:
|
|
511
|
-
onSubmit: () => r(
|
|
512
|
-
onWithdraw: () => r(
|
|
510
|
+
onJump: cn,
|
|
511
|
+
onSubmit: () => r(sn(!0)),
|
|
512
|
+
onWithdraw: () => r(sn(!1))
|
|
513
513
|
}) : null;
|
|
514
514
|
}
|
|
515
515
|
// src/viewer/document/history.ts
|
|
516
|
-
async function
|
|
516
|
+
async function un(e) {
|
|
517
517
|
await new Promise((e) => setTimeout(e, 0));
|
|
518
518
|
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 = [];
|
|
519
519
|
try {
|
|
@@ -544,20 +544,20 @@ async function ln(e) {
|
|
|
544
544
|
shallow: n.length > 0
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function dn(e, t, n) {
|
|
548
548
|
let r = e.fork(), i;
|
|
549
549
|
try {
|
|
550
550
|
r.checkout(t);
|
|
551
|
-
let e = r.getTree(
|
|
552
|
-
if (e.length !== 1) throw Error(
|
|
553
|
-
let a =
|
|
551
|
+
let e = r.getTree(He).roots();
|
|
552
|
+
if (e.length !== 1) throw Error(w.t("history.contentUnavailable"));
|
|
553
|
+
let a = N({
|
|
554
554
|
nodes: n,
|
|
555
555
|
editable: !1,
|
|
556
556
|
onError: (e) => {
|
|
557
557
|
throw e;
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
|
-
i =
|
|
560
|
+
i = Ve(a, r);
|
|
561
561
|
let o = e[0].children() ?? [], s = /* @__PURE__ */ new Map(), c = (e, t) => {
|
|
562
562
|
s.set(e.id, t), e.children()?.forEach((e) => c(e, t));
|
|
563
563
|
};
|
|
@@ -570,9 +570,9 @@ function un(e, t, n) {
|
|
|
570
570
|
i?.dispose(), r.free();
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
var
|
|
574
|
-
function
|
|
575
|
-
let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(
|
|
573
|
+
var fn = /^cid:(\d+@\d+):Map$/;
|
|
574
|
+
function pn(e, t, n) {
|
|
575
|
+
let r = new Map(n.flatMap((e) => [...e.owners])), i = e.getTree(He), a = /* @__PURE__ */ new Map(), o = new Map(t.map((e, t) => [e, t])), s = (e, t) => {
|
|
576
576
|
let n = a.get(e);
|
|
577
577
|
(!n || o.get(n) < o.get(t)) && a.set(e, t);
|
|
578
578
|
};
|
|
@@ -584,7 +584,7 @@ function fn(e, t, n) {
|
|
|
584
584
|
}, a)) {
|
|
585
585
|
let t = e.getContainerById(o);
|
|
586
586
|
for (; t;) {
|
|
587
|
-
let e =
|
|
587
|
+
let e = fn.exec(t.id)?.[1], i = e && r.get(e);
|
|
588
588
|
if (i) {
|
|
589
589
|
s(i, n);
|
|
590
590
|
break;
|
|
@@ -602,8 +602,8 @@ function fn(e, t, n) {
|
|
|
602
602
|
return a;
|
|
603
603
|
}
|
|
604
604
|
// ../../node_modules/.pnpm/@lexical+headless@0.53.0_typescript@6.0.3/node_modules/@lexical/headless/dist/LexicalHeadless.prod.js
|
|
605
|
-
function
|
|
606
|
-
let t =
|
|
605
|
+
function mn(e) {
|
|
606
|
+
let t = N(e);
|
|
607
607
|
return t._headless = !0, [
|
|
608
608
|
"registerDecoratorListener",
|
|
609
609
|
"registerRootListener",
|
|
@@ -627,7 +627,7 @@ function pn(e) {
|
|
|
627
627
|
}), t;
|
|
628
628
|
}
|
|
629
629
|
// ../../node_modules/.pnpm/@haklex+rich-compose@0.64.2_eda8eaf99d7dfc5a58f88d8db1e19c32/node_modules/@haklex/rich-compose/dist/compose-DLkWiSFw.js
|
|
630
|
-
function
|
|
630
|
+
function hn({ text: e }) {
|
|
631
631
|
let t = W(null), n = W(null);
|
|
632
632
|
return H(() => {
|
|
633
633
|
let r = t.current;
|
|
@@ -644,7 +644,7 @@ function mn({ text: e }) {
|
|
|
644
644
|
ref: t
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
var Y = (e) => `${
|
|
647
|
+
var Y = (e) => `${fe[e]} ${he[e]}`, gn = {
|
|
648
648
|
h1: Y("headingH1"),
|
|
649
649
|
h2: Y("headingH2"),
|
|
650
650
|
h3: Y("headingH3"),
|
|
@@ -652,14 +652,14 @@ var Y = (e) => `${F[e]} ${pe[e]}`, hn = {
|
|
|
652
652
|
h5: Y("headingH5"),
|
|
653
653
|
h6: Y("headingH6")
|
|
654
654
|
};
|
|
655
|
-
function
|
|
655
|
+
function _n(e) {
|
|
656
656
|
return e.toLowerCase().trim().replaceAll(/[^\s\w\u3000-\u9FFF\uAC00-\uD7AF\uFF00-\uFFEF-]/g, "").replaceAll(/[\s_]+/g, "-").replaceAll(/^-+|-+$/g, "");
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(
|
|
658
|
+
function vn(e) {
|
|
659
|
+
return e.type === "comment" ? "" : e.text ? e.text : e.children ? e.children.map(vn).join("") : "";
|
|
660
660
|
}
|
|
661
|
-
var
|
|
662
|
-
function
|
|
661
|
+
var yn = /^["'«‘“‹「『"']/, bn = /["'»’”›」』"']$/;
|
|
662
|
+
function xn(e, t, n, r, i, a) {
|
|
663
663
|
switch (e.type) {
|
|
664
664
|
case "root": return /* @__PURE__ */ q(K, { children: n });
|
|
665
665
|
case "paragraph": {
|
|
@@ -671,19 +671,19 @@ function bn(e, t, n, r, i, a) {
|
|
|
671
671
|
}, t);
|
|
672
672
|
}
|
|
673
673
|
case "heading": {
|
|
674
|
-
let o = e.tag, s =
|
|
674
|
+
let o = e.tag, s = _n(i || vn(e)), c = a ?? s;
|
|
675
675
|
if (a === void 0 && s) {
|
|
676
676
|
let e = r.get(s);
|
|
677
677
|
e === void 0 ? r.set(s, 1) : (c = `${s}-${e}`, r.set(s, e + 1));
|
|
678
678
|
}
|
|
679
679
|
return /* @__PURE__ */ J(o, {
|
|
680
|
-
className:
|
|
680
|
+
className: gn[o],
|
|
681
681
|
id: c || void 0,
|
|
682
682
|
children: [c && /* @__PURE__ */ q("a", {
|
|
683
683
|
className: Y("headingAnchor"),
|
|
684
684
|
href: `#${c}`,
|
|
685
685
|
tabIndex: 0,
|
|
686
|
-
children: /* @__PURE__ */ q(
|
|
686
|
+
children: /* @__PURE__ */ q(At, {
|
|
687
687
|
"aria-hidden": !0,
|
|
688
688
|
size: 14,
|
|
689
689
|
strokeWidth: 2
|
|
@@ -693,7 +693,7 @@ function bn(e, t, n, r, i, a) {
|
|
|
693
693
|
}
|
|
694
694
|
case "rich-quote":
|
|
695
695
|
case "quote": {
|
|
696
|
-
let r = (i ||
|
|
696
|
+
let r = (i || vn(e)).trim(), a = yn.test(r), o = bn.test(r), s = e.attribution;
|
|
697
697
|
return /* @__PURE__ */ J("blockquote", {
|
|
698
698
|
className: Y("quote"),
|
|
699
699
|
"data-no-close-quote": o ? "" : void 0,
|
|
@@ -725,14 +725,14 @@ function bn(e, t, n, r, i, a) {
|
|
|
725
725
|
href: e.url,
|
|
726
726
|
rel: e.rel || "noopener",
|
|
727
727
|
target: e.target || "_blank",
|
|
728
|
-
children: [/* @__PURE__ */ q(
|
|
728
|
+
children: [/* @__PURE__ */ q(ue, { href: e.url }), n]
|
|
729
729
|
}, t);
|
|
730
730
|
case "autolink": return /* @__PURE__ */ J("a", {
|
|
731
731
|
className: Y("link"),
|
|
732
732
|
href: e.url,
|
|
733
733
|
rel: "noopener",
|
|
734
734
|
target: "_blank",
|
|
735
|
-
children: [/* @__PURE__ */ q(
|
|
735
|
+
children: [/* @__PURE__ */ q(ue, { href: e.url }), n]
|
|
736
736
|
}, t);
|
|
737
737
|
case "horizontalrule": return /* @__PURE__ */ q("hr", { className: Y("hr") }, t);
|
|
738
738
|
case "table": return /* @__PURE__ */ q("div", {
|
|
@@ -754,13 +754,13 @@ function bn(e, t, n, r, i, a) {
|
|
|
754
754
|
case "details": {
|
|
755
755
|
let r = e.summary || "";
|
|
756
756
|
return /* @__PURE__ */ J("details", {
|
|
757
|
-
className: `${
|
|
757
|
+
className: `${L.details} ${Oe.details}`,
|
|
758
758
|
open: e.open || void 0,
|
|
759
759
|
children: [/* @__PURE__ */ J("summary", {
|
|
760
|
-
className: `${
|
|
760
|
+
className: `${L.summary} ${Oe.summary}`,
|
|
761
761
|
children: [/* @__PURE__ */ q("span", {
|
|
762
762
|
"aria-hidden": "true",
|
|
763
|
-
className: `${
|
|
763
|
+
className: `${L.chevron} ${Oe.chevron}`,
|
|
764
764
|
children: /* @__PURE__ */ q("svg", {
|
|
765
765
|
fill: "none",
|
|
766
766
|
height: "20",
|
|
@@ -773,11 +773,11 @@ function bn(e, t, n, r, i, a) {
|
|
|
773
773
|
children: /* @__PURE__ */ q("path", { d: "M8 6L12 10L8 14" })
|
|
774
774
|
})
|
|
775
775
|
}), /* @__PURE__ */ q("span", {
|
|
776
|
-
className: `${
|
|
776
|
+
className: `${L.summaryText} ${Oe.summaryText}`,
|
|
777
777
|
children: r
|
|
778
778
|
})]
|
|
779
779
|
}), /* @__PURE__ */ q("div", {
|
|
780
|
-
className: `${
|
|
780
|
+
className: `${L.content} ${Oe.content}`,
|
|
781
781
|
children: n
|
|
782
782
|
})]
|
|
783
783
|
}, t);
|
|
@@ -790,14 +790,14 @@ function bn(e, t, n, r, i, a) {
|
|
|
790
790
|
}, t);
|
|
791
791
|
case "tag": return /* @__PURE__ */ q("span", {
|
|
792
792
|
className: Y("tag"),
|
|
793
|
-
style: { backgroundColor:
|
|
793
|
+
style: { backgroundColor: ot(e.text) },
|
|
794
794
|
children: e.text
|
|
795
795
|
}, t);
|
|
796
|
-
case "comment": return /* @__PURE__ */ q(
|
|
797
|
-
case "ruby": return
|
|
796
|
+
case "comment": return /* @__PURE__ */ q(hn, { text: e.text ?? "" }, t);
|
|
797
|
+
case "ruby": return yt(ye, {
|
|
798
798
|
key: t,
|
|
799
799
|
rendererKey: "Ruby",
|
|
800
|
-
defaultRenderer:
|
|
800
|
+
defaultRenderer: De,
|
|
801
801
|
props: {
|
|
802
802
|
reading: e.reading ?? "",
|
|
803
803
|
children: n
|
|
@@ -813,7 +813,7 @@ function bn(e, t, n, r, i, a) {
|
|
|
813
813
|
default: return null;
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
var
|
|
816
|
+
var Sn = (e) => `${fe[e]} ${he[e]}`, Cn = [
|
|
817
817
|
[1, "textBold"],
|
|
818
818
|
[2, "textItalic"],
|
|
819
819
|
[4, "textStrikethrough"],
|
|
@@ -823,7 +823,7 @@ var xn = (e) => `${F[e]} ${pe[e]}`, Sn = [
|
|
|
823
823
|
[64, "textSuperscript"],
|
|
824
824
|
[128, "textHighlight"]
|
|
825
825
|
];
|
|
826
|
-
function
|
|
826
|
+
function wn(e) {
|
|
827
827
|
let t = {};
|
|
828
828
|
for (let n of e.split(";")) {
|
|
829
829
|
let e = n.indexOf(":");
|
|
@@ -835,18 +835,18 @@ function Cn(e) {
|
|
|
835
835
|
}
|
|
836
836
|
return t;
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function Tn(e, t) {
|
|
839
839
|
let n = e.text, r = e.format || 0;
|
|
840
|
-
for (let [e, i] of
|
|
841
|
-
className:
|
|
840
|
+
for (let [e, i] of Cn) r & e && (n = /* @__PURE__ */ q("span", {
|
|
841
|
+
className: Sn(i),
|
|
842
842
|
children: n
|
|
843
843
|
}, `${t}-${e}`));
|
|
844
844
|
return e.style && (n = /* @__PURE__ */ q("span", {
|
|
845
|
-
style:
|
|
845
|
+
style: wn(e.style),
|
|
846
846
|
children: n
|
|
847
847
|
}, t)), n;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function En(e, t = !1) {
|
|
850
850
|
let n = [], r = t ? e.findIndex((e) => e.type === "paragraph") : -1, i = (e) => e.type === "image" && typeof e.layout == "string" && e.layout.startsWith("float-");
|
|
851
851
|
for (let t = 0; t < e.length; t++) {
|
|
852
852
|
let a = [t];
|
|
@@ -867,7 +867,7 @@ function Tn(e, t = !1) {
|
|
|
867
867
|
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);
|
|
868
868
|
return a;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Dn(e) {
|
|
871
871
|
let t = {}, n = /* @__PURE__ */ new Set(), r = {}, i = 1;
|
|
872
872
|
function a(e) {
|
|
873
873
|
if (e.type === "footnote" && e.identifier) {
|
|
@@ -884,35 +884,35 @@ function En(e) {
|
|
|
884
884
|
displayNumberMap: r
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
var
|
|
888
|
-
function
|
|
887
|
+
var On = (e) => `${fe.alert} ${he.alert} rich-alert-${e}`;
|
|
888
|
+
function kn(e, t, n) {
|
|
889
889
|
switch (e.type) {
|
|
890
|
-
case "alert-quote": return
|
|
890
|
+
case "alert-quote": return yt("div", {
|
|
891
891
|
key: t,
|
|
892
|
-
className:
|
|
892
|
+
className: On(e.alertType)
|
|
893
893
|
}, n);
|
|
894
|
-
case "banner": return
|
|
894
|
+
case "banner": return yt("div", {
|
|
895
895
|
key: t,
|
|
896
896
|
className: `rich-banner rich-banner-${e.bannerType}`
|
|
897
897
|
}, n);
|
|
898
|
-
case "grid-container": return
|
|
898
|
+
case "grid-container": return yt("div", {
|
|
899
899
|
key: t,
|
|
900
|
-
className: `${
|
|
900
|
+
className: `${ke.container} ${be.container}`
|
|
901
901
|
}, n);
|
|
902
|
-
default: return
|
|
902
|
+
default: return bt(n) ? _t(n, { key: t }) : n;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
905
|
+
function An(e, t, n) {
|
|
906
|
+
return bt(e) && typeof e.type == "string" ? _t(e, { "data-block-id": t }) : /* @__PURE__ */ q("div", {
|
|
907
907
|
className: "rich-block-anchor",
|
|
908
908
|
"data-block-id": t,
|
|
909
909
|
children: e
|
|
910
910
|
}, `${n}-block-anchor`);
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return t ? (r.blockAnchor ??
|
|
912
|
+
function jn(e, t, n, r) {
|
|
913
|
+
return t ? (r.blockAnchor ?? An)(e, t, n) : e;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function Mn(e, t, n, r, i, a, o) {
|
|
916
916
|
let s = o.recycleKeys ? i : e.getKey ? e.getKey() : i, c = o.headingIds?.get(e.getKey?.()), { builtinNodeOverrides: l } = o;
|
|
917
917
|
if (typeof e.decorate == "function") {
|
|
918
918
|
let r = null;
|
|
@@ -921,41 +921,41 @@ function jn(e, t, n, r, i, a, o) {
|
|
|
921
921
|
} catch {}
|
|
922
922
|
if (r != null) {
|
|
923
923
|
let t = e.exportJSON ? e.exportJSON() : {}, n = l?.[t.type];
|
|
924
|
-
return
|
|
924
|
+
return jn(n ? n(t, s, [r], () => kn(t, s, r)) : kn(t, s, r), a, s, o);
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
let u = e.exportJSON ? e.exportJSON() : {};
|
|
928
928
|
if (u.type === "text") {
|
|
929
929
|
let e = l?.text;
|
|
930
|
-
return e ? e(u, s, null, () =>
|
|
930
|
+
return e ? e(u, s, null, () => Tn(u, s)) : Tn(u, s);
|
|
931
931
|
}
|
|
932
932
|
let d = typeof e.getChildren == "function" ? e.getChildren() : [];
|
|
933
933
|
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 })));
|
|
934
934
|
let f = null;
|
|
935
|
-
d.length > 0 && (f = d.map((e, i) =>
|
|
935
|
+
d.length > 0 && (f = d.map((e, i) => Mn(e, t, n, r, `${s}-${i}`, void 0, o)));
|
|
936
936
|
let p = e.getTextContent ? e.getTextContent() : void 0, m = l?.[u.type];
|
|
937
|
-
return
|
|
937
|
+
return jn(m ? m(u, s, f, () => xn(u, s, f, r, p, c)) : xn(u, s, f, r, p, c), a, s, o);
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
let i =
|
|
939
|
+
function Nn(e, t, n, r) {
|
|
940
|
+
let i = mn({
|
|
941
941
|
nodes: t,
|
|
942
|
-
theme:
|
|
942
|
+
theme: Re,
|
|
943
943
|
editable: !1,
|
|
944
944
|
onError: (e) => {
|
|
945
945
|
console.error("[RichRenderer]", e);
|
|
946
946
|
}
|
|
947
947
|
}), a = {
|
|
948
948
|
namespace: "ssr",
|
|
949
|
-
theme:
|
|
950
|
-
}, o =
|
|
949
|
+
theme: Re
|
|
950
|
+
}, o = me(e), s = i.parseEditorState(o);
|
|
951
951
|
i.setEditorState(s);
|
|
952
|
-
let c =
|
|
952
|
+
let c = Dn(o), l = o.root?.children, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = s.read(() => {
|
|
953
953
|
let e = /* @__PURE__ */ new Map(), t = (n, r, i) => {
|
|
954
954
|
if (f.set(n.getKey(), i), n.getType() === "heading") {
|
|
955
|
-
let t =
|
|
955
|
+
let t = _n(n.getTextContent()), i = e.get(t) ?? 0, a = t ? `${t}${i ? `-${i}` : ""}` : "";
|
|
956
956
|
e.set(t, i + 1), u.set(n.getKey(), a), a && d.set(a, r);
|
|
957
957
|
}
|
|
958
|
-
|
|
958
|
+
Se(n) && n.getChildren().forEach((e, n) => t(e, r, `${i}.${n}`));
|
|
959
959
|
}, n = B().getChildren();
|
|
960
960
|
return n.forEach((e, n) => t(e, n, `${n}:0`)), n;
|
|
961
961
|
}), m = /* @__PURE__ */ new Set(), h = p.map((e, t) => {
|
|
@@ -970,7 +970,7 @@ function Mn(e, t, n, r) {
|
|
|
970
970
|
index: t,
|
|
971
971
|
pool: `${n.type}:${n.type === "dynamic" ? n.url : n.tag ?? ""}`
|
|
972
972
|
};
|
|
973
|
-
}), g =
|
|
973
|
+
}), g = En(h.map((e) => e.data), r), _ = /* @__PURE__ */ new Map(), v = g.map((e, t) => {
|
|
974
974
|
let n = e.map((e) => (_.set(e, t), h[e])), r = n[0];
|
|
975
975
|
return {
|
|
976
976
|
blocks: n,
|
|
@@ -986,7 +986,7 @@ function Mn(e, t, n, r) {
|
|
|
986
986
|
for (let [e, t] of d) d.set(e, _.get(t));
|
|
987
987
|
let y = (e, t) => s.read(() => {
|
|
988
988
|
let r = v[e];
|
|
989
|
-
return r ? /* @__PURE__ */ q(
|
|
989
|
+
return r ? /* @__PURE__ */ q(gt, { children: r.blocks.map((e, r) => Mn(p[e.index], i, a, /* @__PURE__ */ new Map(), t === void 0 ? `ssr-${e.index}` : `recycler-${t}-${r}`, l?.[e.index]?.$?.blockId, {
|
|
990
990
|
...n,
|
|
991
991
|
headingIds: u,
|
|
992
992
|
recycleKeys: t !== void 0
|
|
@@ -1003,31 +1003,31 @@ function Mn(e, t, n, r) {
|
|
|
1003
1003
|
},
|
|
1004
1004
|
footnoteData: c,
|
|
1005
1005
|
renderNestedContent: (e) => {
|
|
1006
|
-
let r =
|
|
1006
|
+
let r = mn({
|
|
1007
1007
|
nodes: t,
|
|
1008
|
-
theme:
|
|
1008
|
+
theme: Re,
|
|
1009
1009
|
editable: !1,
|
|
1010
1010
|
onError: (e) => {
|
|
1011
1011
|
console.error("[RichRenderer:nested]", e);
|
|
1012
1012
|
}
|
|
1013
1013
|
}), i = {
|
|
1014
1014
|
namespace: "ssr-nested",
|
|
1015
|
-
theme:
|
|
1016
|
-
}, a =
|
|
1015
|
+
theme: Re
|
|
1016
|
+
}, a = me(e), o = r.parseEditorState(a);
|
|
1017
1017
|
r.setEditorState(o);
|
|
1018
1018
|
let s = null, c = a.root?.children;
|
|
1019
1019
|
return o.read(() => {
|
|
1020
|
-
let e = B(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) =>
|
|
1020
|
+
let e = B(), t = /* @__PURE__ */ new Map(), a = e.getChildren().map((e, a) => Mn(e, r, i, t, `nested-${a}`, c?.[a]?.$?.blockId, n));
|
|
1021
1021
|
s = /* @__PURE__ */ q(K, { children: a });
|
|
1022
1022
|
}), s;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Pn({ document: e }) {
|
|
1027
1027
|
return e.renderAll();
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
let p =
|
|
1029
|
+
function Fn({ value: e, variant: t = "article", theme: n, className: r, style: i, as: a = "div", nested: o = !1, rendererConfig: s, extraNodes: c, builtinNodeOverrides: l, blockAnchor: u, surface: d, virtualization: f }) {
|
|
1030
|
+
let p = le(t), m = Ze(), { document: h, footnoteData: g, renderNestedContent: _ } = U(() => Nn(e, c ? [...pe, ...c] : pe, {
|
|
1031
1031
|
blockAnchor: u,
|
|
1032
1032
|
builtinNodeOverrides: l
|
|
1033
1033
|
}, t === "note"), [
|
|
@@ -1036,12 +1036,12 @@ function Pn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1036
1036
|
c,
|
|
1037
1037
|
e,
|
|
1038
1038
|
t
|
|
1039
|
-
]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, w = U(() => C ?
|
|
1039
|
+
]), { scrollContainer: v, overscan: y, estimateBlockHeight: b, preserveCapacity: x } = typeof f == "object" ? f : {}, S = !!f, C = f === !1, w = U(() => C ? Pn : S ? ht({
|
|
1040
1040
|
scrollContainer: v,
|
|
1041
1041
|
overscan: y,
|
|
1042
1042
|
estimateBlockHeight: b,
|
|
1043
1043
|
preserveCapacity: x
|
|
1044
|
-
}) : d ??
|
|
1044
|
+
}) : d ?? Pn, [
|
|
1045
1045
|
d,
|
|
1046
1046
|
S,
|
|
1047
1047
|
C,
|
|
@@ -1053,18 +1053,18 @@ function Pn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1053
1053
|
"rich-content",
|
|
1054
1054
|
p,
|
|
1055
1055
|
r
|
|
1056
|
-
].filter(Boolean).join(" "),
|
|
1056
|
+
].filter(Boolean).join(" "), E = typeof a == "string" ? {
|
|
1057
1057
|
suppressHydrationWarning: !0,
|
|
1058
1058
|
className: T,
|
|
1059
1059
|
"data-rich-nested": o ? "true" : void 0,
|
|
1060
1060
|
"data-theme": n
|
|
1061
|
-
} : {},
|
|
1061
|
+
} : {}, D = n ?? "light";
|
|
1062
1062
|
return /* @__PURE__ */ q(ce, {
|
|
1063
1063
|
className: p,
|
|
1064
|
-
theme:
|
|
1065
|
-
children: /* @__PURE__ */ q(
|
|
1066
|
-
colorScheme:
|
|
1067
|
-
children: /* @__PURE__ */ q(
|
|
1064
|
+
theme: D,
|
|
1065
|
+
children: /* @__PURE__ */ q(tt, {
|
|
1066
|
+
colorScheme: D,
|
|
1067
|
+
children: /* @__PURE__ */ q(ve, {
|
|
1068
1068
|
config: s,
|
|
1069
1069
|
mode: "renderer",
|
|
1070
1070
|
variant: t,
|
|
@@ -1074,7 +1074,7 @@ function Pn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1074
1074
|
children: /* @__PURE__ */ q(oe, {
|
|
1075
1075
|
value: m ?? _,
|
|
1076
1076
|
children: /* @__PURE__ */ q(a, {
|
|
1077
|
-
...
|
|
1077
|
+
...E,
|
|
1078
1078
|
style: i,
|
|
1079
1079
|
children: /* @__PURE__ */ q(w, { document: h })
|
|
1080
1080
|
})
|
|
@@ -1085,7 +1085,7 @@ function Pn({ value: e, variant: t = "article", theme: n, className: r, style: i
|
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
1087
|
// ../../node_modules/.pnpm/@haklex+rich-ext-steps@0.64.2_76de6107f2b2059587e3c8d152bbf7d4/node_modules/@haklex/rich-ext-steps/dist/node-CEPwMzje.js
|
|
1088
|
-
var
|
|
1088
|
+
var In = [Be], X = {
|
|
1089
1089
|
text: {
|
|
1090
1090
|
kMv6JI: "xqfszdh",
|
|
1091
1091
|
kGuDYH: "x4z9k3i",
|
|
@@ -1869,14 +1869,14 @@ var Fn = [ze], X = {
|
|
|
1869
1869
|
kAzted: "xbktkl8",
|
|
1870
1870
|
$$css: !0
|
|
1871
1871
|
}
|
|
1872
|
-
},
|
|
1873
|
-
function
|
|
1874
|
-
if (!(e > 0)) return
|
|
1875
|
-
let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((
|
|
1876
|
-
if (i === 0) return
|
|
1877
|
-
if (i === 1) return
|
|
1872
|
+
}, Ln = 864e5, Rn = (e) => String(e).padStart(2, "0"), zn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
|
|
1873
|
+
function Bn(e, t = Date.now()) {
|
|
1874
|
+
if (!(e > 0)) return w.t("time.notRecorded");
|
|
1875
|
+
let n = /* @__PURE__ */ new Date(e * 1e3), r = new Date(t), i = Math.round((zn(r) - zn(n)) / Ln);
|
|
1876
|
+
if (i === 0) return w.t("time.today");
|
|
1877
|
+
if (i === 1) return w.t("time.yesterday");
|
|
1878
1878
|
let a = n.getFullYear() === r.getFullYear();
|
|
1879
|
-
return new Intl.DateTimeFormat(
|
|
1879
|
+
return new Intl.DateTimeFormat(T[w.language], a ? {
|
|
1880
1880
|
month: "long",
|
|
1881
1881
|
day: "numeric"
|
|
1882
1882
|
} : {
|
|
@@ -1885,35 +1885,35 @@ function zn(e, t = Date.now()) {
|
|
|
1885
1885
|
day: "numeric"
|
|
1886
1886
|
}).format(n);
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Vn(e, t = !1) {
|
|
1889
1889
|
if (!(e > 0)) return "--:--";
|
|
1890
|
-
let n = /* @__PURE__ */ new Date(e * 1e3), r = `${
|
|
1891
|
-
return t ? `${r}:${
|
|
1890
|
+
let n = /* @__PURE__ */ new Date(e * 1e3), r = `${Rn(n.getHours())}:${Rn(n.getMinutes())}`;
|
|
1891
|
+
return t ? `${r}:${Rn(n.getSeconds())}` : r;
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1894
|
-
return e > 0 ? `${
|
|
1893
|
+
function Hn(e) {
|
|
1894
|
+
return e > 0 ? `${Bn(e)} ${Vn(e)}` : w.t("time.notRecorded");
|
|
1895
1895
|
}
|
|
1896
1896
|
// src/viewer/document/HistoryPanel.tsx
|
|
1897
|
-
var
|
|
1897
|
+
var Un = {
|
|
1898
1898
|
human: "history.sourceHuman",
|
|
1899
1899
|
agent: "history.sourceAgent",
|
|
1900
1900
|
session: "history.sourceSession",
|
|
1901
1901
|
unknown: "history.sourceUnknown"
|
|
1902
1902
|
};
|
|
1903
|
-
function
|
|
1903
|
+
function Wn(e) {
|
|
1904
1904
|
let { session: t, selected: n } = e;
|
|
1905
1905
|
return t && n ? t.history.groups.find((e) => e.entries.includes(n)) : void 0;
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function Gn(e) {
|
|
1908
1908
|
return e.session?.history.entries.at(-1)?.change.timestamp ?? 0;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Kn({ model: e, strip: t }) {
|
|
1911
1911
|
let { count: n, changeIndex: r, loading: i } = e;
|
|
1912
1912
|
return /* @__PURE__ */ J(K, { children: [
|
|
1913
1913
|
/* @__PURE__ */ J("span", {
|
|
1914
1914
|
"aria-live": "polite",
|
|
1915
1915
|
role: "status",
|
|
1916
|
-
...
|
|
1916
|
+
...C(X.count),
|
|
1917
1917
|
children: [
|
|
1918
1918
|
n ? r + 1 : 0,
|
|
1919
1919
|
" / ",
|
|
@@ -1921,125 +1921,125 @@ function Gn({ model: e, strip: t }) {
|
|
|
1921
1921
|
]
|
|
1922
1922
|
}),
|
|
1923
1923
|
/* @__PURE__ */ q("button", {
|
|
1924
|
-
"aria-label":
|
|
1924
|
+
"aria-label": E("history.previousChange"),
|
|
1925
1925
|
disabled: r === 0 || i,
|
|
1926
1926
|
type: "button",
|
|
1927
|
-
...
|
|
1927
|
+
...C(X.buttonBase, X.icon, t && X.stripIcon),
|
|
1928
1928
|
onClick: () => e.navigate(-1),
|
|
1929
|
-
children: /* @__PURE__ */ q(
|
|
1929
|
+
children: /* @__PURE__ */ q(Dt, {
|
|
1930
1930
|
"aria-hidden": "true",
|
|
1931
1931
|
size: 14
|
|
1932
1932
|
})
|
|
1933
1933
|
}),
|
|
1934
1934
|
/* @__PURE__ */ q("button", {
|
|
1935
|
-
"aria-label":
|
|
1935
|
+
"aria-label": E("history.nextChange"),
|
|
1936
1936
|
disabled: r >= n - 1 || i,
|
|
1937
1937
|
type: "button",
|
|
1938
|
-
...
|
|
1938
|
+
...C(X.buttonBase, X.icon, t && X.stripIcon),
|
|
1939
1939
|
onClick: () => e.navigate(1),
|
|
1940
|
-
children: /* @__PURE__ */ q(
|
|
1940
|
+
children: /* @__PURE__ */ q(Tt, {
|
|
1941
1941
|
"aria-hidden": "true",
|
|
1942
1942
|
size: 14
|
|
1943
1943
|
})
|
|
1944
1944
|
})
|
|
1945
1945
|
] });
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function qn({ model: e }) {
|
|
1948
1948
|
return /* @__PURE__ */ q("button", {
|
|
1949
1949
|
"aria-pressed": e.onlyChanges,
|
|
1950
1950
|
type: "button",
|
|
1951
|
-
...
|
|
1951
|
+
...C(X.buttonBase, X.filter, e.onlyChanges && X.filterOn),
|
|
1952
1952
|
onClick: e.toggleOnly,
|
|
1953
|
-
children:
|
|
1953
|
+
children: E("history.onlyChanges")
|
|
1954
1954
|
});
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function Jn({ compact: e, model: t }) {
|
|
1957
1957
|
return t.pending ? /* @__PURE__ */ J("div", {
|
|
1958
1958
|
role: "status",
|
|
1959
|
-
...
|
|
1959
|
+
...C(e ? X.updateCompact : X.update),
|
|
1960
1960
|
children: [/* @__PURE__ */ q("span", {
|
|
1961
|
-
...
|
|
1962
|
-
children: t.streaming ?
|
|
1961
|
+
...C(X.updateText),
|
|
1962
|
+
children: t.streaming ? E("history.waitingEdits") : E("history.newContent", { time: Vn(Gn(t)) })
|
|
1963
1963
|
}), /* @__PURE__ */ J("button", {
|
|
1964
1964
|
disabled: t.streaming || t.loading,
|
|
1965
1965
|
type: "button",
|
|
1966
|
-
...
|
|
1966
|
+
...C(X.buttonBase, X.updateButton),
|
|
1967
1967
|
onClick: t.refresh,
|
|
1968
|
-
children: [/* @__PURE__ */ q(
|
|
1968
|
+
children: [/* @__PURE__ */ q(Ft, {
|
|
1969
1969
|
"aria-hidden": "true",
|
|
1970
1970
|
size: 12
|
|
1971
|
-
}),
|
|
1971
|
+
}), E("history.refresh")]
|
|
1972
1972
|
})]
|
|
1973
1973
|
}) : null;
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1976
|
-
let { selected: t, blocks: n, count: r } = e, i =
|
|
1975
|
+
function Yn({ model: e }) {
|
|
1976
|
+
let { selected: t, blocks: n, count: r } = e, i = Wn(e), a = n.filter((e) => e.kind === "insert" || e.kind === "modify").length, o = n.filter((e) => e.kind === "delete" || e.kind === "modify").length;
|
|
1977
1977
|
return /* @__PURE__ */ J("section", {
|
|
1978
|
-
"aria-label":
|
|
1979
|
-
...
|
|
1978
|
+
"aria-label": E("history.range"),
|
|
1979
|
+
...C(X.compare),
|
|
1980
1980
|
children: [/* @__PURE__ */ J("dl", {
|
|
1981
|
-
...
|
|
1981
|
+
...C(X.compareList),
|
|
1982
1982
|
children: [
|
|
1983
1983
|
/* @__PURE__ */ q("dt", {
|
|
1984
|
-
...
|
|
1985
|
-
children:
|
|
1984
|
+
...C(X.compareTerm),
|
|
1985
|
+
children: E("history.from")
|
|
1986
1986
|
}),
|
|
1987
1987
|
/* @__PURE__ */ J("dd", {
|
|
1988
|
-
...
|
|
1988
|
+
...C(X.compareValue),
|
|
1989
1989
|
children: [/* @__PURE__ */ q("strong", {
|
|
1990
|
-
...
|
|
1991
|
-
children: t ?
|
|
1990
|
+
...C(X.compareStrong),
|
|
1991
|
+
children: t ? Hn(t.change.timestamp) : E("history.pickPoint")
|
|
1992
1992
|
}), i ? /* @__PURE__ */ q("span", {
|
|
1993
|
-
...
|
|
1994
|
-
children:
|
|
1993
|
+
...C(X.compareSpan),
|
|
1994
|
+
children: E(Un[i.source])
|
|
1995
1995
|
}) : null]
|
|
1996
1996
|
}),
|
|
1997
1997
|
/* @__PURE__ */ q("dt", {
|
|
1998
|
-
...
|
|
1999
|
-
children:
|
|
1998
|
+
...C(X.compareTerm),
|
|
1999
|
+
children: E("history.to")
|
|
2000
2000
|
}),
|
|
2001
2001
|
/* @__PURE__ */ J("dd", {
|
|
2002
|
-
...
|
|
2002
|
+
...C(X.compareValue),
|
|
2003
2003
|
children: [/* @__PURE__ */ q("strong", {
|
|
2004
|
-
...
|
|
2005
|
-
children:
|
|
2004
|
+
...C(X.compareStrong),
|
|
2005
|
+
children: E("history.latestVersion")
|
|
2006
2006
|
}), /* @__PURE__ */ q("span", {
|
|
2007
|
-
...
|
|
2008
|
-
children:
|
|
2007
|
+
...C(X.compareSpan),
|
|
2008
|
+
children: Hn(Gn(e))
|
|
2009
2009
|
})]
|
|
2010
2010
|
})
|
|
2011
2011
|
]
|
|
2012
2012
|
}), /* @__PURE__ */ J("div", {
|
|
2013
|
-
...
|
|
2013
|
+
...C(X.controls),
|
|
2014
2014
|
children: [
|
|
2015
|
-
/* @__PURE__ */ q("span", { children:
|
|
2015
|
+
/* @__PURE__ */ q("span", { children: E("history.changes", { count: r }) }),
|
|
2016
2016
|
/* @__PURE__ */ J("span", {
|
|
2017
|
-
...
|
|
2017
|
+
...C(X.plus),
|
|
2018
2018
|
children: ["+", a]
|
|
2019
2019
|
}),
|
|
2020
2020
|
/* @__PURE__ */ J("span", {
|
|
2021
|
-
...
|
|
2021
|
+
...C(X.minus),
|
|
2022
2022
|
children: ["−", o]
|
|
2023
2023
|
}),
|
|
2024
|
-
/* @__PURE__ */ q("span", { ...
|
|
2025
|
-
/* @__PURE__ */ q(
|
|
2026
|
-
/* @__PURE__ */ q(
|
|
2024
|
+
/* @__PURE__ */ q("span", { ...C(X.spacer) }),
|
|
2025
|
+
/* @__PURE__ */ q(qn, { model: e }),
|
|
2026
|
+
/* @__PURE__ */ q(Kn, { model: e })
|
|
2027
2027
|
]
|
|
2028
2028
|
})]
|
|
2029
2029
|
});
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function Xn({ model: e, sheet: t }) {
|
|
2032
2032
|
let [n, r] = G(50), [i, a] = G(() => /* @__PURE__ */ new Set()), { session: o, selected: s, blocks: c } = e;
|
|
2033
2033
|
if (!o) return null;
|
|
2034
2034
|
let { groups: l, entries: u, shallow: d } = o.history, f = l.findIndex((e) => s !== null && e.entries.includes(s)), p = /* @__PURE__ */ new Map();
|
|
2035
2035
|
for (let e of c) e.group && p.set(e.group, (p.get(e.group) ?? 0) + 1);
|
|
2036
|
-
let m = l.slice(0, n), h = (e) =>
|
|
2036
|
+
let m = l.slice(0, n), h = (e) => Bn(e.entries.at(-1).change.timestamp), g = (e) => a((t) => {
|
|
2037
2037
|
let n = new Set(t);
|
|
2038
2038
|
return n.delete(e) || n.add(e), n;
|
|
2039
2039
|
});
|
|
2040
2040
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("ol", {
|
|
2041
|
-
"aria-label":
|
|
2042
|
-
...
|
|
2041
|
+
"aria-label": E("history.timeline"),
|
|
2042
|
+
...C(X.timeline),
|
|
2043
2043
|
children: m.map((n, r) => {
|
|
2044
2044
|
let a = n.entries.at(-1), o = h(n), c = r === 0 || o !== h(m[r - 1]), l = r === f ? "selected" : r === 0 ? "latest" : r < f ? "range" : "outside", u = i.has(n.id), d = r < f ? p.get(n) : void 0;
|
|
2045
2045
|
return /* @__PURE__ */ J("li", {
|
|
@@ -2047,82 +2047,82 @@ function Yn({ model: e, sheet: t }) {
|
|
|
2047
2047
|
"data-lower": r < f ? "in" : "out",
|
|
2048
2048
|
"data-state": l,
|
|
2049
2049
|
"data-upper": r <= f ? "in" : "out",
|
|
2050
|
-
...
|
|
2050
|
+
...C(X.node),
|
|
2051
2051
|
children: [
|
|
2052
2052
|
c ? /* @__PURE__ */ q("div", {
|
|
2053
|
-
...
|
|
2053
|
+
...C(X.day),
|
|
2054
2054
|
children: o
|
|
2055
2055
|
}) : null,
|
|
2056
2056
|
/* @__PURE__ */ J("div", {
|
|
2057
|
-
...
|
|
2057
|
+
...C(X.row),
|
|
2058
2058
|
children: [
|
|
2059
2059
|
/* @__PURE__ */ q("span", {
|
|
2060
2060
|
"aria-hidden": "true",
|
|
2061
2061
|
"data-state": l,
|
|
2062
|
-
...
|
|
2062
|
+
...C(X.dot)
|
|
2063
2063
|
}),
|
|
2064
2064
|
/* @__PURE__ */ J("button", {
|
|
2065
2065
|
"aria-current": l === "selected" ? "true" : void 0,
|
|
2066
2066
|
"data-state": l,
|
|
2067
2067
|
type: "button",
|
|
2068
|
-
...
|
|
2068
|
+
...C(X.buttonBase, X.select, t && X.sheetSelect),
|
|
2069
2069
|
onClick: () => e.select(a),
|
|
2070
2070
|
children: [/* @__PURE__ */ J("span", {
|
|
2071
|
-
...
|
|
2071
|
+
...C(X.line),
|
|
2072
2072
|
children: [
|
|
2073
2073
|
/* @__PURE__ */ q("strong", {
|
|
2074
|
-
...
|
|
2075
|
-
children:
|
|
2074
|
+
...C(X.lineStrong),
|
|
2075
|
+
children: Vn(a.change.timestamp)
|
|
2076
2076
|
}),
|
|
2077
2077
|
/* @__PURE__ */ q("span", {
|
|
2078
|
-
...
|
|
2079
|
-
children:
|
|
2078
|
+
...C(X.lineText),
|
|
2079
|
+
children: E(Un[n.source])
|
|
2080
2080
|
}),
|
|
2081
2081
|
l === "latest" ? /* @__PURE__ */ q("span", {
|
|
2082
|
-
...
|
|
2083
|
-
children:
|
|
2082
|
+
...C(X.tag),
|
|
2083
|
+
children: E("history.latest")
|
|
2084
2084
|
}) : null,
|
|
2085
2085
|
l === "selected" ? /* @__PURE__ */ q("span", {
|
|
2086
|
-
...
|
|
2087
|
-
children:
|
|
2086
|
+
...C(X.tag, X.tagStart),
|
|
2087
|
+
children: E("history.start")
|
|
2088
2088
|
}) : null
|
|
2089
2089
|
]
|
|
2090
2090
|
}), /* @__PURE__ */ J("span", {
|
|
2091
|
-
...
|
|
2092
|
-
children: [
|
|
2093
|
-
...
|
|
2094
|
-
children:
|
|
2091
|
+
...C(X.meta),
|
|
2092
|
+
children: [E("history.commits", { count: n.entries.length }), d ? /* @__PURE__ */ q("span", {
|
|
2093
|
+
...C(X.changed),
|
|
2094
|
+
children: E("history.changedSuffix", { count: d })
|
|
2095
2095
|
}) : null]
|
|
2096
2096
|
})]
|
|
2097
2097
|
}),
|
|
2098
2098
|
/* @__PURE__ */ q("button", {
|
|
2099
2099
|
"aria-expanded": u,
|
|
2100
|
-
"aria-label":
|
|
2100
|
+
"aria-label": E(u ? "history.collapseCommits" : "history.expandCommits"),
|
|
2101
2101
|
type: "button",
|
|
2102
|
-
...
|
|
2102
|
+
...C(X.buttonBase, X.icon, X.expand),
|
|
2103
2103
|
onClick: () => g(n.id),
|
|
2104
|
-
children: /* @__PURE__ */ q(
|
|
2104
|
+
children: /* @__PURE__ */ q(Et, {
|
|
2105
2105
|
"aria-hidden": "true",
|
|
2106
2106
|
size: 14,
|
|
2107
|
-
...
|
|
2107
|
+
...C(X.expandIcon, u && X.expandIconOpen)
|
|
2108
2108
|
})
|
|
2109
2109
|
})
|
|
2110
2110
|
]
|
|
2111
2111
|
}),
|
|
2112
2112
|
u ? /* @__PURE__ */ q("div", {
|
|
2113
|
-
...
|
|
2113
|
+
...C(X.raw),
|
|
2114
2114
|
children: [...n.entries].reverse().map((t) => /* @__PURE__ */ J("button", {
|
|
2115
2115
|
"aria-current": t === s ? "true" : void 0,
|
|
2116
2116
|
title: t.change.message,
|
|
2117
2117
|
type: "button",
|
|
2118
|
-
...
|
|
2118
|
+
...C(X.buttonBase, X.rawButton),
|
|
2119
2119
|
onClick: () => e.select(t),
|
|
2120
2120
|
children: [/* @__PURE__ */ q("span", {
|
|
2121
|
-
...
|
|
2122
|
-
children:
|
|
2121
|
+
...C(X.rawTime),
|
|
2122
|
+
children: Vn(t.change.timestamp, !0)
|
|
2123
2123
|
}), /* @__PURE__ */ q("code", {
|
|
2124
|
-
...
|
|
2125
|
-
children: t.change.message ||
|
|
2124
|
+
...C(X.rawCode),
|
|
2125
|
+
children: t.change.message || E("history.sourceUnknown")
|
|
2126
2126
|
})]
|
|
2127
2127
|
}, t.id))
|
|
2128
2128
|
}) : null
|
|
@@ -2131,41 +2131,41 @@ function Yn({ model: e, sheet: t }) {
|
|
|
2131
2131
|
})
|
|
2132
2132
|
}), n < l.length ? /* @__PURE__ */ q("button", {
|
|
2133
2133
|
type: "button",
|
|
2134
|
-
...
|
|
2134
|
+
...C(X.buttonBase, X.more),
|
|
2135
2135
|
onClick: () => r((e) => e + 50),
|
|
2136
|
-
children:
|
|
2136
|
+
children: E("history.loadEarlier")
|
|
2137
2137
|
}) : /* @__PURE__ */ J("p", {
|
|
2138
|
-
...
|
|
2138
|
+
...C(X.end),
|
|
2139
2139
|
children: [
|
|
2140
|
-
|
|
2140
|
+
E(d ? "history.shallow" : "history.earliest"),
|
|
2141
2141
|
" ·",
|
|
2142
2142
|
" ",
|
|
2143
|
-
|
|
2144
|
-
edits:
|
|
2145
|
-
commits:
|
|
2143
|
+
E("history.summary", {
|
|
2144
|
+
edits: E("history.edits", { count: l.length }),
|
|
2145
|
+
commits: E("history.commits", { count: u.length })
|
|
2146
2146
|
}),
|
|
2147
2147
|
/* @__PURE__ */ q("br", {}),
|
|
2148
|
-
|
|
2148
|
+
E("history.clockNote")
|
|
2149
2149
|
]
|
|
2150
2150
|
})] });
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function Zn({ streaming: e }) {
|
|
2153
2153
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
2154
2154
|
role: "status",
|
|
2155
|
-
...
|
|
2155
|
+
...C(X.waitingP),
|
|
2156
2156
|
children: e ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("strong", {
|
|
2157
|
-
...
|
|
2158
|
-
children:
|
|
2157
|
+
...C(X.waitingStrong),
|
|
2158
|
+
children: E("history.agentEditing")
|
|
2159
2159
|
}), /* @__PURE__ */ q("span", {
|
|
2160
|
-
...
|
|
2161
|
-
children:
|
|
2160
|
+
...C(X.waitingSpan),
|
|
2161
|
+
children: E("history.agentEditingBody")
|
|
2162
2162
|
})] }) : /* @__PURE__ */ q("strong", {
|
|
2163
|
-
...
|
|
2164
|
-
children:
|
|
2163
|
+
...C(X.waitingStrong),
|
|
2164
|
+
children: E("history.loading")
|
|
2165
2165
|
})
|
|
2166
2166
|
}), /* @__PURE__ */ q("div", {
|
|
2167
2167
|
"aria-hidden": "true",
|
|
2168
|
-
...
|
|
2168
|
+
...C(X.skeleton),
|
|
2169
2169
|
children: [
|
|
2170
2170
|
150,
|
|
2171
2171
|
130,
|
|
@@ -2173,76 +2173,76 @@ function Xn({ streaming: e }) {
|
|
|
2173
2173
|
120
|
|
2174
2174
|
].map((e) => /* @__PURE__ */ q("span", {
|
|
2175
2175
|
style: { width: e },
|
|
2176
|
-
...
|
|
2176
|
+
...C(X.skeletonBar)
|
|
2177
2177
|
}, e))
|
|
2178
2178
|
})] });
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function Qn({ model: e }) {
|
|
2181
2181
|
return /* @__PURE__ */ J("div", {
|
|
2182
2182
|
role: "alert",
|
|
2183
|
-
...
|
|
2183
|
+
...C(X.failure),
|
|
2184
2184
|
children: [
|
|
2185
2185
|
/* @__PURE__ */ J("strong", {
|
|
2186
|
-
...
|
|
2187
|
-
children: [/* @__PURE__ */ q(
|
|
2186
|
+
...C(X.failureStrong),
|
|
2187
|
+
children: [/* @__PURE__ */ q(Ot, {
|
|
2188
2188
|
"aria-hidden": "true",
|
|
2189
2189
|
size: 15
|
|
2190
|
-
}),
|
|
2190
|
+
}), E("history.failed")]
|
|
2191
2191
|
}),
|
|
2192
2192
|
/* @__PURE__ */ q("code", {
|
|
2193
|
-
...
|
|
2193
|
+
...C(X.failureCode),
|
|
2194
2194
|
children: e.error
|
|
2195
2195
|
}),
|
|
2196
2196
|
/* @__PURE__ */ q("span", {
|
|
2197
|
-
...
|
|
2198
|
-
children:
|
|
2197
|
+
...C(X.failureText),
|
|
2198
|
+
children: E("history.failedBody")
|
|
2199
2199
|
}),
|
|
2200
2200
|
/* @__PURE__ */ J("span", {
|
|
2201
|
-
...
|
|
2201
|
+
...C(X.actions),
|
|
2202
2202
|
children: [/* @__PURE__ */ q("button", {
|
|
2203
2203
|
disabled: e.streaming,
|
|
2204
2204
|
type: "button",
|
|
2205
|
-
...
|
|
2205
|
+
...C(X.buttonBase, X.button),
|
|
2206
2206
|
onClick: e.refresh,
|
|
2207
|
-
children:
|
|
2207
|
+
children: E("common.retry")
|
|
2208
2208
|
}), /* @__PURE__ */ q("button", {
|
|
2209
2209
|
type: "button",
|
|
2210
|
-
...
|
|
2210
|
+
...C(X.buttonBase, X.quiet),
|
|
2211
2211
|
onClick: e.close,
|
|
2212
|
-
children:
|
|
2212
|
+
children: E("history.backToComments")
|
|
2213
2213
|
})]
|
|
2214
2214
|
})
|
|
2215
2215
|
]
|
|
2216
2216
|
});
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2219
|
-
let t = [
|
|
2218
|
+
function $n({ model: e }) {
|
|
2219
|
+
let t = [C(X.text, X.panel).className, "history-panel"].filter(Boolean).join(" ");
|
|
2220
2220
|
return /* @__PURE__ */ J("aside", {
|
|
2221
|
-
"aria-label":
|
|
2221
|
+
"aria-label": E("history.title"),
|
|
2222
2222
|
className: t,
|
|
2223
2223
|
children: [
|
|
2224
2224
|
/* @__PURE__ */ J("header", {
|
|
2225
|
-
...
|
|
2225
|
+
...C(X.panelHead),
|
|
2226
2226
|
children: [/* @__PURE__ */ q("h2", {
|
|
2227
|
-
...
|
|
2228
|
-
children:
|
|
2227
|
+
...C(X.panelTitle),
|
|
2228
|
+
children: E("history.title")
|
|
2229
2229
|
}), /* @__PURE__ */ q("button", {
|
|
2230
|
-
"aria-label":
|
|
2230
|
+
"aria-label": E("history.close"),
|
|
2231
2231
|
type: "button",
|
|
2232
|
-
...
|
|
2232
|
+
...C(X.buttonBase, X.icon),
|
|
2233
2233
|
onClick: e.close,
|
|
2234
|
-
children: /* @__PURE__ */ q(
|
|
2234
|
+
children: /* @__PURE__ */ q(It, {
|
|
2235
2235
|
"aria-hidden": "true",
|
|
2236
2236
|
size: 14
|
|
2237
2237
|
})
|
|
2238
2238
|
})]
|
|
2239
2239
|
}),
|
|
2240
|
-
/* @__PURE__ */ q(
|
|
2241
|
-
e.error ? /* @__PURE__ */ q(
|
|
2240
|
+
/* @__PURE__ */ q(Jn, { model: e }),
|
|
2241
|
+
e.error ? /* @__PURE__ */ q(Qn, { model: e }) : e.session ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Yn, { model: e }), /* @__PURE__ */ q(Xn, { model: e })] }) : /* @__PURE__ */ q(Zn, { streaming: e.streaming })
|
|
2242
2242
|
]
|
|
2243
2243
|
});
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function er({ model: e, onDismiss: t }) {
|
|
2246
2246
|
let n = W(null);
|
|
2247
2247
|
H(() => {
|
|
2248
2248
|
let e = document.activeElement, t = n.current, r = () => [...t?.querySelectorAll("button:not(:disabled), a[href], input:not(:disabled), [tabindex=\"0\"]") ?? []];
|
|
@@ -2257,29 +2257,29 @@ function $n({ model: e, onDismiss: t }) {
|
|
|
2257
2257
|
};
|
|
2258
2258
|
}, []);
|
|
2259
2259
|
let r = /* @__PURE__ */ J("div", {
|
|
2260
|
-
...
|
|
2260
|
+
...C(X.sheetHead),
|
|
2261
2261
|
children: [/* @__PURE__ */ J("span", {
|
|
2262
|
-
...
|
|
2262
|
+
...C(X.sheetHeadText),
|
|
2263
2263
|
children: [/* @__PURE__ */ q("strong", {
|
|
2264
|
-
...
|
|
2265
|
-
children:
|
|
2264
|
+
...C(X.sheetTitle),
|
|
2265
|
+
children: E("history.chooseStart")
|
|
2266
2266
|
}), /* @__PURE__ */ q("small", {
|
|
2267
|
-
...
|
|
2268
|
-
children:
|
|
2267
|
+
...C(X.sheetSmall),
|
|
2268
|
+
children: E("history.compareWithLatest", { time: Hn(Gn(e)) })
|
|
2269
2269
|
})]
|
|
2270
2270
|
}), /* @__PURE__ */ q("button", {
|
|
2271
2271
|
type: "button",
|
|
2272
|
-
...
|
|
2272
|
+
...C(X.buttonBase, X.sheetButton),
|
|
2273
2273
|
onClick: t,
|
|
2274
|
-
children:
|
|
2274
|
+
children: E("common.done")
|
|
2275
2275
|
})]
|
|
2276
2276
|
});
|
|
2277
2277
|
return /* @__PURE__ */ q("div", {
|
|
2278
|
-
"aria-label":
|
|
2278
|
+
"aria-label": E("history.chooseStart"),
|
|
2279
2279
|
"aria-modal": "true",
|
|
2280
2280
|
ref: n,
|
|
2281
2281
|
role: "dialog",
|
|
2282
|
-
...
|
|
2282
|
+
...C(X.text, X.sheet),
|
|
2283
2283
|
children: /* @__PURE__ */ q(y, {
|
|
2284
2284
|
header: r,
|
|
2285
2285
|
snap: .85,
|
|
@@ -2289,8 +2289,8 @@ function $n({ model: e, onDismiss: t }) {
|
|
|
2289
2289
|
e === 0 && t();
|
|
2290
2290
|
},
|
|
2291
2291
|
children: /* @__PURE__ */ q("div", {
|
|
2292
|
-
...
|
|
2293
|
-
children: /* @__PURE__ */ q(
|
|
2292
|
+
...C(X.sheetBody),
|
|
2293
|
+
children: /* @__PURE__ */ q(Xn, {
|
|
2294
2294
|
sheet: !0,
|
|
2295
2295
|
model: e
|
|
2296
2296
|
})
|
|
@@ -2299,35 +2299,35 @@ function $n({ model: e, onDismiss: t }) {
|
|
|
2299
2299
|
});
|
|
2300
2300
|
}
|
|
2301
2301
|
// src/viewer/document/HistoryContent.tsx
|
|
2302
|
-
var
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
...
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
],
|
|
2309
|
-
[
|
|
2310
|
-
[
|
|
2311
|
-
[
|
|
2312
|
-
[
|
|
2313
|
-
},
|
|
2302
|
+
var tr = [
|
|
2303
|
+
Xe,
|
|
2304
|
+
et,
|
|
2305
|
+
...In,
|
|
2306
|
+
Ue,
|
|
2307
|
+
qe
|
|
2308
|
+
], nr = {
|
|
2309
|
+
[F]: Le,
|
|
2310
|
+
[Ke]: lt,
|
|
2311
|
+
[Ge]: Ae,
|
|
2312
|
+
[_e]: ze
|
|
2313
|
+
}, rr = {
|
|
2314
2314
|
insert: "history.kindInsert",
|
|
2315
2315
|
delete: "history.kindDelete",
|
|
2316
2316
|
modify: "history.kindModify"
|
|
2317
2317
|
};
|
|
2318
|
-
function
|
|
2319
|
-
let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: d, error: f, streaming: p, onlyChanges: m } = e, h = [
|
|
2320
|
-
extraNodes:
|
|
2321
|
-
rendererConfig:
|
|
2318
|
+
function ir({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a }) {
|
|
2319
|
+
let { session: o, selected: s, blocks: c, count: l, changeIndex: u, loading: d, error: f, streaming: p, onlyChanges: m } = e, h = [C(X.text).className, "history-view"].filter(Boolean).join(" "), g = [C(X.hunk).className, "history-hunk"].filter(Boolean).join(" "), _ = (e) => /* @__PURE__ */ q(Fn, {
|
|
2320
|
+
extraNodes: tr,
|
|
2321
|
+
rendererConfig: nr,
|
|
2322
2322
|
theme: t,
|
|
2323
2323
|
value: e,
|
|
2324
2324
|
variant: "article"
|
|
2325
2325
|
}), v = -1, y = (t, n) => {
|
|
2326
2326
|
if (t.kind === "equal") return m ? /* @__PURE__ */ q("button", {
|
|
2327
2327
|
type: "button",
|
|
2328
|
-
...
|
|
2328
|
+
...C(X.buttonBase, X.fold),
|
|
2329
2329
|
onClick: e.showAll,
|
|
2330
|
-
children: /* @__PURE__ */ q("span", { children:
|
|
2330
|
+
children: /* @__PURE__ */ q("span", { children: E("history.unchanged", { count: t.value.root.children.length }) })
|
|
2331
2331
|
}, n) : /* @__PURE__ */ q("section", {
|
|
2332
2332
|
className: g,
|
|
2333
2333
|
children: _(t.value)
|
|
@@ -2335,24 +2335,24 @@ function rr({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2335
2335
|
v++;
|
|
2336
2336
|
let r = t.before ? null : t.kind === "insert" ? "afterBox" : t.kind === "delete" ? "beforeBox" : "mergedBox";
|
|
2337
2337
|
return /* @__PURE__ */ J("section", {
|
|
2338
|
-
className: [g,
|
|
2338
|
+
className: [g, C(X.hunkBox).className].filter(Boolean).join(" "),
|
|
2339
2339
|
"data-current": v === u ? "" : void 0,
|
|
2340
2340
|
"data-history-change": "",
|
|
2341
2341
|
children: [/* @__PURE__ */ J("div", {
|
|
2342
|
-
...
|
|
2342
|
+
...C(X.caption),
|
|
2343
2343
|
children: [/* @__PURE__ */ q("span", {
|
|
2344
2344
|
"data-kind": t.kind,
|
|
2345
|
-
...
|
|
2346
|
-
children:
|
|
2347
|
-
}), t.author ? /* @__PURE__ */ J("span", { children: [
|
|
2345
|
+
...C(X.kind),
|
|
2346
|
+
children: E(rr[t.kind])
|
|
2347
|
+
}), t.author ? /* @__PURE__ */ J("span", { children: [Hn(t.author.change.timestamp), t.group ? ` · ${E(Un[t.group.source])}` : ""] }) : null]
|
|
2348
2348
|
}), t.before ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q("div", {
|
|
2349
|
-
...
|
|
2349
|
+
...C(X.diffBox, X.beforeBox),
|
|
2350
2350
|
children: _(t.before)
|
|
2351
2351
|
}), /* @__PURE__ */ q("div", {
|
|
2352
|
-
...
|
|
2352
|
+
...C(X.diffBox, X.afterBox, X.afterGap),
|
|
2353
2353
|
children: _(t.value)
|
|
2354
2354
|
})] }) : /* @__PURE__ */ q("div", {
|
|
2355
|
-
...
|
|
2355
|
+
...C(X.diffBox, X[r]),
|
|
2356
2356
|
children: _(t.value)
|
|
2357
2357
|
})]
|
|
2358
2358
|
}, n);
|
|
@@ -2361,69 +2361,71 @@ function rr({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2361
2361
|
className: h,
|
|
2362
2362
|
children: [
|
|
2363
2363
|
r ? /* @__PURE__ */ J("div", {
|
|
2364
|
-
...
|
|
2364
|
+
...C(X.strip),
|
|
2365
2365
|
children: [
|
|
2366
2366
|
/* @__PURE__ */ J("button", {
|
|
2367
2367
|
type: "button",
|
|
2368
|
-
...
|
|
2368
|
+
...C(X.buttonBase, X.pick),
|
|
2369
2369
|
onClick: a,
|
|
2370
2370
|
children: [/* @__PURE__ */ q("span", {
|
|
2371
|
-
...
|
|
2372
|
-
children:
|
|
2371
|
+
...C(X.pickSpan),
|
|
2372
|
+
children: E("history.compareFrom")
|
|
2373
2373
|
}), /* @__PURE__ */ J("strong", {
|
|
2374
|
-
...
|
|
2375
|
-
children: [
|
|
2374
|
+
...C(X.pickStrong),
|
|
2375
|
+
children: [E("history.toLatest", { from: s ? Hn(s.change.timestamp) : E("history.pickPoint") }), /* @__PURE__ */ q(Tt, {
|
|
2376
2376
|
"aria-hidden": "true",
|
|
2377
2377
|
size: 12
|
|
2378
2378
|
})]
|
|
2379
2379
|
})]
|
|
2380
2380
|
}),
|
|
2381
|
-
/* @__PURE__ */ q(
|
|
2382
|
-
/* @__PURE__ */ q(
|
|
2381
|
+
/* @__PURE__ */ q(qn, { model: e }),
|
|
2382
|
+
/* @__PURE__ */ q(Kn, {
|
|
2383
2383
|
strip: !0,
|
|
2384
2384
|
model: e
|
|
2385
2385
|
})
|
|
2386
2386
|
]
|
|
2387
2387
|
}) : null,
|
|
2388
|
-
r ? /* @__PURE__ */ q(
|
|
2388
|
+
r ? /* @__PURE__ */ q(Jn, {
|
|
2389
2389
|
compact: !0,
|
|
2390
2390
|
model: e
|
|
2391
2391
|
}) : null,
|
|
2392
2392
|
f ? r ? /* @__PURE__ */ J("div", {
|
|
2393
2393
|
role: "alert",
|
|
2394
|
-
...
|
|
2395
|
-
children: [
|
|
2394
|
+
...C(X.message),
|
|
2395
|
+
children: [E("history.readFailed", { error: f }), /* @__PURE__ */ q("button", {
|
|
2396
2396
|
disabled: p,
|
|
2397
2397
|
type: "button",
|
|
2398
|
-
...
|
|
2398
|
+
...C(X.buttonBase, X.messageButton),
|
|
2399
2399
|
onClick: e.refresh,
|
|
2400
|
-
children:
|
|
2400
|
+
children: E("common.retry")
|
|
2401
2401
|
})]
|
|
2402
2402
|
}) : /* @__PURE__ */ q("p", {
|
|
2403
|
-
...
|
|
2404
|
-
children:
|
|
2403
|
+
...C(X.message),
|
|
2404
|
+
children: E("history.unreadable")
|
|
2405
2405
|
}) : d || !o ? /* @__PURE__ */ q("div", {
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2406
|
+
...C(X.message),
|
|
2407
|
+
children: /* @__PURE__ */ q(D, {
|
|
2408
|
+
label: E(p ? "history.waitingEdits" : "history.computing"),
|
|
2409
|
+
size: 14
|
|
2410
|
+
})
|
|
2409
2411
|
}) : /* @__PURE__ */ J("div", {
|
|
2410
|
-
"aria-label":
|
|
2412
|
+
"aria-label": E("history.diffBody"),
|
|
2411
2413
|
ref: i,
|
|
2412
|
-
...
|
|
2414
|
+
...C(X.content),
|
|
2413
2415
|
children: [
|
|
2414
2416
|
o.latest.value.root.children.some((e) => e.type === "heading" && e.tag === "h1") ? null : /* @__PURE__ */ q("h1", {
|
|
2415
|
-
...
|
|
2417
|
+
...C(X.contentTitle),
|
|
2416
2418
|
children: n
|
|
2417
2419
|
}),
|
|
2418
2420
|
l ? null : /* @__PURE__ */ q("p", {
|
|
2419
2421
|
role: "status",
|
|
2420
|
-
...
|
|
2421
|
-
children:
|
|
2422
|
+
...C(X.note),
|
|
2423
|
+
children: E("history.noDiff")
|
|
2422
2424
|
}),
|
|
2423
2425
|
c.map(y),
|
|
2424
2426
|
/* @__PURE__ */ q("p", {
|
|
2425
|
-
...
|
|
2426
|
-
children:
|
|
2427
|
+
...C(X.end),
|
|
2428
|
+
children: E("history.endOfDiff")
|
|
2427
2429
|
})
|
|
2428
2430
|
]
|
|
2429
2431
|
})
|
|
@@ -2431,49 +2433,49 @@ function rr({ model: e, theme: t, title: n, narrow: r, bodyRef: i, onPick: a })
|
|
|
2431
2433
|
});
|
|
2432
2434
|
}
|
|
2433
2435
|
// ../../node_modules/.pnpm/@haklex+rich-diff-core@0.64.2_lexical@0.53.0_typescript@6.0.3_/node_modules/@haklex/rich-diff-core/dist/index.mjs
|
|
2434
|
-
var
|
|
2436
|
+
var ar = 5e4, or = "background-color: color-mix(in srgb, var(--rc-alert-caution) 22%, transparent); text-decoration: line-through;", sr = "background-color: color-mix(in srgb, var(--rc-alert-tip) 22%, transparent);";
|
|
2435
2437
|
function Z(e) {
|
|
2436
2438
|
let t = e;
|
|
2437
2439
|
return t.type === "heading" ? `heading:${t.tag}` : t.type === "list" ? `list:${t.listType}` : t.type || "unknown";
|
|
2438
2440
|
}
|
|
2439
|
-
function
|
|
2441
|
+
function cr(e, t) {
|
|
2440
2442
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
2441
2443
|
}
|
|
2442
|
-
function
|
|
2444
|
+
function lr(e) {
|
|
2443
2445
|
let t = e;
|
|
2444
2446
|
return t.type === "text" && typeof t.text == "string";
|
|
2445
2447
|
}
|
|
2446
|
-
function
|
|
2448
|
+
function ur(e) {
|
|
2447
2449
|
let t = e;
|
|
2448
2450
|
return Array.isArray(t.children) ? t.children : null;
|
|
2449
2451
|
}
|
|
2450
|
-
function
|
|
2452
|
+
function dr(e, t) {
|
|
2451
2453
|
let n = typeof e == "string" ? e.trim() : "";
|
|
2452
2454
|
return n ? `${n}${n.endsWith(";") ? "" : ";"} ${t}` : t;
|
|
2453
2455
|
}
|
|
2454
2456
|
function Q(e, t, n) {
|
|
2455
2457
|
let { style: r } = e;
|
|
2456
|
-
return n === "delete" ? r =
|
|
2458
|
+
return n === "delete" ? r = dr(r, or) : n === "insert" && (r = dr(r, sr)), {
|
|
2457
2459
|
...e,
|
|
2458
2460
|
text: t,
|
|
2459
2461
|
style: r
|
|
2460
2462
|
};
|
|
2461
2463
|
}
|
|
2462
|
-
function
|
|
2464
|
+
function fr(e, t) {
|
|
2463
2465
|
return {
|
|
2464
2466
|
...e,
|
|
2465
2467
|
children: t
|
|
2466
2468
|
};
|
|
2467
2469
|
}
|
|
2468
2470
|
function $(e, t) {
|
|
2469
|
-
if (
|
|
2470
|
-
let n =
|
|
2471
|
-
return n ?
|
|
2471
|
+
if (lr(e)) return Q(e, e.text, t);
|
|
2472
|
+
let n = ur(e);
|
|
2473
|
+
return n ? fr(e, n.map((e) => $(e, t))) : e;
|
|
2472
2474
|
}
|
|
2473
|
-
function
|
|
2475
|
+
function pr(e) {
|
|
2474
2476
|
return Array.from(e).reverse().join("");
|
|
2475
2477
|
}
|
|
2476
|
-
function
|
|
2478
|
+
function mr(e) {
|
|
2477
2479
|
let t = [];
|
|
2478
2480
|
for (let n of e) {
|
|
2479
2481
|
if (!n.text) continue;
|
|
@@ -2482,7 +2484,7 @@ function pr(e) {
|
|
|
2482
2484
|
}
|
|
2483
2485
|
return t;
|
|
2484
2486
|
}
|
|
2485
|
-
function
|
|
2487
|
+
function hr(e, t) {
|
|
2486
2488
|
let n = e.length, r = t.length;
|
|
2487
2489
|
if (n === 0 && r === 0) return [];
|
|
2488
2490
|
if (n === 0) return [{
|
|
@@ -2493,7 +2495,7 @@ function mr(e, t) {
|
|
|
2493
2495
|
kind: "delete",
|
|
2494
2496
|
text: e.join("")
|
|
2495
2497
|
}];
|
|
2496
|
-
if (n * r >
|
|
2498
|
+
if (n * r > ar) return [{
|
|
2497
2499
|
kind: "delete",
|
|
2498
2500
|
text: e.join("")
|
|
2499
2501
|
}, {
|
|
@@ -2536,12 +2538,12 @@ function mr(e, t) {
|
|
|
2536
2538
|
text: t[s - 1]
|
|
2537
2539
|
}), s--;
|
|
2538
2540
|
}
|
|
2539
|
-
return
|
|
2541
|
+
return mr(a.reverse().map((e) => ({
|
|
2540
2542
|
kind: e.kind,
|
|
2541
|
-
text:
|
|
2543
|
+
text: pr(e.text)
|
|
2542
2544
|
})));
|
|
2543
2545
|
}
|
|
2544
|
-
function
|
|
2546
|
+
function gr(e, t) {
|
|
2545
2547
|
let n = Array.from(e), r = Array.from(t), i = 0;
|
|
2546
2548
|
for (; i < n.length && i < r.length && n[i] === r[i];) i++;
|
|
2547
2549
|
let a = n.length - 1, o = r.length - 1;
|
|
@@ -2550,13 +2552,13 @@ function hr(e, t) {
|
|
|
2550
2552
|
return i > 0 && s.push({
|
|
2551
2553
|
kind: "equal",
|
|
2552
2554
|
text: n.slice(0, i).join("")
|
|
2553
|
-
}), s.push(...
|
|
2555
|
+
}), s.push(...hr(n.slice(i, a + 1), r.slice(i, o + 1))), a < n.length - 1 && s.push({
|
|
2554
2556
|
kind: "equal",
|
|
2555
2557
|
text: n.slice(a + 1).join("")
|
|
2556
|
-
}),
|
|
2558
|
+
}), mr(s);
|
|
2557
2559
|
}
|
|
2558
|
-
function
|
|
2559
|
-
let n =
|
|
2560
|
+
function _r(e, t) {
|
|
2561
|
+
let n = gr(e.text, t.text), r = [], i = [], a = !1;
|
|
2560
2562
|
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"))));
|
|
2561
2563
|
return {
|
|
2562
2564
|
oldNodes: r.length > 0 ? r : [e],
|
|
@@ -2564,19 +2566,19 @@ function gr(e, t) {
|
|
|
2564
2566
|
changed: a
|
|
2565
2567
|
};
|
|
2566
2568
|
}
|
|
2567
|
-
function
|
|
2569
|
+
function vr(e, t) {
|
|
2568
2570
|
let n = e.length, r = t.length, i = Array.from({ length: n + 1 }, () => Array.from({ length: r + 1 }).fill(0));
|
|
2569
2571
|
for (let a = 1; a <= n; a++) for (let n = 1; n <= r; n++) {
|
|
2570
2572
|
let r = Math.max(i[a - 1][n], i[a][n - 1]);
|
|
2571
2573
|
if (Z(e[a - 1]) === Z(t[n - 1])) {
|
|
2572
|
-
let o =
|
|
2574
|
+
let o = cr(e[a - 1], t[n - 1]) ? 2 : 1;
|
|
2573
2575
|
i[a][n] = Math.max(r, i[a - 1][n - 1] + o);
|
|
2574
2576
|
} else i[a][n] = r;
|
|
2575
2577
|
}
|
|
2576
2578
|
let a = [], o = n, s = r;
|
|
2577
2579
|
for (; o > 0 && s > 0;) {
|
|
2578
2580
|
if (Z(e[o - 1]) === Z(t[s - 1])) {
|
|
2579
|
-
let n =
|
|
2581
|
+
let n = cr(e[o - 1], t[s - 1]), r = n ? 2 : 1;
|
|
2580
2582
|
if (i[o][s] === i[o - 1][s - 1] + r) {
|
|
2581
2583
|
a.push(n ? {
|
|
2582
2584
|
kind: "equal",
|
|
@@ -2607,8 +2609,8 @@ function _r(e, t) {
|
|
|
2607
2609
|
});
|
|
2608
2610
|
return a.reverse(), a;
|
|
2609
2611
|
}
|
|
2610
|
-
function
|
|
2611
|
-
let n =
|
|
2612
|
+
function yr(e, t) {
|
|
2613
|
+
let n = vr(e, t), r = [], i = [], a = !1;
|
|
2612
2614
|
for (let e of n) switch (e.kind) {
|
|
2613
2615
|
case "equal":
|
|
2614
2616
|
r.push(e.node), i.push(e.node);
|
|
@@ -2620,12 +2622,12 @@ function vr(e, t) {
|
|
|
2620
2622
|
a = !0, i.push($(e.node, "insert"));
|
|
2621
2623
|
break;
|
|
2622
2624
|
case "modify": {
|
|
2623
|
-
if (a = !0,
|
|
2624
|
-
let t =
|
|
2625
|
+
if (a = !0, lr(e.oldNode) && lr(e.newNode)) {
|
|
2626
|
+
let t = _r(e.oldNode, e.newNode);
|
|
2625
2627
|
r.push(...t.oldNodes), i.push(...t.newNodes);
|
|
2626
2628
|
break;
|
|
2627
2629
|
}
|
|
2628
|
-
let t =
|
|
2630
|
+
let t = br(e.oldNode, e.newNode);
|
|
2629
2631
|
t ? (r.push(t.oldNode), i.push(t.newNode)) : (r.push($(e.oldNode, "delete")), i.push($(e.newNode, "insert")));
|
|
2630
2632
|
break;
|
|
2631
2633
|
}
|
|
@@ -2636,19 +2638,19 @@ function vr(e, t) {
|
|
|
2636
2638
|
changed: a
|
|
2637
2639
|
};
|
|
2638
2640
|
}
|
|
2639
|
-
function
|
|
2641
|
+
function br(e, t) {
|
|
2640
2642
|
if (Z(e) !== Z(t)) return null;
|
|
2641
|
-
if (
|
|
2643
|
+
if (cr(e, t)) return {
|
|
2642
2644
|
oldNode: e,
|
|
2643
2645
|
newNode: t,
|
|
2644
2646
|
changed: !1
|
|
2645
2647
|
};
|
|
2646
|
-
let n =
|
|
2648
|
+
let n = ur(e), r = ur(t);
|
|
2647
2649
|
if (!n || !r) return null;
|
|
2648
|
-
let i =
|
|
2650
|
+
let i = yr(n, r);
|
|
2649
2651
|
return i.changed ? {
|
|
2650
|
-
oldNode:
|
|
2651
|
-
newNode:
|
|
2652
|
+
oldNode: fr(e, i.oldChildren),
|
|
2653
|
+
newNode: fr(t, i.newChildren),
|
|
2652
2654
|
changed: !0
|
|
2653
2655
|
} : {
|
|
2654
2656
|
oldNode: e,
|
|
@@ -2656,8 +2658,8 @@ function yr(e, t) {
|
|
|
2656
2658
|
changed: !1
|
|
2657
2659
|
};
|
|
2658
2660
|
}
|
|
2659
|
-
function
|
|
2660
|
-
let n =
|
|
2661
|
+
function xr(e, t) {
|
|
2662
|
+
let n = br(e, t);
|
|
2661
2663
|
return n ? {
|
|
2662
2664
|
oldNode: n.oldNode,
|
|
2663
2665
|
newNode: n.newNode
|
|
@@ -2666,13 +2668,13 @@ function br(e, t) {
|
|
|
2666
2668
|
newNode: $(t, "insert")
|
|
2667
2669
|
};
|
|
2668
2670
|
}
|
|
2669
|
-
function
|
|
2670
|
-
let n =
|
|
2671
|
+
function Sr(e, t) {
|
|
2672
|
+
let n = gr(e.text, t.text), r = [];
|
|
2671
2673
|
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")));
|
|
2672
2674
|
return r;
|
|
2673
2675
|
}
|
|
2674
|
-
function
|
|
2675
|
-
let n =
|
|
2676
|
+
function Cr(e, t) {
|
|
2677
|
+
let n = vr(e, t), r = [];
|
|
2676
2678
|
for (let e of n) switch (e.kind) {
|
|
2677
2679
|
case "equal":
|
|
2678
2680
|
r.push(e.node);
|
|
@@ -2684,25 +2686,25 @@ function Sr(e, t) {
|
|
|
2684
2686
|
r.push($(e.node, "insert"));
|
|
2685
2687
|
break;
|
|
2686
2688
|
case "modify": {
|
|
2687
|
-
if (
|
|
2688
|
-
r.push(...
|
|
2689
|
+
if (lr(e.oldNode) && lr(e.newNode)) {
|
|
2690
|
+
r.push(...Sr(e.oldNode, e.newNode));
|
|
2689
2691
|
break;
|
|
2690
2692
|
}
|
|
2691
|
-
let t =
|
|
2692
|
-
t && n ? r.push(
|
|
2693
|
+
let t = ur(e.oldNode), n = ur(e.newNode);
|
|
2694
|
+
t && n ? r.push(fr(e.newNode, Cr(t, n))) : (r.push($(e.oldNode, "delete")), r.push($(e.newNode, "insert")));
|
|
2693
2695
|
break;
|
|
2694
2696
|
}
|
|
2695
2697
|
}
|
|
2696
2698
|
return r;
|
|
2697
2699
|
}
|
|
2698
|
-
function
|
|
2700
|
+
function wr(e, t) {
|
|
2699
2701
|
if (Z(e) !== Z(t)) return $(t, "insert");
|
|
2700
|
-
if (
|
|
2701
|
-
let n =
|
|
2702
|
-
return !n || !r ? $(t, "insert") :
|
|
2702
|
+
if (cr(e, t)) return t;
|
|
2703
|
+
let n = ur(e), r = ur(t);
|
|
2704
|
+
return !n || !r ? $(t, "insert") : fr(t, Cr(n, r));
|
|
2703
2705
|
}
|
|
2704
|
-
function
|
|
2705
|
-
let n =
|
|
2706
|
+
function Tr(e, t) {
|
|
2707
|
+
let n = vr(e.root.children, t.root.children), r = [];
|
|
2706
2708
|
for (let e of n) switch (e.kind) {
|
|
2707
2709
|
case "equal": {
|
|
2708
2710
|
let t = r.at(-1);
|
|
@@ -2714,7 +2716,7 @@ function wr(e, t) {
|
|
|
2714
2716
|
}
|
|
2715
2717
|
case "modify":
|
|
2716
2718
|
{
|
|
2717
|
-
let t =
|
|
2719
|
+
let t = xr(e.oldNode, e.newNode);
|
|
2718
2720
|
r.push({
|
|
2719
2721
|
type: "delete",
|
|
2720
2722
|
nodes: [t.oldNode]
|
|
@@ -2738,19 +2740,19 @@ function wr(e, t) {
|
|
|
2738
2740
|
return r;
|
|
2739
2741
|
}
|
|
2740
2742
|
// src/viewer/document/historyDiff.ts
|
|
2741
|
-
function
|
|
2743
|
+
function Er(e) {
|
|
2742
2744
|
let t = { ...e };
|
|
2743
2745
|
if (t.$) {
|
|
2744
2746
|
let { blockId: e, ...n } = t.$;
|
|
2745
2747
|
Object.keys(n).length ? t.$ = n : delete t.$;
|
|
2746
2748
|
}
|
|
2747
|
-
return t.children &&= t.children.map(
|
|
2749
|
+
return t.children &&= t.children.map(Er), t;
|
|
2748
2750
|
}
|
|
2749
|
-
function
|
|
2751
|
+
function Dr(e, t) {
|
|
2750
2752
|
let { children: n, text: r, ...i } = e, { children: a, text: o, ...s } = t;
|
|
2751
|
-
return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a &&
|
|
2753
|
+
return JSON.stringify(i) !== JSON.stringify(s) || !!(n && a && jr(n, a).some((e) => e.kind === "modify" && Dr(e.old[0], e.current[0])));
|
|
2752
2754
|
}
|
|
2753
|
-
function
|
|
2755
|
+
function Or(e) {
|
|
2754
2756
|
let t = e;
|
|
2755
2757
|
return t.type === "dynamic" || t.type === "pending" ? {
|
|
2756
2758
|
type: "paragraph",
|
|
@@ -2761,11 +2763,11 @@ function Dr(e) {
|
|
|
2761
2763
|
children: [{
|
|
2762
2764
|
type: "text",
|
|
2763
2765
|
version: 1,
|
|
2764
|
-
text: t.type === "dynamic" ?
|
|
2766
|
+
text: t.type === "dynamic" ? w.t("history.dynamic", {
|
|
2765
2767
|
url: t.url,
|
|
2766
2768
|
height: t.initialHeight ?? 320,
|
|
2767
2769
|
props: JSON.stringify(t.props ?? {})
|
|
2768
|
-
}) :
|
|
2770
|
+
}) : w.t("history.pendingIntent", { intent: t.intent ?? "" }),
|
|
2769
2771
|
format: 0,
|
|
2770
2772
|
detail: 0,
|
|
2771
2773
|
mode: "normal",
|
|
@@ -2773,13 +2775,13 @@ function Dr(e) {
|
|
|
2773
2775
|
}]
|
|
2774
2776
|
} : t.children ? {
|
|
2775
2777
|
...t,
|
|
2776
|
-
children: t.children.map(
|
|
2778
|
+
children: t.children.map(Or)
|
|
2777
2779
|
} : t;
|
|
2778
2780
|
}
|
|
2779
|
-
function Or(e) {
|
|
2780
|
-
return kr(e.map(Dr));
|
|
2781
|
-
}
|
|
2782
2781
|
function kr(e) {
|
|
2782
|
+
return Ar(e.map(Or));
|
|
2783
|
+
}
|
|
2784
|
+
function Ar(e) {
|
|
2783
2785
|
return { root: {
|
|
2784
2786
|
type: "root",
|
|
2785
2787
|
version: 1,
|
|
@@ -2789,8 +2791,8 @@ function kr(e) {
|
|
|
2789
2791
|
children: e
|
|
2790
2792
|
} };
|
|
2791
2793
|
}
|
|
2792
|
-
function
|
|
2793
|
-
let n =
|
|
2794
|
+
function jr(e, t) {
|
|
2795
|
+
let n = Tr(Ar(e), Ar(t)), r = [], i = 0, a = 0;
|
|
2794
2796
|
for (let o = 0; o < n.length; o++) {
|
|
2795
2797
|
let s = n[o];
|
|
2796
2798
|
if (s.type === "equal") {
|
|
@@ -2823,43 +2825,43 @@ function Ar(e, t) {
|
|
|
2823
2825
|
}
|
|
2824
2826
|
return r;
|
|
2825
2827
|
}
|
|
2826
|
-
function
|
|
2827
|
-
return
|
|
2828
|
+
function Mr(e, t) {
|
|
2829
|
+
return jr(e.root.children.map(Er), t.root.children.map(Er)).map((e) => {
|
|
2828
2830
|
let t = {
|
|
2829
2831
|
oldIndex: e.oldIndex,
|
|
2830
2832
|
newIndex: e.newIndex
|
|
2831
2833
|
};
|
|
2832
2834
|
if (e.kind === "modify") {
|
|
2833
2835
|
let n = e.old[0], r = e.current[0];
|
|
2834
|
-
return n.type === r.type && !
|
|
2836
|
+
return n.type === r.type && !Dr(n, r) ? {
|
|
2835
2837
|
kind: "modify",
|
|
2836
|
-
value:
|
|
2838
|
+
value: kr([wr(n, r)]),
|
|
2837
2839
|
...t
|
|
2838
2840
|
} : {
|
|
2839
2841
|
kind: "modify",
|
|
2840
|
-
before:
|
|
2841
|
-
value:
|
|
2842
|
+
before: kr(e.old),
|
|
2843
|
+
value: kr(e.current),
|
|
2842
2844
|
...t
|
|
2843
2845
|
};
|
|
2844
2846
|
}
|
|
2845
2847
|
let n = e.kind === "delete" ? e.old : e.current;
|
|
2846
2848
|
return {
|
|
2847
2849
|
kind: e.kind,
|
|
2848
|
-
value:
|
|
2850
|
+
value: kr(e.kind === "equal" ? n : n.map((t) => $(t, e.kind))),
|
|
2849
2851
|
...t
|
|
2850
2852
|
};
|
|
2851
2853
|
});
|
|
2852
2854
|
}
|
|
2853
2855
|
// src/viewer/document/DocumentHistory.tsx
|
|
2854
|
-
var
|
|
2855
|
-
function
|
|
2856
|
-
let [s, c] = G(null), [l, u] = G(null), d = W(null), f = W(null), p = W(0), [m, h] = G(!0), [g, _] = G(null), [y, b] = G(!1), [x, S] = G([]), [C, w] = G(!1), [T,
|
|
2856
|
+
var Nr = (e) => JSON.stringify(e.frontiers()), Pr = (e, t) => t === void 0 ? void 0 : e[t];
|
|
2857
|
+
function Fr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClose: o }) {
|
|
2858
|
+
let [s, c] = G(null), [l, u] = G(null), d = W(null), f = W(null), p = W(0), [m, h] = G(!0), [g, _] = G(null), [y, b] = G(!1), [x, S] = G([]), [C, w] = G(!1), [T, E] = G(0), [D, O] = G(!1), ee = v("(max-width: 1100px)"), te = W(null), k = V(async () => {
|
|
2857
2859
|
if (!e) return;
|
|
2858
2860
|
let n = ++p.current;
|
|
2859
2861
|
h(!0), _(null);
|
|
2860
2862
|
let r = e.fork();
|
|
2861
2863
|
try {
|
|
2862
|
-
let i = await
|
|
2864
|
+
let i = await un(r), a = dn(r, r.frontiers(), t);
|
|
2863
2865
|
if (p.current !== n) {
|
|
2864
2866
|
r.free();
|
|
2865
2867
|
return;
|
|
@@ -2871,7 +2873,7 @@ function Pr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2871
2873
|
doc: r,
|
|
2872
2874
|
history: i,
|
|
2873
2875
|
latest: a
|
|
2874
|
-
}), b(
|
|
2876
|
+
}), b(Nr(e) !== Nr(r)), o?.free();
|
|
2875
2877
|
} catch (e) {
|
|
2876
2878
|
r.free(), p.current === n && _(e.message);
|
|
2877
2879
|
} finally {
|
|
@@ -2880,42 +2882,42 @@ function Pr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2880
2882
|
}, [e, t]);
|
|
2881
2883
|
if (H(() => {
|
|
2882
2884
|
if (a) return () => {
|
|
2883
|
-
p.current++, f.current?.free(), f.current = null, d.current = null, c(null), u(null), S([]), b(!1), _(null), h(!0),
|
|
2885
|
+
p.current++, f.current?.free(), f.current = null, d.current = null, c(null), u(null), S([]), b(!1), _(null), h(!0), O(!1), w(!1);
|
|
2884
2886
|
};
|
|
2885
2887
|
}, [a, e]), H(() => {
|
|
2886
|
-
a && !n && !f.current &&
|
|
2888
|
+
a && !n && !f.current && k();
|
|
2887
2889
|
}, [
|
|
2888
2890
|
a,
|
|
2889
|
-
|
|
2891
|
+
k,
|
|
2890
2892
|
n
|
|
2891
2893
|
]), H(() => {
|
|
2892
|
-
if (a && e) return e.subscribe(() => b(f.current !== null &&
|
|
2894
|
+
if (a && e) return e.subscribe(() => b(f.current !== null && Nr(e) !== Nr(f.current)));
|
|
2893
2895
|
}, [e, a]), H(() => {
|
|
2894
2896
|
if (!a) return;
|
|
2895
2897
|
let e = (e) => {
|
|
2896
|
-
e.key === "Escape" && (
|
|
2898
|
+
e.key === "Escape" && (D ? O(!1) : o());
|
|
2897
2899
|
};
|
|
2898
2900
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2899
2901
|
}, [
|
|
2900
2902
|
a,
|
|
2901
2903
|
o,
|
|
2902
|
-
|
|
2904
|
+
D
|
|
2903
2905
|
]), H(() => {
|
|
2904
2906
|
if (!s || !l) return;
|
|
2905
2907
|
let e = !1;
|
|
2906
2908
|
h(!0);
|
|
2907
2909
|
let n = setTimeout(() => {
|
|
2908
2910
|
try {
|
|
2909
|
-
let n =
|
|
2911
|
+
let n = dn(s.doc, l.frontiers, t), { entries: r, groups: i } = s.history, a = pn(s.doc, r.slice(r.indexOf(l) + 1), [n, s.latest]), o = new Map(i.flatMap((e) => e.entries.map((t) => [t, e]))), c = Mr(n.value, s.latest.value).map((e) => {
|
|
2910
2912
|
if (e.kind === "equal") return e;
|
|
2911
|
-
let t = [
|
|
2913
|
+
let t = [Pr(s.latest.ids, e.newIndex), Pr(n.ids, e.oldIndex)].map((e) => e && a.get(e)).find(Boolean);
|
|
2912
2914
|
return t ? {
|
|
2913
2915
|
...e,
|
|
2914
2916
|
author: t,
|
|
2915
2917
|
group: o.get(t)
|
|
2916
2918
|
} : e;
|
|
2917
2919
|
});
|
|
2918
|
-
e || (S(c),
|
|
2920
|
+
e || (S(c), E(0), _(null));
|
|
2919
2921
|
} catch (t) {
|
|
2920
2922
|
e || _(t.message);
|
|
2921
2923
|
} finally {
|
|
@@ -2930,7 +2932,7 @@ function Pr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2930
2932
|
l,
|
|
2931
2933
|
t
|
|
2932
2934
|
]), !a || !e) return null;
|
|
2933
|
-
let A = x.filter((e) => e.kind !== "equal").length,
|
|
2935
|
+
let A = x.filter((e) => e.kind !== "equal").length, j = {
|
|
2934
2936
|
session: s,
|
|
2935
2937
|
selected: l,
|
|
2936
2938
|
blocks: x,
|
|
@@ -2942,37 +2944,37 @@ function Pr({ doc: e, nodes: t, streaming: n, theme: r, title: i, open: a, onClo
|
|
|
2942
2944
|
streaming: n,
|
|
2943
2945
|
onlyChanges: C,
|
|
2944
2946
|
select: (e) => {
|
|
2945
|
-
d.current = e, u(e),
|
|
2947
|
+
d.current = e, u(e), O(!1);
|
|
2946
2948
|
},
|
|
2947
2949
|
navigate: (e) => {
|
|
2948
2950
|
let t = Math.max(0, Math.min(A - 1, T + e));
|
|
2949
|
-
|
|
2951
|
+
E(t), (te.current?.querySelectorAll("[data-history-change]"))?.[t]?.scrollIntoView?.({
|
|
2950
2952
|
block: "center",
|
|
2951
2953
|
behavior: "instant"
|
|
2952
2954
|
});
|
|
2953
2955
|
},
|
|
2954
2956
|
toggleOnly: () => w((e) => !e),
|
|
2955
2957
|
showAll: () => w(!1),
|
|
2956
|
-
refresh: () => void
|
|
2958
|
+
refresh: () => void k(),
|
|
2957
2959
|
close: o
|
|
2958
2960
|
};
|
|
2959
2961
|
return {
|
|
2960
|
-
content: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2961
|
-
bodyRef:
|
|
2962
|
-
model:
|
|
2963
|
-
narrow:
|
|
2962
|
+
content: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ir, {
|
|
2963
|
+
bodyRef: te,
|
|
2964
|
+
model: j,
|
|
2965
|
+
narrow: ee,
|
|
2964
2966
|
theme: r,
|
|
2965
2967
|
title: i,
|
|
2966
|
-
onPick: () =>
|
|
2967
|
-
}),
|
|
2968
|
-
model:
|
|
2969
|
-
onDismiss: () =>
|
|
2968
|
+
onPick: () => O(!0)
|
|
2969
|
+
}), ee && D ? /* @__PURE__ */ q(er, {
|
|
2970
|
+
model: j,
|
|
2971
|
+
onDismiss: () => O(!1)
|
|
2970
2972
|
}) : null] }),
|
|
2971
|
-
panel:
|
|
2973
|
+
panel: ee ? null : /* @__PURE__ */ q($n, { model: j })
|
|
2972
2974
|
};
|
|
2973
2975
|
}
|
|
2974
2976
|
// src/viewer/document/LinkedBoards.tsx
|
|
2975
|
-
function
|
|
2977
|
+
function Ir(e) {
|
|
2976
2978
|
let t = /* @__PURE__ */ new Map();
|
|
2977
2979
|
for (let n of e) {
|
|
2978
2980
|
if (!n.artboard) continue;
|
|
@@ -2984,7 +2986,7 @@ function Fr(e) {
|
|
|
2984
2986
|
}
|
|
2985
2987
|
return [...t.values()];
|
|
2986
2988
|
}
|
|
2987
|
-
function
|
|
2989
|
+
function Lr({ refs: e, onOpen: t }) {
|
|
2988
2990
|
let { t: n } = S(), [r, i] = G(!1), a = W(null);
|
|
2989
2991
|
H(() => {
|
|
2990
2992
|
if (!r) return;
|
|
@@ -2993,7 +2995,7 @@ function Ir({ refs: e, onOpen: t }) {
|
|
|
2993
2995
|
};
|
|
2994
2996
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2995
2997
|
}, [r]);
|
|
2996
|
-
let o =
|
|
2998
|
+
let o = Ir(e);
|
|
2997
2999
|
return o.length ? /* @__PURE__ */ J("div", {
|
|
2998
3000
|
ref: a,
|
|
2999
3001
|
className: "x1n2onr6",
|
|
@@ -3004,13 +3006,13 @@ function Ir({ refs: e, onOpen: t }) {
|
|
|
3004
3006
|
onClick: () => i((e) => !e),
|
|
3005
3007
|
className: "x3nfvp2 x6s0dn4 x17d4w8g x1fgtraw x1awh872 xmkeg23 x1y0btm7 x12xov25 xur7f20 xjbqb8w xo2rkog xjb2p0i xfifm61 x1ypdohk xj0l527",
|
|
3006
3008
|
children: [
|
|
3007
|
-
/* @__PURE__ */ q(
|
|
3009
|
+
/* @__PURE__ */ q(kt, { size: 14 }),
|
|
3008
3010
|
n("refs.linked"),
|
|
3009
3011
|
/* @__PURE__ */ q("span", {
|
|
3010
3012
|
className: "xddlp02 xss6m8b",
|
|
3011
3013
|
children: o.length
|
|
3012
3014
|
}),
|
|
3013
|
-
/* @__PURE__ */ q(
|
|
3015
|
+
/* @__PURE__ */ q(Tt, { size: 13 })
|
|
3014
3016
|
]
|
|
3015
3017
|
}), r && /* @__PURE__ */ J("div", {
|
|
3016
3018
|
role: "menu",
|
|
@@ -3030,7 +3032,7 @@ function Ir({ refs: e, onOpen: t }) {
|
|
|
3030
3032
|
},
|
|
3031
3033
|
className: "x78zum5 x6s0dn4 x883omv xh8yej3 xe8ttls xc342km xu4hgxq xjbqb8w xo2rkog xjb2p0i x4z9k3i x1yc453h x1ypdohk xj0l527",
|
|
3032
3034
|
children: [
|
|
3033
|
-
/* @__PURE__ */ q(
|
|
3035
|
+
/* @__PURE__ */ q(kt, { size: 15 }),
|
|
3034
3036
|
/* @__PURE__ */ q("span", {
|
|
3035
3037
|
className: "x98rzlu xeuugli xb3r6kr xlyipyv",
|
|
3036
3038
|
children: e
|
|
@@ -3039,26 +3041,26 @@ function Ir({ refs: e, onOpen: t }) {
|
|
|
3039
3041
|
className: "x1qt5hsa xddlp02",
|
|
3040
3042
|
children: n("refs.count", { count: r })
|
|
3041
3043
|
}),
|
|
3042
|
-
/* @__PURE__ */ q(
|
|
3044
|
+
/* @__PURE__ */ q(Nt, { size: 15 })
|
|
3043
3045
|
]
|
|
3044
3046
|
}, e))]
|
|
3045
3047
|
})]
|
|
3046
3048
|
}) : null;
|
|
3047
3049
|
}
|
|
3048
3050
|
// src/viewer/document/PhoneEditMenu.tsx
|
|
3049
|
-
function
|
|
3051
|
+
function Rr({ left: e, top: t, placement: n, canComment: r, canEdit: i, onComment: a, onEdit: o }) {
|
|
3050
3052
|
let s = W(null), c = [r ? {
|
|
3051
|
-
label:
|
|
3052
|
-
Icon:
|
|
3053
|
+
label: E("common.comment"),
|
|
3054
|
+
Icon: Mt,
|
|
3053
3055
|
run: a,
|
|
3054
3056
|
primary: !0
|
|
3055
3057
|
} : null, i ? {
|
|
3056
|
-
label:
|
|
3057
|
-
Icon:
|
|
3058
|
+
label: E("document.editText"),
|
|
3059
|
+
Icon: Pt,
|
|
3058
3060
|
run: o,
|
|
3059
3061
|
primary: !1
|
|
3060
3062
|
} : null].filter((e) => e !== null);
|
|
3061
|
-
return
|
|
3063
|
+
return St(() => {
|
|
3062
3064
|
b(s.current, [{
|
|
3063
3065
|
opacity: 0,
|
|
3064
3066
|
transform: "scale(0.96)"
|
|
@@ -3101,10 +3103,10 @@ function Lr({ left: e, top: t, placement: n, canComment: r, canEdit: i, onCommen
|
|
|
3101
3103
|
});
|
|
3102
3104
|
}
|
|
3103
3105
|
// src/viewer/document/PhoneLayout.tsx
|
|
3104
|
-
var
|
|
3105
|
-
function
|
|
3106
|
-
let [g, _] = G(null), [v, y] = G(null), [b, x] = G(78), [S, C] = G(null), w =
|
|
3107
|
-
|
|
3106
|
+
var zr = 52;
|
|
3107
|
+
function Br({ 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: p, shareBase: m, children: h }) {
|
|
3108
|
+
let [g, _] = G(null), [v, y] = G(null), [b, x] = G(78), [S, C] = G(null), w = P(e, t, g);
|
|
3109
|
+
we(w, t, v), dt(S?.range ?? null, S?.elements);
|
|
3108
3110
|
let T = () => {
|
|
3109
3111
|
window.getSelection()?.removeAllRanges(), c();
|
|
3110
3112
|
};
|
|
@@ -3114,34 +3116,34 @@ function zr({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3114
3116
|
},
|
|
3115
3117
|
className: "x1n2onr6 x1cnzs8 x17qtykl x1ffnkcp",
|
|
3116
3118
|
children: [
|
|
3117
|
-
/* @__PURE__ */ q(
|
|
3118
|
-
e ? /* @__PURE__ */ q(
|
|
3119
|
+
/* @__PURE__ */ q(Ne, { editor: e }),
|
|
3120
|
+
e ? /* @__PURE__ */ q(pt, {
|
|
3119
3121
|
editor: e,
|
|
3120
3122
|
shareBase: m
|
|
3121
3123
|
}) : null,
|
|
3122
3124
|
/* @__PURE__ */ J("article", {
|
|
3123
3125
|
onClick: (e) => {
|
|
3124
|
-
let t =
|
|
3125
|
-
y(t), t && x(
|
|
3126
|
+
let t = Ce(w, e.clientX, e.clientY);
|
|
3127
|
+
y(t), t && x(en);
|
|
3126
3128
|
},
|
|
3127
3129
|
children: [p?.content, /* @__PURE__ */ q("div", {
|
|
3128
3130
|
hidden: !!p,
|
|
3129
3131
|
children: h
|
|
3130
3132
|
})]
|
|
3131
3133
|
}),
|
|
3132
|
-
s && !S && !p ? /* @__PURE__ */ q(
|
|
3133
|
-
...
|
|
3134
|
+
s && !S && !p ? /* @__PURE__ */ q(Rr, {
|
|
3135
|
+
...ge(s, {
|
|
3134
3136
|
left: 8,
|
|
3135
3137
|
right: (g?.clientWidth ?? 0) - 8
|
|
3136
3138
|
}, 170, 44, {
|
|
3137
3139
|
top: g?.getBoundingClientRect().top ?? 0,
|
|
3138
3140
|
height: window.innerHeight,
|
|
3139
|
-
reserved: f(b, window.innerHeight -
|
|
3141
|
+
reserved: f(b, window.innerHeight - zr)
|
|
3140
3142
|
}),
|
|
3141
3143
|
canComment: i,
|
|
3142
3144
|
canEdit: a && s.kind !== "block",
|
|
3143
3145
|
onComment: () => {
|
|
3144
|
-
C(s), x(
|
|
3146
|
+
C(s), x($t), T();
|
|
3145
3147
|
},
|
|
3146
3148
|
onEdit: () => {
|
|
3147
3149
|
u(s), c();
|
|
@@ -3150,7 +3152,7 @@ function zr({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3150
3152
|
/* @__PURE__ */ q("div", {
|
|
3151
3153
|
hidden: !!p,
|
|
3152
3154
|
className: "xixxii4 x1ozmhy9 xu96u03 x3m8u43 x1ey2m1c x1355qak x47corl",
|
|
3153
|
-
children: /* @__PURE__ */ q(
|
|
3155
|
+
children: /* @__PURE__ */ q(tn, {
|
|
3154
3156
|
actions: n,
|
|
3155
3157
|
activeId: v,
|
|
3156
3158
|
agent: r,
|
|
@@ -3167,8 +3169,8 @@ function zr({ editor: e, threads: t, actions: n, agent: r, canComment: i, canEdi
|
|
|
3167
3169
|
});
|
|
3168
3170
|
}
|
|
3169
3171
|
// src/viewer/document/TopBar.tsx
|
|
3170
|
-
function
|
|
3171
|
-
let p = o ?
|
|
3172
|
+
function Vr({ id: e, title: t, activity: n, agentSection: r, offline: i, openComments: a, cloud: o, compact: s = !1, onDone: c, actions: l, agent: d = "Agent", history: f }) {
|
|
3173
|
+
let p = o ? Ht(n, d, r) : null;
|
|
3172
3174
|
return u(e, o ? {
|
|
3173
3175
|
...t ? { title: t } : {},
|
|
3174
3176
|
online: o.online,
|
|
@@ -3189,7 +3191,7 @@ function Br({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3189
3191
|
s ? null : /* @__PURE__ */ J("span", {
|
|
3190
3192
|
className: "xddlp02 xfifm61 xuxw1ft",
|
|
3191
3193
|
children: [
|
|
3192
|
-
|
|
3194
|
+
E("type.document"),
|
|
3193
3195
|
" / ",
|
|
3194
3196
|
/* @__PURE__ */ q("span", {
|
|
3195
3197
|
className: "xo2rkog x1s688f",
|
|
@@ -3206,14 +3208,14 @@ function Br({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3206
3208
|
}) : null,
|
|
3207
3209
|
i ? /* @__PURE__ */ q("span", {
|
|
3208
3210
|
className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xqdcvd7 x7zghnd",
|
|
3209
|
-
children:
|
|
3211
|
+
children: E("document.notSynced")
|
|
3210
3212
|
}) : null,
|
|
3211
3213
|
f?.open ? /* @__PURE__ */ J("span", {
|
|
3212
3214
|
className: "x78zum5 x6s0dn4 x17d4w8g xj8oexa x1awh872 x1e6avla x1j6dyjg xuxw1ft xeuugli xb3r6kr xlyipyv xahzvm9 x1bo0w0s",
|
|
3213
|
-
children: [/* @__PURE__ */ q(
|
|
3215
|
+
children: [/* @__PURE__ */ q(jt, {
|
|
3214
3216
|
"aria-hidden": "true",
|
|
3215
3217
|
size: 11
|
|
3216
|
-
}),
|
|
3218
|
+
}), E("document.readOnlyHistory")]
|
|
3217
3219
|
}) : null,
|
|
3218
3220
|
o?.reason && !s ? /* @__PURE__ */ q("span", {
|
|
3219
3221
|
className: "xb3r6kr xddlp02 xfifm61 xuxw1ft xlyipyv",
|
|
@@ -3225,7 +3227,7 @@ function Br({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3225
3227
|
children: [/* @__PURE__ */ q("i", { ...{
|
|
3226
3228
|
0: { className: "xci0xqf x1hagigm x16rqkct xxwmxtg" },
|
|
3227
3229
|
1: { className: "xci0xqf x1hagigm x16rqkct xux1nz0" }
|
|
3228
|
-
}[!!o.online | 0] }), o.online ?
|
|
3230
|
+
}[!!o.online | 0] }), o.online ? E("share.computerOnline") : E("share.computerOffline")]
|
|
3229
3231
|
}) : null,
|
|
3230
3232
|
f ? /* @__PURE__ */ q(g, {
|
|
3231
3233
|
available: f.available,
|
|
@@ -3238,13 +3240,13 @@ function Br({ id: e, title: t, activity: n, agentSection: r, offline: i, openCom
|
|
|
3238
3240
|
type: "button",
|
|
3239
3241
|
onClick: c,
|
|
3240
3242
|
className: "x12ulsxz xaope02 xc342km x1kogg8i x19ckca5 xs0jrwl xqfszdh x4z9k3i x1s688f x1ypdohk",
|
|
3241
|
-
children:
|
|
3243
|
+
children: E("common.done")
|
|
3242
3244
|
}) : o || s ? null : l
|
|
3243
3245
|
]
|
|
3244
3246
|
});
|
|
3245
3247
|
}
|
|
3246
3248
|
// src/viewer/document/selectionContext.ts
|
|
3247
|
-
function
|
|
3249
|
+
function Hr(e, t, n) {
|
|
3248
3250
|
let [r, i] = t <= n ? [t, n] : [n, t];
|
|
3249
3251
|
return {
|
|
3250
3252
|
blockIds: e.slice(r, i + 1).flatMap((e) => e.id ? [e.id] : []).slice(0, k.blockIds),
|
|
@@ -3252,7 +3254,7 @@ function Vr(e, t, n) {
|
|
|
3252
3254
|
};
|
|
3253
3255
|
}
|
|
3254
3256
|
// src/viewer/document/textSelection.ts
|
|
3255
|
-
function
|
|
3257
|
+
function Ur(e, t) {
|
|
3256
3258
|
return B().getChildren().flatMap((n) => {
|
|
3257
3259
|
let r = R(n, I), i = e.getElementByKey(n.getKey());
|
|
3258
3260
|
if (!r || !i || !t.intersectsNode(i)) return [];
|
|
@@ -3269,18 +3271,18 @@ function Hr(e, t) {
|
|
|
3269
3271
|
});
|
|
3270
3272
|
}
|
|
3271
3273
|
// src/viewer/document/useDocumentSelectionSync.ts
|
|
3272
|
-
var
|
|
3274
|
+
var Wr = crypto.randomUUID(), Gr = 300, Kr = {
|
|
3273
3275
|
quote: "",
|
|
3274
3276
|
blockIds: [],
|
|
3275
3277
|
heading: ""
|
|
3276
3278
|
};
|
|
3277
|
-
function
|
|
3279
|
+
function qr(e) {
|
|
3278
3280
|
let t = e.read(() => {
|
|
3279
|
-
let e =
|
|
3280
|
-
if (!
|
|
3281
|
+
let e = Fe();
|
|
3282
|
+
if (!ct(e)) return null;
|
|
3281
3283
|
let t = B().getChildren(), n = t.filter((t) => e.has(t.getKey()));
|
|
3282
3284
|
if (!n.length) return null;
|
|
3283
|
-
let r = t.indexOf(n[0]), { heading: i } =
|
|
3285
|
+
let r = t.indexOf(n[0]), { heading: i } = Hr(t.map((e) => ({
|
|
3284
3286
|
id: R(e, I),
|
|
3285
3287
|
heading: e.getType() === "heading",
|
|
3286
3288
|
text: e.getTextContent()
|
|
@@ -3293,15 +3295,15 @@ function Kr(e) {
|
|
|
3293
3295
|
});
|
|
3294
3296
|
if (t) return t;
|
|
3295
3297
|
let n = window.getSelection(), r = e.getRootElement();
|
|
3296
|
-
if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return
|
|
3298
|
+
if (!n || n.isCollapsed || !r?.contains(n.anchorNode) || !r.contains(n.focusNode)) return Kr;
|
|
3297
3299
|
let i = n.toString().trim().slice(0, k.quote);
|
|
3298
3300
|
return i ? e.read(() => {
|
|
3299
|
-
let t = B().getChildren(), r =
|
|
3301
|
+
let t = B().getChildren(), r = Ur(e, n.getRangeAt(0));
|
|
3300
3302
|
if (!r.length) return {
|
|
3301
|
-
...
|
|
3303
|
+
...Kr,
|
|
3302
3304
|
quote: i
|
|
3303
3305
|
};
|
|
3304
|
-
let a = t.findIndex((e) => R(e, I) === r[0].blockId), { heading: o } =
|
|
3306
|
+
let a = t.findIndex((e) => R(e, I) === r[0].blockId), { heading: o } = Hr(t.map((e) => ({
|
|
3305
3307
|
id: R(e, I) || "",
|
|
3306
3308
|
heading: e.getType() === "heading",
|
|
3307
3309
|
text: e.getTextContent().slice(0, k.heading)
|
|
@@ -3311,23 +3313,23 @@ function Kr(e) {
|
|
|
3311
3313
|
heading: o,
|
|
3312
3314
|
blockIds: r.map((e) => e.blockId).slice(0, k.blockIds)
|
|
3313
3315
|
};
|
|
3314
|
-
}) :
|
|
3316
|
+
}) : Kr;
|
|
3315
3317
|
}
|
|
3316
|
-
function
|
|
3317
|
-
let i = W(
|
|
3318
|
+
function Jr(e, t, n, r) {
|
|
3319
|
+
let i = W(Kr);
|
|
3318
3320
|
H(() => {
|
|
3319
3321
|
if (!e) return;
|
|
3320
3322
|
let n = 0, a = () => {
|
|
3321
|
-
let n =
|
|
3323
|
+
let n = qr(e);
|
|
3322
3324
|
JSON.stringify(n) !== JSON.stringify(i.current) && (i.current = n, r({
|
|
3323
3325
|
type: "selection",
|
|
3324
3326
|
artifact: t,
|
|
3325
|
-
tab:
|
|
3327
|
+
tab: Wr,
|
|
3326
3328
|
human: !0,
|
|
3327
3329
|
...n
|
|
3328
3330
|
}));
|
|
3329
3331
|
}, o = () => {
|
|
3330
|
-
clearTimeout(n), n = window.setTimeout(a,
|
|
3332
|
+
clearTimeout(n), n = window.setTimeout(a, Gr);
|
|
3331
3333
|
};
|
|
3332
3334
|
document.addEventListener("selectionchange", o);
|
|
3333
3335
|
let s = e.registerUpdateListener(o);
|
|
@@ -3342,7 +3344,7 @@ function qr(e, t, n, r) {
|
|
|
3342
3344
|
n && (i.current.quote || i.current.blockIds.length) && r({
|
|
3343
3345
|
type: "selection",
|
|
3344
3346
|
artifact: t,
|
|
3345
|
-
tab:
|
|
3347
|
+
tab: Wr,
|
|
3346
3348
|
human: !1,
|
|
3347
3349
|
...i.current
|
|
3348
3350
|
});
|
|
@@ -3353,28 +3355,28 @@ function qr(e, t, n, r) {
|
|
|
3353
3355
|
]);
|
|
3354
3356
|
}
|
|
3355
3357
|
// src/viewer/document/usePendingBlocks.ts
|
|
3356
|
-
var
|
|
3358
|
+
var Yr = {
|
|
3357
3359
|
count: 0,
|
|
3358
3360
|
firstKey: null
|
|
3359
|
-
},
|
|
3361
|
+
}, Xr = (e) => e.read(() => {
|
|
3360
3362
|
let e = B().getChildren().filter((e) => e.getType() === "pending").map((e) => e.getKey());
|
|
3361
3363
|
return {
|
|
3362
3364
|
count: e.length,
|
|
3363
3365
|
firstKey: e[0] ?? null
|
|
3364
3366
|
};
|
|
3365
3367
|
});
|
|
3366
|
-
function
|
|
3367
|
-
let [t, n] = G(
|
|
3368
|
+
function Zr(e) {
|
|
3369
|
+
let [t, n] = G(Yr);
|
|
3368
3370
|
return H(() => {
|
|
3369
3371
|
if (!e) {
|
|
3370
|
-
n(
|
|
3372
|
+
n(Yr);
|
|
3371
3373
|
return;
|
|
3372
3374
|
}
|
|
3373
3375
|
let t = (e) => n((t) => t.count === e.count && t.firstKey === e.firstKey ? t : e);
|
|
3374
|
-
return t(
|
|
3376
|
+
return t(Xr(e.getEditorState())), e.registerUpdateListener(({ editorState: e }) => t(Xr(e)));
|
|
3375
3377
|
}, [e]), t;
|
|
3376
3378
|
}
|
|
3377
|
-
function
|
|
3379
|
+
function Qr(e, t = 15e3) {
|
|
3378
3380
|
let [n, r] = G(() => Date.now());
|
|
3379
3381
|
return H(() => {
|
|
3380
3382
|
if (!e) return;
|
|
@@ -3384,11 +3386,11 @@ function Zr(e, t = 15e3) {
|
|
|
3384
3386
|
}, [e, t]), n;
|
|
3385
3387
|
}
|
|
3386
3388
|
// src/viewer/document/useSelectionComment.ts
|
|
3387
|
-
var
|
|
3388
|
-
function
|
|
3389
|
+
var $r = 200;
|
|
3390
|
+
function ei(e, t) {
|
|
3389
3391
|
let n = e.read(() => {
|
|
3390
|
-
let t =
|
|
3391
|
-
return
|
|
3392
|
+
let t = Fe();
|
|
3393
|
+
return ct(t) ? B().getChildren().flatMap((n) => {
|
|
3392
3394
|
if (!t.has(n.getKey())) return [];
|
|
3393
3395
|
let r = R(n, I), i = e.getElementByKey(n.getKey());
|
|
3394
3396
|
return r && i ? [{
|
|
@@ -3414,7 +3416,7 @@ function $r(e, t) {
|
|
|
3414
3416
|
}
|
|
3415
3417
|
let r = window.getSelection(), i = e.getRootElement();
|
|
3416
3418
|
if (!r || r.isCollapsed || r.rangeCount === 0 || !i?.contains(r.anchorNode) || !i.contains(r.focusNode)) return null;
|
|
3417
|
-
let a = r.toString().trim(), o = r.getRangeAt(0), s = e.read(() =>
|
|
3419
|
+
let a = r.toString().trim(), o = r.getRangeAt(0), s = e.read(() => Ur(e, o));
|
|
3418
3420
|
if (!s.length || !a) return null;
|
|
3419
3421
|
let c = [...o.getClientRects()], l = c[0] ?? o.getBoundingClientRect(), u = c.at(-1) ?? l, d = t.getBoundingClientRect();
|
|
3420
3422
|
return {
|
|
@@ -3431,12 +3433,12 @@ function $r(e, t) {
|
|
|
3431
3433
|
range: o.cloneRange()
|
|
3432
3434
|
};
|
|
3433
3435
|
}
|
|
3434
|
-
function
|
|
3436
|
+
function ti(e, t) {
|
|
3435
3437
|
let [n, r] = G(null);
|
|
3436
3438
|
return H(() => {
|
|
3437
3439
|
if (!e || !t) return;
|
|
3438
3440
|
let n = 0, i = () => {
|
|
3439
|
-
clearTimeout(n), n = window.setTimeout(() => r(
|
|
3441
|
+
clearTimeout(n), n = window.setTimeout(() => r(ei(e, t)), $r);
|
|
3440
3442
|
};
|
|
3441
3443
|
document.addEventListener("selectionchange", i);
|
|
3442
3444
|
let a = e.registerUpdateListener(i);
|
|
@@ -3448,43 +3450,43 @@ function ei(e, t) {
|
|
|
3448
3450
|
}, [e, t]), [
|
|
3449
3451
|
n,
|
|
3450
3452
|
V(() => {
|
|
3451
|
-
r(null), e?.read(() =>
|
|
3453
|
+
r(null), e?.read(() => ct(Fe())) && e.update(() => Ye(null));
|
|
3452
3454
|
}, [e]),
|
|
3453
|
-
V(() => e && t ?
|
|
3455
|
+
V(() => e && t ? ei(e, t) : null, [e, t])
|
|
3454
3456
|
];
|
|
3455
3457
|
}
|
|
3456
3458
|
// src/viewer/document/DocumentView.tsx
|
|
3457
|
-
var
|
|
3458
|
-
function
|
|
3459
|
+
var ni = [...pe.filter((e) => !Pe.some((t) => t.getType() === ("getType" in e ? e.getType() : e.replace.getType()))), ...Pe];
|
|
3460
|
+
function ri() {
|
|
3459
3461
|
let e = U(() => window.matchMedia("(prefers-color-scheme: dark)"), []), [t, n] = G(e.matches);
|
|
3460
3462
|
return H(() => {
|
|
3461
3463
|
let t = () => n(e.matches);
|
|
3462
3464
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3463
3465
|
}, [e]), t;
|
|
3464
3466
|
}
|
|
3465
|
-
function
|
|
3467
|
+
function ii(e) {
|
|
3466
3468
|
H(() => {
|
|
3467
3469
|
if (!e) return;
|
|
3468
3470
|
let t = document.createElement("base");
|
|
3469
3471
|
return t.href = e, document.head.prepend(t), () => t.remove();
|
|
3470
3472
|
}, [e]);
|
|
3471
3473
|
}
|
|
3472
|
-
var
|
|
3474
|
+
var ai = {
|
|
3473
3475
|
playing: !1,
|
|
3474
3476
|
section: null
|
|
3475
3477
|
};
|
|
3476
|
-
function
|
|
3477
|
-
let [d, f] = G(null), [m, g] = G(null), [y, b] = G(_), [x, S] = G(!1), [
|
|
3478
|
-
|
|
3479
|
-
let [
|
|
3480
|
-
e !== void 0 &&
|
|
3481
|
-
}, []), [
|
|
3478
|
+
function oi({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, shareBase: l, refs: u }) {
|
|
3479
|
+
let [d, f] = G(null), [m, g] = G(null), [y, b] = G(_), [x, S] = G(!1), [C, w] = G(null);
|
|
3480
|
+
Rt(m !== null || C !== null);
|
|
3481
|
+
let [T, D] = G(!1), [O, ee] = G(void 0), [te, k] = G(0), A = V((e) => {
|
|
3482
|
+
e !== void 0 && k(e - Date.now());
|
|
3483
|
+
}, []), [j, ie] = G(ai), [ae, oe] = G(!1), [se, ce] = G(!1), M = !a || a.online && !ae, N = se && M;
|
|
3482
3484
|
H(() => {
|
|
3483
|
-
M ||
|
|
3485
|
+
M || ce(!1);
|
|
3484
3486
|
}, [M]), H(() => {
|
|
3485
3487
|
if (!a) return;
|
|
3486
3488
|
let e = (e) => {
|
|
3487
|
-
h(e) && e.data?.type === "ryugi:document-history" && e.data.id === t && (e.data.action === "close" ?
|
|
3489
|
+
h(e) && e.data?.type === "ryugi:document-history" && e.data.id === t && (e.data.action === "close" ? ce(!1) : e.data.action === "toggle" && M && ce((e) => !e));
|
|
3488
3490
|
};
|
|
3489
3491
|
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
3490
3492
|
}, [
|
|
@@ -3492,22 +3494,22 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3492
3494
|
a,
|
|
3493
3495
|
M
|
|
3494
3496
|
]);
|
|
3495
|
-
let [P, le] = G(null),
|
|
3496
|
-
|
|
3497
|
-
let
|
|
3497
|
+
let [P, le] = G(null), ue = We(P, t, u);
|
|
3498
|
+
Qe(P);
|
|
3499
|
+
let fe = Me(ue ? P : null), [pe, me] = G(null), he = ri(), { artifact: ge, channel: _e } = n, ve = !a || a.online, F = !a || a.canEdit, I = v(p), ye = r(I), [be, xe] = G(!1), Se = ye ? be && F : F, Ce = V(async () => {
|
|
3498
3500
|
let e = await n.meta();
|
|
3499
3501
|
e && f(e);
|
|
3500
|
-
}, [n]),
|
|
3502
|
+
}, [n]), we = s != null;
|
|
3501
3503
|
H(() => {
|
|
3502
3504
|
let e = !1;
|
|
3503
3505
|
return (async () => {
|
|
3504
3506
|
try {
|
|
3505
|
-
await
|
|
3507
|
+
await Ce();
|
|
3506
3508
|
let t = await n.state();
|
|
3507
3509
|
if (e) return;
|
|
3508
|
-
let r = new
|
|
3509
|
-
r.setRecordTimestamp(!0), r.setChangeMergeInterval(20), r.import(
|
|
3510
|
-
let i =
|
|
3510
|
+
let r = new Te();
|
|
3511
|
+
r.setRecordTimestamp(!0), r.setChangeMergeInterval(20), r.import($e(t.snapshot)), D(!!t.streaming), ee(t.agentActiveAt), A(t.now), b(t.comments ?? _()), S(t.listening === !0);
|
|
3512
|
+
let i = we && !o() ? {
|
|
3511
3513
|
left: window.scrollX,
|
|
3512
3514
|
top: window.scrollY,
|
|
3513
3515
|
behavior: "instant"
|
|
@@ -3516,44 +3518,44 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3516
3518
|
e || window.scrollTo(i);
|
|
3517
3519
|
});
|
|
3518
3520
|
} catch (t) {
|
|
3519
|
-
e ||
|
|
3521
|
+
e || w(t.message);
|
|
3520
3522
|
}
|
|
3521
3523
|
})(), () => {
|
|
3522
3524
|
e = !0;
|
|
3523
3525
|
};
|
|
3524
3526
|
}, [
|
|
3525
3527
|
n,
|
|
3526
|
-
|
|
3528
|
+
Ce,
|
|
3527
3529
|
A,
|
|
3528
|
-
|
|
3529
|
-
]), H(() =>
|
|
3530
|
-
e.type === "change" ?
|
|
3530
|
+
we
|
|
3531
|
+
]), H(() => _e.subscribe((e) => {
|
|
3532
|
+
e.type === "change" ? Ce() : e.type === "doc-status" ? (D(e.streaming), ee(e.agentActiveAt), A(e.now)) : e.type === "doc-comments" && (b(e.comments), e.listening !== void 0 && S(e.listening));
|
|
3531
3533
|
}), [
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
+
_e,
|
|
3535
|
+
Ce,
|
|
3534
3536
|
A
|
|
3535
3537
|
]), H(() => {
|
|
3536
|
-
P?.setEditable(
|
|
3538
|
+
P?.setEditable(Se && !N);
|
|
3537
3539
|
}, [
|
|
3538
3540
|
P,
|
|
3539
|
-
|
|
3541
|
+
Se,
|
|
3540
3542
|
N
|
|
3541
3543
|
]), H(() => {
|
|
3542
|
-
|
|
3543
|
-
}, [
|
|
3544
|
-
let
|
|
3545
|
-
|
|
3544
|
+
F || xe(!1);
|
|
3545
|
+
}, [F]);
|
|
3546
|
+
let De = V((e) => {
|
|
3547
|
+
D(!!e.streaming), ee(e.agentActiveAt), A(e.now), e.comments && b(e.comments), e.listening !== void 0 && S(e.listening);
|
|
3546
3548
|
}, [A]);
|
|
3547
|
-
|
|
3548
|
-
let
|
|
3549
|
-
artifact:
|
|
3549
|
+
ii(d?.contentBase), Jr(P, ge, i && !N, n.send);
|
|
3550
|
+
let Oe = U(() => ({
|
|
3551
|
+
artifact: ge,
|
|
3550
3552
|
contentBase: d?.contentBase ?? "",
|
|
3551
|
-
channel:
|
|
3553
|
+
channel: _e,
|
|
3552
3554
|
send: n.send
|
|
3553
3555
|
}), [
|
|
3554
|
-
he,
|
|
3555
|
-
d?.contentBase,
|
|
3556
3556
|
ge,
|
|
3557
|
+
d?.contentBase,
|
|
3558
|
+
_e,
|
|
3557
3559
|
n
|
|
3558
3560
|
]);
|
|
3559
3561
|
H(() => {
|
|
@@ -3563,34 +3565,34 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3563
3565
|
title: n
|
|
3564
3566
|
});
|
|
3565
3567
|
}, [d?.title, t]), re("document");
|
|
3566
|
-
let
|
|
3567
|
-
editing:
|
|
3568
|
-
pending:
|
|
3569
|
-
agentActiveAt:
|
|
3570
|
-
now: ke +
|
|
3571
|
-
}),
|
|
3572
|
-
nextKey:
|
|
3573
|
-
agent:
|
|
3568
|
+
let L = Zr(P), ke = Qr(L.count > 0 && !T), Ae = Bt({
|
|
3569
|
+
editing: j.playing || T,
|
|
3570
|
+
pending: L.count,
|
|
3571
|
+
agentActiveAt: O,
|
|
3572
|
+
now: ke + te
|
|
3573
|
+
}), je = d?.agent ?? "Agent", Ne = U(() => ({
|
|
3574
|
+
nextKey: L.firstKey,
|
|
3575
|
+
agent: je,
|
|
3574
3576
|
activity: Ae.kind
|
|
3575
3577
|
}), [
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
+
L.firstKey,
|
|
3579
|
+
je,
|
|
3578
3580
|
Ae.kind
|
|
3579
|
-
]), Pe = U(() =>
|
|
3580
|
-
activity: a ?
|
|
3581
|
-
comments:
|
|
3581
|
+
]), Pe = U(() => de(y.threads), [y.threads]), Fe = Pe.filter((e) => e.status === "open").length, [Le, Re, ze] = ti(P, pe), R = V(() => ce(!1), []), Be = zt({
|
|
3582
|
+
activity: a ? Ht(Ae, je, j.section) : null,
|
|
3583
|
+
comments: Fe,
|
|
3582
3584
|
history: M,
|
|
3583
3585
|
historyOpen: N
|
|
3584
3586
|
}, (e) => {
|
|
3585
|
-
e === "close" ?
|
|
3586
|
-
}), Ve =
|
|
3587
|
+
e === "close" ? R() : M && ce((e) => !e);
|
|
3588
|
+
}), Ve = Fr({
|
|
3587
3589
|
doc: m,
|
|
3588
|
-
nodes:
|
|
3589
|
-
streaming:
|
|
3590
|
-
theme:
|
|
3590
|
+
nodes: ni,
|
|
3591
|
+
streaming: T,
|
|
3592
|
+
theme: he ? "dark" : "light",
|
|
3591
3593
|
title: d?.title || t,
|
|
3592
3594
|
open: N,
|
|
3593
|
-
onClose:
|
|
3595
|
+
onClose: R
|
|
3594
3596
|
}), z = V(async (e) => {
|
|
3595
3597
|
try {
|
|
3596
3598
|
return b(await n.comment(e)), !0;
|
|
@@ -3599,16 +3601,16 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3599
3601
|
}
|
|
3600
3602
|
}, [n]), He = U(() => ({
|
|
3601
3603
|
threads: y.threads,
|
|
3602
|
-
canAnswer:
|
|
3603
|
-
phone:
|
|
3604
|
+
canAnswer: F && !N,
|
|
3605
|
+
phone: ye,
|
|
3604
3606
|
send: (e) => void z(e)
|
|
3605
3607
|
}), [
|
|
3606
3608
|
y.threads,
|
|
3607
|
-
|
|
3609
|
+
F,
|
|
3608
3610
|
N,
|
|
3609
|
-
|
|
3611
|
+
ye,
|
|
3610
3612
|
z
|
|
3611
|
-
]),
|
|
3613
|
+
]), Ue = U(() => ({
|
|
3612
3614
|
reply: (e, t) => z({
|
|
3613
3615
|
op: "reply",
|
|
3614
3616
|
threadId: e,
|
|
@@ -3633,7 +3635,7 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3633
3635
|
op: "reopen",
|
|
3634
3636
|
threadId: e
|
|
3635
3637
|
})
|
|
3636
|
-
}), [z]),
|
|
3638
|
+
}), [z]), B = V((e, t) => z({
|
|
3637
3639
|
op: "create",
|
|
3638
3640
|
blockId: e.blockId,
|
|
3639
3641
|
...e.blockIds ? { blockIds: e.blockIds } : {},
|
|
@@ -3642,35 +3644,35 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3642
3644
|
text: t
|
|
3643
3645
|
}), [z]), Ge = V((e) => {
|
|
3644
3646
|
if (!P) return;
|
|
3645
|
-
P.setEditable(!0),
|
|
3647
|
+
P.setEditable(!0), xe(!0), P.getRootElement()?.focus({ preventScroll: !0 });
|
|
3646
3648
|
let t = window.getSelection();
|
|
3647
3649
|
t?.removeAllRanges(), t?.addRange(e.range);
|
|
3648
3650
|
}, [P]);
|
|
3649
|
-
if (
|
|
3651
|
+
if (C) return /* @__PURE__ */ q("div", {
|
|
3650
3652
|
className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
|
|
3651
|
-
children:
|
|
3653
|
+
children: C
|
|
3652
3654
|
});
|
|
3653
3655
|
if (!m) return s ?? /* @__PURE__ */ q("div", {
|
|
3654
3656
|
className: "x1o8uwn5 x2b8uid x1bo0w0s xqfszdh xif65rj",
|
|
3655
|
-
children:
|
|
3657
|
+
children: E("common.loading")
|
|
3656
3658
|
});
|
|
3657
|
-
let Ke = /* @__PURE__ */ q(
|
|
3658
|
-
value:
|
|
3659
|
-
children: /* @__PURE__ */ q(
|
|
3659
|
+
let Ke = /* @__PURE__ */ q(Je.Provider, {
|
|
3660
|
+
value: Oe,
|
|
3661
|
+
children: /* @__PURE__ */ q(Ee.Provider, {
|
|
3660
3662
|
value: He,
|
|
3661
|
-
children: /* @__PURE__ */ q(
|
|
3662
|
-
value:
|
|
3663
|
-
children: /* @__PURE__ */ q(
|
|
3663
|
+
children: /* @__PURE__ */ q(st.Provider, {
|
|
3664
|
+
value: ue,
|
|
3665
|
+
children: /* @__PURE__ */ q(Ie.Provider, {
|
|
3664
3666
|
value: Ne,
|
|
3665
|
-
children: /* @__PURE__ */ q(
|
|
3667
|
+
children: /* @__PURE__ */ q(it, {
|
|
3666
3668
|
agent: d?.agent,
|
|
3667
3669
|
doc: m,
|
|
3668
|
-
theme:
|
|
3670
|
+
theme: he ? "dark" : "light",
|
|
3669
3671
|
transport: n,
|
|
3670
|
-
onAgentPlayback:
|
|
3672
|
+
onAgentPlayback: ie,
|
|
3671
3673
|
onEditorReady: le,
|
|
3672
|
-
onOffline:
|
|
3673
|
-
onState:
|
|
3674
|
+
onOffline: oe,
|
|
3675
|
+
onState: De
|
|
3674
3676
|
})
|
|
3675
3677
|
})
|
|
3676
3678
|
})
|
|
@@ -3680,65 +3682,65 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3680
3682
|
className: "x1asgpun x1us19tq x1rozbrz xo2rkog",
|
|
3681
3683
|
className: `ryugi-doc ${{ className: "x1asgpun x1us19tq x1rozbrz xo2rkog" }.className ?? ""}`,
|
|
3682
3684
|
children: [
|
|
3683
|
-
Be ? null : /* @__PURE__ */ q(
|
|
3685
|
+
Be ? null : /* @__PURE__ */ q(Vr, {
|
|
3684
3686
|
activity: Ae,
|
|
3685
3687
|
agent: d?.agent,
|
|
3686
|
-
agentSection:
|
|
3688
|
+
agentSection: j.section,
|
|
3687
3689
|
cloud: a,
|
|
3688
|
-
compact:
|
|
3690
|
+
compact: I,
|
|
3689
3691
|
id: t,
|
|
3690
|
-
offline:
|
|
3691
|
-
openComments:
|
|
3692
|
+
offline: ae,
|
|
3693
|
+
openComments: Fe,
|
|
3692
3694
|
title: d?.title || t,
|
|
3693
|
-
actions:
|
|
3694
|
-
refs:
|
|
3695
|
-
onOpen:
|
|
3695
|
+
actions: ue ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Lr, {
|
|
3696
|
+
refs: fe,
|
|
3697
|
+
onOpen: ue.open
|
|
3696
3698
|
}), c] }) : c,
|
|
3697
3699
|
history: {
|
|
3698
3700
|
available: M,
|
|
3699
3701
|
open: N,
|
|
3700
|
-
toggle: () =>
|
|
3701
|
-
close:
|
|
3702
|
+
toggle: () => ce((e) => !e),
|
|
3703
|
+
close: R
|
|
3702
3704
|
},
|
|
3703
|
-
onDone:
|
|
3705
|
+
onDone: ye && be ? () => xe(!1) : void 0
|
|
3704
3706
|
}),
|
|
3705
|
-
|
|
3706
|
-
actions:
|
|
3707
|
+
ye ? /* @__PURE__ */ q(Br, {
|
|
3708
|
+
actions: Ue,
|
|
3707
3709
|
agent: d?.agent,
|
|
3708
|
-
canComment:
|
|
3709
|
-
canEdit:
|
|
3710
|
+
canComment: ve,
|
|
3711
|
+
canEdit: F,
|
|
3710
3712
|
clearSelection: Re,
|
|
3711
3713
|
editor: P,
|
|
3712
3714
|
history: Ve,
|
|
3713
3715
|
offline: !(!a || a.online),
|
|
3714
|
-
selection:
|
|
3716
|
+
selection: be ? null : Le,
|
|
3715
3717
|
shareBase: l,
|
|
3716
3718
|
threads: Pe,
|
|
3717
|
-
onCreate:
|
|
3719
|
+
onCreate: B,
|
|
3718
3720
|
onEdit: Ge,
|
|
3719
|
-
onMain:
|
|
3721
|
+
onMain: me,
|
|
3720
3722
|
children: Ke
|
|
3721
|
-
}) : /* @__PURE__ */ q(
|
|
3722
|
-
actions:
|
|
3723
|
+
}) : /* @__PURE__ */ q(Jt, {
|
|
3724
|
+
actions: Ue,
|
|
3723
3725
|
agent: d?.agent,
|
|
3724
|
-
canComment:
|
|
3726
|
+
canComment: ve,
|
|
3725
3727
|
clearSelection: Re,
|
|
3726
3728
|
editor: P,
|
|
3727
3729
|
history: Ve,
|
|
3728
|
-
resolveSelection:
|
|
3730
|
+
resolveSelection: ze,
|
|
3729
3731
|
selection: Le,
|
|
3730
3732
|
shareBase: l,
|
|
3731
3733
|
threads: Pe,
|
|
3732
|
-
onCreate:
|
|
3733
|
-
onMain:
|
|
3734
|
+
onCreate: B,
|
|
3735
|
+
onMain: me,
|
|
3734
3736
|
children: Ke
|
|
3735
3737
|
}),
|
|
3736
|
-
/* @__PURE__ */ q(
|
|
3737
|
-
agent:
|
|
3738
|
-
canAct:
|
|
3738
|
+
/* @__PURE__ */ q(ln, {
|
|
3739
|
+
agent: je,
|
|
3740
|
+
canAct: F && !N,
|
|
3739
3741
|
editor: P,
|
|
3740
3742
|
listening: x,
|
|
3741
|
-
phone:
|
|
3743
|
+
phone: ye,
|
|
3742
3744
|
send: He.send,
|
|
3743
3745
|
threads: y.threads
|
|
3744
3746
|
}),
|
|
@@ -3747,17 +3749,17 @@ function ai({ id: t, transport: n, live: i, cloud: a, fallback: s, actions: c, s
|
|
|
3747
3749
|
});
|
|
3748
3750
|
}
|
|
3749
3751
|
// src/shared/document-features.ts
|
|
3750
|
-
var
|
|
3752
|
+
var si = [
|
|
3751
3753
|
"pending",
|
|
3752
3754
|
"ask",
|
|
3753
3755
|
"ref"
|
|
3754
|
-
],
|
|
3756
|
+
], ci = (e) => {
|
|
3755
3757
|
let t = "";
|
|
3756
3758
|
for (let n = 0; n < e.length; n += 32768) t += String.fromCharCode(...e.subarray(n, n + 32768));
|
|
3757
3759
|
return btoa(t);
|
|
3758
3760
|
};
|
|
3759
|
-
function
|
|
3760
|
-
let t =
|
|
3761
|
+
function li(e) {
|
|
3762
|
+
let t = nt(), n = (e.connect ?? ee)({
|
|
3761
3763
|
url: e.url,
|
|
3762
3764
|
artifact: e.artifact,
|
|
3763
3765
|
WebSocket: e.WebSocket,
|
|
@@ -3782,8 +3784,8 @@ function ci(e) {
|
|
|
3782
3784
|
async update(e) {
|
|
3783
3785
|
await n.request({
|
|
3784
3786
|
op: "update",
|
|
3785
|
-
bytes:
|
|
3786
|
-
features:
|
|
3787
|
+
bytes: ci(e),
|
|
3788
|
+
features: si
|
|
3787
3789
|
});
|
|
3788
3790
|
},
|
|
3789
3791
|
async comment(e) {
|
|
@@ -3805,7 +3807,7 @@ function ci(e) {
|
|
|
3805
3807
|
};
|
|
3806
3808
|
}
|
|
3807
3809
|
// src/viewer/document/useCloudRefBoard.ts
|
|
3808
|
-
function
|
|
3810
|
+
function ui(e) {
|
|
3809
3811
|
return e.status === "private" ? { unavailable: "locked" } : e.status === "unpublished" ? { unavailable: "unpublished" } : e.status === "ok" ? "title" in e && e.type !== void 0 ? { artifact: { title: e.title } } : {
|
|
3810
3812
|
canvas: e.canvas,
|
|
3811
3813
|
layout: e.layout ?? null,
|
|
@@ -3814,25 +3816,25 @@ function li(e) {
|
|
|
3814
3816
|
stateless: !0
|
|
3815
3817
|
} : null;
|
|
3816
3818
|
}
|
|
3817
|
-
var
|
|
3819
|
+
var di = [
|
|
3818
3820
|
5e3,
|
|
3819
3821
|
1e4,
|
|
3820
3822
|
2e4,
|
|
3821
3823
|
4e4,
|
|
3822
3824
|
6e4
|
|
3823
|
-
],
|
|
3824
|
-
function
|
|
3825
|
+
], fi = (e) => !!e && !("unavailable" in e);
|
|
3826
|
+
function pi(e) {
|
|
3825
3827
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = 0, c = () => {
|
|
3826
3828
|
s += 1;
|
|
3827
3829
|
for (let e of o) e();
|
|
3828
3830
|
}, l = (a) => {
|
|
3829
|
-
n.has(a) || (n.add(a), e(a).then((e) => e ?
|
|
3830
|
-
if (e !== void 0 && (t.set(a, e), c()),
|
|
3831
|
+
n.has(a) || (n.add(a), e(a).then((e) => e ? ui(e) : void 0).catch(() => void 0).then((e) => {
|
|
3832
|
+
if (e !== void 0 && (t.set(a, e), c()), fi(e)) {
|
|
3831
3833
|
r.delete(a);
|
|
3832
3834
|
return;
|
|
3833
3835
|
}
|
|
3834
3836
|
let n = r.get(a) ?? 0;
|
|
3835
|
-
r.set(a, n + 1), i.set(a, setTimeout(() => u(a),
|
|
3837
|
+
r.set(a, n + 1), i.set(a, setTimeout(() => u(a), di[Math.min(n, di.length - 1)]));
|
|
3836
3838
|
}));
|
|
3837
3839
|
}, u = (e) => {
|
|
3838
3840
|
clearTimeout(i.get(e)), i.delete(e), n.delete(e), l(e);
|
|
@@ -3853,7 +3855,7 @@ function fi(e) {
|
|
|
3853
3855
|
version: () => s
|
|
3854
3856
|
};
|
|
3855
3857
|
}
|
|
3856
|
-
function
|
|
3858
|
+
function mi(e) {
|
|
3857
3859
|
let t = !1, n = () => {
|
|
3858
3860
|
t || (t = !0, s((t) => {
|
|
3859
3861
|
t.kind === "board" && e.receive(t.artboard, t.board);
|
|
@@ -3862,7 +3864,7 @@ function pi(e) {
|
|
|
3862
3864
|
}));
|
|
3863
3865
|
};
|
|
3864
3866
|
return function(t) {
|
|
3865
|
-
return H(n, []),
|
|
3867
|
+
return H(n, []), Ct(e.subscribe, e.version), e.get(t);
|
|
3866
3868
|
};
|
|
3867
3869
|
}
|
|
3868
|
-
export {
|
|
3870
|
+
export { oi as DocumentView, at as SnapshotDocument, mi as cloudRefBoardHook, ui as cloudRefLookup, pi as createCloudRefBoards, li as createRelayTransport };
|