@moberg_hr/work-tree 2.23.1 → 2.23.2
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/{account-O62WFR7C.js → account-6ZQ3VFA2.js} +15 -13
- package/dist/{account-O62WFR7C.js.map → account-6ZQ3VFA2.js.map} +1 -1
- package/dist/{add-repo-FTAMMPVM.js → add-repo-WXDEKZRX.js} +6 -6
- package/dist/{answer-LKNMN2ZM.js → answer-L55DWMR5.js} +4 -4
- package/dist/{attach-A3KA4YTK.js → attach-KLVI7BHS.js} +9 -9
- package/dist/bin.js +2 -2
- package/dist/{block-3ZUFH2RO.js → block-BRNRP226.js} +6 -6
- package/dist/{broadcast-I23BZI3R.js → broadcast-GQE7H3MF.js} +2 -2
- package/dist/{catchup-G4EOJIZP.js → catchup-ZMG4OWF2.js} +7 -7
- package/dist/{child-MVNEFA2I.js → child-MPXXJ2QX.js} +4 -4
- package/dist/{chunk-N7T6NPE2.js → chunk-6S3DYLGH.js} +4 -4
- package/dist/{chunk-ZLPK2LQ3.js → chunk-7BH2PUYY.js} +3 -3
- package/dist/{chunk-NXS53NHR.js → chunk-7HQSILMM.js} +4 -4
- package/dist/{chunk-4HQEYZIM.js → chunk-A53OR6P5.js} +3 -3
- package/dist/{chunk-5QENUGSC.js → chunk-BBI4YQTS.js} +5 -5
- package/dist/{chunk-GHY7GZWN.js → chunk-BGQ6NUU7.js} +3 -3
- package/dist/{chunk-BI7HIO2I.js → chunk-BZOYUBK4.js} +2 -2
- package/dist/{chunk-6PZ7RCXK.js → chunk-C5BBVVHW.js} +2 -2
- package/dist/{chunk-INXHVNMZ.js → chunk-CRAGAIOS.js} +5 -5
- package/dist/{chunk-HQDQRC4F.js → chunk-DK3UMOX7.js} +2 -2
- package/dist/{chunk-TL7VLRRF.js → chunk-DNC2ZJOF.js} +3 -3
- package/dist/chunk-DYKA3LO3.js +9 -0
- package/dist/{chunk-MQXMYVZV.js → chunk-G4VKMMIC.js} +8 -8
- package/dist/{chunk-ZX4ONO5Y.js → chunk-HBYXSFLN.js} +4 -4
- package/dist/{chunk-HPUD5IGB.js → chunk-HO5KESIB.js} +2 -2
- package/dist/{chunk-4FN45EAF.js → chunk-HUGHF45U.js} +2 -2
- package/dist/{chunk-5SXTMOO6.js → chunk-IUVMVNIO.js} +4 -4
- package/dist/chunk-JVOQSU6R.js +151 -0
- package/dist/chunk-JVOQSU6R.js.map +1 -0
- package/dist/{chunk-OPV6BE3W.js → chunk-K6FD5WDW.js} +4 -4
- package/dist/{chunk-ET5K6S5H.js → chunk-KJAE7WO5.js} +21 -10
- package/dist/chunk-KJAE7WO5.js.map +1 -0
- package/dist/{chunk-IXZOZZGD.js → chunk-KWJ6S4NZ.js} +2 -2
- package/dist/{chunk-U4XSBYQW.js → chunk-LCYYJFSZ.js} +3 -3
- package/dist/{chunk-ZMJR4Z6O.js → chunk-LOFGDH5B.js} +2 -2
- package/dist/{chunk-YKTJL4SW.js → chunk-LW6VCL6S.js} +5 -5
- package/dist/{chunk-44QJVFOF.js → chunk-M2P722BR.js} +2 -2
- package/dist/{chunk-VH5FRKJM.js → chunk-MMEFW2PI.js} +2 -2
- package/dist/{chunk-ETAPX4JN.js → chunk-MYASALCU.js} +3 -3
- package/dist/{chunk-DHZ5DF6Y.js → chunk-MYXEX6BB.js} +2 -1
- package/dist/{chunk-WOY35FXP.js → chunk-NLU6MBYT.js} +8 -6
- package/dist/chunk-NLU6MBYT.js.map +1 -0
- package/dist/{chunk-W5YYTITQ.js → chunk-P53UYZZ4.js} +2 -2
- package/dist/{chunk-U2A2DHWP.js → chunk-PSALWCBD.js} +2 -2
- package/dist/{chunk-IVS2MAHD.js → chunk-QAIG5FSQ.js} +2 -2
- package/dist/{chunk-2MJQTFTI.js → chunk-QMWV4UKB.js} +3 -3
- package/dist/{chunk-MVBBESXK.js → chunk-QSSCVTFG.js} +3 -3
- package/dist/{chunk-ZNRPBP5O.js → chunk-RGKGJOES.js} +135 -4
- package/dist/chunk-RGKGJOES.js.map +1 -0
- package/dist/{chunk-24FQ5XXN.js → chunk-SF3DIIKN.js} +3 -3
- package/dist/{chunk-GTFMUWK6.js → chunk-SUHANL3G.js} +3 -3
- package/dist/{chunk-XTAYJDL2.js → chunk-VNZBFVGY.js} +3 -3
- package/dist/{chunk-IXC6EXVJ.js → chunk-VPZ5ILKT.js} +3 -3
- package/dist/{chunk-FHC6KHIH.js → chunk-VQEMPGJL.js} +2 -2
- package/dist/{chunk-2FNYJEOH.js → chunk-WH6DAD6D.js} +2 -2
- package/dist/{chunk-GN7EAXHU.js → chunk-XB4SCJWD.js} +82 -20
- package/dist/chunk-XB4SCJWD.js.map +1 -0
- package/dist/{chunk-HUWWMTNG.js → chunk-XL4YNA3L.js} +1 -1
- package/dist/chunk-XL4YNA3L.js.map +1 -0
- package/dist/{chunk-HNZ736XN.js → chunk-XT3FON6A.js} +2 -2
- package/dist/{chunk-ROEEXEN7.js → chunk-XWUX474Q.js} +4 -150
- package/dist/chunk-XWUX474Q.js.map +1 -0
- package/dist/{chunk-XWKN2HJD.js → chunk-ZHK5XOV5.js} +56 -56
- package/dist/{chunk-IRDWXDID.js → chunk-ZPDCVDE2.js} +2 -2
- package/dist/{cleanup-ANVUCOBK.js → cleanup-DRELB6UC.js} +22 -22
- package/dist/{cli-CAF6VCVO.js → cli-C3U2BC44.js} +3 -3
- package/dist/{color-7CQNI6Y4.js → color-T75ANAWG.js} +4 -4
- package/dist/{config-EXQY26W4.js → config-KI6JOXKW.js} +3 -3
- package/dist/{coordinate-LRY7LXS6.js → coordinate-4PPZN4U4.js} +5 -5
- package/dist/{diff-JRK3AUD5.js → diff-NDZPRQV7.js} +4 -4
- package/dist/{digest-2AFW3WBL.js → digest-H5YFX5WR.js} +4 -4
- package/dist/{fork-DSNMPWUE.js → fork-HHHATXVI.js} +18 -18
- package/dist/{history-RFIDCGQY.js → history-3Z7AS2AC.js} +2 -2
- package/dist/{hook-XBALB337.js → hook-KOK7NKCO.js} +8 -8
- package/dist/{hydrate-DAEY4PB6.js → hydrate-VI3XSZQH.js} +2 -2
- package/dist/{init-4BK3T34W.js → init-7NOKRHNJ.js} +6 -6
- package/dist/{keep-57TUKADV.js → keep-G62GSDOQ.js} +4 -4
- package/dist/{list-DRQRIT6U.js → list-CEVAZQ4V.js} +2 -2
- package/dist/{move-UEHJ375P.js → move-ISAW6RDM.js} +7 -7
- package/dist/{note-FHPDVBRI.js → note-YIVFXTGM.js} +4 -4
- package/dist/{overlaps-GKAKEUB6.js → overlaps-YBEHBRRK.js} +5 -5
- package/dist/{pin-CFTQDPPC.js → pin-J4IDSHRG.js} +4 -4
- package/dist/{pr-ZP4COZEZ.js → pr-Z7CPBBGT.js} +13 -13
- package/dist/{prune-IQB2T45B.js → prune-UA3UDZSM.js} +19 -19
- package/dist/{pty-host-BPFGJFBC.js → pty-host-JIQUP62K.js} +49 -7
- package/dist/pty-host-JIQUP62K.js.map +1 -0
- package/dist/{read-DHJ6VY44.js → read-DG4PCLFH.js} +4 -4
- package/dist/{recent-OZW2ZNJ4.js → recent-PGD6QYAH.js} +7 -7
- package/dist/{remove-MW25RLNV.js → remove-TPLA64HP.js} +20 -20
- package/dist/{report-II75EKM6.js → report-K3OTT2ED.js} +4 -4
- package/dist/{restart-4BGVRBX6.js → restart-477IX2JX.js} +4 -4
- package/dist/{resume-4J53KDCO.js → resume-OYBAJCYE.js} +7 -7
- package/dist/{review-WKB3K6LI.js → review-6PWFSBAO.js} +3 -3
- package/dist/{run-YS2D7WAQ.js → run-XEHF2N4A.js} +2 -2
- package/dist/{screen-VVRNQXVW.js → screen-SFU6TCDV.js} +4 -4
- package/dist/{search-MKYCKZF4.js → search-VJ3BGWPX.js} +2 -2
- package/dist/{section-Y6RDD3MN.js → section-ZLINSTGS.js} +4 -4
- package/dist/{send-AZM2XKN2.js → send-NBP2WYBG.js} +5 -5
- package/dist/{sessions-OER6VNQJ.js → sessions-UT4I7A43.js} +14 -14
- package/dist/{show-33VV3XCF.js → show-RK2EWOR6.js} +3 -3
- package/dist/{snooze-OFYZVVYS.js → snooze-T2WWIKZN.js} +4 -4
- package/dist/{start-OEQ5VW7Y.js → start-AWHOIA3Q.js} +4 -4
- package/dist/{status-HPYMNO2T.js → status-QE2DA6RR.js} +5 -5
- package/dist/{stop-QNICDWAU.js → stop-YOU3P3ZR.js} +4 -4
- package/dist/{sync-RH3M47QK.js → sync-74EFTPBJ.js} +19 -19
- package/dist/{time-PM72GK5W.js → time-ZGMZZ5OY.js} +5 -5
- package/dist/{time-actions-O3MCB7FU.js → time-actions-VAGRSY5B.js} +2 -2
- package/dist/{timesheet-HJXQ4KHL.js → timesheet-N74LPF5M.js} +11 -10
- package/dist/timesheet-N74LPF5M.js.map +1 -0
- package/dist/{tree-RGT736E3.js → tree-FXTCWC6D.js} +18 -18
- package/dist/{update-CMYVBWV3.js → update-5QSRHIWH.js} +9 -9
- package/dist/{usage-VEKD3JPL.js → usage-CW7CDFU3.js} +4 -4
- package/dist/{wait-RQZU3KDY.js → wait-XXC3I6DK.js} +5 -5
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-qP6blm2-.js → PtyView-BLTE5F3E.js} +2 -2
- package/dist/web/assets/{PtyView-qP6blm2-.js.map → PtyView-BLTE5F3E.js.map} +1 -1
- package/dist/web/assets/{index-DuFRboh6.js → index-BiadbzE6.js} +59 -59
- package/dist/web/assets/index-BiadbzE6.js.map +1 -0
- package/dist/web/assets/{index-yBTfBzDm.css → index-CfTmdABt.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/{web-GOCU26ZD.js → web-SUSR4IAK.js} +87 -54
- package/dist/web-SUSR4IAK.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-ET5K6S5H.js.map +0 -1
- package/dist/chunk-GN7EAXHU.js.map +0 -1
- package/dist/chunk-HUWWMTNG.js.map +0 -1
- package/dist/chunk-NRX5V443.js +0 -9
- package/dist/chunk-ROEEXEN7.js.map +0 -1
- package/dist/chunk-WOY35FXP.js.map +0 -1
- package/dist/chunk-ZNRPBP5O.js.map +0 -1
- package/dist/pty-host-BPFGJFBC.js.map +0 -1
- package/dist/timesheet-HJXQ4KHL.js.map +0 -1
- package/dist/web/assets/index-DuFRboh6.js.map +0 -1
- package/dist/web-GOCU26ZD.js.map +0 -1
- /package/dist/{add-repo-FTAMMPVM.js.map → add-repo-WXDEKZRX.js.map} +0 -0
- /package/dist/{answer-LKNMN2ZM.js.map → answer-L55DWMR5.js.map} +0 -0
- /package/dist/{attach-A3KA4YTK.js.map → attach-KLVI7BHS.js.map} +0 -0
- /package/dist/{block-3ZUFH2RO.js.map → block-BRNRP226.js.map} +0 -0
- /package/dist/{broadcast-I23BZI3R.js.map → broadcast-GQE7H3MF.js.map} +0 -0
- /package/dist/{catchup-G4EOJIZP.js.map → catchup-ZMG4OWF2.js.map} +0 -0
- /package/dist/{child-MVNEFA2I.js.map → child-MPXXJ2QX.js.map} +0 -0
- /package/dist/{chunk-N7T6NPE2.js.map → chunk-6S3DYLGH.js.map} +0 -0
- /package/dist/{chunk-ZLPK2LQ3.js.map → chunk-7BH2PUYY.js.map} +0 -0
- /package/dist/{chunk-NXS53NHR.js.map → chunk-7HQSILMM.js.map} +0 -0
- /package/dist/{chunk-4HQEYZIM.js.map → chunk-A53OR6P5.js.map} +0 -0
- /package/dist/{chunk-5QENUGSC.js.map → chunk-BBI4YQTS.js.map} +0 -0
- /package/dist/{chunk-GHY7GZWN.js.map → chunk-BGQ6NUU7.js.map} +0 -0
- /package/dist/{chunk-BI7HIO2I.js.map → chunk-BZOYUBK4.js.map} +0 -0
- /package/dist/{chunk-6PZ7RCXK.js.map → chunk-C5BBVVHW.js.map} +0 -0
- /package/dist/{chunk-INXHVNMZ.js.map → chunk-CRAGAIOS.js.map} +0 -0
- /package/dist/{chunk-HQDQRC4F.js.map → chunk-DK3UMOX7.js.map} +0 -0
- /package/dist/{chunk-TL7VLRRF.js.map → chunk-DNC2ZJOF.js.map} +0 -0
- /package/dist/{chunk-NRX5V443.js.map → chunk-DYKA3LO3.js.map} +0 -0
- /package/dist/{chunk-MQXMYVZV.js.map → chunk-G4VKMMIC.js.map} +0 -0
- /package/dist/{chunk-ZX4ONO5Y.js.map → chunk-HBYXSFLN.js.map} +0 -0
- /package/dist/{chunk-HPUD5IGB.js.map → chunk-HO5KESIB.js.map} +0 -0
- /package/dist/{chunk-4FN45EAF.js.map → chunk-HUGHF45U.js.map} +0 -0
- /package/dist/{chunk-5SXTMOO6.js.map → chunk-IUVMVNIO.js.map} +0 -0
- /package/dist/{chunk-OPV6BE3W.js.map → chunk-K6FD5WDW.js.map} +0 -0
- /package/dist/{chunk-IXZOZZGD.js.map → chunk-KWJ6S4NZ.js.map} +0 -0
- /package/dist/{chunk-U4XSBYQW.js.map → chunk-LCYYJFSZ.js.map} +0 -0
- /package/dist/{chunk-ZMJR4Z6O.js.map → chunk-LOFGDH5B.js.map} +0 -0
- /package/dist/{chunk-YKTJL4SW.js.map → chunk-LW6VCL6S.js.map} +0 -0
- /package/dist/{chunk-44QJVFOF.js.map → chunk-M2P722BR.js.map} +0 -0
- /package/dist/{chunk-VH5FRKJM.js.map → chunk-MMEFW2PI.js.map} +0 -0
- /package/dist/{chunk-ETAPX4JN.js.map → chunk-MYASALCU.js.map} +0 -0
- /package/dist/{chunk-DHZ5DF6Y.js.map → chunk-MYXEX6BB.js.map} +0 -0
- /package/dist/{chunk-W5YYTITQ.js.map → chunk-P53UYZZ4.js.map} +0 -0
- /package/dist/{chunk-U2A2DHWP.js.map → chunk-PSALWCBD.js.map} +0 -0
- /package/dist/{chunk-IVS2MAHD.js.map → chunk-QAIG5FSQ.js.map} +0 -0
- /package/dist/{chunk-2MJQTFTI.js.map → chunk-QMWV4UKB.js.map} +0 -0
- /package/dist/{chunk-MVBBESXK.js.map → chunk-QSSCVTFG.js.map} +0 -0
- /package/dist/{chunk-24FQ5XXN.js.map → chunk-SF3DIIKN.js.map} +0 -0
- /package/dist/{chunk-GTFMUWK6.js.map → chunk-SUHANL3G.js.map} +0 -0
- /package/dist/{chunk-XTAYJDL2.js.map → chunk-VNZBFVGY.js.map} +0 -0
- /package/dist/{chunk-IXC6EXVJ.js.map → chunk-VPZ5ILKT.js.map} +0 -0
- /package/dist/{chunk-FHC6KHIH.js.map → chunk-VQEMPGJL.js.map} +0 -0
- /package/dist/{chunk-2FNYJEOH.js.map → chunk-WH6DAD6D.js.map} +0 -0
- /package/dist/{chunk-HNZ736XN.js.map → chunk-XT3FON6A.js.map} +0 -0
- /package/dist/{chunk-XWKN2HJD.js.map → chunk-ZHK5XOV5.js.map} +0 -0
- /package/dist/{chunk-IRDWXDID.js.map → chunk-ZPDCVDE2.js.map} +0 -0
- /package/dist/{cleanup-ANVUCOBK.js.map → cleanup-DRELB6UC.js.map} +0 -0
- /package/dist/{cli-CAF6VCVO.js.map → cli-C3U2BC44.js.map} +0 -0
- /package/dist/{color-7CQNI6Y4.js.map → color-T75ANAWG.js.map} +0 -0
- /package/dist/{config-EXQY26W4.js.map → config-KI6JOXKW.js.map} +0 -0
- /package/dist/{coordinate-LRY7LXS6.js.map → coordinate-4PPZN4U4.js.map} +0 -0
- /package/dist/{diff-JRK3AUD5.js.map → diff-NDZPRQV7.js.map} +0 -0
- /package/dist/{digest-2AFW3WBL.js.map → digest-H5YFX5WR.js.map} +0 -0
- /package/dist/{fork-DSNMPWUE.js.map → fork-HHHATXVI.js.map} +0 -0
- /package/dist/{history-RFIDCGQY.js.map → history-3Z7AS2AC.js.map} +0 -0
- /package/dist/{hook-XBALB337.js.map → hook-KOK7NKCO.js.map} +0 -0
- /package/dist/{hydrate-DAEY4PB6.js.map → hydrate-VI3XSZQH.js.map} +0 -0
- /package/dist/{init-4BK3T34W.js.map → init-7NOKRHNJ.js.map} +0 -0
- /package/dist/{keep-57TUKADV.js.map → keep-G62GSDOQ.js.map} +0 -0
- /package/dist/{list-DRQRIT6U.js.map → list-CEVAZQ4V.js.map} +0 -0
- /package/dist/{move-UEHJ375P.js.map → move-ISAW6RDM.js.map} +0 -0
- /package/dist/{note-FHPDVBRI.js.map → note-YIVFXTGM.js.map} +0 -0
- /package/dist/{overlaps-GKAKEUB6.js.map → overlaps-YBEHBRRK.js.map} +0 -0
- /package/dist/{pin-CFTQDPPC.js.map → pin-J4IDSHRG.js.map} +0 -0
- /package/dist/{pr-ZP4COZEZ.js.map → pr-Z7CPBBGT.js.map} +0 -0
- /package/dist/{prune-IQB2T45B.js.map → prune-UA3UDZSM.js.map} +0 -0
- /package/dist/{read-DHJ6VY44.js.map → read-DG4PCLFH.js.map} +0 -0
- /package/dist/{recent-OZW2ZNJ4.js.map → recent-PGD6QYAH.js.map} +0 -0
- /package/dist/{remove-MW25RLNV.js.map → remove-TPLA64HP.js.map} +0 -0
- /package/dist/{report-II75EKM6.js.map → report-K3OTT2ED.js.map} +0 -0
- /package/dist/{restart-4BGVRBX6.js.map → restart-477IX2JX.js.map} +0 -0
- /package/dist/{resume-4J53KDCO.js.map → resume-OYBAJCYE.js.map} +0 -0
- /package/dist/{review-WKB3K6LI.js.map → review-6PWFSBAO.js.map} +0 -0
- /package/dist/{run-YS2D7WAQ.js.map → run-XEHF2N4A.js.map} +0 -0
- /package/dist/{screen-VVRNQXVW.js.map → screen-SFU6TCDV.js.map} +0 -0
- /package/dist/{search-MKYCKZF4.js.map → search-VJ3BGWPX.js.map} +0 -0
- /package/dist/{section-Y6RDD3MN.js.map → section-ZLINSTGS.js.map} +0 -0
- /package/dist/{send-AZM2XKN2.js.map → send-NBP2WYBG.js.map} +0 -0
- /package/dist/{sessions-OER6VNQJ.js.map → sessions-UT4I7A43.js.map} +0 -0
- /package/dist/{show-33VV3XCF.js.map → show-RK2EWOR6.js.map} +0 -0
- /package/dist/{snooze-OFYZVVYS.js.map → snooze-T2WWIKZN.js.map} +0 -0
- /package/dist/{start-OEQ5VW7Y.js.map → start-AWHOIA3Q.js.map} +0 -0
- /package/dist/{status-HPYMNO2T.js.map → status-QE2DA6RR.js.map} +0 -0
- /package/dist/{stop-QNICDWAU.js.map → stop-YOU3P3ZR.js.map} +0 -0
- /package/dist/{sync-RH3M47QK.js.map → sync-74EFTPBJ.js.map} +0 -0
- /package/dist/{time-PM72GK5W.js.map → time-ZGMZZ5OY.js.map} +0 -0
- /package/dist/{time-actions-O3MCB7FU.js.map → time-actions-VAGRSY5B.js.map} +0 -0
- /package/dist/{tree-RGT736E3.js.map → tree-FXTCWC6D.js.map} +0 -0
- /package/dist/{update-CMYVBWV3.js.map → update-5QSRHIWH.js.map} +0 -0
- /package/dist/{usage-VEKD3JPL.js.map → usage-CW7CDFU3.js.map} +0 -0
- /package/dist/{wait-RQZU3KDY.js.map → wait-XXC3I6DK.js.map} +0 -0
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
} from "./chunk-WIXY4EDH.js";
|
|
8
8
|
import {
|
|
9
9
|
sessionWorkTime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QAIG5FSQ.js";
|
|
11
11
|
import {
|
|
12
12
|
sessionFromArgs,
|
|
13
13
|
sessionPositionals
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BGQ6NUU7.js";
|
|
15
15
|
import "./chunk-6AQRYLOB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-LOFGDH5B.js";
|
|
17
17
|
import "./chunk-ZSHWP2VS.js";
|
|
18
18
|
import "./chunk-UPS7NHKI.js";
|
|
19
19
|
import "./chunk-HUXS3VAI.js";
|
|
20
20
|
import {
|
|
21
21
|
loadHistory
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XL4YNA3L.js";
|
|
23
23
|
import {
|
|
24
24
|
dayKey,
|
|
25
25
|
formatWorked,
|
|
@@ -124,4 +124,4 @@ var timeCommand = {
|
|
|
124
124
|
export {
|
|
125
125
|
timeCommand
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=time-
|
|
127
|
+
//# sourceMappingURL=time-ZGMZZ5OY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
describeDayNow,
|
|
4
4
|
describeMonthNow,
|
|
5
5
|
postStoredDay
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KJAE7WO5.js";
|
|
7
7
|
import "./chunk-JVE2JFLV.js";
|
|
8
8
|
import "./chunk-NEJVK5CF.js";
|
|
9
9
|
import "./chunk-QGUBOOEN.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
describeMonthNow,
|
|
18
18
|
postStoredDay
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=time-actions-
|
|
20
|
+
//# sourceMappingURL=time-actions-VAGRSY5B.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createMonthGather,
|
|
4
|
-
defaultTimeDeps
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
4
|
+
defaultTimeDeps,
|
|
5
|
+
readStoredTempoToken
|
|
6
|
+
} from "./chunk-XB4SCJWD.js";
|
|
7
|
+
import "./chunk-QAIG5FSQ.js";
|
|
8
|
+
import "./chunk-7BH2PUYY.js";
|
|
9
|
+
import "./chunk-ZPDCVDE2.js";
|
|
9
10
|
import {
|
|
10
11
|
buildDay,
|
|
11
12
|
dayArg,
|
|
@@ -21,18 +22,18 @@ import {
|
|
|
21
22
|
tempoClient,
|
|
22
23
|
tempoSetup,
|
|
23
24
|
updateDay
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KJAE7WO5.js";
|
|
25
26
|
import "./chunk-JVE2JFLV.js";
|
|
26
27
|
import {
|
|
27
28
|
callWorkWeb
|
|
28
29
|
} from "./chunk-LB2GAU7E.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-PSALWCBD.js";
|
|
30
31
|
import "./chunk-FGPXMAYU.js";
|
|
31
32
|
import "./chunk-GNIYYXQX.js";
|
|
32
33
|
import "./chunk-T5GJVUSL.js";
|
|
33
34
|
import "./chunk-XBWS77S2.js";
|
|
34
35
|
import "./chunk-4CXUVBOD.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-XL4YNA3L.js";
|
|
36
37
|
import "./chunk-NEJVK5CF.js";
|
|
37
38
|
import "./chunk-QGUBOOEN.js";
|
|
38
39
|
import "./chunk-NWKVTUTN.js";
|
|
@@ -188,7 +189,7 @@ var timesheetCommand = {
|
|
|
188
189
|
if (r.ok) out = r.body;
|
|
189
190
|
else if (r.status !== 0) fail(r.error);
|
|
190
191
|
else {
|
|
191
|
-
const s = tempoSetup(loadConfig()?.time?.tempo, process.env);
|
|
192
|
+
const s = tempoSetup(loadConfig()?.time?.tempo, process.env, readStoredTempoToken());
|
|
192
193
|
if (!s.ready) fail(s.why);
|
|
193
194
|
out = await postStoredDay(day, defaultTimeDeps(), { api: tempoClient(s.token), accountId: s.accountId }).catch(
|
|
194
195
|
(err) => fail(err.message)
|
|
@@ -207,4 +208,4 @@ var timesheetCommand = {
|
|
|
207
208
|
export {
|
|
208
209
|
timesheetCommand
|
|
209
210
|
};
|
|
210
|
-
//# sourceMappingURL=timesheet-
|
|
211
|
+
//# sourceMappingURL=timesheet-N74LPF5M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/timesheet.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { readStoredTempoToken } from '../core/time/tempo-connect.js';\nimport type { CommandModule } from 'yargs';\nimport type { TimeDayWire, TimeMonthWire, TimePostWire } from '../core/api-types.js';\nimport { loadConfig } from '../core/platform/config.js';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { buildDay, dayWire, monthWire } from '../core/time/time-days.js';\nimport { createMonthGather } from '../core/time/month-gather.js';\nimport { describeTimeMonth, isMonth, monthRange } from '../core/time/time-month.js';\nimport { defaultTimeDeps } from '../core/time/time-deps.js';\nimport { updateDay } from '../core/time/time-store.js';\nimport { postStoredDay } from '../core/time/time-actions.js';\nimport { tempoClient, tempoSetup } from '../core/time/tempo.js';\nimport { dayArg, localDay, parseEntries, parseRowArgs } from '../core/time/time-view.js';\nimport type { TimeEntry } from '../core/time/allocate.js';\n\n/**\n * `work timesheet` — the Time tab from a terminal (and for the Ctrl+K\n * assistant): `show` a day's rows and why, `month` a month's (read only); `set` its rows,\n * `reset` it to the suggestion, mark it `off`, `gather` its evidence again,\n * `post` it to Tempo. A change goes through a running work web (the tab\n * updates at once), else it's made here. Posting is the user's: never\n * pre-allowed for the assistant.\n */\n\nfunction print(w: TimeDayWire): void {\n console.log(chalk.bold(`${w.day} ${w.status}`) + chalk.gray(` ${w.total} / ${w.settings.dayHours} h`));\n for (const e of w.entries) console.log(` ${e.key.padEnd(12)} ${String(e.hours).padStart(5)} h ${chalk.gray(w.titles[e.key] ?? '')}`);\n if (w.edited) console.log(chalk.gray(` suggested: ${w.suggested.map((e) => `${e.key} ${e.hours} h`).join(', ') || 'nothing'}`));\n if (w.unallocated) console.log(chalk.yellow(` ${w.unallocated} h unallocated (set time.gapTicket)`));\n const ev = w.evidence;\n for (const s of ev.sessions)\n console.log(chalk.gray(` · ${s.label}: ${s.minutes} min of Claude → ${s.key ?? 'no ticket'}${s.guessed ? ' (AI)' : ''}`));\n for (const c of ev.commits) console.log(chalk.gray(` · ${c.repo}: ${c.subject} → ${c.keys.join(', ') || 'no ticket'}`));\n for (const j of ev.jira) console.log(chalk.gray(` · ${j.key} ${j.summary}: ${j.what}`));\n for (const m of ev.meetings ?? []) console.log(chalk.gray(` · ${m.start}–${m.end} ${m.subject} → ${m.key ?? 'gap ticket'}`));\n for (const c of ev.chats ?? []) console.log(chalk.gray(` · Teams ${c.chat}: ${c.messages} messages → ${c.key ?? 'no ticket'}`));\n if (w.posted) console.log(chalk.gray(` posted to Tempo ${w.posted.at}${w.status === 'changed' ? ' (changed since)' : ''}`));\n}\n\nfunction fail(message: string): never {\n console.error(chalk.red(message));\n process.exit(1);\n}\n\n/** The day from an argument, or exit saying how to give one. */\nfunction theDay(arg: unknown): string {\n const d = dayArg(typeof arg === 'string' ? arg : 'today');\n return d ?? fail(`Not a day: ${String(arg)} (today, yesterday or YYYY-MM-DD)`);\n}\n\n/** The month from an argument (this one by default), or exit saying how to give one. */\nfunction theMonth(arg: unknown): string {\n const m = typeof arg === 'string' ? arg : localDay().slice(0, 7);\n return isMonth(m) && monthRange(m, localDay()) ? m : fail(`Not a month that has started: ${String(arg)} (YYYY-MM)`);\n}\n\n/** A change through work web when it runs; else here. */\nasync function change(day: string, body: { entries?: TimeEntry[] | null; dayOff?: boolean }): Promise<TimeDayWire> {\n const r = await callWorkWeb<TimeDayWire>('PUT', `/api/time/${day}`, body);\n if (r.ok) return r.body;\n if (r.status !== 0) fail(r.error);\n updateDay(day, {\n ...(body.entries !== undefined ? { edited: body.entries } : {}),\n ...(body.dayOff !== undefined ? { dayOff: body.dayOff } : {}),\n });\n return dayWire(day, defaultTimeDeps().settings());\n}\n\nexport const timesheetCommand: CommandModule = {\n command: 'timesheet <action>',\n describe: \"The Time tab's days: show, month, set, reset, off, gather, post (to Tempo)\",\n builder: (y) =>\n y\n .command(\n 'show [day]',\n \"A day's rows and why (today by default)\",\n (b) => b.positional('day', { type: 'string' }).option('json', { type: 'boolean' }),\n (argv) => {\n const w = dayWire(theDay(argv.day), defaultTimeDeps().settings());\n if (argv.json) console.log(JSON.stringify(w, null, 2));\n else print(w);\n },\n )\n .command(\n 'month [month]',\n \"A month's days (this month by default): each day's rows and how they got their hours, and what posting it would do\",\n (b) => b.positional('month', { type: 'string' }).option('json', { type: 'boolean' }),\n (argv) => {\n const w: TimeMonthWire = monthWire(theMonth(argv.month), localDay(), defaultTimeDeps().settings());\n console.log(argv.json ? JSON.stringify(w, null, 2) : describeTimeMonth(w));\n },\n )\n .command(\n 'set <day> <rows..>',\n \"Set all of a day's rows: KEY=HOURS …\",\n (b) => b.positional('day', { type: 'string' }).positional('rows', { type: 'string', array: true }),\n async (argv) => {\n const day = theDay(argv.day);\n const rows = parseRowArgs((argv.rows as string[]) ?? []);\n const entries = rows && parseEntries(rows, defaultTimeDeps().settings().stepHours);\n if (!entries)\n fail(\n `Rows: KEY=HOURS with hours in steps of ${defaultTimeDeps().settings().stepHours}, each key once (e.g. APP-1=2.5 APP-434=5)`,\n );\n print(await change(day, { entries }));\n },\n )\n .command(\n 'reset <day>',\n 'Back to the suggestion',\n (b) => b.positional('day', { type: 'string' }),\n async (argv) => print(await change(theDay(argv.day), { entries: null })),\n )\n .command(\n 'off <day>',\n 'A day off (--undo: not)',\n (b) => b.positional('day', { type: 'string' }).option('undo', { type: 'boolean' }),\n async (argv) => print(await change(theDay(argv.day), { dayOff: !argv.undo })),\n )\n .command(\n 'gather <day>',\n \"Gather a day's evidence again (a month, YYYY-MM: its days not gathered yet)\",\n (b) => b.positional('day', { type: 'string' }),\n async (argv) => {\n if (typeof argv.day === 'string' && isMonth(argv.day)) {\n const month = theMonth(argv.day);\n // Through work web (its tab follows along), else here; either way, wait until it's done.\n const r = await callWorkWeb<TimeMonthWire>('POST', `/api/time/month/${month}/gather`, {}, 30_000);\n if (!r.ok && r.status !== 0) fail(r.error);\n if (r.ok) {\n for (let w = r.body; w.gathering;) {\n await new Promise((res) => setTimeout(res, 2000));\n const next = await callWorkWeb<TimeMonthWire>('GET', `/api/time/month/${month}`);\n if (!next.ok) break;\n w = next.body;\n }\n } else {\n const deps = defaultTimeDeps();\n const g = createMonthGather(deps, { changed: () => {} });\n g.start(month);\n await g.done(month);\n const error = g.state(month).error;\n if (error) console.error(chalk.yellow(error));\n }\n const after = monthWire(month, localDay(), defaultTimeDeps().settings());\n console.log(\n `${month}: ${after.days.length} days, ${after.missing} not gathered, ${after.plan.days.length} ready to post (${after.plan.total} h).`,\n );\n return;\n }\n const day = theDay(argv.day);\n const r = await callWorkWeb<TimeDayWire>('POST', `/api/time/${day}/rebuild`, {}, 120_000);\n if (r.ok) return print(r.body);\n if (r.status !== 0) fail(r.error);\n const deps = defaultTimeDeps();\n await buildDay(day, deps);\n print(dayWire(day, deps.settings()));\n },\n )\n .command(\n 'post <day>',\n 'Post the day to Tempo as it shows (worklogs you made by hand are left alone)',\n (b) => b.positional('day', { type: 'string' }),\n async (argv) => {\n const day = theDay(argv.day);\n const r = await callWorkWeb<TimePostWire>('POST', `/api/time/${day}/post`, {}, 120_000);\n let out: Omit<TimePostWire, 'day'>;\n if (r.ok) out = r.body;\n else if (r.status !== 0) fail(r.error);\n else {\n const s = tempoSetup(loadConfig()?.time?.tempo, process.env, readStoredTempoToken());\n if (!s.ready) fail(s.why);\n out = await postStoredDay(day, defaultTimeDeps(), { api: tempoClient(s.token), accountId: s.accountId }).catch((err: Error) =>\n fail(err.message),\n );\n }\n console.log(\n `Tempo: ${out.posted} posted, ${out.removed} removed, ${out.kept} already there` +\n (out.coveredByHand ? `, ${out.coveredByHand} you had logged by hand` : '') +\n (out.otherByHand ? `; ${out.otherByHand} other worklogs of yours left alone` : ''),\n );\n for (const f of out.failed) console.log(chalk.yellow(` not posted: ${f.key} (${f.error})`));\n if (out.failed.length) process.exitCode = 1;\n },\n )\n .demandCommand(1),\n handler: () => {},\n};\n"],"mappings":"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","names":["r","deps"]}
|
|
@@ -4,28 +4,28 @@ import {
|
|
|
4
4
|
openInLeftovers,
|
|
5
5
|
resolvePrToStart,
|
|
6
6
|
workOnPrPrompt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VNZBFVGY.js";
|
|
8
8
|
import {
|
|
9
9
|
retiredUnsafeOption,
|
|
10
10
|
warnRetiredUnsafe
|
|
11
11
|
} from "./chunk-S3CTXKSN.js";
|
|
12
12
|
import {
|
|
13
13
|
clearLaunchedUnsafeWhenIdle
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K6FD5WDW.js";
|
|
15
15
|
import "./chunk-FZHFD2AY.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7HQSILMM.js";
|
|
17
|
+
import "./chunk-M2P722BR.js";
|
|
18
18
|
import {
|
|
19
19
|
attachSession
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HUGHF45U.js";
|
|
21
21
|
import "./chunk-6KMG4WNW.js";
|
|
22
22
|
import {
|
|
23
23
|
SETUP_WARNINGS
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-VPZ5ILKT.js";
|
|
25
|
+
import "./chunk-BBI4YQTS.js";
|
|
26
26
|
import "./chunk-BCYBF7KJ.js";
|
|
27
27
|
import "./chunk-NREZVTBP.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-C5BBVVHW.js";
|
|
29
29
|
import "./chunk-HCYES6U7.js";
|
|
30
30
|
import "./chunk-NS7WH53I.js";
|
|
31
31
|
import {
|
|
@@ -34,22 +34,22 @@ import {
|
|
|
34
34
|
openBaseCheckout,
|
|
35
35
|
parseBaseSpec,
|
|
36
36
|
setupWorktree
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KWJ6S4NZ.js";
|
|
38
38
|
import "./chunk-Y7PWSACJ.js";
|
|
39
39
|
import "./chunk-EORL2V7P.js";
|
|
40
40
|
import "./chunk-SJBEIYLK.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-XT3FON6A.js";
|
|
42
|
+
import "./chunk-MYXEX6BB.js";
|
|
43
43
|
import "./chunk-7E5XPDKX.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-DK3UMOX7.js";
|
|
45
|
+
import "./chunk-LOFGDH5B.js";
|
|
46
46
|
import "./chunk-ZSHWP2VS.js";
|
|
47
47
|
import "./chunk-UPS7NHKI.js";
|
|
48
48
|
import "./chunk-HUXS3VAI.js";
|
|
49
49
|
import "./chunk-LM2T5OR3.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-6S3DYLGH.js";
|
|
51
|
+
import "./chunk-MMEFW2PI.js";
|
|
52
|
+
import "./chunk-PSALWCBD.js";
|
|
53
53
|
import "./chunk-FGPXMAYU.js";
|
|
54
54
|
import "./chunk-MJIYIMPI.js";
|
|
55
55
|
import {
|
|
@@ -63,7 +63,7 @@ import "./chunk-4CXUVBOD.js";
|
|
|
63
63
|
import {
|
|
64
64
|
findSession,
|
|
65
65
|
loadHistory
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-XL4YNA3L.js";
|
|
67
67
|
import "./chunk-NEJVK5CF.js";
|
|
68
68
|
import "./chunk-QGUBOOEN.js";
|
|
69
69
|
import {
|
|
@@ -338,4 +338,4 @@ var treeCommand = {
|
|
|
338
338
|
export {
|
|
339
339
|
treeCommand
|
|
340
340
|
};
|
|
341
|
-
//# sourceMappingURL=tree-
|
|
341
|
+
//# sourceMappingURL=tree-FXTCWC6D.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
updateSession
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-MYASALCU.js";
|
|
5
|
+
import "./chunk-BZOYUBK4.js";
|
|
6
6
|
import {
|
|
7
7
|
sessionFromArgs,
|
|
8
8
|
sessionPositionals
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BGQ6NUU7.js";
|
|
10
10
|
import "./chunk-6AQRYLOB.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-LOFGDH5B.js";
|
|
12
12
|
import "./chunk-ZSHWP2VS.js";
|
|
13
13
|
import "./chunk-UPS7NHKI.js";
|
|
14
14
|
import "./chunk-HUXS3VAI.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-6S3DYLGH.js";
|
|
16
|
+
import "./chunk-MMEFW2PI.js";
|
|
17
|
+
import "./chunk-PSALWCBD.js";
|
|
18
18
|
import "./chunk-FGPXMAYU.js";
|
|
19
19
|
import "./chunk-MJIYIMPI.js";
|
|
20
20
|
import "./chunk-GNIYYXQX.js";
|
|
21
21
|
import "./chunk-T5GJVUSL.js";
|
|
22
22
|
import "./chunk-XBWS77S2.js";
|
|
23
23
|
import "./chunk-4CXUVBOD.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-XL4YNA3L.js";
|
|
25
25
|
import "./chunk-NEJVK5CF.js";
|
|
26
26
|
import "./chunk-QGUBOOEN.js";
|
|
27
27
|
import "./chunk-NWKVTUTN.js";
|
|
@@ -75,4 +75,4 @@ var updateCommand = {
|
|
|
75
75
|
export {
|
|
76
76
|
updateCommand
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=update-
|
|
78
|
+
//# sourceMappingURL=update-5QSRHIWH.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
realUsageDeps,
|
|
5
5
|
refreshUsage,
|
|
6
6
|
restoreAgentUsage
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-A53OR6P5.js";
|
|
8
|
+
import "./chunk-QAIG5FSQ.js";
|
|
9
9
|
import {
|
|
10
10
|
formatTokens,
|
|
11
11
|
resetPhrase
|
|
12
12
|
} from "./chunk-LK7HJGUC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-XL4YNA3L.js";
|
|
14
14
|
import "./chunk-NEJVK5CF.js";
|
|
15
15
|
import "./chunk-QGUBOOEN.js";
|
|
16
16
|
import {
|
|
@@ -91,4 +91,4 @@ export {
|
|
|
91
91
|
usageCommand,
|
|
92
92
|
usageLines
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=usage-
|
|
94
|
+
//# sourceMappingURL=usage-CW7CDFU3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
cliWaitDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQEMPGJL.js";
|
|
5
5
|
import {
|
|
6
6
|
parseDuration,
|
|
7
7
|
waitForTurn
|
|
@@ -10,13 +10,13 @@ import "./chunk-FZHFD2AY.js";
|
|
|
10
10
|
import {
|
|
11
11
|
sessionFromArgs,
|
|
12
12
|
sessionPositionals
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BGQ6NUU7.js";
|
|
14
14
|
import "./chunk-6AQRYLOB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-LOFGDH5B.js";
|
|
16
16
|
import "./chunk-ZSHWP2VS.js";
|
|
17
17
|
import "./chunk-UPS7NHKI.js";
|
|
18
18
|
import "./chunk-HUXS3VAI.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-XL4YNA3L.js";
|
|
20
20
|
import "./chunk-NEJVK5CF.js";
|
|
21
21
|
import {
|
|
22
22
|
sessionIdFor
|
|
@@ -68,4 +68,4 @@ var waitCommand = {
|
|
|
68
68
|
export {
|
|
69
69
|
waitCommand
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=wait-
|
|
71
|
+
//# sourceMappingURL=wait-XXC3I6DK.js.map
|
package/dist/wd-bin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
run
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZHK5XOV5.js";
|
|
5
5
|
import {
|
|
6
6
|
consoleReporter
|
|
7
7
|
} from "./chunk-S5HJT7CM.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-DYKA3LO3.js";
|
|
9
9
|
import "./chunk-IPHADNF5.js";
|
|
10
10
|
import "./chunk-JYWX2N5W.js";
|
|
11
11
|
import "./chunk-ETWP7MDS.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as b,r as ee,s as te,t as ne,u as x,v as re,w as ie,x as S,y as ae}from"./index-DuFRboh6.js";var C=h(r(),1),oe=t(),se=2e3,ce=20,w=class{sentAt=null;samples=[];shownSamples=[];open=null;keySent(e){let t=this.open;return this.open=null,this.sentAt===null&&(this.sentAt=e),t?{arrived:t.arrived,shown:null}:null}output(e){if(this.sentAt===null)return null;let t=e-this.sentAt,n=this.sentAt;return this.sentAt=null,t<0||t>se?null:(T(this.samples,t),this.open={sentAt:n,arrived:t},t)}rendered(e){let t=this.open;if(!t)return null;this.open=null;let n=e-t.sentAt;return n<0||n>se?{arrived:t.arrived,shown:null}:(T(this.shownSamples,n),{arrived:t.arrived,shown:n})}median(){return this.samples.length?E(this.samples).median:null}reading(){return this.samples.length?{arrived:E(this.samples),shown:this.shownSamples.length?E(this.shownSamples):null}:null}};function T(e,t){e.push(t),e.length>ce&&e.shift()}function E(e){let t=[...e].sort((e,t)=>e-t),n=t.length>>1;return{median:t.length%2?t[n]:(t[n-1]+t[n])/2,worst:t[Math.min(t.length-1,Math.ceil(t.length*.9)-1)]}}function le(e,t,n=null){let r=t!==`webgl`;if(e===null&&!r)return null;let i=e=>`${Math.round(e)} ms`,a=e?.shown??e?.arrived??null;return{text:[a&&`⌁ ${i(a.median)}${a.worst>a.median*1.5?` (${i(a.worst)})`:``}`,r&&`DOM`].filter(Boolean).join(` · `),title:[e&&`A keystroke, over the last 20 (median, and in brackets the slowest of most of them): its echo arrived in ${i(e.arrived.median)} (${i(e.arrived.worst)}) — browser → PTY host → ConPTY → Claude and back`+(e.shown?`; it was on screen in ${i(e.shown.median)} (${i(e.shown.worst)}) — the frame drawn after it.`:`.`),e&&n===`direct`&&`Connected straight to the PTY host.`,e&&n===`relay`&&"Connected through work web (the PTY host gave no ticket: restart it with `work pty-host --restart`).",r&&`Drawn without the GPU, which is slower while Claude works.`,t===`retrying`&&`The GPU renderer was lost; it is tried again by itself.`,t===`dom`&&`WebGL is unavailable here, or kept getting lost; reloading the page tries it again.`,e&&`Each keystroke and every freeze of this window is written to work’s debug log (terminal-perf).`].filter(Boolean).join(` `),slow:r||(a?.median??0)>100}}var ue=200,de=100,fe=class{keys=[];stalls=[];key(e){e&&this.keys.length<ue&&this.keys.push({arrived:Math.round(e.arrived),shown:e.shown===null?null:Math.round(e.shown)})}stall(e,t){this.stalls.length>=de||this.stalls.push({at:t,ms:Math.round(e.duration),blocking:e.blockingDuration===void 0?null:Math.round(e.blockingDuration),what:pe(e)})}take(e){if(!this.keys.length&&!this.stalls.length)return null;let t={...e,keys:this.keys,stalls:this.stalls};return this.keys=[],this.stalls=[],t}};function pe(e){return[...e.scripts??[]].sort((e,t)=>(t.duration??0)-(e.duration??0)).slice(0,3).map(e=>{let t=(e.sourceURL??``).split(`/`).pop()?.split(`?`)[0]??``;return[e.invoker,e.sourceFunctionName,t,e.duration===void 0?``:`${Math.round(e.duration)}ms`].filter(Boolean).join(` `).slice(0,160)}).join(`; `)}function me(e){let t=typeof PerformanceObserver>`u`?null:PerformanceObserver,n=t?.supportedEntryTypes??[],r=n.includes(`long-animation-frame`)?`long-animation-frame`:n.includes(`longtask`)?`longtask`:null;if(!t||!r)return()=>{};let i=new t(t=>{for(let n of t.getEntries())e(n)});return i.observe({type:r,buffered:!1}),()=>i.disconnect()}var he=5e3,ge=`flow`,_e=`catchup`;function ve(e,t={}){let n=`${ge}=1${t.screenOnly?`&${_e}=screen`:``}`;return`${e}${e.includes(`?`)?`&`:`?`}${n}`}function ye(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];(r&192)!=128&&(t+=r>=240?2:1)}return t}function be(e){return JSON.stringify({type:`ack`,chars:e})}var xe=class{send;every;pending=0;constructor(e,t=he){this.send=e,this.every=t}drawn(e){if(!(e>0)||(this.pending+=e,this.pending<this.every))return;let t=this.pending;this.pending=0,this.send(t)}},Se=`cols`,Ce=`rows`;function we(e,t){let n=(e,t,n)=>typeof e==`number`&&Number.isInteger(e)&&e>=t&&e<=n;return n(e,2,1e3)&&n(t,2,500)?{cols:e,rows:t}:null}function Te(e,t){return t?`${e}${e.includes(`?`)?`&`:`?`}${Se}=${t.cols}&${Ce}=${t.rows}`:e}function Ee(e){let t=e;return!!t&&typeof t==`object`&&t.backend===`conpty`&&Number.isInteger(t.buildNumber)&&t.buildNumber>0}var De=`resume`,Oe=/^[0-9a-f]{8,64}$/;function ke(e){return typeof e==`string`&&Oe.test(e)}function Ae(e,t){if(!t)return e;let n=`${t.stream}-${t.offset}-${t.cols}x${t.rows}`;return`${e}${e.includes(`?`)?`&`:`?`}${De}=${n}`}var je=class{stream=null;at=0;replay(e){let t=ke(e.stream)&&typeof e.offset==`number`&&Number.isSafeInteger(e.offset)&&e.offset>=0;this.stream=t?e.stream:null,this.at=t?e.offset:0}output(e){this.stream!==null&&e>0&&(this.at+=e)}point(e,t){if(this.stream===null)return null;let n=we(e,t);return n?{stream:this.stream,offset:this.at,cols:n.cols,rows:n.rows}:null}forget(){this.stream=null,this.at=0}};async function Me(e,t,n,r){try{let i=await fetch(`/api/terminals/${encodeURIComponent(e)}/ticket`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:t,...n?{cols:n.cols,rows:n.rows}:{},...r?{attachOnly:!0}:{}})});return i.status===404&&!(i.headers.get(`content-type`)??``).includes(`json`)?null:await i.json()}catch{return null}}function Ne(e,t){let n=t.WebSocketImpl??WebSocket,r=t.askTicket??Me,i=[],a=[],o=[],s=null,c=!1,l=!1,u=null,d=e=>{let t=new MessageEvent(`message`,{data:e});for(let e of i)e(t)},f=(e=new Event(`close`))=>{if(!l){l=!0;for(let t of a)t(e)}},p=(e,r)=>{if(c)return;u=r?`direct`:`relay`;let a=new n(Ae(Te(t.flow?ve(e):e,t.grid),t.resume));a.binaryType=m.binaryType,s=a;let l=!1;a.addEventListener(`open`,()=>{l=!0;for(let e of o)a.send(e);o.length=0}),a.addEventListener(`message`,e=>{if(s===a)for(let t of i)t(e)}),a.addEventListener(`close`,e=>{if(s===a){if(r&&!l&&!c)return p(t.relayUrl,!1);f(e)}})},m={binaryType:`blob`,addEventListener(e,t){e===`message`?i.push(t):a.push(t)},send(e){s&&s.readyState===n.OPEN?s.send(e):o.push(e)},close(){c=!0,s?s.close():f()},get route(){return u}};return r(e,t.force,t.grid,t.resume?!0:void 0).then(e=>{if(!c){if(e&&`url`in e)return p(e.url,!0);if(e&&`elsewhere`in e)return d(JSON.stringify(e.elsewhere)),f();if(e&&`error`in e)return d(JSON.stringify({type:`error`,message:e.error})),f();p(t.relayUrl,!1)}}),m}var Pe=[3,10,30,60];function Fe(e){return e>=0&&e<Pe.length?Pe[e]*1e3:null}function Ie(e){return e?.trim()?e.trim():`the connection closed before it started`}var Le=[2e3,1e4,6e4],Re=6e5,ze=class{losses=[];lost(e){return this.losses=this.losses.filter(t=>e-t<Re),this.losses.push(e),Le[this.losses.length-1]??null}},Be=1e4,Ve={now:()=>Date.now(),set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)};function He(e){let t=0;for(let n of e){let e=n.getContext(`webgl2`)??n.getContext(`webgl`),r=e?.getExtension(`WEBGL_lose_context`);r&&!e?.isContextLost()&&(r.loseContext(),t+=1)}return t}var Ue=class{host;visible;timers;releaseMs;addon=null;retry=null;release=null;hadContext=!1;settled=!1;disposed=!1;recovery=new ze;constructor(e,t,n,r=Ve,i=Be){this.host=e,this.visible=t,this.timers=r,this.releaseMs=i,n?this.stayOnDom():t&&this.load(!1)}shown(){this.visible=!0,this.cancelRelease(),!this.addon&&!this.settled&&this.retry===null&&!this.disposed&&this.load(!1)}hidden(){this.visible=!1,this.addon&&this.release===null&&(this.release=this.timers.set(()=>{this.release=null,this.visible||this.drop()},this.releaseMs))}dispose(){this.disposed=!0,this.cancelRelease(),this.retry!==null&&this.timers.clear(this.retry),this.retry=null,this.drop()}load(e){let t=null;try{t=this.host.create();let n=t;t.onContextLoss(()=>{this.addon===n&&this.lost()}),this.host.load(t),this.addon=t,this.hadContext=!0,this.host.label(`webgl`),e&&this.host.refit()}catch{try{t?.dispose()}catch{}this.hadContext?this.lost():this.stayOnDom()}}lost(){this.drop();let e=this.recovery.lost(this.timers.now());e===null?this.stayOnDom():(this.host.label(`retrying`),this.retry=this.timers.set(()=>{this.retry=null,this.visible&&!this.disposed&&this.load(!0)},e)),this.visible&&this.host.refit()}stayOnDom(){this.settled=!0,this.host.label(`dom`)}drop(){this.cancelRelease();let e=this.addon;if(!e)return;this.addon=null;let t=[...this.host.canvases()];try{e.dispose()}catch{}He(t.filter(e=>!e.isConnected))}cancelRelease(){this.release!==null&&this.timers.clear(this.release),this.release=null}};function We(e){let t=e.now??(()=>Date.now()),n=e.set??((e,t)=>setTimeout(e,t)),r=e.cancel??(e=>clearTimeout(e)),i=null,a=null,o=!1,s=()=>{o||a!==null||(a=n(()=>{a=null,o||e.clear()},250))};return{pageHidden(){i??=t()},pageVisible(){let e=i;i=null,e!==null&&t()-e>=2e3&&s()},redrawn:s,dispose(){o=!0,a!==null&&r(a),a=null}}}var Ge=/swiftshader|llvmpipe|softpipe|software|basic render driver/i;function Ke(e){return e!==null&&Ge.test(e)?`software`:null}function qe(e){let t=null;try{t=e.createElement(`canvas`).getContext(`webgl2`)}catch{}if(!t)return null;try{let e=t.getExtension(`WEBGL_debug_renderer_info`),n=t.getParameter(e?e.UNMASKED_RENDERER_WEBGL:t.RENDERER);return typeof n==`string`&&n?n:null}catch{return null}finally{try{t.getExtension(`WEBGL_lose_context`)?.loseContext()}catch{}}}var Je;function Ye(e=document){return Je===void 0&&(Je=Ke(qe(e))),Je}var Xe=e=>e.replace(/^(["'])(.*)\1$/,`$2`);function Ze(e){return e.split(`,`).map(e=>Xe(e.trim()).trim().toLowerCase()).filter(e=>e.length>0)}function Qe(e,t){let n=new Set(Ze(t));for(let t of e)if(Ze(t.family).some(e=>n.has(e)))return!0;return!1}var $e={set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)};function et(e,t,n,r=$e,i=100){if(!e)return()=>{};let a=!1,o=null,s=()=>{a||o!==null||(o=r.set(()=>{o=null,a||n()},i))},c=[...e].filter(e=>e.status===`unloaded`||e.status===`loading`),l=()=>c.filter(e=>e.status===`loaded`);e.ready.then(()=>{Qe(l(),t())&&s()},()=>{});let u=e=>{let n=e.fontfaces;Qe(n??[],t())&&s()};return e.addEventListener(`loadingdone`,u),()=>{a=!0,o!==null&&r.clear(o),o=null,e.removeEventListener(`loadingdone`,u)}}var tt=/^(\s*)([●⏺⎿])(\s)/u,nt=/^(?:[-*+•]\s|\d+[.)]\s|#{1,6}\s|>\s|[│┃|┌└├╭╰─━])/u,rt=/^(?:[-*+•]|\d+[.)])\s+/u,it=e=>e.length-e.trimStart().length,at=``,ot=``,st=``,ct=``,lt=/[\uE000-\uE003]/gu,ut=e=>e.replace(lt,``);function dt(e,t){let n=``,r=0;for(;r<e.length&&t>0;r++)if(/[\uE000-\uE003]/u.test(e[r]))n+=e[r];else if(/\s/u.test(e[r]))t--;else break;return n+e.slice(r)}var ft=e=>dt(e,it(ut(e)));function pt(e,t,n){let r=e.split(/\r?\n/).map(e=>{let t=e.replace(/\s+$/u,``);return tt.test(ut(t))?t.replace(/[●⏺⎿]/u,` `):t}),i=e=>e===0?n:0,a=[],o=null;for(let e=0;e<r.length;e++){let n=r[e],s=ut(n),c=ft(n),l=s.trimStart(),u=i(e)+it(s),d=i(e)+s.length;if(o&&l&&o.end+1+(l.split(/\s/u)[0]?.length??0)>t-2&&!nt.test(l)&&u===o.cont){o.text+=` `+c,o.end=d;continue}if(o&&a.push(o.text),!l){o=null,a.push(``);continue}let f=rt.exec(l);o={text:(e===0?``:` `.repeat(it(s)))+c,cont:u+(f?f[0].length:0),end:d},/[│┃]/u.test(l)&&(a.push(o.text),o=null)}o&&a.push(o.text);let s=a.slice(1).filter(e=>ut(e).trim()),c=s.length?Math.min(...s.map(e=>it(ut(e)))):0;return a.map((e,t)=>t===0?ft(e):dt(e,Math.min(c,it(ut(e))))).join(`
|
|
1
|
+
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,k as h,l as g,m as _,n as v,o as y,p as b,r as ee,s as te,t as ne,u as x,v as re,w as ie,x as S,y as ae}from"./index-BiadbzE6.js";var C=h(r(),1),oe=t(),se=2e3,ce=20,w=class{sentAt=null;samples=[];shownSamples=[];open=null;keySent(e){let t=this.open;return this.open=null,this.sentAt===null&&(this.sentAt=e),t?{arrived:t.arrived,shown:null}:null}output(e){if(this.sentAt===null)return null;let t=e-this.sentAt,n=this.sentAt;return this.sentAt=null,t<0||t>se?null:(T(this.samples,t),this.open={sentAt:n,arrived:t},t)}rendered(e){let t=this.open;if(!t)return null;this.open=null;let n=e-t.sentAt;return n<0||n>se?{arrived:t.arrived,shown:null}:(T(this.shownSamples,n),{arrived:t.arrived,shown:n})}median(){return this.samples.length?E(this.samples).median:null}reading(){return this.samples.length?{arrived:E(this.samples),shown:this.shownSamples.length?E(this.shownSamples):null}:null}};function T(e,t){e.push(t),e.length>ce&&e.shift()}function E(e){let t=[...e].sort((e,t)=>e-t),n=t.length>>1;return{median:t.length%2?t[n]:(t[n-1]+t[n])/2,worst:t[Math.min(t.length-1,Math.ceil(t.length*.9)-1)]}}function le(e,t,n=null){let r=t!==`webgl`;if(e===null&&!r)return null;let i=e=>`${Math.round(e)} ms`,a=e?.shown??e?.arrived??null;return{text:[a&&`⌁ ${i(a.median)}${a.worst>a.median*1.5?` (${i(a.worst)})`:``}`,r&&`DOM`].filter(Boolean).join(` · `),title:[e&&`A keystroke, over the last 20 (median, and in brackets the slowest of most of them): its echo arrived in ${i(e.arrived.median)} (${i(e.arrived.worst)}) — browser → PTY host → ConPTY → Claude and back`+(e.shown?`; it was on screen in ${i(e.shown.median)} (${i(e.shown.worst)}) — the frame drawn after it.`:`.`),e&&n===`direct`&&`Connected straight to the PTY host.`,e&&n===`relay`&&"Connected through work web (the PTY host gave no ticket: restart it with `work pty-host --restart`).",r&&`Drawn without the GPU, which is slower while Claude works.`,t===`retrying`&&`The GPU renderer was lost; it is tried again by itself.`,t===`dom`&&`WebGL is unavailable here, or kept getting lost; reloading the page tries it again.`,e&&`Each keystroke and every freeze of this window is written to work’s debug log (terminal-perf).`].filter(Boolean).join(` `),slow:r||(a?.median??0)>100}}var ue=200,de=100,fe=class{keys=[];stalls=[];key(e){e&&this.keys.length<ue&&this.keys.push({arrived:Math.round(e.arrived),shown:e.shown===null?null:Math.round(e.shown)})}stall(e,t){this.stalls.length>=de||this.stalls.push({at:t,ms:Math.round(e.duration),blocking:e.blockingDuration===void 0?null:Math.round(e.blockingDuration),what:pe(e)})}take(e){if(!this.keys.length&&!this.stalls.length)return null;let t={...e,keys:this.keys,stalls:this.stalls};return this.keys=[],this.stalls=[],t}};function pe(e){return[...e.scripts??[]].sort((e,t)=>(t.duration??0)-(e.duration??0)).slice(0,3).map(e=>{let t=(e.sourceURL??``).split(`/`).pop()?.split(`?`)[0]??``;return[e.invoker,e.sourceFunctionName,t,e.duration===void 0?``:`${Math.round(e.duration)}ms`].filter(Boolean).join(` `).slice(0,160)}).join(`; `)}function me(e){let t=typeof PerformanceObserver>`u`?null:PerformanceObserver,n=t?.supportedEntryTypes??[],r=n.includes(`long-animation-frame`)?`long-animation-frame`:n.includes(`longtask`)?`longtask`:null;if(!t||!r)return()=>{};let i=new t(t=>{for(let n of t.getEntries())e(n)});return i.observe({type:r,buffered:!1}),()=>i.disconnect()}var he=5e3,ge=`flow`,_e=`catchup`;function ve(e,t={}){let n=`${ge}=1${t.screenOnly?`&${_e}=screen`:``}`;return`${e}${e.includes(`?`)?`&`:`?`}${n}`}function ye(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];(r&192)!=128&&(t+=r>=240?2:1)}return t}function be(e){return JSON.stringify({type:`ack`,chars:e})}var xe=class{send;every;pending=0;constructor(e,t=he){this.send=e,this.every=t}drawn(e){if(!(e>0)||(this.pending+=e,this.pending<this.every))return;let t=this.pending;this.pending=0,this.send(t)}},Se=`cols`,Ce=`rows`;function we(e,t){let n=(e,t,n)=>typeof e==`number`&&Number.isInteger(e)&&e>=t&&e<=n;return n(e,2,1e3)&&n(t,2,500)?{cols:e,rows:t}:null}function Te(e,t){return t?`${e}${e.includes(`?`)?`&`:`?`}${Se}=${t.cols}&${Ce}=${t.rows}`:e}function Ee(e){let t=e;return!!t&&typeof t==`object`&&t.backend===`conpty`&&Number.isInteger(t.buildNumber)&&t.buildNumber>0}var De=`resume`,Oe=/^[0-9a-f]{8,64}$/;function ke(e){return typeof e==`string`&&Oe.test(e)}function Ae(e,t){if(!t)return e;let n=`${t.stream}-${t.offset}-${t.cols}x${t.rows}`;return`${e}${e.includes(`?`)?`&`:`?`}${De}=${n}`}var je=class{stream=null;at=0;replay(e){let t=ke(e.stream)&&typeof e.offset==`number`&&Number.isSafeInteger(e.offset)&&e.offset>=0;this.stream=t?e.stream:null,this.at=t?e.offset:0}output(e){this.stream!==null&&e>0&&(this.at+=e)}point(e,t){if(this.stream===null)return null;let n=we(e,t);return n?{stream:this.stream,offset:this.at,cols:n.cols,rows:n.rows}:null}forget(){this.stream=null,this.at=0}};async function Me(e,t,n,r){try{let i=await fetch(`/api/terminals/${encodeURIComponent(e)}/ticket`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({force:t,...n?{cols:n.cols,rows:n.rows}:{},...r?{attachOnly:!0}:{}})});return i.status===404&&!(i.headers.get(`content-type`)??``).includes(`json`)?null:await i.json()}catch{return null}}function Ne(e,t){let n=t.WebSocketImpl??WebSocket,r=t.askTicket??Me,i=[],a=[],o=[],s=null,c=!1,l=!1,u=null,d=e=>{let t=new MessageEvent(`message`,{data:e});for(let e of i)e(t)},f=(e=new Event(`close`))=>{if(!l){l=!0;for(let t of a)t(e)}},p=(e,r)=>{if(c)return;u=r?`direct`:`relay`;let a=new n(Ae(Te(t.flow?ve(e):e,t.grid),t.resume));a.binaryType=m.binaryType,s=a;let l=!1;a.addEventListener(`open`,()=>{l=!0;for(let e of o)a.send(e);o.length=0}),a.addEventListener(`message`,e=>{if(s===a)for(let t of i)t(e)}),a.addEventListener(`close`,e=>{if(s===a){if(r&&!l&&!c)return p(t.relayUrl,!1);f(e)}})},m={binaryType:`blob`,addEventListener(e,t){e===`message`?i.push(t):a.push(t)},send(e){s&&s.readyState===n.OPEN?s.send(e):o.push(e)},close(){c=!0,s?s.close():f()},get route(){return u}};return r(e,t.force,t.grid,t.resume?!0:void 0).then(e=>{if(!c){if(e&&`url`in e)return p(e.url,!0);if(e&&`elsewhere`in e)return d(JSON.stringify(e.elsewhere)),f();if(e&&`error`in e)return d(JSON.stringify({type:`error`,message:e.error})),f();p(t.relayUrl,!1)}}),m}var Pe=[3,10,30,60];function Fe(e){return e>=0&&e<Pe.length?Pe[e]*1e3:null}function Ie(e){return e?.trim()?e.trim():`the connection closed before it started`}var Le=[2e3,1e4,6e4],Re=6e5,ze=class{losses=[];lost(e){return this.losses=this.losses.filter(t=>e-t<Re),this.losses.push(e),Le[this.losses.length-1]??null}},Be=1e4,Ve={now:()=>Date.now(),set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)};function He(e){let t=0;for(let n of e){let e=n.getContext(`webgl2`)??n.getContext(`webgl`),r=e?.getExtension(`WEBGL_lose_context`);r&&!e?.isContextLost()&&(r.loseContext(),t+=1)}return t}var Ue=class{host;visible;timers;releaseMs;addon=null;retry=null;release=null;hadContext=!1;settled=!1;disposed=!1;recovery=new ze;constructor(e,t,n,r=Ve,i=Be){this.host=e,this.visible=t,this.timers=r,this.releaseMs=i,n?this.stayOnDom():t&&this.load(!1)}shown(){this.visible=!0,this.cancelRelease(),!this.addon&&!this.settled&&this.retry===null&&!this.disposed&&this.load(!1)}hidden(){this.visible=!1,this.addon&&this.release===null&&(this.release=this.timers.set(()=>{this.release=null,this.visible||this.drop()},this.releaseMs))}dispose(){this.disposed=!0,this.cancelRelease(),this.retry!==null&&this.timers.clear(this.retry),this.retry=null,this.drop()}load(e){let t=null;try{t=this.host.create();let n=t;t.onContextLoss(()=>{this.addon===n&&this.lost()}),this.host.load(t),this.addon=t,this.hadContext=!0,this.host.label(`webgl`),e&&this.host.refit()}catch{try{t?.dispose()}catch{}this.hadContext?this.lost():this.stayOnDom()}}lost(){this.drop();let e=this.recovery.lost(this.timers.now());e===null?this.stayOnDom():(this.host.label(`retrying`),this.retry=this.timers.set(()=>{this.retry=null,this.visible&&!this.disposed&&this.load(!0)},e)),this.visible&&this.host.refit()}stayOnDom(){this.settled=!0,this.host.label(`dom`)}drop(){this.cancelRelease();let e=this.addon;if(!e)return;this.addon=null;let t=[...this.host.canvases()];try{e.dispose()}catch{}He(t.filter(e=>!e.isConnected))}cancelRelease(){this.release!==null&&this.timers.clear(this.release),this.release=null}};function We(e){let t=e.now??(()=>Date.now()),n=e.set??((e,t)=>setTimeout(e,t)),r=e.cancel??(e=>clearTimeout(e)),i=null,a=null,o=!1,s=()=>{o||a!==null||(a=n(()=>{a=null,o||e.clear()},250))};return{pageHidden(){i??=t()},pageVisible(){let e=i;i=null,e!==null&&t()-e>=2e3&&s()},redrawn:s,dispose(){o=!0,a!==null&&r(a),a=null}}}var Ge=/swiftshader|llvmpipe|softpipe|software|basic render driver/i;function Ke(e){return e!==null&&Ge.test(e)?`software`:null}function qe(e){let t=null;try{t=e.createElement(`canvas`).getContext(`webgl2`)}catch{}if(!t)return null;try{let e=t.getExtension(`WEBGL_debug_renderer_info`),n=t.getParameter(e?e.UNMASKED_RENDERER_WEBGL:t.RENDERER);return typeof n==`string`&&n?n:null}catch{return null}finally{try{t.getExtension(`WEBGL_lose_context`)?.loseContext()}catch{}}}var Je;function Ye(e=document){return Je===void 0&&(Je=Ke(qe(e))),Je}var Xe=e=>e.replace(/^(["'])(.*)\1$/,`$2`);function Ze(e){return e.split(`,`).map(e=>Xe(e.trim()).trim().toLowerCase()).filter(e=>e.length>0)}function Qe(e,t){let n=new Set(Ze(t));for(let t of e)if(Ze(t.family).some(e=>n.has(e)))return!0;return!1}var $e={set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)};function et(e,t,n,r=$e,i=100){if(!e)return()=>{};let a=!1,o=null,s=()=>{a||o!==null||(o=r.set(()=>{o=null,a||n()},i))},c=[...e].filter(e=>e.status===`unloaded`||e.status===`loading`),l=()=>c.filter(e=>e.status===`loaded`);e.ready.then(()=>{Qe(l(),t())&&s()},()=>{});let u=e=>{let n=e.fontfaces;Qe(n??[],t())&&s()};return e.addEventListener(`loadingdone`,u),()=>{a=!0,o!==null&&r.clear(o),o=null,e.removeEventListener(`loadingdone`,u)}}var tt=/^(\s*)([●⏺⎿])(\s)/u,nt=/^(?:[-*+•]\s|\d+[.)]\s|#{1,6}\s|>\s|[│┃|┌└├╭╰─━])/u,rt=/^(?:[-*+•]|\d+[.)])\s+/u,it=e=>e.length-e.trimStart().length,at=``,ot=``,st=``,ct=``,lt=/[\uE000-\uE003]/gu,ut=e=>e.replace(lt,``);function dt(e,t){let n=``,r=0;for(;r<e.length&&t>0;r++)if(/[\uE000-\uE003]/u.test(e[r]))n+=e[r];else if(/\s/u.test(e[r]))t--;else break;return n+e.slice(r)}var ft=e=>dt(e,it(ut(e)));function pt(e,t,n){let r=e.split(/\r?\n/).map(e=>{let t=e.replace(/\s+$/u,``);return tt.test(ut(t))?t.replace(/[●⏺⎿]/u,` `):t}),i=e=>e===0?n:0,a=[],o=null;for(let e=0;e<r.length;e++){let n=r[e],s=ut(n),c=ft(n),l=s.trimStart(),u=i(e)+it(s),d=i(e)+s.length;if(o&&l&&o.end+1+(l.split(/\s/u)[0]?.length??0)>t-2&&!nt.test(l)&&u===o.cont){o.text+=` `+c,o.end=d;continue}if(o&&a.push(o.text),!l){o=null,a.push(``);continue}let f=rt.exec(l);o={text:(e===0?``:` `.repeat(it(s)))+c,cont:u+(f?f[0].length:0),end:d},/[│┃]/u.test(l)&&(a.push(o.text),o=null)}o&&a.push(o.text);let s=a.slice(1).filter(e=>ut(e).trim()),c=s.length?Math.min(...s.map(e=>it(ut(e)))):0;return a.map((e,t)=>t===0?ft(e):dt(e,Math.min(c,it(ut(e))))).join(`
|
|
2
2
|
`)}function mt(e,t){let n=``;for(let r=t.start.y;r<=t.end.y;r++){let i=e.getLine(r);if(!i)break;let a=r<t.end.y&&!!e.getLine(r+1)?.isWrapped,o=[],s=r===t.end.y?Math.min(t.end.x,i.length):i.length;for(let e=r===t.start.y?t.start.x:0;e<s;e++){let t=i.getCell(e);t&&t.getWidth()!==0&&o.push({ch:t.getChars()||` `,b:!!t.isBold(),i:!!t.isItalic()})}let c=o.length;if(!a)for(;c>0&&o[c-1].ch.trim()===``;)c--;let l=!1,u=!1;for(let e of o.slice(0,c)){let t=e.ch.trim()?e.b:l,r=e.ch.trim()?e.i:u;(t!==l||r!==u)&&(u&&(n+=ct),l&&(n+=ot),t&&(n+=at),r&&(n+=st),l=t,u=r),n+=e.ch}u&&(n+=ct),l&&(n+=ot),r<t.end.y&&!a&&(n+=`
|
|
3
3
|
`)}return n}function ht(e){let t=e.getSelection(),n=e.getSelectionPosition();if(!n)return t;let r=mt(e.buffer.active,n),i=e=>e.replace(/\r\n/gu,`
|
|
4
4
|
`).replace(/[ \t]+$/gmu,``);return i(ut(r))===i(t)?r:t}function gt(e){let t=v(e).replaceAll(at,`<b>`).replaceAll(ot,`</b>`).replaceAll(st,`<i>`).replaceAll(ct,`</i>`).replace(/<\/b>(\s*)<b>/gu,`$1`).replace(/<\/i>(\s*)<i>/gu,`$1`);for(let e=``;e!==t;)e=t,t=t.replace(/(\s+)(<\/[bi]>)/gu,`$2$1`);return t}var _t=/^\s*[│┃|].*[│┃|]\s*$/u,vt=/^\s*(?:[┌├└╭╰┏┣┗┡╞][─━┬┼┴┳╋┻┐┤┘╮╯┓┫┛┩╡═╪╤╧\s]*|\|?(?:\s*:?-{3,}:?\s*\|)+\s*:?-*:?\s*\|?)$/u,yt=e=>e.trim().replace(/^[│┃|]|[│┃|]$/gu,``).split(/[│┃|]/u).map(e=>e.trim());function bt(e){let t=[[]],n=0;for(let r of e)vt.test(r)?(n++,t[t.length-1].length&&t.push([])):_t.test(r)&&t[t.length-1].push(yt(r));let r=t.filter(e=>e.length);if(!r.length||!r.some(e=>e.some(e=>e.length>1)))return null;let i=r.length>2||r.length===2&&r[1].length===1,a=e=>e[0].map((t,n)=>e.map(e=>e[n]??``).filter(Boolean).join(` `)),o=i?r.map(a):[a(r[0]),...r.slice(1).flat()];return n||o.length>1?o:null}function xt(e){let[t,...n]=e,r=(e,t)=>`<tr>${e.map(e=>`<${t}>${v(e)}</${t}>`).join(``)}</tr>`;return`<table><thead>${r(t,`th`)}</thead><tbody>${n.map(e=>r(e,`td`)).join(``)}</tbody></table>`}function St(e,t,n=0){let r=pt(e,t,n).split(`
|
|
@@ -91,4 +91,4 @@ void main() {
|
|
|
91
91
|
`))}},em=class extends Error{constructor(e,t){super(e),this.name=`ListenerLeakError`,this.stack=t}},tm=class extends Error{constructor(e,t){super(e),this.name=`ListenerRefusalError`,this.stack=t}},nm=0,rm=class{constructor(e){this.value=e,this.id=nm++}},im=2,am=class{constructor(e){this._size=0,this._options=e,this._leakageMon=Xp>0||this._options?.leakWarningThreshold?new Qp(e?.onListenerError??Tp,this._options?.leakWarningThreshold??Xp):void 0,this._perfMon=this._options?._profName?new Yp(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new tm(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||Tp)(n),Up.None}if(this._disposed)return Up.None;t&&(e=e.bind(t));let r=new rm(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=$p.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof rm?(this._deliveryQueue??=new om,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Bp(()=>{i?.(),this._removeListener(r)});return n instanceof Hp?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*im<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||Tp;if(!n){e.value(t);return}try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners){if(this._listeners instanceof rm)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}}this._perfMon?.stop()}hasListeners(){return this._size>0}},om=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},sm=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new am,this.onChange=this._onChange.event;let e=new Cp;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return!!(e&1)}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a<i;++a){let o=t.charCodeAt(a);if(55296<=o&&o<=56319){if(++a>=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},cm=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],lm=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],um=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],dm=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],fm;function pm(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var mm=class{constructor(){if(this.version=`11`,!fm){fm=new Uint8Array(65536),fm.fill(1),fm[0]=0,fm.fill(0,1,32),fm.fill(0,127,160);for(let e=0;e<cm.length;++e)fm.fill(0,cm[e][0],cm[e][1]+1);for(let e=0;e<um.length;++e)fm.fill(2,um[e][0],um[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?fm[e]:pm(e,lm)?0:pm(e,dm)?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=sm.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return sm.createPropertyValue(0,n,r)}},hm=class{activate(e){e.unicode.register(new mm)}dispose(){}},gm=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=vm.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function _m(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var vm=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!_m(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),n.isWrapped&&o.indexOf(` `)===-1););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},ym=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function bm(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var xm=class{constructor(e=bm,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||ym;this._linkProvider=this._terminal.registerLinkProvider(new gm(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}},Sm=5e3,Cm=String.raw`\x1b\[[IO]|\x1b\[<(?:35|39|43|47|51|55|59|63);\d+;\d+M`,wm=String.raw`\x1b\[[?>=][\d;]*c|\x1b\[(?!1;[2-8]R)\d+;\d+R|\x1b\[\?\d+;\d+(?:;\d+)?R|\x1b\[\??\d*n|\x1b\[\?\d*u|\x1b\[\??[\d;]*\$y|\x1b\[\d+(?:;\d+)*t|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b[P_][\s\S]*?\x1b\\`,Tm=RegExp(`(${Cm})|(?:${wm})`,`y`);function Em(e){if(!e)return null;let t=[];for(Tm.lastIndex=0;Tm.lastIndex<e.length;){let n=Tm.lastIndex,r=Tm.exec(e);if(!r||r.index!==n||!r[0])return null;t.push({text:r[0],answer:r[1]===void 0})}return t}var Dm={now:()=>performance.now(),set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},Om=class{fit;timers;minMs;last=-1/0;pending=null;constructor(e,t=Dm,n=50){this.fit=e,this.timers=t,this.minMs=n}request(){if(this.pending!==null)return;let e=Math.max(0,this.last+this.minMs-this.timers.now());this.pending=this.timers.set(()=>{this.pending=null,this.last=this.timers.now(),this.fit()},e)}dispose(){this.pending!==null&&this.timers.clear(this.pending),this.pending=null}},km=1e3,Am=`wd-typing`,jm={set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},Mm=class{root;timers;timer=null;constructor(e,t=jm){this.root=e,this.timers=t}key(){this.timer===null?this.root.classList.add(Am):this.timers.clear(this.timer),this.timer=this.timers.set(()=>this.end(),km)}end(){this.timer!==null&&(this.timers.clear(this.timer),this.timer=null,this.root.classList.remove(Am))}},Nm=2026,Pm=3,Fm={now:()=>performance.now(),set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},Im=class{term;timers;inFrame=!1;view=null;hooks;quiet=null;constructor(e,t=Fm){this.term=e,this.timers=t;let n=e=>e.some(e=>(Array.isArray(e)?e[0]:e)===Nm);this.hooks=[e.parser.registerCsiHandler({final:`J`},e=>{let t=e[0];return(t===2||t===3)&&this.erase(t===3),!1}),e.parser.registerCsiHandler({prefix:`?`,final:`h`},e=>(n(e)&&(this.inFrame=!0),!1)),e.parser.registerCsiHandler({prefix:`?`,final:`l`},e=>(n(e)&&this.inFrame&&(this.inFrame=!1,this.settle()),!1)),e.parser.registerEscHandler({final:`c`},()=>(this.inFrame=!1,this.view=null,this.quiet!==null&&this.timers.clear(this.quiet),this.quiet=null,!1))]}written(){let e=this.view;if(!this.inFrame&&e){if(this.timers.now()-e.since>=500)return this.settle();this.place(e),this.quiet!==null&&this.timers.clear(this.quiet),this.quiet=this.timers.set(()=>{this.quiet=null,this.inFrame||this.settle()},50)}}dispose(){for(let e of this.hooks)e.dispose();this.quiet!==null&&this.timers.clear(this.quiet),this.quiet=null}erase(e){let t=this.term.buffer.active;if(t.type!==`alternate`){if(!this.view){let e=t.viewportY>=t.baseY;this.view={atBottom:e,fromBottom:t.baseY-t.viewportY,anchor:e?null:this.linesAt(t.viewportY),repaint:!1,since:this.timers.now()}}e&&(this.view.repaint=!0)}}settle(){let e=this.view;this.view=null,this.quiet!==null&&this.timers.clear(this.quiet),this.quiet=null,e&&this.place(e)}place(e){if(!e.repaint)return;if(e.atBottom){this.term.scrollToBottom();return}let t=this.term.buffer.active.baseY,n=Math.max(0,Math.min(t,t-e.fromBottom));this.term.scrollToLine((e.anchor&&this.find(e.anchor,n,t))??n)}linesAt(e){let t=[];for(let n=0;n<Pm;n++)t.push(this.term.buffer.active.getLine(e+n)?.translateToString(!0)??``);return t.some(e=>e.trim())?t:null}find(e,t,n){let r=t=>{for(let n=0;n<e.length;n++)if((this.term.buffer.active.getLine(t+n)?.translateToString(!0)??``)!==e[n])return!1;return!0};for(let e=0;e<=n;e++){if(t-e>=0&&r(t-e))return t-e;if(e&&t+e<=n&&r(t+e))return t+e}return null}},$=e();function Lm(e){/^https?:\/\//i.test(e)&&window.open(e,`_blank`,`noopener`)}function Rm(e,t,n,r){c(e,t,n).catch(e=>r({kind:`error`,text:g(t,e.message)}))}function zm(e,t,n,r){let{raw:i,result:o}=n,s=x(t,o);if(s===`search`)window.dispatchEvent(new CustomEvent(y,{detail:{sessionId:e,query:te(i)}}));else if(s===`copy`){let e=o.path??te(i);Promise.resolve().then(()=>navigator.clipboard.writeText(e)).then(()=>r({text:`Copied ${e}`}),()=>r({kind:`error`,text:`Couldn’t copy the path.`}))}else if(s===`show`){let n=o.path??i;a(e,n).catch(n=>{t===`click`?Rm(e,i,`default`,r):r({kind:`error`,text:n.message})})}else Rm(e,i,s===`editor`||s===`reveal`?s:`default`,r)}function Bm(e,t,n){let r=t=>_(e.buffer.active.getLine(t));return{provideLinks(i,a){try{let o=p(r,i-1,e.cols);if(o.length===0){a(void 0);return}t.lookup(o.map(e=>e.raw)).then(e=>{let t=d(o,e).map(e=>({range:f(e.range),text:e.raw,activate:t=>{t.button===0&&n.activate(e)},hover:()=>n.hover(e),leave:()=>n.leave()}));a(t.length>0?t:void 0)},()=>a(void 0))}catch{a(void 0)}}}}var Vm=6e3,Hm=1e4,Um=65536,Wm=[0,1e3,2e3,4e3],Gm=500;function Km(e,t){for(let n=0;n<e.length;n+=Um)t(e.slice(n,n+Um),n+Um>=e.length)}var qm=e=>{if(e===null)return null;let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?`${t} s ago`:t<3600?`${Math.round(t/60)} min ago`:`${Math.round(t/3600)} h ago`};function Jm({sessionId:e,target:t,branch:r,active:a=!0}){let c=(0,C.useRef)(null),d=(0,C.useRef)(a);d.current=a;let f=o(),p=(0,C.useRef)(f);p.current=f;let h=(0,C.useRef)(null),g=(0,C.useRef)(null),_=(0,C.useRef)(null);(0,C.useEffect)(()=>{a?h.current?.():g.current?.()},[a]);let[v,y]=(0,C.useState)(`connecting`),[ee,te]=(0,C.useState)(0),[x,se]=(0,C.useState)(null),ce=(0,C.useRef)(0),[T,E]=(0,C.useState)(null),ue=(0,C.useRef)(!1),[de,pe]=(0,C.useState)(null),[he,ge]=(0,C.useState)(null),[_e,ve]=(0,C.useState)(`webgl`),Se=(0,C.useRef)(he);Se.current=he;let Ce=(0,C.useRef)(_e);Ce.current=_e;let[Te,De]=(0,C.useState)(!1),Oe=(0,C.useRef)(null),[ke,Ae]=(0,C.useState)(null),{toast:Me,show:Pe,hide:Le}=ae(),Re=(0,C.useRef)(Pe);Re.current=Pe,(0,C.useEffect)(()=>{E(null),ue.current=!1},[e]);let ze=(0,C.useRef)(!1);(0,C.useEffect)(()=>s(e,()=>{ze.current=!0,te(e=>e+1)}),[e]),(0,C.useEffect)(()=>{if(!c.current)return;let t=p.current,n=new il({cursorBlink:!0,fontSize:t.fontSize,fontFamily:t.fontFamily,lineHeight:t.lineHeight,theme:{...t.theme},convertEol:!1,scrollback:Sm,allowProposedApi:!0,customGlyphs:!0,rescaleOverlappingGlyphs:!0,linkHandler:{activate:(t,n)=>{/^file:\/\//i.test(n)?t.button===0&&Rm(e,n,`default`,Re.current):Lm(n)},hover:(e,t)=>{c.current&&(c.current.title=t)},leave:()=>{c.current&&(c.current.title=``)}}}),r=new sl;n.loadAddon(r);let i=new hm;n.loadAddon(i),n.unicode.activeVersion=`11`,n.loadAddon(new xm((e,t)=>Lm(t))),n.open(c.current);let a=new Im(n),o=c.current,s=l(t=>S(e,t).then(e=>e.results)),u=n.registerLinkProvider(Bm(n,s,{activate:t=>zm(e,`click`,t,Re.current),hover:e=>{Oe.current=e,o.title=e.result.path??e.raw},leave:()=>{Oe.current=null,o.title=``}})),f=e=>{let t=Oe.current;t&&(e.preventDefault(),Ae({x:e.clientX,y:e.clientY,link:t}))};o.addEventListener(`contextmenu`,f);let v=!1,b=new Om(()=>O()),ee=new Ue({create:()=>new yp,load:e=>n.loadAddon(e),canvases:()=>n.element?.querySelectorAll(`canvas`)??[],label:ve,refit:()=>b.request()},d.current,Ye()),x=We({clear:()=>{n.clearTextureAtlas(),n.refresh(0,n.rows-1)}}),re=()=>document.visibilityState===`hidden`?x.pageHidden():x.pageVisible();document.addEventListener(`visibilitychange`,re);let ae=null,C=0,oe=et(document.fonts,()=>n.options.fontFamily??``,()=>{let e=n.options.fontFamily;n.options.fontFamily=`monospace`,n.options.fontFamily=e,n.clearTextureAtlas(),b.request()}),T=()=>{let e=c.current;if(!e||e.clientWidth<=0||e.clientHeight<=0)return null;let t=r.proposeDimensions();return t?we(t.cols,t.rows):null},le=d.current?T():null;le&&n.resize(le.cols,le.rows);let de=ze.current;ze.current=!1,d.current&&n.focus();let he=()=>St(ht(n),n.cols,n.getSelectionPosition()?.start.x??0);n.attachCustomKeyEventHandler(e=>e.type===`keydown`?e.key===`Enter`&&e.shiftKey&&!e.ctrlKey&&!e.altKey?(e.preventDefault(),Ct(`\x1B\r`),!1):e.key===`c`&&e.ctrlKey&&!e.shiftKey&&n.hasSelection()?(m(he()).catch(()=>{}),n.clearSelection(),!1):!(e.ctrlKey&&!e.altKey&&e.key.toLowerCase()===`v`||e.shiftKey&&e.key===`Insert`):!0);let _e=e=>{e.clipboardData?.getData(`text/plain`)||(e.preventDefault(),e.stopImmediatePropagation(),Ct(``))};n.textarea?.addEventListener(`paste`,_e,!0);let Te=e=>{if(!n.hasSelection()||!e.clipboardData)return;e.preventDefault(),e.stopImmediatePropagation();let{text:t,html:r}=he();e.clipboardData.setData(`text/plain`,t),r&&e.clipboardData.setData(`text/html`,ne(r))};n.element?.addEventListener(`copy`,Te,!0);let ke=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/ws/sessions/${encodeURIComponent(e)}/terminal${ue.current?`?force=1`:``}`,Me=new je,Pe,Le=null,Be=null,Ve,He=null,Ge=0,Ke,qe,Je=!1,Xe=[],Ze=e=>{if(!(v||Le!==e)){clearTimeout(bt),clearTimeout(qe),He=null,Ge=0,y(`ready`),ge(Pe.route),se(null),ce.current=0,E(null),De(!1),d.current&&(!document.activeElement||document.activeElement===document.body)&&n.focus(),Je=!0,wt=n.cols,Tt=n.rows,O(!0),de&&d.current&&Pe.send(JSON.stringify({type:`redraw`})),de=!1;for(let e of Xe)Pe.send(JSON.stringify({type:`input`,data:e}));Xe.length=0}},Qe=!1,$e=(e,t)=>Km(e,e=>{let r=ye(e);n.write(e,()=>{t.drawn(r),a.written()})}),tt=(e,t)=>Km(e,(e,r)=>n.write(e,r?t:void 0)),nt=0,rt=(e,t)=>{if(!e)return t();n.write(``,()=>nt++),Km(e,(e,r)=>n.write(e,()=>{a.written(),r&&(nt--,t())}))},it=e=>{e.cols&&e.rows&&n.resize(e.cols,e.rows),tt(`\x1Bc`+(e.data??``),()=>b.request())},at=new w,ot=0,st,ct=()=>{let e=performance.now();e-ot>500?(ot=e,pe(at.reading())):st||=setTimeout(()=>{st=void 0,ot=performance.now(),pe(at.reading())},500-(e-ot))},lt=new fe,ut=n.onRender(()=>{let e=at.rendered(performance.now());e&&(lt.key(e),ct())}),dt=me(e=>{d.current&<.stall(e,Math.round(performance.timeOrigin+e.startTime))}),ft=()=>{let t=lt.take({sessionId:e,route:Se.current,renderer:Ce.current});t&&ie(t)},pt=setInterval(ft,Hm),mt=(e,t,r)=>{if(e.data instanceof ArrayBuffer){let n=new Uint8Array(e.data);Me.output(ye(n)),$e(n,t),at.output(performance.now())!==null&&ct();return}if(typeof e.data!=`string`)return;let i;try{i=JSON.parse(e.data)}catch{return}if(i.type===`replay`){C++>0&&x.redrawn(),Ee(i.windowsPty)&&(n.options.windowsPty=i.windowsPty),Me.replay(i);let e=()=>Ze(r);if(i.resumed===!0)return rt(i.data??``,Je?()=>{}:e);if(Je)return it(i);if(He)return i.cols&&i.rows&&n.resize(i.cols,i.rows),tt(`\x1Bc`+(i.data??``),e);i.cols&&i.rows&&n.resize(i.cols,i.rows),i.data?tt(i.data,e):e()}else i.type===`exit`?(Qe=!0,n.write(`\r\n\x1b[33m[session exited${i.code?` with code ${i.code}`:``} — press Enter to start it again]\x1b[0m\r\n`)):i.type===`error`?(Be=i.message??null,He||n.write(`\r\n\x1b[31m[${i.message??`error`}]\x1b[0m\r\n`)):i.type===`elsewhere`&&(Qe=!0,De(!1),E({lastActivity:typeof i.lastActivity==`number`?i.lastActivity:null,state:typeof i.state==`string`?i.state:null,confirmed:i.confirmed===!0}))},gt=(e=``)=>n.write(`\r\n\x1b[33m[connection closed${e} — press Enter to reconnect]\x1b[0m\r\n`),_t=()=>{let e=Me.point(n.cols,n.rows);if(!e||Ge>=Wm.length){clearTimeout(qe),y(`ready`),He=null;let e=Xe.length>0;Xe.length=0,gt((Be?`: ${Be}`:``)+(e?`; what you typed meanwhile was not sent`:``)),Qe=!0;return}He=e,Ke=setTimeout(()=>yt(e),Wm[Ge++])},vt=()=>{if(v||Qe){Qe=!0;return}if(He)return _t();if(!Je){clearTimeout(bt);let e=Fe(ce.current);se({reason:Ie(Be),retryAt:e===null?null:Date.now()+e}),e!==null&&(Ve=setTimeout(()=>{ce.current+=1,te(e=>e+1)},e)),Qe=!0;return}if(Je=!1,!Me.point(n.cols,n.rows)){gt(),Qe=!0;return}qe=setTimeout(()=>y(`connecting`),500),_t()},yt=t=>{let n=t?d.current?{cols:t.cols,rows:t.rows}:null:le,r=Ne(e,{force:!t&&ue.current,relayUrl:ke,flow:!0,grid:n,resume:t});r.binaryType=`arraybuffer`,Pe=r,Le=r,Be=null;let i=new xe(e=>{!Qe&&Pe===r&&r.send(be(e))});r.addEventListener(`message`,e=>{Pe===r&&mt(e,i,r)}),r.addEventListener(`close`,()=>{Le===r&&(Le=null),Pe===r&&vt()})};yt(null),y(`connecting`),se(null);let bt=setTimeout(()=>y(e=>e===`connecting`?`starting`:e),700),xt=n.onData(e=>{if(Qe){e===`\r`&&te(e=>e+1);return}if(nt>0){let t=Em(e);if(t&&(e=t.filter(e=>!e.answer).map(e=>e.text).join(``)),!e)return}Ct(e)});function Ct(e){Qe||(Je?(Pe.send(JSON.stringify({type:`input`,data:e})),lt.key(at.keySent(performance.now()))):Xe.push(e))}let wt=n.cols,Tt=n.rows,D=e=>{let t=n.buffer.active,r=t.viewportY>=t.baseY,i=r?void 0:n.registerMarker(t.viewportY-(t.baseY+t.cursorY));n.resize(e.cols,e.rows),r?n.scrollToBottom():i&&!i.isDisposed&&i.line>=0&&n.scrollToLine(i.line),i?.dispose()},O=(e=!1)=>{if(!d.current||!Je)return;let t=T();t&&(e||t.cols!==wt||t.rows!==Tt)&&((t.cols!==n.cols||t.rows!==n.rows)&&D(t),wt=t.cols,Tt=t.rows,Pe.send(JSON.stringify({type:`resize`,cols:t.cols,rows:t.rows})))},Et=()=>b.request(),Dt=typeof ResizeObserver<`u`?new ResizeObserver(()=>b.request()):null;Dt?Dt.observe(c.current):window.addEventListener(`resize`,Et),h.current=()=>{ee.shown(),ae!==null&&Date.now()-ae>=1e4&&x.redrawn(),ae=null,O(!0),n.focus()},g.current=()=>{ae??=Date.now(),ee.hidden()},_.current=e=>{e!==t&&(t=e,n.options.theme={...e.theme},n.options.fontFamily=e.fontFamily,n.options.fontSize=e.fontSize,n.options.lineHeight=e.lineHeight,O())};let Ot=()=>O(!0);n.textarea?.addEventListener(`focus`,Ot);let kt=new Mm(document.documentElement),At=()=>kt.key(),jt=()=>kt.end();return n.textarea?.addEventListener(`keydown`,At,!0),n.textarea?.addEventListener(`blur`,jt),()=>{v=!0,clearTimeout(bt),clearTimeout(Ve),clearTimeout(Ke),clearTimeout(qe),n.textarea?.removeEventListener(`paste`,_e,!0),n.element?.removeEventListener(`copy`,Te,!0),n.textarea?.removeEventListener(`focus`,Ot),n.textarea?.removeEventListener(`keydown`,At,!0),n.textarea?.removeEventListener(`blur`,jt),kt.end(),o.removeEventListener(`contextmenu`,f),o.title=``,u.dispose(),s.clear(),Oe.current=null,Ae(null),h.current=null,g.current=null,oe(),b.dispose(),_.current=null,Dt?.disconnect(),window.removeEventListener(`resize`,Et),xt.dispose(),ut.dispose(),clearInterval(pt),dt(),ft(),clearTimeout(st);try{Pe.close()}catch{}a.dispose(),ee.dispose(),x.dispose(),document.removeEventListener(`visibilitychange`,re),n.dispose()}},[e,ee]),(0,C.useEffect)(()=>{_.current?.(f)},[f]);let Be=()=>{De(!0),te(e=>e+1)};(0,C.useEffect)(()=>{if(!T||!a)return;let e=setInterval(()=>{document.visibilityState===`visible`&&Be()},Vm);return()=>clearInterval(e)},[T,a]);let Ve=async()=>{await n(`Start this session's Claude here?
|
|
92
92
|
|
|
93
93
|
If it is still open in another terminal, both would write to the same conversation.`,{ok:`Start it here`})&&(ue.current=!0,E(null),te(e=>e+1))},He=t?`work tree ${t}${r?` ${r}`:``}`:`work tree <target> <branch>`,Ge=le(de,_e,he);return(0,$.jsxs)($.Fragment,{children:[T&&(0,$.jsxs)(`div`,{className:`wd-pty-elsewhere`,role:`status`,children:[(0,$.jsxs)(`p`,{className:`wd-pty-elsewhere-title`,children:[T.confirmed?`This session’s Claude is open in another terminal`:`This session’s Claude seems to be running in another terminal`,T.lastActivity!==null&&(0,$.jsxs)($.Fragment,{children:[` (last wrote `,qm(T.lastActivity),`)`]}),T.state===`needs_input`&&(0,$.jsx)($.Fragment,{children:`, waiting for your answer there`}),`.`]}),(0,$.jsxs)(`p`,{children:[`Close it there (type `,(0,$.jsx)(`code`,{children:`/exit`}),`) and this tab attaches by itself — it checks every few seconds. To have both show the same screen instead, restart it with `,(0,$.jsx)(`code`,{children:He}),` (Ctrl+] detaches, Claude keeps running).`]}),(0,$.jsxs)(`p`,{className:`wd-pty-elsewhere-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:Be,disabled:Te,children:Te?`Checking…`:`Check again`}),!T.confirmed&&(0,$.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>void Ve(),children:`It's not running — start it here…`})]})]}),(0,$.jsxs)(`div`,{className:`wd-pty-frame`,style:T?{display:`none`}:void 0,children:[(0,$.jsx)(`div`,{ref:c,className:`wd-pty-host`}),Ge&&(0,$.jsx)(`span`,{className:`wd-pty-latency`+(Ge.slow?` wd-pty-latency-slow`:``),title:Ge.title,children:Ge.text}),v!==`ready`&&!T&&!x&&(0,$.jsx)(`div`,{className:`wd-pty-connecting`,role:`status`,children:v===`starting`?`Starting Claude — resuming the conversation…`:`Connecting…`}),v!==`ready`&&!T&&x&&(0,$.jsxs)(`div`,{className:`wd-pty-connecting wd-pty-failed`,role:`alert`,children:[(0,$.jsxs)(`p`,{children:[`Couldn't start Claude: `,x.reason,`.`]}),(0,$.jsxs)(`p`,{children:[x.retryAt===null?`Stopped trying on its own.`:(0,$.jsx)(Ym,{at:x.retryAt}),` `,(0,$.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>{ce.current=0,se(null),te(e=>e+1)},children:x.retryAt===null?`Try again`:`Try now`})]})]})]}),ke&&(0,oe.createPortal)((0,$.jsx)(i,{x:ke.x,y:ke.y,items:u(ke.link.result,b(navigator.userAgent)).map((t,n)=>({label:t.label,separated:t.id===`copy`&&n>0,run:()=>zm(e,t.id,ke.link,Pe)})),footer:ke.link.result.path??void 0,onClose:()=>Ae(null)}),document.body),Me&&(0,oe.createPortal)((0,$.jsx)(re,{toast:Me,onClose:Le}),document.body)]})}function Ym({at:e}){let[t,n]=(0,C.useState)(()=>Date.now());return(0,C.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),(0,$.jsxs)($.Fragment,{children:[`Trying again in `,Math.max(1,Math.ceil((e-t)/1e3)),` s…`]})}export{Vm as ELSEWHERE_RECHECK_MS,Jm as PtyView,Gm as RECONNECT_COVER_MS,Wm as RECONNECT_DELAYS_MS,Um as WRITE_PIECE,Lm as openLink};
|
|
94
|
-
//# sourceMappingURL=PtyView-
|
|
94
|
+
//# sourceMappingURL=PtyView-BLTE5F3E.js.map
|