@moberg_hr/work-tree 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{answer-OF2QNF4A.js → answer-7C4BZSYE.js} +8 -8
- package/dist/{attach-PAFAZ2EH.js → attach-PITHAQC4.js} +11 -11
- package/dist/bin.js +2 -2
- package/dist/{block-3LEG4LKJ.js → block-45UQKMA3.js} +8 -8
- package/dist/{broadcast-ZDIL7UBP.js → broadcast-CUJDQYEW.js} +5 -5
- package/dist/{catchup-ZZ5HZJIT.js → catchup-ZXYFL4XZ.js} +10 -10
- package/dist/{chunk-XLP24AH5.js → chunk-2IM7Q7WT.js} +47 -47
- package/dist/{chunk-M4YXBQZN.js → chunk-3GTLGDP3.js} +6 -6
- package/dist/{chunk-3GAYLP7W.js → chunk-3N64LEF5.js} +4 -4
- package/dist/{chunk-46VAWZZX.js → chunk-4O7B3ODB.js} +2 -2
- package/dist/{chunk-77SVSNME.js → chunk-56G6RE5J.js} +5 -5
- package/dist/{chunk-ZR2KWY6V.js → chunk-5P7XE7HW.js} +2 -2
- package/dist/{chunk-OE34YZFO.js → chunk-6BITLING.js} +3 -3
- package/dist/{chunk-453EGT2R.js → chunk-6VHECWTC.js} +14 -9
- package/dist/chunk-6VHECWTC.js.map +1 -0
- package/dist/{chunk-LPJEV4R2.js → chunk-7UPS3IZ2.js} +2 -2
- package/dist/{chunk-X6VBITXV.js → chunk-BSSYIB4W.js} +6 -6
- package/dist/{chunk-KTFDSJUD.js → chunk-BTFVGXUG.js} +59 -17
- package/dist/chunk-BTFVGXUG.js.map +1 -0
- package/dist/{chunk-RK6NHIL6.js → chunk-CQR657PU.js} +2 -2
- package/dist/{chunk-TROTIHD5.js → chunk-DEW3VLLK.js} +4 -4
- package/dist/{chunk-UDOXLAE7.js → chunk-DOD6DEWO.js} +4 -4
- package/dist/{chunk-INVFNKU7.js → chunk-EAUE4VEJ.js} +5 -5
- package/dist/{chunk-E3Y4ZACK.js → chunk-EAUSWDOQ.js} +2 -2
- package/dist/{chunk-RT4QZRTC.js → chunk-EHJ63GMQ.js} +7 -3
- package/dist/chunk-EHJ63GMQ.js.map +1 -0
- package/dist/{chunk-EXJYPF64.js → chunk-FAFWD2BZ.js} +3 -3
- package/dist/{chunk-2GX3IOSV.js → chunk-G3LZU2LT.js} +11 -7
- package/dist/chunk-G3LZU2LT.js.map +1 -0
- package/dist/{chunk-IKYZ5CJZ.js → chunk-G3RZAZAI.js} +2 -2
- package/dist/{chunk-62C3CJ5M.js → chunk-GACMWI3H.js} +2 -2
- package/dist/{chunk-XIL4QZFW.js → chunk-IS44ZO7V.js} +3 -3
- package/dist/{chunk-KWU35O5S.js → chunk-JR4UAMZM.js} +4 -4
- package/dist/{chunk-NBI2INQS.js → chunk-LESRAPQH.js} +4 -4
- package/dist/{chunk-LGDECE7V.js → chunk-LZ7LYVHR.js} +3 -3
- package/dist/{chunk-U5V5J237.js → chunk-M5E6EM5B.js} +7 -7
- package/dist/chunk-MCCF7PIY.js +9 -0
- package/dist/{chunk-ISZM5C22.js → chunk-N4J65ADX.js} +11 -11
- package/dist/{chunk-26IZBYVL.js → chunk-NSH62BFD.js} +2 -2
- package/dist/{chunk-KSVZVHTI.js → chunk-OLT6A5L4.js} +6 -6
- package/dist/{chunk-4CVUV2SE.js → chunk-OOZ77YJI.js} +2 -2
- package/dist/{chunk-U4YUMSJY.js → chunk-PVNQJFIU.js} +4 -4
- package/dist/{chunk-OIQY4OKO.js → chunk-SEU6GTXI.js} +2 -2
- package/dist/{chunk-LBQR7KTC.js → chunk-SPS3SSXO.js} +3 -3
- package/dist/{chunk-UOSZFFNY.js → chunk-UWSJHSZM.js} +2 -2
- package/dist/{chunk-JQXUIKU5.js → chunk-VEXEV32Q.js} +2 -2
- package/dist/{chunk-EDAOG56H.js → chunk-VFJYLTWC.js} +3 -3
- package/dist/{chunk-ZVJEWMJN.js → chunk-W2W7MOHA.js} +2 -2
- package/dist/{chunk-MRXD2NSO.js → chunk-WQ6NM7RO.js} +2 -2
- package/dist/{chunk-R4M5DDSN.js → chunk-WQJRZXWB.js} +6 -6
- package/dist/{chunk-DLSAAP3S.js → chunk-X63PWGRB.js} +3 -3
- package/dist/{chunk-U27Q3DVF.js → chunk-XVTUJ5JP.js} +2 -2
- package/dist/{chunk-3B3UMUE6.js → chunk-YLRFDJVU.js} +2 -2
- package/dist/{chunk-C7OK4XEZ.js → chunk-YLYBMVBD.js} +6 -3
- package/dist/chunk-YLYBMVBD.js.map +1 -0
- package/dist/{chunk-TN2TXRHS.js → chunk-ZZ57KXHU.js} +2 -2
- package/dist/{cleanup-W5RGZ3Q6.js → cleanup-O33DLVYY.js} +19 -19
- package/dist/{cli-3BI62MNT.js → cli-XA33SNZC.js} +3 -3
- package/dist/{config-MR7UZCST.js → config-IVFI5HKI.js} +5 -5
- package/dist/{diff-URDY6YMT.js → diff-RJFPY5UC.js} +8 -8
- package/dist/{digest-D4FEZNLU.js → digest-KU7AV7LU.js} +7 -7
- package/dist/{fork-7EUVNEB7.js → fork-GGNDPT5D.js} +17 -17
- package/dist/{hook-6AD3FRKZ.js → hook-SXCVFIKJ.js} +9 -9
- package/dist/{hydrate-ZJZPM6YW.js → hydrate-LLHAMA6B.js} +4 -4
- package/dist/{init-LWL4WVSJ.js → init-JDJFQEPW.js} +5 -5
- package/dist/{install-skills-TQVWZDUD.js → install-skills-OXXTF7QP.js} +3 -3
- package/dist/install-skills-bin.js +2 -2
- package/dist/{move-URV7XIDT.js → move-OYZGR76R.js} +8 -8
- package/dist/{note-S6EGTEIL.js → note-UT4F7TU4.js} +8 -8
- package/dist/{overlaps-4T7NLTJH.js → overlaps-H7ZTPYGI.js} +6 -6
- package/dist/{pin-KKQZ3AR6.js → pin-B7JAUL62.js} +8 -8
- package/dist/{pr-5ZILTVDM.js → pr-U2O4WICL.js} +8 -8
- package/dist/{prune-OK23KLHG.js → prune-DSV7XBIY.js} +18 -18
- package/dist/{pty-host-I5OJGWYA.js → pty-host-XZPHJWCJ.js} +6 -6
- package/dist/{read-NHK26F22.js → read-SOC7UER2.js} +7 -7
- package/dist/{recent-DNSOJQVQ.js → recent-7XAWE6FF.js} +5 -5
- package/dist/{remove-TZQVN2EG.js → remove-KC276OMW.js} +17 -17
- package/dist/{restart-WHJDPDQA.js → restart-LDPKYFLI.js} +8 -8
- package/dist/{resume-BXIYEZM3.js → resume-MME3OFRQ.js} +5 -5
- package/dist/{run-4MQLY3XF.js → run-5NK2IO5X.js} +7 -5
- package/dist/run-5NK2IO5X.js.map +1 -0
- package/dist/{screen-URKN7PU6.js → screen-KSCRMLCO.js} +8 -8
- package/dist/{search-MNBYJEL7.js → search-ME2ME7O2.js} +4 -4
- package/dist/{section-B3OQFADP.js → section-XQ2C5OAR.js} +8 -8
- package/dist/{send-2QTMQQ6E.js → send-KG2REDEE.js} +9 -9
- package/dist/{sessions-4B22O45G.js → sessions-7KNUFP7M.js} +14 -14
- package/dist/{snooze-LSCCM3QT.js → snooze-XAUGXI6F.js} +7 -7
- package/dist/{start-KVNLZRF5.js → start-HJC6EGEL.js} +8 -8
- package/dist/{state-S776FFV5.js → state-6QP5ST4N.js} +4 -3
- package/dist/state-6QP5ST4N.js.map +1 -0
- package/dist/{status-UEMXFLZZ.js → status-JNR4BZH6.js} +4 -4
- package/dist/{stop-NEQBEYEY.js → stop-5LIH3DUX.js} +8 -8
- package/dist/{sync-BHEY6RXE.js → sync-U3BOXQ2S.js} +18 -18
- package/dist/{time-ON27QFG4.js → time-ZAXB2XSF.js} +9 -9
- package/dist/{time-actions-ZRD74CPW.js → time-actions-WBXW6XAY.js} +3 -3
- package/dist/{timesheet-HK5CHAA7.js → timesheet-2SHXLLHP.js} +10 -10
- package/dist/{todo-2GKRUO4D.js → todo-YBDZZUCH.js} +3 -3
- package/dist/{tree-C5BEEKLO.js → tree-OKM2MYTD.js} +13 -13
- package/dist/{update-M4KS23HB.js → update-SC5XCH5P.js} +9 -9
- package/dist/{wait-5QVWSCOL.js → wait-FTQQM7ME.js} +8 -8
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-DIEUYCTu.js → PtyView-DT2KQFV3.js} +2 -2
- package/dist/web/assets/{PtyView-DIEUYCTu.js.map → PtyView-DT2KQFV3.js.map} +1 -1
- package/dist/web/assets/{index-Bi1IRGtb.js → index-Bc4ETz8-.js} +5 -5
- package/dist/web/assets/index-Bc4ETz8-.js.map +1 -0
- package/dist/web/index.html +1 -1
- package/dist/{web-CT3EZNBL.js → web-H2IVQUID.js} +101 -49
- package/dist/web-H2IVQUID.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-2GX3IOSV.js.map +0 -1
- package/dist/chunk-453EGT2R.js.map +0 -1
- package/dist/chunk-6MLU6MNS.js +0 -9
- package/dist/chunk-C7OK4XEZ.js.map +0 -1
- package/dist/chunk-KTFDSJUD.js.map +0 -1
- package/dist/chunk-RT4QZRTC.js.map +0 -1
- package/dist/run-4MQLY3XF.js.map +0 -1
- package/dist/state-S776FFV5.js.map +0 -1
- package/dist/web/assets/index-Bi1IRGtb.js.map +0 -1
- package/dist/web-CT3EZNBL.js.map +0 -1
- /package/dist/{answer-OF2QNF4A.js.map → answer-7C4BZSYE.js.map} +0 -0
- /package/dist/{attach-PAFAZ2EH.js.map → attach-PITHAQC4.js.map} +0 -0
- /package/dist/{block-3LEG4LKJ.js.map → block-45UQKMA3.js.map} +0 -0
- /package/dist/{broadcast-ZDIL7UBP.js.map → broadcast-CUJDQYEW.js.map} +0 -0
- /package/dist/{catchup-ZZ5HZJIT.js.map → catchup-ZXYFL4XZ.js.map} +0 -0
- /package/dist/{chunk-XLP24AH5.js.map → chunk-2IM7Q7WT.js.map} +0 -0
- /package/dist/{chunk-M4YXBQZN.js.map → chunk-3GTLGDP3.js.map} +0 -0
- /package/dist/{chunk-3GAYLP7W.js.map → chunk-3N64LEF5.js.map} +0 -0
- /package/dist/{chunk-46VAWZZX.js.map → chunk-4O7B3ODB.js.map} +0 -0
- /package/dist/{chunk-77SVSNME.js.map → chunk-56G6RE5J.js.map} +0 -0
- /package/dist/{chunk-ZR2KWY6V.js.map → chunk-5P7XE7HW.js.map} +0 -0
- /package/dist/{chunk-OE34YZFO.js.map → chunk-6BITLING.js.map} +0 -0
- /package/dist/{chunk-LPJEV4R2.js.map → chunk-7UPS3IZ2.js.map} +0 -0
- /package/dist/{chunk-X6VBITXV.js.map → chunk-BSSYIB4W.js.map} +0 -0
- /package/dist/{chunk-RK6NHIL6.js.map → chunk-CQR657PU.js.map} +0 -0
- /package/dist/{chunk-TROTIHD5.js.map → chunk-DEW3VLLK.js.map} +0 -0
- /package/dist/{chunk-UDOXLAE7.js.map → chunk-DOD6DEWO.js.map} +0 -0
- /package/dist/{chunk-INVFNKU7.js.map → chunk-EAUE4VEJ.js.map} +0 -0
- /package/dist/{chunk-E3Y4ZACK.js.map → chunk-EAUSWDOQ.js.map} +0 -0
- /package/dist/{chunk-EXJYPF64.js.map → chunk-FAFWD2BZ.js.map} +0 -0
- /package/dist/{chunk-IKYZ5CJZ.js.map → chunk-G3RZAZAI.js.map} +0 -0
- /package/dist/{chunk-62C3CJ5M.js.map → chunk-GACMWI3H.js.map} +0 -0
- /package/dist/{chunk-XIL4QZFW.js.map → chunk-IS44ZO7V.js.map} +0 -0
- /package/dist/{chunk-KWU35O5S.js.map → chunk-JR4UAMZM.js.map} +0 -0
- /package/dist/{chunk-NBI2INQS.js.map → chunk-LESRAPQH.js.map} +0 -0
- /package/dist/{chunk-LGDECE7V.js.map → chunk-LZ7LYVHR.js.map} +0 -0
- /package/dist/{chunk-U5V5J237.js.map → chunk-M5E6EM5B.js.map} +0 -0
- /package/dist/{chunk-6MLU6MNS.js.map → chunk-MCCF7PIY.js.map} +0 -0
- /package/dist/{chunk-ISZM5C22.js.map → chunk-N4J65ADX.js.map} +0 -0
- /package/dist/{chunk-26IZBYVL.js.map → chunk-NSH62BFD.js.map} +0 -0
- /package/dist/{chunk-KSVZVHTI.js.map → chunk-OLT6A5L4.js.map} +0 -0
- /package/dist/{chunk-4CVUV2SE.js.map → chunk-OOZ77YJI.js.map} +0 -0
- /package/dist/{chunk-U4YUMSJY.js.map → chunk-PVNQJFIU.js.map} +0 -0
- /package/dist/{chunk-OIQY4OKO.js.map → chunk-SEU6GTXI.js.map} +0 -0
- /package/dist/{chunk-LBQR7KTC.js.map → chunk-SPS3SSXO.js.map} +0 -0
- /package/dist/{chunk-UOSZFFNY.js.map → chunk-UWSJHSZM.js.map} +0 -0
- /package/dist/{chunk-JQXUIKU5.js.map → chunk-VEXEV32Q.js.map} +0 -0
- /package/dist/{chunk-EDAOG56H.js.map → chunk-VFJYLTWC.js.map} +0 -0
- /package/dist/{chunk-ZVJEWMJN.js.map → chunk-W2W7MOHA.js.map} +0 -0
- /package/dist/{chunk-MRXD2NSO.js.map → chunk-WQ6NM7RO.js.map} +0 -0
- /package/dist/{chunk-R4M5DDSN.js.map → chunk-WQJRZXWB.js.map} +0 -0
- /package/dist/{chunk-DLSAAP3S.js.map → chunk-X63PWGRB.js.map} +0 -0
- /package/dist/{chunk-U27Q3DVF.js.map → chunk-XVTUJ5JP.js.map} +0 -0
- /package/dist/{chunk-3B3UMUE6.js.map → chunk-YLRFDJVU.js.map} +0 -0
- /package/dist/{chunk-TN2TXRHS.js.map → chunk-ZZ57KXHU.js.map} +0 -0
- /package/dist/{cleanup-W5RGZ3Q6.js.map → cleanup-O33DLVYY.js.map} +0 -0
- /package/dist/{cli-3BI62MNT.js.map → cli-XA33SNZC.js.map} +0 -0
- /package/dist/{config-MR7UZCST.js.map → config-IVFI5HKI.js.map} +0 -0
- /package/dist/{diff-URDY6YMT.js.map → diff-RJFPY5UC.js.map} +0 -0
- /package/dist/{digest-D4FEZNLU.js.map → digest-KU7AV7LU.js.map} +0 -0
- /package/dist/{fork-7EUVNEB7.js.map → fork-GGNDPT5D.js.map} +0 -0
- /package/dist/{hook-6AD3FRKZ.js.map → hook-SXCVFIKJ.js.map} +0 -0
- /package/dist/{hydrate-ZJZPM6YW.js.map → hydrate-LLHAMA6B.js.map} +0 -0
- /package/dist/{init-LWL4WVSJ.js.map → init-JDJFQEPW.js.map} +0 -0
- /package/dist/{install-skills-TQVWZDUD.js.map → install-skills-OXXTF7QP.js.map} +0 -0
- /package/dist/{move-URV7XIDT.js.map → move-OYZGR76R.js.map} +0 -0
- /package/dist/{note-S6EGTEIL.js.map → note-UT4F7TU4.js.map} +0 -0
- /package/dist/{overlaps-4T7NLTJH.js.map → overlaps-H7ZTPYGI.js.map} +0 -0
- /package/dist/{pin-KKQZ3AR6.js.map → pin-B7JAUL62.js.map} +0 -0
- /package/dist/{pr-5ZILTVDM.js.map → pr-U2O4WICL.js.map} +0 -0
- /package/dist/{prune-OK23KLHG.js.map → prune-DSV7XBIY.js.map} +0 -0
- /package/dist/{pty-host-I5OJGWYA.js.map → pty-host-XZPHJWCJ.js.map} +0 -0
- /package/dist/{read-NHK26F22.js.map → read-SOC7UER2.js.map} +0 -0
- /package/dist/{recent-DNSOJQVQ.js.map → recent-7XAWE6FF.js.map} +0 -0
- /package/dist/{remove-TZQVN2EG.js.map → remove-KC276OMW.js.map} +0 -0
- /package/dist/{restart-WHJDPDQA.js.map → restart-LDPKYFLI.js.map} +0 -0
- /package/dist/{resume-BXIYEZM3.js.map → resume-MME3OFRQ.js.map} +0 -0
- /package/dist/{screen-URKN7PU6.js.map → screen-KSCRMLCO.js.map} +0 -0
- /package/dist/{search-MNBYJEL7.js.map → search-ME2ME7O2.js.map} +0 -0
- /package/dist/{section-B3OQFADP.js.map → section-XQ2C5OAR.js.map} +0 -0
- /package/dist/{send-2QTMQQ6E.js.map → send-KG2REDEE.js.map} +0 -0
- /package/dist/{sessions-4B22O45G.js.map → sessions-7KNUFP7M.js.map} +0 -0
- /package/dist/{snooze-LSCCM3QT.js.map → snooze-XAUGXI6F.js.map} +0 -0
- /package/dist/{start-KVNLZRF5.js.map → start-HJC6EGEL.js.map} +0 -0
- /package/dist/{status-UEMXFLZZ.js.map → status-JNR4BZH6.js.map} +0 -0
- /package/dist/{stop-NEQBEYEY.js.map → stop-5LIH3DUX.js.map} +0 -0
- /package/dist/{sync-BHEY6RXE.js.map → sync-U3BOXQ2S.js.map} +0 -0
- /package/dist/{time-ON27QFG4.js.map → time-ZAXB2XSF.js.map} +0 -0
- /package/dist/{time-actions-ZRD74CPW.js.map → time-actions-WBXW6XAY.js.map} +0 -0
- /package/dist/{timesheet-HK5CHAA7.js.map → timesheet-2SHXLLHP.js.map} +0 -0
- /package/dist/{todo-2GKRUO4D.js.map → todo-YBDZZUCH.js.map} +0 -0
- /package/dist/{tree-C5BEEKLO.js.map → tree-OKM2MYTD.js.map} +0 -0
- /package/dist/{update-M4KS23HB.js.map → update-SC5XCH5P.js.map} +0 -0
- /package/dist/{wait-5QVWSCOL.js.map → wait-FTQQM7ME.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PtyView-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PtyView-DT2KQFV3.js","assets/PtyView-BrP-ENHg.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=N(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(ne.bind(null,e))}var L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ne,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),N=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),F=Symbol.for(`react.forward_ref`),I=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),L=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),R=Symbol.for(`react.legacy_hidden`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.for(`react.view_transition`),oe=Symbol.for(`react.recoverable`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var z=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===z?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case ee:return`Profiler`;case M:return`StrictMode`;case I:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`;case ae:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case N:return(e._context.displayName||`Context`)+`.Consumer`;case F:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case L:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var B=Array.isArray,V=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],U=-1;function fe(e){return{current:e}}function W(e){0>U||(e.current=de[U],de[U]=null,U--)}function G(e,t){U++,de[U]=e.current,e.current=t}var pe=fe(null),me=fe(null),he=fe(null),ge=fe(null);function _e(e,t){switch(G(he,t),G(me,e),G(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}W(pe),G(pe,e)}function ve(){W(pe),W(me),W(he)}function ye(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,G(ge,e)),t=pe.current;var n=dp(t,e.type);t!==n&&(G(me,e),G(pe,n))}function be(e){me.current===e&&(W(pe),W(me)),ge.current===e&&(W(ge),sh._currentValue=ue)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -10,7 +10,7 @@ Error generating stack: `+e.message+`
|
|
|
10
10
|
`).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||nn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&nn(e,``+r);else return;break;case`className`:Vt(e,`class`,r);break;case`tabIndex`:Vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Vt(e,n,r);break;case`style`:on(e,r,o);return;case`data`:if(t!==`object`){Vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Bt(e,`popover`,r);break;case`xlinkActuate`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Bt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=cn.get(n)||n,Bt(e,n,r);else return}Rt=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:on(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)nn(e,r);else if(typeof r==`number`||typeof r==`bigint`)nn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=dn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!K.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[gt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Rt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Bt(e,n,r)}return}Rt=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ep(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ep(e,t,s,c,n,null)}tn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Rt=!0),o=m;break;case`name`:m!==f&&(Rt=!0),a=m;break;case`checked`:m!==f&&(Rt=!0),u=m;break;case`defaultChecked`:m!==f&&(Rt=!0),d=m;break;case`value`:m!==f&&(Rt=!0),s=m;break;case`defaultValue`:m!==f&&(Rt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ep(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Rt=!0),p=o;break;case`defaultValue`:o!==l&&(Rt=!0),c=o;break;case`multiple`:o!==l&&(Rt=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ep(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Rt=!0),p=a;break;case`defaultValue`:a!==o&&(Rt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Rt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[ht]=r,n[gt]=t,np(n,e,t),kt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Tt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),wt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[St])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===dn&&(e.onclick=null),wt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=H.d;H.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Ld();return e||t}function Cm(e){var t=Et(e);t!==null&&t.tag===5&&t.type===`form`?Js(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Ct]=!0,o.onload=o.onerror=function(){At(o)}),kt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Ot(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);kt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Ot(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),kt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Ot(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),kt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=he.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Ot(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Ot(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+Yt(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ct]){r.loading=1;return}}else t=e.createElement(`link`),t[Ct]=!0,t.onload=t.onerror=At.bind(null,t),np(t,`link`,n),kt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+Yt(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,kt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[St]||a[ht]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:P,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=it(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.hiddenUpdates=it(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=wi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function uh(e){return e?(e=Si,e):Si}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Md(n,e,t),co(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=yi(e,67108864);t!==null&&Md(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=kd();t=ut(t);var n=yi(e,t);n!==null&&Md(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=V.T;V.T=null;var a=H.p;try{H.p=2,yh(e,t,n,r)}finally{H.p=a,V.T=i}}function vh(e,t,n,r){var i=V.T;V.T=null;var a=H.p;try{H.p=8,yh(e,t,n,r)}finally{H.p=a,V.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Et(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Ju&6)&&(md=Ne()+500,Ef(0,!1))}}break;case 31:case 13:s=yi(a,2),s!==null&&Md(s,a,2),Ld(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=pn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Tt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Et(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Tt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,pt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,pt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Et(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Et(n);a!==null&&(e.splice(t,3),t-=3,Ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[gt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[_t]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=ft();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.0`)throw Error(i(527,Kh,`19.3.0`));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:V,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{He=Jh.inject(qh),Ue=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=hc,s=gc,c=_c;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[_t]=t.current,Uf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g();function y(e){switch(e.kind){case`working`:return`working`;case`head`:return`head`;case`checkpoint`:return`cp:${e.id}`;case`commit`:return`c:${e.repo}:${e.sha}`;case`parent`:return`p:${e.repo}:${e.sha}`}}var b=new Map,x=new Set,S=()=>{for(let e of x)e()};function C(e,t,n){b.set(e,t),S();let r=()=>{b.get(e)===t&&b.delete(e),S()};return n.then(r,r),n}function w(e){return(0,_.useSyncExternalStore)(e=>(x.add(e),()=>x.delete(e)),()=>b.get(e))}function T(e){return A(`/api/sessions/${encodeURIComponent(e)}/ship`)}function E(e,t){return z(`/api/sessions/${encodeURIComponent(e)}/ship`,t)}function D(e,t,n=e=>window.confirm(e)){return C(e,t,k(e,t,n))}var O=e=>e?.cancelled===!0;async function k(e,t,n){let r=`/api/sessions/${encodeURIComponent(e)}/archive`,i=(e,n=!1)=>fetch(r,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({archived:t,...e?{force:!0}:{},...n?{stopHolders:!0}:{}})}),a=await i(!1);if(a.status===409&&!t){let e=await a.json().catch(()=>({})),t=e.holders??[];if(t.length===0)throw Error(e.error??`409 for ${r}`);if(!n(`Still running from its old folder:\n\n• ${t.join(`
|
|
11
11
|
• `)}\n\nStop it and restore?`))throw Object.assign(Error(e.error??`Not restored`),{cancelled:!0});a=await i(!1,!0)}else if(a.status===409){let e=(await a.json().catch(()=>({}))).blocked??[];if(!n(`Still waiting in this session:\n\n• ${e.join(`
|
|
12
12
|
• `)}\n\nArchive it anyway?`))throw Object.assign(Error(`Not archived: ${e.join(`; `)}`),{cancelled:!0});a=await i(!0)}let o=await a.json().catch(()=>({}));if(!a.ok)throw Error(o.error??`${a.status} for ${r}`);return{ok:!0}}async function A(e){let t=await fetch(e,{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`${t.status} ${t.statusText} for ${e}`);return t.json()}function j(e){return A(`/api/sessions/${encodeURIComponent(e)}/replies`).then(e=>({replies:e.replies,waiting:e.waiting??[]}))}async function M(e,t,n){let r=await fetch(t,{method:e,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error??`${r.status} for ${t}`);return i}var ee=(e,t)=>`/api/sessions/${encodeURIComponent(e)}/replies/${encodeURIComponent(t)}`;function N(e,t,n){return M(`PUT`,ee(e,t),{body:n})}function P(e,t){return M(`DELETE`,ee(e,t))}function F(e,t,n,r){return M(`POST`,`${ee(e,t)}/post`,{body:n,resolve:r})}function I(){return A(`/api/activity`)}function te(e=!1){return A(`/api/sessions${e?`?archived=1`:``}`).then(e=>e.sessions)}function ne(){return window.__WD_BOOT__??null}function L(){return ne()!==null}function re(){let e=ne();return e?Promise.resolve(e.context):A(`/api/context`)}function R(e=`uncommitted`){let t=ne();return t?t.diffs?.[e]?Promise.resolve(t.diffs[e]):Promise.resolve(t.diff):A(`/api/diff${e===`branch`?`?base=branch`:``}`)}function ie(){return!!ne()?.diffs?.branch}function ae(e,t=`uncommitted`,n){let r=new URLSearchParams;n?(r.set(`from`,String(n.from)),r.set(`to`,String(n.to))):t===`branch`&&r.set(`base`,`branch`);let i=r.toString();return A(`/api/scopes/${encodeURIComponent(e)}/diff${i?`?${i}`:``}`)}function oe(e,t,n,r,i,a){let o=new URLSearchParams({repo:t,path:n,start:String(r),end:String(i)});return a&&o.set(`ref`,a),A(`${e?`/api/scopes/${encodeURIComponent(e)}/file-lines`:`/api/file-lines`}?${o.toString()}`)}function se(e){return A(`/api/scopes/${encodeURIComponent(e)}/checkpoints`).then(e=>e.entries)}function ce(e,t){return z(`/api/scopes/${encodeURIComponent(e)}/checkpoints/${t}/summary`,{})}async function z(e,t,n=`POST`){let r=await fetch(e,{method:n,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!r.ok)throw Error(`${r.status} ${r.statusText} for ${e}`);return r.json()}function le(e){return A(`/api/sessions/${encodeURIComponent(e)}/diff-seen`).then(e=>e.seen)}async function B(e,t,n,r){let i=await fetch(`/api/sessions/${encodeURIComponent(e)}/diff-seen`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({checkpointId:t,...n?{ts:n}:{},...r?{marked:r}:{}})});if(!i.ok)throw Error(`diff-seen: ${i.status}`);return(await i.json().catch(()=>null))?.seen??null}async function V(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/diff-page`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok||!n.url)throw Error(n.error??`diff-page: ${t.status}`);return n.url}function H(e,t=`uncommitted`,n){let r=n?`?from=${encodeURIComponent(y(n.from))}&to=${encodeURIComponent(y(n.to))}`:t===`branch`?`?base=branch`:``;return A(`/api/sessions/${encodeURIComponent(e)}/diff${r}`)}function ue(e){return A(`/api/sessions/${encodeURIComponent(e)}/checkpoints`).then(e=>({scopeHash:e.scopeHash,entries:e.entries,commits:e.commits??[]}))}function de(e){return z(`/api/assistant/context`,e)}function U(e,t){let n=typeof t==`string`?{for:t}:{until:t.until},r=e.prStage?{prStage:{kind:e.prStage.kind,key:e.prStage.key}}:{};return z(`/api/sessions/${encodeURIComponent(e.id)}/snooze`,{...n,openReviewThreads:e.openReviewThreads??0,...r})}async function fe(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/snooze`,{method:`DELETE`});if(!t.ok)throw Error(`${t.status} unsnoozing`)}async function W(e,t){let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({side:`general`,status:`published`,body:t})});if(!n.ok)throw Error(`send failed (${n.status})`)}async function G(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/retarget`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok||!n.results)throw Error(n.error??`moving onto main failed (${t.status})`);return n.results}async function pe(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/update-from-main`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok||!n.results)throw Error(n.error??`update failed (${t.status})`);return n.results}async function me(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/catch-up`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok||!n.catchUp)throw Error(n.error??`catching up failed (${t.status})`);return n.catchUp}function he(e,t){return z(`/api/sessions/${encodeURIComponent(e)}/seen`,t?{prStage:{kind:t.kind,key:t.key}}:{})}async function ge(e,t){let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/answer`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`answer failed (${n.status})`)}}async function _e(e,t){let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/title`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:t})});if(!n.ok)throw Error(`renaming failed (${n.status})`)}async function ve(e){return(await A(`/api/conversations/search?q=${encodeURIComponent(e)}`)).hits??[]}async function ye(){let e=await A(`/api/session-order`);return Array.isArray(e.order)?e.order.filter(e=>typeof e==`string`):[]}async function be(e){let t=await fetch(`/api/session-order`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({order:e})});if(!t.ok)throw Error(`saving the order failed (${t.status})`)}function xe(){return A(`/api/pty-host/health`)}async function Se(e){return(await A(`/api/sessions/${encodeURIComponent(e)}/timeline`)).events}var Ce=new Map,we=3e4,Te=6;function Ee(e,t={}){let n=Ce.get(e);if(n&&!t.fresh&&Date.now()-n.at<we)return n.files;let r=A(`/api/sessions/${encodeURIComponent(e)}/files`);for(Ce.delete(e),Ce.set(e,{at:Date.now(),files:r});Ce.size>Te;)Ce.delete(Ce.keys().next().value);return r.catch(()=>Ce.get(e)?.files===r&&Ce.delete(e)),r}function De(e,t,n){return fetch(`/api/sessions/${encodeURIComponent(e)}/code-search?${new URLSearchParams({q:t}).toString()}`,{headers:{Accept:`application/json`},signal:n}).then(e=>{if(!e.ok)throw Error(`${e.status} searching`);return e.json()})}async function Oe(e,t,n){let r=new URLSearchParams({repo:t,path:n}),i=await fetch(`/api/sessions/${encodeURIComponent(e)}/file?${r.toString()}`,{headers:{Accept:`application/json`}}),a=await i.json().catch(()=>({}));if(!i.ok)throw Error(a.error===`not listed`?`Not there any more (moved or deleted).`:a.error??`${i.status}`);return a}async function ke(e,t){await M(`POST`,`/api/sessions/${encodeURIComponent(e)}/blocks`,t)}async function Ae(e,t){await M(`DELETE`,`/api/sessions/${encodeURIComponent(e)}/blocks${t?`?key=${encodeURIComponent(t)}`:``}`)}async function je(e){return(await A(`/api/sessions/${encodeURIComponent(e)}/note`)).note}async function Me(e,t){await M(`PUT`,`/api/sessions/${encodeURIComponent(e)}/note`,{text:t})}function Ne(e){return A(`/api/sessions/${encodeURIComponent(e)}/time`)}function Pe(e){return A(`/api/sessions/${encodeURIComponent(e)}/worklog`)}function Fe(e,t){return M(`POST`,`/api/sessions/${encodeURIComponent(e)}/worklog`,t?{day:t}:{})}function Ie(e,t){return M(`POST`,`/api/sessions/${encodeURIComponent(e)}/fork`,t)}function Le(){return A(`/api/rail`)}function Re(e){return M(`POST`,`/api/rail/sections`,e)}function ze(e,t){return M(`PUT`,`/api/sessions/${encodeURIComponent(e)}/rail`,t)}async function Be(e,t){let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/revert`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`${n.status} ${n.statusText}`);return r}function Ve(e){return A(`/api/sessions/${encodeURIComponent(e)}/dev`)}async function He(e,t){let n=await fetch(`/api/sessions/${encodeURIComponent(e)}/dev/${t}`,{method:`POST`});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`${n.status} ${n.statusText}`)}}function Ue(e){return A(`/api/sessions/${encodeURIComponent(e)}/ci`)}async function We(e){let t=await fetch(`/api/sessions/${encodeURIComponent(e)}/ci/fix`,{method:`POST`});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`${t.status} ${t.statusText}`)}}var Ge=new Set([`ready`,`conflict`,`checks_failing`]),Ke=new Set([`in_review`,`checks_running`,`approved`,`changes`]),qe={draft:`draft`,in_review:`waiting for review`,checks_running:`checks running`,checks_failing:`checks failing`,changes:`changes requested`,conflict:`merge conflict`,approved:`approved`,ready:`approved, ready to merge`,merged:`merged`,closed:`closed`};function Je(e){return e.state===`MERGED`?`merged`:e.state===`CLOSED`?`closed`:e.isDraft?`draft`:e.mergeStateStatus===`DIRTY`?`conflict`:e.checks===`fail`?`checks_failing`:e.reviewDecision===`CHANGES_REQUESTED`?`changes`:e.reviewDecision===`APPROVED`?e.checks===`pending`?`checks_running`:e.mergeStateStatus===`BEHIND`||e.mergeStateStatus===`BLOCKED`?`approved`:`ready`:e.checks===`pending`&&e.reviewDecision!==`REVIEW_REQUIRED`?`checks_running`:`in_review`}var Ye=e=>e===`ready`?`ready to merge`:qe[e];function Xe(e){return e===`ready`?`good`:e===`merged`?`merged`:e===`conflict`||e===`checks_failing`||e===`changes`?`bad`:e===`draft`?`draft`:`plain`}function Ze(e){return!!e&&Ge.has(e.kind)&&!e.seen}function Qe(e){return!!e&&Ke.has(e.kind)}function $e(e,t){if(!e)return t;let n=new Set(e.prs.map(e=>e.url));return t.filter(e=>!n.has(e.url))}function et(e){let t=[Date.parse(e.lastAccessedAt)||0,e.lastActivity??0,e.attention&&Date.parse(e.attention.updatedAt)||0];return new Date(Math.max(...t)).toISOString()}function tt(e,t=Date.now()){let n=e.attention;if(n){if(n.state===`needs_input`)return`needs_input`;if(n.state===`working`)return`working`;if(!n.seen)return`done`}return(e.openReviewThreads??0)>0?`review`:Ze(e.prStage)?`pr`:Qe(e.prStage)?`in_review`:n?`quiet`:e.activityState===`active`?`active`:e.activityState===`open`?`open`:t-Date.parse(et(e))<864e5?`recent`:`stale`}var nt={needs_input:`Needs your input`,done:`Done`,working:`Working`,review:`Review comments`,pr:`Pull request`,in_review:`In review`,quiet:`Idle`,active:`Active`,open:`Open`,recent:`Idle`,stale:`Stale`},rt={needs_input:`Its Claude is waiting for you: a permission prompt or a question.`,done:`Its Claude finished a turn you haven't looked at yet.`,working:`Its Claude is working on your last instruction right now.`,review:`Reviewers left comments on its pull request that you haven't answered or resolved.`,pr:`Its pull request needs you: approved with checks passing (ready to merge), a merge conflict, or failing checks.`,in_review:`Its pull request is open and waiting on reviewers or checks. It comes back to the Inbox when comments arrive, checks fail, or it is approved.`,quiet:`Its Claude finished, and you've seen it. Nothing to do.`,active:`Its Claude wrote in the last 30 seconds (it isn't reporting its status, so this is from its transcript).`,open:`Its Claude wrote in the last 5 minutes, or is open and idle at its prompt.`,recent:`Used in the last day; nothing running now.`,stale:`Not used for over a day.`},it=[`needs_input`,`done`,`review`,`pr`,`working`,`in_review`,`active`,`open`,`quiet`,`stale`],at={now:`Now`,week:`This week`,older:`Older`};function ot(e,t=Date.now()){let n=tt(e,t);if(n===`needs_input`||n===`done`||n===`working`||n===`review`||n===`pr`||n===`active`||n===`open`)return`now`;let r=t-Date.parse(et(e));return r<864e5?`now`:r<6048e5?`week`:`older`}function st(e){switch(e){case`needs_input`:case`done`:case`review`:case`pr`:return`needs`;case`working`:case`active`:return`working`;case`quiet`:case`in_review`:case`open`:case`recent`:return`idle`;default:return`stale`}}var ct="Its Claude isn't reporting its status (it was started before work web's hooks were installed, or it isn't Claude), so this is from its transcript activity: Active = wrote in the last 30 s, Open = last 5 min. Restart it with `work tree <target> <branch>` (the conversation continues) to get Working / Needs your input / Done.";function lt(e){return e===`active`||e===`open`||e===`recent`||e===`stale`?ct:void 0}function ut(e,t){if(t.length===0)return[...e];let n=new Map(t.map((e,t)=>[e,t])),r=e.filter(e=>!n.has(e.id)).sort((e,t)=>(t.createdAt??``).localeCompare(e.createdAt??``)),i=e.filter(e=>n.has(e.id)).sort((e,t)=>n.get(e.id)-n.get(t.id));return[...r,...i]}function dt(e,t,n,r){if(t===n)return[...e,...r.filter(t=>!e.includes(t))];let i=e.filter(e=>e!==t),a=n===null?-1:i.indexOf(n);i.splice(a===-1?i.length:a,0,t);let o=new Set(i);return[...i,...r.filter(e=>!o.has(e))]}var ft={sections:[],places:{}};function pt(e,t){let n=new Set(t.sections.map(e=>e.id)),r=[],i=new Map,a=[];for(let o of e){let e=t.places[o.id];e?.pinned?r.push(o):e?.section&&n.has(e.section)?i.set(e.section,[...i.get(e.section)??[],o]):a.push(o)}let o=[];r.length&&o.push({key:`pinned`,title:`Pinned`,sessions:r});for(let e of t.sections)o.push({key:`section:${e.id}`,title:e.name,sectionId:e.id,sessions:i.get(e.id)??[]});return(a.length||o.length===0||r.length||t.sections.length)&&o.push({key:`rest`,title:t.sections.length||a.length===0?`Other`:null,sessions:a}),o}function mt(e){return e.key===`pinned`?{pinned:!0}:e.sectionId?{pinned:!1,section:e.sectionId}:{pinned:!1,section:null}}function ht(){return`s${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`}function gt(e){return e.agent?.name??`Claude`}function _t(e,t){return!e.agent||e.agent.can[t]}function vt(e){return!!e.archivedAt}function yt(e){return[...e].sort((e,t)=>e.target.toLowerCase().localeCompare(t.target.toLowerCase())||t.lastAccessedAt.localeCompare(e.lastAccessedAt))}var bt=12096e5;function xt(e,t=Date.now(),n=[]){let r=[],i=[];for(let n of e){if(vt(n))continue;let e=t-(Date.parse(n.lastAccessedAt)||0)<bt,a=!!n.attention||n.ptyStatus===`running`||n.activityState===`active`||n.activityState===`open`;(e||a?r:i).push(n)}return{current:ut(yt(r),n),older:ut(yt(i),n)}}function St(e,t){let{current:n,older:r}=xt(e,t.now??Date.now(),t.order??[]),i=t.showOlder?r:r.filter(e=>e.id===t.activeId||t.layout.places[e.id]?.pinned);return{groups:pt([...n,...i],t.layout),hidden:r.length-i.length}}function Ct(e,t){let n=t.toLowerCase().replace(/\\/g,`/`).split(/\s+/).filter(Boolean);if(n.length===0)return!0;let r=[e.branch,e.target,...e.paths,e.title??``,e.attention?.summary??``,e.jiraKey??``,e.archive?.lastSummary??``,...e.archive?.prompts??[]].join(`
|
|
13
|
-
`).toLowerCase().replace(/\\/g,`/`);return n.every(e=>r.includes(e))}function wt(e,t,n){let r=e.isGroup?n?.(e.target):void 0;return t.filter(t=>t.branch===e.branch&&(t.repoAlias===e.target||e.isGroup&&(!r||r.includes(t.repoAlias))))}function Tt(e){let t=e.diffStat;return!t||t.added===0&&t.deleted===0&&t.files===0?null:`+${t.added} −${t.deleted}`}var Et=12,Dt=30,Ot=e=>e.titleIsYours&&e.title?e.title:e.branch||e.target;function kt(e,t){let n=t.trim().toLowerCase(),r=(e,t)=>et(t).localeCompare(et(e));if(!n)return e.filter(e=>!e.archivedAt).sort(r).slice(0,Et);let i=n.split(/\s+/),a=e=>{let t=[Ot(e),e.branch,e.title??``].map(e=>e.toLowerCase());if(t.some(e=>e===n))return 0;let r=t.flatMap(e=>[e,...e.split(/[/\-_ ]/)]);return i.every(e=>r.some(t=>t.startsWith(e)))?1:2};return e.filter(e=>Ct(e,n)).sort((e,t)=>Number(!!e.archivedAt)-Number(!!t.archivedAt)||a(e)-a(t)||r(e,t)).slice(0,Dt)}var At=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),jt=o(((e,t)=>{t.exports=At()})),K=jt();function Mt({kind:e,labelled:t=!1,muted:n=!1}){let r=t?{role:`img`,"aria-label":nt[e],title:`${nt[e]}: ${rt[e]}`}:{"aria-hidden":!0};return(0,K.jsx)(`span`,{className:`wd-rail-dot wd-rail-dot-${e} wd-status-icon${n?` wd-status-icon-muted`:``}`,...r,children:(0,K.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,focusable:`false`,children:Pt[e]})})}var Nt=`var(--status-icon-cut, var(--bg))`,Pt={needs_input:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsx)(`path`,{d:`M8 4.3v4.4`,stroke:Nt,strokeWidth:`1.9`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`11.4`,r:`1.1`,fill:Nt})]}),done:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsx)(`path`,{d:`M4.8 8.3l2.1 2.1 4.3-4.5`,fill:`none`,stroke:Nt,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),working:(0,K.jsxs)(`g`,{className:`wd-status-spin`,children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.6`,fill:`none`,stroke:`currentColor`,strokeOpacity:`0.25`,strokeWidth:`2`}),(0,K.jsx)(`path`,{d:`M8 2.4a5.6 5.6 0 0 1 5.6 5.6`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),review:(0,K.jsx)(`path`,{d:`M3 3.2h10a1.6 1.6 0 0 1 1.6 1.6v5.2a1.6 1.6 0 0 1-1.6 1.6H7.4L4.3 14v-2.4H3A1.6 1.6 0 0 1 1.4 10V4.8A1.6 1.6 0 0 1 3 3.2z`,fill:`currentColor`}),pr:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsxs)(`g`,{fill:`none`,stroke:Nt,strokeWidth:`1.3`,strokeLinecap:`round`,children:[(0,K.jsx)(`circle`,{cx:`5.4`,cy:`4.7`,r:`1.2`}),(0,K.jsx)(`circle`,{cx:`5.4`,cy:`11.3`,r:`1.2`}),(0,K.jsx)(`circle`,{cx:`10.6`,cy:`11.3`,r:`1.2`}),(0,K.jsx)(`path`,{d:`M5.4 5.9v4.2M10.6 10.1V6.8a1.5 1.5 0 0 0-1.5-1.5H7.5`})]})]}),in_review:(0,K.jsx)(`path`,{d:`M4.3 2.4h7.4M4.3 13.6h7.4M5.2 2.4c0 3.2 5.6 3.4 5.6 5.6s-5.6 2.4-5.6 5.6M10.8 2.4c0 3.2-5.6 3.4-5.6 5.6s5.6 2.4 5.6 5.6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),quiet:(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),active:(0,K.jsx)(`path`,{d:`M1.5 8.5h3l1.8-4.2 3.2 8 1.9-3.8h3.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),open:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`})]}),recent:(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),stale:(0,K.jsx)(`path`,{d:`M10.6 2.2a6 6 0 1 0 3.2 9.6A5 5 0 0 1 10.6 2.2z`,fill:`currentColor`})},Ft=`[role="dialog"]:not([data-popover]), [role="alertdialog"], [aria-modal="true"], [role="menu"]`;function It(e=document){return e.querySelector(Ft)!==null}function Lt({sessions:e,onOpen:t,onClose:n}){let[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(0),s=(0,_.useId)(),c=(0,_.useRef)(null),l=(0,_.useMemo)(()=>kt(e,r),[e,r]);(0,_.useEffect)(()=>c.current?.focus(),[]),(0,_.useEffect)(()=>o(0),[r]);let u=e=>{e&&(n(!0),t(e.id))};return(0,K.jsx)(`div`,{className:`wd-switcher-backdrop`,onMouseDown:e=>e.target===e.currentTarget&&n(!1),children:(0,K.jsxs)(`div`,{className:`wd-switcher`,role:`dialog`,"aria-modal":`true`,"aria-label":`Go to a session`,children:[(0,K.jsx)(`input`,{ref:c,className:`wd-switcher-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":s,"aria-activedescendant":l[a]?`${s}-${a}`:void 0,placeholder:`Go to a session: name, branch, repo, Jira key…`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),o(e=>Math.min(e+1,l.length-1))):e.key===`ArrowUp`?(e.preventDefault(),o(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),u(l[a])):e.key===`Escape`?(e.preventDefault(),n(!1)):e.key===`Tab`&&e.preventDefault()}}),(0,K.jsxs)(`ul`,{id:s,className:`wd-switcher-list`,role:`listbox`,children:[l.length===0&&(0,K.jsxs)(`li`,{className:`wd-switcher-empty`,children:[`No session matches “`,r.trim(),`”.`]}),l.map((e,t)=>(0,K.jsxs)(`li`,{id:`${s}-${t}`,role:`option`,"aria-selected":t===a,className:`wd-switcher-item`+(t===a?` wd-switcher-item-active`:``),onMouseDown:t=>{t.preventDefault(),u(e)},onMouseEnter:()=>o(t),children:[(0,K.jsx)(Mt,{kind:tt(e)}),(0,K.jsx)(`span`,{className:`wd-switcher-name`,children:Ot(e)}),(0,K.jsxs)(`span`,{className:`wd-switcher-sub`,children:[e.target,Ot(e)===e.branch?``:` · ${e.branch}`,e.archivedAt?` · archived`:``]})]},e.id))]}),(0,K.jsxs)(`p`,{className:`wd-switcher-hint`,children:[(0,K.jsx)(`kbd`,{children:`↑`}),` `,(0,K.jsx)(`kbd`,{children:`↓`}),` to move · `,(0,K.jsx)(`kbd`,{children:`Enter`}),` to open · `,(0,K.jsx)(`kbd`,{children:`Esc`}),` to close`]})]})})}function Rt(){let[e,t]=(0,_.useState)(!1),n=(0,_.useRef)(!1),r=(0,_.useRef)(null),i=(0,_.useCallback)(e=>{n.current=!1,t(!1);let i=r.current;r.current=null,!e&&i?.isConnected&&setTimeout(()=>i.focus(),0)},[]);return(0,_.useEffect)(()=>{let e=e=>{if(!(!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`p`)){if(e.preventDefault(),e.stopPropagation(),n.current)return i(!1);It()||(r.current=document.activeElement,n.current=!0,t(!0))}};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[i]),{open:e,close:i}}var zt={"tab-term":{key:`1`,label:`Terminal tab`},"tab-diff":{key:`2`,label:`Diff tab`},"tab-pr":{key:`3`,label:`PR tab`},"tab-code":{key:`4`,label:`Code tab`},timeline:{key:`l`,label:`Timeline (how it got here)`},archive:{key:`e`,label:`Archive (Restore when archived)`},snooze:{key:`z`,label:`Snooze…`},block:{key:`b`,label:`Blocked by…`},menu:{key:`.`,label:`Its ⋯ menu`},prompt:{key:`p`,label:`Send a prompt…`},catchup:{key:`r`,label:`Catch me up`},notes:{key:`n`,shift:!0,label:`Notes`},ship:{key:`s`,shift:!0,label:`Ship (push, PR, merge)…`},terminal:{key:`t`,shift:!0,label:`Open in a terminal`},reconnect:{key:`r`,shift:!0,label:`Reconnect its terminal`},editor:{key:`o`,label:`Open in editor`},copy:{key:`y`,label:`Copy branch name`},fork:{key:`f`,label:`Fork…`},dev:{key:`d`,shift:!0,label:`Start / stop the dev server`},delete:{key:`Delete`,shift:!0,label:`Delete…`}};function Bt(e){if(e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key.length===1?e.key.toLowerCase():e.key;for(let[n,r]of Object.entries(zt))if(r.key===t&&!!r.shift==!!e.shiftKey)return n;return null}function Vt(e){let t=e.key===`Delete`?`Del`:e.key;return e.shift?`⇧${t.length===1?t.toUpperCase():t}`:t}var Ht=e=>Vt(zt[e]);function Ut(){return[{title:`Anywhere`,rows:[{keys:`c`,label:`New worktree`},{keys:`n`,label:`Next session that wants you (next in the review queue)`},{keys:`j / k`,label:`Next / previous session in the list on the left`},{keys:`Alt+1…9`,label:`Open the first nine sessions on the left`},{keys:`/`,label:`Search sessions`},{keys:`Ctrl+P`,label:`Switch to a session by name`},{keys:`Ctrl+K`,label:`Ask (the assistant)`},{keys:`?`,label:`These shortcuts`}]},{title:`Go to`,rows:[{keys:`g i`,label:`Inbox`},{keys:`g s`,label:`Sessions`},{keys:`g d`,label:`Today`},{keys:`g w`,label:`Start`},{keys:`g j`,label:`Jira`},{keys:`g h`,label:`Time (hours per ticket)`},{keys:`g r`,label:`Repos & groups`},{keys:`g c`,label:`Clean up`},{keys:`g t`,label:`Tasks (open / close)`}]},{title:`The open session`,rows:[...Object.values(zt).map(e=>({keys:Vt(e),label:e.label})),{keys:`F2`,label:`Rename`},{keys:`Ctrl+T`,label:`Search its code: types and members, files, text (in the app; in a browser, the Code tab's button)`},{keys:`Alt+↑ / ↓`,label:`Move it up / down the list (on its row)`}]},{title:`The diff`,rows:[{keys:`] / [`,label:`Next / previous comment`}]}]}var Wt=`work:session-action`;function Gt(e,t,n){let r=!t.archived;switch(e){case`tab-term`:return n.tab(`term`);case`tab-diff`:return n.tab(`diff`);case`tab-pr`:return n.tab(`pr`);case`tab-code`:return n.tab(`code`);case`archive`:return n.setArchived(r);case`snooze`:return r?n.snoozeMenu():void 0;case`block`:return r?n.blockBy():void 0;case`editor`:return r?n.openEditor():void 0;case`copy`:return n.copyBranch();case`fork`:return r?n.fork():void 0;case`delete`:return n.remove();default:return n.header(e)}}function Kt({onClose:e}){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let n=t=>t.key===`Escape`&&e(),r=n=>{t.current&&!t.current.contains(n.target)&&e()};return window.addEventListener(`keydown`,n),window.addEventListener(`mousedown`,r),()=>{window.removeEventListener(`keydown`,n),window.removeEventListener(`mousedown`,r)}},[e]),(0,K.jsxs)(`div`,{ref:t,className:`wd-shortcuts`,role:`dialog`,"data-popover":!0,"aria-label":`Keyboard shortcuts`,children:[(0,K.jsxs)(`header`,{className:`wd-shortcuts-head`,children:[(0,K.jsx)(`h2`,{children:`Keyboard shortcuts`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-modal-close`,onClick:e,"aria-label":`Close`,children:`×`})]}),(0,K.jsx)(`p`,{className:`wd-shortcuts-note`,children:`Not while typing in a field or a terminal, nor with a dialog open.`}),(0,K.jsx)(`div`,{className:`wd-shortcuts-groups`,children:Ut().map(e=>(0,K.jsxs)(`section`,{className:`wd-shortcuts-group`,children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:e.title}),(0,K.jsx)(`dl`,{children:e.rows.map(e=>(0,K.jsxs)(`div`,{className:`wd-shortcuts-row`,children:[(0,K.jsx)(`dt`,{children:(0,K.jsx)(`kbd`,{children:e.keys})}),(0,K.jsx)(`dd`,{children:e.label})]},e.keys+e.label))})]},e.title))})]})}var qt=`work:update-later`;function Jt(){try{return localStorage.getItem(qt)}catch{return null}}function Yt({updates:e,onRestart:t,onWhatsNew:n,restarting:r=!1}){let[i,a]=(0,_.useState)(Jt),[o,s]=(0,_.useState)(!1),c=o||r||e?.desktop?.state===`installing`,[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=e?.available;(0,_.useEffect)(()=>{p?.how!==`restart`&&s(!1)},[p?.how,p?.version]);let m=p?p.how===`downloading`?`${p.version}:downloading`:p.version:``;if(!p||i===m&&!c)return null;let h=()=>{try{localStorage.setItem(qt,m)}catch{}a(m)},g=(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,disabled:c,title:`The app closes and comes back on it; your Claudes keep running`,onClick:()=>{s(!0),u(null),t().catch(e=>{s(!1),u(e.message)})},children:c?`Restarting…`:`Restart`}),v=(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:n,children:`What's new`}),y=(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:h,children:`Later`}),b=p.how===`downloading`&&typeof p.progress==`number`?p.progress:null;return(0,K.jsxs)(`div`,{className:`wd-update-strip`,role:`status`,"aria-label":`Update`,children:[c?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`Installing work `,p.version,`…`]}),(0,K.jsx)(Xt,{}),(0,K.jsx)(`span`,{className:`wd-update-sub`,children:`The app closes and comes back in a few seconds. Your Claudes keep running.`})]}):p.how===`downloading`&&b!==null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`Downloading work `,p.version,` · `,b,`%`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]}),(0,K.jsx)(Xt,{value:b}),(0,K.jsx)(`span`,{className:`wd-update-sub`,children:`You can keep working; it installs when you restart.`})]}):p.how===`downloading`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is out. The app gets it by itself and says when it's ready.`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]})]}):p.how===`restart`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is ready.`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y,g]}),(0,K.jsxs)(`span`,{className:`wd-update-sub`,children:[`The app closes and comes back on `,p.version,` in a few seconds. Your Claudes keep running.`]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is out.`]}),p.command&&(0,K.jsxs)(`span`,{className:`wd-update-command`,children:[(0,K.jsx)(`code`,{children:p.command}),(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>void navigator.clipboard.writeText(p.command).then(()=>f(!0),()=>u(`Couldn't copy to the clipboard`)),children:d?`Copied`:`Copy`})]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]})]}),l&&(0,K.jsx)(`span`,{className:`wd-repos-error`,role:`alert`,children:l})]})}function Xt({value:e=null}){return e===null?(0,K.jsx)(`span`,{className:`wd-update-bar wd-update-bar-moving`,role:`progressbar`,"aria-label":`In progress`,children:(0,K.jsx)(`i`,{})}):(0,K.jsx)(`span`,{className:`wd-update-bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,children:(0,K.jsx)(`i`,{style:{width:`${e}%`}})})}async function Zt(e){let t=await fetch(e,{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`${t.status} ${t.statusText} for ${e}`);return t.json()}async function Qt(e,t,n=`POST`){let r=await fetch(e,{method:n,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!r.ok){let t=await r.text().catch(()=>``);throw Error(t||`${r.status} ${r.statusText} for ${e}`)}return r.json()}function $t(e,t){return Zt(`/api/branch-check?target=${encodeURIComponent(e)}&branch=${encodeURIComponent(t)}`)}async function en(e,t){let n=`ref=${encodeURIComponent(e)}${t?`&target=${encodeURIComponent(t)}`:``}`,r=await fetch(`/api/pr-start?${n}`,{headers:{Accept:`application/json`}}),i=await r.json().catch(()=>({}));if(r.ok&&`pr`in i&&i.pr)return i.pr;throw Error(`error`in i&&i.error?i.error:`${r.status} ${r.statusText}`)}function tn(){return Zt(`/api/time`)}function nn(e){return Zt(`/api/time/${encodeURIComponent(e)}`)}async function rn(e,t){let n=await fetch(`/api/time/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`${n.status} ${n.statusText}`);return r}async function an(e){let t=await fetch(`/api/time/${encodeURIComponent(e)}/post`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}function on(){return Zt(`/api/time/graph`)}async function sn(e){let t=await fetch(`/api/time/graph/${e}`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}var cn=()=>sn(`connect`),ln=()=>sn(`disconnect`);async function un(e){let t=await fetch(`/api/time/${encodeURIComponent(e)}/rebuild`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}function dn(){return Zt(`/api/projects`)}function fn(){return Zt(`/api/prs`)}function pn(){return Zt(`/api/jira`)}function mn(e){let t=e.message;try{let e=JSON.parse(t);if(typeof e.error==`string`)return Error(e.error)}catch{}return e}function hn(){return Zt(`/api/jira/watch`)}function gn(e){return Qt(`/api/jira/watch`,{enabled:e},`PUT`).catch(e=>Promise.reject(mn(e)))}function _n(e,t){return Qt(`/api/jira/watch/${encodeURIComponent(e)}/start`,{target:t}).catch(e=>Promise.reject(mn(e)))}function vn(e){return Qt(`/api/jira/watch/${encodeURIComponent(e)}/dismiss`,{}).catch(e=>Promise.reject(mn(e)))}function yn(){return Zt(`/api/tasks`)}function bn(e,t){return Qt(`/api/tasks`,{text:e,link:t})}function xn(e,t){return Qt(`/api/tasks/${e}`,t,`PATCH`)}function Sn(e){return Qt(`/api/tasks/${e}`,{},`DELETE`)}function Cn(e){return Qt(`/api/worktrees`,e)}async function wn(e,t={}){try{return await Qt(`/api/sessions/${encodeURIComponent(e)}/worktree`,t,`DELETE`)}catch(e){if(e instanceof Error&&/"error"\s*:\s*"unknown session"/.test(e.message))return{ok:!0,worktreeRemoved:!1,alreadyGone:!0};throw e}}function Tn(e){return Qt(`/api/sessions/${encodeURIComponent(e)}/open-terminal`,{})}function En(e,t){return Qt(`/api/sessions/${encodeURIComponent(e)}/open-editor`,t??{})}var Dn=class extends Error{sessions;constructor(e,t=[]){super(e),this.sessions=t}};async function On(e,t,n){let r=await fetch(t,{method:e,headers:{"Content-Type":`application/json`},...n===void 0?{}:{body:JSON.stringify(n)}});if(r.ok)return;let i=await r.json().catch(()=>({}));throw new Dn(i.error??`${r.status} ${r.statusText}`,i.sessions??[])}function kn(){return Zt(`/api/repos`)}var An=(e,t)=>On(`POST`,`/api/repos`,{alias:e,path:t}),jn=(e,t=!1)=>On(`DELETE`,`/api/repos/${encodeURIComponent(e)}${t?`?force=1`:``}`),Mn=(e,t)=>On(`POST`,`/api/repos/ignore`,{path:e,ignored:t}),Nn=(e,t)=>On(`POST`,`/api/repos/roots`,{path:e,on:t}),Pn=(e,t,n)=>On(`POST`,`/api/groups`,{name:e,members:t,creating:n}),Fn=(e,t=!1)=>On(`DELETE`,`/api/groups/${encodeURIComponent(e)}${t?`?force=1`:``}`);function In(e=!1){return Zt(`/api/setup${e?`?fresh=1`:``}`)}async function Ln(e,t){let n=await fetch(`/api/setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({worktreesRoot:e,reposFolder:t})});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error??`${n.status} saving folders`)}function Rn(){return Zt(`/api/updates`)}async function zn(e,t={}){let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`${n.status} ${n.statusText}`);return r}var Bn=()=>zn(`/api/updates/check`),Vn=()=>zn(`/api/updates/restart`),Hn=e=>zn(`/api/updates/seen`,{version:e});function Un(){return Zt(`/api/agents`)}var Wn=e=>zn(`/api/agents/restart`,e);function Gn(){return Zt(`/api/updates/notes`)}function Kn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qn=Kn();function Jn(e){qn=e}var Yn={exec:()=>null};function Xn(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Qn.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Zn=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Qn={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xn(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Xn(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Xn(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xn(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Xn(e=>RegExp(`^ {0,${e}}(?:</?(?:${pr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:Xn(e=>RegExp(`^ {0,${e}}>`))},$n=/^(?:[ \t]*(?:\n|$))+/,er=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ir=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,or=q(ar).replace(/bull/g,ir).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),sr=q(ar).replace(/bull/g,ir).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),cr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,lr=/^[^\n]+/,ur=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dr=q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ur).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fr=q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ir).getRegex(),pr=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,mr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hr=q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,mr).replace(`tag`,pr).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gr=e=>q(cr).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex(),_r=gr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),vr=gr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),yr={blockquote:q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,vr).getRegex(),code:er,def:dr,fences:tr,heading:rr,hr:nr,html:hr,lheading:or,list:fr,newline:$n,paragraph:_r,table:Yn,text:lr},br=q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex(),xr={...yr,lheading:sr,table:br,paragraph:q(cr).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,br).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex()},Sr={...yr,html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,mr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Yn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:q(cr).replace(`hr`,nr).replace(`heading`,` *#{1,6} *[^
|
|
13
|
+
`).toLowerCase().replace(/\\/g,`/`);return n.every(e=>r.includes(e))}function wt(e,t,n){let r=e.isGroup?n?.(e.target):void 0,i=t=>t.branch===e.branch||(e.onOtherBranch??[]).some(e=>e.repo===t.repoAlias&&e.branch===t.branch);return t.filter(t=>i(t)&&(t.repoAlias===e.target||e.isGroup&&(!r||r.includes(t.repoAlias))))}function Tt(e){let t=e.diffStat;return!t||t.added===0&&t.deleted===0&&t.files===0?null:`+${t.added} −${t.deleted}`}var Et=12,Dt=30,Ot=e=>e.titleIsYours&&e.title?e.title:e.branch||e.target;function kt(e,t){let n=t.trim().toLowerCase(),r=(e,t)=>et(t).localeCompare(et(e));if(!n)return e.filter(e=>!e.archivedAt).sort(r).slice(0,Et);let i=n.split(/\s+/),a=e=>{let t=[Ot(e),e.branch,e.title??``].map(e=>e.toLowerCase());if(t.some(e=>e===n))return 0;let r=t.flatMap(e=>[e,...e.split(/[/\-_ ]/)]);return i.every(e=>r.some(t=>t.startsWith(e)))?1:2};return e.filter(e=>Ct(e,n)).sort((e,t)=>Number(!!e.archivedAt)-Number(!!t.archivedAt)||a(e)-a(t)||r(e,t)).slice(0,Dt)}var At=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),jt=o(((e,t)=>{t.exports=At()})),K=jt();function Mt({kind:e,labelled:t=!1,muted:n=!1}){let r=t?{role:`img`,"aria-label":nt[e],title:`${nt[e]}: ${rt[e]}`}:{"aria-hidden":!0};return(0,K.jsx)(`span`,{className:`wd-rail-dot wd-rail-dot-${e} wd-status-icon${n?` wd-status-icon-muted`:``}`,...r,children:(0,K.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,focusable:`false`,children:Pt[e]})})}var Nt=`var(--status-icon-cut, var(--bg))`,Pt={needs_input:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsx)(`path`,{d:`M8 4.3v4.4`,stroke:Nt,strokeWidth:`1.9`,strokeLinecap:`round`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`11.4`,r:`1.1`,fill:Nt})]}),done:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsx)(`path`,{d:`M4.8 8.3l2.1 2.1 4.3-4.5`,fill:`none`,stroke:Nt,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),working:(0,K.jsxs)(`g`,{className:`wd-status-spin`,children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.6`,fill:`none`,stroke:`currentColor`,strokeOpacity:`0.25`,strokeWidth:`2`}),(0,K.jsx)(`path`,{d:`M8 2.4a5.6 5.6 0 0 1 5.6 5.6`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),review:(0,K.jsx)(`path`,{d:`M3 3.2h10a1.6 1.6 0 0 1 1.6 1.6v5.2a1.6 1.6 0 0 1-1.6 1.6H7.4L4.3 14v-2.4H3A1.6 1.6 0 0 1 1.4 10V4.8A1.6 1.6 0 0 1 3 3.2z`,fill:`currentColor`}),pr:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`7`,fill:`currentColor`}),(0,K.jsxs)(`g`,{fill:`none`,stroke:Nt,strokeWidth:`1.3`,strokeLinecap:`round`,children:[(0,K.jsx)(`circle`,{cx:`5.4`,cy:`4.7`,r:`1.2`}),(0,K.jsx)(`circle`,{cx:`5.4`,cy:`11.3`,r:`1.2`}),(0,K.jsx)(`circle`,{cx:`10.6`,cy:`11.3`,r:`1.2`}),(0,K.jsx)(`path`,{d:`M5.4 5.9v4.2M10.6 10.1V6.8a1.5 1.5 0 0 0-1.5-1.5H7.5`})]})]}),in_review:(0,K.jsx)(`path`,{d:`M4.3 2.4h7.4M4.3 13.6h7.4M5.2 2.4c0 3.2 5.6 3.4 5.6 5.6s-5.6 2.4-5.6 5.6M10.8 2.4c0 3.2-5.6 3.4-5.6 5.6s5.6 2.4 5.6 5.6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),quiet:(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),active:(0,K.jsx)(`path`,{d:`M1.5 8.5h3l1.8-4.2 3.2 8 1.9-3.8h3.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),open:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`})]}),recent:(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`}),stale:(0,K.jsx)(`path`,{d:`M10.6 2.2a6 6 0 1 0 3.2 9.6A5 5 0 0 1 10.6 2.2z`,fill:`currentColor`})},Ft=`[role="dialog"]:not([data-popover]), [role="alertdialog"], [aria-modal="true"], [role="menu"]`;function It(e=document){return e.querySelector(Ft)!==null}function Lt({sessions:e,onOpen:t,onClose:n}){let[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(0),s=(0,_.useId)(),c=(0,_.useRef)(null),l=(0,_.useMemo)(()=>kt(e,r),[e,r]);(0,_.useEffect)(()=>c.current?.focus(),[]),(0,_.useEffect)(()=>o(0),[r]);let u=e=>{e&&(n(!0),t(e.id))};return(0,K.jsx)(`div`,{className:`wd-switcher-backdrop`,onMouseDown:e=>e.target===e.currentTarget&&n(!1),children:(0,K.jsxs)(`div`,{className:`wd-switcher`,role:`dialog`,"aria-modal":`true`,"aria-label":`Go to a session`,children:[(0,K.jsx)(`input`,{ref:c,className:`wd-switcher-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":s,"aria-activedescendant":l[a]?`${s}-${a}`:void 0,placeholder:`Go to a session: name, branch, repo, Jira key…`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),o(e=>Math.min(e+1,l.length-1))):e.key===`ArrowUp`?(e.preventDefault(),o(e=>Math.max(e-1,0))):e.key===`Enter`?(e.preventDefault(),u(l[a])):e.key===`Escape`?(e.preventDefault(),n(!1)):e.key===`Tab`&&e.preventDefault()}}),(0,K.jsxs)(`ul`,{id:s,className:`wd-switcher-list`,role:`listbox`,children:[l.length===0&&(0,K.jsxs)(`li`,{className:`wd-switcher-empty`,children:[`No session matches “`,r.trim(),`”.`]}),l.map((e,t)=>(0,K.jsxs)(`li`,{id:`${s}-${t}`,role:`option`,"aria-selected":t===a,className:`wd-switcher-item`+(t===a?` wd-switcher-item-active`:``),onMouseDown:t=>{t.preventDefault(),u(e)},onMouseEnter:()=>o(t),children:[(0,K.jsx)(Mt,{kind:tt(e)}),(0,K.jsx)(`span`,{className:`wd-switcher-name`,children:Ot(e)}),(0,K.jsxs)(`span`,{className:`wd-switcher-sub`,children:[e.target,Ot(e)===e.branch?``:` · ${e.branch}`,e.archivedAt?` · archived`:``]})]},e.id))]}),(0,K.jsxs)(`p`,{className:`wd-switcher-hint`,children:[(0,K.jsx)(`kbd`,{children:`↑`}),` `,(0,K.jsx)(`kbd`,{children:`↓`}),` to move · `,(0,K.jsx)(`kbd`,{children:`Enter`}),` to open · `,(0,K.jsx)(`kbd`,{children:`Esc`}),` to close`]})]})})}function Rt(){let[e,t]=(0,_.useState)(!1),n=(0,_.useRef)(!1),r=(0,_.useRef)(null),i=(0,_.useCallback)(e=>{n.current=!1,t(!1);let i=r.current;r.current=null,!e&&i?.isConnected&&setTimeout(()=>i.focus(),0)},[]);return(0,_.useEffect)(()=>{let e=e=>{if(!(!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`p`)){if(e.preventDefault(),e.stopPropagation(),n.current)return i(!1);It()||(r.current=document.activeElement,n.current=!0,t(!0))}};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[i]),{open:e,close:i}}var zt={"tab-term":{key:`1`,label:`Terminal tab`},"tab-diff":{key:`2`,label:`Diff tab`},"tab-pr":{key:`3`,label:`PR tab`},"tab-code":{key:`4`,label:`Code tab`},timeline:{key:`l`,label:`Timeline (how it got here)`},archive:{key:`e`,label:`Archive (Restore when archived)`},snooze:{key:`z`,label:`Snooze…`},block:{key:`b`,label:`Blocked by…`},menu:{key:`.`,label:`Its ⋯ menu`},prompt:{key:`p`,label:`Send a prompt…`},catchup:{key:`r`,label:`Catch me up`},notes:{key:`n`,shift:!0,label:`Notes`},ship:{key:`s`,shift:!0,label:`Ship (push, PR, merge)…`},terminal:{key:`t`,shift:!0,label:`Open in a terminal`},reconnect:{key:`r`,shift:!0,label:`Reconnect its terminal`},editor:{key:`o`,label:`Open in editor`},copy:{key:`y`,label:`Copy branch name`},fork:{key:`f`,label:`Fork…`},dev:{key:`d`,shift:!0,label:`Start / stop the dev server`},delete:{key:`Delete`,shift:!0,label:`Delete…`}};function Bt(e){if(e.ctrlKey||e.metaKey||e.altKey)return null;let t=e.key.length===1?e.key.toLowerCase():e.key;for(let[n,r]of Object.entries(zt))if(r.key===t&&!!r.shift==!!e.shiftKey)return n;return null}function Vt(e){let t=e.key===`Delete`?`Del`:e.key;return e.shift?`⇧${t.length===1?t.toUpperCase():t}`:t}var Ht=e=>Vt(zt[e]);function Ut(){return[{title:`Anywhere`,rows:[{keys:`c`,label:`New worktree`},{keys:`n`,label:`Next session that wants you (next in the review queue)`},{keys:`j / k`,label:`Next / previous session in the list on the left`},{keys:`Alt+1…9`,label:`Open the first nine sessions on the left`},{keys:`/`,label:`Search sessions`},{keys:`Ctrl+P`,label:`Switch to a session by name`},{keys:`Ctrl+K`,label:`Ask (the assistant)`},{keys:`?`,label:`These shortcuts`}]},{title:`Go to`,rows:[{keys:`g i`,label:`Inbox`},{keys:`g s`,label:`Sessions`},{keys:`g d`,label:`Today`},{keys:`g w`,label:`Start`},{keys:`g j`,label:`Jira`},{keys:`g h`,label:`Time (hours per ticket)`},{keys:`g r`,label:`Repos & groups`},{keys:`g c`,label:`Clean up`},{keys:`g t`,label:`Tasks (open / close)`}]},{title:`The open session`,rows:[...Object.values(zt).map(e=>({keys:Vt(e),label:e.label})),{keys:`F2`,label:`Rename`},{keys:`Ctrl+T`,label:`Search its code: types and members, files, text (in the app; in a browser, the Code tab's button)`},{keys:`Alt+↑ / ↓`,label:`Move it up / down the list (on its row)`}]},{title:`The diff`,rows:[{keys:`] / [`,label:`Next / previous comment`}]}]}var Wt=`work:session-action`;function Gt(e,t,n){let r=!t.archived;switch(e){case`tab-term`:return n.tab(`term`);case`tab-diff`:return n.tab(`diff`);case`tab-pr`:return n.tab(`pr`);case`tab-code`:return n.tab(`code`);case`archive`:return n.setArchived(r);case`snooze`:return r?n.snoozeMenu():void 0;case`block`:return r?n.blockBy():void 0;case`editor`:return r?n.openEditor():void 0;case`copy`:return n.copyBranch();case`fork`:return r?n.fork():void 0;case`delete`:return n.remove();default:return n.header(e)}}function Kt({onClose:e}){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let n=t=>t.key===`Escape`&&e(),r=n=>{t.current&&!t.current.contains(n.target)&&e()};return window.addEventListener(`keydown`,n),window.addEventListener(`mousedown`,r),()=>{window.removeEventListener(`keydown`,n),window.removeEventListener(`mousedown`,r)}},[e]),(0,K.jsxs)(`div`,{ref:t,className:`wd-shortcuts`,role:`dialog`,"data-popover":!0,"aria-label":`Keyboard shortcuts`,children:[(0,K.jsxs)(`header`,{className:`wd-shortcuts-head`,children:[(0,K.jsx)(`h2`,{children:`Keyboard shortcuts`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-modal-close`,onClick:e,"aria-label":`Close`,children:`×`})]}),(0,K.jsx)(`p`,{className:`wd-shortcuts-note`,children:`Not while typing in a field or a terminal, nor with a dialog open.`}),(0,K.jsx)(`div`,{className:`wd-shortcuts-groups`,children:Ut().map(e=>(0,K.jsxs)(`section`,{className:`wd-shortcuts-group`,children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:e.title}),(0,K.jsx)(`dl`,{children:e.rows.map(e=>(0,K.jsxs)(`div`,{className:`wd-shortcuts-row`,children:[(0,K.jsx)(`dt`,{children:(0,K.jsx)(`kbd`,{children:e.keys})}),(0,K.jsx)(`dd`,{children:e.label})]},e.keys+e.label))})]},e.title))})]})}var qt=`work:update-later`;function Jt(){try{return localStorage.getItem(qt)}catch{return null}}function Yt({updates:e,onRestart:t,onWhatsNew:n,restarting:r=!1}){let[i,a]=(0,_.useState)(Jt),[o,s]=(0,_.useState)(!1),c=o||r||e?.desktop?.state===`installing`,[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=e?.available;(0,_.useEffect)(()=>{p?.how!==`restart`&&s(!1)},[p?.how,p?.version]);let m=p?p.how===`downloading`?`${p.version}:downloading`:p.version:``;if(!p||i===m&&!c)return null;let h=()=>{try{localStorage.setItem(qt,m)}catch{}a(m)},g=(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,disabled:c,title:`The app closes and comes back on it; your Claudes keep running`,onClick:()=>{s(!0),u(null),t().catch(e=>{s(!1),u(e.message)})},children:c?`Restarting…`:`Restart`}),v=(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:n,children:`What's new`}),y=(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:h,children:`Later`}),b=p.how===`downloading`&&typeof p.progress==`number`?p.progress:null;return(0,K.jsxs)(`div`,{className:`wd-update-strip`,role:`status`,"aria-label":`Update`,children:[c?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`Installing work `,p.version,`…`]}),(0,K.jsx)(Xt,{}),(0,K.jsx)(`span`,{className:`wd-update-sub`,children:`The app closes and comes back in a few seconds. Your Claudes keep running.`})]}):p.how===`downloading`&&b!==null?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`Downloading work `,p.version,` · `,b,`%`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]}),(0,K.jsx)(Xt,{value:b}),(0,K.jsx)(`span`,{className:`wd-update-sub`,children:`You can keep working; it installs when you restart.`})]}):p.how===`downloading`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is out. The app gets it by itself and says when it's ready.`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]})]}):p.how===`restart`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is ready.`]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y,g]}),(0,K.jsxs)(`span`,{className:`wd-update-sub`,children:[`The app closes and comes back on `,p.version,` in a few seconds. Your Claudes keep running.`]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-update-text`,children:[`work `,p.version,` is out.`]}),p.command&&(0,K.jsxs)(`span`,{className:`wd-update-command`,children:[(0,K.jsx)(`code`,{children:p.command}),(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>void navigator.clipboard.writeText(p.command).then(()=>f(!0),()=>u(`Couldn't copy to the clipboard`)),children:d?`Copied`:`Copy`})]}),(0,K.jsxs)(`span`,{className:`wd-update-actions`,children:[v,y]})]}),l&&(0,K.jsx)(`span`,{className:`wd-repos-error`,role:`alert`,children:l})]})}function Xt({value:e=null}){return e===null?(0,K.jsx)(`span`,{className:`wd-update-bar wd-update-bar-moving`,role:`progressbar`,"aria-label":`In progress`,children:(0,K.jsx)(`i`,{})}):(0,K.jsx)(`span`,{className:`wd-update-bar`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,children:(0,K.jsx)(`i`,{style:{width:`${e}%`}})})}async function Zt(e){let t=await fetch(e,{headers:{Accept:`application/json`}});if(!t.ok)throw Error(`${t.status} ${t.statusText} for ${e}`);return t.json()}async function Qt(e,t,n=`POST`){let r=await fetch(e,{method:n,headers:{"Content-Type":`application/json`},body:JSON.stringify(t??{})});if(!r.ok){let t=await r.text().catch(()=>``);throw Error(t||`${r.status} ${r.statusText} for ${e}`)}return r.json()}function $t(e,t){return Zt(`/api/branch-check?target=${encodeURIComponent(e)}&branch=${encodeURIComponent(t)}`)}async function en(e,t){let n=`ref=${encodeURIComponent(e)}${t?`&target=${encodeURIComponent(t)}`:``}`,r=await fetch(`/api/pr-start?${n}`,{headers:{Accept:`application/json`}}),i=await r.json().catch(()=>({}));if(r.ok&&`pr`in i&&i.pr)return i.pr;throw Error(`error`in i&&i.error?i.error:`${r.status} ${r.statusText}`)}function tn(){return Zt(`/api/time`)}function nn(e){return Zt(`/api/time/${encodeURIComponent(e)}`)}async function rn(e,t){let n=await fetch(`/api/time/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`${n.status} ${n.statusText}`);return r}async function an(e){let t=await fetch(`/api/time/${encodeURIComponent(e)}/post`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}function on(){return Zt(`/api/time/graph`)}async function sn(e){let t=await fetch(`/api/time/graph/${e}`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}var cn=()=>sn(`connect`),ln=()=>sn(`disconnect`);async function un(e){let t=await fetch(`/api/time/${encodeURIComponent(e)}/rebuild`,{method:`POST`}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error??`${t.status} ${t.statusText}`);return n}function dn(){return Zt(`/api/projects`)}function fn(){return Zt(`/api/prs`)}function pn(){return Zt(`/api/jira`)}function mn(e){let t=e.message;try{let e=JSON.parse(t);if(typeof e.error==`string`)return Error(e.error)}catch{}return e}function hn(){return Zt(`/api/jira/watch`)}function gn(e){return Qt(`/api/jira/watch`,{enabled:e},`PUT`).catch(e=>Promise.reject(mn(e)))}function _n(e,t){return Qt(`/api/jira/watch/${encodeURIComponent(e)}/start`,{target:t}).catch(e=>Promise.reject(mn(e)))}function vn(e){return Qt(`/api/jira/watch/${encodeURIComponent(e)}/dismiss`,{}).catch(e=>Promise.reject(mn(e)))}function yn(){return Zt(`/api/tasks`)}function bn(e,t){return Qt(`/api/tasks`,{text:e,link:t})}function xn(e,t){return Qt(`/api/tasks/${e}`,t,`PATCH`)}function Sn(e){return Qt(`/api/tasks/${e}`,{},`DELETE`)}function Cn(e){return Qt(`/api/worktrees`,e)}async function wn(e,t={}){try{return await Qt(`/api/sessions/${encodeURIComponent(e)}/worktree`,t,`DELETE`)}catch(e){if(e instanceof Error&&/"error"\s*:\s*"unknown session"/.test(e.message))return{ok:!0,worktreeRemoved:!1,alreadyGone:!0};throw e}}function Tn(e){return Qt(`/api/sessions/${encodeURIComponent(e)}/open-terminal`,{})}function En(e,t){return Qt(`/api/sessions/${encodeURIComponent(e)}/open-editor`,t??{})}var Dn=class extends Error{sessions;constructor(e,t=[]){super(e),this.sessions=t}};async function On(e,t,n){let r=await fetch(t,{method:e,headers:{"Content-Type":`application/json`},...n===void 0?{}:{body:JSON.stringify(n)}});if(r.ok)return;let i=await r.json().catch(()=>({}));throw new Dn(i.error??`${r.status} ${r.statusText}`,i.sessions??[])}function kn(){return Zt(`/api/repos`)}var An=(e,t)=>On(`POST`,`/api/repos`,{alias:e,path:t}),jn=(e,t=!1)=>On(`DELETE`,`/api/repos/${encodeURIComponent(e)}${t?`?force=1`:``}`),Mn=(e,t)=>On(`POST`,`/api/repos/ignore`,{path:e,ignored:t}),Nn=(e,t)=>On(`POST`,`/api/repos/roots`,{path:e,on:t}),Pn=(e,t,n)=>On(`POST`,`/api/groups`,{name:e,members:t,creating:n}),Fn=(e,t=!1)=>On(`DELETE`,`/api/groups/${encodeURIComponent(e)}${t?`?force=1`:``}`);function In(e=!1){return Zt(`/api/setup${e?`?fresh=1`:``}`)}async function Ln(e,t){let n=await fetch(`/api/setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({worktreesRoot:e,reposFolder:t})});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error??`${n.status} saving folders`)}function Rn(){return Zt(`/api/updates`)}async function zn(e,t={}){let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error??`${n.status} ${n.statusText}`);return r}var Bn=()=>zn(`/api/updates/check`),Vn=()=>zn(`/api/updates/restart`),Hn=e=>zn(`/api/updates/seen`,{version:e});function Un(){return Zt(`/api/agents`)}var Wn=e=>zn(`/api/agents/restart`,e);function Gn(){return Zt(`/api/updates/notes`)}function Kn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qn=Kn();function Jn(e){qn=e}var Yn={exec:()=>null};function Xn(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Qn.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Zn=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Qn={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xn(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Xn(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Xn(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xn(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Xn(e=>RegExp(`^ {0,${e}}(?:</?(?:${pr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:Xn(e=>RegExp(`^ {0,${e}}>`))},$n=/^(?:[ \t]*(?:\n|$))+/,er=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ir=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,or=q(ar).replace(/bull/g,ir).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),sr=q(ar).replace(/bull/g,ir).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),cr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,lr=/^[^\n]+/,ur=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dr=q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ur).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fr=q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ir).getRegex(),pr=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,mr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hr=q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,mr).replace(`tag`,pr).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gr=e=>q(cr).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex(),_r=gr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),vr=gr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),yr={blockquote:q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,vr).getRegex(),code:er,def:dr,fences:tr,heading:rr,hr:nr,html:hr,lheading:or,list:fr,newline:$n,paragraph:_r,table:Yn,text:lr},br=q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex(),xr={...yr,lheading:sr,table:br,paragraph:q(cr).replace(`hr`,nr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,br).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,pr).getRegex()},Sr={...yr,html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,mr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Yn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:q(cr).replace(`hr`,nr).replace(`heading`,` *#{1,6} *[^
|
|
14
14
|
]`).replace(`lheading`,or).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Cr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Tr=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Er=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Dr=/[\p{P}\p{S}]/u,Or=/[\s\p{P}\p{S}]/u,kr=/[^\s\p{P}\p{S}]/u,Ar=q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Or).getRegex(),jr=/[\p{Pi}\p{Ps}"']/u,Mr=/(?!~)[\p{P}\p{S}]/u,Nr=/(?!~)[\s\p{P}\p{S}]/u,Pr=/(?:[^\s\p{P}\p{S}]|~)/u,Fr=q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Zn?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Ir=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Lr=q(Ir,`u`).replace(/punct/g,Dr).getRegex(),Rr=q(Ir,`u`).replace(/punct/g,Mr).getRegex(),zr=q(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,jr).replace(/punct/g,Dr).getRegex(),Br=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Vr=q(Br,`gu`).replace(/notPunctSpace/g,kr).replace(/punctSpace/g,Or).replace(/punct/g,Dr).getRegex(),Hr=q(Br,`gu`).replace(/notPunctSpace/g,Pr).replace(/punctSpace/g,Nr).replace(/punct/g,Mr).getRegex(),Ur=q(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,kr).replace(/punctSpace/g,Or).replace(/punct/g,Dr).getRegex(),Wr=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,kr).replace(/punctSpace/g,Or).replace(/punct/g,Dr).getRegex(),Gr=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,kr).replace(/punctSpace/g,Or).replace(/punct/g,Dr).getRegex(),Kr=q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Dr).getRegex(),qr=q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,kr).replace(/punctSpace/g,Or).replace(/punct/g,Dr).getRegex(),Jr=q(/\\(punct)/,`gu`).replace(/punct/g,Dr).getRegex(),Yr=q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Xr=q(mr).replace(`(?:-->|$)`,`-->`).getRegex(),Zr=q(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Xr).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qr=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,$r=q(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Qr).getRegex(),ei=q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,$r).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ti=q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,$r).replace(`ref`,ur).getRegex(),ni=q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ur).getRegex(),ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,ii=q(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Qr).getRegex(),ai=q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ii).replace(`ref`,ri).getRegex()).replace(`nolink`,q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ri).getRegex()).getRegex(),oi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,si=q(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),ci={_backpedal:Yn,anyPunctuation:Jr,autolink:Yr,blockSkip:Fr,br:Tr,code:wr,del:Yn,delLDelim:Yn,delRDelim:Yn,emStrongLDelim:Lr,emStrongRDelimAst:Vr,emStrongRDelimUnd:Wr,escape:Cr,link:ei,nolink:ni,punctuation:Ar,reflink:ti,reflinkSearch:ai,tag:Zr,text:Er,url:Yn},li={...ci,emStrongLDelim:zr,emStrongRDelimAst:Ur,emStrongRDelimUnd:Gr,link:q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,$r).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,$r).getRegex()},ui={...ci,emStrongRDelimAst:Hr,emStrongLDelim:Rr,delLDelim:Kr,delRDelim:qr,url:q(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,si).replace(`protocol`,oi).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:q(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,oi).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},di={...ui,br:q(Tr).replace(`{2,}`,`*`).getRegex(),text:q(ui.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},fi={normal:yr,gfm:xr,pedantic:Sr},pi={normal:ci,gfm:ui,breaks:di,pedantic:li},mi={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},hi=e=>mi[e];function gi(e,t){if(t){if(Qn.escapeTest.test(e))return e.replace(Qn.escapeReplace,hi)}else if(Qn.escapeTestNoEncode.test(e))return e.replace(Qn.escapeReplaceNoEncode,hi);return e}function _i(e){return e.replace(Qn.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function vi(e){try{e=encodeURI(e).replace(Qn.percentDecode,`%`)}catch{return null}return e}function yi(e,t){let n=e.replace(Qn.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Qn.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Qn.slashPipe,`|`);return n}function bi(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function xi(e){let t=e.split(`
|
|
15
15
|
`),n=t.length-1;for(;n>=0&&Qn.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
16
16
|
`)}function Si(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function Ci(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function wi(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Ti(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function Ei(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
@@ -89,7 +89,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
89
89
|
`)+`
|
|
90
90
|
|
|
91
91
|
These will conflict when both merge.`}function vl({session:e,compact:t,quiet:n=!1}){let r=e.agents??e.claudes;if(!r||n&&!r.duplicate&&!r.inTerminal)return null;let i=gt(e),a=[r.inTerminal?`${r.inTerminal>1?`${r.inTerminal}× `:``}terminal`:``,r.inApp?`${r.inApp>1?`${r.inApp}× `:``}app`:``].filter(Boolean).join(` + `),o=r.duplicate?`More than one ${i} is running on this conversation. They would both write to it: close all but one (/exit in its terminal tab).`:`${i} is running (${r.busy?`busy`:`at its prompt`}) in ${a}.`;return r.duplicate?(0,K.jsxs)(`span`,{className:`wd-claudes wd-claudes-dup`,title:o,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:`⚠`}),` `,t?`2× ${i}`:`Two of ${i} on one conversation (${a})`]}):(0,K.jsx)(`span`,{className:`wd-claudes`+(r.busy?` wd-claudes-busy`:``),title:o,children:t?r.inTerminal?`▣ terminal`:`▣ app`:`Running in ${a}`})}function yl({session:e,onOpen:t}){let n=e.stackedOn,r=e.stackedChildren??0;return!n&&!r?null:(0,K.jsxs)(`span`,{className:`wd-stack`,title:`Stacked sessions: one made from another session's branch builds on it, and takes in its new commits (when idle and clean).`,children:[n&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:`⤷`}),` on`,` `,t?(0,K.jsx)(`button`,{type:`button`,className:`wd-overlap-link`,onClick:()=>t(n.id),children:n.title??n.branch}):(0,K.jsx)(`span`,{className:`wd-overlap-name`,children:n.title??n.branch})]}),n&&r>0&&` · `,r>0&&(0,K.jsxs)(`span`,{children:[r,` stacked on this`]})]})}function bl({session:e,onOpen:t}){let n=e.overlaps??[];if(n.length===0)return null;let r=n.reduce((e,t)=>e+t.count,0);return(0,K.jsxs)(`span`,{className:`wd-overlap`,title:_l(e),children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:`⚠`}),` Same files as`,` `,n.slice(0,2).map((e,n)=>(0,K.jsxs)(`span`,{children:[n>0&&`, `,t?(0,K.jsx)(`button`,{type:`button`,className:`wd-overlap-link`,onClick:()=>t(e.sessionId),children:e.branch}):(0,K.jsx)(`span`,{className:`wd-overlap-name`,children:e.branch})]},e.sessionId)),n.length>2&&` +${n.length-2}`,(0,K.jsxs)(`span`,{className:`wd-overlap-count`,children:[` `,`(`,r,` file`,r===1?``:`s`,`)`]})]})}function xl({session:e}){let t=tt(e),n=e.attention,r=Fs(n?n.since:et(e));return(0,K.jsxs)(`span`,{className:`wd-status-line wd-status-line-${t}`,title:lt(t),children:[(0,K.jsx)(Mt,{kind:t}),(0,K.jsx)(`span`,{className:`wd-status-label`,children:nt[t]}),r&&(0,K.jsxs)(`span`,{className:`wd-status-since`,children:[` · `,r]}),n?.stale&&(0,K.jsxs)(`span`,{className:`wd-status-since`,title:`No activity for 15 minutes`,children:[` `,`(quiet)`]}),n?.summary&&(0,K.jsxs)(`span`,{className:`wd-status-summary`,children:[` — `,n.summary]})]})}function Sl(e){let t=e.onOtherBranch??[];if(t.length===0)return null;let n=e=>e.noGit?`not a git checkout any more`:`on ${e.branch??`a detached HEAD`}`;return e.isGroup?t.map(e=>`${e.repo} ${n(e)}`).join(`, `):n(t[0])}function Cl({session:e}){let t=Sl(e);return t?(0,K.jsx)(`span`,{className:`wd-other-branch`,title:(e.onOtherBranch??[]).some(e=>e.noGit)?`Its folder has no git left in it: removing the worktree stopped halfway (a file in use). work tree ${e.target} ${e.branch} makes it again, with the files that were left.`:`Started on ${e.branch}; its worktree is ${t} now. Ship, CI and the diffs use the branch that's checked out.`,children:t}):null}function wl(){let[e,t]=(0,_.useState)(null),n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!e)return;let r=e=>e.key===`Escape`&&t(null),i=e=>{n.current&&!n.current.contains(e.target)&&t(null)};return window.addEventListener(`keydown`,r),window.addEventListener(`mousedown`,i),()=>{window.removeEventListener(`keydown`,r),window.removeEventListener(`mousedown`,i)}},[e]),(0,K.jsxs)(`div`,{className:`wd-legend`,ref:n,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-dash-rail-new wd-legend-toggle`,"aria-expanded":!!e,"aria-controls":`wd-legend-panel`,title:`What the icons mean`,"aria-label":`What the icons mean`,onClick:n=>{if(e)return t(null);let r=n.currentTarget.getBoundingClientRect();t({top:r.bottom+6,left:Math.max(8,r.left-8)})},children:`?`}),e&&(0,K.jsxs)(`div`,{id:`wd-legend-panel`,className:`wd-legend-panel`,role:`dialog`,"data-popover":!0,"aria-label":`What the icons mean`,style:{top:e.top,left:e.left},children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`What the icons mean`}),(0,K.jsx)(`ul`,{className:`wd-legend-list`,children:it.map(e=>(0,K.jsxs)(`li`,{className:`wd-legend-row`,children:[(0,K.jsx)(Mt,{kind:e}),(0,K.jsx)(`span`,{className:`wd-legend-name`,children:nt[e]}),(0,K.jsx)(`span`,{className:`wd-legend-meaning`,children:rt[e]})]},e))}),(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`On a row`}),(0,K.jsxs)(`ul`,{className:`wd-legend-list wd-legend-marks`,children:[(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`b`,{children:`Bold`}),` — it wants you (needs input, done, review comments, its pull request). The Inbox lists these in order;`,` `,(0,K.jsx)(`kbd`,{children:`n`}),` jumps to the next.`]}),(0,K.jsxs)(`li`,{children:[`On the right: `,(0,K.jsx)(`span`,{className:`wd-rail-slot-needs`,children:`4m`}),` waiting that long for you ·`,` `,(0,K.jsx)(`span`,{className:`wd-rail-slot-done`,children:`4m`}),` finished that long ago · `,(0,K.jsx)(`span`,{className:`wd-rail-slot-review`,children:`2`}),` `,`unresolved review comments · `,(0,K.jsx)(`span`,{className:`wd-rail-slot-review`,children:`merge`}),` its PR is ready to merge`]}),(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`wd-pr-chip`,children:`#212`}),` an open pull request (click to open it)`]}),(0,K.jsxs)(`li`,{children:[(0,K.jsx)(`span`,{className:`wd-legend-overlap`,children:`⚠`}),` another session changes the same files`]})]}),(0,K.jsxs)(`p`,{className:`wd-legend-keys`,children:[(0,K.jsx)(`kbd`,{children:`?`}),` lists every keyboard shortcut.`]})]})]})}function Tl(e,t=new Date){let n=e.agents??e.claudes,r=[e.snoozed?`snoozed ${Ms(e.snoozed,t)}`:``,e.blockedBy?.length?`waits on ${e.blockedBy.map(e=>e.label).join(`, `)}`:``,e.prStage?.text??``,e.pendingForClaudeCount?`${e.pendingForClaudeCount} waiting for Claude`:``,e.hasNote?`has notes`:``,n?.duplicate?`two Claudes on one conversation`:n?.inTerminal?`running in a terminal`:``].filter(Boolean);return r.length?`\n${r.join(` · `)}`:``}function El(e,t){let n=e.attention?.since??e.lastAccessedAt;return e.snoozed?{text:`snoozed`,cls:`wd-rail-slot-snoozed`}:t===`needs_input`?{text:Fs(n),cls:`wd-rail-slot-needs`}:t===`done`?{text:Fs(n),cls:`wd-rail-slot-done`}:t===`working`?{text:Fs(n),cls:`wd-rail-slot-working`}:t===`review`?{text:String(e.openReviewThreads),cls:`wd-rail-slot-review`}:t===`pr`?{text:e.prStage.kind===`ready`?`merge`:e.prStage.kind===`conflict`?`conflict`:`CI`,cls:`wd-rail-slot-review`}:{text:Fs(et(e)),cls:``}}function Dl({sessions:e,activeSessionId:t,onSelect:n,onNewWorktree:r,prsFor:i,order:a,onReorder:o,onRename:s,menuFor:c,layout:l=ft,onPlace:u,onSections:d,onShownChange:f}){let[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(``),v=(0,_.useRef)(null),y=(0,_.useRef)(null),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(null),[E,D]=(0,_.useState)(null),[O,k]=(0,_.useState)(null),[A,j]=(0,_.useState)(null),[M,ee]=(0,_.useState)(kl),N=h.trim()!==``,P=(0,_.useMemo)(()=>xt(e,Date.now(),[]),[e]),F=P.current.length+P.older.length>0,{groups:I,hidden:te}=(0,_.useMemo)(()=>{if(N){let{current:t,older:n}=xt(e,Date.now(),a??[]);return{groups:[{key:`search`,title:null,sessions:[...t,...n].filter(e=>Ct(e,h))}],hidden:0}}return St(e,{order:a,layout:l,activeId:t,showOlder:p})},[e,a,l,t,p,N,h]),ne=e=>M.has(e.key)?e.sessions.filter(e=>e.id===t):e.sessions,L=I.flatMap(ne),re=new Map(I.flatMap(e=>e.sessions.map(t=>[t.id,e]))),R=!!o&&!N,ie=!!u&&!N,ae=e=>ee(t=>{let n=new Set(t);return n.delete(e)||n.add(e),Al(n),n});(0,_.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey)return;let t=document.activeElement;(!t||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)&&(It()||document.querySelector(`[role="menu"]`)||(e.preventDefault(),v.current?.focus()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let oe=(0,_.useRef)(L);oe.current=L,(0,_.useEffect)(()=>{let e=e=>{if(!e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=/^Digit([1-9])$/.exec(e.code)?.[1];if(!t)return;let r=document.activeElement,i=!!r?.classList.contains(`xterm-helper-textarea`);if(r&&!i&&(r.tagName===`INPUT`||r.tagName===`TEXTAREA`||r.isContentEditable)||It()||document.querySelector(`[role="menu"]`))return;let a=oe.current[Number(t)-1];a&&(e.preventDefault(),e.stopPropagation(),n(a.id))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[n]),(0,_.useEffect)(()=>{if(!s||!t)return;let e=e=>{if(e.key!==`F2`||e.ctrlKey||e.metaKey||e.altKey||e.defaultPrevented)return;let n=document.activeElement;(!n||n.tagName!==`INPUT`&&n.tagName!==`TEXTAREA`&&!n.isContentEditable)&&(It()||document.querySelector(`[role="menu"]`)||(e.preventDefault(),T(t)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,t]);let se=L.map(e=>e.id),ce=se.join(`,`);(0,_.useEffect)(()=>{f?.(ce?ce.split(`,`):[])},[ce,f]);let z=(e,t)=>{R&&o?.(dt(se,e,t,a??[]))},le=(e,t)=>{ie&&t&&re.get(e)?.key!==t.key&&u?.(e,mt(t))},B=()=>{x(null),C(null)},V=()=>{if(b&&S){if(`group`in S)le(b,I.find(e=>e.key===S.group));else if(S.id!==b){le(b,re.get(S.id));let e=se.indexOf(S.id);z(b,S.before?S.id:se[e+1]??null)}}B()},H=async e=>{let t=A;if(!t||!d||!e)return;if(t.kind===`rename`)return d({op:`rename`,id:t.sectionId,name:e});let n=ht();await d({op:`add`,id:n,name:e}),t.sessionId&&u?.(t.sessionId,{pinned:!1,section:n})},ue=(e,t)=>void d?.({op:`move`,id:e,by:t}).catch(()=>{}),de=(e,r)=>{let a=tt(e),o=e.id===t,l=e.titleIsYours&&!!e.title,d=l?e.title:e.branch||e.target,f=Sl(e),p=il(e),m=El(e,a),h=i?.(e)??[],g=e.attention?.summary;if(s&&w===e.id)return(0,K.jsx)(`li`,{children:(0,K.jsx)(Ml,{session:e,dot:(0,K.jsx)(Mt,{kind:a}),onDone:()=>T(null),onSave:t=>s(e.id,t)})},e.id);let _=S&&`id`in S&&S.id===e.id&&b!==e.id?S:null;return(0,K.jsx)(`li`,{draggable:R||ie,className:(b===e.id?`wd-dash-rail-dragging`:``)+(_?_.before?` wd-dash-rail-drop-before`:` wd-dash-rail-drop-after`:``),onDragStart:t=>{x(e.id),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,e.id)},onDragOver:t=>{if(!b)return;t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY<n.top+n.height/2;(!_||_.before!==r)&&C({id:e.id,before:r})},onDragEnd:B,children:(0,K.jsxs)(`button`,{type:`button`,className:`wd-dash-rail-item`+(o?` wd-dash-rail-item-active`:``)+((a===`needs_input`||a===`done`||a===`review`)&&!e.snoozed?` wd-dash-rail-item-unseen`:``),onClick:()=>n(e.id),onContextMenu:t=>{(s||c||u)&&(t.preventDefault(),D({id:e.id,x:t.clientX,y:t.clientY}))},onKeyDown:t=>{if(s&&t.key===`F2`){t.preventDefault(),T(e.id);return}if(!R||!t.altKey||t.key!==`ArrowUp`&&t.key!==`ArrowDown`)return;t.preventDefault();let n=se.indexOf(e.id);t.key===`ArrowUp`&&n>0&&z(e.id,se[n-1]),t.key===`ArrowDown`&&n<se.length-1&&z(e.id,se[n+2]??null)},title:`${e.target} · ${e.branch}${f?` (${f})`:``}${e.stackedOn?` · stacked on ${e.stackedOn.branch}`:``}${p?` · ${p}`:``}${e.title?`\n${e.title}`:``}\n${nt[a]}`+(g?` — ${g}`:``)+Tl(e)+(r<9?`\nAlt+${r+1}`:``),children:[(0,K.jsx)(Mt,{kind:a,labelled:!0,muted:!!e.snoozed}),(0,K.jsxs)(`span`,{className:`wd-dash-rail-lines`,children:[(0,K.jsxs)(`span`,{className:`wd-dash-rail-line`,children:[(0,K.jsx)(`span`,{className:`wd-dash-rail-name`,children:d}),(0,K.jsx)(`span`,{className:`wd-dash-rail-slot `+m.cls,children:m.text})]}),(0,K.jsxs)(`span`,{className:`wd-dash-rail-line wd-dash-rail-sub`,children:[(0,K.jsxs)(`span`,{className:`wd-dash-rail-summary`,children:[e.target,l?` · ${e.branch}`:``]}),(0,K.jsx)(pl,{session:e,prs:h})]})]})]})},e.id)},U=0;return(0,K.jsxs)(`aside`,{className:`wd-dash-rail`,role:`navigation`,"aria-label":`Sessions`,children:[(0,K.jsxs)(`header`,{className:`wd-dash-rail-header`,children:[F&&(0,K.jsx)(`input`,{ref:v,className:`wd-dash-rail-search`,type:`search`,placeholder:`Search sessions /`,title:`Filter this list (/). Ctrl+P jumps to any session from anywhere, a terminal included; Alt+1…9 opens the first nine rows.`,"aria-label":`Search sessions`,value:h,onChange:e=>g(e.target.value),onKeyDown:e=>{e.key===`Escape`?(g(``),e.currentTarget.blur()):e.key===`Enter`&&L[0]?n(L[0].id):e.key===`ArrowDown`&&(e.preventDefault(),y.current?.querySelector(`.wd-dash-rail-item`)?.focus())}}),(0,K.jsx)(wl,{}),(0,K.jsx)(`button`,{type:`button`,className:`wd-dash-rail-new`,onClick:r,title:`New worktree`,"aria-label":`New worktree`,children:`+`})]}),N&&L.length===0&&(0,K.jsxs)(`p`,{className:`wd-dash-rail-empty`,children:[`No session matches “`,h.trim(),`”.`]}),F?(0,K.jsxs)(`ul`,{className:`wd-dash-rail-list`,ref:y,onDragOver:e=>{b&&S&&e.preventDefault()},onDragLeave:e=>{if(!b)return;let t=e.currentTarget.getBoundingClientRect();(e.clientX<=t.left||e.clientX>=t.right||e.clientY<=t.top||e.clientY>=t.bottom)&&C(null)},onDrop:e=>{e.preventDefault(),V()},children:[A?.kind===`new`&&(0,K.jsx)(`li`,{children:(0,K.jsx)(jl,{initial:``,placeholder:`New section name`,onSave:H,onDone:()=>j(null)})}),I.map(e=>{let t=M.has(e.key),n=ne(e),r=S&&`group`in S&&S.group===e.key;return[e.title!==null&&(A?.kind===`rename`&&A.sectionId===e.sectionId?(0,K.jsx)(`li`,{children:(0,K.jsx)(jl,{initial:e.title,placeholder:`Section name`,onSave:H,onDone:()=>j(null)})},`h:${e.key}`):(0,K.jsx)(`li`,{className:`wd-dash-rail-group`+(r?` wd-dash-rail-group-drop`:``),onDragOver:t=>{b&&ie&&(t.preventDefault(),r||C({group:e.key}))},children:(0,K.jsxs)(`button`,{type:`button`,className:`wd-dash-rail-group-toggle`,"aria-expanded":!t,onClick:()=>ae(e.key),onContextMenu:t=>{e.sectionId&&d&&(t.preventDefault(),k({id:e.sectionId,x:t.clientX,y:t.clientY}))},title:e.sectionId?`Fold or unfold; right-click to rename, move or remove it`:`Fold or unfold`,children:[(0,K.jsx)(`span`,{className:`wd-dash-rail-group-caret`,"aria-hidden":`true`,children:t?`▸`:`▾`}),(0,K.jsx)(`span`,{className:`wd-dash-rail-group-name`,children:e.title}),(0,K.jsx)(`span`,{className:`wd-dash-rail-group-count`,children:e.sessions.length})]})},`h:${e.key}`)),...n.map(e=>de(e,U++)),!t&&e.sessions.length===0&&(0,K.jsx)(`li`,{className:`wd-dash-rail-group-empty`,children:e.sectionId?`Drag a session here, or right-click one → Move to “${e.title}”.`:`Drag a session here to unpin it or take it out of its section.`},`e:${e.key}`)]}),te>0&&(0,K.jsx)(`li`,{className:`wd-dash-rail-overflow`,children:(0,K.jsxs)(`button`,{type:`button`,className:`wd-dash-rail-older`,onClick:()=>m(!0),title:`Sessions not entered in the last 14 days and not running`,children:[`+`,te,` older`]})}),p&&!N&&P.older.length>0&&(0,K.jsx)(`li`,{className:`wd-dash-rail-overflow`,children:(0,K.jsx)(`button`,{type:`button`,className:`wd-dash-rail-older`,onClick:()=>m(!1),children:`Hide older`})})]}):(0,K.jsx)(`p`,{className:`wd-dash-rail-empty`,children:`No worktrees yet. Click + to create one.`}),E&&(0,K.jsx)(ns,{x:E.x,y:E.y,onClose:()=>D(null),items:(()=>{let t=e.find(e=>e.id===E.id);if(!t)return[];let n=s?[{label:`Rename`,hint:`F2`,run:()=>T(E.id)}]:[],r=u?ll(t,l,{place:(e,t)=>u(e.id,t),newSection:e=>j({kind:`new`,sessionId:e.id})}):[],i=c?c(t).map((e,t)=>t===0?{...e,separated:!0}:e):[];return[...n,...r,...i]})()}),O&&(0,K.jsx)(ns,{x:O.x,y:O.y,onClose:()=>k(null),items:[{label:`Rename section`,run:()=>j({kind:`rename`,sectionId:O.id})},{label:`Move up`,run:()=>ue(O.id,-1)},{label:`Move down`,run:()=>ue(O.id,1)},{label:`New section…`,run:()=>j({kind:`new`,sessionId:null}),separated:!0},{label:`Remove section`,hint:`its sessions stay`,danger:!0,separated:!0,run:()=>void d?.({op:`remove`,id:O.id}).catch(()=>{})}]})]})}var Ol=`work-web:rail-collapsed`;function kl(){try{let e=JSON.parse(localStorage.getItem(Ol)??`[]`);return new Set(Array.isArray(e)?e.filter(e=>typeof e==`string`):[])}catch{return new Set}}function Al(e){try{localStorage.setItem(Ol,JSON.stringify([...e]))}catch{}}function jl({initial:e,placeholder:t,onSave:n,onDone:r}){let[i,a]=(0,_.useState)(e),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(null),u=()=>{let e=i.trim();if(!e)return r();s(!0),Promise.resolve(n(e)).then(r,e=>{s(!1),l(e.message)})};return(0,K.jsxs)(`div`,{className:`wd-dash-rail-group wd-dash-rail-group-naming`,children:[(0,K.jsx)(`input`,{className:`wd-dash-rail-rename`,autoFocus:!0,value:i,disabled:o,maxLength:40,placeholder:t,"aria-label":t,title:c??`Enter to save, Esc to cancel`,onChange:e=>a(e.target.value),onBlur:()=>!o&&r(),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),u()):e.key===`Escape`&&(e.preventDefault(),r())}}),c&&(0,K.jsxs)(`span`,{className:`wd-dash-rail-group-error`,children:[`⚠ `,c]})]})}function Ml({session:e,dot:t,onSave:n,onDone:r}){let[i,a]=(0,_.useState)(e.titleIsYours?e.title??``:``),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(null),u=()=>{s(!0),l(null),n(i.trim()).then(r,e=>{s(!1),l(e.message)})};return(0,K.jsxs)(`div`,{className:`wd-dash-rail-item wd-dash-rail-item-renaming`,children:[t,(0,K.jsxs)(`span`,{className:`wd-dash-rail-lines`,children:[(0,K.jsx)(`input`,{className:`wd-dash-rail-rename`,autoFocus:!0,value:i,disabled:o,placeholder:e.title??`Name this session`,"aria-label":`Name for ${e.branch||e.target}`,title:c??`Enter to save, Esc to cancel; empty goes back to the automatic name`,onChange:e=>a(e.target.value),onBlur:()=>!o&&r(),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),u()):e.key===`Escape`&&(e.preventDefault(),r())}}),(0,K.jsx)(`span`,{className:`wd-dash-rail-line wd-dash-rail-sub`,children:(0,K.jsx)(`span`,{className:`wd-dash-rail-summary`,children:c?`⚠ ${c}`:`${e.target} · ${e.branch}`})})]})]})}var Nl={storageKey:`work-web:sidebar-width`,cssVar:`--sidebar-width`,defaultPx:320,min:200,max:720,axis:`x`,label:`Resize sidebar`},Pl={storageKey:`work-web:rail-width`,cssVar:`--rail-width`,defaultPx:248,min:160,max:480,axis:`x`,label:`Resize session list`},Fl={storageKey:`work-web:comments-height`,cssVar:`--comments-height`,defaultPx:220,min:60,max:900,axis:`y`,invert:!0,label:`Resize comments panel`};function Il(e,t){return Math.max(e.min,Math.min(e.max,t))}function Ll(e){try{let t=localStorage.getItem(e.storageKey),n=t?Number(t):NaN;if(Number.isFinite(n)&&n>=e.min&&n<=e.max)return n}catch{}return e.defaultPx}function Rl(e){let[t,n]=(0,_.useState)(()=>Ll(e));return{size:t,setSize:(0,_.useCallback)(t=>{let r=Il(e,t);n(r);try{localStorage.setItem(e.storageKey,String(r))}catch{}},[e])}}function zl(){let{size:e,setSize:t}=Rl(Nl);return{width:e,setWidth:t}}function Bl({layoutRef:e,size:t,onCommit:n,spec:r=Nl}){let i=(0,_.useRef)(null),a=(0,_.useRef)(t),[o,s]=(0,_.useState)(!1);function c(t){let n=Il(r,t);a.current=n,e.current?.style.setProperty(r.cssVar,`${n}px`)}let l=e=>r.axis===`x`?e.clientX:e.clientY;function u(e){e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),i.current={pos:l(e),w:t},a.current=t,s(!0)}function d(e){if(!i.current)return;let t=l(e)-i.current.pos;c(i.current.w+(r.invert?-t:t))}function f(){i.current&&(i.current=null,s(!1),n(a.current))}return(0,_.useEffect)(()=>{if(!o)return;let e=document.body.style.userSelect,t=document.body.style.cursor;return document.body.style.userSelect=`none`,document.body.style.cursor=r.axis===`x`?`col-resize`:`row-resize`,()=>{document.body.style.userSelect=e,document.body.style.cursor=t}},[o,r.axis]),(0,K.jsx)(`div`,{className:`wd-resize-divider`+(r.axis===`y`?` wd-resize-divider-y`:``)+(o?` wd-resize-dragging`:``),role:`separator`,"aria-orientation":r.axis===`x`?`vertical`:`horizontal`,"aria-label":r.label,onPointerDown:u,onPointerMove:d,onPointerUp:f,onPointerCancel:f,onDoubleClick:()=>n(r.defaultPx),title:`Drag to resize, double-click to reset`})}function Vl({dev:e=!1,route:t,sessions:n,onSelectTab:r,onSelectSession:i,onHome:a,onNewWorktree:o,inboxCount:s,prsFor:c,onAssistant:l,assistantOpen:u,activity:d,help:f,tasks:p,sessionOrder:m,onReorderSessions:h,sessionMenu:g,railLayout:v,onPlaceSession:y,onRailSections:b,onRailShownChange:x,children:S}){let[C,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{w(!1)},[t.tab,t.sessionId,t.sessionSubTab]),(0,_.useEffect)(()=>{if(!C)return;let e=e=>{e.key===`Escape`&&w(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[C]);let{size:T,setSize:E}=Rl(Pl),D=(0,_.useRef)(null);return(0,K.jsxs)(`div`,{className:`wd-dash-layout`,children:[(0,K.jsx)(rl,{dev:e,active:t.tab,onSelect:r,onHome:a,inboxCount:s,onToggleRail:()=>w(e=>!e),railOpen:C,onAssistant:l,assistantOpen:u,activity:d,help:f,tasks:p}),(0,K.jsxs)(`div`,{ref:D,className:`wd-dash-body`+(C?` wd-dash-rail-open`:``),style:{[Pl.cssVar]:`${T}px`},children:[C&&(0,K.jsx)(`div`,{className:`wd-dash-rail-backdrop`,onClick:()=>w(!1),"aria-hidden":!0}),(0,K.jsx)(Dl,{sessions:n,activeSessionId:t.sessionId,onSelect:e=>{w(!1),i(e)},onNewWorktree:()=>{w(!1),o()},prsFor:c,onRename:_e,menuFor:g,layout:v,onPlace:y,onSections:b,onShownChange:x,order:m,onReorder:h}),(0,K.jsx)(Bl,{layoutRef:D,size:T,onCommit:E,spec:Pl}),(0,K.jsx)(`main`,{className:`wd-dash-main`,children:S})]})]})}function Hl(e,t){if(!e)return null;let n=e.schedules.find(e=>e.pausedUntil&&Date.parse(e.pausedUntil)>t);if(n)return`${n.label} is resting${n.pausedWhy?`: ${n.pausedWhy}`:``}`;let r=new Set;for(let t of e.recent){if(r.has(t.kind)||t.status===`skipped`)continue;r.add(t.kind);let n=!!e.lastOk?.[t.kind]||e.recent.some(e=>e.kind===t.kind&&e.status===`done`);if(t.status===`failed`&&n)return`${t.label} failed${t.summary?`: ${t.summary}`:``}`}return null}function Ul(e){let t=e?.running[0];if(!t)return`all quiet`;let n=t.progress&&t.progress.total>0?` ${t.progress.done}/${t.progress.total}`:``,r=(e?.running.length??0)>1?` (+${e.running.length-1} more)`:``;return`${t.label}${n}${r}`}var Wl=e=>e.notes.some(e=>e.level!==`info`);function Gl(e){let t=[];for(let n of e){let e=t[t.length-1];if(e&&e.kind===n.kind&&e.status===n.status&&!Wl(e)&&!Wl(n)){t[t.length-1]={...e,repeats:(e.repeats??0)+(n.repeats??0)+1};continue}t.push(n)}return t}function Kl(e,t){let n=Math.round((Date.parse(e)-t)/1e3);if(n<=0)return`now`;let r=Math.floor(n/60);return r>=60?`in ${Math.round(r/60)} h`:`in ${r}:${String(n%60).padStart(2,`0`)}`}var ql=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),Jl=e=>e>=6e4?`every ${Math.round(e/6e4)} min`:`every ${Math.round(e/1e3)} s`;function Yl({onOpenSession:e,load:t=I}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(()=>Date.now()),c=(0,_.useRef)(null),l=(0,_.useCallback)(()=>{t().then(r,()=>{})},[t]);(0,_.useEffect)(l,[l]),go(`/events`,{events:{"activity-changed":l},onOpen:l}),(0,_.useEffect)(()=>{if(!i)return;s(Date.now());let e=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(e)},[i]),(0,_.useEffect)(()=>{if(!i)return;let e=e=>e.key===`Escape`&&a(!1),t=e=>{c.current&&!c.current.contains(e.target)&&a(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[i]);let u=n?.running??[],d=Hl(n,Date.now()),f=d??Ul(n);return(0,K.jsxs)(`div`,{className:`wd-activity`,ref:c,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-activity-dot-btn`+(d?` wd-activity-attention`:``),"aria-expanded":i,"aria-label":`Background jobs: ${f}`,title:`Background jobs: ${f}
|
|
92
|
-
Click for what work does in the background, and what it decided`,onClick:()=>a(e=>!e),children:(0,K.jsx)(`span`,{className:`wd-activity-dot`+(u.length?` wd-activity-dot-busy`:``),"aria-hidden":!0})}),i&&(0,K.jsxs)(`div`,{className:`wd-activity-panel`,role:`dialog`,"data-popover":!0,"aria-label":`Background activity`,children:[(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Now`}),u.length===0?(0,K.jsx)(`p`,{className:`wd-activity-empty`,children:`Nothing running.`}):u.map(t=>(0,K.jsx)($l,{run:t,onOpenSession:e},t.id))]}),(n?.schedules.length??0)>0&&(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Coming up`}),(0,K.jsx)(`ul`,{className:`wd-activity-list`,children:n.schedules.map(e=>(0,K.jsx)(Xl,{s:e,now:o},e.kind))})]}),(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Recent`}),(n?.recent.length??0)===0?(0,K.jsx)(`p`,{className:`wd-activity-empty`,children:`Nothing yet.`}):Gl(n.recent).map(t=>(0,K.jsx)($l,{run:t,onOpenSession:e},t.id))]})]})]})}function Xl({s:e,now:t}){let n=e.pausedUntil&&Date.parse(e.pausedUntil)>t;return(0,K.jsxs)(`li`,{className:`wd-activity-schedule`,children:[(0,K.jsx)(`span`,{className:`wd-activity-name`,children:e.label}),` `,(0,K.jsx)(`span`,{className:`wd-activity-muted`,children:n?(0,K.jsxs)(`span`,{className:`wd-activity-warn`,children:[`resting until `,ql(e.pausedUntil),`: `,e.pausedWhy]}):(0,K.jsxs)(K.Fragment,{children:[Jl(e.everyMs),e.nextAt?` · next ${Kl(e.nextAt,t)}`:``]})})]})}var Zl={running:``,done:`✓`,failed:`✗`,skipped:`⏸`},Ql=4;function $l({run:e,onOpenSession:t}){let[n,r]=(0,_.useState)(!1),i=n?e.notes:e.notes.slice(0,Ql);return(0,K.jsxs)(`div`,{className:`wd-activity-run wd-activity-run-${e.status}`,children:[(0,K.jsxs)(`div`,{className:`wd-activity-head`,children:[e.status===`running`?(0,K.jsx)(`span`,{className:`wd-activity-spinner`,"aria-hidden":!0}):(0,K.jsx)(`span`,{className:`wd-activity-mark`,children:Zl[e.status]}),(0,K.jsx)(`span`,{className:`wd-activity-name`,children:e.label}),e.status===`running`&&e.progress&&e.progress.total>0&&(0,K.jsx)(`progress`,{className:`wd-activity-progress`,max:e.progress.total,value:e.progress.done,"aria-label":`${e.progress.done} of ${e.progress.total}`}),(0,K.jsxs)(`span`,{className:`wd-activity-muted wd-activity-when`,children:[e.status===`running`?`started ${Fs(e.startedAt)}`:Fs(e.endedAt??e.startedAt),e.repeats?` · ×${e.repeats+1}`:``]})]}),e.summary&&(0,K.jsx)(`div`,{className:`wd-activity-summary`,children:e.summary}),i.length>0&&(0,K.jsxs)(`ul`,{className:`wd-activity-notes`,children:[i.map((e,n)=>(0,K.jsx)(`li`,{className:`wd-activity-note wd-activity-note-${e.level}`,children:e.sessionId?(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(e.sessionId),title:`Open this session`,children:e.text}):e.text},n)),e.notes.length>Ql&&(0,K.jsx)(`li`,{children:(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-activity-more`,onClick:()=>r(e=>!e),children:n?`Show fewer`:`Show all ${e.notes.length}`})})]})]})}var eu=`2.2.1`;function tu(e){let t=e?.available;if(t)return t.how===`restart`?`${t.version} is ready to install`:t.how===`downloading`?`downloading ${t.version}${typeof t.progress==`number`?` (${t.progress}%)`:``}`:`${t.version} is out`;let n=e?.desktop;return n?.state===`failed`?`couldn't update: ${n.error??`unknown`}`:null}function nu({updates:e,onCheck:t,checking:n,note:r,onWhatsNew:i,onShortcuts:a,onRestart:o,mismatch:s,agents:c,onRestartAgents:l,restartingAgents:u,agentsNote:d,agentNames:f=[],onOpenSession:p,taskbarFlash:m}){let[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(!1),t=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]);let y=e?.running??`2.2.1`,b=tu(e),x=e?.available?.how===`restart`&&!!o,S=Co(c),C=c&&S&&l?wo(c):null,w=e=>()=>{g(!1),e?.()};return(0,K.jsxs)(`div`,{className:`wd-help`,ref:v,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-help-btn`+(e?.available||S?` wd-help-btn-update`:``),"aria-expanded":h,"aria-label":`Help: work v${y}${b?`, ${b}`:``}${s?`, work web is v${s.server}`:``}`,title:`work v${y}${b?` · ${b}`:``}${s?`\n⚠ ${No(s)}`:``}\nHelp: updates, what's new, keyboard shortcuts`,onClick:()=>g(e=>!e),children:[s&&(0,K.jsx)(`span`,{className:`wd-help-mismatch`,"aria-hidden":`true`,children:`⚠`}),`v`,y]}),h&&(0,K.jsxs)(`div`,{className:`wd-help-panel`,role:`dialog`,"data-popover":!0,"aria-label":`Help`,children:[(0,K.jsxs)(`p`,{className:`wd-help-version`,children:[`work v`,y,b&&(0,K.jsxs)(`span`,{className:`wd-help-status`,children:[` · `,b]})]}),s&&(0,K.jsxs)(`p`,{className:`wd-help-mismatch-note`,role:`note`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,children:`⚠ `}),No(s)]}),e?.available?.how===`downloading`&&typeof e.available.progress==`number`&&(0,K.jsx)(Xt,{value:e.available.progress}),x&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item wd-help-restart`,onClick:w(o),children:`Restart to update`}),S&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:S}),S&&(0,K.jsx)(es,{names:f,onOpen:p&&(e=>{g(!1),p(e)})}),C&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,disabled:u,onClick:l,children:u?`Restarting…`:`${C} — each picks up its conversation`}),c&&S&&!C&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:To(c)}),d&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:d}),t&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,disabled:n,onClick:t,children:n?`Checking…`:`Check for updates`}),r&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:r}),i&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,onClick:w(i),children:`What's new`}),m&&(0,K.jsxs)(`label`,{className:`wd-help-toggle`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:m.on,onChange:e=>m.set(e.target.checked)}),(0,K.jsx)(`span`,{children:`Flash the taskbar when a session needs you`})]}),a&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-row-menu-item`,onClick:w(a),children:[`Keyboard shortcuts `,(0,K.jsx)(`kbd`,{children:`?`})]})]})]})}function ru({selected:e,hidden:t=0,actions:n,onRun:r,onClear:i,busy:a,sections:o=[]}){let[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),v=e.filter(e=>!e.archivedAt),y=e.filter(e=>!!e.archivedAt);return(0,K.jsxs)(`div`,{className:`wd-bulk-bar`,role:`toolbar`,"aria-label":`Act on the ticked sessions`,children:[(0,K.jsxs)(`span`,{className:`wd-bulk-count`,children:[e.length,` selected`]}),t>0&&(0,K.jsxs)(`span`,{className:`wd-bulk-hidden`,title:`Ticked, but hidden by the filter or search: the bar leaves them out`,children:[`(+`,t,` hidden, not included)`]}),a?(0,K.jsx)(`span`,{className:`wd-bulk-busy`,children:a}):s===`send`?(0,K.jsxs)(`form`,{className:`wd-bulk-send`,onSubmit:e=>{e.preventDefault(),l.trim()&&(r(`Sent to`,e=>n.send(e,l.trim()),v),u(``),c(null))},children:[(0,K.jsx)(`textarea`,{autoFocus:!0,value:l,onChange:e=>u(e.target.value),placeholder:`What to tell ${v.length===1?`its Claude`:`their ${v.length} Claudes`} (delivered like a review comment: now in a terminal the dashboard owns, else on its next turn)`,rows:2,"aria-label":`Prompt to send`}),(0,K.jsxs)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:!l.trim()||v.length===0,children:[`Send to `,v.length]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(null),children:`Cancel`})]}):s===`delete`?(0,K.jsxs)(`span`,{className:`wd-bulk-confirm`,role:`alert`,children:[`Delete `,e.length,` session`,e.length===1?``:`s`,`? A worktree goes only where nothing would be lost; the others are refused and listed.`,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-danger`,onClick:()=>{c(null),r(`Deleted`,e=>n.remove(e),e)},children:`Delete`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(null),children:`Cancel`})]}):(0,K.jsxs)(K.Fragment,{children:[v.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(`Archived`,e=>n.archive(e),v),children:[`Archive `,v.length]}),y.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(`Restored`,e=>n.restore(e),y),children:[`Restore `,y.length]}),v.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();f({x:t.left,y:t.bottom+2})},children:[`Snooze `,v.length,` ▾`]}),v.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(`send`),children:`Send a prompt…`}),v.length>0&&n.place&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();g({x:t.left,y:t.bottom+2})},title:`Pin them, or put them under one of the rail's sections`,children:`Rail ▾`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-bulk-delete`,onClick:()=>c(`delete`),children:`Delete…`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:i,children:`Clear`})]}),d&&(0,K.jsx)(ns,{x:d.x,y:d.y,onClose:()=>f(null),items:[[`2 hours`,`2h`],[`Until tomorrow 9:00`,`tomorrow`],[`Until it changes`,`change`]].map(([e,t])=>({label:e,run:()=>r(`Snoozed`,e=>n.snooze(e,t),v)})).concat([{label:`Until…`,run:()=>m(!0)}])}),h&&n.place&&(0,K.jsx)(ns,{x:h.x,y:h.y,onClose:()=>g(null),items:[{label:`Pin ${v.length}`,run:()=>r(`Pinned`,e=>n.place(e,{pinned:!0}),v)},{label:`Unpin ${v.length}`,run:()=>r(`Unpinned`,e=>n.place(e,{pinned:!1}),v)},...o.map((e,t)=>({label:`Move to “${e.name}”`,run:()=>r(`Moved to “${e.name}”`,t=>n.place(t,{pinned:!1,section:e.id}),v),...t===0?{separated:!0}:{}})),...o.length?[{label:`Out of their section`,run:()=>r(`Took out of their section`,e=>n.place(e,{section:null}),v)}]:[]]}),p&&(0,K.jsx)(Ps,{count:v.length,onClose:()=>m(!1),onPick:e=>{m(!1),r(`Snoozed`,t=>n.snooze(t,{until:e}),v)}})]})}async function iu(e,t,n={}){let r=Array(e.length),i=0,a=0;return await Promise.all(Array.from({length:Math.min(n.concurrency??3,e.length)},async()=>{for(let o=i++;o<e.length;o=i++){try{await t(e[o]),r[o]={id:e[o],ok:!0}}catch(t){r[o]={id:e[o],ok:!1,error:t.message}}n.onProgress?.(++a,e.length)}})),r}function au(e,t,n){let r=t.filter(e=>e.ok).length,i=t.filter(e=>!e.ok);if(i.length===0)return`${e} ${r}.`;let a=i.slice(0,3).map(e=>`${n(e.id)} — ${e.error??`refused`}`).join(`; `);return`${e} ${r}; ${i.length} refused: ${a}${i.length>3?` (and ${i.length-3} more)`:``}`}function ou(e,t=!1){let n=new Map;for(let t of e){let e=n.get(t.target);e||(e={key:t.target,isGroup:t.isGroup,repos:[],sessions:[]},n.set(t.target,e)),e.sessions.push(t);for(let n of su(t))e.repos.includes(n)||e.repos.push(n)}let r=[...n.values()];return t&&r.sort((e,t)=>e.key.toLowerCase().localeCompare(t.key.toLowerCase())),r}function su(e){return!e.isGroup||e.paths.length<2?[]:e.paths.map(e=>{let t=e.split(/[\\/]+/).filter(Boolean);return t[t.length-1]??e})}var cu={you:`by you`,shipped:`merged with Ship`,"pr-merged":`PR merged`,cleanup:`Clean up`},lu={you:`you archived it`,shipped:`Ship merged its pull request and archived it`,"pr-merged":`its pull request merged, so work archived it`,cleanup:`archived from Clean up`};function uu(e){let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{day:`numeric`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}function du(e){let t=e.archivedAt?uu(e.archivedAt):``;if(!t)return``;let n=e.archive?.by?lu[e.archive.by]:null;return`Archived ${t}${n?` — ${n}`:``}.`}function fu(e,t=Date.now()){let n=Fs(e,t);return n?n===`just now`?`Last active just now.`:`Last active ${n} ago.`:``}function pu(e,t,n){return n&&e.archivedAt?e.archivedAt:t}function mu(e,t=Date.now()){let n=t-Date.parse(e);return n<6048e5?n<864e5?`now`:`week`:Number.isFinite(n)?`older`:`now`}var hu={archive:e=>D(e.id,!0,()=>!1),restore:e=>D(e.id,!1,()=>!1),snooze:(e,t)=>U(e,t),send:(e,t)=>W(e.id,t),remove:e=>wn(e.id,{}),place:(e,t)=>ze(e.id,t)},gu=`work-web:sessions-grouping`,_u=`work-web:sessions-show-archived`,vu={live:`Live`,archived:`Archived`,all:`All`};function yu(){try{let e=localStorage.getItem(_u);return e===`archived`||e===`all`?e:e===`1`?`all`:`live`}catch{return`live`}}function bu(e,t){try{localStorage.setItem(e,t)}catch{}}var xu={all:`all`,needs:`needs you`,working:`working`,idle:`idle`,stale:`stale`};function Su({layout:e,sessions:t,onOpenSession:n,onNewWorktree:r,onDeleteSession:i,menuFor:a,onCleanUp:o,bulk:s=hu,viewToggle:c,onShowArchived:l,archivedLoaded:u=!0}){let[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(()=>new Set),h=e=>{f(e),e||m(new Set)},[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),x=(e,t)=>{b(null),D(e.id,t).catch(e=>!O(e)&&b(e.message))},S=e=>a?a(e):[vt(e)?{label:`Restore`,run:()=>x(e,!1)}:{label:`Archive`,run:()=>x(e,!0)},{label:`Delete…`,run:()=>i(e),danger:!0,separated:!0}],[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(null),k=(e,t)=>m(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r}),A=t.filter(e=>p.has(e.id)),j=(e,t,n)=>{let r=new Map(n.map(e=>[e.id,e]));E(null),w(`${e} 0/${n.length}…`),iu([...r.keys()],e=>t(r.get(e)),{onProgress:(t,n)=>w(`${e} ${t}/${n}…`)}).then(t=>{w(null),E(au(e,t,e=>r.get(e)?.branch??e)),m(new Set(t.filter(e=>!e.ok).map(e=>e.id)))})},[M,ee]=(0,_.useState)(`recent`),[N,P]=(0,_.useState)(`all`),[F,I]=(0,_.useState)(`any`),te=e??ft,ne=(0,_.useMemo)(()=>{let e=new Map;for(let n of pt(t.filter(e=>!vt(e)),te))for(let t of n.sessions)e.set(t.id,n);return e},[t,te]),L=(0,_.useCallback)(e=>{if(F===`any`)return!0;let t=ne.get(e.id);return F===`pinned`?t?.key===`pinned`:F===`none`?!t||t.key===`rest`:t?.key===F},[F,ne]),[re,R]=(0,_.useState)(``),[ie,ae]=(0,_.useState)(()=>{try{let e=localStorage.getItem(gu);return e===`project`||e===`none`||e===`section`?e:`age`}catch{return`age`}}),[oe,se]=(0,_.useState)(!1),[ce,z]=(0,_.useState)(yu),le=ce!==`live`,B=e=>{ae(e),bu(gu,e)},V=e=>{z(e),bu(_u,e)};(0,_.useEffect)(()=>(l?.(le),()=>l?.(!1)),[le]);let H=(0,_.useMemo)(()=>t.filter(e=>!vt(e)),[t]),ue=(0,_.useMemo)(()=>t.filter(e=>vt(e)),[t]),de=ue.length,U=(0,_.useMemo)(()=>{let e={now:0,week:0,older:0};for(let t of H)e[ot(t)]++;return e},[H]),fe=(0,_.useMemo)(()=>[...(ce===`archived`?ue:ce===`all`?t:H).filter(e=>(N===`all`||st(tt(e))===N)&&L(e)&&Ct(e,re))].sort((e,t)=>{if(M===`name`){let n=(e.branch||e.target).toLowerCase(),r=(t.branch||t.target).toLowerCase();return n.localeCompare(r)}let n=ce===`archived`;return pu(t,et(t),n).localeCompare(pu(e,et(e),n))}),[t,H,ue,ce,M,N,re,L]),W=fe.filter(e=>p.has(e.id)),G=A.length-W.length;(0,_.useEffect)(()=>{let e=new Set(t.map(e=>e.id));m(t=>[...t].every(t=>e.has(t))?t:new Set([...t].filter(t=>e.has(t))))},[t]);let pe=(0,_.useMemo)(()=>ie===`project`?ou(fe,M===`name`):null,[fe,ie,M]),me=(0,_.useMemo)(()=>{if(ie!==`section`)return null;let e=pt(fe.filter(e=>!vt(e)),te).filter(e=>e.sessions.length>0),t=fe.filter(e=>vt(e));return t.length?[...e,{key:`archived`,title:`Archived`,sessions:t}]:e},[fe,ie,te]),he=(0,_.useMemo)(()=>{if(ie!==`age`)return null;let e={now:[],week:[],older:[]};for(let t of fe)e[ce===`archived`&&t.archivedAt?mu(t.archivedAt):ot(t)].push(t);return Object.keys(e).map(t=>({key:t,sessions:e[t]})).filter(e=>e.sessions.length>0)},[fe,ie,ce]),ge=e=>{let t=ne.get(e.id);return t?.key===`pinned`?`📌`:t?.sectionId?t.title:null},_e=e=>(0,K.jsxs)(`table`,{className:`wd-session-table`+(d?` wd-session-table-selecting`:``),children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[d&&(0,K.jsx)(`th`,{className:`wd-st-col-pick`,children:(0,K.jsx)(`input`,{type:`checkbox`,"aria-label":`Select all shown`,checked:e.length>0&&e.every(e=>p.has(e.id)),onChange:t=>{let n=t.target.checked;m(t=>{let r=new Set(t);for(let t of e)n?r.add(t.id):r.delete(t.id);return r})}})}),(0,K.jsx)(`th`,{className:`wd-st-col-status`,children:`Status`}),(0,K.jsx)(`th`,{children:`Session`}),(0,K.jsx)(`th`,{className:`wd-st-col-project`,children:`Project`}),(0,K.jsx)(`th`,{className:`wd-st-col-summary`,children:`Summary`}),(0,K.jsx)(`th`,{className:`wd-st-col-changes`,children:`Changes`}),(0,K.jsx)(`th`,{className:`wd-st-col-when`,children:ce===`archived`?`Archived`:`Active`}),(0,K.jsx)(`th`,{className:`wd-st-col-more`,children:(0,K.jsx)(`span`,{className:`wd-visually-hidden`,children:`Actions`})})]})}),(0,K.jsx)(`tbody`,{children:e.map(e=>(0,K.jsx)(Eu,{session:e,archivedView:ce===`archived`,onOpen:()=>n(e.id,`term`),onMenu:(t,n)=>v({s:e,x:t,y:n}),selecting:d,picked:p.has(e.id),onPick:t=>k(e.id,t),railTag:ge(e),onRestore:()=>x(e,!1)},e.id))})]});return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-sessions`,children:[y&&(0,K.jsxs)(`p`,{className:`wd-tab-error`,role:`alert`,children:[y,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>b(null),children:`Dismiss`})]}),(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsxs)(`h1`,{children:[`Sessions `,c,` `,(0,K.jsx)(`span`,{className:`wd-tab-header-muted`,children:ce===`archived`?`${de} archived`:[U.now?`${U.now} now`:``,U.week?`${U.week} this week`:``,U.older?`${U.older} older`:``].filter(Boolean).join(` · `)})]}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[(0,K.jsx)(`span`,{className:`wd-segmented`,role:`group`,"aria-label":`Which sessions`,children:[`live`,`archived`,`all`].map(e=>(0,K.jsxs)(`button`,{type:`button`,className:`wd-segmented-btn`+(ce===e?` wd-segmented-btn-on`:``),"aria-pressed":ce===e,onClick:()=>V(e),title:e===`live`?`The sessions you work on`:e===`archived`?`Archived sessions, to look back or restore one`:`Live and archived together`,children:[vu[e],e===`archived`&&le&&de>0?` ${de}`:``]},e))}),(0,K.jsx)(`input`,{className:`wd-tab-search`,type:`search`,placeholder:`Search branch, repo, words…`,"aria-label":`Search sessions`,value:re,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key===`Escape`&&R(``)}}),(0,K.jsxs)(wu,{children:[(0,K.jsxs)(`label`,{children:[`Show`,(0,K.jsx)(`select`,{value:N,onChange:e=>P(e.target.value),"aria-label":`Status filter`,children:Object.keys(xu).map(e=>(0,K.jsx)(`option`,{value:e,children:xu[e]},e))})]}),(te.sections.length>0||Object.keys(te.places).length>0)&&(0,K.jsxs)(`label`,{children:[`Rail`,(0,K.jsxs)(`select`,{value:F,onChange:e=>I(e.target.value),"aria-label":`Rail filter`,children:[(0,K.jsx)(`option`,{value:`any`,children:`any`}),(0,K.jsx)(`option`,{value:`pinned`,children:`pinned`}),te.sections.map(e=>(0,K.jsx)(`option`,{value:`section:${e.id}`,children:e.name},e.id)),(0,K.jsx)(`option`,{value:`none`,children:`in no section`})]})]}),(0,K.jsxs)(`label`,{children:[`Group`,(0,K.jsxs)(`select`,{value:ie,onChange:e=>B(e.target.value),"aria-label":`Group by`,children:[(0,K.jsx)(`option`,{value:`age`,children:`age`}),(0,K.jsx)(`option`,{value:`project`,children:`project`}),(0,K.jsx)(`option`,{value:`section`,children:`rail section`}),(0,K.jsx)(`option`,{value:`none`,children:`none`})]})]}),(0,K.jsxs)(`label`,{children:[`Sort`,(0,K.jsxs)(`select`,{value:M,onChange:e=>ee(e.target.value),"aria-label":`Sort by`,children:[(0,K.jsx)(`option`,{value:`recent`,children:`recent`}),(0,K.jsx)(`option`,{value:`name`,children:`name`})]})]}),(0,K.jsxs)(`label`,{className:`wd-tab-check`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:d,onChange:e=>h(e.target.checked)}),` Select several`]})]}),o&&(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:o,title:`Find worktrees that are safe to remove`,children:`Clean up`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:r,children:`New`})]})]}),(W.length>0||C)&&(0,K.jsx)(ru,{selected:W,hidden:G,actions:s,onRun:j,onClear:()=>m(new Set),busy:C,sections:te.sections}),T&&(0,K.jsxs)(`p`,{className:`wd-bulk-outcome`,role:`status`,children:[T,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>E(null),children:`OK`})]}),fe.length===0?(0,K.jsx)(`div`,{className:`wd-tab-empty`,children:ce!==`live`&&!u&&de===0?`Loading archived sessions…`:ce===`archived`&&de===0?`No archived sessions.`:t.length===0?'No worktrees yet. Run `work tree <target> <branch>` in any terminal, or click "New worktree" above.':`No sessions match the current filter.`}):me?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:me.map(e=>(0,K.jsxs)(`section`,{className:`wd-session-group`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:e.title??`Not in a section`}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]})]}),_e(e.sessions)]},e.key))}):he?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:he.map((e,t,n)=>{let r=e=>e.key===`older`&&!oe&&re.trim()===``&&ce!==`archived`;return r(e)?(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-session-older`,onClick:()=>se(!0),children:[`Show `,e.sessions.length,` older`]},e.key):(0,K.jsxs)(`section`,{className:`wd-session-group wd-session-age wd-session-age-${e.key}`,children:[n.filter(e=>!r(e)).length>1&&(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:at[e.key]}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]}),e.key===`older`&&re.trim()===``&&ce!==`archived`&&(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-session-age-toggle`,onClick:()=>se(!1),children:`Hide`})]}),_e(e.sessions)]},e.key)})}):pe?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:pe.map(e=>(0,K.jsxs)(`section`,{className:`wd-session-group`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:e.key}),e.isGroup&&(0,K.jsx)(`span`,{className:`wd-session-group-kind`,title:`Multi-repo group`,children:`group`}),e.repos.length>0&&(0,K.jsx)(`ul`,{className:`wd-session-group-repos`,"aria-label":`Repos in this group`,children:e.repos.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]})]}),_e(e.sessions)]},e.key))}):(0,K.jsx)(`div`,{className:`wd-session-table-wrap`,children:_e(fe)}),(0,K.jsx)(Cu,{query:re,onOpen:e=>n(e,`diff`)}),g&&(0,K.jsx)(ns,{x:g.x,y:g.y,items:S(g.s),onClose:()=>v(null)})]})}function Cu({query:e,onOpen:t}){let[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{s(null);let t=e.trim();if(t.length<2){r([]);return}let n=!0,i=setTimeout(()=>{ve(t).then(e=>n&&r(e),()=>n&&r([]))},300);return()=>{n=!1,clearTimeout(i)}},[e]),n.length===0?null:(0,K.jsxs)(`section`,{className:`wd-session-group wd-archive-hits`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-title`,children:[`In conversations (`,n.length,`)`]}),(0,K.jsx)(`ul`,{className:`wd-archive-hit-list`,children:n.map(e=>(0,K.jsxs)(`li`,{className:`wd-archive-hit`,children:[(0,K.jsxs)(`div`,{className:`wd-archive-hit-head`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(e.sessionId),children:[e.target,` · `,e.branch]}),(0,K.jsx)(`span`,{className:`wd-tab-header-muted`,children:e.archived&&e.archivedAt?` archived ${Fs(e.archivedAt)}${e.worktreeRemoved?` · folder removed`:``}`:e.lastAt?` ${Fs(e.lastAt)}`:``}),e.archived&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-action`,disabled:i!==null,title:e.worktreeRemoved?`Recreate its worktree from the branch and continue the conversation`:`Bring it back`,onClick:()=>{a(e.sessionId),s(null),D(e.sessionId,!1).catch(t=>!O(t)&&s({id:e.sessionId,text:t.message})).finally(()=>a(null))},children:i===e.sessionId?`Restoring…`:`Restore`})]}),o?.id===e.sessionId&&(0,K.jsx)(`p`,{className:`wd-archive-hit-error`,role:`alert`,children:o.text}),e.snippets.map((e,t)=>(0,K.jsxs)(`p`,{className:`wd-archive-hit-snippet`,children:[(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[e.role===`you`?`You`:e.role===`summary`?`Summary`:`Claude`,`:`]}),` `,e.text]},t))]},e.sessionId))})]})}function wu({children:e}){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!t)return;let e=e=>e.key===`Escape`&&n(!1),i=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,i),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,i)}},[t]),(0,K.jsxs)(`div`,{className:`wd-view-menu`,ref:r,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,"aria-expanded":t,"aria-haspopup":`true`,onClick:()=>n(e=>!e),children:`View ▾`}),t&&(0,K.jsx)(`div`,{className:`wd-view-menu-panel`,role:`group`,"aria-label":`View`,children:e})]})}function Tu(e){let t=e.context;if(!t||t.window<=0)return null;let n=Math.min(1,t.used/t.window);return n>=.7?`${Math.round(n*100)}% full`:null}function Eu({session:e,onOpen:t,onMenu:n,selecting:r,picked:i,onPick:a,railTag:o,onRestore:s,archivedView:c=!1}){let l=tt(e),u=vt(e),d=su(e),f=w(e.id),p=Tu(e),m=e.titleIsYours&&!!e.title;return(0,K.jsxs)(`tr`,{className:`wd-session-row`+(u?` wd-session-row-archived`:``)+(l===`needs_input`||l===`done`?` wd-session-row-unseen`:``),onClick:t,onContextMenu:e=>{e.preventDefault(),n(e.clientX,e.clientY)},tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},children:[r&&(0,K.jsx)(`td`,{className:`wd-st-col-pick`,onClick:e=>e.stopPropagation(),children:(0,K.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked),"aria-label":`Select ${e.target} ${e.branch}`})}),(0,K.jsx)(`td`,{className:`wd-st-col-status`,children:(0,K.jsxs)(`span`,{className:`wd-st-status`,title:lt(l),children:[(0,K.jsx)(Mt,{kind:l,muted:!!e.snoozed}),(0,K.jsx)(`span`,{className:`wd-st-label`,children:nt[l]})]})}),(0,K.jsxs)(`td`,{className:`wd-st-session`,children:[(0,K.jsx)(`span`,{className:`wd-st-branch`,title:m?`${e.title} (${e.branch})`:e.branch,children:m?e.title:e.branch||`(base)`}),o&&(0,K.jsx)(`span`,{className:`wd-st-rail`+(o===`📌`?` wd-st-rail-pin`:``),title:o===`📌`?`Pinned in the rail`:`In the rail's “${o}” section`,children:o}),p&&(0,K.jsx)(`span`,{className:`wd-st-full`,title:`The conversation is ${p}: start fresh for the next task (work tree … --fresh, or /clear)`,children:p}),u&&(0,K.jsxs)(`span`,{className:`wd-archived-pill`,title:[du(e),e.archive?e.archive.worktreeRemoved?`Worktree removed; its branch and the conversation are kept${e.archive.savedUncommitted?`, and ${e.archive.savedUncommitted} uncommitted file${e.archive.savedUncommitted===1?``:`s`}`:``}. Restore recreates it${e.archive.savedUncommitted?` and puts them back`:``}.${e.archive.kept?` Also kept: ${e.archive.kept}.`:``}`:`Worktree kept: ${e.archive.keptBecause??`it has work in it`}${e.archive.kept?`. Also kept: ${e.archive.kept}.`:``}`:``].filter(Boolean).join(` `)||`Archived`,children:[`archived`,e.archive?.by?` · ${cu[e.archive.by]}`:``,e.archive?.worktreeRemoved?` · folder removed${e.archive.savedUncommitted?` · ${e.archive.savedUncommitted} changes saved`:``}`:``]})]}),(0,K.jsxs)(`td`,{className:`wd-st-col-project`,children:[(0,K.jsx)(`span`,{className:`wd-st-target`,children:e.target}),` `,e.isGroup&&(0,K.jsx)(`span`,{className:`wd-session-group-kind wd-session-group-kind-hint`,title:d.length?`Multi-repo group: ${d.join(`, `)}`:`Multi-repo group`,children:`group`})]}),(0,K.jsx)(`td`,{className:`wd-st-col-summary`,children:(()=>{let t=e.attention?.summary??(u?e.archive?.written??e.archive?.lastSummary??e.archive?.prompts[0]:void 0)??``;return(0,K.jsx)(`span`,{className:`wd-st-summary`,title:t,children:t})})()}),(0,K.jsxs)(`td`,{className:`wd-st-col-changes`,children:[(0,K.jsx)(hl,{session:e}),e.overlaps?.length?(0,K.jsx)(`span`,{className:`wd-st-overlap`,title:_l(e),"aria-label":`Changes the same files as another session`,children:`⚠`}):null]}),(0,K.jsx)(`td`,{className:`wd-st-col-when`,title:u&&[du(e),fu(et(e))].filter(Boolean).join(` `)||void 0,children:f===void 0?Fs(pu(e,et(e),c)):f?`archiving…`:`restoring…`}),(0,K.jsxs)(`td`,{className:`wd-st-col-more`,onClick:e=>e.stopPropagation(),children:[u&&s&&f===void 0&&(0,K.jsx)(`button`,{type:`button`,className:`wd-st-restore`,onClick:s,title:`Bring it back: its worktree, branch and conversation`,children:`Restore`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-st-more`,"aria-label":`Actions for ${e.target} ${e.branch}`,title:`Archive, snooze, open in a terminal, delete…`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();n(t.left,t.bottom+4)},children:`⋯`})]})]})}function Du(e){return e.isDraft?{text:`Draft`,tone:`muted`}:e.conflicting?{text:`Merge conflict`,tone:`bad`}:e.checksStatus===`FAILURE`?{text:`Checks failing`,tone:`bad`}:e.reviewDecision===`CHANGES_REQUESTED`?{text:`Changes requested`,tone:`bad`}:e.reviewDecision===`APPROVED`?{text:`Approved`,tone:`good`}:e.checksStatus===`PENDING`?{text:`Checks running`,tone:`muted`}:e.reviewDecision===`REVIEW_REQUIRED`?{text:`Review needed`,tone:`muted`}:{text:`Open`,tone:`muted`}}function Ou(e,t,n){return t.find(t=>!vt(t)&&wt(t,[e],n).length>0)}function ku(e){return!e.isMine&&!!e.reviewRequested&&e.myReview===`NONE`}function Au(e){let t=new Map;for(let n of e)t.set(n.repoAlias,(t.get(n.repoAlias)??0)+1);return[...t].map(([e,t])=>({repo:e,count:t})).sort((e,t)=>t.count-e.count||e.repo.localeCompare(t.repo))}function ju(e,t){let n=t.filter(t=>e.some(e=>e.repoAlias===t));return n.length?e.filter(e=>n.includes(e.repoAlias)):e}var Mu=`work:start-repos`;function Nu(){try{let e=JSON.parse(localStorage.getItem(Mu)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function Pu(e){try{localStorage.setItem(Mu,JSON.stringify(e))}catch{}}function Fu({sessions:e,onNewWorktree:t,onPickPr:n,onWorkOnPr:r,onOpenSession:i,onManageRepos:a,prs:o,prsNote:s=null,membersOf:c}){let l=(o??[]).filter(e=>e.isMine),u=(o??[]).filter(ku),d=Au([...l,...u]),[f,p]=(0,_.useState)(Nu),m=f.filter(e=>d.some(t=>t.repo===e)),h=e=>{p(e),Pu(e)},g=e=>h(m.includes(e)?m.filter(t=>t!==e):[...m,e]),v=ju(l,m),y=ju(u,m),b=e=>e?(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-start-existing`,onClick:()=>i(e.id),title:`Open the session on it`,children:[e.titleIsYours&&e.title?e.title:e.branch,` →`]}):null;return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-start`,children:[(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsx)(`h1`,{children:`Start work`}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[a&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:a,children:`Repos & groups`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:t,children:`New worktree`})]})]}),d.length>1&&(0,K.jsxs)(`div`,{className:`wd-start-filter`,role:`group`,"aria-label":`Show pull requests in`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-start-chip`,"aria-pressed":m.length===0,onClick:()=>h([]),children:`All`}),d.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:`wd-start-chip`,"aria-pressed":m.includes(e.repo),onClick:()=>g(e.repo),title:m.includes(e.repo)?`Stop showing only ${e.repo}`:`Show ${e.repo}'s pull requests${m.length?` too`:` only`}`,children:[e.repo,` `,(0,K.jsx)(`span`,{className:`wd-start-chip-count`,children:e.count})]},e.repo))]}),(0,K.jsxs)(`section`,{className:`wd-start-section`,"aria-label":`Your pull requests`,children:[(0,K.jsx)(`h2`,{className:`wd-start-title`,children:`Your pull requests · GitHub`}),s&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:s}),!s&&o===null&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:`Loading…`}),!s&&o!==null&&v.length===0&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:m.length?`No open pull requests of yours in ${m.join(`, `)}.`:`No open pull requests of yours.`}),(0,K.jsx)(Iu,{prs:v,sessions:e,onPick:n,existing:b,membersOf:c})]}),y.length>0&&(0,K.jsxs)(`section`,{className:`wd-start-section`,"aria-label":`Waiting for your review`,children:[(0,K.jsx)(`h2`,{className:`wd-start-title`,children:`Waiting for your review · GitHub`}),(0,K.jsx)(Iu,{prs:y,sessions:e,onPick:n,onWork:r,existing:b,membersOf:c})]})]})}function Iu({prs:e,sessions:t,onPick:n,onWork:r,existing:i,membersOf:a}){return(0,K.jsx)(`ul`,{className:`wd-start-list`,children:e.map(e=>{let o=Du(e);return(0,K.jsxs)(`li`,{className:`wd-start-row wd-start-row-pr`,children:[(0,K.jsxs)(`a`,{className:`wd-start-key wd-start-key-pr`,href:e.url,target:`_blank`,rel:`noreferrer`,title:`Open on GitHub`,children:[`#`,e.number]}),(0,K.jsxs)(`span`,{className:`wd-start-what`,title:!e.isMine&&e.author?`${e.title} — by @${e.author}`:e.title,children:[(0,K.jsx)(`span`,{className:`wd-start-pr-title`,children:e.title}),!e.isMine&&e.author&&(0,K.jsxs)(`span`,{className:`wd-start-author`,children:[`· by @`,e.author]})]}),(0,K.jsx)(`span`,{className:`wd-start-repo`,title:e.repoAlias,children:e.repoAlias}),(0,K.jsx)(`span`,{className:`wd-start-state wd-start-state-${o.tone}`,children:o.text}),(0,K.jsx)(`span`,{className:`wd-start-action`,children:i(Ou(e,t,a))??(0,K.jsxs)(K.Fragment,{children:[r&&!e.isMine&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(e),disabled:e.fork,title:e.fork?`It comes from a fork: its branch isn't on origin, so a session couldn't push to it`:`Work on it on ${e.author?`@${e.author}'s`:`their`} branch: what you push lands in their PR`,children:`Work on it`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>n(e),title:e.isMine?`Continue on it in a worktree`:`Have Claude review it in a worktree (it changes nothing, posts nothing)`,children:e.isMine?`Start`:`Review`})]})})]},`${e.repoAlias}#${e.number}`)})})}function Lu(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,40)||`task`}function Ru({onPick:e}){let[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null);function d(){yn().then(e=>n(e.tasks),()=>{})}(0,_.useEffect)(d,[]),go(`/events`,{events:{"tasks-changed":d}});async function f(e){e.preventDefault();let t=a.trim();if(t)try{let e=await bn(t);n(e.tasks),o(``)}catch{}}async function p(e){try{let t=await xn(e.id,{done:!e.done});n(t.tasks)}catch{}}async function m(e,t){let r=t.trim();if(r&&r!==e.text)try{let t=await xn(e.id,{text:r});n(t.tasks)}catch{}}async function h(e){try{let t=await Sn(e);n(t.tasks)}catch{}}let g=(0,_.useMemo)(()=>r?t:t.filter(e=>!e.done),[t,r]),v=(0,_.useMemo)(()=>{let e=t.filter(e=>!e.done).length;return{open:e,done:t.length-e}},[t]);return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-tasks`,children:[(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsxs)(`h1`,{children:[`Tasks`,` `,(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,v.open,` open · `,v.done,` done)`]})]}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[(0,K.jsxs)(`label`,{children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),` show done`]}),(0,K.jsxs)(`form`,{className:`wd-task-add`,onSubmit:f,children:[(0,K.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`+ Add task…`}),(0,K.jsx)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:!a.trim(),children:`Add`})]})]})]}),g.length===0?(0,K.jsx)(`div`,{className:`wd-tab-empty`,children:t.length===0?"No tasks yet. Add one above, or `work todo add <text>` from a terminal.":`No open tasks — toggle "show done" to see completed ones.`}):(0,K.jsx)(`ul`,{className:`wd-task-list`,children:g.map(t=>(0,K.jsxs)(`li`,{className:`wd-task-row`+(t.done?` wd-task-row-done`:``),onContextMenu:e=>{e.preventDefault(),u({id:t.id,x:e.clientX,y:e.clientY})},children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t.done,onChange:()=>p(t),"aria-label":t.done?`Mark not done`:`Mark done`}),(0,K.jsx)(zu,{task:t,editing:s===t.id,onEdit:()=>c(t.id),onDone:()=>c(null),onSave:e=>m(t,e)}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-task-action`,onClick:()=>e(t),title:`Create worktree (todo/<slug>)`,children:`→ worktree`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-task-action wd-task-remove`,onClick:()=>h(t.id),title:`Delete task`,"aria-label":`Delete task`,children:`×`})]},t.id))}),l&&(0,K.jsx)(ns,{x:l.x,y:l.y,onClose:()=>u(null),items:[{label:`Edit`,hint:`F2`,run:()=>c(l.id)}]})]})}function zu({task:e,editing:t,onEdit:n,onDone:r,onSave:i}){let[a,o]=(0,_.useState)(e.text);if((0,_.useEffect)(()=>{t&&o(e.text)},[t,e.text]),t){let e=e=>{r(),e&&i(a)};return(0,K.jsx)(`input`,{className:`wd-task-edit`,"aria-label":`Task text`,value:a,autoFocus:!0,onChange:e=>o(e.target.value),onBlur:()=>e(!0),onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),e(!0)):t.key===`Escape`&&(t.preventDefault(),e(!1))}})}let s=n;return(0,K.jsx)(`span`,{className:`wd-task-text`,role:`button`,tabIndex:0,onClick:s,onKeyDown:e=>{(e.key===`F2`||e.key===`Enter`)&&(e.preventDefault(),s())},title:`Click to edit`,children:e.text})}function Bu({open:e,onOpenChange:t,onPick:n}){let r=(0,_.useRef)(null),i=(0,_.useRef)(t);return i.current=t,(0,_.useEffect)(()=>{if(!e)return;let t=()=>i.current(!1),n=e=>{e.key===`Escape`&&!document.querySelector(`.wd-row-menu`)&&!e.target.closest?.(`input`)&&t()},a=e=>{let n=e.target;r.current?.contains(n)||n.closest?.(`.wd-row-menu`)||t()};return window.addEventListener(`keydown`,n),window.addEventListener(`mousedown`,a),()=>{window.removeEventListener(`keydown`,n),window.removeEventListener(`mousedown`,a)}},[e]),(0,K.jsxs)(`div`,{className:`wd-tasks-popover`,ref:r,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-topnav-btn`+(e?` wd-topnav-btn-on`:``),"aria-expanded":e,"aria-haspopup":`dialog`,title:`Your tasks (g t)`,onClick:()=>t(!e),children:`Tasks`}),e&&(0,K.jsx)(`div`,{className:`wd-tasks-panel`,role:`dialog`,"aria-label":`Tasks`,"data-popover":!0,children:(0,K.jsx)(Ru,{onPick:e=>{t(!1),n(e)}})})]})}function Vu({value:e,onChange:t}){return(0,K.jsx)(`span`,{className:`wd-segmented`,role:`group`,"aria-label":`Sessions view`,children:[`now`,`today`].map(n=>(0,K.jsx)(`button`,{type:`button`,className:`wd-segmented-btn`+(e===n?` wd-segmented-btn-on`:``),"aria-pressed":e===n,title:n===`now`?`Every session as it stands (g s)`:`What each session did today (g d)`,onClick:()=>t(n),children:n===`now`?`Now`:`Today`},n))})}var Hu=`work:terminal-reconnect`;function Uu(e){window.dispatchEvent(new CustomEvent(Hu,{detail:{id:e}}))}function Wu(e,t){let n=n=>{n.detail?.id===e&&t()};return window.addEventListener(Hu,n),()=>window.removeEventListener(Hu,n)}var Gu={created:`✦`,prompt:`›`,turn:`✓`,commit:`●`,"pr-opened":`⇡`,"pr-merged":`⇣`,"pr-closed":`✕`,archived:`▣`},Ku={created:`Started`,prompt:`You`,turn:`Turn`,commit:`Commit`,"pr-opened":`PR`,"pr-merged":`Merged`,"pr-closed":`Closed`,archived:`Archived`};function qu(e){let t=[];for(let n of e){let e=new Date(n.at).toLocaleDateString([],{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`}),r=t[t.length-1];r?.day===e?r.events.push(n):t.push({day:e,events:[n]})}return t}function Ju({session:e,onOpenTurn:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let t=!0;return r(null),a(null),Se(e.id).then(e=>t&&r(e),e=>t&&a(e.message)),()=>{t=!1}},[e.id,e.lastActivity]),i?(0,K.jsx)(`div`,{className:`wd-tab-empty wd-tab-error`,children:i}):n?(0,K.jsx)(`div`,{className:`wd-timeline`,children:qu(n).map(n=>(0,K.jsxs)(`section`,{className:`wd-timeline-day`,children:[(0,K.jsx)(`h3`,{className:`wd-timeline-day-title`,children:n.day}),(0,K.jsx)(`ol`,{className:`wd-timeline-list`,children:n.events.map((n,r)=>(0,K.jsxs)(`li`,{className:`wd-timeline-event wd-timeline-${n.kind}`,children:[(0,K.jsx)(`span`,{className:`wd-timeline-time`,children:new Date(n.at).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}),(0,K.jsx)(`span`,{className:`wd-timeline-icon`,"aria-hidden":!0,children:Gu[n.kind]}),(0,K.jsx)(`span`,{className:`wd-timeline-kind`,children:Ku[n.kind]}),(0,K.jsxs)(`span`,{className:`wd-timeline-text`,children:[n.kind===`turn`&&n.checkpoint&&t?(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(n.checkpoint),title:`Open what this turn changed`,children:n.text}):n.ref?.startsWith(`https://`)?(0,K.jsx)(`a`,{href:n.ref,target:`_blank`,rel:`noreferrer`,children:n.text}):n.text,n.repo&&e.isGroup&&(0,K.jsxs)(`span`,{className:`wd-timeline-repo`,children:[` · `,n.repo]}),n.kind===`commit`&&n.ref&&(0,K.jsx)(`code`,{className:`wd-timeline-sha`,children:n.ref.slice(0,7)})]})]},`${n.at}-${n.kind}-${r}`))})]},n.day))}):(0,K.jsxs)(`div`,{className:`wd-tab-empty`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-spinner`,"aria-hidden":!0}),` Reading its history…`]})}var Yu=(e,t)=>`${e}\u0000${t}`;function Q(e){let t=[];for(let n of e.rootFiles)t.push({key:Yu(``,n),repo:``,path:n,display:n,changed:!1});for(let n of e.repos){let r=new Set(n.changed);for(let i of n.files)t.push({key:Yu(n.name,i),repo:n.name,path:i,display:e.group?`${n.name}/${i}`:i,changed:r.has(i)})}return t}function Xu(e,t,n){let r=n?.get(t);if(r)return r;let i=t.indexOf(`\0`);if(i<0)return null;let a=t.slice(0,i),o=t.slice(i+1);if(!o)return null;if(a===``)return e.group?{key:t,repo:a,path:o,display:o,changed:!1}:null;let s=e.repos.find(e=>e.name===a);return s?{key:t,repo:a,path:o,display:e.group?`${a}/${o}`:o,changed:s.changed.includes(o)}:null}function Zu(e){let t=new Map,n=e=>{let n=t.get(e);return n||t.set(e,n={dirs:[],files:[],changed:0}),n},r=new Map;n(``);for(let t of e){let e=t.display.split(`/`),i=``;for(let a=0;a<e.length-1;a++){let o=i?`${i}/${e[a]}`:e[a],s=r.get(i);s||r.set(i,s=new Set),s.add(e[a]),t.changed?n(o).changed++:n(o),i=o}n(i).files.push(t),t.changed&&n(``).changed++}for(let[e,t]of r)n(e).dirs=[...t].sort((e,t)=>e.localeCompare(t));for(let e of t.values())e.files.sort((e,t)=>e.display.localeCompare(t.display));return t}function Qu(e){let t=e.split(`/`);return t.slice(0,-1).map((e,n)=>t.slice(0,n+1).join(`/`))}function $u(e,t,n=200){let r=t.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return[];let i=r[r.length-1],a=[];for(let t of e){let e=t.display.toLowerCase();if(!r.every(t=>e.includes(t)))continue;let n=e.slice(e.lastIndexOf(`/`)+1),o=(n.startsWith(i)?0:n.includes(i)?2:4)+ +!t.changed;a.push({e:t,score:o})}return a.sort((e,t)=>e.score-t.score||e.e.display.length-t.e.display.length||e.e.display.localeCompare(t.e.display)),a.slice(0,n).map(e=>e.e)}var ed=c(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=new RegExp(y(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],(e[0]===`(`||/^\(\?[<']/.test(e[0]))&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},ee={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},N={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},F=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=F(`//`,`$`),te=F(`/\\*`,`\\*/`),ne=F(`#`,`$`),L=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:F,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:N,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function re(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function R(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ie(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=re,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ae(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function oe(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function se(e,t){e.relevance===void 0&&(e.relevance=1)}var ce=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},z=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],le=`keyword`;function B(e,t,n=le){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,B(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,V(n[0],n[1])]})}}function V(e,t){return t?Number(t):+!H(e)}function H(e){return z.includes(e.toLowerCase())}var ue={},de=e=>{console.error(e)},U=(e,...t)=>{console.log(`WARN: ${e}`,...t)},fe=(e,t)=>{ue[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ue[`${e}/${t}`]=!0)},W=Error();function G(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function pe(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw de(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),W;if(typeof e.beginScope!=`object`||e.beginScope===null)throw de(`beginScope must be object`),W;G(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function me(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw de(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),W;if(typeof e.endScope!=`object`||e.endScope===null)throw de(`endScope must be object`),W;G(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function he(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function ge(e){he(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),pe(e),me(e)}function _e(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[R,oe,ge,ce].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ie,ae,se].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=B(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return ye(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function ve(e){return e?e.endsWithParent||ve(e.starts):!1}function ye(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ve(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var be=`11.12.0`,xe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},Se=i,Ce=a,we=Symbol(`nomatch`),Te=7,Ee=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=ee(n[1]);return t||(U(s.replace(`{}`,n[1])),U(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||ee(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(fe(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),fe(`10.7.0`,`Please use highlight(code, options) instead.
|
|
92
|
+
Click for what work does in the background, and what it decided`,onClick:()=>a(e=>!e),children:(0,K.jsx)(`span`,{className:`wd-activity-dot`+(u.length?` wd-activity-dot-busy`:``),"aria-hidden":!0})}),i&&(0,K.jsxs)(`div`,{className:`wd-activity-panel`,role:`dialog`,"data-popover":!0,"aria-label":`Background activity`,children:[(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Now`}),u.length===0?(0,K.jsx)(`p`,{className:`wd-activity-empty`,children:`Nothing running.`}):u.map(t=>(0,K.jsx)($l,{run:t,onOpenSession:e},t.id))]}),(n?.schedules.length??0)>0&&(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Coming up`}),(0,K.jsx)(`ul`,{className:`wd-activity-list`,children:n.schedules.map(e=>(0,K.jsx)(Xl,{s:e,now:o},e.kind))})]}),(0,K.jsxs)(`section`,{children:[(0,K.jsx)(`h3`,{className:`wd-legend-title`,children:`Recent`}),(n?.recent.length??0)===0?(0,K.jsx)(`p`,{className:`wd-activity-empty`,children:`Nothing yet.`}):Gl(n.recent).map(t=>(0,K.jsx)($l,{run:t,onOpenSession:e},t.id))]})]})]})}function Xl({s:e,now:t}){let n=e.pausedUntil&&Date.parse(e.pausedUntil)>t;return(0,K.jsxs)(`li`,{className:`wd-activity-schedule`,children:[(0,K.jsx)(`span`,{className:`wd-activity-name`,children:e.label}),` `,(0,K.jsx)(`span`,{className:`wd-activity-muted`,children:n?(0,K.jsxs)(`span`,{className:`wd-activity-warn`,children:[`resting until `,ql(e.pausedUntil),`: `,e.pausedWhy]}):(0,K.jsxs)(K.Fragment,{children:[Jl(e.everyMs),e.nextAt?` · next ${Kl(e.nextAt,t)}`:``]})})]})}var Zl={running:``,done:`✓`,failed:`✗`,skipped:`⏸`},Ql=4;function $l({run:e,onOpenSession:t}){let[n,r]=(0,_.useState)(!1),i=n?e.notes:e.notes.slice(0,Ql);return(0,K.jsxs)(`div`,{className:`wd-activity-run wd-activity-run-${e.status}`,children:[(0,K.jsxs)(`div`,{className:`wd-activity-head`,children:[e.status===`running`?(0,K.jsx)(`span`,{className:`wd-activity-spinner`,"aria-hidden":!0}):(0,K.jsx)(`span`,{className:`wd-activity-mark`,children:Zl[e.status]}),(0,K.jsx)(`span`,{className:`wd-activity-name`,children:e.label}),e.status===`running`&&e.progress&&e.progress.total>0&&(0,K.jsx)(`progress`,{className:`wd-activity-progress`,max:e.progress.total,value:e.progress.done,"aria-label":`${e.progress.done} of ${e.progress.total}`}),(0,K.jsxs)(`span`,{className:`wd-activity-muted wd-activity-when`,children:[e.status===`running`?`started ${Fs(e.startedAt)}`:Fs(e.endedAt??e.startedAt),e.repeats?` · ×${e.repeats+1}`:``]})]}),e.summary&&(0,K.jsx)(`div`,{className:`wd-activity-summary`,children:e.summary}),i.length>0&&(0,K.jsxs)(`ul`,{className:`wd-activity-notes`,children:[i.map((e,n)=>(0,K.jsx)(`li`,{className:`wd-activity-note wd-activity-note-${e.level}`,children:e.sessionId?(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(e.sessionId),title:`Open this session`,children:e.text}):e.text},n)),e.notes.length>Ql&&(0,K.jsx)(`li`,{children:(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-activity-more`,onClick:()=>r(e=>!e),children:n?`Show fewer`:`Show all ${e.notes.length}`})})]})]})}var eu=`2.3.0`;function tu(e){let t=e?.available;if(t)return t.how===`restart`?`${t.version} is ready to install`:t.how===`downloading`?`downloading ${t.version}${typeof t.progress==`number`?` (${t.progress}%)`:``}`:`${t.version} is out`;let n=e?.desktop;return n?.state===`failed`?`couldn't update: ${n.error??`unknown`}`:null}function nu({updates:e,onCheck:t,checking:n,note:r,onWhatsNew:i,onShortcuts:a,onRestart:o,mismatch:s,agents:c,onRestartAgents:l,restartingAgents:u,agentsNote:d,agentNames:f=[],onOpenSession:p,taskbarFlash:m}){let[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(!1),t=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,t)}},[h]);let y=e?.running??`2.3.0`,b=tu(e),x=e?.available?.how===`restart`&&!!o,S=Co(c),C=c&&S&&l?wo(c):null,w=e=>()=>{g(!1),e?.()};return(0,K.jsxs)(`div`,{className:`wd-help`,ref:v,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-help-btn`+(e?.available||S?` wd-help-btn-update`:``),"aria-expanded":h,"aria-label":`Help: work v${y}${b?`, ${b}`:``}${s?`, work web is v${s.server}`:``}`,title:`work v${y}${b?` · ${b}`:``}${s?`\n⚠ ${No(s)}`:``}\nHelp: updates, what's new, keyboard shortcuts`,onClick:()=>g(e=>!e),children:[s&&(0,K.jsx)(`span`,{className:`wd-help-mismatch`,"aria-hidden":`true`,children:`⚠`}),`v`,y]}),h&&(0,K.jsxs)(`div`,{className:`wd-help-panel`,role:`dialog`,"data-popover":!0,"aria-label":`Help`,children:[(0,K.jsxs)(`p`,{className:`wd-help-version`,children:[`work v`,y,b&&(0,K.jsxs)(`span`,{className:`wd-help-status`,children:[` · `,b]})]}),s&&(0,K.jsxs)(`p`,{className:`wd-help-mismatch-note`,role:`note`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,children:`⚠ `}),No(s)]}),e?.available?.how===`downloading`&&typeof e.available.progress==`number`&&(0,K.jsx)(Xt,{value:e.available.progress}),x&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item wd-help-restart`,onClick:w(o),children:`Restart to update`}),S&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:S}),S&&(0,K.jsx)(es,{names:f,onOpen:p&&(e=>{g(!1),p(e)})}),C&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,disabled:u,onClick:l,children:u?`Restarting…`:`${C} — each picks up its conversation`}),c&&S&&!C&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:To(c)}),d&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:d}),t&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,disabled:n,onClick:t,children:n?`Checking…`:`Check for updates`}),r&&(0,K.jsx)(`p`,{className:`wd-help-note`,children:r}),i&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-menu-item`,onClick:w(i),children:`What's new`}),m&&(0,K.jsxs)(`label`,{className:`wd-help-toggle`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:m.on,onChange:e=>m.set(e.target.checked)}),(0,K.jsx)(`span`,{children:`Flash the taskbar when a session needs you`})]}),a&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-row-menu-item`,onClick:w(a),children:[`Keyboard shortcuts `,(0,K.jsx)(`kbd`,{children:`?`})]})]})]})}function ru({selected:e,hidden:t=0,actions:n,onRun:r,onClear:i,busy:a,sections:o=[]}){let[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),v=e.filter(e=>!e.archivedAt),y=e.filter(e=>!!e.archivedAt);return(0,K.jsxs)(`div`,{className:`wd-bulk-bar`,role:`toolbar`,"aria-label":`Act on the ticked sessions`,children:[(0,K.jsxs)(`span`,{className:`wd-bulk-count`,children:[e.length,` selected`]}),t>0&&(0,K.jsxs)(`span`,{className:`wd-bulk-hidden`,title:`Ticked, but hidden by the filter or search: the bar leaves them out`,children:[`(+`,t,` hidden, not included)`]}),a?(0,K.jsx)(`span`,{className:`wd-bulk-busy`,children:a}):s===`send`?(0,K.jsxs)(`form`,{className:`wd-bulk-send`,onSubmit:e=>{e.preventDefault(),l.trim()&&(r(`Sent to`,e=>n.send(e,l.trim()),v),u(``),c(null))},children:[(0,K.jsx)(`textarea`,{autoFocus:!0,value:l,onChange:e=>u(e.target.value),placeholder:`What to tell ${v.length===1?`its Claude`:`their ${v.length} Claudes`} (delivered like a review comment: now in a terminal the dashboard owns, else on its next turn)`,rows:2,"aria-label":`Prompt to send`}),(0,K.jsxs)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:!l.trim()||v.length===0,children:[`Send to `,v.length]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(null),children:`Cancel`})]}):s===`delete`?(0,K.jsxs)(`span`,{className:`wd-bulk-confirm`,role:`alert`,children:[`Delete `,e.length,` session`,e.length===1?``:`s`,`? A worktree goes only where nothing would be lost; the others are refused and listed.`,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-danger`,onClick:()=>{c(null),r(`Deleted`,e=>n.remove(e),e)},children:`Delete`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(null),children:`Cancel`})]}):(0,K.jsxs)(K.Fragment,{children:[v.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(`Archived`,e=>n.archive(e),v),children:[`Archive `,v.length]}),y.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(`Restored`,e=>n.restore(e),y),children:[`Restore `,y.length]}),v.length>0&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();f({x:t.left,y:t.bottom+2})},children:[`Snooze `,v.length,` ▾`]}),v.length>0&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>c(`send`),children:`Send a prompt…`}),v.length>0&&n.place&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();g({x:t.left,y:t.bottom+2})},title:`Pin them, or put them under one of the rail's sections`,children:`Rail ▾`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-bulk-delete`,onClick:()=>c(`delete`),children:`Delete…`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:i,children:`Clear`})]}),d&&(0,K.jsx)(ns,{x:d.x,y:d.y,onClose:()=>f(null),items:[[`2 hours`,`2h`],[`Until tomorrow 9:00`,`tomorrow`],[`Until it changes`,`change`]].map(([e,t])=>({label:e,run:()=>r(`Snoozed`,e=>n.snooze(e,t),v)})).concat([{label:`Until…`,run:()=>m(!0)}])}),h&&n.place&&(0,K.jsx)(ns,{x:h.x,y:h.y,onClose:()=>g(null),items:[{label:`Pin ${v.length}`,run:()=>r(`Pinned`,e=>n.place(e,{pinned:!0}),v)},{label:`Unpin ${v.length}`,run:()=>r(`Unpinned`,e=>n.place(e,{pinned:!1}),v)},...o.map((e,t)=>({label:`Move to “${e.name}”`,run:()=>r(`Moved to “${e.name}”`,t=>n.place(t,{pinned:!1,section:e.id}),v),...t===0?{separated:!0}:{}})),...o.length?[{label:`Out of their section`,run:()=>r(`Took out of their section`,e=>n.place(e,{section:null}),v)}]:[]]}),p&&(0,K.jsx)(Ps,{count:v.length,onClose:()=>m(!1),onPick:e=>{m(!1),r(`Snoozed`,t=>n.snooze(t,{until:e}),v)}})]})}async function iu(e,t,n={}){let r=Array(e.length),i=0,a=0;return await Promise.all(Array.from({length:Math.min(n.concurrency??3,e.length)},async()=>{for(let o=i++;o<e.length;o=i++){try{await t(e[o]),r[o]={id:e[o],ok:!0}}catch(t){r[o]={id:e[o],ok:!1,error:t.message}}n.onProgress?.(++a,e.length)}})),r}function au(e,t,n){let r=t.filter(e=>e.ok).length,i=t.filter(e=>!e.ok);if(i.length===0)return`${e} ${r}.`;let a=i.slice(0,3).map(e=>`${n(e.id)} — ${e.error??`refused`}`).join(`; `);return`${e} ${r}; ${i.length} refused: ${a}${i.length>3?` (and ${i.length-3} more)`:``}`}function ou(e,t=!1){let n=new Map;for(let t of e){let e=n.get(t.target);e||(e={key:t.target,isGroup:t.isGroup,repos:[],sessions:[]},n.set(t.target,e)),e.sessions.push(t);for(let n of su(t))e.repos.includes(n)||e.repos.push(n)}let r=[...n.values()];return t&&r.sort((e,t)=>e.key.toLowerCase().localeCompare(t.key.toLowerCase())),r}function su(e){return!e.isGroup||e.paths.length<2?[]:e.paths.map(e=>{let t=e.split(/[\\/]+/).filter(Boolean);return t[t.length-1]??e})}var cu={you:`by you`,shipped:`merged with Ship`,"pr-merged":`PR merged`,cleanup:`Clean up`},lu={you:`you archived it`,shipped:`Ship merged its pull request and archived it`,"pr-merged":`its pull request merged, so work archived it`,cleanup:`archived from Clean up`};function uu(e){let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{day:`numeric`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}function du(e){let t=e.archivedAt?uu(e.archivedAt):``;if(!t)return``;let n=e.archive?.by?lu[e.archive.by]:null;return`Archived ${t}${n?` — ${n}`:``}.`}function fu(e,t=Date.now()){let n=Fs(e,t);return n?n===`just now`?`Last active just now.`:`Last active ${n} ago.`:``}function pu(e,t,n){return n&&e.archivedAt?e.archivedAt:t}function mu(e,t=Date.now()){let n=t-Date.parse(e);return n<6048e5?n<864e5?`now`:`week`:Number.isFinite(n)?`older`:`now`}var hu={archive:e=>D(e.id,!0,()=>!1),restore:e=>D(e.id,!1,()=>!1),snooze:(e,t)=>U(e,t),send:(e,t)=>W(e.id,t),remove:e=>wn(e.id,{}),place:(e,t)=>ze(e.id,t)},gu=`work-web:sessions-grouping`,_u=`work-web:sessions-show-archived`,vu={live:`Live`,archived:`Archived`,all:`All`};function yu(){try{let e=localStorage.getItem(_u);return e===`archived`||e===`all`?e:e===`1`?`all`:`live`}catch{return`live`}}function bu(e,t){try{localStorage.setItem(e,t)}catch{}}var xu={all:`all`,needs:`needs you`,working:`working`,idle:`idle`,stale:`stale`};function Su({layout:e,sessions:t,onOpenSession:n,onNewWorktree:r,onDeleteSession:i,menuFor:a,onCleanUp:o,bulk:s=hu,viewToggle:c,onShowArchived:l,archivedLoaded:u=!0}){let[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(()=>new Set),h=e=>{f(e),e||m(new Set)},[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),x=(e,t)=>{b(null),D(e.id,t).catch(e=>!O(e)&&b(e.message))},S=e=>a?a(e):[vt(e)?{label:`Restore`,run:()=>x(e,!1)}:{label:`Archive`,run:()=>x(e,!0)},{label:`Delete…`,run:()=>i(e),danger:!0,separated:!0}],[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(null),k=(e,t)=>m(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r}),A=t.filter(e=>p.has(e.id)),j=(e,t,n)=>{let r=new Map(n.map(e=>[e.id,e]));E(null),w(`${e} 0/${n.length}…`),iu([...r.keys()],e=>t(r.get(e)),{onProgress:(t,n)=>w(`${e} ${t}/${n}…`)}).then(t=>{w(null),E(au(e,t,e=>r.get(e)?.branch??e)),m(new Set(t.filter(e=>!e.ok).map(e=>e.id)))})},[M,ee]=(0,_.useState)(`recent`),[N,P]=(0,_.useState)(`all`),[F,I]=(0,_.useState)(`any`),te=e??ft,ne=(0,_.useMemo)(()=>{let e=new Map;for(let n of pt(t.filter(e=>!vt(e)),te))for(let t of n.sessions)e.set(t.id,n);return e},[t,te]),L=(0,_.useCallback)(e=>{if(F===`any`)return!0;let t=ne.get(e.id);return F===`pinned`?t?.key===`pinned`:F===`none`?!t||t.key===`rest`:t?.key===F},[F,ne]),[re,R]=(0,_.useState)(``),[ie,ae]=(0,_.useState)(()=>{try{let e=localStorage.getItem(gu);return e===`project`||e===`none`||e===`section`?e:`age`}catch{return`age`}}),[oe,se]=(0,_.useState)(!1),[ce,z]=(0,_.useState)(yu),le=ce!==`live`,B=e=>{ae(e),bu(gu,e)},V=e=>{z(e),bu(_u,e)};(0,_.useEffect)(()=>(l?.(le),()=>l?.(!1)),[le]);let H=(0,_.useMemo)(()=>t.filter(e=>!vt(e)),[t]),ue=(0,_.useMemo)(()=>t.filter(e=>vt(e)),[t]),de=ue.length,U=(0,_.useMemo)(()=>{let e={now:0,week:0,older:0};for(let t of H)e[ot(t)]++;return e},[H]),fe=(0,_.useMemo)(()=>[...(ce===`archived`?ue:ce===`all`?t:H).filter(e=>(N===`all`||st(tt(e))===N)&&L(e)&&Ct(e,re))].sort((e,t)=>{if(M===`name`){let n=(e.branch||e.target).toLowerCase(),r=(t.branch||t.target).toLowerCase();return n.localeCompare(r)}let n=ce===`archived`;return pu(t,et(t),n).localeCompare(pu(e,et(e),n))}),[t,H,ue,ce,M,N,re,L]),W=fe.filter(e=>p.has(e.id)),G=A.length-W.length;(0,_.useEffect)(()=>{let e=new Set(t.map(e=>e.id));m(t=>[...t].every(t=>e.has(t))?t:new Set([...t].filter(t=>e.has(t))))},[t]);let pe=(0,_.useMemo)(()=>ie===`project`?ou(fe,M===`name`):null,[fe,ie,M]),me=(0,_.useMemo)(()=>{if(ie!==`section`)return null;let e=pt(fe.filter(e=>!vt(e)),te).filter(e=>e.sessions.length>0),t=fe.filter(e=>vt(e));return t.length?[...e,{key:`archived`,title:`Archived`,sessions:t}]:e},[fe,ie,te]),he=(0,_.useMemo)(()=>{if(ie!==`age`)return null;let e={now:[],week:[],older:[]};for(let t of fe)e[ce===`archived`&&t.archivedAt?mu(t.archivedAt):ot(t)].push(t);return Object.keys(e).map(t=>({key:t,sessions:e[t]})).filter(e=>e.sessions.length>0)},[fe,ie,ce]),ge=e=>{let t=ne.get(e.id);return t?.key===`pinned`?`📌`:t?.sectionId?t.title:null},_e=e=>(0,K.jsxs)(`table`,{className:`wd-session-table`+(d?` wd-session-table-selecting`:``),children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[d&&(0,K.jsx)(`th`,{className:`wd-st-col-pick`,children:(0,K.jsx)(`input`,{type:`checkbox`,"aria-label":`Select all shown`,checked:e.length>0&&e.every(e=>p.has(e.id)),onChange:t=>{let n=t.target.checked;m(t=>{let r=new Set(t);for(let t of e)n?r.add(t.id):r.delete(t.id);return r})}})}),(0,K.jsx)(`th`,{className:`wd-st-col-status`,children:`Status`}),(0,K.jsx)(`th`,{children:`Session`}),(0,K.jsx)(`th`,{className:`wd-st-col-project`,children:`Project`}),(0,K.jsx)(`th`,{className:`wd-st-col-summary`,children:`Summary`}),(0,K.jsx)(`th`,{className:`wd-st-col-changes`,children:`Changes`}),(0,K.jsx)(`th`,{className:`wd-st-col-when`,children:ce===`archived`?`Archived`:`Active`}),(0,K.jsx)(`th`,{className:`wd-st-col-more`,children:(0,K.jsx)(`span`,{className:`wd-visually-hidden`,children:`Actions`})})]})}),(0,K.jsx)(`tbody`,{children:e.map(e=>(0,K.jsx)(Eu,{session:e,archivedView:ce===`archived`,onOpen:()=>n(e.id,`term`),onMenu:(t,n)=>v({s:e,x:t,y:n}),selecting:d,picked:p.has(e.id),onPick:t=>k(e.id,t),railTag:ge(e),onRestore:()=>x(e,!1)},e.id))})]});return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-sessions`,children:[y&&(0,K.jsxs)(`p`,{className:`wd-tab-error`,role:`alert`,children:[y,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>b(null),children:`Dismiss`})]}),(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsxs)(`h1`,{children:[`Sessions `,c,` `,(0,K.jsx)(`span`,{className:`wd-tab-header-muted`,children:ce===`archived`?`${de} archived`:[U.now?`${U.now} now`:``,U.week?`${U.week} this week`:``,U.older?`${U.older} older`:``].filter(Boolean).join(` · `)})]}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[(0,K.jsx)(`span`,{className:`wd-segmented`,role:`group`,"aria-label":`Which sessions`,children:[`live`,`archived`,`all`].map(e=>(0,K.jsxs)(`button`,{type:`button`,className:`wd-segmented-btn`+(ce===e?` wd-segmented-btn-on`:``),"aria-pressed":ce===e,onClick:()=>V(e),title:e===`live`?`The sessions you work on`:e===`archived`?`Archived sessions, to look back or restore one`:`Live and archived together`,children:[vu[e],e===`archived`&&le&&de>0?` ${de}`:``]},e))}),(0,K.jsx)(`input`,{className:`wd-tab-search`,type:`search`,placeholder:`Search branch, repo, words…`,"aria-label":`Search sessions`,value:re,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key===`Escape`&&R(``)}}),(0,K.jsxs)(wu,{children:[(0,K.jsxs)(`label`,{children:[`Show`,(0,K.jsx)(`select`,{value:N,onChange:e=>P(e.target.value),"aria-label":`Status filter`,children:Object.keys(xu).map(e=>(0,K.jsx)(`option`,{value:e,children:xu[e]},e))})]}),(te.sections.length>0||Object.keys(te.places).length>0)&&(0,K.jsxs)(`label`,{children:[`Rail`,(0,K.jsxs)(`select`,{value:F,onChange:e=>I(e.target.value),"aria-label":`Rail filter`,children:[(0,K.jsx)(`option`,{value:`any`,children:`any`}),(0,K.jsx)(`option`,{value:`pinned`,children:`pinned`}),te.sections.map(e=>(0,K.jsx)(`option`,{value:`section:${e.id}`,children:e.name},e.id)),(0,K.jsx)(`option`,{value:`none`,children:`in no section`})]})]}),(0,K.jsxs)(`label`,{children:[`Group`,(0,K.jsxs)(`select`,{value:ie,onChange:e=>B(e.target.value),"aria-label":`Group by`,children:[(0,K.jsx)(`option`,{value:`age`,children:`age`}),(0,K.jsx)(`option`,{value:`project`,children:`project`}),(0,K.jsx)(`option`,{value:`section`,children:`rail section`}),(0,K.jsx)(`option`,{value:`none`,children:`none`})]})]}),(0,K.jsxs)(`label`,{children:[`Sort`,(0,K.jsxs)(`select`,{value:M,onChange:e=>ee(e.target.value),"aria-label":`Sort by`,children:[(0,K.jsx)(`option`,{value:`recent`,children:`recent`}),(0,K.jsx)(`option`,{value:`name`,children:`name`})]})]}),(0,K.jsxs)(`label`,{className:`wd-tab-check`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:d,onChange:e=>h(e.target.checked)}),` Select several`]})]}),o&&(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:o,title:`Find worktrees that are safe to remove`,children:`Clean up`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:r,children:`New`})]})]}),(W.length>0||C)&&(0,K.jsx)(ru,{selected:W,hidden:G,actions:s,onRun:j,onClear:()=>m(new Set),busy:C,sections:te.sections}),T&&(0,K.jsxs)(`p`,{className:`wd-bulk-outcome`,role:`status`,children:[T,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>E(null),children:`OK`})]}),fe.length===0?(0,K.jsx)(`div`,{className:`wd-tab-empty`,children:ce!==`live`&&!u&&de===0?`Loading archived sessions…`:ce===`archived`&&de===0?`No archived sessions.`:t.length===0?'No worktrees yet. Run `work tree <target> <branch>` in any terminal, or click "New worktree" above.':`No sessions match the current filter.`}):me?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:me.map(e=>(0,K.jsxs)(`section`,{className:`wd-session-group`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:e.title??`Not in a section`}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]})]}),_e(e.sessions)]},e.key))}):he?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:he.map((e,t,n)=>{let r=e=>e.key===`older`&&!oe&&re.trim()===``&&ce!==`archived`;return r(e)?(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-session-older`,onClick:()=>se(!0),children:[`Show `,e.sessions.length,` older`]},e.key):(0,K.jsxs)(`section`,{className:`wd-session-group wd-session-age wd-session-age-${e.key}`,children:[n.filter(e=>!r(e)).length>1&&(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:at[e.key]}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]}),e.key===`older`&&re.trim()===``&&ce!==`archived`&&(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-session-age-toggle`,onClick:()=>se(!1),children:`Hide`})]}),_e(e.sessions)]},e.key)})}):pe?(0,K.jsx)(`div`,{className:`wd-session-groups`,children:pe.map(e=>(0,K.jsxs)(`section`,{className:`wd-session-group`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-header`,children:[(0,K.jsx)(`span`,{className:`wd-session-group-name`,children:e.key}),e.isGroup&&(0,K.jsx)(`span`,{className:`wd-session-group-kind`,title:`Multi-repo group`,children:`group`}),e.repos.length>0&&(0,K.jsx)(`ul`,{className:`wd-session-group-repos`,"aria-label":`Repos in this group`,children:e.repos.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,e.sessions.length,`)`]})]}),_e(e.sessions)]},e.key))}):(0,K.jsx)(`div`,{className:`wd-session-table-wrap`,children:_e(fe)}),(0,K.jsx)(Cu,{query:re,onOpen:e=>n(e,`diff`)}),g&&(0,K.jsx)(ns,{x:g.x,y:g.y,items:S(g.s),onClose:()=>v(null)})]})}function Cu({query:e,onOpen:t}){let[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{s(null);let t=e.trim();if(t.length<2){r([]);return}let n=!0,i=setTimeout(()=>{ve(t).then(e=>n&&r(e),()=>n&&r([]))},300);return()=>{n=!1,clearTimeout(i)}},[e]),n.length===0?null:(0,K.jsxs)(`section`,{className:`wd-session-group wd-archive-hits`,children:[(0,K.jsxs)(`h2`,{className:`wd-session-group-title`,children:[`In conversations (`,n.length,`)`]}),(0,K.jsx)(`ul`,{className:`wd-archive-hit-list`,children:n.map(e=>(0,K.jsxs)(`li`,{className:`wd-archive-hit`,children:[(0,K.jsxs)(`div`,{className:`wd-archive-hit-head`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(e.sessionId),children:[e.target,` · `,e.branch]}),(0,K.jsx)(`span`,{className:`wd-tab-header-muted`,children:e.archived&&e.archivedAt?` archived ${Fs(e.archivedAt)}${e.worktreeRemoved?` · folder removed`:``}`:e.lastAt?` ${Fs(e.lastAt)}`:``}),e.archived&&(0,K.jsx)(`button`,{type:`button`,className:`wd-row-action`,disabled:i!==null,title:e.worktreeRemoved?`Recreate its worktree from the branch and continue the conversation`:`Bring it back`,onClick:()=>{a(e.sessionId),s(null),D(e.sessionId,!1).catch(t=>!O(t)&&s({id:e.sessionId,text:t.message})).finally(()=>a(null))},children:i===e.sessionId?`Restoring…`:`Restore`})]}),o?.id===e.sessionId&&(0,K.jsx)(`p`,{className:`wd-archive-hit-error`,role:`alert`,children:o.text}),e.snippets.map((e,t)=>(0,K.jsxs)(`p`,{className:`wd-archive-hit-snippet`,children:[(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[e.role===`you`?`You`:e.role===`summary`?`Summary`:`Claude`,`:`]}),` `,e.text]},t))]},e.sessionId))})]})}function wu({children:e}){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(!t)return;let e=e=>e.key===`Escape`&&n(!1),i=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`mousedown`,i),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`mousedown`,i)}},[t]),(0,K.jsxs)(`div`,{className:`wd-view-menu`,ref:r,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,"aria-expanded":t,"aria-haspopup":`true`,onClick:()=>n(e=>!e),children:`View ▾`}),t&&(0,K.jsx)(`div`,{className:`wd-view-menu-panel`,role:`group`,"aria-label":`View`,children:e})]})}function Tu(e){let t=e.context;if(!t||t.window<=0)return null;let n=Math.min(1,t.used/t.window);return n>=.7?`${Math.round(n*100)}% full`:null}function Eu({session:e,onOpen:t,onMenu:n,selecting:r,picked:i,onPick:a,railTag:o,onRestore:s,archivedView:c=!1}){let l=tt(e),u=vt(e),d=su(e),f=w(e.id),p=Tu(e),m=e.titleIsYours&&!!e.title;return(0,K.jsxs)(`tr`,{className:`wd-session-row`+(u?` wd-session-row-archived`:``)+(l===`needs_input`||l===`done`?` wd-session-row-unseen`:``),onClick:t,onContextMenu:e=>{e.preventDefault(),n(e.clientX,e.clientY)},tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},children:[r&&(0,K.jsx)(`td`,{className:`wd-st-col-pick`,onClick:e=>e.stopPropagation(),children:(0,K.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked),"aria-label":`Select ${e.target} ${e.branch}`})}),(0,K.jsx)(`td`,{className:`wd-st-col-status`,children:(0,K.jsxs)(`span`,{className:`wd-st-status`,title:lt(l),children:[(0,K.jsx)(Mt,{kind:l,muted:!!e.snoozed}),(0,K.jsx)(`span`,{className:`wd-st-label`,children:nt[l]})]})}),(0,K.jsxs)(`td`,{className:`wd-st-session`,children:[(0,K.jsx)(`span`,{className:`wd-st-branch`,title:m?`${e.title} (${e.branch})`:e.branch,children:m?e.title:e.branch||`(base)`}),o&&(0,K.jsx)(`span`,{className:`wd-st-rail`+(o===`📌`?` wd-st-rail-pin`:``),title:o===`📌`?`Pinned in the rail`:`In the rail's “${o}” section`,children:o}),p&&(0,K.jsx)(`span`,{className:`wd-st-full`,title:`The conversation is ${p}: start fresh for the next task (work tree … --fresh, or /clear)`,children:p}),u&&(0,K.jsxs)(`span`,{className:`wd-archived-pill`,title:[du(e),e.archive?e.archive.worktreeRemoved?`Worktree removed; its branch and the conversation are kept${e.archive.savedUncommitted?`, and ${e.archive.savedUncommitted} uncommitted file${e.archive.savedUncommitted===1?``:`s`}`:``}. Restore recreates it${e.archive.savedUncommitted?` and puts them back`:``}.${e.archive.kept?` Also kept: ${e.archive.kept}.`:``}`:`Worktree kept: ${e.archive.keptBecause??`it has work in it`}${e.archive.kept?`. Also kept: ${e.archive.kept}.`:``}`:``].filter(Boolean).join(` `)||`Archived`,children:[`archived`,e.archive?.by?` · ${cu[e.archive.by]}`:``,e.archive?.worktreeRemoved?` · folder removed${e.archive.savedUncommitted?` · ${e.archive.savedUncommitted} changes saved`:``}`:``]})]}),(0,K.jsxs)(`td`,{className:`wd-st-col-project`,children:[(0,K.jsx)(`span`,{className:`wd-st-target`,children:e.target}),` `,e.isGroup&&(0,K.jsx)(`span`,{className:`wd-session-group-kind wd-session-group-kind-hint`,title:d.length?`Multi-repo group: ${d.join(`, `)}`:`Multi-repo group`,children:`group`})]}),(0,K.jsx)(`td`,{className:`wd-st-col-summary`,children:(()=>{let t=e.attention?.summary??(u?e.archive?.written??e.archive?.lastSummary??e.archive?.prompts[0]:void 0)??``;return(0,K.jsx)(`span`,{className:`wd-st-summary`,title:t,children:t})})()}),(0,K.jsxs)(`td`,{className:`wd-st-col-changes`,children:[(0,K.jsx)(hl,{session:e}),e.overlaps?.length?(0,K.jsx)(`span`,{className:`wd-st-overlap`,title:_l(e),"aria-label":`Changes the same files as another session`,children:`⚠`}):null]}),(0,K.jsx)(`td`,{className:`wd-st-col-when`,title:u&&[du(e),fu(et(e))].filter(Boolean).join(` `)||void 0,children:f===void 0?Fs(pu(e,et(e),c)):f?`archiving…`:`restoring…`}),(0,K.jsxs)(`td`,{className:`wd-st-col-more`,onClick:e=>e.stopPropagation(),children:[u&&s&&f===void 0&&(0,K.jsx)(`button`,{type:`button`,className:`wd-st-restore`,onClick:s,title:`Bring it back: its worktree, branch and conversation`,children:`Restore`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-st-more`,"aria-label":`Actions for ${e.target} ${e.branch}`,title:`Archive, snooze, open in a terminal, delete…`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();n(t.left,t.bottom+4)},children:`⋯`})]})]})}function Du(e){return e.isDraft?{text:`Draft`,tone:`muted`}:e.conflicting?{text:`Merge conflict`,tone:`bad`}:e.checksStatus===`FAILURE`?{text:`Checks failing`,tone:`bad`}:e.reviewDecision===`CHANGES_REQUESTED`?{text:`Changes requested`,tone:`bad`}:e.reviewDecision===`APPROVED`?{text:`Approved`,tone:`good`}:e.checksStatus===`PENDING`?{text:`Checks running`,tone:`muted`}:e.reviewDecision===`REVIEW_REQUIRED`?{text:`Review needed`,tone:`muted`}:{text:`Open`,tone:`muted`}}function Ou(e,t,n){return t.find(t=>!vt(t)&&wt(t,[e],n).length>0)}function ku(e){return!e.isMine&&!!e.reviewRequested&&e.myReview===`NONE`}function Au(e){let t=new Map;for(let n of e)t.set(n.repoAlias,(t.get(n.repoAlias)??0)+1);return[...t].map(([e,t])=>({repo:e,count:t})).sort((e,t)=>t.count-e.count||e.repo.localeCompare(t.repo))}function ju(e,t){let n=t.filter(t=>e.some(e=>e.repoAlias===t));return n.length?e.filter(e=>n.includes(e.repoAlias)):e}var Mu=`work:start-repos`;function Nu(){try{let e=JSON.parse(localStorage.getItem(Mu)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function Pu(e){try{localStorage.setItem(Mu,JSON.stringify(e))}catch{}}function Fu({sessions:e,onNewWorktree:t,onPickPr:n,onWorkOnPr:r,onOpenSession:i,onManageRepos:a,prs:o,prsNote:s=null,membersOf:c}){let l=(o??[]).filter(e=>e.isMine),u=(o??[]).filter(ku),d=Au([...l,...u]),[f,p]=(0,_.useState)(Nu),m=f.filter(e=>d.some(t=>t.repo===e)),h=e=>{p(e),Pu(e)},g=e=>h(m.includes(e)?m.filter(t=>t!==e):[...m,e]),v=ju(l,m),y=ju(u,m),b=e=>e?(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-start-existing`,onClick:()=>i(e.id),title:`Open the session on it`,children:[e.titleIsYours&&e.title?e.title:e.branch,` →`]}):null;return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-start`,children:[(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsx)(`h1`,{children:`Start work`}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[a&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:a,children:`Repos & groups`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:t,children:`New worktree`})]})]}),d.length>1&&(0,K.jsxs)(`div`,{className:`wd-start-filter`,role:`group`,"aria-label":`Show pull requests in`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-start-chip`,"aria-pressed":m.length===0,onClick:()=>h([]),children:`All`}),d.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:`wd-start-chip`,"aria-pressed":m.includes(e.repo),onClick:()=>g(e.repo),title:m.includes(e.repo)?`Stop showing only ${e.repo}`:`Show ${e.repo}'s pull requests${m.length?` too`:` only`}`,children:[e.repo,` `,(0,K.jsx)(`span`,{className:`wd-start-chip-count`,children:e.count})]},e.repo))]}),(0,K.jsxs)(`section`,{className:`wd-start-section`,"aria-label":`Your pull requests`,children:[(0,K.jsx)(`h2`,{className:`wd-start-title`,children:`Your pull requests · GitHub`}),s&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:s}),!s&&o===null&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:`Loading…`}),!s&&o!==null&&v.length===0&&(0,K.jsx)(`p`,{className:`wd-start-note`,children:m.length?`No open pull requests of yours in ${m.join(`, `)}.`:`No open pull requests of yours.`}),(0,K.jsx)(Iu,{prs:v,sessions:e,onPick:n,existing:b,membersOf:c})]}),y.length>0&&(0,K.jsxs)(`section`,{className:`wd-start-section`,"aria-label":`Waiting for your review`,children:[(0,K.jsx)(`h2`,{className:`wd-start-title`,children:`Waiting for your review · GitHub`}),(0,K.jsx)(Iu,{prs:y,sessions:e,onPick:n,onWork:r,existing:b,membersOf:c})]})]})}function Iu({prs:e,sessions:t,onPick:n,onWork:r,existing:i,membersOf:a}){return(0,K.jsx)(`ul`,{className:`wd-start-list`,children:e.map(e=>{let o=Du(e);return(0,K.jsxs)(`li`,{className:`wd-start-row wd-start-row-pr`,children:[(0,K.jsxs)(`a`,{className:`wd-start-key wd-start-key-pr`,href:e.url,target:`_blank`,rel:`noreferrer`,title:`Open on GitHub`,children:[`#`,e.number]}),(0,K.jsxs)(`span`,{className:`wd-start-what`,title:!e.isMine&&e.author?`${e.title} — by @${e.author}`:e.title,children:[(0,K.jsx)(`span`,{className:`wd-start-pr-title`,children:e.title}),!e.isMine&&e.author&&(0,K.jsxs)(`span`,{className:`wd-start-author`,children:[`· by @`,e.author]})]}),(0,K.jsx)(`span`,{className:`wd-start-repo`,title:e.repoAlias,children:e.repoAlias}),(0,K.jsx)(`span`,{className:`wd-start-state wd-start-state-${o.tone}`,children:o.text}),(0,K.jsx)(`span`,{className:`wd-start-action`,children:i(Ou(e,t,a))??(0,K.jsxs)(K.Fragment,{children:[r&&!e.isMine&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>r(e),disabled:e.fork,title:e.fork?`It comes from a fork: its branch isn't on origin, so a session couldn't push to it`:`Work on it on ${e.author?`@${e.author}'s`:`their`} branch: what you push lands in their PR`,children:`Work on it`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>n(e),title:e.isMine?`Continue on it in a worktree`:`Have Claude review it in a worktree (it changes nothing, posts nothing)`,children:e.isMine?`Start`:`Review`})]})})]},`${e.repoAlias}#${e.number}`)})})}function Lu(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,40)||`task`}function Ru({onPick:e}){let[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null);function d(){yn().then(e=>n(e.tasks),()=>{})}(0,_.useEffect)(d,[]),go(`/events`,{events:{"tasks-changed":d}});async function f(e){e.preventDefault();let t=a.trim();if(t)try{let e=await bn(t);n(e.tasks),o(``)}catch{}}async function p(e){try{let t=await xn(e.id,{done:!e.done});n(t.tasks)}catch{}}async function m(e,t){let r=t.trim();if(r&&r!==e.text)try{let t=await xn(e.id,{text:r});n(t.tasks)}catch{}}async function h(e){try{let t=await Sn(e);n(t.tasks)}catch{}}let g=(0,_.useMemo)(()=>r?t:t.filter(e=>!e.done),[t,r]),v=(0,_.useMemo)(()=>{let e=t.filter(e=>!e.done).length;return{open:e,done:t.length-e}},[t]);return(0,K.jsxs)(`div`,{className:`wd-dash-tab-pane wd-tab-tasks`,children:[(0,K.jsxs)(`header`,{className:`wd-tab-header`,children:[(0,K.jsxs)(`h1`,{children:[`Tasks`,` `,(0,K.jsxs)(`span`,{className:`wd-tab-header-muted`,children:[`(`,v.open,` open · `,v.done,` done)`]})]}),(0,K.jsxs)(`div`,{className:`wd-tab-controls`,children:[(0,K.jsxs)(`label`,{children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked)}),` show done`]}),(0,K.jsxs)(`form`,{className:`wd-task-add`,onSubmit:f,children:[(0,K.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`+ Add task…`}),(0,K.jsx)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:!a.trim(),children:`Add`})]})]})]}),g.length===0?(0,K.jsx)(`div`,{className:`wd-tab-empty`,children:t.length===0?"No tasks yet. Add one above, or `work todo add <text>` from a terminal.":`No open tasks — toggle "show done" to see completed ones.`}):(0,K.jsx)(`ul`,{className:`wd-task-list`,children:g.map(t=>(0,K.jsxs)(`li`,{className:`wd-task-row`+(t.done?` wd-task-row-done`:``),onContextMenu:e=>{e.preventDefault(),u({id:t.id,x:e.clientX,y:e.clientY})},children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t.done,onChange:()=>p(t),"aria-label":t.done?`Mark not done`:`Mark done`}),(0,K.jsx)(zu,{task:t,editing:s===t.id,onEdit:()=>c(t.id),onDone:()=>c(null),onSave:e=>m(t,e)}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-task-action`,onClick:()=>e(t),title:`Create worktree (todo/<slug>)`,children:`→ worktree`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-task-action wd-task-remove`,onClick:()=>h(t.id),title:`Delete task`,"aria-label":`Delete task`,children:`×`})]},t.id))}),l&&(0,K.jsx)(ns,{x:l.x,y:l.y,onClose:()=>u(null),items:[{label:`Edit`,hint:`F2`,run:()=>c(l.id)}]})]})}function zu({task:e,editing:t,onEdit:n,onDone:r,onSave:i}){let[a,o]=(0,_.useState)(e.text);if((0,_.useEffect)(()=>{t&&o(e.text)},[t,e.text]),t){let e=e=>{r(),e&&i(a)};return(0,K.jsx)(`input`,{className:`wd-task-edit`,"aria-label":`Task text`,value:a,autoFocus:!0,onChange:e=>o(e.target.value),onBlur:()=>e(!0),onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),e(!0)):t.key===`Escape`&&(t.preventDefault(),e(!1))}})}let s=n;return(0,K.jsx)(`span`,{className:`wd-task-text`,role:`button`,tabIndex:0,onClick:s,onKeyDown:e=>{(e.key===`F2`||e.key===`Enter`)&&(e.preventDefault(),s())},title:`Click to edit`,children:e.text})}function Bu({open:e,onOpenChange:t,onPick:n}){let r=(0,_.useRef)(null),i=(0,_.useRef)(t);return i.current=t,(0,_.useEffect)(()=>{if(!e)return;let t=()=>i.current(!1),n=e=>{e.key===`Escape`&&!document.querySelector(`.wd-row-menu`)&&!e.target.closest?.(`input`)&&t()},a=e=>{let n=e.target;r.current?.contains(n)||n.closest?.(`.wd-row-menu`)||t()};return window.addEventListener(`keydown`,n),window.addEventListener(`mousedown`,a),()=>{window.removeEventListener(`keydown`,n),window.removeEventListener(`mousedown`,a)}},[e]),(0,K.jsxs)(`div`,{className:`wd-tasks-popover`,ref:r,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-topnav-btn`+(e?` wd-topnav-btn-on`:``),"aria-expanded":e,"aria-haspopup":`dialog`,title:`Your tasks (g t)`,onClick:()=>t(!e),children:`Tasks`}),e&&(0,K.jsx)(`div`,{className:`wd-tasks-panel`,role:`dialog`,"aria-label":`Tasks`,"data-popover":!0,children:(0,K.jsx)(Ru,{onPick:e=>{t(!1),n(e)}})})]})}function Vu({value:e,onChange:t}){return(0,K.jsx)(`span`,{className:`wd-segmented`,role:`group`,"aria-label":`Sessions view`,children:[`now`,`today`].map(n=>(0,K.jsx)(`button`,{type:`button`,className:`wd-segmented-btn`+(e===n?` wd-segmented-btn-on`:``),"aria-pressed":e===n,title:n===`now`?`Every session as it stands (g s)`:`What each session did today (g d)`,onClick:()=>t(n),children:n===`now`?`Now`:`Today`},n))})}var Hu=`work:terminal-reconnect`;function Uu(e){window.dispatchEvent(new CustomEvent(Hu,{detail:{id:e}}))}function Wu(e,t){let n=n=>{n.detail?.id===e&&t()};return window.addEventListener(Hu,n),()=>window.removeEventListener(Hu,n)}var Gu={created:`✦`,prompt:`›`,turn:`✓`,commit:`●`,"pr-opened":`⇡`,"pr-merged":`⇣`,"pr-closed":`✕`,archived:`▣`},Ku={created:`Started`,prompt:`You`,turn:`Turn`,commit:`Commit`,"pr-opened":`PR`,"pr-merged":`Merged`,"pr-closed":`Closed`,archived:`Archived`};function qu(e){let t=[];for(let n of e){let e=new Date(n.at).toLocaleDateString([],{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`}),r=t[t.length-1];r?.day===e?r.events.push(n):t.push({day:e,events:[n]})}return t}function Ju({session:e,onOpenTurn:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let t=!0;return r(null),a(null),Se(e.id).then(e=>t&&r(e),e=>t&&a(e.message)),()=>{t=!1}},[e.id,e.lastActivity]),i?(0,K.jsx)(`div`,{className:`wd-tab-empty wd-tab-error`,children:i}):n?(0,K.jsx)(`div`,{className:`wd-timeline`,children:qu(n).map(n=>(0,K.jsxs)(`section`,{className:`wd-timeline-day`,children:[(0,K.jsx)(`h3`,{className:`wd-timeline-day-title`,children:n.day}),(0,K.jsx)(`ol`,{className:`wd-timeline-list`,children:n.events.map((n,r)=>(0,K.jsxs)(`li`,{className:`wd-timeline-event wd-timeline-${n.kind}`,children:[(0,K.jsx)(`span`,{className:`wd-timeline-time`,children:new Date(n.at).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}),(0,K.jsx)(`span`,{className:`wd-timeline-icon`,"aria-hidden":!0,children:Gu[n.kind]}),(0,K.jsx)(`span`,{className:`wd-timeline-kind`,children:Ku[n.kind]}),(0,K.jsxs)(`span`,{className:`wd-timeline-text`,children:[n.kind===`turn`&&n.checkpoint&&t?(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>t(n.checkpoint),title:`Open what this turn changed`,children:n.text}):n.ref?.startsWith(`https://`)?(0,K.jsx)(`a`,{href:n.ref,target:`_blank`,rel:`noreferrer`,children:n.text}):n.text,n.repo&&e.isGroup&&(0,K.jsxs)(`span`,{className:`wd-timeline-repo`,children:[` · `,n.repo]}),n.kind===`commit`&&n.ref&&(0,K.jsx)(`code`,{className:`wd-timeline-sha`,children:n.ref.slice(0,7)})]})]},`${n.at}-${n.kind}-${r}`))})]},n.day))}):(0,K.jsxs)(`div`,{className:`wd-tab-empty`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-spinner`,"aria-hidden":!0}),` Reading its history…`]})}var Yu=(e,t)=>`${e}\u0000${t}`;function Q(e){let t=[];for(let n of e.rootFiles)t.push({key:Yu(``,n),repo:``,path:n,display:n,changed:!1});for(let n of e.repos){let r=new Set(n.changed);for(let i of n.files)t.push({key:Yu(n.name,i),repo:n.name,path:i,display:e.group?`${n.name}/${i}`:i,changed:r.has(i)})}return t}function Xu(e,t,n){let r=n?.get(t);if(r)return r;let i=t.indexOf(`\0`);if(i<0)return null;let a=t.slice(0,i),o=t.slice(i+1);if(!o)return null;if(a===``)return e.group?{key:t,repo:a,path:o,display:o,changed:!1}:null;let s=e.repos.find(e=>e.name===a);return s?{key:t,repo:a,path:o,display:e.group?`${a}/${o}`:o,changed:s.changed.includes(o)}:null}function Zu(e){let t=new Map,n=e=>{let n=t.get(e);return n||t.set(e,n={dirs:[],files:[],changed:0}),n},r=new Map;n(``);for(let t of e){let e=t.display.split(`/`),i=``;for(let a=0;a<e.length-1;a++){let o=i?`${i}/${e[a]}`:e[a],s=r.get(i);s||r.set(i,s=new Set),s.add(e[a]),t.changed?n(o).changed++:n(o),i=o}n(i).files.push(t),t.changed&&n(``).changed++}for(let[e,t]of r)n(e).dirs=[...t].sort((e,t)=>e.localeCompare(t));for(let e of t.values())e.files.sort((e,t)=>e.display.localeCompare(t.display));return t}function Qu(e){let t=e.split(`/`);return t.slice(0,-1).map((e,n)=>t.slice(0,n+1).join(`/`))}function $u(e,t,n=200){let r=t.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return[];let i=r[r.length-1],a=[];for(let t of e){let e=t.display.toLowerCase();if(!r.every(t=>e.includes(t)))continue;let n=e.slice(e.lastIndexOf(`/`)+1),o=(n.startsWith(i)?0:n.includes(i)?2:4)+ +!t.changed;a.push({e:t,score:o})}return a.sort((e,t)=>e.score-t.score||e.e.display.length-t.e.display.length||e.e.display.localeCompare(t.e.display)),a.slice(0,n).map(e=>e.e)}var ed=c(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=new RegExp(y(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],(e[0]===`(`||/^\(\?[<']/.test(e[0]))&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},ee={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},N={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},F=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=F(`//`,`$`),te=F(`/\\*`,`\\*/`),ne=F(`#`,`$`),L=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:F,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:N,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function re(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function R(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ie(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=re,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ae(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function oe(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function se(e,t){e.relevance===void 0&&(e.relevance=1)}var ce=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},z=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],le=`keyword`;function B(e,t,n=le){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,B(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,V(n[0],n[1])]})}}function V(e,t){return t?Number(t):+!H(e)}function H(e){return z.includes(e.toLowerCase())}var ue={},de=e=>{console.error(e)},U=(e,...t)=>{console.log(`WARN: ${e}`,...t)},fe=(e,t)=>{ue[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ue[`${e}/${t}`]=!0)},W=Error();function G(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function pe(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw de(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),W;if(typeof e.beginScope!=`object`||e.beginScope===null)throw de(`beginScope must be object`),W;G(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function me(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw de(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),W;if(typeof e.endScope!=`object`||e.endScope===null)throw de(`endScope must be object`),W;G(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function he(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function ge(e){he(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),pe(e),me(e)}function _e(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[R,oe,ge,ce].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ie,ae,se].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=B(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return ye(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function ve(e){return e?e.endsWithParent||ve(e.starts):!1}function ye(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:ve(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var be=`11.12.0`,xe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},Se=i,Ce=a,we=Symbol(`nomatch`),Te=7,Ee=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=ee(n[1]);return t||(U(s.replace(`{}`,n[1])),U(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||ee(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(fe(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),fe(`10.7.0`,`Please use highlight(code, options) instead.
|
|
93
93
|
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ne(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ne(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(N);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(N),n=``;for(;t;){n+=N.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Te&&(P+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(N)}n+=N.substring(e),M.addText(n)}function f(){if(N===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(N);return}e=v(A.subLanguage,N,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(N,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(P+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),N=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(N=i,d(),N=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(N,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=``):e.beginScope._multi&&(h(e.beginScope,t),N=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(N+=e[0],1):(te=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),p(),!n.returnBegin&&!n.excludeBegin&&(N=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return we;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?N+=t:(a.returnEnd||a.excludeEnd||(N+=t),p(),a.excludeEnd&&(N=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(P+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(N+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(N+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}if(r.type===`end`){let e=C(r);if(e!==we)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(N+=`
|
|
94
94
|
`),1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return N+=a,a.length}let D=ee(e);if(!D)throw de(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=_e(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let N=``,P=0,F=0,I=0,te=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){I++,te?te=!1:A.matcher.considerAll(),A.matcher.lastIndex=F;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(F,e.index),e);F=e.index+t}E(n.substring(F))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:P,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:Se(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:F,context:n.slice(F-100,F+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:Se(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:Se(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(ee).filter(P).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(ee(e.language).supersetOf===t.language)return 1;if(ee(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ne(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new xe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ne(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ce(l,e)}let E=()=>{k(),fe(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),fe(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}if(document.readyState===`loading`){O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(de(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)de(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function ee(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function P(e){let t=ee(e);return t&&!t.disableAutodetect}function F(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){F(e),a.push(e)}function te(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ne(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function re(e){return fe(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),fe(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:re,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:ee,registerAliases:N,autoDetection:P,inherit:Ce,addPlugin:I,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=be,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in L)typeof L[e]==`object`&&n(L[e]);return Object.assign(e,L),e},De=Ee({});De.newInstance=()=>Ee({}),t.exports=De,De.HighlightJS=De,De.default=De}))()).default,td=c(o(((e,t)=>{t.exports=function(e){let t=`built_in`,r={},i={begin:`}`,className:t,endsParent:!0},a={begin:`{`,end:`}`,contains:[e.QUOTE_STRING_MODE,`self`]},o={begin:`{`,end:`}`,contains:[`self`],skip:!0},s={variants:[{begin:/"/,end:/"/,skip:!0},{begin:/'/,end:/'/,skip:!0}],skip:!0},c=e.COMMENT(`@\\*`,`\\*@`,{relevance:10}),l={begin:`@[A-Za-z0-9\\._:-]+`,returnBegin:!0,end:`(\\r|\\n|<|\\s|"|')`,subLanguage:`csharp`,contains:[{begin:`@`,className:t},{begin:`\\[`,end:`\\]`,skip:!0},{begin:`\\(`,end:`\\)`,skip:!0}],returnEnd:!0},u={begin:`[@]{0,1}<text>`,returnBegin:!0,end:`</text>`,returnEnd:!0,subLanguage:`cshtml-razor`,contains:[{begin:`[@]{0,1}<text>`,className:t},{begin:`</text>`,className:t,endsParent:!0}]},d={variants:[{begin:`@@`},{begin:`[a-zA-Z]+@`}],skip:!0},f={begin:`@\\(`,end:`\\)`,returnBegin:!0,returnEnd:!0,subLanguage:`csharp`,contains:[{begin:`@\\(`,className:t},{begin:`\\(`,end:`\\)`,subLanguage:`csharp`,contains:[e.QUOTE_STRING_MODE,`self`,u]},u,{begin:`\\)`,className:t,endsParent:!0}]},p=n(e,[l,f]),m=`^\\s*@(page|model|using|inherits|inject|layout)`,h={begin:m+`[^\\r\\n{\\(]*$`,end:`$`,returnBegin:!0,returnEnd:!0,contains:[{begin:m,className:t},{variants:[{begin:`\\r|\\n`,endsParent:!0},{begin:`\\s[^\\r\\n]+`,end:`$`},{begin:`$`}],className:`type`,endsParent:!0}]},g={variants:[{begin:`@\\{`,end:`}`},{begin:`@code\\s*\\{`,end:`}`}],returnBegin:!0,returnEnd:!0,subLanguage:`csharp`,contains:[{begin:`@(code\\s*)?\\{`,className:t},r,o,s,i]},_={begin:`^\\s*@helper\\s+[^{\\s]+(?:\\s+[^{\\s]+)*\\s*{`,returnBegin:!0,returnEnd:!0,end:`}`,subLanguage:`cshtml-razor`,contains:[{begin:`@helper`,className:t},{begin:`{`,className:t},i]},v=[`for`,`if`,`switch`,`while`,`using`,`lock`,`foreach`].map(e=>({begin:`@${e}(?![\\w\\d])[^{]*\\{`,end:`}`})),y=[{begin:`\\}\\s*else\\s*(if[^\\{]+|)\\{`}],b={variants:v,returnBegin:!0,returnEnd:!0,subLanguage:`csharp`,contains:[{variants:v.map(function(e){return{begin:e.begin}}),returnBegin:!0,contains:[{begin:`@`,className:t},{variants:v.map(function(e){return{begin:`${e.begin}`.substring(1,e.begin.length-2)}}),subLanguage:`csharp`},{begin:`{`,className:t}]},r,{variants:y,returnBegin:!0,contains:[{begin:`}`,className:t},{begin:y[0].begin.substring(2,y[0].begin.length-2),subLanguage:`csharp`},{begin:`{`,className:t}]},a,i]},x={begin:`@try\\s*{`,end:`}`,returnBegin:!0,returnEnd:!0,subLanguage:`csharp`,contains:[{begin:`@`,className:t},{begin:`try\\s*{`,subLanguage:`csharp`},{variants:[{begin:`}\\s*catch\\s*\\([^\\)]+\\)\\s*{`},{begin:`}\\s*finally\\s*{`}],returnBegin:!0,contains:[{begin:`}`,className:t},{variants:[{begin:`\\s*catch\\s*\\([^\\)]+\\)\\s*`},{begin:`\\s*finally\\s*`}],subLanguage:`csharp`},{begin:`{`,className:t}]},r,a,i]},S=`@section\\s+[a-zA-Z0-9]+\\s*{`,C=[h,_,g,b,{begin:S,returnBegin:!0,returnEnd:!0,end:`}`,subLanguage:`cshtml-razor`,contains:[{begin:S,className:t},a,i]},{begin:`@await `,returnBegin:!0,subLanguage:`csharp`,end:`(\\r|\\n|<|\\s)`,contains:[{begin:`@await `,className:t},{begin:`[<\\r\\n]`,endsParent:!0}]},x,d,u,c,f,{className:`meta`,begin:`<!DOCTYPE`,end:`>`,relevance:10,contains:[{begin:`\\[`,end:`\\]`}]},{begin:`<\\!\\[CDATA\\[`,end:`\\]\\]>`,relevance:10}].concat(p);return[g,b,x].forEach(function(e){let t=C.filter(function(t){return t!==e}),n=e.contains.indexOf(r);e.contains.splice.apply(e.contains,[n,1].concat(t))}),{aliases:[`cshtml`,`razor`,`razor-cshtml`,`cshtml-razor`],contains:C}};function n(e,t){let n=e.COMMENT(`<!--`,`-->`,{relevance:10}),r={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:`[A-Za-z0-9\\._:-]+`,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,variants:[{begin:/"/,end:/"/,contains:t},{begin:/'/,end:/'/,contains:t},{begin:/[^\s"'=<>`]+/}]}]}]};return[{className:`meta`,begin:`<!DOCTYPE`,end:`>`,relevance:10,contains:[{begin:`\\[`,end:`\\]`}]},n,{begin:`<\\!\\[CDATA\\[`,end:`\\]\\]>`,relevance:10},{className:`meta`,begin:/<\?xml/,end:/\?>/,relevance:10},{className:`tag`,begin:`<style(?=\\s|>|$)`,end:`>`,keywords:{name:`style`},contains:[r],starts:{end:`</style>`,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:`<script(?=\\s|>|$)`,end:`>`,keywords:{name:`script`},contains:[r],starts:{end:`<\/script>`,returnEnd:!0,subLanguage:[`actionscript`,`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:`</?`,end:`/?>`,contains:[{className:`name`,begin:/[^/><\s]+/,relevance:0},r]}].concat(t)}}))(),1);function nd(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function rd(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:t.concat(/\batomic_/,t.either(`bool`,`char`,`schar`,`uchar`,`short`,`ushort`,`int`,`uint`,`long`,`ulong`,`llong`,`ullong`,`char16_t`,`char32_t`,`wchar_t`,`int_least8_t`,`uint_least8_t`,`int_least16_t`,`uint_least16_t`,`int_least32_t`,`uint_least32_t`,`int_least64_t`,`uint_least64_t`,`int_fast8_t`,`uint_fast8_t`,`int_fast16_t`,`uint_fast16_t`,`int_fast32_t`,`uint_fast32_t`,`int_fast64_t`,`uint_fast64_t`,`intptr_t`,`uintptr_t`,`size_t`,`ptrdiff_t`,`intmax_t`,`uintmax_t`),/\b/)}]},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},s={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={scope:`meta`,begin:/#\s*include\b/,end:/$/,keywords:{keyword:`include`},contains:[{begin:/\\\n/},o,{scope:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),n,e.C_BLOCK_COMMENT_MODE]},u=[c,l],d={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},f=t.optional(r)+e.IDENT_RE+`\\s*\\(`,p={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},m=[...u,a,n,e.C_BLOCK_COMMENT_MODE,s,o],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:p,contains:m.concat([{begin:/\(/,end:/\)/,keywords:p,contains:m.concat([`self`]),relevance:0}]),relevance:0},g={begin:`(`+i+`[\\*&\\s]+){1,12}`+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:p,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(d,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,...u]};return{name:`C`,aliases:[`h`],keywords:p,disableAutodetect:!0,illegal:`</`,contains:[].concat(h,g,m,[...u,{begin:e.IDENT_RE+`::`,keywords:p},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:l,strings:o,keywords:p}}}function id(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c=[{scope:`meta`,begin:/#\s*include\b/,end:/$/,keywords:{keyword:`include`},contains:[{begin:/\\\n/},o,{scope:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),n,e.C_BLOCK_COMMENT_MODE]}],l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,...c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+){1,12}`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,...c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[...c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function ad(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a=`([uU][lL]?|[lL][uU]?)?`,o={className:`number`,variants:[{begin:`\\b0[bB]_*[01](_*[01])*`+a},{begin:`(-?)\\b0[xX]_*[a-fA-F0-9](_*[a-fA-F0-9])*`+a},{begin:`(-?)(\\b\\d(_*\\d)*(\\.(\\d(_*\\d)*)?)?|\\.\\d(_*\\d)*)([eE][-+]?\\d(_*\\d)*)?([fFdDmM]|[uU][lL]?|[lL][uU]?)?`}],relevance:0},s={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},l=e.inherit(c,{illegal:/\n/}),u={className:`subst`,begin:/\{/,end:/\}/,keywords:r},d=e.inherit(u,{illegal:/\n/}),f={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,d]},p={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]},m=e.inherit(p,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},d]});u.contains=[p,f,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,e.C_BLOCK_COMMENT_MODE],d.contains=[m,f,l,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,o,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let h={variants:[s,p,f,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},g={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},_=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,v={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},h,o,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+_+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,g],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[h,o,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},v]}}var od=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),sd=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),cd=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),ld=[...sd,...cd],ud=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),dd=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),fd=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),pd=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.corner-bottom-left-shape.corner-bottom-right-shape.corner-shape.corner-top-left-shape.corner-top-right-shape.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function md(e){let t=e.regex,n=od(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+dd.join(`|`)+`)`},{begin:`:(:)?(`+fd.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+pd.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:ud.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+ld.join(`|`)+`)\\b`}]}}function hd(e){let t=e.regex,n={className:`subst`,variants:[{begin:`\\$[A-Za-z0-9_]+`}]},r={className:`subst`,variants:[{begin:/\$\{/,end:/\}/}],keywords:`true false null this is new super`},i={className:`number`,relevance:0,variants:[{match:/\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/},{match:/\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/}]},a={className:`string`,variants:[{begin:`r'''`,end:`'''`},{begin:`r"""`,end:`"""`},{begin:`r'`,end:`'`,illegal:`\\n`},{begin:`r"`,end:`"`,illegal:`\\n`},{begin:`'''`,end:`'''`,contains:[e.BACKSLASH_ESCAPE,n,r]},{begin:`"""`,end:`"""`,contains:[e.BACKSLASH_ESCAPE,n,r]},{begin:`'`,end:`'`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE,n,r]},{begin:`"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE,n,r]}]};r.contains=[i,a];let o=`Comparable.DateTime.Duration.Function.Iterable.Iterator.List.Map.Match.Object.Pattern.RegExp.Set.Stopwatch.String.StringBuffer.StringSink.Symbol.Type.Uri.bool.double.int.num.Element.ElementList`.split(`.`),s=o.map(e=>`${e}?`),c={keyword:`abstract.as.assert.async.await.base.break.case.catch.class.const.continue.covariant.default.deferred.do.dynamic.else.enum.export.extends.extension.external.factory.false.final.finally.for.Function.get.hide.if.implements.import.in.interface.is.late.library.mixin.new.null.on.operator.part.required.rethrow.return.sealed.set.show.static.super.switch.sync.this.throw.true.try.typedef.var.void.when.while.with.yield`.split(`.`),built_in:o.concat(s).concat([`Never`,`Null`,`dynamic`,`print`,`document`,`querySelector`,`querySelectorAll`,`window`]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},l={match:t.concat(/\b_?/,t.either(/(?:[A-Z]+[a-z0-9]+)+/,/(?:[A-Z]+[a-z0-9]+)+[A-Z]+/),/(?![A-Za-z0-9_])/),scope:`title.class`};return{name:`Dart`,keywords:c,contains:[a,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:`markdown`,relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:`markdown`,begin:`.`,end:`$`,relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`class`,beginKeywords:`class interface`,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},l,{match:/\b(?!(?:assert|catch|for|if|switch|while)\b)[a-z_][A-Za-z0-9_]*(?=\()/,scope:`title.function`},i,{className:`meta`,begin:`@[A-Za-z]+`}]}}function gd(e){return{name:`Dockerfile`,aliases:[`docker`],case_insensitive:!0,keywords:[`from`,`maintainer`,`expose`,`env`,`arg`,`user`,`onbuild`,`stopsignal`],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:`run cmd entrypoint volume add copy workdir label healthcheck shell`,starts:{end:/[^\\]$/,subLanguage:`bash`}}],illegal:`</`}}function _d(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function vd(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var yd=`[0-9](_*[0-9])*`,bd=`\\.(${yd})`,xd=`[0-9a-fA-F](_*[0-9a-fA-F])*`,Sd={className:`number`,variants:[{begin:`(\\b(${yd})((${bd})|\\.)?|(${bd}))[eE][+-]?(${yd})[fFdD]?\\b`},{begin:`\\b(${yd})((${bd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${bd})[fFdD]?\\b`},{begin:`\\b(${yd})[fFdD]\\b`},{begin:`\\b0[xX]((${xd})\\.?|(${xd})?\\.(${xd}))[pP][+-]?(${yd})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${xd})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Cd(e,t,n){return n===-1?``:e.replace(t,r=>Cd(e,t,n-1))}function wd(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=`(?:(?:\\s*\\[\\s*])+)?`,i=`(?:\\?(?:\\s+(?:extends|super)\\s+[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*<@@@>(?:(?:\\s*\\[\\s*])+)?)?|[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*<@@@>(?:(?:\\s*\\[\\s*])+)?)`,a=Cd(`(?:\\s*<\\s*`+i+`(?:\\s*,\\s*`+i+`)*\\s*>)?`,/<@@@>/g,2),o={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},s={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},c={className:`params`,begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{beginKeywords:`new throw return else yield assert`,relevance:0},{begin:[n,t.concat(a,r,/\s+/),n,r,/\s*/,/=(?!=)/],className:{1:`type`,3:`variable`,6:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:[n,t.concat(a,r,/\s+/),n,/\s*(?=\()/],className:{1:`type`,3:`title.function`},keywords:o,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Sd,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Sd,s]}}var Td=`[A-Za-z$_][0-9A-Za-z$_]*`,Ed=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),Dd=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],Od=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),kd=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ad=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],jd=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],Md=[].concat(Ad,Od,kd);function Nd(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=Td,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:Td,keyword:Ed,literal:Dd,built_in:Md,"variable.language":jd},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...Od,...kd]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...Ad,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var Pd={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function Fd(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,Pd,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var Id=`[0-9](_*[0-9])*`,Ld=`\\.(${Id})`,Rd=`[0-9a-fA-F](_*[0-9a-fA-F])*`,zd={className:`number`,variants:[{begin:`(\\b(${Id})((${Ld})|\\.)?|(${Ld}))[eE][+-]?(${Id})[fFdD]?\\b`},{begin:`\\b(${Id})((${Ld})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ld})[fFdD]?\\b`},{begin:`\\b(${Id})[fFdD]\\b`},{begin:`\\b0[xX]((${Rd})\\.?|(${Rd})?\\.(${Rd}))[pP][+-]?(${Id})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${Rd})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Bd(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=zd,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`,`ktm`,`ktx`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
95
95
|
`},l]}}var Vd=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Hd=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Ud=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),Wd=[...Hd,...Ud],Gd=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Kd=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),qd=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),Jd=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.corner-bottom-left-shape.corner-bottom-right-shape.corner-shape.corner-top-left-shape.corner-top-right-shape.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),Yd=Kd.concat(qd).sort().reverse();function Xd(e){let t=Vd(e),n=Yd,r=`([\\w-]+|@\\{[\\w-]+\\})`,i=[],a=[],o=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Gd.join(` `)},l={begin:`\\(`,end:`\\)`,contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o(`'`),o(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,l,s(`variable`,`@@?[\\w-]+`,10),s(`variable`,`@\\{[\\w-]+\\}`),s(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:`[\\w-]+\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let u=a.concat({begin:/\{/,end:/\}/,contains:i}),d={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(a)},f={begin:r+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+Jd.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:a}}]},p={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:c,returnEnd:!0,contains:a,relevance:0}},m={className:`variable`,variants:[{begin:`@[\\w-]+\\s*:`,relevance:15},{begin:`@[\\w-]+`}],starts:{end:`[;}]`,returnEnd:!0,contains:u}},h={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,s(`keyword`,`all\\b`),s(`variable`,`@\\{[\\w-]+\\}`),{begin:`\\b(`+Wd.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,s(`selector-tag`,r,0),s(`selector-id`,`#`+r),s(`selector-class`,`\\.`+r,0),s(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+Kd.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+qd.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:`!important`},t.FUNCTION_DISPATCH]},g={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[h]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,m,g,f,h,d,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function Zd(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!\\[=*\\[)`,`$`),e.COMMENT(`--\\[=*\\[`,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local global not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function Qd(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,r,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function $d(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
@@ -110,10 +110,10 @@ No work in the last two weeks to log.`),children:[(0,K.jsx)(`span`,{"aria-hidden
|
|
|
110
110
|
`;return`${e}@${cg(n)}`}function cg(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}function lg({repo:e,path:t,lines:n}){let r=Jm(),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if(!r)return null;let c=n?`lines ${n.start}–${n.end} of ${t}`:t;return(0,K.jsxs)(`span`,{className:`wd-revert`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-revert-btn`,disabled:i,"aria-label":n?`Revert hunk: ${t} lines ${n.start}–${n.end}`:`Revert file: ${t}`,title:`Undo the uncommitted change to ${c} and tell Claude`,onClick:async i=>{if(i.stopPropagation(),confirm(`Revert ${c} back to HEAD?
|
|
111
111
|
|
|
112
112
|
This discards the uncommitted change; Claude is told not to reintroduce it.`)){a(!0),s(null);try{await r.revert(e,t,n)}catch(e){s(e.message)}finally{a(!1)}}},children:i?`Reverting…`:n?`↶ Revert`:`↶ Revert file`}),o&&(0,K.jsx)(`span`,{className:`wd-revert-error`,role:`alert`,children:o})]})}var ug=500;function dg({file:e,anchor:t,review:n,repo:r,viewed:i,onToggleViewed:a}){let o=Mh(),s=Rm(),c=!!n&&!!s&&!!r,l=Km(),u=!!l,d=l&&r&&!e.isBinary&&e.status!==`deleted`?l.fileHref(r,e.path):null,f=(0,_.useMemo)(()=>e.isBinary?null:ep(e.path),[e.isBinary,e.path]),p=e.added+e.deleted,[m,h]=(0,_.useState)(!(p>=ug)),g=e.status===`renamed`&&e.hunks.length===0,v=!!i||e.status===`deleted`||g,[y,b]=(0,_.useState)(v);(0,_.useEffect)(()=>{b(v)},[v]);let x=(0,_.useRef)(null),S=(0,_.useCallback)(e=>{a?.(e),e&&requestAnimationFrame(()=>requestAnimationFrame(()=>{x.current?.scrollIntoView({block:`start`})}))},[a]),C=e.mdContent,w=!!C&&!C.tooLarge&&(C.before!==void 0||C.after!==void 0),T=!!C&&!C.tooLarge&&C.before!==void 0&&C.after!==void 0,[E,D]=(0,_.useState)(`diff`);(0,_.useEffect)(()=>{y&&D(`diff`)},[y]);let O=(0,_.useMemo)(()=>{let t=new Map;for(let n of Xh(e.hunks))t.set(n.key,n);return t},[e.hunks]),[k,A]=(0,_.useState)(()=>new Set),j=(0,_.useCallback)((e,t)=>{A(n=>{if(t===n.has(e))return n;let r=new Set(n);return t?r.add(e):r.delete(e),r})},[]),M=(0,_.useMemo)(()=>{let e=new Map;for(let t of O.keys())e.set(t,e=>j(t,e));return e},[O,j]),ee=e.status===`renamed`&&e.oldPath!==e.newPath?(0,K.jsxs)(`span`,{className:`wd-rename`,children:[e.oldPath,` → `,e.newPath]}):null;return(0,K.jsxs)(`article`,{ref:x,className:`wd-file`+(i?` wd-file-viewed`:``)+(y?` wd-file-collapsed`:``),id:t,"data-status":e.status,"data-path":e.path,children:[(0,K.jsxs)(`header`,{className:`wd-file-header`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-file-collapse`,"aria-expanded":!y,"aria-label":y?`Expand file`:`Collapse file`,title:y?`Expand file`:`Collapse file`,onClick:()=>b(e=>!e),children:(0,K.jsx)(`span`,{className:`wd-chevron`,"aria-hidden":`true`,children:`▸`})}),(0,K.jsx)(`span`,{className:`wd-file-badge wd-status-${e.status}`,children:Qm[e.status]}),(0,K.jsx)(`span`,{className:`wd-file-path`,children:ee??e.path}),(e.added||e.deleted)&&(0,K.jsxs)(`span`,{className:`wd-file-stats`,children:[(0,K.jsxs)(`span`,{className:`wd-add`,children:[`+`,e.added]}),` `,(0,K.jsxs)(`span`,{className:`wd-del`,children:[`-`,e.deleted]})]}),w&&!y&&(0,K.jsxs)(`div`,{className:`wd-view-mode`,role:`tablist`,"aria-label":`File view mode`,children:[(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":E===`diff`,className:`wd-view-mode-btn`+(E===`diff`?` wd-view-mode-btn-active`:``),onClick:()=>D(`diff`),children:`Diff`}),(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":E===`preview`,className:`wd-view-mode-btn`+(E===`preview`?` wd-view-mode-btn-active`:``),onClick:()=>D(`preview`),children:`Preview`}),T&&(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":E===`split`,className:`wd-view-mode-btn`+(E===`split`?` wd-view-mode-btn-active`:``),onClick:()=>D(`split`),children:`Split`})]}),r&&(0,K.jsx)(lg,{repo:r,path:e.path}),d&&(0,K.jsx)(`a`,{className:`wd-file-openfile`,href:d,target:`_blank`,rel:`noopener noreferrer`,title:`Open the whole file in a new tab`,children:`Open file ↗`}),c&&(0,K.jsx)(`button`,{type:`button`,className:`wd-file-comment-btn`,title:`Comment on the whole file`,onClick:()=>s.openComposerAt({repo:r,file:e.path,line:0,side:`file`,lineContent:``}),children:`💬 Comment on file`}),a&&(0,K.jsxs)(`label`,{className:`wd-viewed-label`,title:`Mark this file as reviewed and collapse it`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`wd-viewed-checkbox`,checked:!!i,onChange:e=>S(e.target.checked)}),`Viewed`]})]}),c&&(0,K.jsx)(fg,{repo:r,file:e.path}),!y&&(w&&E!==`diff`?(0,K.jsx)(pg,{file:e,mode:E}):e.isBinary?(0,K.jsx)(`div`,{className:`wd-binary`,children:`Binary file`}):e.hunks.length===0?(0,K.jsx)(`div`,{className:`wd-binary`,children:g?`File renamed without changes`:`No content changes`}):m?e.status===`added`?(0,K.jsx)(ig,{file:e,lang:f,review:n,repo:r}):(0,K.jsxs)(`table`,{className:`wd-diff-table `+(o===`unified`?`wd-unified`:`wd-side`),children:[(0,K.jsx)(`colgroup`,{children:o===`unified`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`col`,{className:`wd-col-ln`}),(0,K.jsx)(`col`,{className:`wd-col-ln`}),(0,K.jsx)(`col`,{})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`col`,{className:`wd-col-ln`}),(0,K.jsx)(`col`,{className:`wd-col-content`}),(0,K.jsx)(`col`,{className:`wd-col-ln`}),(0,K.jsx)(`col`,{className:`wd-col-content`})]})}),(0,K.jsxs)(`tbody`,{children:[r&&O.has(`head`)&&(0,K.jsx)(tg,{repo:r,file:e.path,gap:O.get(`head`),lang:f,onClosedChange:M.get(`head`),belowHeading:e.hunks[0]?Bh(e.hunks[0]):void 0}),e.hunks.map((t,i)=>{let a=sg(e.path,t),o=O.get(`mid-${i}`),s=i===0?`head`:`mid-${i-1}`,c=O.has(s),l=k.has(s),d=!(u&&c&&!l)&&!(l||!c&&i>0);return(0,K.jsxs)(_.Fragment,{children:[(0,K.jsx)(Hh,{hunk:t,review:n,repo:r,file:e.path,lang:f,showHeading:d}),r&&o&&(0,K.jsx)(tg,{repo:r,file:e.path,gap:o,lang:f,onClosedChange:M.get(`mid-${i}`),belowHeading:e.hunks[i+1]?Bh(e.hunks[i+1]):void 0})]},`${a}#${i}`)}),r&&O.has(`tail`)&&(0,K.jsx)(tg,{repo:r,file:e.path,gap:O.get(`tail`),lang:f})]})]}):(0,K.jsxs)(`div`,{className:`wd-binary wd-large-file`,children:[(0,K.jsxs)(`p`,{children:[`Large file — `,p.toLocaleString(),` line`,p===1?``:`s`,` changed. Not rendered by default.`]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:()=>h(!0),children:`Load diff`})]}))]})}function fg({repo:e,file:t}){let n=Lm(),r=n.comments.filter(n=>n.side===`file`&&!n.parentId&&n.repo===e&&n.file===t),i=n.openComposer!==null&&n.openComposer.side===`file`&&n.openComposer.repo===e&&n.openComposer.file===t;return r.length===0&&!i?null:(0,K.jsxs)(`div`,{className:`wd-file-comments`,children:[r.map(e=>(0,K.jsx)(Ih,{comment:e,currentLineContent:null},e.id)),i&&(0,K.jsx)(Ph,{context:`${e}/${t} · whole file`,onSubmit:async(r,i)=>{await n.postComment({repo:e,file:t,line:0,side:`file`,body:r,status:i}),n.closeComposer()},onCancel:()=>n.closeComposer()})]})}function pg({file:e,mode:t}){let n=e.mdContent;if(t===`split`&&n.before!==void 0&&n.after!==void 0)return(0,K.jsxs)(`div`,{className:`wd-md-split`,children:[(0,K.jsxs)(`div`,{className:`wd-md-split-side wd-md-split-before`,children:[(0,K.jsx)(`header`,{className:`wd-md-split-label`,children:`Before`}),(0,K.jsx)(lo,{source:n.before,block:!0,className:`wd-md-preview`})]}),(0,K.jsxs)(`div`,{className:`wd-md-split-side wd-md-split-after`,children:[(0,K.jsx)(`header`,{className:`wd-md-split-label`,children:`After`}),(0,K.jsx)(lo,{source:n.after,block:!0,className:`wd-md-preview`})]})]});let r=n.after??n.before??``;return(0,K.jsx)(lo,{source:r,block:!0,className:`wd-md-preview`})}function mg({repo:e,startIndex:t,review:n,viewedPaths:r,onToggleViewed:i}){let a=(0,_.useMemo)(()=>Zm(Xm(e.files,t)),[e.files,t]);return e.files.length===0?(0,K.jsxs)(`div`,{className:`wd-web-empty`,children:[`No changes in `,(0,K.jsx)(`code`,{children:e.name}),`.`]}):(0,K.jsx)(`div`,{className:`wd-repo-files`,children:a.map(t=>(0,K.jsx)(dg,{file:t.file,anchor:Ym(t.index),review:n,repo:e.name,viewed:r?.has(t.file.path),onToggleViewed:i?e=>i(t.file.path,e):void 0},t.file.path))})}function hg({filesChanged:e,onShow:t,onReload:n,onShowNewOnly:r}){let i=typeof e==`number`&&e>0?`${e} file${e===1?``:`s`}`:null;return(0,K.jsxs)(`span`,{className:`wd-diff-update`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-diff-update-dot`,"aria-hidden":`true`}),(0,K.jsxs)(`span`,{className:`wd-diff-update-text`,children:[`New changes`,i&&(0,K.jsxs)(`span`,{className:`wd-web-muted`,children:[` · `,i]})]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-diff-update-btn wd-diff-update-btn-primary`,onClick:t,title:`Load the new diff here, keeping your scroll position`,children:`Show`}),r&&(0,K.jsx)(`button`,{type:`button`,className:`wd-diff-update-btn`,onClick:r,title:`Show only what changed since the last checkpoint in the diff you are looking at`,children:`Only new`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-diff-update-btn`,onClick:n,title:`Fetch the latest from the server and jump to the top`,children:`Reload`})]})}function gg(){let e=Nh();if(!e)return null;let{mode:t,setMode:n}=e;return(0,K.jsxs)(`div`,{className:`wd-diff-mode`,role:`group`,"aria-label":`Diff layout`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-pressed":t===`split`,className:`wd-diff-mode-btn`+(t===`split`?` wd-diff-mode-btn-active`:``),onClick:()=>n(`split`),title:`Side-by-side layout`,children:`Split`}),(0,K.jsx)(`button`,{type:`button`,"aria-pressed":t===`unified`,className:`wd-diff-mode-btn`+(t===`unified`?` wd-diff-mode-btn-active`:``),onClick:()=>n(`unified`),title:`Unified (inline) layout`,children:`Unified`})]})}function _g(e,t,n){let r=[...e].sort((e,t)=>e.id-t.id),i=r.flatMap((e,t)=>t===0||r[t-1].id!==e.id-1?[]:[{key:`t:${e.id}`,kind:`turn`,title:e.label&&e.label.trim()&&e.label!==`Initial`?e.label.trim():``,tag:`Turn ${e.id}`,at:e.ts,before:{kind:`checkpoint`,id:r[t-1].id},after:{kind:`checkpoint`,id:e.id}}]),a=t.filter(e=>n===null||e.repo===n).map(e=>({key:`c:${e.sha}`,kind:`commit`,title:e.subject,tag:e.sha.slice(0,7),at:e.at,before:{kind:`parent`,repo:e.repo,sha:e.sha},after:{kind:`commit`,repo:e.repo,sha:e.sha}})),o=e=>Date.parse(e.at??``)||0;return[...[...a,...i].sort((e,t)=>o(e)-o(t)||(e.kind===`commit`?-1:1)-(t.kind===`commit`?-1:1)),{key:`u`,kind:`uncommitted`,title:``,tag:`Uncommitted`,at:null,before:{kind:`head`},after:{kind:`working`}}]}var vg={kind:`scope`,base:`uncommitted`},yg={kind:`scope`,base:`branch`};function bg(e,t){if(t.kind!==`range`)return null;let n=e.findIndex(e=>e.key===t.fromKey),r=e.findIndex(e=>e.key===t.toKey);return n<0||r<0?null:[Math.min(n,r),Math.max(n,r)]}function xg(e,t){let n=bg(e,t);return!n||t.kind!==`range`?null:{from:t.from??e[n[0]].before,to:e[n[1]].after}}function Sg(e,t,n){if(t.kind===`scope`)return t.base===`branch`||n===`u`;let r=bg(e,t),i=e.findIndex(e=>e.key===n);return!!r&&i>=r[0]&&i<=r[1]}function Cg(e,t){return t&&t!==e?{kind:`range`,fromKey:t,toKey:e}:e===`u`?vg:{kind:`range`,fromKey:e,toKey:e}}function wg(e){let t=[...e].reverse().find(e=>e.kind===`turn`);return t?{kind:`range`,fromKey:t.key,toKey:t.key,label:`Last turn`}:null}function Tg(e,t,n,r){if(n==null)return null;let i=t.find(e=>e.id===n);return!i||r&&i.ts!==r||!t.some(e=>e.id>n)?null:Eg(e,i,`Since you looked`)}function Eg(e,t,n){let r=Date.parse(t.ts);return{kind:`range`,fromKey:e.find(e=>e.kind!==`uncommitted`&&(e.after.kind===`checkpoint`?e.after.id>t.id:(Date.parse(e.at??``)||0)>r))?.key??`u`,toKey:`u`,from:{kind:`checkpoint`,id:t.id},label:n}}function Dg(e,t,n){if(n===void 0)return null;let r;for(let e of t){let t=Date.parse(e.ts);Number.isFinite(t)&&t<=n&&(!r||e.id>r.id)&&(r=e)}return r?Eg(e,r,`Only new`):null}function Og(e,t=new Date){let n=new Date(e),r=n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),i=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),a=Math.round((i(t)-i(n))/864e5);return a===0?`Today ${r}`:a===1?`Yesterday ${r}`:`${n.toLocaleDateString([],{weekday:`short`,day:`numeric`,month:`short`})} ${r}`}function kg(e,t,n,r=new Date){let i=new Map(t.map(e=>[e.id,e.ts])),a=(e,t)=>i.has(e)&&(!t||i.get(e)===t),o=[];for(let i of[...n??[]].reverse()){if(!a(i.from,i.fromTs)||!a(i.to,i.toTs))continue;let n=Date.parse(t.find(e=>e.id===i.from).ts),s=`t:${i.to}`,c=e.findIndex(e=>e.key===s);if(c<0)continue;let l=e.slice(0,c+1).find(e=>e.after.kind===`checkpoint`?e.after.id>i.from:(Date.parse(e.at??``)||0)>n);if(!l)continue;let u=Og(i.startedAt,r),d=i.to-i.from;o.push({key:`${i.from}-${i.to}-${i.startedAt}`,selection:{kind:`range`,fromKey:l.key,toKey:s,from:{kind:`checkpoint`,id:i.from},label:`Your look · ${u}`},when:u,turns:d===1?`Turn ${i.to}`:`Turns ${i.from+1}–${i.to}`})}return o}function Ag(e,t){if(t.kind===`range`&&t.label&&(t.label!==`Last turn`||[...e].reverse().find(e=>e.kind===`turn`)?.key===t.toKey))return t.label}function jg(e,t){if(t.kind===`scope`)return`all`;let n=Ag(e,t);if(n)return n;let r=bg(e,t);if(!r)return`Uncommitted`;let[i,a]=[e[r[0]],e[r[1]]];return i===a?i.title?`${i.tag} · ${i.title}`:i.tag:`${i.tag} → ${a.tag}`}function Mg(e){return e.kind===`scope`?e.base:`${e.fromKey}..${e.toKey}${e.from?`@${JSON.stringify(e.from)}`:``}`}function Ng(e,t,n){if(!e||e.kind===`working`)return;if(e.kind===`head`)return`HEAD`;if(e.kind===`commit`)return e.sha;if(e.kind===`parent`)return`${e.sha}^`;if(!t)return null;if(n in t)return t[n]??null;let r=Object.keys(t).find(e=>(e.split(/[\\/]/).filter(Boolean).pop()??e)===n);return r?t[r]??null:null}var Pg=5;function Fg({items:e,selection:t,onSelect:n,lastTurn:r,sinceLooked:i,looks:a=[],commitsOf:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),p=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(!s)return;let e=e=>{p.current?.contains(e.target)||c(!1)},t=e=>{e.key===`Escape`&&(e.preventDefault(),c(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let m=(e,t=!1)=>{n(e),t||c(!1)},h=(e,n,r)=>n&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-checkpoint-pop-preset`+(Mg(t)===Mg(n)?` wd-checkpoint-pop-preset-active`:``),onClick:()=>{f(null),m(n)},children:[e,r&&(0,K.jsxs)(`span`,{className:`wd-checkpoint-pop-sub`,children:[` `,r]})]}),g=e.filter(e=>e.kind===`commit`).length,v=[...e].reverse();return(0,K.jsxs)(`div`,{ref:p,className:`wd-history`,"data-popover":!0,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-history-btn`,"aria-haspopup":`listbox`,"aria-expanded":s,onClick:()=>c(e=>!e),title:`Pick what to diff: a commit, a turn, or a span of them`,children:[(0,K.jsx)(`span`,{className:`wd-history-btn-tag`,children:`Changes:`}),` `,(0,K.jsx)(`span`,{className:`wd-history-btn-label`,children:jg(e,t)}),(0,K.jsx)(`span`,{className:`wd-checkpoint-caret`,"aria-hidden":`true`,children:`▾`})]}),s&&(0,K.jsxs)(`div`,{className:`wd-checkpoint-pop wd-history-pop`,role:`listbox`,"aria-label":`Commits and turns`,children:[(0,K.jsxs)(`div`,{className:`wd-checkpoint-pop-header`,children:[(0,K.jsxs)(`div`,{className:`wd-history-presets`,children:[h(`Uncommitted`,vg),h(`Everything on the branch`,yg,g?`${g} commit${g===1?``:`s`} + uncommitted`:void 0),h(`Last turn`,r),h(`Since you looked`,i),a[0]&&h(`Last look`,{...a[0].selection,label:`Last look`},a[0].when)]}),(0,K.jsxs)(`div`,{className:`wd-checkpoint-pop-hint`,children:[`Click: just that one · Shift+click: from the last click to it`,o?` · commits of ${o}, turns of every repo`:``]})]}),a.length>0&&(0,K.jsxs)(`div`,{className:`wd-history-looks`,role:`group`,"aria-label":`Your looks`,children:[(0,K.jsx)(`div`,{className:`wd-history-section`,children:`Your looks`}),(l?a:a.slice(0,Pg)).map(e=>{let n=Mg(t)===Mg(e.selection);return(0,K.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":n,className:`wd-checkpoint-pop-row wd-history-row wd-history-row-look`+(n?` wd-checkpoint-pop-in-range`:``),onClick:()=>{f(null),m(e.selection)},children:[(0,K.jsx)(`span`,{className:`wd-history-mark`,"aria-hidden":`true`,children:`◉`}),(0,K.jsx)(`span`,{className:`wd-history-tag`,children:e.when}),(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-label`,children:e.turns})]},e.key)}),!l&&a.length>Pg&&(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-history-more`,onClick:()=>u(!0),children:[`Show all `,a.length]}),(0,K.jsx)(`div`,{className:`wd-history-section`,children:`History`})]}),v.map(n=>{let r=Sg(e,t,n.key);return(0,K.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":r,className:`wd-checkpoint-pop-row wd-history-row wd-history-row-`+n.kind+(r?` wd-checkpoint-pop-in-range`:``),onClick:t=>{let r=t.shiftKey&&d&&e.some(e=>e.key===d)?d:null,i=Cg(n.key,r);t.shiftKey||f(n.key),m(i,t.shiftKey)},children:[(0,K.jsx)(`span`,{className:`wd-history-mark`,"aria-hidden":`true`,children:n.kind===`commit`?`◆`:n.kind===`turn`?`◇`:`●`}),(0,K.jsx)(`span`,{className:`wd-history-tag`,children:n.tag}),(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-label`,children:n.title}),(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-time`,children:n.at?Fs(n.at):`now`})]},n.key)}),v.length===1&&(0,K.jsx)(`p`,{className:`wd-history-empty`,children:`No commits on this branch and no finished turns yet.`})]})]})}function Ig(e){return Zm([e]).map(e=>({path:e.file.path,anchor:Ym(e.index)}))}function Lg(e,t,n){let r=e.filter(e=>t.has(e.anchor)).map(e=>e.path),i=e.filter(e=>!t.has(e.anchor)).map(e=>e.path),a=e.length===1,o=e=>`${e} file${e===1?``:`s`}`,s=[];return i.length>0&&s.push({label:a?`Mark as viewed`:`Mark ${o(i.length)} as viewed`,run:()=>n(i,!0)}),r.length>0&&s.push({label:a?`Mark as not viewed`:`Mark ${o(r.length)} as not viewed`,run:()=>n(r,!1)}),s}function Rg(e){for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return{scrollBy:(e,n)=>t.scrollBy(e,n),top:t.getBoundingClientRect().top}}return{scrollBy:(e,t)=>window.scrollBy(e,t),top:0}}function zg(e){let t=[...document.querySelectorAll(`article.wd-file`)],n=t[0]?Rg(t[0]):null,r=n?t.find(e=>e.getBoundingClientRect().bottom>n.top):void 0,i=r?.getBoundingClientRect().top;e(),r&&n&&i!==void 0&&requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!r.isConnected)return;let e=r.getBoundingClientRect().top-i;e!==0&&n.scrollBy(0,e)}))}function Bg(e){let t=`${Math.round(e.coverage??0)}% line coverage`;return typeof e.coverageMtimeMs==`number`&&(t+=` (measured ${new Date(e.coverageMtimeMs).toLocaleString()})`),e.coverageStale&&(t+=` — STALE: source edited since coverage was recorded`),t}function Vg({files:e,startIndex:t,selectedAnchor:n,viewedAnchors:r,onMarkViewed:i}){let[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(null),l=i?(e,t)=>{e.preventDefault(),c({x:e.clientX,y:e.clientY,node:t})}:void 0;(0,_.useEffect)(()=>c(null),[e,t]);let u=s&&i?Lg(Ig(s.node),r??new Set,(e,t)=>zg(()=>i(e,t))):[],d=a.trim().toLowerCase(),f=(0,_.useMemo)(()=>{if(!d)return Xm(e,t);let n=e.map((e,n)=>({file:e,index:t+n})).filter(e=>e.file.path.toLowerCase().includes(d));return n.length===0?[]:Xm(n)},[e,t,d]);return(0,K.jsxs)(`div`,{className:`wd-tree-pane`,children:[(0,K.jsx)(`input`,{className:`wd-web-filter`,type:`search`,placeholder:`Filter files…`,value:a,onChange:e=>o(e.target.value)}),f.length===0?(0,K.jsx)(`p`,{className:`wd-web-empty-list`,children:d?`No file matches “${a.trim()}”.`:`No changes in this repo here.`}):(0,K.jsx)(`ul`,{className:`wd-tree-root`,children:f.map((e,t)=>(0,K.jsx)(Hg,{node:e,selectedAnchor:n??null,viewedAnchors:r,onMenu:l},t))}),s&&u.length>0&&(0,K.jsx)(ns,{x:s.x,y:s.y,items:u,onClose:()=>c(null)})]})}function Hg({node:e,selectedAnchor:t,viewedAnchors:n,onMenu:r}){if(e.kind===`dir`)return(0,K.jsx)(`li`,{className:`wd-tree-dir`,children:(0,K.jsxs)(`details`,{open:!0,children:[(0,K.jsxs)(`summary`,{onContextMenu:r&&(t=>r(t,e)),children:[(0,K.jsx)(`span`,{className:`wd-tree-caret`}),e.name]}),(0,K.jsx)(`ul`,{children:e.children.map((e,i)=>(0,K.jsx)(Hg,{node:e,selectedAnchor:t,viewedAnchors:n,onMenu:r},i))})]})});let i=Ym(e.index),a=i===t,o=n?.has(i)??!1,s=e.file.added||e.file.deleted?(0,K.jsxs)(`span`,{className:`wd-tree-stats`,children:[(0,K.jsxs)(`span`,{className:`wd-add`,children:[`+`,e.file.added]}),` `,(0,K.jsxs)(`span`,{className:`wd-del`,children:[`-`,e.file.deleted]})]}):null;return(0,K.jsx)(`li`,{className:`wd-tree-file`+(a?` wd-tree-file-active`:``)+(o?` wd-tree-file-viewed`:``),children:(0,K.jsxs)(`a`,{href:`#${i}`,onClick:e=>{e.preventDefault();let t=document.getElementById(i);t&&(history.replaceState(null,``,`#${i}`),t.scrollIntoView({block:`start`}))},title:e.file.path,onContextMenu:r&&(t=>r(t,e)),children:[(0,K.jsx)(`span`,{className:`wd-tree-status wd-status-${e.file.status}`,children:Qm[e.file.status]}),(0,K.jsx)(`span`,{className:`wd-tree-name`,children:e.name}),s,typeof e.file.coverage==`number`&&(0,K.jsxs)(`span`,{className:`wd-coverage-badge wd-coverage-${e.file.coverage>=80?`good`:e.file.coverage>=50?`fair`:`poor`}${e.file.coverageStale?` wd-coverage-stale`:``}`,title:Bg(e.file),children:[Math.round(e.file.coverage),`%`,e.file.coverageStale?` ?`:``]})]})})}function Ug({repoName:e,onOpenRepo:t}){let n=Lm().comments.filter(e=>!e.parentId),r=[],i=[];for(let e of n)(e.resolved?i:r).push(e);return(0,K.jsxs)(`div`,{className:`wd-comments-panel`,children:[(0,K.jsxs)(`h3`,{className:`wd-comments-panel-title`,children:[`Comments `,(0,K.jsxs)(`span`,{className:`wd-comments-panel-count`,children:[`(`,n.length,`)`]})]}),n.length===0?(0,K.jsx)(`p`,{className:`wd-comments-panel-empty`,children:`No comments yet.`}):(0,K.jsxs)(`ul`,{className:`wd-comments-panel-list`,children:[r.map(n=>(0,K.jsx)(Wg,{comment:n,repoName:e,onOpenRepo:t},n.id)),i.length>0&&(0,K.jsxs)(`li`,{className:`wd-comments-panel-divider`,role:`presentation`,children:[`Resolved · `,i.length]}),i.map(n=>(0,K.jsx)(Wg,{comment:n,repoName:e,onOpenRepo:t},n.id))]})]})}function Wg({comment:e,repoName:t,onOpenRepo:n}){let r=e.side!==`general`&&!!e.repo&&e.repo!==t;function i(){if(r){n?.(e.repo),setTimeout(()=>Gg(e),60);return}Gg(e)}let a=e.side===`general`?`General`:e.side===`file`?`${e.file} · whole file`:`${e.file}:${e.line}`;return(0,K.jsxs)(`li`,{className:`wd-comments-panel-row`+(e.resolved?` wd-comments-panel-row-resolved`:``),onClick:i,children:[(0,K.jsxs)(`div`,{className:`wd-comments-panel-loc`,children:[e.resolved&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`span`,{className:`wd-resolved-check`,"aria-hidden":`true`,children:[`✓`,` `]}),(0,K.jsx)(`span`,{className:`wd-visually-hidden`,children:`Resolved: `})]}),r&&(0,K.jsxs)(`span`,{className:`wd-comments-panel-repo`,children:[e.repo,` · `]}),a]}),(0,K.jsx)(`div`,{className:`wd-comments-panel-body`,children:e.body.split(`
|
|
113
|
-
`)[0]})]})}function Gg(e){if(e.side===`general`){let e=document.querySelector(`.wd-general-pane`),t=e?.querySelector(`details`);t&&!t.open&&(t.open=!0),e?.scrollIntoView({behavior:`smooth`,block:`start`});return}let t=document.querySelector(`article.wd-file[data-path="${qg(e.file)}"]`);t&&(t.scrollIntoView({behavior:`smooth`,block:`start`}),e.side!==`file`&&Kg(t,e.line,e.side))}function Kg(e,t,n){let r=e.querySelectorAll(n===`right`?`.wd-ln-new`:`.wd-ln-old`);for(let e of r)if(e.textContent?.trim()===String(t)){let t=e.closest(`tr`);if(t){t.classList.add(`wd-row-flash`),setTimeout(()=>t.classList.remove(`wd-row-flash`),1200);let e=t.nextElementSibling;e?.classList.contains(`wd-comment-row`)&&e.scrollIntoView({behavior:`smooth`,block:`center`})}break}}function qg(e){return e.replace(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,`\\$&`)}function Jg(){let e=Lm(),[t,n]=(0,_.useState)(``),r=e.comments.filter(e=>e.side===`general`&&!e.parentId);async function i(r){let i=t.trim();i&&(await e.postComment({side:`general`,body:i,status:r}),n(``))}return(0,K.jsx)(`section`,{className:`wd-general-pane`,children:(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{children:`General review note (not tied to any line)`}),(0,K.jsx)(`textarea`,{className:`wd-general-input`,placeholder:`A high-level comment for Claude…`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),i(`published`))}}),(0,K.jsxs)(`div`,{className:`wd-general-pane-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,disabled:!t.trim(),onClick:()=>i(`draft`),children:e.comments.some(e=>e.status===`draft`)?`Add to review`:`Start review`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,disabled:!t.trim(),onClick:()=>i(`published`),children:`Comment (Ctrl+Enter)`})]}),r.length>0&&(0,K.jsx)(`div`,{className:`wd-general-pane-list`,children:r.map(e=>(0,K.jsx)(Ih,{comment:e,currentLineContent:null},e.id))})]})})}function Yg({title:e,children:t,actions:n,onClose:r,primaryRef:i}){let a=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),(0,_.useEffect)(()=>{if(i?.current){i.current.focus();return}(a.current?.querySelector(`.wd-btn-primary`))?.focus()},[i]),(0,K.jsx)(`div`,{className:`wd-modal-backdrop`,ref:a,onClick:e=>{e.target===e.currentTarget&&r()},children:(0,K.jsxs)(`div`,{className:`wd-modal`,children:[(0,K.jsx)(`h2`,{children:e}),t,(0,K.jsx)(`div`,{className:`wd-modal-actions`,children:n})]})})}function Xg(){let e=Lm(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(``),a=zm(e.comments);return a.length===0?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-pending-pill wd-visible`,onClick:()=>{i(``),n(!0)},children:[`Pending review `,(0,K.jsxs)(`span`,{className:`wd-pending-count`,children:[`(`,a.length,`)`]})]}),t&&(0,K.jsxs)(Yg,{title:`Submit your review`,onClose:()=>n(!1),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:async()=>{confirm(`Discard all ${a.length} pending comment(s)?`)&&(await e.discardReview(),n(!1))},children:`Discard drafts`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:async()=>{try{await e.submitReview(r),n(!1)}catch{}},children:`Submit review`})]}),children:[(0,K.jsxs)(`p`,{children:[`Sending `,a.length,` pending comment`,a.length===1?``:`s`,`. Add a summary if you like, then click Submit to send everything to Claude.`]}),(0,K.jsx)(`textarea`,{className:`wd-submit-summary`,placeholder:`Optional summary…`,value:r,onChange:e=>i(e.target.value)})]})]})}function Zg(e){function t(){try{let t=localStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return n&&typeof n==`object`?n:{}}catch{return{}}}function n(t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}return{has(e,n){return!!t()[e]?.[n]},set(e,r,i){let a=t();a[e]||(a[e]={}),i?a[e][r]=!0:delete a[e][r],Object.keys(a[e]).length===0&&delete a[e],n(a)},readScope(e){return new Set(Object.keys(t()[e]??{}))},update(e,r){let i=t(),a=new Set(Object.keys(i[e]??{}));return r(a),a.size===0?delete i[e]:i[e]=Object.fromEntries([...a].map(e=>[e,!0])),n(i),a}}}var Qg=Zg(`work-web:viewed-files`);function $g(e){return Qg.readScope(e)}function e_(e,t){return Qg.update(e,t)}var t_=/#(\d+\.\d+\.[0-9a-z]+)$/;function n_(e){let t=t_.exec(e);return t?{path:e.slice(0,t.index),signature:t[1]}:{path:e}}function r_(e,t){let n=new Set;for(let r of e){let{path:e,signature:i}=n_(r);(i===void 0||!t||t.get(e)===i)&&n.add(e)}return n}function i_(e,t,n){let[r,i]=(0,_.useState)(()=>$g(e));(0,_.useEffect)(()=>{i($g(e))},[e]);let a=(0,_.useMemo)(()=>r_(r,n),[r,n]),o=(0,_.useCallback)((t,r)=>{let a=new Set(t),o=e_(e,e=>{for(let t of[...e])a.has(n_(t).path)&&e.delete(t);if(r)for(let r of t){let t=n?.get(r);e.add(t?`${r}#${t}`:r)}});i(o)},[e,n]),s=(0,_.useCallback)((e,t)=>o([e],t),[o]),c=new Set;for(let e of a){let n=t.get(e);n&&c.add(n)}return{viewedPaths:a,viewedAnchors:c,toggle:s,setMany:o}}var a_=`.wd-comment-row`;function o_(e){let t=(0,_.useRef)(null);(0,_.useEffect)(()=>{let n=n=>{if(n.key!==`]`&&n.key!==`[`||n.metaKey||n.ctrlKey||n.altKey)return;let r=document.activeElement;if(r&&(r.tagName===`INPUT`||r.tagName===`TEXTAREA`||r.tagName===`SELECT`||r.isContentEditable))return;let i=e.current;if(!i)return;let a=[...i.querySelectorAll(a_)];if(a.length===0)return;n.preventDefault();let o=t.current?a.indexOf(t.current):-1,s=n.key===`]`?a[o<0?0:(o+1)%a.length]:a[o<0?a.length-1:(o-1+a.length)%a.length];t.current=s,s.scrollIntoView?.({behavior:`smooth`,block:`center`}),s.classList.add(`wd-row-flash`),setTimeout(()=>s.classList.remove(`wd-row-flash`),1200)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e])}function s_(e,t,n,r){let i=e+t;return e<r?e-r:i>n-r?i-(n-r):0}function c_(e,t,n){(0,_.useEffect)(()=>{if(!n||!t)return;let r=e.current;if(!r)return;let i=r.querySelector(`.wd-tree-file-active`);if(!i)return;let a=i.getBoundingClientRect().top-r.getBoundingClientRect().top;r.scrollTop+=s_(a,i.offsetHeight,r.clientHeight,24)},[t,n])}function l_(e){let[t,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{function e(){let e=Array.from(document.querySelectorAll(`article.wd-file`)).filter(e=>e.isConnected);if(e.length===0){n(null);return}let t=null;for(let n of e)if(n.getBoundingClientRect().top<=80)t=n;else break;n((t??e[0]).id)}let t=!1;function r(){t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}e(),window.addEventListener(`scroll`,r,{passive:!0,capture:!0}),window.addEventListener(`resize`,r);let i=typeof MutationObserver>`u`?null:new MutationObserver(r),a=document.querySelector(`.wd-web-review-main`)??document.body;return i?.observe(a,{childList:!0,subtree:!0}),()=>{window.removeEventListener(`scroll`,r,{capture:!0}),window.removeEventListener(`resize`,r),i?.disconnect()}},[e]),t}var u_=()=>document.visibilityState===`visible`&&document.hasFocus();function d_(e,t,n,r=1e3){let i=(0,_.useRef)(n);i.current=n,(0,_.useEffect)(()=>{if(e===null)return;let n=0,a=setInterval(()=>{u_()&&(n+=r,n>=t&&(clearInterval(a),i.current()))},r);return()=>clearInterval(a)},[e,t,r])}function f_(e){return e.length?Math.max(...e.map(e=>e.id)):null}function p_(e){let t=5381;for(let n of e.hunks)for(let e of n.lines){let n=`${e.kind}${e.content}`;for(let e=0;e<n.length;e++)t=(t<<5)+t+n.charCodeAt(e)|0}return`${e.added}.${e.deleted}.${(t>>>0).toString(36)}`}function m_(e,t,n){if(e.length===0)return t;if(n&&e.some(e=>e.name===n))return n;let r=e.find(e=>e.name===t);return r&&r.files.length>0?r.name:(e.find(e=>e.files.length>0)??r??e[0]).name}function h_(e){return e.map(e=>e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??e)}function g_(e,t){return e.map(e=>{let n=t?.find(t=>t.name===e);return{name:e,files:n?n.files.length:null,added:n?n.files.reduce((e,t)=>e+t.added,0):0,deleted:n?n.files.reduce((e,t)=>e+t.deleted,0):0}})}function __(e,t,n){return e.kind===`range`?n===`Since you looked`?`Nothing changed since you last looked.`:n===`Last turn`?`The last turn changed no files.`:e.fromKey===e.toKey?`This changed no files.`:`Nothing changed in this span.`:e.base===`uncommitted`?`No uncommitted changes.`:!t||t===`HEAD`?"Couldn't find this branch's parent. Tried main, master, dev, develop (and their origin/* mirrors). Record one with `work tree --base <ref>`.":`No commits since \`${t}\` — this branch is up to date or already merged.`}var v_=5e3,y_=5e3;function b_({scopeHash:e,refFor:t,children:n}){return(0,K.jsx)(Gm,{scopeHash:e??void 0,refFor:t,ready:e!==null,children:n})}function x_({session:e,startOnLastTurn:t=!1,fullScreen:n=!1,onFullScreen:r}){let[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(s(null),e.archivedAt)return;let t=!0;return V(e.id).then(e=>t&&s(e),()=>{}),()=>{t=!1}},[e.id,e.archivedAt]),(0,_.useEffect)(()=>{if(!n)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||It()||r?.(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let c=(0,_.useRef)(null),[l,u]=(0,_.useState)(vg),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)([]),h=(0,_.useRef)(e.id);h.current=e.id;let g=(0,_.useRef)(0),v=(0,_.useRef)(null),b=(0,_.useRef)(null),x=()=>{let t=e.id;g.current=Date.now(),ue(t).then(e=>{h.current===t&&(v.current=e.scopeHash,f(e.entries),m(e.commits))},()=>h.current===t&&f([]))},S=()=>{let e=y_-(Date.now()-g.current);if(e<=0)return x();b.current??=setTimeout(()=>{b.current=null,x()},e)},[C,w]=(0,_.useState)(void 0),[T,E]=(0,_.useState)(null);(0,_.useEffect)(()=>{u(vg),f([]),m([]),w(void 0),E(null),c.current=null,v.current=null,b.current&&clearTimeout(b.current),b.current=null,x();let t=e.id;le(t).then(e=>{h.current===t&&(w(e),E(e))},()=>h.current===t&&w(null))},[e.id]),(0,_.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let D=(0,_.useRef)(new WeakMap),O=e.paths.length>1,k=(0,_.useMemo)(()=>_g(d,p,null),[d,p]),A=(0,_.useMemo)(()=>_g(d,p,O?i:null),[d,p,O,i]),j=(0,_.useMemo)(()=>wg(k),[k]),M=(0,_.useMemo)(()=>Tg(k,d,C?.checkpointId,C?.ts),[k,d,C]),ee=(0,_.useMemo)(()=>kg(k,d,T?.looks),[k,d,T]),N=f_(d),P=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(P.current!==e.id){if(t){if(!j)return;P.current=e.id,u(j);return}C!==void 0&&d.length!==0&&(P.current=e.id,M&&u(M))}},[t,j,M,C,d.length,e.id]),d_(N===null?null:`${e.id}:${N}`,v_,()=>{if(N===null)return;let t=e.id,n=T?{checkpointId:T.checkpointId,ts:d.find(e=>e.id===T.checkpointId)?.ts??null}:void 0;B(t,N,d.find(e=>e.id===N)?.ts,n).then(e=>e&&h.current===t&&E(e),()=>{})});let F=xg(k,l),I=l.kind===`range`&&!F?vg:l,te=I.kind===`scope`?I.base:`uncommitted`,ne=o?.startsWith(`/diff/`)?o.slice(6):null,L=F?.to,re=F?[F.from,F.to].map(e=>e.kind===`commit`||e.kind===`parent`?e.repo:null).find(e=>e)??null:null,{data:R,error:ie,loading:ae,pending:oe,stale:se,applyPending:ce,reload:z,checkForUpdates:de}=Pm(()=>{let t=Date.now();return(F?H(e.id,`uncommitted`,F):H(e.id,te)).then(e=>(D.current.set(e,t),e))},[e.id,Mg(I),F&&y(F.from),F&&y(F.to)]),U=(0,_.useMemo)(()=>L,[R]),fe=U?.kind===`checkpoint`?d.find(e=>e.id===U.id):void 0,W=(0,_.useMemo)(()=>e=>Ng(U,fe?.repos,e),[U,fe]);go(`/events?session=${encodeURIComponent(e.id)}`,{events:{"diff-changed":()=>{de(),S()},"checkpoints-changed":e=>{let t=e?.scopeHash;(!t||!v.current||t===v.current)&&x()}}});let G=(0,_.useMemo)(()=>Mm(e.id),[e.id]);(0,_.useEffect)(()=>{if(!R||R.repos.length===0)return;let e=m_(R.repos,i,c.current);e!==i&&a(e)},[R,i]);let pe=e=>{c.current=e,a(e)},me=e=>{re&&re!==e&&u(yg),pe(e)},he=(0,_.useMemo)(()=>{let e=new Map,t=0;if(R)for(let n of R.repos)e.set(n.name,t),t+=n.files.length;return e},[R]),ge=(0,_.useMemo)(()=>!R||R.repos.length===0?null:R.repos.find(e=>e.name===i)??R.repos[0],[R,i]),_e=ge?he.get(ge.name)??0:0,ve=(0,_.useMemo)(()=>{let e=new Map;return ge&&ge.files.forEach((t,n)=>{e.set(t.path,Ym(_e+n))}),e},[ge,_e]),{viewedPaths:ye,viewedAnchors:be,toggle:xe,setMany:Se}=i_(ge?`session:${e.id}:${ge.name}`:`session:${e.id}:_pending`,ve,(0,_.useMemo)(()=>new Map((ge?.files??[]).map(e=>[e.path,p_(e)])),[ge])),Ce=l_(`${e.id}:${ge?.name??`_pending`}`),{width:we,setWidth:Te}=zl(),{size:Ee,setSize:De}=Rl(Fl),Oe=(0,_.useRef)(null),ke=(0,_.useRef)(null),Ae=(0,_.useRef)(null);o_(Ae);let je=()=>{z(),Ae.current?.scrollTo({top:0})},Me=(0,_.useRef)(null);c_(Me,Ce,!0);let Ne=I.kind===`scope`&&I.base===`uncommitted`,Pe=(0,_.useMemo)(()=>Ne?{revert:async(t,n,r)=>{await Be(e.id,{repo:t,path:n,lines:r}),z()}}:null,[Ne,e.id,z]),Fe=se||ae,Ie=R?R.repos.reduce((e,t)=>e+t.files.length,0):0,Le=R?R.repos.reduce((e,t)=>e+t.files.reduce((e,t)=>e+t.added,0),0):0,Re=R?R.repos.reduce((e,t)=>e+t.files.reduce((e,t)=>e+t.deleted,0),0):0,ze=R?R.repos.filter(e=>e.files.length>0).length:0,Ve=oe?oe.repos.reduce((e,t)=>e+t.files.length,0):null,He=oe&&R?Dg(k,d,D.current.get(R)):null,Ue=(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar wd-dash-difftoolbar`,role:`toolbar`,"aria-label":`Diff`,children:[(0,K.jsxs)(`div`,{className:`wd-dash-difftoolbar-pick`,children:[O&&(0,K.jsx)(`div`,{className:`wd-web-diff-scope wd-diff-repo-switch`,role:`tablist`,"aria-label":`Repo`,children:g_(h_(e.paths),R?.repos).map(e=>{let t=e.name===(ge?.name??i);return(0,K.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`wd-web-diff-scope-btn`+(t?` wd-web-diff-scope-btn-active`:``)+(e.files===0?` wd-diff-repo-empty`:``),onClick:()=>me(e.name),title:e.files===null?`${e.name}: not in this pick (a commit is one repo's) — shows its branch`:e.files===0?`${e.name}: no changes here`:`${e.name}: ${e.files} file${e.files===1?``:`s`} +${e.added} −${e.deleted}`,children:[e.name,e.files!==null&&(0,K.jsxs)(`span`,{className:`wd-web-tab-count`,children:[` `,e.files]})]},e.name)})}),(0,K.jsxs)(`div`,{className:`wd-web-diff-scope`,role:`tablist`,"aria-label":`Diff scope`,children:[(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":I.kind===`scope`&&I.base===`uncommitted`,className:`wd-web-diff-scope-btn`+(I.kind===`scope`&&I.base===`uncommitted`?` wd-web-diff-scope-btn-active`:``),onClick:()=>u(vg),title:`What isn't committed yet (git diff HEAD)`,children:`Uncommitted`}),(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":I.kind===`scope`&&I.base===`branch`,className:`wd-web-diff-scope-btn`+(I.kind===`scope`&&I.base===`branch`?` wd-web-diff-scope-btn-active`:``),onClick:()=>u(yg),title:e.baseBranch?`Everything since this branch left ${e.baseBranch}: its commits and what isn't committed`:`Everything since this branch left its parent (found by itself): its commits and what isn't committed`,children:`Since branch`})]}),(0,K.jsx)(Fg,{items:A,selection:I,onSelect:u,lastTurn:j,sinceLooked:M,looks:ee,commitsOf:O?i:null},`${e.id}:${O?i:``}`)]}),(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-info`,children:[R&&(0,K.jsx)(`span`,{className:`wd-web-difftoolbar-count`,children:Ie===0?`no changes`:(0,K.jsxs)(K.Fragment,{children:[Ie,` file`,Ie===1?``:`s`,ze>1?` in ${ze} repos`:``,` `,(0,K.jsxs)(`span`,{className:`wd-add`,children:[`+`,Le]}),` `,(0,K.jsxs)(`span`,{className:`wd-del`,children:[`−`,Re]})]})}),R&&I.kind===`scope`&&I.base===`branch`&&R.resolvedBase&&R.resolvedBase!==`HEAD`&&(0,K.jsxs)(`span`,{className:`wd-web-difftoolbar-compare wd-web-muted`,children:[`vs `,R.resolvedBase]}),re&&O&&(0,K.jsxs)(`span`,{className:`wd-web-difftoolbar-compare wd-web-muted`,title:`A commit belongs to one repo: a span from or to one shows that repo's changes`,children:[re,` only`]}),oe&&(0,K.jsx)(hg,{filesChanged:Ve,onShow:ce,onReload:je,onShowNewOnly:He?()=>u(He):void 0})]}),(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-controls`,children:[(0,K.jsx)(gg,{}),o&&(0,K.jsx)(`a`,{className:`wd-btn-secondary wd-diff-open-page`,href:o,target:`_blank`,rel:`noopener noreferrer`,title:`Open this diff in your browser, on a page of its own (as wd does)`,children:`Open in browser ↗`}),r&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-diff-fullscreen`,"aria-pressed":n,onClick:()=>r(!n),title:n?`Back to the session (Esc)`:`Fill the window with the diff`,children:n?`Exit full screen`:`Full screen`})]}),(0,K.jsx)(`div`,{className:`wd-diff-progress`+(Fe?` wd-diff-progress-on`:``),role:`progressbar`,"aria-hidden":!Fe,"aria-label":`Loading the diff`})]});if(ie)return(0,K.jsxs)(K.Fragment,{children:[Ue,(0,K.jsx)(`div`,{className:`wd-web-error`,children:ie})]});if(!R)return(0,K.jsxs)(K.Fragment,{children:[Ue,(0,K.jsx)(`div`,{className:`wd-web-empty wd-web-empty-diff`,children:(0,K.jsx)(`p`,{className:`wd-web-muted`,children:`Loading the diff…`})})]});let We=Ie===0||!ge,Ge=__(I,R.resolvedBase,Ag(k,I));return(0,K.jsx)(Im,{api:G,children:(0,K.jsx)(b_,{scopeHash:ne,refFor:W,children:(0,K.jsxs)(qm.Provider,{value:Pe,children:[Ue,(0,K.jsxs)(`div`,{ref:Oe,className:`wd-web-review-layout`,style:{"--sidebar-width":`${we}px`},children:[(0,K.jsx)(`aside`,{ref:ke,className:`wd-web-review-sidebar wd-web-review-sidebar-split`,style:{[Fl.cssVar]:`${Ee}px`},children:!We&&ge?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{ref:Me,className:`wd-sidebar-split-top`+(se?` wd-diff-stale-soft`:``),inert:se,children:(0,K.jsx)(Vg,{files:ge.files,startIndex:_e,selectedAnchor:Ce,viewedAnchors:be,onMarkViewed:Se})}),(0,K.jsx)(S_,{sidebarRef:ke,height:Ee,onHeight:De,repoName:ge.name,onOpenRepo:pe})]}):(0,K.jsx)(`div`,{className:`wd-sidebar-split-bottom wd-sidebar-comments-only`,children:(0,K.jsx)(Ug,{})})}),(0,K.jsx)(Bl,{layoutRef:Oe,size:we,onCommit:Te}),(0,K.jsx)(`main`,{ref:Ae,className:`wd-web-review-main`+(se?` wd-diff-stale-soft`:``),"aria-busy":Fe,inert:se,style:{"--tabs-offset":`0px`},children:We||!ge?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jg,{}),(0,K.jsxs)(`div`,{className:`wd-web-empty wd-web-empty-diff`,children:[(0,K.jsx)(`p`,{children:Ge}),I.kind===`scope`&&I.base===`uncommitted`&&(0,K.jsxs)(`p`,{className:`wd-web-empty-hint`,children:[`Try`,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-web-link-btn`,onClick:()=>u(yg),children:`Since branch`}),` `,`for everything on this branch, or pick a commit or a turn under Changes.`]})]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jg,{}),(0,K.jsx)(mg,{repo:ge,startIndex:_e,review:!0,viewedPaths:ye,onToggleViewed:xe})]})}),!We&&(0,K.jsx)(Xg,{})]})]})})})}function S_({sidebarRef:e,height:t,onHeight:n,repoName:r,onOpenRepo:i}){let a=Lm().comments.length===0;return(0,K.jsxs)(K.Fragment,{children:[!a&&(0,K.jsx)(Bl,{layoutRef:e,size:t,onCommit:n,spec:Fl}),(0,K.jsx)(`div`,{className:`wd-sidebar-split-bottom`+(a?` wd-sidebar-comments-none`:``),children:(0,K.jsx)(Ug,{repoName:r,onOpenRepo:i})})]})}var C_=`modulepreload`,w_=function(e){return`/`+e},T_={},E_=function(e){return e.pathname.endsWith(`.css`)},D_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=w_(t,n);let r=s(t);if(r.href in T_)return;T_[r.href]=!0;let i=E_(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:C_,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},O_=()=>D_(()=>import(`./PtyView-DIEUYCTu.js`),__vite__mapDeps([0,1])),k_=(0,_.lazy)(()=>O_().then(e=>({default:e.PtyView})));function A_(){O_().catch(()=>{})}function j_(e){return(0,K.jsx)(_.Suspense,{fallback:(0,K.jsx)(`div`,{className:`wd-term-loading`,"aria-busy":`true`}),children:(0,K.jsx)(k_,{...e})})}function M_(e,t,n){let r=!!e.archivedAt,i=r?[]:[{label:`Reconnect terminal`,hint:Ht(`reconnect`),run:n.reconnectTerminal},{label:`Open in terminal`,hint:Ht(`terminal`),run:n.openTerminal},{label:`Ship (push, PR, merge)…`,hint:Ht(`ship`),run:n.ship}],a=r||!t||t.port===null||!t.command&&!t.running?[]:[t.running?{label:`Stop dev server`,hint:`:${t.port} · ${Ht(`dev`)}`,run:n.devStop}:{label:`Start dev server`,hint:`:${t.port} · ${Ht(`dev`)}`,run:n.devStart}];return[...i,{label:`Catch me up`,hint:Ht(`catchup`),run:n.catchUp},{label:`Timeline`,hint:Ht(`timeline`),run:n.timeline},...r?[]:[{label:`Send a prompt…`,hint:Ht(`prompt`),run:n.sendPrompt}],{label:e.hasNote?`Notes •`:`Notes`,hint:Ht(`notes`),run:n.notes},...a,{label:`Rename`,hint:`F2`,run:n.rename,separated:!0},{label:`Delete…`,hint:Ht(`delete`),run:n.remove,danger:!0}]}function N_(e){let t=e.context;if(!(!t||t.window<=0))return`Context ${Math.round(Math.min(1,t.used/t.window)*100)}% · ${ul(t.used)} of ${ul(t.window)} tokens`}var P_=0;function F_({session:e,subTab:t,onSelectSubTab:n,onDelete:r,prs:i=[],onShipped:a,startOnLastTurn:o=!1,onOpenSession:s,onTermSlot:c}){let l=e.diffStat?.files??0,u=im(e,i),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1);(0,_.useEffect)(()=>m(!1),[e.id,t]);let[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(null);return(0,_.useEffect)(()=>y(null),[e.id]),(0,_.useEffect)(()=>{let t=t=>{up(t,{inApp:Bo(),archived:vt(e),modal:It(),searching:h})&&(t.preventDefault(),t.stopPropagation(),g(e=>!e))};return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e,h]),t===`pr`&&d!==e.id&&f(e.id),(0,K.jsxs)(`div`,{className:`wd-session-detail`,children:[(0,K.jsx)(I_,{session:e,prs:i,onDelete:r,onShipped:a,onOpenSession:s,onOpenPr:t===`pr`?void 0:()=>n(`pr`),onShowTerminal:()=>n(`term`),onShowTimeline:()=>n(`timeline`)},e.id),(0,K.jsxs)(`nav`,{className:`wd-session-subtabs`,role:`tablist`,children:[(0,K.jsx)(z_,{label:`Terminal`,active:t===`term`,onClick:()=>n(`term`)}),(0,K.jsx)(z_,{label:`Diff`,meta:l?`${l} file${l===1?``:`s`}`:void 0,active:t===`diff`,badge:e.commentCount,onClick:()=>n(`diff`)}),(u||t===`pr`)&&(0,K.jsx)(z_,{label:u?.label??`PR`,meta:u?.meta,badge:u?.badge,badgeTitle:e=>`${e} want${e===1?`s`:``} you: open review threads, failing checks, conflicts`,active:t===`pr`,onClick:()=>n(`pr`)}),(0,K.jsx)(z_,{label:`Code`,active:t===`code`,onClick:()=>n(`code`)})]}),(0,K.jsxs)(`div`,{className:`wd-session-subtab-body`+(t===`diff`&&p?` wd-diff-full`:``),children:[t===`diff`&&(0,K.jsx)(x_,{session:e,startOnLastTurn:o,fullScreen:p,onFullScreen:m}),t===`term`&&(c?(0,K.jsx)(`div`,{className:`wd-term-slot`,ref:c}):(0,K.jsx)(j_,{sessionId:e.id,target:e.target,branch:e.branch})),d===e.id&&(0,K.jsx)(`div`,{className:`wd-pr-tab-slot`,style:t===`pr`?void 0:{display:`none`},children:(0,K.jsx)(Cm,{session:e,prs:i,onShip:()=>window.dispatchEvent(new CustomEvent(Wt,{detail:{id:e.id,action:`ship`}}))},e.id)}),t===`code`&&(0,K.jsx)(op,{session:e,onShowDiff:()=>n(`diff`),goto:v?.sessionId===e.id?v:null,onSearch:vt(e)?void 0:()=>g(!0)},e.id),h&&(0,K.jsx)(_p,{sessionId:e.id,onPick:t=>{y({...t,seq:++P_,sessionId:e.id}),n(`code`)},onClose:()=>g(!1)}),t===`timeline`&&(0,K.jsxs)(`div`,{className:`wd-timeline-tab`,children:[(0,K.jsxs)(`div`,{className:`wd-timeline-head`,children:[(0,K.jsx)(`h2`,{className:`wd-timeline-title`,children:`Timeline`}),(0,K.jsx)(Op,{session:e})]}),(0,K.jsx)(Ju,{session:e})]})]})]})}function I_({session:e,prs:t,onDelete:n,onShipped:r,onOpenSession:i,onOpenPr:a,onShowTerminal:o,onShowTimeline:s}){let c=vt(e),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(0),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),w=vt(e);(0,_.useEffect)(()=>C(null),[w]);let T=Gp(e.id),E=Ap(e.id),D=am(e),O=()=>{o?.(),Uu(e.id)},k=()=>{x({text:`Opening in a terminal…`}),Tn(e.id).then(()=>x(null),e=>x({text:e.message,error:!0}))},A=(0,_.useRef)(null),j=(0,_.useRef)(()=>{});j.current=e=>{let t=!c;if(e===`menu`){let e=A.current?.getBoundingClientRect();e&&u({x:e.right,y:e.bottom+4})}else e===`prompt`&&t?g(!0):e===`catchup`?E.run():e===`timeline`?s?.():e===`notes`?m(e=>!e):e===`ship`&&t?f(!0):e===`terminal`&&t?k():e===`reconnect`&&t?O():e===`dev`&&t&&T.state?.port!=null&&(T.state.command||T.state.running)&&T.act(T.state.running?`stop`:`start`)},(0,_.useEffect)(()=>{let t=t=>{let n=t.detail;n?.id===e.id&&j.current(n.action)};return window.addEventListener(Wt,t),()=>window.removeEventListener(Wt,t)},[e.id]);let M=M_(e,T.state,{openTerminal:k,reconnectTerminal:O,ship:()=>f(!0),catchUp:E.run,timeline:()=>s?.(),sendPrompt:()=>g(!0),notes:()=>m(e=>!e),devStart:()=>T.act(`start`),devStop:()=>T.act(`stop`),rename:()=>y(e=>e+1),remove:n});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`header`,{className:`wd-session-detail-header`,children:[(0,K.jsxs)(`h1`,{children:[(0,K.jsx)(`span`,{className:`wd-session-detail-target`,children:e.target}),(0,K.jsx)(`span`,{className:`wd-session-detail-sep`,children:`/`}),(0,K.jsx)(`span`,{className:`wd-session-detail-branch`,children:e.branch}),(0,K.jsx)(Cl,{session:e}),(0,K.jsx)(L_,{session:e,autoEdit:v>0},v)]}),c&&(0,K.jsxs)(`span`,{className:`wd-archived-pill`,title:du(e),children:[`archived`,e.archive?.by?` · ${cu[e.archive.by]}`:``]}),(0,K.jsxs)(`div`,{className:`wd-session-actions`,children:[b&&(0,K.jsx)(`span`,{className:`wd-session-action-note`+(b.error?` wd-session-action-note-error`:``),role:b.error?`alert`:`status`,children:b.text}),S&&(0,K.jsx)(`span`,{className:`wd-session-action-note wd-session-action-note-error`,role:`alert`,children:S}),(0,K.jsx)(Up,{session:e,open:h,onOpenChange:g}),(0,K.jsx)(R_,{sessionId:e.id,archived:c,onStart:()=>C(null),onError:C}),(0,K.jsx)(`button`,{ref:A,type:`button`,className:`wd-session-more`,"aria-label":`More actions`,"aria-haspopup":`menu`,"aria-expanded":l!==null,title:`More actions`,onMouseDown:e=>{l&&e.stopPropagation()},onClick:e=>{if(l)return u(null);let t=e.currentTarget.getBoundingClientRect();u({x:t.right,y:t.bottom+4})},children:`⋯`})]})]}),l&&(0,K.jsx)(ns,{x:l.x,y:l.y,anchor:`right`,items:M,footer:N_(e),onClose:()=>u(null)}),(0,K.jsxs)(`div`,{className:`wd-session-strip`,children:[(0,K.jsx)(xl,{session:e}),(0,K.jsx)(Mp,{session:e,catchUp:E}),(0,K.jsx)(ol,{session:e}),(0,K.jsx)(cl,{session:e}),(0,K.jsx)(yl,{session:e,onOpen:i}),(0,K.jsx)(bp,{session:e,onOpen:i}),(0,K.jsx)(bl,{session:e,onOpen:i}),(0,K.jsx)(vl,{session:e,quiet:!0}),(0,K.jsx)(gl,{session:e,quiet:!0}),e.prStage?(0,K.jsx)(fl,{session:e,prs:t}):(0,K.jsx)(ml,{prs:t,link:!0}),(0,K.jsx)(Kp,{dev:T}),(e.hasNote||p)&&(0,K.jsx)(Cp,{session:e,open:p,onToggle:()=>m(e=>!e)})]}),(0,K.jsx)(Np,{catchUp:E}),p&&(0,K.jsx)(wp,{session:e,onClose:()=>m(!1)}),D&&(0,K.jsx)(qp,{text:D,onOpen:a}),d&&(0,K.jsx)(Rp,{session:e,onClose:()=>f(!1),onMerged:()=>{f(!1),r?.()}})]})}function L_({session:e,autoEdit:t=!1}){let[n,r]=(0,_.useState)(t),[i,a]=(0,_.useState)(()=>t&&e.titleIsYours?e.title??``:``),[o,s]=(0,_.useState)(!1),c=()=>{a(e.titleIsYours?e.title??``:``),r(!0)},l=async()=>{s(!0);try{await _e(e.id,i),r(!1)}finally{s(!1)}};return n?(0,K.jsx)(`input`,{className:`wd-session-title-input`,autoFocus:!0,value:i,disabled:o,placeholder:e.title??`Name this session`,"aria-label":`Session name`,onChange:e=>a(e.target.value),onBlur:()=>r(!1),onKeyDown:e=>{e.key===`Enter`&&l(),e.key===`Escape`&&r(!1)}}):!e.titleIsYours||!e.title?null:(0,K.jsx)(`button`,{type:`button`,className:`wd-session-title`,title:`Your name for it — click to rename`,onClick:c,children:e.title})}function R_({sessionId:e,archived:t,onStart:n,onError:r}){let i=w(e),a=i!==void 0,[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>s(null),[t]),(0,K.jsx)(`button`,{type:`button`,className:`wd-session-archive`,onClick:()=>{s(null),n?.(),D(e,!t).catch(e=>{O(e)||(s(e.message),r?.(e.message))})},disabled:a,title:o??(t?`Bring it back to the rail and inbox`:`Stop its Claude and hide it; worktree, branch and conversation are kept`),children:a?i?`Archiving…`:`Restoring…`:t?o?`Restore ⚠`:`Restore`:o?`Archive ⚠`:`Archive`})}function z_({label:e,active:t,onClick:n,meta:r,badge:i,badgeTitle:a}){return(0,K.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`wd-session-subtab`+(t?` wd-session-subtab-active`:``),onClick:n,children:[e,r&&(0,K.jsxs)(`span`,{className:`wd-session-subtab-meta`,children:[`· `,r]}),i?(0,K.jsx)(`span`,{className:`wd-session-subtab-badge`,title:a?a(i):`${i} comment${i===1?``:`s`}`,children:i}):null]})}function B_(e){return jc(e)}function V_(e){return{target:e.repoAlias,branch:e.fork?`review/pr-${e.number}`:e.branch,prompt:H_(e)}}function H_(e){if(!e.isMine)return[`Review PR #${e.number}: ${e.title}`,e.url,``,...e.fork?[`It comes from a fork, so its branch isn't here: gh pr checkout ${e.number} --detach gives you its code to try.`]:[],`It isn't mine: read what it changes (gh pr diff ${e.number}), run what's useful to check it, and tell me what you'd comment and why.`,`Don't commit, push or post anything on GitHub.`].join(`
|
|
113
|
+
`)[0]})]})}function Gg(e){if(e.side===`general`){let e=document.querySelector(`.wd-general-pane`),t=e?.querySelector(`details`);t&&!t.open&&(t.open=!0),e?.scrollIntoView({behavior:`smooth`,block:`start`});return}let t=document.querySelector(`article.wd-file[data-path="${qg(e.file)}"]`);t&&(t.scrollIntoView({behavior:`smooth`,block:`start`}),e.side!==`file`&&Kg(t,e.line,e.side))}function Kg(e,t,n){let r=e.querySelectorAll(n===`right`?`.wd-ln-new`:`.wd-ln-old`);for(let e of r)if(e.textContent?.trim()===String(t)){let t=e.closest(`tr`);if(t){t.classList.add(`wd-row-flash`),setTimeout(()=>t.classList.remove(`wd-row-flash`),1200);let e=t.nextElementSibling;e?.classList.contains(`wd-comment-row`)&&e.scrollIntoView({behavior:`smooth`,block:`center`})}break}}function qg(e){return e.replace(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,`\\$&`)}function Jg(){let e=Lm(),[t,n]=(0,_.useState)(``),r=e.comments.filter(e=>e.side===`general`&&!e.parentId);async function i(r){let i=t.trim();i&&(await e.postComment({side:`general`,body:i,status:r}),n(``))}return(0,K.jsx)(`section`,{className:`wd-general-pane`,children:(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{children:`General review note (not tied to any line)`}),(0,K.jsx)(`textarea`,{className:`wd-general-input`,placeholder:`A high-level comment for Claude…`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),i(`published`))}}),(0,K.jsxs)(`div`,{className:`wd-general-pane-actions`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,disabled:!t.trim(),onClick:()=>i(`draft`),children:e.comments.some(e=>e.status===`draft`)?`Add to review`:`Start review`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,disabled:!t.trim(),onClick:()=>i(`published`),children:`Comment (Ctrl+Enter)`})]}),r.length>0&&(0,K.jsx)(`div`,{className:`wd-general-pane-list`,children:r.map(e=>(0,K.jsx)(Ih,{comment:e,currentLineContent:null},e.id))})]})})}function Yg({title:e,children:t,actions:n,onClose:r,primaryRef:i}){let a=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),(0,_.useEffect)(()=>{if(i?.current){i.current.focus();return}(a.current?.querySelector(`.wd-btn-primary`))?.focus()},[i]),(0,K.jsx)(`div`,{className:`wd-modal-backdrop`,ref:a,onClick:e=>{e.target===e.currentTarget&&r()},children:(0,K.jsxs)(`div`,{className:`wd-modal`,children:[(0,K.jsx)(`h2`,{children:e}),t,(0,K.jsx)(`div`,{className:`wd-modal-actions`,children:n})]})})}function Xg(){let e=Lm(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(``),a=zm(e.comments);return a.length===0?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-pending-pill wd-visible`,onClick:()=>{i(``),n(!0)},children:[`Pending review `,(0,K.jsxs)(`span`,{className:`wd-pending-count`,children:[`(`,a.length,`)`]})]}),t&&(0,K.jsxs)(Yg,{title:`Submit your review`,onClose:()=>n(!1),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:async()=>{confirm(`Discard all ${a.length} pending comment(s)?`)&&(await e.discardReview(),n(!1))},children:`Discard drafts`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:async()=>{try{await e.submitReview(r),n(!1)}catch{}},children:`Submit review`})]}),children:[(0,K.jsxs)(`p`,{children:[`Sending `,a.length,` pending comment`,a.length===1?``:`s`,`. Add a summary if you like, then click Submit to send everything to Claude.`]}),(0,K.jsx)(`textarea`,{className:`wd-submit-summary`,placeholder:`Optional summary…`,value:r,onChange:e=>i(e.target.value)})]})]})}function Zg(e){function t(){try{let t=localStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return n&&typeof n==`object`?n:{}}catch{return{}}}function n(t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}return{has(e,n){return!!t()[e]?.[n]},set(e,r,i){let a=t();a[e]||(a[e]={}),i?a[e][r]=!0:delete a[e][r],Object.keys(a[e]).length===0&&delete a[e],n(a)},readScope(e){return new Set(Object.keys(t()[e]??{}))},update(e,r){let i=t(),a=new Set(Object.keys(i[e]??{}));return r(a),a.size===0?delete i[e]:i[e]=Object.fromEntries([...a].map(e=>[e,!0])),n(i),a}}}var Qg=Zg(`work-web:viewed-files`);function $g(e){return Qg.readScope(e)}function e_(e,t){return Qg.update(e,t)}var t_=/#(\d+\.\d+\.[0-9a-z]+)$/;function n_(e){let t=t_.exec(e);return t?{path:e.slice(0,t.index),signature:t[1]}:{path:e}}function r_(e,t){let n=new Set;for(let r of e){let{path:e,signature:i}=n_(r);(i===void 0||!t||t.get(e)===i)&&n.add(e)}return n}function i_(e,t,n){let[r,i]=(0,_.useState)(()=>$g(e));(0,_.useEffect)(()=>{i($g(e))},[e]);let a=(0,_.useMemo)(()=>r_(r,n),[r,n]),o=(0,_.useCallback)((t,r)=>{let a=new Set(t),o=e_(e,e=>{for(let t of[...e])a.has(n_(t).path)&&e.delete(t);if(r)for(let r of t){let t=n?.get(r);e.add(t?`${r}#${t}`:r)}});i(o)},[e,n]),s=(0,_.useCallback)((e,t)=>o([e],t),[o]),c=new Set;for(let e of a){let n=t.get(e);n&&c.add(n)}return{viewedPaths:a,viewedAnchors:c,toggle:s,setMany:o}}var a_=`.wd-comment-row`;function o_(e){let t=(0,_.useRef)(null);(0,_.useEffect)(()=>{let n=n=>{if(n.key!==`]`&&n.key!==`[`||n.metaKey||n.ctrlKey||n.altKey)return;let r=document.activeElement;if(r&&(r.tagName===`INPUT`||r.tagName===`TEXTAREA`||r.tagName===`SELECT`||r.isContentEditable))return;let i=e.current;if(!i)return;let a=[...i.querySelectorAll(a_)];if(a.length===0)return;n.preventDefault();let o=t.current?a.indexOf(t.current):-1,s=n.key===`]`?a[o<0?0:(o+1)%a.length]:a[o<0?a.length-1:(o-1+a.length)%a.length];t.current=s,s.scrollIntoView?.({behavior:`smooth`,block:`center`}),s.classList.add(`wd-row-flash`),setTimeout(()=>s.classList.remove(`wd-row-flash`),1200)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e])}function s_(e,t,n,r){let i=e+t;return e<r?e-r:i>n-r?i-(n-r):0}function c_(e,t,n){(0,_.useEffect)(()=>{if(!n||!t)return;let r=e.current;if(!r)return;let i=r.querySelector(`.wd-tree-file-active`);if(!i)return;let a=i.getBoundingClientRect().top-r.getBoundingClientRect().top;r.scrollTop+=s_(a,i.offsetHeight,r.clientHeight,24)},[t,n])}function l_(e){let[t,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{function e(){let e=Array.from(document.querySelectorAll(`article.wd-file`)).filter(e=>e.isConnected);if(e.length===0){n(null);return}let t=null;for(let n of e)if(n.getBoundingClientRect().top<=80)t=n;else break;n((t??e[0]).id)}let t=!1;function r(){t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}e(),window.addEventListener(`scroll`,r,{passive:!0,capture:!0}),window.addEventListener(`resize`,r);let i=typeof MutationObserver>`u`?null:new MutationObserver(r),a=document.querySelector(`.wd-web-review-main`)??document.body;return i?.observe(a,{childList:!0,subtree:!0}),()=>{window.removeEventListener(`scroll`,r,{capture:!0}),window.removeEventListener(`resize`,r),i?.disconnect()}},[e]),t}var u_=()=>document.visibilityState===`visible`&&document.hasFocus();function d_(e,t,n,r=1e3){let i=(0,_.useRef)(n);i.current=n,(0,_.useEffect)(()=>{if(e===null)return;let n=0,a=setInterval(()=>{u_()&&(n+=r,n>=t&&(clearInterval(a),i.current()))},r);return()=>clearInterval(a)},[e,t,r])}function f_(e){return e.length?Math.max(...e.map(e=>e.id)):null}function p_(e){let t=5381;for(let n of e.hunks)for(let e of n.lines){let n=`${e.kind}${e.content}`;for(let e=0;e<n.length;e++)t=(t<<5)+t+n.charCodeAt(e)|0}return`${e.added}.${e.deleted}.${(t>>>0).toString(36)}`}function m_(e,t,n){if(e.length===0)return t;if(n&&e.some(e=>e.name===n))return n;let r=e.find(e=>e.name===t);return r&&r.files.length>0?r.name:(e.find(e=>e.files.length>0)??r??e[0]).name}function h_(e){return e.map(e=>e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()??e)}function g_(e,t){return e.map(e=>{let n=t?.find(t=>t.name===e);return{name:e,files:n?n.files.length:null,added:n?n.files.reduce((e,t)=>e+t.added,0):0,deleted:n?n.files.reduce((e,t)=>e+t.deleted,0):0}})}function __(e,t,n){return e.kind===`range`?n===`Since you looked`?`Nothing changed since you last looked.`:n===`Last turn`?`The last turn changed no files.`:e.fromKey===e.toKey?`This changed no files.`:`Nothing changed in this span.`:e.base===`uncommitted`?`No uncommitted changes.`:!t||t===`HEAD`?"Couldn't find this branch's parent. Tried main, master, dev, develop (and their origin/* mirrors). Record one with `work tree --base <ref>`.":`No commits since \`${t}\` — this branch is up to date or already merged.`}var v_=5e3,y_=5e3;function b_({scopeHash:e,refFor:t,children:n}){return(0,K.jsx)(Gm,{scopeHash:e??void 0,refFor:t,ready:e!==null,children:n})}function x_({session:e,startOnLastTurn:t=!1,fullScreen:n=!1,onFullScreen:r}){let[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(s(null),e.archivedAt)return;let t=!0;return V(e.id).then(e=>t&&s(e),()=>{}),()=>{t=!1}},[e.id,e.archivedAt]),(0,_.useEffect)(()=>{if(!n)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||It()||r?.(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let c=(0,_.useRef)(null),[l,u]=(0,_.useState)(vg),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)([]),h=(0,_.useRef)(e.id);h.current=e.id;let g=(0,_.useRef)(0),v=(0,_.useRef)(null),b=(0,_.useRef)(null),x=()=>{let t=e.id;g.current=Date.now(),ue(t).then(e=>{h.current===t&&(v.current=e.scopeHash,f(e.entries),m(e.commits))},()=>h.current===t&&f([]))},S=()=>{let e=y_-(Date.now()-g.current);if(e<=0)return x();b.current??=setTimeout(()=>{b.current=null,x()},e)},[C,w]=(0,_.useState)(void 0),[T,E]=(0,_.useState)(null);(0,_.useEffect)(()=>{u(vg),f([]),m([]),w(void 0),E(null),c.current=null,v.current=null,b.current&&clearTimeout(b.current),b.current=null,x();let t=e.id;le(t).then(e=>{h.current===t&&(w(e),E(e))},()=>h.current===t&&w(null))},[e.id]),(0,_.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let D=(0,_.useRef)(new WeakMap),O=e.paths.length>1,k=(0,_.useMemo)(()=>_g(d,p,null),[d,p]),A=(0,_.useMemo)(()=>_g(d,p,O?i:null),[d,p,O,i]),j=(0,_.useMemo)(()=>wg(k),[k]),M=(0,_.useMemo)(()=>Tg(k,d,C?.checkpointId,C?.ts),[k,d,C]),ee=(0,_.useMemo)(()=>kg(k,d,T?.looks),[k,d,T]),N=f_(d),P=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(P.current!==e.id){if(t){if(!j)return;P.current=e.id,u(j);return}C!==void 0&&d.length!==0&&(P.current=e.id,M&&u(M))}},[t,j,M,C,d.length,e.id]),d_(N===null?null:`${e.id}:${N}`,v_,()=>{if(N===null)return;let t=e.id,n=T?{checkpointId:T.checkpointId,ts:d.find(e=>e.id===T.checkpointId)?.ts??null}:void 0;B(t,N,d.find(e=>e.id===N)?.ts,n).then(e=>e&&h.current===t&&E(e),()=>{})});let F=xg(k,l),I=l.kind===`range`&&!F?vg:l,te=I.kind===`scope`?I.base:`uncommitted`,ne=o?.startsWith(`/diff/`)?o.slice(6):null,L=F?.to,re=F?[F.from,F.to].map(e=>e.kind===`commit`||e.kind===`parent`?e.repo:null).find(e=>e)??null:null,{data:R,error:ie,loading:ae,pending:oe,stale:se,applyPending:ce,reload:z,checkForUpdates:de}=Pm(()=>{let t=Date.now();return(F?H(e.id,`uncommitted`,F):H(e.id,te)).then(e=>(D.current.set(e,t),e))},[e.id,Mg(I),F&&y(F.from),F&&y(F.to)]),U=(0,_.useMemo)(()=>L,[R]),fe=U?.kind===`checkpoint`?d.find(e=>e.id===U.id):void 0,W=(0,_.useMemo)(()=>e=>Ng(U,fe?.repos,e),[U,fe]);go(`/events?session=${encodeURIComponent(e.id)}`,{events:{"diff-changed":()=>{de(),S()},"checkpoints-changed":e=>{let t=e?.scopeHash;(!t||!v.current||t===v.current)&&x()}}});let G=(0,_.useMemo)(()=>Mm(e.id),[e.id]);(0,_.useEffect)(()=>{if(!R||R.repos.length===0)return;let e=m_(R.repos,i,c.current);e!==i&&a(e)},[R,i]);let pe=e=>{c.current=e,a(e)},me=e=>{re&&re!==e&&u(yg),pe(e)},he=(0,_.useMemo)(()=>{let e=new Map,t=0;if(R)for(let n of R.repos)e.set(n.name,t),t+=n.files.length;return e},[R]),ge=(0,_.useMemo)(()=>!R||R.repos.length===0?null:R.repos.find(e=>e.name===i)??R.repos[0],[R,i]),_e=ge?he.get(ge.name)??0:0,ve=(0,_.useMemo)(()=>{let e=new Map;return ge&&ge.files.forEach((t,n)=>{e.set(t.path,Ym(_e+n))}),e},[ge,_e]),{viewedPaths:ye,viewedAnchors:be,toggle:xe,setMany:Se}=i_(ge?`session:${e.id}:${ge.name}`:`session:${e.id}:_pending`,ve,(0,_.useMemo)(()=>new Map((ge?.files??[]).map(e=>[e.path,p_(e)])),[ge])),Ce=l_(`${e.id}:${ge?.name??`_pending`}`),{width:we,setWidth:Te}=zl(),{size:Ee,setSize:De}=Rl(Fl),Oe=(0,_.useRef)(null),ke=(0,_.useRef)(null),Ae=(0,_.useRef)(null);o_(Ae);let je=()=>{z(),Ae.current?.scrollTo({top:0})},Me=(0,_.useRef)(null);c_(Me,Ce,!0);let Ne=I.kind===`scope`&&I.base===`uncommitted`,Pe=(0,_.useMemo)(()=>Ne?{revert:async(t,n,r)=>{await Be(e.id,{repo:t,path:n,lines:r}),z()}}:null,[Ne,e.id,z]),Fe=se||ae,Ie=R?R.repos.reduce((e,t)=>e+t.files.length,0):0,Le=R?R.repos.reduce((e,t)=>e+t.files.reduce((e,t)=>e+t.added,0),0):0,Re=R?R.repos.reduce((e,t)=>e+t.files.reduce((e,t)=>e+t.deleted,0),0):0,ze=R?R.repos.filter(e=>e.files.length>0).length:0,Ve=oe?oe.repos.reduce((e,t)=>e+t.files.length,0):null,He=oe&&R?Dg(k,d,D.current.get(R)):null,Ue=(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar wd-dash-difftoolbar`,role:`toolbar`,"aria-label":`Diff`,children:[(0,K.jsxs)(`div`,{className:`wd-dash-difftoolbar-pick`,children:[O&&(0,K.jsx)(`div`,{className:`wd-web-diff-scope wd-diff-repo-switch`,role:`tablist`,"aria-label":`Repo`,children:g_(h_(e.paths),R?.repos).map(e=>{let t=e.name===(ge?.name??i);return(0,K.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`wd-web-diff-scope-btn`+(t?` wd-web-diff-scope-btn-active`:``)+(e.files===0?` wd-diff-repo-empty`:``),onClick:()=>me(e.name),title:e.files===null?`${e.name}: not in this pick (a commit is one repo's) — shows its branch`:e.files===0?`${e.name}: no changes here`:`${e.name}: ${e.files} file${e.files===1?``:`s`} +${e.added} −${e.deleted}`,children:[e.name,e.files!==null&&(0,K.jsxs)(`span`,{className:`wd-web-tab-count`,children:[` `,e.files]})]},e.name)})}),(0,K.jsxs)(`div`,{className:`wd-web-diff-scope`,role:`tablist`,"aria-label":`Diff scope`,children:[(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":I.kind===`scope`&&I.base===`uncommitted`,className:`wd-web-diff-scope-btn`+(I.kind===`scope`&&I.base===`uncommitted`?` wd-web-diff-scope-btn-active`:``),onClick:()=>u(vg),title:`What isn't committed yet (git diff HEAD)`,children:`Uncommitted`}),(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":I.kind===`scope`&&I.base===`branch`,className:`wd-web-diff-scope-btn`+(I.kind===`scope`&&I.base===`branch`?` wd-web-diff-scope-btn-active`:``),onClick:()=>u(yg),title:e.baseBranch?`Everything since this branch left ${e.baseBranch}: its commits and what isn't committed`:`Everything since this branch left its parent (found by itself): its commits and what isn't committed`,children:`Since branch`})]}),(0,K.jsx)(Fg,{items:A,selection:I,onSelect:u,lastTurn:j,sinceLooked:M,looks:ee,commitsOf:O?i:null},`${e.id}:${O?i:``}`)]}),(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-info`,children:[R&&(0,K.jsx)(`span`,{className:`wd-web-difftoolbar-count`,children:Ie===0?`no changes`:(0,K.jsxs)(K.Fragment,{children:[Ie,` file`,Ie===1?``:`s`,ze>1?` in ${ze} repos`:``,` `,(0,K.jsxs)(`span`,{className:`wd-add`,children:[`+`,Le]}),` `,(0,K.jsxs)(`span`,{className:`wd-del`,children:[`−`,Re]})]})}),R&&I.kind===`scope`&&I.base===`branch`&&R.resolvedBase&&R.resolvedBase!==`HEAD`&&(0,K.jsxs)(`span`,{className:`wd-web-difftoolbar-compare wd-web-muted`,children:[`vs `,R.resolvedBase]}),re&&O&&(0,K.jsxs)(`span`,{className:`wd-web-difftoolbar-compare wd-web-muted`,title:`A commit belongs to one repo: a span from or to one shows that repo's changes`,children:[re,` only`]}),oe&&(0,K.jsx)(hg,{filesChanged:Ve,onShow:ce,onReload:je,onShowNewOnly:He?()=>u(He):void 0})]}),(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-controls`,children:[(0,K.jsx)(gg,{}),o&&(0,K.jsx)(`a`,{className:`wd-btn-secondary wd-diff-open-page`,href:o,target:`_blank`,rel:`noopener noreferrer`,title:`Open this diff in your browser, on a page of its own (as wd does)`,children:`Open in browser ↗`}),r&&(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary wd-diff-fullscreen`,"aria-pressed":n,onClick:()=>r(!n),title:n?`Back to the session (Esc)`:`Fill the window with the diff`,children:n?`Exit full screen`:`Full screen`})]}),(0,K.jsx)(`div`,{className:`wd-diff-progress`+(Fe?` wd-diff-progress-on`:``),role:`progressbar`,"aria-hidden":!Fe,"aria-label":`Loading the diff`})]});if(ie)return(0,K.jsxs)(K.Fragment,{children:[Ue,(0,K.jsx)(`div`,{className:`wd-web-error`,children:ie})]});if(!R)return(0,K.jsxs)(K.Fragment,{children:[Ue,(0,K.jsx)(`div`,{className:`wd-web-empty wd-web-empty-diff`,children:(0,K.jsx)(`p`,{className:`wd-web-muted`,children:`Loading the diff…`})})]});let We=Ie===0||!ge,Ge=__(I,R.resolvedBase,Ag(k,I));return(0,K.jsx)(Im,{api:G,children:(0,K.jsx)(b_,{scopeHash:ne,refFor:W,children:(0,K.jsxs)(qm.Provider,{value:Pe,children:[Ue,(0,K.jsxs)(`div`,{ref:Oe,className:`wd-web-review-layout`,style:{"--sidebar-width":`${we}px`},children:[(0,K.jsx)(`aside`,{ref:ke,className:`wd-web-review-sidebar wd-web-review-sidebar-split`,style:{[Fl.cssVar]:`${Ee}px`},children:!We&&ge?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{ref:Me,className:`wd-sidebar-split-top`+(se?` wd-diff-stale-soft`:``),inert:se,children:(0,K.jsx)(Vg,{files:ge.files,startIndex:_e,selectedAnchor:Ce,viewedAnchors:be,onMarkViewed:Se})}),(0,K.jsx)(S_,{sidebarRef:ke,height:Ee,onHeight:De,repoName:ge.name,onOpenRepo:pe})]}):(0,K.jsx)(`div`,{className:`wd-sidebar-split-bottom wd-sidebar-comments-only`,children:(0,K.jsx)(Ug,{})})}),(0,K.jsx)(Bl,{layoutRef:Oe,size:we,onCommit:Te}),(0,K.jsx)(`main`,{ref:Ae,className:`wd-web-review-main`+(se?` wd-diff-stale-soft`:``),"aria-busy":Fe,inert:se,style:{"--tabs-offset":`0px`},children:We||!ge?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jg,{}),(0,K.jsxs)(`div`,{className:`wd-web-empty wd-web-empty-diff`,children:[(0,K.jsx)(`p`,{children:Ge}),I.kind===`scope`&&I.base===`uncommitted`&&(0,K.jsxs)(`p`,{className:`wd-web-empty-hint`,children:[`Try`,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-web-link-btn`,onClick:()=>u(yg),children:`Since branch`}),` `,`for everything on this branch, or pick a commit or a turn under Changes.`]})]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Jg,{}),(0,K.jsx)(mg,{repo:ge,startIndex:_e,review:!0,viewedPaths:ye,onToggleViewed:xe})]})}),!We&&(0,K.jsx)(Xg,{})]})]})})})}function S_({sidebarRef:e,height:t,onHeight:n,repoName:r,onOpenRepo:i}){let a=Lm().comments.length===0;return(0,K.jsxs)(K.Fragment,{children:[!a&&(0,K.jsx)(Bl,{layoutRef:e,size:t,onCommit:n,spec:Fl}),(0,K.jsx)(`div`,{className:`wd-sidebar-split-bottom`+(a?` wd-sidebar-comments-none`:``),children:(0,K.jsx)(Ug,{repoName:r,onOpenRepo:i})})]})}var C_=`modulepreload`,w_=function(e){return`/`+e},T_={},E_=function(e){return e.pathname.endsWith(`.css`)},D_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=w_(t,n);let r=s(t);if(r.href in T_)return;T_[r.href]=!0;let i=E_(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:C_,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},O_=()=>D_(()=>import(`./PtyView-DT2KQFV3.js`),__vite__mapDeps([0,1])),k_=(0,_.lazy)(()=>O_().then(e=>({default:e.PtyView})));function A_(){O_().catch(()=>{})}function j_(e){return(0,K.jsx)(_.Suspense,{fallback:(0,K.jsx)(`div`,{className:`wd-term-loading`,"aria-busy":`true`}),children:(0,K.jsx)(k_,{...e})})}function M_(e,t,n){let r=!!e.archivedAt,i=r?[]:[{label:`Reconnect terminal`,hint:Ht(`reconnect`),run:n.reconnectTerminal},{label:`Open in terminal`,hint:Ht(`terminal`),run:n.openTerminal},{label:`Ship (push, PR, merge)…`,hint:Ht(`ship`),run:n.ship}],a=r||!t||t.port===null||!t.command&&!t.running?[]:[t.running?{label:`Stop dev server`,hint:`:${t.port} · ${Ht(`dev`)}`,run:n.devStop}:{label:`Start dev server`,hint:`:${t.port} · ${Ht(`dev`)}`,run:n.devStart}];return[...i,{label:`Catch me up`,hint:Ht(`catchup`),run:n.catchUp},{label:`Timeline`,hint:Ht(`timeline`),run:n.timeline},...r?[]:[{label:`Send a prompt…`,hint:Ht(`prompt`),run:n.sendPrompt}],{label:e.hasNote?`Notes •`:`Notes`,hint:Ht(`notes`),run:n.notes},...a,{label:`Rename`,hint:`F2`,run:n.rename,separated:!0},{label:`Delete…`,hint:Ht(`delete`),run:n.remove,danger:!0}]}function N_(e){let t=e.context;if(!(!t||t.window<=0))return`Context ${Math.round(Math.min(1,t.used/t.window)*100)}% · ${ul(t.used)} of ${ul(t.window)} tokens`}var P_=0;function F_({session:e,subTab:t,onSelectSubTab:n,onDelete:r,prs:i=[],onShipped:a,startOnLastTurn:o=!1,onOpenSession:s,onTermSlot:c}){let l=e.diffStat?.files??0,u=im(e,i),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1);(0,_.useEffect)(()=>m(!1),[e.id,t]);let[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(null);return(0,_.useEffect)(()=>y(null),[e.id]),(0,_.useEffect)(()=>{let t=t=>{up(t,{inApp:Bo(),archived:vt(e),modal:It(),searching:h})&&(t.preventDefault(),t.stopPropagation(),g(e=>!e))};return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e,h]),t===`pr`&&d!==e.id&&f(e.id),(0,K.jsxs)(`div`,{className:`wd-session-detail`,children:[(0,K.jsx)(I_,{session:e,prs:i,onDelete:r,onShipped:a,onOpenSession:s,onOpenPr:t===`pr`?void 0:()=>n(`pr`),onShowTerminal:()=>n(`term`),onShowTimeline:()=>n(`timeline`)},e.id),(0,K.jsxs)(`nav`,{className:`wd-session-subtabs`,role:`tablist`,children:[(0,K.jsx)(z_,{label:`Terminal`,active:t===`term`,onClick:()=>n(`term`)}),(0,K.jsx)(z_,{label:`Diff`,meta:l?`${l} file${l===1?``:`s`}`:void 0,active:t===`diff`,badge:e.commentCount,onClick:()=>n(`diff`)}),(u||t===`pr`)&&(0,K.jsx)(z_,{label:u?.label??`PR`,meta:u?.meta,badge:u?.badge,badgeTitle:e=>`${e} want${e===1?`s`:``} you: open review threads, failing checks, conflicts`,active:t===`pr`,onClick:()=>n(`pr`)}),(0,K.jsx)(z_,{label:`Code`,active:t===`code`,onClick:()=>n(`code`)})]}),(0,K.jsxs)(`div`,{className:`wd-session-subtab-body`+(t===`diff`&&p?` wd-diff-full`:``),children:[t===`diff`&&(0,K.jsx)(x_,{session:e,startOnLastTurn:o,fullScreen:p,onFullScreen:m}),t===`term`&&(c?(0,K.jsx)(`div`,{className:`wd-term-slot`,ref:c}):(0,K.jsx)(j_,{sessionId:e.id,target:e.target,branch:e.branch})),d===e.id&&(0,K.jsx)(`div`,{className:`wd-pr-tab-slot`,style:t===`pr`?void 0:{display:`none`},children:(0,K.jsx)(Cm,{session:e,prs:i,onShip:()=>window.dispatchEvent(new CustomEvent(Wt,{detail:{id:e.id,action:`ship`}}))},e.id)}),t===`code`&&(0,K.jsx)(op,{session:e,onShowDiff:()=>n(`diff`),goto:v?.sessionId===e.id?v:null,onSearch:vt(e)?void 0:()=>g(!0)},e.id),h&&(0,K.jsx)(_p,{sessionId:e.id,onPick:t=>{y({...t,seq:++P_,sessionId:e.id}),n(`code`)},onClose:()=>g(!1)}),t===`timeline`&&(0,K.jsxs)(`div`,{className:`wd-timeline-tab`,children:[(0,K.jsxs)(`div`,{className:`wd-timeline-head`,children:[(0,K.jsx)(`h2`,{className:`wd-timeline-title`,children:`Timeline`}),(0,K.jsx)(Op,{session:e})]}),(0,K.jsx)(Ju,{session:e})]})]})]})}function I_({session:e,prs:t,onDelete:n,onShipped:r,onOpenSession:i,onOpenPr:a,onShowTerminal:o,onShowTimeline:s}){let c=vt(e),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(0),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),w=vt(e);(0,_.useEffect)(()=>C(null),[w]);let T=Gp(e.id),E=Ap(e.id),D=am(e),O=()=>{o?.(),Uu(e.id)},k=()=>{x({text:`Opening in a terminal…`}),Tn(e.id).then(()=>x(null),e=>x({text:e.message,error:!0}))},A=(0,_.useRef)(null),j=(0,_.useRef)(()=>{});j.current=e=>{let t=!c;if(e===`menu`){let e=A.current?.getBoundingClientRect();e&&u({x:e.right,y:e.bottom+4})}else e===`prompt`&&t?g(!0):e===`catchup`?E.run():e===`timeline`?s?.():e===`notes`?m(e=>!e):e===`ship`&&t?f(!0):e===`terminal`&&t?k():e===`reconnect`&&t?O():e===`dev`&&t&&T.state?.port!=null&&(T.state.command||T.state.running)&&T.act(T.state.running?`stop`:`start`)},(0,_.useEffect)(()=>{let t=t=>{let n=t.detail;n?.id===e.id&&j.current(n.action)};return window.addEventListener(Wt,t),()=>window.removeEventListener(Wt,t)},[e.id]);let M=M_(e,T.state,{openTerminal:k,reconnectTerminal:O,ship:()=>f(!0),catchUp:E.run,timeline:()=>s?.(),sendPrompt:()=>g(!0),notes:()=>m(e=>!e),devStart:()=>T.act(`start`),devStop:()=>T.act(`stop`),rename:()=>y(e=>e+1),remove:n});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`header`,{className:`wd-session-detail-header`,children:[(0,K.jsxs)(`h1`,{children:[(0,K.jsx)(`span`,{className:`wd-session-detail-target`,children:e.target}),(0,K.jsx)(`span`,{className:`wd-session-detail-sep`,children:`/`}),(0,K.jsx)(`span`,{className:`wd-session-detail-branch`,children:e.branch}),(0,K.jsx)(Cl,{session:e}),(0,K.jsx)(L_,{session:e,autoEdit:v>0},v)]}),c&&(0,K.jsxs)(`span`,{className:`wd-archived-pill`,title:du(e),children:[`archived`,e.archive?.by?` · ${cu[e.archive.by]}`:``]}),(0,K.jsxs)(`div`,{className:`wd-session-actions`,children:[b&&(0,K.jsx)(`span`,{className:`wd-session-action-note`+(b.error?` wd-session-action-note-error`:``),role:b.error?`alert`:`status`,children:b.text}),S&&(0,K.jsx)(`span`,{className:`wd-session-action-note wd-session-action-note-error`,role:`alert`,children:S}),(0,K.jsx)(Up,{session:e,open:h,onOpenChange:g}),(0,K.jsx)(R_,{sessionId:e.id,archived:c,onStart:()=>C(null),onError:C}),(0,K.jsx)(`button`,{ref:A,type:`button`,className:`wd-session-more`,"aria-label":`More actions`,"aria-haspopup":`menu`,"aria-expanded":l!==null,title:`More actions`,onMouseDown:e=>{l&&e.stopPropagation()},onClick:e=>{if(l)return u(null);let t=e.currentTarget.getBoundingClientRect();u({x:t.right,y:t.bottom+4})},children:`⋯`})]})]}),l&&(0,K.jsx)(ns,{x:l.x,y:l.y,anchor:`right`,items:M,footer:N_(e),onClose:()=>u(null)}),(0,K.jsxs)(`div`,{className:`wd-session-strip`,children:[(0,K.jsx)(xl,{session:e}),(0,K.jsx)(Mp,{session:e,catchUp:E}),(0,K.jsx)(ol,{session:e}),(0,K.jsx)(cl,{session:e}),(0,K.jsx)(yl,{session:e,onOpen:i}),(0,K.jsx)(bp,{session:e,onOpen:i}),(0,K.jsx)(bl,{session:e,onOpen:i}),(0,K.jsx)(vl,{session:e,quiet:!0}),(0,K.jsx)(gl,{session:e,quiet:!0}),e.prStage?(0,K.jsx)(fl,{session:e,prs:t}):(0,K.jsx)(ml,{prs:t,link:!0}),(0,K.jsx)(Kp,{dev:T}),(e.hasNote||p)&&(0,K.jsx)(Cp,{session:e,open:p,onToggle:()=>m(e=>!e)})]}),(0,K.jsx)(Np,{catchUp:E}),p&&(0,K.jsx)(wp,{session:e,onClose:()=>m(!1)}),D&&(0,K.jsx)(qp,{text:D,onOpen:a}),d&&(0,K.jsx)(Rp,{session:e,onClose:()=>f(!1),onMerged:()=>{f(!1),r?.()}})]})}function L_({session:e,autoEdit:t=!1}){let[n,r]=(0,_.useState)(t),[i,a]=(0,_.useState)(()=>t&&e.titleIsYours?e.title??``:``),[o,s]=(0,_.useState)(!1),c=()=>{a(e.titleIsYours?e.title??``:``),r(!0)},l=async()=>{s(!0);try{await _e(e.id,i),r(!1)}finally{s(!1)}};return n?(0,K.jsx)(`input`,{className:`wd-session-title-input`,autoFocus:!0,value:i,disabled:o,placeholder:e.title??`Name this session`,"aria-label":`Session name`,onChange:e=>a(e.target.value),onBlur:()=>r(!1),onKeyDown:e=>{e.key===`Enter`&&l(),e.key===`Escape`&&r(!1)}}):!e.titleIsYours||!e.title?null:(0,K.jsx)(`button`,{type:`button`,className:`wd-session-title`,title:`Your name for it — click to rename`,onClick:c,children:e.title})}function R_({sessionId:e,archived:t,onStart:n,onError:r}){let i=w(e),a=i!==void 0,[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>s(null),[t]),(0,K.jsx)(`button`,{type:`button`,className:`wd-session-archive`,onClick:()=>{s(null),n?.(),D(e,!t).catch(e=>{O(e)||(s(e.message),r?.(e.message))})},disabled:a,title:o??(t?`Bring it back to the rail and inbox`:`Stop its Claude and hide it; worktree, branch and conversation are kept`),children:a?i?`Archiving…`:`Restoring…`:t?o?`Restore ⚠`:`Restore`:o?`Archive ⚠`:`Archive`})}function z_({label:e,active:t,onClick:n,meta:r,badge:i,badgeTitle:a}){return(0,K.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`wd-session-subtab`+(t?` wd-session-subtab-active`:``),onClick:n,children:[e,r&&(0,K.jsxs)(`span`,{className:`wd-session-subtab-meta`,children:[`· `,r]}),i?(0,K.jsx)(`span`,{className:`wd-session-subtab-badge`,title:a?a(i):`${i} comment${i===1?``:`s`}`,children:i}):null]})}function B_(e){return jc(e)}function V_(e){return{target:e.repoAlias,branch:e.fork?`review/pr-${e.number}`:e.branch,prompt:H_(e)}}function H_(e){if(!e.isMine)return[`Review PR #${e.number}: ${e.title}`,e.url,``,...e.fork?[`It comes from a fork, so its branch isn't here: gh pr checkout ${e.number} --detach gives you its code to try.`]:[],`It isn't mine: read what it changes (gh pr diff ${e.number}), run what's useful to check it, and tell me what you'd comment and why.`,`Don't commit, push or post anything on GitHub.`].join(`
|
|
114
114
|
`);let t=[`Continue on PR #${e.number}: ${e.title}`,e.url,``];return e.conflicting&&t.push(`It conflicts with its base branch. Bring the base in (git fetch, then merge it), resolve the conflicts, and run the tests.`),e.checksStatus===`FAILURE`&&t.push(`Its checks are failing. Find out why (gh pr checks, then the failing job logs) and fix them.`),e.reviewDecision===`CHANGES_REQUESTED`&&t.push(`Review asked for changes. Address the review comments (gh pr view ${e.number} --comments). Don't reply on GitHub.`),t.length===3&&t.push(`Get up to speed on what it changes (gh pr diff) and tell me where it stands.`),t.join(`
|
|
115
115
|
`)}function U_(e){let t=e.trim(),n=/^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/\s]+)\/([^/\s]+)\/pull\/(\d+)(?:[/?#].*)?$/i.exec(t);if(n)return{repo:`${n[1]}/${n[2]}`.toLowerCase(),number:Number(n[3])};let r=/^#?(\d+)$/.exec(t);return r&&Number(r[1])>0?{number:Number(r[1])}:null}function W_(e,t){let n=e.author?`@${e.author}`:`its author`,r=t?.trim(),i=`Get up to speed first (gh pr view ${e.number}, gh pr diff ${e.number})`;return[`Work on PR #${e.number} by ${n}: ${e.title}`,e.url,``,`This worktree is on ${n}'s branch: what you commit and push lands in their PR.`,...r?[`${i}, then:`,``,r,``]:[`${i}, tell me where it stands, and wait for what I want done.`],`Don't post on GitHub (no comments, reviews or replies).`].join(`
|
|
116
116
|
`)}function G_({position:e,total:t,onNext:n,onStop:r}){return(0,K.jsxs)(`div`,{className:`wd-review-queue-bar`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-review-queue-title`,children:`Reviewing finished work`}),(0,K.jsxs)(`span`,{className:`wd-review-queue-pos`,children:[e,` of `,t]}),(0,K.jsx)(`span`,{className:`wd-review-queue-hint`,children:`Showing what the last instruction changed`}),(0,K.jsxs)(`span`,{className:`wd-review-queue-actions`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-primary wd-review-queue-next`,onClick:n,title:`Next in the queue (n)`,children:[e>=t?`Done`:`Next`,` `,(0,K.jsx)(`kbd`,{children:`n`})]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-row-action`,onClick:r,title:`Leave the queue; stay on this session`,children:`Stop`})]})]})}var K_=`assistant`;function q_({open:e,onClose:t,seeing:n}){return(0,K.jsxs)(`aside`,{className:`wd-assistant`+(e?` wd-assistant-open`:``),"aria-label":`Assistant`,"aria-hidden":!e,children:[(0,K.jsxs)(`header`,{className:`wd-assistant-header`,children:[(0,K.jsx)(`span`,{className:`wd-assistant-title`,children:`Assistant`}),(0,K.jsxs)(`span`,{className:`wd-assistant-seeing`,title:`Each message you send includes this`,children:[`sees: `,n]}),(0,K.jsxs)(`span`,{className:`wd-assistant-keys`,children:[(0,K.jsx)(`kbd`,{children:`Ctrl`}),`+`,(0,K.jsx)(`kbd`,{children:`K`})]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-assistant-close`,onClick:t,"aria-label":`Close the assistant`,children:`×`})]}),(0,K.jsx)(`div`,{className:`wd-assistant-body`,children:(0,K.jsx)(j_,{sessionId:K_})})]})}function J_(e,t,n,r=5){let i=e.filter(e=>n.has(e)&&e!==t);return(t&&n.has(t)?[t,...i]:i).slice(0,r)}var Y_=6e5;function X_(e,t,n,r,i=Y_){return e.filter(e=>e===t||r-(n.get(e)??r)<i)}function Z_({activeId:e,slot:t,sessions:n}){let[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(null);(0,_.useEffect)(()=>{let t=new Set(n.filter(e=>!e.archivedAt).map(e=>e.id));i(n=>{let r=J_(n,e,t);return r.length===n.length&&r.every((e,t)=>e===n[t])?n:r})},[e,n]);let s=(0,_.useRef)(new Map),c=t?e:null;if((0,_.useEffect)(()=>{let e=Date.now();for(let t of r)t===c?s.current.delete(t):s.current.has(t)||s.current.set(t,e);for(let e of[...s.current.keys()])r.includes(e)||s.current.delete(e)},[r,c]),(0,_.useEffect)(()=>{let e=setInterval(()=>{i(e=>{let t=X_(e,c,s.current,Date.now());return t.length===e.length?e:t})},6e4);return()=>clearInterval(e)},[c]),(0,_.useLayoutEffect)(()=>{if(!t)return;let e=()=>{let e=t.getBoundingClientRect();o(t=>t&&t.top===e.top&&t.left===e.left&&t.width===e.width&&t.height===e.height?t:{top:e.top,left:e.left,width:e.width,height:e.height})};e();let n=typeof ResizeObserver<`u`?new ResizeObserver(e):null;return n?.observe(t),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{n?.disconnect(),window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[t]),r.length===0||!a)return null;let l=!!t&&!!e,u=new Map(n.map(e=>[e.id,e]));return(0,K.jsx)(`div`,{className:`wd-term-deck`,style:{top:a.top,left:a.left,width:a.width,height:a.height,visibility:l?`visible`:`hidden`},children:r.map(t=>{let n=l&&t===e,r=u.get(t);return(0,K.jsx)(`div`,{className:`wd-term-deck-item`,style:{visibility:n?`visible`:`hidden`},"aria-hidden":!n,children:(0,K.jsx)(j_,{sessionId:t,target:r?.target,branch:r?.branch,active:n})},t)})})}function Q_(e){return!vt(e)&&e.attention?.state===`idle`&&!e.attention.seen}function $_(e){let t=e.filter(Q_).sort((e,t)=>Ss(e.attention,t.attention)).map(e=>e.id);return t.length?{ids:t}:null}function ev(e,t){let n=t?e.ids.indexOf(t):-1;return n<0?null:n+1}function tv(e,t,n){let r=new Set(n.filter(e=>!vt(e)).map(e=>e.id)),i=t?e.ids.indexOf(t):-1;for(let t=i+1;t<e.ids.length;t++)if(r.has(e.ids[t]))return e.ids[t];return null}function nv(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?e:e.filter(e=>{let t=[e.name,...e.members??[],e.path??``].join(` `).toLowerCase();return n.every(e=>t.includes(e))})}function rv({projects:e,value:t,onChange:n,disabled:r,inputRef:i}){let a=(0,_.useId)(),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(0),f=(0,_.useMemo)(()=>nv(e,o??``),[e,o]),p=e=>e.kind===`group`?`${e.name} (group)`:e.name,m=e.find(e=>e.name===t),h=e=>{e&&n(e.name),s(null),l(!1)};return(0,K.jsxs)(`div`,{className:`wd-project-picker`,children:[(0,K.jsx)(`input`,{ref:i,type:`text`,role:`combobox`,"aria-expanded":c,"aria-controls":a,"aria-autocomplete":`list`,"aria-activedescendant":c&&f[u]?`${a}-${u}`:void 0,value:o??(m?p(m):t),placeholder:e.length?`Type to find a project…`:`(loading…)`,disabled:r,onFocus:e=>{e.target.select(),t||l(!0)},onMouseDown:()=>l(!0),onChange:e=>{s(e.target.value),d(0),l(!0)},onBlur:()=>{s(null),l(!1)},onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),l(!0),d(e=>Math.min(e+1,f.length-1))):e.key===`ArrowUp`?(e.preventDefault(),d(e=>Math.max(e-1,0))):e.key===`Enter`&&c?(e.preventDefault(),h(f[u])):e.key===`Escape`&&c&&(e.preventDefault(),e.stopPropagation(),s(null),l(!1))}}),c&&(0,K.jsxs)(`ul`,{id:a,className:`wd-project-picker-list`,role:`listbox`,children:[f.length===0&&(0,K.jsxs)(`li`,{className:`wd-project-picker-empty`,children:[`No project matches “`,o,`”`]}),f.map((e,t)=>(0,K.jsxs)(`li`,{id:`${a}-${t}`,role:`option`,"aria-selected":t===u,className:`wd-project-picker-option`+(t===u?` wd-project-picker-option-active`:``),onMouseDown:t=>{t.preventDefault(),h(e)},onMouseEnter:()=>d(t),children:[(0,K.jsx)(`span`,{children:p(e)}),e.kind===`group`&&e.members?.length?(0,K.jsx)(`span`,{className:`wd-project-picker-hint`,children:e.members.join(`, `)}):null]},`${e.kind}:${e.name}`))]})]})}var iv=[[/^(fix|fixes|fixed|repair|resolve|correct|bug|popravi|ispravi)$/,`fix`],[/^(update|upgrade|bump|clean|cleanup|tidy|chore|rename|move|remove|delete|drop)$/,`chore`],[/^(document|docs|doc|readme)$/,`docs`],[/^(refactor|simplify|restructure|extract|split)$/,`refactor`],[/^(test|tests)$/,`test`]],av=/^(bug|bugs|broken|break|breaks|fail|fails|failed|failing|failure|failures|error|errors|crash|crashes|crashing|wrong|exception|regression|greska|greske|puca|ne-radi)$/,ov=/^(why|what|whats|how|when|where|which|who|does|do|did|is|are|was|were|can|could|should|would|will|has|have|check|investigate|inspect|analyze|analyse|explore|figure|compare|verify|review|explain|zasto|sto|kako|koji|koja|koje|gdje|kada|provjeri|provjeriti|pogledaj|mozes|mozete)$/,sv=/^(show|give|list|find|see|look|tell|daj|pokazi)$/,cv=/^(me|us|mi|nam|what|why|how|where|which|who|when|if|whether|into|at|zasto|sto|kako|gdje)$/,lv=/^(UTF|UCS|SHA|MD|ISO|IEC|IEEE|RFC|HTTP|HTTPS|TLS|SSL|AES|RSA|DES|IPV|ES|ECMA|PEP|CVE|CWE|GPT|UTC|GMT|COVID|WIN|ARM|X|H|MP|PCI|EMV|TCP|UDP|BASE|PR|MR|ORA|ERR|FY|H[12]|Q[1-4])-/,uv=/\b([A-Z][A-Z0-9]{1,9}-[1-9]\d{0,5})\b/g,dv=new Set(`add.adds.implement.create.make.build.support.introduce.please.let.lets.can.could.you.we.should.i.want.need.to.go.ahead.and.so.ok.okay.hey.hi.now.also.molim.te.mi.trebamo.treba.ajde.hajde`.split(`.`)),fv=new Set(`a.an.the.to.of.for.in.on.at.and.or.with.by.from.into.that.this.these.those.it.its.is.are.be.been.being.was.were.so.when.our.my.your.their.all.some.any.new.old.as.if.then.than.but.not.no.yes.up.out.about.over.after.before.like.just.only.really.very.still.also.maybe.somehow.something.somewhere.actually.directly.basically.probably.currently.always.never.sometimes.twice.once.per.via.without.within.between.during.through.anything.everything.there.here.now.way.thing.things.stuff.bit.one.each.other.more.most.much.many.too.again.even.ever.why.what.whats.how.where.which.who.whom.i.me.we.us.you.they.them.he.she.him.her.im.ive.were.youre.theyre.lets.do.does.did.done.doing.have.has.had.get.gets.got.getting.can.could.should.would.will.may.might.must.need.needs.want.wants.make.makes.put.take.takes.took.use.used.using.try.see.look.check.find.give.show.tell.know.think.seems.seem.run.runs.running.work.works.working.happen.happens.happened.go.goes.going.come.please.investigate.inspect.figure.explain.verify.review.compare.list.pokazi.daj.je.su.da.li.se.sa.s.za.na.u.i.od.do.iz.po.kod.o.a.ali.pa.jer.ako.bi.smo.ste.sam.si.nije.nisu.ne.to.ovo.ono.taj.ta.te.ti.mi.vi.oni.mozes.mozete.moze.molim.kako.zasto.sto.koji.koja.koje.gdje.kada.provjeri.provjeriti.pogledaj.dobili.dobio.imamo.ima.nema.treba.trebamo.jos.sve.neki.neka`.split(`.`)),pv={đ:`d`,ð:`d`,ß:`ss`,æ:`ae`,œ:`oe`,ø:`o`,ł:`l`,þ:`th`,ı:`i`},mv=3,hv=40,gv=e=>String(e).padStart(2,`0`);function _v(e){let t=e.replace(/[?#].*$/,``).split(`/`).slice(3).filter(e=>e&&!/^\d+$/.test(e));return t[t.length-1]??``}var vv=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/([A-Z])([A-Z][a-z])/g,`$1-$2`).toLowerCase();function yv(e){return e.replace(/\bhttps?:\/\/\S+/gi,e=>` ${_v(e)} `).replace(/\S*[.(=<>{}[\]\\/]\S*/g,e=>/^[\w-]+[.,!?:;]?$/.test(e)?e:` `).toLowerCase().replace(/[đðßæœøłþı]/g,e=>pv[e]??e).normalize(`NFD`).replace(/\p{M}/gu,``).replace(/[^a-z0-9\s'-]/g,` `).split(/\s+/).map(e=>e.replace(/'/g,``).replace(/^-+|-+$/g,``)).filter(Boolean)}function bv(e,t=new Date){let n=e.split(`
|
|
117
117
|
`).find(e=>e.trim())??``;if(!n)return``;let r=e.slice(0,600),i=[...r.matchAll(uv)].find(e=>!lv.test(e[1]+`-`));if(i)return`feat/${i[1]}`;let a=/\b([A-Z][A-Za-z0-9]*(?:Exception|Error)):/.exec(r)??/^\s*(?:\w+\.)*([A-Z][A-Za-z0-9]*(?:Exception|Error))\b/m.exec(r);if(a)return`fix/${vv(a[1])}`.slice(0,44).replace(/-+$/,``);let o=yv(n),s=0;for(;s<o.length&&dv.has(o[s]);)s++;let c=o[s],l=c?iv.find(([e])=>e.test(c)):void 0,u=`feat`;l?(u=l[1],s++):c&&(ov.test(c)||sv.test(c)&&cv.test(o[s+1]??``))?u=`tmp`:o.some(e=>av.test(e))?u=`fix`:/\?\s*$/.test(n.trim())&&(u=`tmp`);let d=[...new Set(o.slice(s).filter(e=>!fv.has(e)&&!av.test(e)&&e.length>1&&e.length<=24&&!(/\d/.test(e)&&e.length>3)))].slice(0,mv).join(`-`).slice(0,hv).replace(/-+$/,``);return d?`${u}/${d}`:`${u}/work-${gv(t.getMonth()+1)}${gv(t.getDate())}-${gv(t.getHours())}${gv(t.getMinutes())}`}var xv=e=>e.replace(/^\s+/,``).replace(/[\s-]*\s[\s-]*/g,`-`);function Sv(e,t=e.length){return{value:xv(e),caret:xv(e.slice(0,t)).length}}function Cv(e){return t=>{let n=t.target,r=Sv(n.value,n.selectionStart??n.value.length);e(r.value),r.value!==n.value&&requestAnimationFrame(()=>n.setSelectionRange(r.caret,r.caret))}}function wv(e,t){return e.valid?t?e.free&&e.free!==e.branch?{text:`${e.branch} is taken, so a new one: ${e.free}.`}:e.free?null:{text:`${e.branch} and its -2 … -9 are all taken: Edit to name the branch.`,blocks:!0}:e.session?.archived?{text:`${e.branch} is an archived session: Create restores it and gives it the prompt.`}:e.session?{text:`${e.branch} already has a session: Create opens it and gives it the prompt.`}:e.exists?{text:`${e.branch} exists: Create checks it out, with the commits it has.`}:null:{text:`${e.branch} isn't a branch name git takes.`,blocks:!0}}function Tv(e,t){let n=[e.trim()?`name “${e.trim()}”`:``,t.trim()?`base ${t.trim()}`:``].filter(Boolean);return n.length?`More options: ${n.join(` · `)}`:`More options: name, base branch`}function Ev({initial:e,title:t=`New worktree`,onCreated:n,onClose:r,onManageRepos:i,checkBranch:a=$t,findPr:o=en}){let[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(e?.target??``),[d,f]=(0,_.useState)(e?.branch??null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(e?.base??``),[v,y]=(0,_.useState)(e?.prompt??``),[b,x]=(0,_.useState)(``),[S,C]=(0,_.useState)(!!e?.base),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(null),[M,ee]=(0,_.useState)(null),N=()=>{if(!E.trim()||O)return;k(!0),j(null);let e=E.trim();o(e,U_(e)?.repo?void 0:l.trim()||void 0).then(e=>{ee(e),u(e.alias),f(e.branch),g(``),y(W_(e)),T(!1),k(!1)},e=>{j(e.message),k(!1)})},P=bv(v),F=d===null,I=d??P,[te,ne]=(0,_.useState)(null),L=te&&te.target===l.trim()&&te.branch===I.trim()?te:null,re=F&&L?.free?L.free:I,R=L?wv(L,F):null,ie=e=>f(e),ae=(0,_.useRef)(a);ae.current=a,(0,_.useEffect)(()=>{let e=l.trim(),t=I.trim();if(!e||!t)return;let n=!0,r=setTimeout(()=>{ae.current(e,t).then(t=>n&&ne({...t,target:e}),()=>{})},250);return()=>{n=!1,clearTimeout(r)}},[l,I]);let oe=(0,_.useRef)(null),[se,ce]=(0,_.useState)(null),[z,le]=(0,_.useState)(!1),[B,V]=(0,_.useState)(null),H=(0,_.useRef)(null),ue=(0,_.useRef)(null);(0,_.useEffect)(()=>{dn().then(e=>{c(e),e.singles[0]&&u(t=>t||e.singles[0].name)},()=>c({singles:[],groups:[]}))},[]),(0,_.useEffect)(()=>{s&&(l&&ue.current?ue.current:H.current)?.focus()},[s]);let de=(0,_.useMemo)(()=>s?[...s.groups,...s.singles]:[],[s]),U=!!s?.groups.some(e=>e.name===l);async function fe(t){if(t.preventDefault(),z)return;if(!l.trim()){V(`Pick a project.`);return}if(!re.trim()&&U){m(!0),V(`${l} is a group: give it a branch (a group has no one checkout to open).`);return}if(!re.trim()&&h.trim()){m(!0),C(!0),V(`A base needs a branch to fork. Leave both empty to open the project as it is.`);return}if(R?.blocks){m(!0),V(R.text);return}le(!0),V(null);let r=re.trim();if(F&&r&&!L){let e=await a(l.trim(),r).catch(()=>null);e?.free&&(r=e.free)}try{let t=await Cn({target:l.trim(),branch:r,base:h.trim()||void 0,jiraKey:e?.jiraKey,prompt:v.trim()||void 0,name:b.trim()||void 0});if(t.startError){ce({id:t.sessionId,reason:t.startError}),le(!1);return}n(t.sessionId,{started:t.started})}catch(e){V(e.message),le(!1)}}function W(e){e.target===e.currentTarget&&r()}return(0,K.jsx)(`div`,{className:`wd-modal-backdrop`,role:`dialog`,"aria-modal":`true`,onClick:W,onKeyDown:e=>{e.key===`Escape`&&r()},children:(0,K.jsxs)(`form`,{className:`wd-modal`,onSubmit:fe,ref:oe,children:[(0,K.jsxs)(`header`,{className:`wd-modal-header`,children:[(0,K.jsx)(`h2`,{children:t}),(0,K.jsx)(`button`,{type:`button`,className:`wd-modal-close`,onClick:r,"aria-label":`Close`,children:`×`})]}),(0,K.jsxs)(`div`,{className:`wd-modal-body`,children:[(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`Project`}),(0,K.jsx)(rv,{projects:de,value:l,onChange:u,disabled:z||O,inputRef:t=>{e?.target||(H.current=t)}})]}),i&&(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-modal-aside`,onClick:i,children:`Not in the list? Repos & groups…`}),M&&M.alias===l&&M.branch===re?(0,K.jsxs)(`p`,{className:`wd-modal-pr`,role:`status`,children:[`PR #`,M.number,` by @`,M.author||`its author`,`: `,M.title,`. On their branch `,(0,K.jsx)(`code`,{children:M.branch}),`: what you push lands in their PR.`]}):w?(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`Pull request: its link, or # in the project above`}),(0,K.jsxs)(`span`,{className:`wd-modal-pr-row`,children:[(0,K.jsx)(`input`,{autoFocus:!0,type:`text`,value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),N())},placeholder:`https://github.com/owner/repo/pull/123, or #123`,disabled:z||O}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:N,disabled:z||O||!E.trim(),children:O?`Looking…`:`Use it`})]}),A&&(0,K.jsx)(`span`,{className:`wd-modal-error`,role:`alert`,children:A})]}):(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button wd-modal-aside`,onClick:()=>T(!0),disabled:z,children:`Start from a pull request…`}),(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`What should Claude do?`}),(0,K.jsx)(`textarea`,{ref:t=>{ue.current=t,e?.target&&(H.current=t)},value:v,onChange:e=>y(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),oe.current?.requestSubmit())},placeholder:`Add CSV export to the invoices endpoint`,rows:v.split(`
|
|
118
118
|
`).length>3?8:4,disabled:z||O}),(0,K.jsx)(`span`,{className:`wd-modal-hint`,children:`Leave it empty to just make the worktree. Ctrl+Enter creates.`})]}),p?(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsxs)(`span`,{children:[`Branch `,U?``:`(empty: the project as it is)`]}),(0,K.jsx)(`input`,{autoFocus:!0,type:`text`,value:re,onChange:Cv(ie),placeholder:U?`feat/whatever`:`feat/whatever, or empty: its current branch`,disabled:z,required:U})]}):(0,K.jsxs)(`div`,{className:`wd-modal-branch`,children:[`Branch`,` `,re?(0,K.jsx)(`code`,{children:re}):(0,K.jsx)(`span`,{className:`wd-modal-hint`,children:U?`needed for a group`:`none: the project as it is, on its own checkout`}),` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-link-button`,onClick:()=>m(!0),disabled:z,children:`Edit`})]}),R&&(0,K.jsx)(`p`,{className:`wd-modal-branch-note`+(R.blocks?` wd-modal-branch-note-bad`:``),role:`status`,children:R.text}),(0,K.jsxs)(`button`,{type:`button`,className:`wd-link-button wd-modal-more`,"aria-expanded":S,onClick:()=>C(e=>!e),children:[S?`▾`:`▸`,` `,S?`More options: name, base branch`:Tv(b,h)]}),S&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`Name (optional)`}),(0,K.jsx)(`input`,{type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:`shown instead of the branch, e.g. PDF generation speed`,maxLength:120,disabled:z})]}),(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`Base branch (optional)`}),(0,K.jsx)(`input`,{type:`text`,value:h,onChange:e=>g(e.target.value),placeholder:`leave blank to use the default`,disabled:z})]})]}),B&&(0,K.jsx)(`p`,{className:`wd-modal-error`,children:B}),se&&(0,K.jsxs)(`p`,{className:`wd-modal-error`,role:`alert`,children:[`The worktree was created, but Claude didn't start: `,se.reason,`. Open the session and start it from its Terminal tab.`]})]}),(0,K.jsxs)(`footer`,{className:`wd-modal-footer`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:r,disabled:z,children:`Cancel`}),se?(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:()=>n(se.id),children:`Open session`}):(0,K.jsx)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:z||!l.trim()||!!R?.blocks,children:z?`Creating…`:v.trim()?`Create and start`:`Create`})]})]})})}function Dv(e){let t=e instanceof Error?e.message:String(e);try{let e=JSON.parse(t);if(typeof e.error==`string`)return e.error}catch{}return t}function Ov({session:e,onDeleted:t,onClose:n}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(null),l=(0,_.useRef)(null);async function u(n){if(!a){o(!0),c(null);try{await wn(e.id,n),t(e.id)}catch(e){c(Dv(e)),o(!1)}}}return(0,K.jsxs)(Yg,{title:`Delete session`,onClose:a?()=>{}:n,primaryRef:l,actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,ref:l,onClick:n,disabled:a,children:`Cancel`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>u({sessionOnly:!0}),disabled:a,title:`Remove from the dashboard and history; leave the files on disk`,children:`Forget session only`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-danger`,onClick:()=>u({force:r}),disabled:a,children:a?`Deleting…`:`Delete worktree`})]}),children:[(0,K.jsxs)(`p`,{children:[`Remove the worktree for`,` `,(0,K.jsxs)(`code`,{children:[e.target,`/`,e.branch]}),` `,`and forget the session. The branch itself is kept. Any Claude terminal `,(0,K.jsx)(`code`,{children:`work web`}),` opened for it is stopped.`]}),e.paths.length>0&&(0,K.jsx)(`ul`,{className:`wd-delete-paths`,children:e.paths.map(e=>(0,K.jsx)(`li`,{children:(0,K.jsx)(`code`,{children:e})},e))}),(0,K.jsxs)(`label`,{className:`wd-delete-force`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>i(e.target.checked),disabled:a}),` Force — discard uncommitted changes and unpushed commits, and stop its Claude even mid-turn (replies to post and undelivered notes go too)`]}),s&&(0,K.jsx)(`p`,{className:`wd-delete-error`,role:`alert`,children:s})]})}function kv(e,t){let n=e.replace(/-\d+$/,``);for(let e=2;e<100;e++)if(!t.has(`${n}-${e}`))return`${n}-${e}`;return`${n}-fork`}function Av({session:e,sessions:t,onForked:n,onClose:r}){let[i,a]=(0,_.useState)(()=>kv(e.branch,new Set(t.filter(t=>t.target===e.target).map(e=>e.branch)))),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),m=(0,_.useRef)(null);(0,_.useEffect)(()=>{m.current?.focus(),m.current?.select()},[]);let h=()=>!u&&r(),g=e.diffStat?.files??0;async function v(t){if(t.preventDefault(),!u&&i.trim()){d(!0),p(null);try{let t=await Ie(e.id,{branch:i.trim(),prompt:c.trim()||void 0,name:o.trim()||void 0});n(t.sessionId,{summarized:t.summarized,...t.startError?{startError:t.startError}:{}})}catch(e){p(e.message),d(!1)}}}return(0,K.jsx)(`div`,{className:`wd-modal-backdrop`,role:`dialog`,"aria-modal":`true`,"aria-label":`Fork ${e.branch}`,onClick:e=>e.target===e.currentTarget&&h(),onKeyDown:e=>e.key===`Escape`&&h(),children:(0,K.jsxs)(`form`,{className:`wd-modal`,onSubmit:v,children:[(0,K.jsxs)(`header`,{className:`wd-modal-header`,children:[(0,K.jsxs)(`h2`,{children:[`Fork `,e.title&&e.titleIsYours?e.title:e.branch]}),(0,K.jsx)(`button`,{type:`button`,className:`wd-modal-close`,onClick:h,"aria-label":`Close`,disabled:u,children:`×`})]}),(0,K.jsxs)(`div`,{className:`wd-modal-body`,children:[(0,K.jsxs)(`p`,{className:`wd-fork-note`,children:[`A new worktree from `,(0,K.jsx)(`code`,{children:e.branch}),`'s last commit`,e.isGroup?`, in each repo`:``,g?` — its ${g} uncommitted file${g===1?``:`s`} stay here`:``,`. Its Claude starts with a summary of this conversation; this session carries on as it is. The fork is stacked on this one: this branch's new commits are brought into it (when it's idle and clean).`]}),(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`New branch`}),(0,K.jsx)(`input`,{ref:m,type:`text`,value:i,onChange:Cv(a),disabled:u,required:!0})]}),(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`Name (optional)`}),(0,K.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`shown instead of the branch, e.g. Try the queue approach`,maxLength:120,disabled:u})]}),(0,K.jsxs)(`label`,{className:`wd-modal-row`,children:[(0,K.jsx)(`span`,{children:`What to try (optional)`}),(0,K.jsx)(`textarea`,{value:c,onChange:e=>l(e.target.value),placeholder:`Empty: it reads the summary and waits for you`,rows:c?5:2,disabled:u})]}),u&&(0,K.jsxs)(`p`,{className:`wd-fork-busy`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-spinner`,"aria-hidden":`true`}),` Creating the worktree and writing a summary of the conversation…`]}),f&&(0,K.jsx)(`p`,{className:`wd-modal-error`,role:`alert`,children:f})]}),(0,K.jsxs)(`footer`,{className:`wd-modal-footer`,children:[(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:h,disabled:u,children:`Cancel`}),(0,K.jsx)(`button`,{type:`submit`,className:`wd-btn-primary`,disabled:u||!i.trim(),children:u?`Forking…`:`Fork`})]})]})})}var jv={tasks:`sessions`,prs:`start`},Mv={comments:`diff`,chat:`term`},Nv={tab:`sessions`,sessionId:null,sessionSubTab:`term`},Pv=/^#\/(inbox|today|sessions|cleanup|start|repos|welcome|prs|jira|time|tasks)\/?$/,Fv=/^#\/s\/([^/]+)(?:\/(chat|diff|term|comments|pr|code|timeline))?\/?$/;function Iv(e){if(!e||e===`#`||e===`#/`)return Nv;let t=e.match(Fv);if(t){let e=t[2]?Mv[t[2]]??t[2]:`term`;return{tab:`sessions`,sessionId:decodeURIComponent(t[1]),sessionSubTab:e}}let n=e.match(Pv);return n?{tab:jv[n[1]]??n[1],sessionId:null,sessionSubTab:`term`}:Nv}function Lv(e){return e.sessionId?`#/s/${encodeURIComponent(e.sessionId)}/${e.sessionSubTab}`:`#/${e.tab}`}var Rv=`work-web:last-route`;function zv(e,t){if(e&&e!==`#`&&e!==`#/`)return e;let n;try{n=t?.getItem(`work-web:last-route`)??null}catch{return e}return!n||Iv(n)===Nv?e:n}function Bv(e,t){try{t?.setItem(Rv,Lv(e))}catch{}}var Vv={inbox:`Inbox`,today:`Today`,cleanup:`Clean up`,sessions:`Sessions`,start:`Start`,jira:`Jira`,time:`Time`,repos:`Repos`,welcome:`Welcome`},Hv=12e4,Uv=6e4;function Wv(){try{return window.localStorage}catch{return null}}function Gv({dev:e=!1}={}){let[t,n]=(0,_.useState)(()=>{let e=zv(window.location.hash,Wv());return e!==window.location.hash&&window.history.replaceState(null,``,e),Iv(e)});(0,_.useEffect)(()=>Bv(t,Wv()),[t]);let[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(new Set),d=(0,_.useCallback)((e,t)=>u(n=>{if(n.has(e)===t)return n;let r=new Set(n);return t?r.add(e):r.delete(e),r}),[]),f=l.size>0,p=(0,_.useRef)(f);p.current=f;let[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),y=(0,_.useCallback)(()=>{let e=p.current;return te(e).then(t=>{i(t),h(e),v(!0)})},[]),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(null),[E,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(!1),[M,ee]=(0,_.useState)(!1),[N,P]=(0,_.useState)(null),F=(0,_.useCallback)(()=>{ee(!0),k(e=>!e)},[]);(0,_.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),e.stopPropagation(),F())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[F]);let{open:I,close:ne}=Rt(),[L,re]=(0,_.useState)(null),[R,ie]=(0,_.useState)(null),[ae,oe]=(0,_.useState)(null),[se,ce]=(0,_.useState)(null),{toast:z,show:le,hide:B}=rs(),[V,H]=(0,_.useState)(!1),ue=_o(),W=Oo(),G=Vo(),pe=G?Ho(ue.updates,G.update):ue.updates,me=G?()=>G.ask(`check`):ue.check,ge=G?async()=>G.ask(`restart`):ue.restart,[_e,ve]=(0,_.useState)(null),Se=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=ue.updates?.whatsNew;e&&Se.current!==e&&(Se.current=e,ve({focus:e}))},[ue.updates?.whatsNew]);let Ce=()=>{ue.updates?.whatsNew&&ue.seen(ue.updates.whatsNew),ve(null)},[we,Te]=(0,_.useState)(null),Ee=(0,_.useMemo)(()=>({setArchived:(e,t)=>void D(e.id,t).then(()=>le({text:`${t?`Archived`:`Restored`} ${e.title??e.branch}`}),e=>!O(e)&&le({text:e.message,kind:`error`})),openTerminal:e=>void Tn(e.id).catch(e=>le({text:`Couldn't open a terminal: ${e.message}`,kind:`error`})),openEditor:e=>void En(e.id).catch(e=>le({text:`Couldn't open the editor: ${e.message}`,kind:`error`})),copyBranch:e=>void navigator.clipboard.writeText(e.branch).then(()=>le({text:`Copied ${e.branch}`}),()=>le({text:`Couldn't copy to the clipboard`,kind:`error`})),remove:e=>re(e),fork:e=>ie(e),snooze:(e,t)=>void U(e,t).then(()=>le({text:`Snoozed ${e.title??e.branch}`}),e=>le({text:e.message,kind:`error`})),unsnooze:e=>void fe(e.id).catch(e=>le({text:e.message,kind:`error`})),snoozeUntil:e=>oe(e),blockBy:e=>ce(e)}),[le]),De=(0,_.useCallback)(e=>as(e,Ee),[Ee]);(0,_.useEffect)(()=>{let e=()=>n(Iv(window.location.hash));return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let Oe=(0,_.useCallback)(e=>{let t=Lv(e);window.location.hash!==t&&(window.location.hash=t,n(e))},[]),ke=(0,_.useMemo)(()=>bs(()=>y().then(()=>o(null),e=>o(e.message)),400),[y]);(0,_.useEffect)(()=>()=>ke.cancel(),[ke]);let Ae=(0,_.useRef)(!0);(0,_.useEffect)(()=>{if(Ae.current){Ae.current=!1,y().catch(e=>o(e.message)),setTimeout(A_,0);return}ke.trigger()},[s,ke,y]),_s(t.sessionId);let je=(0,_.useRef)({sessionId:t.sessionId,open:(e,t)=>{}});go(`/events`,{onOpen:()=>c(e=>e+1),events:{"session-order-changed":()=>void ye().then(tt,()=>{}),"rail-changed":()=>void Le().then(ct,()=>{}),"host-health":e=>ot(e),"sessions-changed":()=>c(e=>e+1),"comments-changed":()=>c(e=>e+1),notify:e=>vs(e,je.current.sessionId,e=>je.current.open(e,`term`))}});let[Me,Ne]=(0,_.useState)([]),[Pe,Fe]=(0,_.useState)(!1),[Ie,Be]=(0,_.useState)(null),[Ve,He]=(0,_.useState)(0),Ue=(0,_.useCallback)(e=>{Ne(e.prs??[]),Fe(!0),Be(e.available===!1?`gh isn’t installed or logged in (gh auth login).`:e.error??null)},[]),We=(0,_.useCallback)(e=>{Fe(!0),Be(e.message)},[]),[Ge,Ke]=(0,_.useState)(()=>new Map);(0,_.useEffect)(()=>{dn().then(e=>Ke(new Map(e.groups.map(e=>[e.name,e.members??[]]))),()=>{})},[]);let qe=(0,_.useCallback)(e=>Ge.get(e),[Ge]);(0,_.useEffect)(()=>{let e=!1,t=()=>{He(Date.now()),fn().then(t=>{e||Ue(t)},t=>{e||We(t)})};t();let n=setInterval(t,Hv);return()=>{e=!0,clearInterval(n)}},[Ue,We]),(0,_.useEffect)(()=>{s===0||Date.now()-Ve<Uv||(He(Date.now()),fn().then(Ue,We))},[s]);let Je=(0,_.useCallback)(e=>wt(e,Me,qe),[Me,qe]),Ye=(0,_.useCallback)(e=>{Oe({tab:e,sessionId:null,sessionSubTab:`term`})},[Oe]),Xe=(0,_.useRef)(t);(0,_.useEffect)(()=>{Xe.current.sessionId||In().then(e=>{Wc(e)&&Ye(`welcome`)}).catch(()=>{})},[Ye]);let[Ze,Qe]=(0,_.useState)(null),$e=(0,_.useCallback)((e,n=`term`,r={})=>{Qe(r.lastTurn?e:null),Oe({tab:t.tab,sessionId:e,sessionSubTab:n})},[Oe,t.tab]),[et,tt]=(0,_.useState)([]);(0,_.useEffect)(()=>{ye().then(tt,()=>{})},[]);let nt=(0,_.useCallback)(e=>{tt(e),be(e).catch(()=>void ye().then(tt,()=>{}))},[]),rt=(0,_.useRef)([]),it=(0,_.useCallback)(e=>{rt.current=e},[]),[at,ot]=(0,_.useState)(null);(0,_.useEffect)(()=>{xe().then(ot,()=>{})},[]);let[st,ct]=(0,_.useState)(ft);(0,_.useEffect)(()=>{Le().then(ct,()=>{})},[]);let lt=(0,_.useCallback)((e,t)=>void ze(e,t).then(ct,e=>le({text:e.message,kind:`error`})),[le]),ut=(0,_.useCallback)(e=>Re(e).then(ct,e=>{throw le({text:e.message,kind:`error`}),e}),[le]),dt=(0,_.useCallback)(e=>$e(e,`term`),[$e]),pt=(0,_.useCallback)(e=>$e(e,t.sessionId?t.sessionSubTab:`term`),[$e,t.sessionId,t.sessionSubTab]),[mt,ht]=(0,_.useState)(null),gt=(0,_.useCallback)(()=>{let e=$_(r);e&&(ht(e),$e(e.ids[0],`diff`,{lastTurn:!0}))},[r,$e]),_t=(0,_.useCallback)(()=>{if(!mt)return;let e=tv(mt,t.sessionId,r);e?$e(e,`diff`,{lastTurn:!0}):(ht(null),Oe({...Nv,tab:`inbox`}))},[mt,t.sessionId,r,$e,Oe]),yt=(0,_.useRef)(_t);yt.current=_t,je.current={sessionId:t.sessionId,open:$e};let bt=(0,_.useCallback)(e=>{t.sessionId&&Oe({...t,sessionSubTab:e})},[Oe,t]),xt=(0,_.useCallback)(()=>{Oe({tab:t.tab,sessionId:null,sessionSubTab:`term`})},[Oe,t.tab]),Ct=(0,_.useCallback)(()=>Ye(`sessions`),[Ye]),Tt=(0,_.useCallback)(e=>Ye(e===`now`?`sessions`:`today`),[Ye]),Et=(0,_.useCallback)((e=null)=>{C(e),x(!0)},[]),Dt=(0,_.useCallback)(e=>{re(null),i(t=>t.filter(t=>t.id!==e)),c(e=>e+1),t.sessionId===e&&Oe({tab:t.tab,sessionId:null,sessionSubTab:`term`})},[Oe,t.sessionId,t.tab]),Ot=b||L!==null||R!==null||ae!==null||se!==null;(0,_.useEffect)(()=>{let e=!1,n=null,i=()=>{let e=document.activeElement;return!!e&&(e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable)},a=a=>{if(a.metaKey||a.ctrlKey||a.altKey||i()||It()||Ot)return;if(e){e=!1,n&&clearTimeout(n);let t={i:`inbox`,d:`today`,s:`sessions`,w:`start`,r:`repos`,c:`cleanup`,j:`jira`,h:`time`,p:`start`};if(a.key===`t`){a.preventDefault(),j(e=>!e);return}if(t[a.key]){a.preventDefault(),Ye(t[a.key]);return}}if(a.key===`?`){a.preventDefault(),H(e=>!e);return}if(a.key===`c`){a.preventDefault(),Et(null);return}if(a.key===`g`){e=!0,n=setTimeout(()=>{e=!1},750);return}if(a.key===`n`){if(mt&&ev(mt,t.sessionId)!==null){a.preventDefault(),yt.current();return}let e=r.filter(e=>!vt(e)&&ks(e)).sort(Ds),n=e.find(e=>e.id!==t.sessionId)??e[0];n&&(a.preventDefault(),dt(n.id));return}if(a.key===`j`||a.key===`k`){let e=new Map(r.map(e=>[e.id,e])),n=rt.current.map(t=>e.get(t)).filter(e=>!!e),i=n.length?n:St(r,{order:et,layout:st,activeId:t.sessionId}).groups.flatMap(e=>e.sessions);if(i.length===0)return;let o=t.sessionId?i.findIndex(e=>e.id===t.sessionId):-1,s=a.key===`j`?1:-1,c=i[Math.max(0,Math.min(i.length-1,o+s))];c&&(a.preventDefault(),pt(c.id));return}let o=t.sessionId?r.find(e=>e.id===t.sessionId):void 0,s=o?Bt(a):null;if(!o||!s)return;a.preventDefault();let c=()=>{let e=document.querySelector(`.wd-session-more`)?.getBoundingClientRect();return e?{x:e.right,y:e.bottom+4}:{x:window.innerWidth-16,y:64}};Gt(s,{archived:vt(o)},{tab:bt,setArchived:e=>Ee.setArchived(o,e),snoozeMenu:()=>{let e=De(o).filter(e=>/^(Snooze|Unsnooze)/.test(e.label));Te({items:e.map(e=>({...e,separated:!1})),...c()})},blockBy:()=>Ee.blockBy(o),openEditor:()=>Ee.openEditor(o),copyBranch:()=>Ee.copyBranch(o),fork:()=>Ee.fork(o),remove:()=>Ee.remove(o),header:e=>window.dispatchEvent(new CustomEvent(Wt,{detail:{id:o.id,action:e}}))})};return window.addEventListener(`keydown`,a),()=>{window.removeEventListener(`keydown`,a),n&&clearTimeout(n)}},[Ye,$e,dt,pt,t.sessionId,r,et,st,Ot,mt,Et,bt,Ee,De]),(0,_.useEffect)(()=>d(`switcher`,I),[I,d]);let kt=!!t.sessionId&&!r.some(e=>e.id===t.sessionId&&!vt(e));(0,_.useEffect)(()=>d(`session-page`,kt),[kt,d]);let At=(0,_.useRef)(!0);(0,_.useEffect)(()=>{if(At.current){At.current=!1;return}y().catch(e=>o(e.message))},[f,y]);let jt=t.sessionId?r.find(e=>e.id===t.sessionId)??null:null,Mt=jt?`${jt.target} · ${jt.branch} (${t.sessionSubTab})`:`the ${Vv[t.tab]} tab`;(0,_.useEffect)(()=>{E&&de(t.sessionId?{tab:`session`,sub:t.sessionSubTab,sessionId:t.sessionId}:{tab:t.tab,...t.tab===`time`&&N?{day:N}:{}}).catch(()=>{})},[E,t.tab,t.sessionId,t.sessionSubTab,N]);let Nt=Kv(),Pt=!!jt&&Cs(jt.attention)&&jt.attention.state===`idle`,Ft=!!jt&&Ts(jt),zt=jt&&(Pt||Ft)?`${jt.id}@${Pt?jt.attention.since:``}@${Ft?jt.prStage.key:``}`:null,Vt=Ft?jt?.prStage??null:null;(0,_.useEffect)(()=>{zt&&Nt&&he(zt.slice(0,zt.indexOf(`@`)),Vt).catch(()=>{})},[zt,Nt]);let Ht=(0,_.useMemo)(()=>r.filter(e=>!vt(e)&&ks(e)).length,[r]);(0,_.useEffect)(()=>{document.title=Ht>0?`(${Ht}) work`:`work`},[Ht]);let Ut=(0,_.useMemo)(()=>r.filter(e=>!vt(e)&&Os(e)).map(e=>e.id).sort().join(`,`),[r]),qt=(0,_.useMemo)(()=>new Set(Ut?Ut.split(`,`):[]),[Ut]),Jt=(0,_.useMemo)(()=>xo(W.agents,r),[W.agents,r]),Xt=Yo(Ht,qt,{ready:g}),Zt;if(a&&r.length===0)Zt=(0,K.jsx)(`div`,{className:`wd-tab-error`,children:a});else if(jt){let e=mt?ev(mt,jt.id):null;Zt=(0,K.jsxs)(K.Fragment,{children:[mt&&e!==null&&(0,K.jsx)(G_,{position:e,total:mt.ids.length,onNext:_t,onStop:()=>ht(null)}),(0,K.jsx)(F_,{startOnLastTurn:Ze===jt.id,onTermSlot:T,onOpenSession:e=>$e(e),session:jt,subTab:t.sessionSubTab,onSelectSubTab:bt,onDelete:()=>re(jt),prs:Je(jt),onShipped:xt})]})}else if(t.sessionId&&!m)Zt=(0,K.jsx)(`div`,{className:`wd-tab-empty`,children:`Loading…`});else if(t.sessionId)Zt=(0,K.jsxs)(`div`,{className:`wd-tab-empty`,children:[`Session not found. It may have been removed.`,(0,K.jsx)(`br`,{}),(0,K.jsxs)(`button`,{type:`button`,className:`wd-btn-secondary`,onClick:xt,children:[`Back to `,Vv[t.tab]]})]});else switch(t.tab){case`inbox`:Zt=(0,K.jsx)(Bs,{sessions:r,onOpenSession:$e,onReviewAll:gt});break;case`today`:Zt=(0,K.jsx)(ec,{onOpenSession:$e,viewToggle:(0,K.jsx)(Vu,{value:`today`,onChange:Tt})});break;case`cleanup`:Zt=(0,K.jsx)(hc,{onOpenSession:e=>$e(e)});break;case`sessions`:Zt=(0,K.jsx)(Su,{sessions:r,onShowArchived:e=>d(`sessions-table`,e),archivedLoaded:m,onOpenSession:$e,onNewWorktree:()=>Et(null),onDeleteSession:re,onCleanUp:()=>Ye(`cleanup`),menuFor:De,layout:st,viewToggle:(0,K.jsx)(Vu,{value:`now`,onChange:Tt})});break;case`start`:Zt=(0,K.jsx)(Fu,{sessions:r,prs:Pe?Me:null,prsNote:Ie,membersOf:qe,onNewWorktree:()=>Et(null),onPickPr:e=>Et(V_(e)),onWorkOnPr:e=>Et({target:e.repoAlias,branch:e.branch,prompt:W_(e)}),onOpenSession:e=>$e(e),onManageRepos:()=>Ye(`repos`)});break;case`jira`:Zt=(0,K.jsx)(Nc,{sessions:r,onPickIssue:e=>Et({branch:`feat/${e.key}`,jiraKey:e.key,prompt:B_(e)}),onOpenSession:e=>$e(e)});break;case`time`:Zt=(0,K.jsx)(Vc,{onOpenSession:e=>$e(e),onDayChange:P,onAsk:()=>{ee(!0),k(!0)}});break;case`repos`:Zt=(0,K.jsx)(wc,{onBack:()=>Ye(`start`)});break;case`welcome`:Zt=(0,K.jsx)(Kc,{onNewWorktree:()=>Et(null),onDone:()=>Ye(`start`)})}return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Vl,{dev:e,route:t,sessions:r,onSelectTab:Ye,onSelectSession:dt,sessionOrder:et,onReorderSessions:nt,sessionMenu:De,railLayout:st,onPlaceSession:lt,onRailSections:ut,onRailShownChange:it,onHome:Ct,onNewWorktree:()=>Et(null),inboxCount:Ht,prsFor:Je,onAssistant:F,activity:(0,K.jsx)(Yl,{onOpenSession:e=>$e(e)}),help:(0,K.jsx)(nu,{updates:pe,onCheck:me,checking:G?G.update?.state===`checking`:ue.checking,note:G?G.note:ue.note,onWhatsNew:()=>ve({focus:null}),onShortcuts:()=>H(!0),onRestart:()=>void ge(),agents:W.agents,onRestartAgents:W.restart,restartingAgents:W.restarting,agentsNote:W.note,agentNames:Jt,onOpenSession:e=>$e(e),taskbarFlash:Xt.inApp?{on:Xt.flashOn,set:Xt.setFlashOn}:void 0,mismatch:G?Z(G.update.appVersion,ue.updates?.running):null}),tasks:(0,K.jsx)(Bu,{open:A,onOpenChange:j,onPick:e=>Et({branch:`todo/`+Lu(e.text)})}),assistantOpen:E,children:Zt}),(0,K.jsx)(Z_,{activeId:jt&&t.sessionSubTab===`term`?jt.id:null,slot:w,sessions:r}),M&&(0,K.jsx)(q_,{open:E,onClose:()=>k(!1),seeing:Mt}),b&&(0,K.jsx)(Ev,{initial:S??void 0,onCreated:(e,t)=>{x(!1),C(null),$e(e,`term`)},onClose:()=>{x(!1),C(null)},onManageRepos:()=>{x(!1),C(null),Ye(`repos`)}}),(0,K.jsx)(ss,{health:at}),(0,K.jsx)(is,{toast:z,onClose:B}),I&&(0,K.jsx)(Lt,{sessions:r,onOpen:e=>$e(e),onClose:ne}),V&&(0,K.jsx)(Kt,{onClose:()=>H(!1)}),(0,K.jsx)(Yt,{updates:pe,onRestart:ge,restarting:G?G.update?.state===`installing`:ue.restarting,onWhatsNew:()=>ve({focus:pe?.available?.version??null})}),!pe?.available&&(0,K.jsx)(Qo,{names:Jt,onOpen:e=>$e(e),agents:W.agents,onRestart:W.restart,restarting:W.restarting,note:W.note}),_e&&(0,K.jsx)(fo,{focus:_e.focus,onClose:Ce}),we&&(0,K.jsx)(ns,{x:we.x,y:we.y,anchor:`right`,items:we.items,onClose:()=>Te(null)}),se&&(0,K.jsx)(xp,{session:se,sessions:r,onClose:()=>ce(null),onDone:e=>{let t=se;ce(null),le({text:`${t.title??t.branch} waits on ${e}`})}}),ae&&(0,K.jsx)(Ps,{onClose:()=>oe(null),onPick:e=>{let t=ae;oe(null),U(t,{until:e}).then(()=>le({text:`Snoozed ${t.title??t.branch}`}),e=>le({text:e.message,kind:`error`}))}}),R&&(0,K.jsx)(Av,{session:R,sessions:r,onClose:()=>ie(null),onForked:(e,t)=>{let n=R.title??R.branch;ie(null),ke.trigger(),$e(e,`term`),le(t.startError?{text:`Forked ${n}, but its Claude didn't start: ${t.startError}`,kind:`error`}:{text:`Forked ${n}${t.summarized?`, with a summary of the conversation`:``}`})}}),L&&(0,K.jsx)(Ov,{session:L,onDeleted:Dt,onClose:()=>re(null)})]})}function Kv(){let e=()=>typeof document>`u`||document.visibilityState===`visible`&&document.hasFocus(),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`focus`,t),window.addEventListener(`blur`,t),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`focus`,t),window.removeEventListener(`blur`,t),document.removeEventListener(`visibilitychange`,t)}},[]),t}function qv(e,t,n){if(e.length<=1)return{kind:`legacy`};let r=e[0].id;if(!t||!n)return{kind:`range`,range:{from:r,to:`working`}};let i=e.some(e=>e.id===n.from),a=n.to===`working`||e.some(e=>e.id===n.to);return!i||!a?{kind:`range`,range:{from:r,to:`working`},resetUserPicked:!0}:{kind:`range`,range:n}}function Jv(e,t){let n=null;for(let r of e){let e=Date.parse(r.ts);Number.isFinite(e)&&e<=t&&(n=r.id)}return n}function Yv(e){return e===`working`?`working tree`:e===0?`Initial`:`checkpoint #${e}`}function Xv(e,t){let n=Yv(e.from);return e.to===`working`&&t!==void 0&&e.from===t?`${n} is the most recent snapshot — it already matches your working tree, so there's nothing to show. Pick an earlier checkpoint to see recent changes.`:`No changes between ${n} and ${Yv(e.to)}. Pick a different range from the strip above.`}function Zv(e){return e.label&&e.label.trim()?e.label:`#${e.id}`}function Qv(e,t){let n=new Date(e).getTime();if(!Number.isFinite(n))return``;let r=Math.max(0,Math.round((t-n)/1e3));if(r<45)return`just now`;let i=Math.round(r/60);if(i<60)return`${i}m ago`;let a=Math.round(i/60);return a<24?`${a}h ago`:`${Math.round(a/24)}d ago`}function $v({entries:e,fromId:t,toId:n,onChangeFrom:r,onChangeTo:i,onPickSingle:a,active:o,busy:s}){let[c,l]=(0,_.useState)(!1),u=(0,_.useRef)(null);if((0,_.useEffect)(()=>{if(!c)return;let e=e=>{u.current?.contains(e.target)||l(!1)},t=e=>{e.key===`Escape`&&(e.preventDefault(),l(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[c]),e.length===0)return null;let d=n===`working`?1/0:n,f=e=>e>=t&&e<=d,p=Date.now(),m=t=>{if(t===`working`)return`Working`;let n=e.find(e=>e.id===t);return n?Zv(n):`#${t}`},h=(e,t)=>{e.shiftKey?t!==`working`&&r(t):a(t)};return(0,K.jsxs)(`nav`,{ref:u,className:`wd-checkpoint-range`+(o?``:` wd-checkpoint-range-inactive`),"aria-label":`Checkpoint range`,"aria-busy":s,children:[(0,K.jsx)(`div`,{className:`wd-checkpoint-range-row`,children:(0,K.jsxs)(`button`,{type:`button`,className:`wd-checkpoint-range-btn`,"aria-haspopup":`listbox`,"aria-expanded":c,onClick:()=>l(e=>!e),title:`Pick the range of checkpoints to diff`,children:[(0,K.jsx)(`span`,{className:`wd-checkpoint-btn-tag`,children:`Range:`}),` `,(0,K.jsxs)(`span`,{className:`wd-checkpoint-btn-range`,children:[m(t),` `,(0,K.jsx)(`span`,{"aria-hidden":`true`,children:`→`}),` `,m(n)]}),(0,K.jsx)(`span`,{className:`wd-checkpoint-caret`,"aria-hidden":`true`,children:`▾`})]})}),c&&(0,K.jsxs)(`div`,{className:`wd-checkpoint-pop`,role:`listbox`,"aria-label":`Checkpoints`,children:[(0,K.jsxs)(`div`,{className:`wd-checkpoint-pop-header`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-checkpoint-pop-preset`+(t===0&&n===`working`?` wd-checkpoint-pop-preset-active`:``),onClick:()=>{r(0),i(`working`)},children:[(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-dot`,"aria-hidden":`true`,children:t===0&&n===`working`?`●`:``}),`All changes `,(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-sub`,children:`Initial → Working`})]}),(0,K.jsx)(`div`,{className:`wd-checkpoint-pop-hint`,children:`Click = just this checkpoint · Shift+click = widen start`})]}),e.map(e=>{let r=e.id===t,i=n!==`working`&&e.id===n,a=`wd-checkpoint-pop-row`+(r?` wd-checkpoint-pop-from`:``)+(i?` wd-checkpoint-pop-to`:``)+(!r&&!i&&f(e.id)?` wd-checkpoint-pop-in-range`:``);return(0,K.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":r||i,className:a,onClick:t=>h(t,e.id),children:[(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-dot`,"aria-hidden":`true`,children:r||i?`●`:f(e.id)?`▪`:``}),(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-label`,children:Zv(e)}),(0,K.jsx)(`span`,{className:`wd-checkpoint-pop-time`,children:Qv(e.ts,p)})]},e.id)})]})]})}function ey({label:e}){return(0,K.jsxs)(`span`,{className:`wd-diff-checking`,role:`status`,children:[(0,K.jsx)(`span`,{className:`wd-diff-checking-dot`,"aria-hidden":`true`}),e]})}function ty(){let e=Lm(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(`idle`),a=zm(e.comments).length,o=Bm(e.comments),s=()=>{n(!1),i(`ended`)};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`wd-done-bar`,onClick:()=>n(!0),disabled:r!==`idle`,children:[r===`idle`?`End review `:r===`submitting`?`Submitting… `:r===`ending`?`Closing… `:`Review ended `,(0,K.jsx)(`span`,{className:`wd-done-count`,children:o})]}),t&&(0,K.jsx)(Yg,{title:`End review?`,onClose:()=>n(!1),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),a>0&&(0,K.jsx)(`button`,{type:`button`,onClick:async()=>{i(`submitting`);try{await e.submitReview(``),i(`ending`),await e.done(),s()}catch{i(`idle`)}},children:`Submit pending then end`}),(0,K.jsx)(`button`,{type:`button`,className:`wd-btn-primary`,onClick:async()=>{i(`ending`);try{await e.done(),s()}catch{i(`idle`)}},children:a>0?`End anyway (discard drafts)`:`End review`})]}),children:a>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`p`,{children:[(0,K.jsxs)(`strong`,{style:{color:`var(--status-modified-fg)`},children:[`You have `,a,` pending comment`,a===1?``:`s`,`.`]}),` `,`They have not been sent yet and will be lost if you end the review now.`]}),o>0&&(0,K.jsxs)(`p`,{style:{color:`var(--muted)`,fontSize:12},children:[o,` comment`,o===1?` was`:`s were`,` already delivered.`]})]}):o===0?(0,K.jsx)(`p`,{children:`You have left no comments. Closing the session will exit wd with no further action.`}):(0,K.jsxs)(`p`,{children:[`Your `,o,` comment`,o===1?``:`s`,` `,o===1?`has`:`have`,` already been delivered. Closing the session will exit wd. You can then close the tab.`]})})]})}function ny(e,t){return e>t}function ry(e,t){let[n,r]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{let t=e.current;if(!t)return;let n=()=>r(ny(t.scrollHeight,window.innerHeight));n();let i=typeof ResizeObserver<`u`?new ResizeObserver(n):null;return i?.observe(t),window.addEventListener(`resize`,n),()=>{i?.disconnect(),window.removeEventListener(`resize`,n)}},t),n}function iy({context:e,scopeHash:t}){let[n,r]=(0,_.useState)(null),i=!!e.readOnly,[a,o]=(0,_.useState)(!1),s=(0,_.useMemo)(()=>t?jm(t):void 0,[t]),c=(0,_.useMemo)(()=>s&&a?{...s,ssePath:``}:s,[s,a]),[l,u]=(0,_.useState)(e.initialBase??`uncommitted`),d=!e.staticMode||ie(),[f,p]=(0,_.useState)([]),[m,h]=(0,_.useState)(null),g=(0,_.useRef)(!1),[v,y]=(0,_.useState)(!1),b=(0,_.useCallback)(()=>{t&&se(t).then(e=>{p(e),h(t=>{let n=qv(e,g.current,t);if(n.resetUserPicked&&(g.current=!1),n.kind===`legacy`)return null;let r=n.range;return t&&t.from===r.from&&t.to===r.to?t:r})},()=>{})},[t]);(0,_.useEffect)(()=>{b()},[b]);let x=(0,_.useRef)(new WeakMap),{data:S,error:C,loading:w,checking:T,pending:E,applyPending:D,reload:O,checkForUpdates:k}=Pm(()=>{let e=Date.now();return(t?ae(t,l,v?m??void 0:void 0):R(l)).then(t=>(x.current.set(t,e),t))},[l,t,m,v]),A=S?.repos??null,j=S?.resolvedBase,M=e.headBranch??S?.headBranch;(0,_.useEffect)(()=>{let t=M??`HEAD`,n;n=v&&m?`${m.from===0?`Initial`:`#${m.from}`} → ${m.to===`working`?`working`:`#${m.to}`}`:l===`branch`&&j?`${t} vs ${j}`:`${t} · uncommitted`,document.title=`${n} — ${e.scopeLabel}`},[M,e.scopeLabel,l,j,v,m]),go(a?null:t?`/api/scopes/${encodeURIComponent(t)}/events`:`/events`,{events:{"diff-changed":()=>k(),"checkpoints-changed":()=>b(),"review-done":()=>o(!0)}});let ee=()=>{O(),window.scrollTo({top:0})},N=(e,t)=>t===`working`?{from:e,to:t}:e>t?{from:t,to:e}:{from:e,to:t},P=e=>{y(!1),u(e)},F=e=>{g.current=!0,y(!0),h(t=>N(e,t?.to??`working`))},I=e=>{g.current=!0,y(!0),h(t=>N(t?.from??0,e))},te=()=>{re!==null&&(g.current=!0,y(!0),h({from:re,to:`working`}))},ne=e=>{if(g.current=!0,y(!0),e===`working`){let e=f.length?f[f.length-1].id:0;h({from:e,to:`working`});return}if(e===0){h({from:0,to:`working`});return}let t=f.findIndex(t=>t.id===e),n=t>0?f[t-1].id:0;h({from:n,to:e})};(0,_.useEffect)(()=>{A&&A.length!==0&&(A.some(e=>e.name===n)||r(A[0].name))},[A,n]),(0,_.useEffect)(()=>{if(!t||!v||!m||m.to===`working`||m.to===0)return;let e=m.to,n=f.find(t=>t.id===e);if(!n||n.label&&n.label.trim())return;let r=!1;return ce(t,e).then(({label:t})=>{r||t&&t.trim()&&p(n=>n.map(n=>n.id===e?{...n,label:t}:n))},()=>{}),()=>{r=!0}},[t,v,m,f]),(0,_.useEffect)(()=>{if(!t||f.length===0)return;let e=f[f.length-1];if(e.id===0||e.label&&e.label.trim())return;let n=setTimeout(()=>{ce(t,e.id).then(({label:t})=>{t&&t.trim()&&p(n=>n.map(n=>n.id===e.id?{...n,label:t}:n))},()=>{})},2500);return()=>clearTimeout(n)},[t,f]);let L=S?x.current.get(S):void 0,re=L===void 0?null:Jv(f,L),oe=(0,_.useMemo)(()=>{let e=new Map,t=0;if(A)for(let n of A)e.set(n.name,t),t+=n.files.length;return e},[A]),z=(0,_.useMemo)(()=>!A||A.length===0?null:A.find(e=>e.name===n)??A[0],[A,n]),le=z?oe.get(z.name)??0:0,B=(0,_.useMemo)(()=>{let e=new Map;return z&&z.files.forEach((t,n)=>{e.set(t.path,Ym(le+n))}),e},[z,le]),{viewedPaths:V,viewedAnchors:H,toggle:ue,setMany:de}=i_(z?`scope:${e.scopeLabel}:${z.name}`:`scope:${e.scopeLabel}:_pending`,B),U=l_(z?.name??`_pending`),{width:fe,setWidth:W}=zl(),G=(0,_.useRef)(null),pe=(0,_.useRef)(null),me=ry(pe,[z?.name,A?.length]);if(c_(pe,U,me),C)return(0,K.jsx)(`div`,{className:`wd-web-error`,children:C});if(!A)return(0,K.jsx)(`div`,{className:`wd-web-empty`,children:`Loading diff…`});let he=A.reduce((e,t)=>e+t.files.length,0),ge=E?E.repos.reduce((e,t)=>e+t.files.length,0):null,_e=he===0||!z,ve=A.length>1,ye;ye=v&&m?Xv(m,f.length?f[f.length-1].id:void 0):l===`uncommitted`?`No uncommitted changes.`:!j||j===`HEAD`?`Couldn't auto-detect this branch's parent. Tried main, master, dev, develop (and their origin/* mirrors).`:`No commits since \`${j}\` — branch is up to date or already merged.`;let be=v&&m?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`strong`,{children:m.from===0?`Initial`:`#${m.from}`}),(0,K.jsx)(`span`,{className:`wd-web-muted`,children:` → `}),(0,K.jsx)(`strong`,{children:m.to===`working`?`working`:`#${m.to}`})]}):l===`branch`&&j?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`strong`,{children:M??`HEAD`}),(0,K.jsx)(`span`,{className:`wd-web-muted`,children:` vs `}),(0,K.jsx)(`strong`,{children:j})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`wd-web-muted`,children:`uncommitted on `}),(0,K.jsx)(`strong`,{children:M??`working tree`})]}),xe=(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar`,children:[(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-info`,children:[(0,K.jsx)(`span`,{className:`wd-web-difftoolbar-title`,title:e.scopeLabel,children:e.scopeLabel}),(0,K.jsx)(`span`,{className:`wd-web-difftoolbar-count`,children:_e?(0,K.jsx)(`span`,{className:`wd-web-muted`,children:`no changes`}):(0,K.jsxs)(K.Fragment,{children:[he,` file`,he===1?``:`s`,` changed`,ve?` · ${A.length} repos`:``]})}),(0,K.jsx)(`span`,{className:`wd-web-difftoolbar-compare`,children:be}),E&&(0,K.jsx)(hg,{filesChanged:ge,onShow:D,onReload:ee,onShowNewOnly:re===null?void 0:te}),(w||T&&!E)&&(0,K.jsx)(ey,{label:w?`loading…`:`checking…`})]}),(0,K.jsxs)(`div`,{className:`wd-web-difftoolbar-controls`,children:[(0,K.jsxs)(`span`,{className:`wd-web-version`,title:`work-tree v${eu}`,children:[`v`,eu]}),(0,K.jsx)(el,{}),(0,K.jsx)(gg,{}),d&&(0,K.jsxs)(`div`,{className:`wd-web-diff-scope`,role:`tablist`,"aria-label":`Diff scope`,children:[(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":!v&&l===`uncommitted`,className:`wd-web-diff-scope-btn`+(!v&&l===`uncommitted`?` wd-web-diff-scope-btn-active`:``),onClick:()=>P(`uncommitted`),children:`Uncommitted`}),(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":!v&&l===`branch`,className:`wd-web-diff-scope-btn`+(!v&&l===`branch`?` wd-web-diff-scope-btn-active`:``),onClick:()=>P(`branch`),children:`Since branch`})]}),t&&f.length>1&&m&&(0,K.jsx)($v,{entries:f,fromId:m.from,toId:m.to,active:v,onChangeFrom:F,onChangeTo:I,onPickSingle:ne,busy:w})]})]}),Se=(0,K.jsxs)(`div`,{ref:G,className:`wd-web-review-page`,style:{"--sidebar-width":`${fe}px`,"--topbar-h":`40px`,"--tabs-offset":ve?`36px`:`0px`},children:[xe,(0,K.jsxs)(`div`,{className:`wd-web-review-layout wd-web-review-layout--page`,children:[(0,K.jsx)(`aside`,{ref:pe,className:`wd-web-review-sidebar`+(me?` wd-sidebar-scrolls`:``),children:!_e&&z&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Vg,{files:z.files,startIndex:le,selectedAnchor:U,viewedAnchors:H,onMarkViewed:de}),!i&&(0,K.jsx)(Ug,{repoName:z.name,onOpenRepo:r})]})}),(0,K.jsx)(Bl,{layoutRef:G,size:fe,onCommit:W}),(0,K.jsx)(`main`,{className:`wd-web-review-main`,"aria-busy":w,children:_e||!z?(0,K.jsxs)(`div`,{className:`wd-web-empty wd-web-empty-diff`,children:[(0,K.jsx)(`p`,{children:ye}),l===`uncommitted`&&d&&(0,K.jsxs)(`p`,{className:`wd-web-empty-hint`,children:[`Try`,` `,(0,K.jsx)(`button`,{type:`button`,className:`wd-web-link-btn`,onClick:()=>P(`branch`),children:`Since branch`}),` `,`to see everything in this worktree.`]})]}):(0,K.jsxs)(K.Fragment,{children:[!i&&(0,K.jsx)(Jg,{}),ve&&(0,K.jsx)(`nav`,{className:`wd-web-repo-tabs`,children:A.map(e=>{let t=e.files.reduce((e,t)=>e+t.added,0),n=e.files.reduce((e,t)=>e+t.deleted,0);return(0,K.jsxs)(`button`,{type:`button`,className:`wd-web-repo-tab`+(e.name===z.name?` wd-web-repo-tab-active`:``),onClick:()=>r(e.name),children:[e.name,` `,(0,K.jsxs)(`span`,{className:`wd-web-tab-count`,children:[`(`,e.files.length,`)`]}),` `,(0,K.jsxs)(`span`,{className:`wd-tab-stats`,children:[(0,K.jsxs)(`span`,{className:`wd-add`,children:[`+`,t]}),` `,(0,K.jsxs)(`span`,{className:`wd-del`,children:[`-`,n]})]})]},e.name)})}),(0,K.jsx)(mg,{repo:z,startIndex:le,review:!i,viewedPaths:V,onToggleViewed:ue})]})}),!i&&!_e&&(0,K.jsx)(Xg,{}),!i&&!_e&&(0,K.jsx)(ty,{})]})]});return(n=>e.staticMode?n:(0,K.jsx)(Gm,{scopeHash:t,children:n}))(i?Se:(0,K.jsx)(Im,{api:c,children:Se}))}function ay({hash:e}){let t=new URLSearchParams(window.location.search),n=t.get(`repo`)??``,r=t.get(`path`)??``,i=t.get(`ref`)??void 0,[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(!r){c(`No file path given.`);return}let t=!1;return oe(e,n,r,1,2**53-1,i).then(e=>{t||o(e.lines)},e=>{t||c(e.message)}),()=>{t=!0}},[e,n,r,i]),(0,_.useEffect)(()=>{document.title=r?`${r} — file`:`file`},[r]);let l=(0,_.useMemo)(()=>{let e=ep(r);return!e||!a?null:tp(a,e)},[r,a]);return s?(0,K.jsx)(`div`,{className:`wd-web-error`,children:s}):a?(0,K.jsxs)(`div`,{className:`wd-fileview`,children:[(0,K.jsxs)(`header`,{className:`wd-fileview-header`,children:[(0,K.jsx)(`span`,{className:`wd-fileview-path`,children:r}),(0,K.jsxs)(`span`,{className:`wd-fileview-meta`,children:[a.length,` line`,a.length===1?``:`s`]})]}),(0,K.jsx)(`table`,{className:`wd-fileview-table`,children:(0,K.jsx)(`tbody`,{children:a.map((e,t)=>{let n=l?.[t]??null;return(0,K.jsxs)(`tr`,{className:`wd-fileview-row`,children:[(0,K.jsx)(`td`,{className:`wd-fileview-ln`,children:t+1}),n===null?(0,K.jsx)(`td`,{className:`wd-fileview-content`,children:e||` `}):(0,K.jsx)(`td`,{className:`wd-fileview-content`,dangerouslySetInnerHTML:{__html:n}})]},t)})})})]}):(0,K.jsxs)(`div`,{className:`wd-web-empty`,children:[`Loading `,r,`…`]})}function oy(){return(0,K.jsx)(Qc,{children:(0,K.jsx)(jh,{children:(0,K.jsx)(sy,{})})})}function sy(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(null),i=ly(window.location.pathname),a=i?null:cy(window.location.pathname);return(0,_.useEffect)(()=>{if(i)return;if(a){t({mode:`review`,scopeLabel:a.hash,repos:[],readOnly:a.kind===`diff`});return}let e=!1;return re().then(n=>{e||t(n)},t=>{e||r(t.message)}),()=>{e=!0}},[]),i?(0,K.jsx)(ay,{hash:i.hash}):n?(0,K.jsx)(`div`,{className:`wd-web-error`,children:n}):e?a?(0,K.jsx)(iy,{context:e,scopeHash:a.hash}):e.mode===`review`?(0,K.jsx)(iy,{context:e}):(0,K.jsx)(Gv,{dev:e.dev===!0}):(0,K.jsx)(`div`,{className:`wd-web-empty`,children:`Connecting…`})}function cy(e){let t=e.match(/^\/(diff|review)\/([a-zA-Z0-9_-]+)\/?$/);return t?{kind:t[1],hash:t[2]}:null}function ly(e){let t=e.match(/^\/file(?:\/([a-zA-Z0-9_-]+))?\/?$/);return t?{hash:t[1]}:null}var uy=document.getElementById(`root`);if(!uy)throw Error(`No #root element found`);(0,v.createRoot)(uy).render((0,K.jsx)(_.StrictMode,{children:(0,K.jsx)(oy,{})}));export{c as i,jt as n,u as r,Wu as t};
|
|
119
|
-
//# sourceMappingURL=index-
|
|
119
|
+
//# sourceMappingURL=index-Bc4ETz8-.js.map
|