@puddle-code/cli 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -5
- package/README.md +2 -2
- package/dist/index.js +11 -6
- package/dist/install-cli.sh +16 -5
- package/dist/public/assets/App-CNmIJjl_.js +2 -0
- package/dist/public/assets/{Dashboard-DMEBtYwv.js → Dashboard-CXo8Im5Y.js} +1 -1
- package/dist/public/assets/{EditorTabClose-PbgNs_rN.js → EditorTabClose--kyKHSwZ.js} +1 -1
- package/dist/public/assets/{FindWidget-ZDHywlX4.js → FindWidget-PycvFKIo.js} +1 -1
- package/dist/public/assets/{LazyTerminal-DRgaFViU.js → LazyTerminal-CAhb0T8p.js} +2 -2
- package/dist/public/assets/{ModelRefcount-CI3cYeQp.js → ModelRefcount-DaHZ2vpK.js} +1 -1
- package/dist/public/assets/{NewProjectDialog-Bhfj_sYl.js → NewProjectDialog-BWkhYVKJ.js} +1 -1
- package/dist/public/assets/{PaneEditorBody-Bz74yrKU.js → PaneEditorBody-DKpaey4n.js} +3 -3
- package/dist/public/assets/{PdfViewer-73_UlYnM.js → PdfViewer-B-O3C5Fb.js} +2 -2
- package/dist/public/assets/{SettingsDialog-DJmvzJHQ.js → SettingsDialog-DxI5UQty.js} +1 -1
- package/dist/public/assets/{Terminal-BwuoWKED.js → Terminal-DE7QO3Lv.js} +4 -4
- package/dist/public/assets/Workspace-CcPBZYc6.js +20 -0
- package/dist/public/assets/{abnfDiagram-VCTEODGH-AawOhIcj.js → abnfDiagram-VCTEODGH-Bn8NH7EO.js} +1 -1
- package/dist/public/assets/architecture-7GRP2DOG-Di8Z0gNN.js +1 -0
- package/dist/public/assets/{architectureDiagram-5GKGNRK7-D9vP5DO8.js → architectureDiagram-5GKGNRK7-rXpMU6RM.js} +1 -1
- package/dist/public/assets/{blockDiagram-I7D4REHJ-Cm9i3cTT.js → blockDiagram-I7D4REHJ-BnnIsbDF.js} +1 -1
- package/dist/public/assets/{buffer-store-BIpSx_-b.js → buffer-store-B24QspY2.js} +2 -2
- package/dist/public/assets/{button-CgZcwDne.js → button-CcKBhdZO.js} +1 -1
- package/dist/public/assets/{c4Diagram-7LVT6UL2-BiN1-NKB.js → c4Diagram-7LVT6UL2-CSC_Hbql.js} +1 -1
- package/dist/public/assets/channel-BpgRfG_m.js +1 -0
- package/dist/public/assets/{chunk-2E4U76K2-BxAMvG2q.js → chunk-2E4U76K2-BBFx22L7.js} +1 -1
- package/dist/public/assets/{chunk-4HAMMTFA-D4UgoMR5.js → chunk-4HAMMTFA-CFf6LTHp.js} +1 -1
- package/dist/public/assets/{chunk-75Z2AOVW-ViSC5KeO.js → chunk-75Z2AOVW-DmsoAjw5.js} +1 -1
- package/dist/public/assets/{chunk-CLGD4ZFX-C1obqh7u.js → chunk-CLGD4ZFX-Dx1fE4HX.js} +1 -1
- package/dist/public/assets/{chunk-DU6HZSFF-Dd9xUi9L.js → chunk-DU6HZSFF-p5k9qXhh.js} +1 -1
- package/dist/public/assets/{chunk-F27PBJKO-S5xJlLKg.js → chunk-F27PBJKO-BSaAmHi0.js} +1 -1
- package/dist/public/assets/{chunk-GMAD6QVW-DXbO7ojE.js → chunk-GMAD6QVW-Dna8BJJq.js} +1 -1
- package/dist/public/assets/{chunk-GVQU2GXP-vZ5Z6XwC.js → chunk-GVQU2GXP-DOhlGSDl.js} +1 -1
- package/dist/public/assets/{chunk-IMKFNOWR-BGcGac3f.js → chunk-IMKFNOWR-D65oIwAv.js} +1 -1
- package/dist/public/assets/{chunk-L3NEJ4N5-BfxBma0T.js → chunk-L3NEJ4N5-BwcBPm7M.js} +1 -1
- package/dist/public/assets/{chunk-OSK3NFVY-BaWjSKfn.js → chunk-OSK3NFVY-82MNmgWe.js} +1 -1
- package/dist/public/assets/{chunk-P2QGCYS3-Ce8Ukv1J.js → chunk-P2QGCYS3-CfrZ7JB4.js} +1 -1
- package/dist/public/assets/{chunk-POPQ4Y6H-lrRlaehc.js → chunk-POPQ4Y6H-CHs8yAQU.js} +1 -1
- package/dist/public/assets/{chunk-PWAF6VOD-DcoK5-E2.js → chunk-PWAF6VOD-BXxrEmLT.js} +1 -1
- package/dist/public/assets/{chunk-SHT3W25Y-BWdHabuP.js → chunk-SHT3W25Y-DMUmvTem.js} +1 -1
- package/dist/public/assets/{chunk-SVP7TREG-CfpAvBiO.js → chunk-SVP7TREG-CPru3m3o.js} +1 -1
- package/dist/public/assets/{chunk-TICWLB2K-BnqQqZIp.js → chunk-TICWLB2K-zN8e4oYt.js} +1 -1
- package/dist/public/assets/{chunk-TLUHSLCS-Cd6EShzW.js → chunk-TLUHSLCS-D9SadBk_.js} +2 -2
- package/dist/public/assets/classDiagram-ZZMXUADV-Cvjt82YE.js +1 -0
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-Cvjt82YE.js +1 -0
- package/dist/public/assets/{context-menu-CtKnUzHa.js → context-menu-DeidX0Pi.js} +1 -1
- package/dist/public/assets/{copy-Xz4fK2YI.js → copy-DWjBcRsB.js} +1 -1
- package/dist/public/assets/{cssMode-CNBJ-DrN.js → cssMode-CZGyU_SG.js} +1 -1
- package/dist/public/assets/{cynefin-OW5HDTMX-C1-MjjCZ.js → cynefin-OW5HDTMX-DWHI9hMS.js} +1 -1
- package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-xt5hQJ88.js → cynefinDiagram-5FMLGOSQ-D6ufz00C.js} +1 -1
- package/dist/public/assets/{dagre-GXQ25YYZ-Bgahh86t.js → dagre-GXQ25YYZ-t9AbgVhY.js} +1 -1
- package/dist/public/assets/{diagram-S7CK7UJ4-Djip7YHP.js → diagram-S7CK7UJ4-BldMPLHQ.js} +1 -1
- package/dist/public/assets/{diagram-UQ7AKVKN-StD7DYFa.js → diagram-UQ7AKVKN-D9T4tJbc.js} +1 -1
- package/dist/public/assets/{diagram-VSXAHHWV-C6W2XMTF.js → diagram-VSXAHHWV-Dh7CRewi.js} +1 -1
- package/dist/public/assets/{diagram-VX7I27RA-C5rBIjxM.js → diagram-VX7I27RA-DtaAnFuF.js} +1 -1
- package/dist/public/assets/{diagram-Z3DM3KII-DDzmZnRU.js → diagram-Z3DM3KII-Bu1-SbmM.js} +1 -1
- package/dist/public/assets/{dialog-_JRACgt4.js → dialog-CxBgPsab.js} +1 -1
- package/dist/public/assets/{disclosure-DBXM9uBm.js → disclosure-BH-wuD_D.js} +1 -1
- package/dist/public/assets/{dist-Bl7vUoam.js → dist-D5t_kbYW.js} +1 -1
- package/dist/public/assets/{dist-CzEdee3K.js → dist-qyIRFVt1.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-PWID7BFC-TJlh5Fea.js → ebnfDiagram-PWID7BFC-DInnl0wx.js} +1 -1
- package/dist/public/assets/{erDiagram-RLTQ6QDP-BSNVCw_x.js → erDiagram-RLTQ6QDP-C359QLoG.js} +1 -1
- package/dist/public/assets/{errors-BzfxU_Kw.js → errors-1cUzcK5v.js} +1 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-BQVYxt7A.js +1 -0
- package/dist/public/assets/flowDiagram-HODETNUW--HTl_4V1.js +1 -0
- package/dist/public/assets/{ganttDiagram-EL5Y4UJY-BGFNgCoM.js → ganttDiagram-EL5Y4UJY-xq_Yuf1R.js} +1 -1
- package/dist/public/assets/{gitGraph-4MIJSDKK-Du3WBCxU.js → gitGraph-4MIJSDKK-U5qKRzrG.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-WWUBYQGX-Dq_yAVmM.js → gitGraphDiagram-WWUBYQGX-BcXQM8eP.js} +1 -1
- package/dist/public/assets/{htmlMode-BWm5ayBQ.js → htmlMode-23yFfFGb.js} +1 -1
- package/dist/public/assets/{index-BP-EF5G2.js → index-CPDXsNn7.js} +2 -2
- package/dist/public/assets/{info-A6RAGUB7-V0hlAV3d.js → info-A6RAGUB7-BXjSF_iH.js} +1 -1
- package/dist/public/assets/{infoDiagram-27XIBGKW-DZM1jHkq.js → infoDiagram-27XIBGKW-BIJ52Gpm.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-5VMMS53U-CZlO72MU.js → ishikawaDiagram-5VMMS53U-Bob975Xt.js} +1 -1
- package/dist/public/assets/{journeyDiagram-3NMN7TZE-DZZieltZ.js → journeyDiagram-3NMN7TZE-x9ssExSV.js} +1 -1
- package/dist/public/assets/{jsonMode-DA3Di61-.js → jsonMode-CmlPrpF1.js} +1 -1
- package/dist/public/assets/{kanban-definition-UXKFOSKX-BAFfgDCD.js → kanban-definition-UXKFOSKX-Cy8SkNND.js} +1 -1
- package/dist/public/assets/{line-DNRJuk5l.js → line-C0YxHEKk.js} +1 -1
- package/dist/public/assets/{markdown-mermaid-zldCuMow.js → markdown-mermaid-wVNP7t8F.js} +2 -2
- package/dist/public/assets/{math-Bl0zHVK2.js → math-B4Pf1FaR.js} +1 -1
- package/dist/public/assets/{media-refresh-store-BemN_6sc.js → media-refresh-store-CcMOJ-U-.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-DpOHgT8D.js → mermaid-parser.core-Cy8AG-qQ.js} +3 -3
- package/dist/public/assets/{mermaid.core-DuO1Atct.js → mermaid.core-DoDuR-5f.js} +3 -3
- package/dist/public/assets/{mindmap-definition-YA3MSWOX-Bbgshnhk.js → mindmap-definition-YA3MSWOX-B6ghAwaT.js} +1 -1
- package/dist/public/assets/{notification-delivery-DehaYHWS.js → notification-delivery-0LhR-ShC.js} +1 -1
- package/dist/public/assets/{packet-AYTQ26CC-H2b8zBMM.js → packet-AYTQ26CC-BpWwI2oX.js} +1 -1
- package/dist/public/assets/{pdf-DTc2umrm.js → pdf-C7rjnygQ.js} +1 -1
- package/dist/public/assets/{pegDiagram-XKGWAZYB-BKdl5Qrn.js → pegDiagram-XKGWAZYB-yj3GPtMG.js} +1 -1
- package/dist/public/assets/{pie-WAS4IAKB-SB8x1Dpp.js → pie-WAS4IAKB-DvE_icUX.js} +1 -1
- package/dist/public/assets/{pieDiagram-E7YTZNPT-YXMNp-5O.js → pieDiagram-E7YTZNPT-DdwpR7qt.js} +1 -1
- package/dist/public/assets/{project-abbrev-D7aa-LGS.js → project-abbrev-DUQCetLc.js} +1 -1
- package/dist/public/assets/{protocol-support-Dm8bEo7Y.js → protocol-support-DWTHwckn.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-AXDQQJYC-B2TAChhA.js → quadrantDiagram-AXDQQJYC-DRGzxdVf.js} +1 -1
- package/dist/public/assets/{radar-RG4KPBEZ-D2xzXNL8.js → radar-RG4KPBEZ-BMUoktqq.js} +1 -1
- package/dist/public/assets/{railroad-74A4TZTK-CKug6hj8.js → railroad-74A4TZTK-CRCU-hfz.js} +1 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-DgF_7Rby.js +1 -0
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-yoQjOTe4.js +1 -0
- package/dist/public/assets/railroad-peg-WCYAUIDC-Bi2UnAcg.js +1 -0
- package/dist/public/assets/{railroadDiagram-O6MQD6OU-Bft2oh-d.js → railroadDiagram-O6MQD6OU-DoYXFCYn.js} +1 -1
- package/dist/public/assets/{requirementDiagram-BXWQKSXE-e0GCEfhM.js → requirementDiagram-BXWQKSXE-CSioB-S4.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-P5KCCOFB-Csb70YNA.js → sankeyDiagram-P5KCCOFB-Be_RNG6h.js} +1 -1
- package/dist/public/assets/{scroll-restoration-D7f4DDsJ.js → scroll-restoration-C6CrXFrx.js} +1 -1
- package/dist/public/assets/{selection-actions-D5wKfiBu.js → selection-actions-BuV-nTRE.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-DcnD8T30.js → sequenceDiagram-WJ2MYXX4-QO7Ba1BQ.js} +1 -1
- package/dist/public/assets/{stateDiagram-D77RDMKH-GnwFUlNg.js → stateDiagram-D77RDMKH-B52l08Ki.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-DyfZNcXp.js +1 -0
- package/dist/public/assets/{swimlanes-42K2YHIH-CPq_eKyi.js → swimlanes-42K2YHIH-CEkCp-cn.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-9I9MU74C.js +8 -0
- package/dist/public/assets/{switch-DZbOKnZ0.js → switch-B5sIV745.js} +1 -1
- package/dist/public/assets/{timeline-definition-24CTP7MA-DjUPAJJx.js → timeline-definition-24CTP7MA-0rICk4bz.js} +1 -1
- package/dist/public/assets/{treeView-Q6P3EWNA-DBuhlxaq.js → treeView-Q6P3EWNA-UwjA1jwm.js} +1 -1
- package/dist/public/assets/{treemap-WGGIJYW6-3TKwSIeh.js → treemap-WGGIJYW6-BWpfnhSW.js} +1 -1
- package/dist/public/assets/{tsMode-BYwFH3pC.js → tsMode-iBk8vwDB.js} +1 -1
- package/dist/public/assets/{use-ui-state-BXROVbIw.js → use-ui-state-Bxj6PnLE.js} +1 -1
- package/dist/public/assets/{vennDiagram-4TSXK5OY-oDrGN_Dh.js → vennDiagram-4TSXK5OY-B1JUHS0H.js} +1 -1
- package/dist/public/assets/{view-state-store-vUrDt7wu.js → view-state-store-B5KgrWCh.js} +1 -1
- package/dist/public/assets/{wardley-WFR3VGLG-Br5CacuJ.js → wardley-WFR3VGLG-DGkljHJE.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-VM6X3IG4-Cw_uOLXA.js → wardleyDiagram-VM6X3IG4-WNi3mtNy.js} +1 -1
- package/dist/public/assets/{ws-Ug1Tr2sh.js → ws-D9g0r8Jb.js} +1 -1
- package/dist/public/assets/{xychartDiagram-S5SC5T6Z-Cl8gNx_J.js → xychartDiagram-S5SC5T6Z-CbKt4_V3.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/{puddlang.js → pudl.js} +10 -10
- package/package.json +2 -2
- package/dist/public/assets/App-XpQccO6u.js +0 -2
- package/dist/public/assets/Workspace-DPL1IKA6.js +0 -20
- package/dist/public/assets/architecture-7GRP2DOG-BbAArV9u.js +0 -1
- package/dist/public/assets/channel-CUWW1WRo.js +0 -1
- package/dist/public/assets/classDiagram-ZZMXUADV-Cve4a5Gc.js +0 -1
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-Cve4a5Gc.js +0 -1
- package/dist/public/assets/eventmodeling-NTZA5JFV-DZ8G1RJ1.js +0 -1
- package/dist/public/assets/flowDiagram-HODETNUW-Dd9WpTU6.js +0 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-cj9XZHow.js +0 -1
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-CCIfyLjg.js +0 -1
- package/dist/public/assets/railroad-peg-WCYAUIDC-DkxYDi7O.js +0 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-Bktkoy9c.js +0 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-BmjIwfwd.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-DpOHgT8D.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-_wZywoZs.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-Dd9xUi9L.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-ViSC5KeO.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-Cy8AG-qQ.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-_wZywoZs.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-p5k9qXhh.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-DmsoAjw5.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
2
2
|
${r-a/2-N/2},${l+P}
|
|
3
3
|
${r-a/2-N/2},${l-P}
|
|
4
4
|
${n.posWithOffset-a/2-N},${l-s-P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./editor.api2-4X9Vh9Zw.js";import{h as t}from"./buffer-store-
|
|
1
|
+
import{h as e}from"./editor.api2-4X9Vh9Zw.js";import{h as t}from"./buffer-store-B24QspY2.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-x2nWJpem.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DSJ9zmd7.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-CNmIJjl_.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/dist-qyIRFVt1.js","assets/protocol-support-DWTHwckn.js","assets/copy-DWjBcRsB.js","assets/createLucideIcon-DyMAgLa3.js","assets/project-abbrev-DUQCetLc.js","assets/dialog-CxBgPsab.js","assets/button-CcKBhdZO.js","assets/x-CZCUod6A.js","assets/LazyTerminal-CAhb0T8p.js","assets/switch-B5sIV745.js","assets/use-ui-state-Bxj6PnLE.js","assets/preview-kind-QJSMKfUN.js","assets/debounce-B9DrqirV.js","assets/notification-delivery-0LhR-ShC.js","assets/NewProjectDialog-BWkhYVKJ.js","assets/use-debounced-value-C86N-mOK.js","assets/errors-1cUzcK5v.js","assets/ws-D9g0r8Jb.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e,t}from"./rolldown-runtime-QTnfLwEv.js";import{t as n}from"./react-CZI7_Jkm.js";(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=t((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 ee(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 b(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,x||(x=!0,oe());else{var t=n(l);t!==null&&le(b,t.startTime-e)}}var x=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,x){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){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,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(b,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():x=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(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`):ne=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(te),te=-1):h=!0,le(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,x||(x=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{var t=n();function r(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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),o=t(((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=a()})),s=t((e=>{var t=i(),r=n(),a=o();function s(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(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 d(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 f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case b:return`Profiler`;case ee:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case te:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var S=Array.isArray,C=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function T(e,t){he++,me[he]=e.current,e.current=t}var ve=ge(null),ye=ge(null),be=ge(null),xe=ge(null);function Se(e,t){switch(T(be,t),T(ye,e),T(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ve),T(ve,e)}function Ce(){_e(ve),_e(ye),_e(be)}function we(e){e.memoizedState!==null&&T(xe,e);var t=ve.current,n=Hd(t,e.type);t!==n&&(T(ye,e),T(ve,n))}function Te(e){ye.current===e&&(_e(ve),_e(ye)),xe.current===e&&(_e(xe),Qf._currentValue=pe)}var Ee,De;function Oe(e){if(Ee===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||``,De=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Ee+e+De}var ke=!1;function Ae(e,t){if(!e||ke)return``;ke=!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}e.call(n.prototype)}}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(`
|
|
@@ -79,4 +79,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
79
79
|
3. Apply what the rules above settle without asking. Ask the user about anything they leave open, stating trade-offs where relevant (e.g. a symlinked .venv saves gigabytes per worktree, but parallel sessions then share mutable dependency state).
|
|
80
80
|
4. If the user states a standing rule for all future worktrees ("always…", "never…", "from now on…"), write the complete updated rules to \`.puddle/onboarding-notes.md\` in this worktree — full replacement, user-owned prose; record their decision, don't invent policy.
|
|
81
81
|
|
|
82
|
-
Then proceed with the task below (or await instructions if none is given).`,Qo=`[puddle] You are joining an existing branch and worktree that other agents may be working in concurrently. Files can change underneath you, so re-check the working tree before you act, and avoid disruptive git operations (resetting, force-pushing, or deleting the branch) that would disrupt work already in progress by others.`,$o=`This session was interrupted (daemon or machine restart). Processes you started are gone; re-verify your environment before continuing.`,es=[[`name`,`the resolved display name: user rename, else agent name, else sequence, else id`],[`title`,`the user rename override only (empty when unset)`],[`agentName`,`the agent's own session name (empty when the agent has not named it)`],[`sequence`,`the terminal-title name the process set (empty when it set none)`],[`branch`,`the git branch`],[`cwd`,`the worktree directory's name`],[`id`,`the first 8 characters of the session id`],[`status`,`the session status (running, waiting_input, …)`],[`agent`,`the agent type (empty for terminal sessions)`],[`separator`,`an em dash that appears only between two non-empty neighbours`]],ts="${name}",ns=[`navy`,`gold`,`blue`,`green`,`red`,`violet`,`cyan`];I({id:Vo,name:Yo,branch_prefix:M(),icon:M().nullable().default(null),icon_colour:M().nullable().default(null),created_at:Lo}),I({name:Yo,branch_prefix:M().max(64).optional()}),I({name:Yo.optional(),branch_prefix:M().max(64).optional(),icon:M().max(64).nullable().optional(),icon_colour:M().max(32).nullable().optional()});var rs=eo({baseBranch:M().optional(),separateBranch:P().optional(),separateWorktree:P().optional()}),is=eo({agent:rs.optional(),terminal:rs.optional()});eo({allowSkipPermissions:P().default(!1),captureSessionEnv:P().default(!0),terminalAppShortcuts:P().default(!0),onboardingTemplate:M().optional(),concurrentTemplate:M().optional(),restartTemplate:M().optional(),tabTitleTemplate:M().optional(),projectOrder:F(M()).optional(),sessionDefaults:is.optional(),hotkeys:co(M(),M()).optional()}),co(M(),Ya());var as=M().regex(/^untitled-\d+\.md$/);I({name:as}),I({name:as,content:M(),mtime_ms:N()}),I({content:M()}),I({mtime_ms:N()}),I({id:Ro,profile_id:Vo,agent_type:M(),label:M(),config_dir:M(),skip_permissions_default:P(),logged_in:P(),created_at:Lo}),I({profile_id:Vo,agent_type:M().min(1),label:Yo,skip_permissions_default:P().optional(),import_dir:M().min(1).optional()}),I({label:Yo.optional(),skip_permissions_default:P().optional()}),I({stream:M(),term:M(),hint:M().optional()}),eo({account_id:Ro,logged_in:P(),session_count:N().int().nonnegative(),active_session_count:N().int().nonnegative(),last_activity_at:Lo.nullable(),agent_usage:I({input_tokens:N().int().nonnegative(),output_tokens:N().int().nonnegative(),cache_read_input_tokens:N().int().nonnegative(),cache_creation_input_tokens:N().int().nonnegative(),message_count:N().int().nonnegative()}).nullable(),live_usage:I({captured_at:Lo,context_used_percentage:N().nullable(),total_cost_usd:N().nullable(),model:M().nullable()}).nullable(),subscription:I({windows:F(I({key:M(),label:M(),used_percentage:N(),resets:M().nullable()}))}).nullable()}),I({id:M(),display_name:M(),capabilities:I({resume:P(),skip_permissions:P()}),binary:M().optional(),available:P().optional()}),I({id:Ro,path:M(),default_base_branch:M(),onboarding_notes:M().nullable(),fetch_enabled:P(),last_fetched_at:Lo.nullable()}).extend({orphan_worktrees:F(M())}),I({path:M().min(1),default_base_branch:M().optional(),onboarding_notes:M().nullable().optional(),fetch_enabled:P().optional()}),I({branches:F(I({name:M(),is_session:P(),session_title:M().nullable()}))});var os=I({path:M(),branch:M().nullable(),is_primary:P(),dirty:P().optional(),local_only:P().optional()}),ss=I({name:M(),local_only:P()});I({worktrees:F(os),orphan_branches:F(ss)}),I({default_base_branch:M().optional(),onboarding_notes:M().nullable().optional(),fetch_enabled:P().optional()});var cs=L([`starting`,`running`,`waiting_input`,`exited`,`interrupted`,`archived`]),ls=L([`agent`,`terminal`]),us=I({id:zo,project_id:Bo,account_id:Ro.nullable(),worktree_path:M(),base_branch:M(),branch:M(),separate_branch:P(),kind:ls,agent_type:M().nullable(),detected_agent_type:M().nullable().optional(),agent_session_ref:M().nullable(),conversation_id:Ro.nullable().optional(),parent_conversation_id:Ro.nullable().optional(),title:M().nullable(),agent_title:M().nullable().optional(),conversation_missing:P().optional(),branch_owner:P().optional(),native_sync:L([`pending`,`full`,`fallback`]).optional(),osc_title:M().nullable().optional(),status:cs,cwd:M().nullable().optional(),skip_permissions:P(),created_at:Lo,updated_at:Lo,last_activity_at:Lo.nullable(),worktree_missing:P().optional(),stale_running:P().optional(),git_summary:I({ahead:N().int().nonnegative(),behind:N().int().nonnegative(),dirty_files:N().int().nonnegative()}).nullable().optional()});I({project_id:Bo,account_id:Ro.optional(),kind:ls.optional(),base_branch:M().min(1).optional(),branch:M().min(1).max(200).optional(),separate_branch:P().optional(),separate_worktree:P().optional(),join_worktree:M().optional(),cwd:M().optional(),title:M().min(1).max(200).optional(),prompt:M().optional(),skip_permissions:P().optional()}),I({title:M().max(200)}),I({account_id:Ro}),I({account_id:Ro}),I({vars:F(I({name:M(),bytes:N().int().nonnegative(),value:M().optional()}))}),I({cleared:N().int().nonnegative()}),I({force:P().default(!1),delete_branch:P().default(!1)});var ds=M().min(1).max(5),fs=I({id:Bo,profile_id:Vo,repo_id:Ro,name:M(),abbrev:ds.nullable().default(null),archived:P().default(!1),created_at:Lo,updated_at:Lo});I({profile_id:Vo,repo_id:Ro,name:M().min(1).max(100),abbrev:ds.optional()}),I({name:M().min(1).max(100).optional(),abbrev:ds.optional(),archived:P().optional()}),I({project:fs,sessions:F(us)});var ps=L([`project`,`profile`]);I({id:Ro,profile_id:Vo,scope:ps,project_id:Bo.nullable(),title:M().nullable(),body:M(),tags:F(M()),agent_type:M().nullable(),position:N(),created_at:Lo,updated_at:Lo}),I({profile_id:Vo,scope:ps,project_id:Bo.optional(),title:M().max(200).optional(),body:M().min(1),tags:F(M()).optional(),agent_type:M().optional()}),I({scope:ps.optional(),project_id:Bo.nullable().optional(),title:M().max(200).nullable().optional(),body:M().min(1).optional(),tags:F(M()).optional(),agent_type:M().nullable().optional(),position:N().optional()});var ms=L([`on_demand`,`eager`]),hs=I({session:zo,path:M().min(1),root:M().min(1).optional()}),gs=M().regex(/^[a-z][a-z0-9_-]*$/);I({providers:F(I({id:gs,display_name:M().min(1),extensions:F(M().regex(/^[a-z0-9]+$/)).min(1),input_extensions:F(M().regex(/^[a-z0-9]+$/)).min(1),available:P(),executor:M().min(1).nullable(),eager:P()}))});var _s=I({source:hs,provider:gs.optional(),profile_id:Vo.optional(),project_id:Bo.optional()}),vs=I({role:M().min(1),media_type:M().min(1),file:hs}),ys=I({source:hs,severity:L([`error`,`warning`,`info`]),message:M().min(1),line:N().int().positive(),column:N().int().positive().optional(),end_line:N().int().positive().optional(),end_column:N().int().positive().optional()}),bs=I({source:hs.optional(),output:M().optional(),diagnostics:F(ys).optional()}),xs=bs.extend({message:M().min(1)}),Ss=I({provider:gs,executor:M().min(1),revision:N().int().nonnegative(),source:hs,artifacts:F(vs),navigation:I({kind:M().min(1)}).optional()});_s.extend({mode:ms}),I({provider:gs,mode:ms,state:L([`idle`,`running`,`succeeded`,`failed`]),revision:N().int().nonnegative(),result:Ss.nullable(),error:xs.nullable()});var Cs=I({placeholder:M().regex(/^\{\{[a-z][a-z0-9_]*\}\}$/),description:M().min(1)}),ws=I({mode:ms,run_when:L([`when_clicked`,`upon_file_change`]),default_command:M().min(1).nullable(),override_command:M().min(1).nullable()}),Ts=_s.extend({profile_id:Vo,project_id:Bo});I({provider:gs,display_name:M().min(1),file_type:M().regex(/^[a-z0-9][a-z0-9_-]*$/),file_path:M().min(1),variables:F(Cs),commands:F(ws).min(1)}),Ts.extend({mode:ms,command:M().trim().min(1).max(16384).nullable()});var Es=`00000000-0000-0000-0000-000000000000`,Ds=I({session:zo,path:M(),kind:L([`file`,`diff`,`commit`,`external`,`untitled`]).optional(),sha:M().optional(),git_area:L([`staged`,`unstaged`]).optional(),root:M().optional(),view:L([`source`,`preview`,`linked`,`locked`]).optional(),compile_mode:ms.optional(),generated_by:gs.optional()}),Os=io(`type`,[I({type:R(`editor`),tab:Ds}),I({type:R(`terminal`),session:zo})]),ks=I({kind:R(`leaf`),id:M(),tabs:F(Os).default([]),activeKey:M().nullable().default(null),previewKey:M().nullable().default(null)}),As=jo(()=>io(`kind`,[ks,I({kind:R(`split`),id:M(),direction:L([`row`,`col`]),children:F(As),sizes:F(N())})])),js=eo({layout_tree:As.nullable().default(null),active_session:zo.nullable().default(null),layout_ref:Ro.nullable().default(null)}),Ms=eo({session_tabs:F(zo).default([]),active_session:zo.nullable().default(null),editor_tabs:F(Ds).default([]),layout:eo({}).default({}),explorer_pin:zo.nullable().default(null),active_editor_tab:Ds.nullable().default(null),explorer_open:P().default(!0),sidebar_mode:L([`files`,`diff`,`history`,`changes`,`search`,`worktrees`]).default(`files`),sidebar_collapsed:P().default(!1),sessions_collapsed:P().default(!1),right_panel:L([`sessions`,`scratchpad`]).optional(),session_order:F(zo).default([]),layout_tree:As.nullable().default(null),layout_mode:L([`profile`,`project`]).optional(),project_layouts:co(M(),js).default({}),layout_ref:Ro.nullable().default(null)});I({ui_state:Ms}),I({ui_state:Ms,updated_at:Lo});var Ns=L([`project`,`profile`]);I({id:Ro,profile_id:Vo,scope:Ns,project_id:Bo.nullable(),name:M(),layout_tree:As.nullable(),active_session:zo.nullable(),created_at:Lo,updated_at:Lo}),I({profile_id:Vo,scope:Ns,project_id:Bo.optional(),name:M().min(1).max(200),layout_tree:As.nullable(),active_session:zo.nullable().optional()}),I({name:M().min(1).max(200).optional(),layout_tree:As.nullable().optional(),active_session:zo.nullable().optional()}),hs.extend({root:M().min(1),page:N().int().positive(),x:N().finite().nonnegative(),y:N().finite().nonnegative()});var Ps=hs.extend({line:N().int().positive(),column:N().int().nonnegative().optional()}),Fs=L([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);I({mime:Fs,data:M().min(1)});var Is=I({path:M()});I({path:M(),line:N().int().nullable(),kind:L([`file`,`dir`]).optional(),relative_path:M().optional(),root:M().optional()});var Ls=I({name:M(),type:L([`file`,`dir`,`symlink`]),size:N().int().nonnegative().nullable(),symlink:P().default(!1)});I({path:M(),entries:F(Ls)});var Rs=I({path:M(),content:M().nullable(),binary:P(),size:N().int().nonnegative(),mtime_ms:N()}),zs=I({mime:M().min(1).max(128),data:M().max(4*2796203)});I({content:M(),expected_mtime_ms:N().optional()}),I({path:M(),mtime_ms:N(),size:N().int().nonnegative()}),I({files:F(I({path:M(),size:N().int().nonnegative()}))}),I({path:M().min(1),kind:L([`file`,`dir`])}),I({from:M().min(1),to:M().min(1)}),I({from:M().min(1),to:M().min(1)}),I({operation:L([`copy`,`move`]),source:I({session_id:zo,root:M().optional()}),from:M().min(1),to:M().min(1)}),I({path:M().min(1)}),I({ok:R(!0),path:M()});var Bs=L([`added`,`modified`,`deleted`,`renamed`]),Vs=L([`staged`,`unstaged`]),Hs=I({path:M(),status:Bs,old_path:M().nullable()}),Us=I({against:M(),base_ref:M().nullable(),entries:F(Hs),area:Vs.optional()}),Ws=L([`untracked`,`modified`,`added`,`deleted`,`renamed`,`conflicted`,`ignored`]),Gs=I({path:M(),status:Ws});I({entries:F(Gs)});var Ks=I({path:M(),status:Ws.exclude([`ignored`]),old_path:M().nullable()});I({repositories:F(I({root:M(),relative_path:M(),name:M(),owning:P(),submodule:P(),initialised:P(),head:M().nullable(),branch:M().nullable(),detached:P(),upstream:M().nullable(),ahead:N().int().nonnegative(),behind:N().int().nonnegative(),has_remote:P(),staged:F(Ks),unstaged:F(Ks),conflicts:F(Ks)})),entries:F(Gs)});var qs=I({repository:M().min(1)});qs.extend({paths:F(M().min(1)).min(1)}),qs.extend({message:M().trim().min(1),stage_all:P().optional()}),qs.extend({set_upstream:P().optional()}),I({ok:R(!0),sha:M().optional()}),I({path:M(),content:M().nullable(),binary:P(),exists:P()}),I({path:M(),repository:M().nullable(),repository_path:M().nullable(),head:M().nullable(),content:M().nullable(),binary:P(),exists:P(),tracked:P(),ignored:P()});var Js=I({path:M(),ref:M(),content:M().nullable(),binary:P()}),Ys=I({sha:M(),subject:M(),author_name:M(),author_email:M(),authored_at:Lo,parents:F(M()).optional()});I({commits:F(Ys),has_more:P()}),I({commit:Ys.extend({body:M()}),parents:F(M()),files:F(Hs)});var Xs=I({line:N().int().positive(),text:M()}),Zs=I({path:M(),matches:F(Xs)});I({query:M(),files:F(M()),content:F(Zs),truncated:P()}),I({ports:F(I({port:N().int().min(1).max(65535),pid:N().int(),command:M(),address:M()})),scanned_at:Lo}),I({refreshId:M().uuid()}).strict();var Qs=I({status:R(`refreshing`),refreshId:M().uuid(),instance:M().uuid()}),$s=M().regex(/^(agent|shell-[0-9]+)$/),ec=`home`,tc={cols:N().int().min(2).max(1e3),rows:N().int().min(2).max(500)},nc=io(`t`,[I({t:R(`auth`),token:M().max(128),resource:M().regex(/^[a-f0-9]{64}$/).optional()}),I({t:R(`attach`),session:M(),term:$s,...tc}),I({t:R(`stdin`),session:M(),term:$s,data:M()}),I({t:R(`resize`),session:M(),term:$s,...tc}),I({t:R(`detach`),session:M(),term:$s}),I({t:R(`spawn-shell`),session:M()}),I({t:R(`kill-shell`),session:M(),term:$s}),I({t:R(`subscribe-status`)}),I({t:R(`theme`),fg:M().regex(/^#[0-9a-fA-F]{6}$/),bg:M().regex(/^#[0-9a-fA-F]{6}$/)})]),rc=io(`t`,[Ko,I({t:R(`authenticated`)}),I({t:R(`shell-spawned`),session:M(),term:M()}),I({t:R(`replay`),session:M(),term:M(),data:M()}),I({t:R(`output`),session:M(),term:M(),data:M()}),I({t:R(`status`),session:M(),status:cs,last_activity_at:M().nullable()}),I({t:R(`renamed`),session:M(),title:M().nullable(),agent_title:M().nullable().optional(),osc_title:M().nullable().optional()}),I({t:R(`exit`),session:M(),term:M(),code:N()}),I({t:R(`notice`),level:L([`error`,`warning`]),title:M(),detail:M().optional(),session:M().optional(),term:M().optional()}),I({t:R(`account`),account_id:N(),profile_id:M(),logged_in:P()}),I({t:R(`session-switched`),source_session:M(),target_session:M(),target_project:M(),cause:L([`clear`,`resume`,`fork`]),outcome:L([`rebound`,`focused-existing`])}),I({t:R(`sessions-changed`),project_ids:F(M())}),I({t:R(`error`),message:M()})]),ic={chunkBytes:32*1024,frameBytes:48*1024,requestBytes:256*1024,responseBytes:16*1024*1024,queueBytes:1024*1024,relayQueueBytes:64*1024*1024,requests:8,connectionsPerHost:8,connectionsPerAccount:16,connections:128,handshakeMs:1e4,invitationMs:3e5,idleMs:720*60*60*1e3,absoluteMs:2160*60*60*1e3},V=M().uuid(),H=M().regex(/^[a-f0-9]{64}$/),ac=M().min(20).max(128),oc=M().min(1).max(128),sc=M().trim().min(1).max(80).regex(/^[^\u0000-\u001f\u007f]+$/),cc=M().url().refine(e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.origin===e&&!t.username&&!t.password}catch{return!1}},`An exact HTTPS origin is required`),lc=I({version:R(3),service:cc,host:V,peer:ac,invitation:H,expires:N().int().positive()}).strict();I({t:R(`connect`),host:V}).strict(),io(`t`,[I({t:R(`registered`),host:V}).strict(),I({t:R(`open`),connection:V,account:oc}).strict(),I({t:R(`ready`),connection:V,account:oc}).strict()]);var uc=I({id:V,peer:ac,account:oc,label:sc,created:N(),lastUsed:N(),expires:N(),status:L([`pending`,`approved`,`revoked`])}),dc=io(`t`,[I({t:R(`status`)}).strict(),I({t:R(`pair`)}).strict(),I({t:R(`devices`)}).strict(),I({t:R(`approve`),id:V}).strict(),I({t:R(`revoke`),id:V}).strict(),I({t:R(`disable`)}).strict()]),fc=I({enabled:P().optional(),connected:P().optional(),host:V.optional(),peer:ac.optional(),invitation:lc.optional(),url:M().url().optional(),devices:F(uc).optional(),error:M().max(256).optional()}).strict();io(`t`,[I({t:R(`hello`),account:oc,label:sc,invitation:H.optional()}).strict(),I({t:R(`pending`),device:uc}).strict(),I({t:R(`admitted`),generation:V,device:V}).strict(),I({t:R(`challenge`),nonce:H,generation:V}).strict(),I({t:R(`participate`),nonce:H,generation:V,resources:F(V).max(ic.requests+1)}).strict(),I({t:R(`request`),id:V,method:L([`GET`,`POST`,`PATCH`]),path:M().max(8192),body:Ya().optional()}).strict(),I({t:R(`response`),id:V,status:N().int().min(100).max(599),body:Ya()}).strict(),I({t:R(`cancel`),id:V}).strict(),I({t:R(`stream`),id:V}).strict(),I({t:R(`terminal`),id:V,message:nc}).strict(),I({t:R(`event`),message:rc}).strict(),I({t:R(`sent`),id:V}).strict(),I({t:R(`admin`),id:V,request:dc}).strict(),I({t:R(`admin-result`),id:V,result:fc}).strict(),I({t:R(`error`),code:L([`rejected`,`expired`,`unavailable`,`protocol_mismatch`]),message:M().max(256)}).strict()]),I({id:V,index:N().int().min(0).max(8192),end:P(),data:M().max(ic.chunkBytes)}).strict(),I({id:V,label:sc,online:P()}),I({push_public_key:M().max(100).optional(),push_encrypted_previews:P().optional(),providers:F(L([`google`,`github`])),protocol:R(3)}),I({user:I({id:oc,name:M(),email:M(),emailVerified:P(),twoFactorEnabled:P()}).nullable(),mfaRequired:P()}),I({label:sc}).strict(),I({host:V,code:H,expires:N()}).strict(),I({code:H}).strict(),I({credential:H}).strict();var pc=I({challenge:H,label:sc,service:cc,app:cc,expires:N().int().positive()}).strict(),mc=I({ready:P()}).strict();I({host:V,account:oc,credential:H}).strict().extend({service:cc,app:cc,enabled:P()}).strict();var hc=I({service:cc.optional(),app:cc.optional(),code:H.optional(),managed:P().default(!0)}).strict(),gc=F(N().int().min(0).max(255)).min(32).max(256);I({host:V,peer:ac,account:oc,service:cc,label:M(),privateKey:gc}).strict();var _c=no([dc,I({t:R(`delete_registration`)}).strict()]);no([_c,I({t:R(`enable`),registration:I({service:cc,app:cc,code:H}).strict().optional()}).strict(),I({t:R(`reset`)}).strict()]),I({service:cc,code:H}).strict();var vc=I({availability:L([`ready`,`not_installed`,`upgrade_required`]),configured:P(),enabled:P(),connected:P(),canDeleteRegistration:P().optional(),supervisor:L([`systemd`,`launchd`]).nullable(),host:V.optional(),peer:ac.optional(),service:cc.optional(),app:cc.optional(),devices:F(uc)});I({profile:Vo}).strict(),I({profile:Vo,request:_c}).strict(),I({profile:Vo,setup:hc}).strict();var yc=M().regex(/^[a-f0-9]{64}$/),bc=M().regex(/^cn_[a-f0-9]{64}$/),xc=M().regex(/^br_[a-f0-9]{64}$/),Sc=M().regex(/^iv_[a-f0-9]{64}$/);L([`browser_rejected`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`]),io(`t`,[I({t:R(`open`),profile:Vo.optional()}).strict(),I({t:R(`renew`),resources:F(yc).max(2048)}).strict(),I({t:R(`close`)}).strict()]);var Cc=I({t:R(`inspection`),port:N().int().min(1).max(65535),version:qo,liveSessions:N().int().nonnegative()});io(`t`,[I({t:R(`authority`),generation:M().uuid(),token:bc.optional(),validForMs:N().int().positive().max(45e3),port:N().int().min(1).max(65535),version:qo}).strict(),Cc,I({t:R(`error`),code:L([`unavailable`,`rejected`,`invalid_control`])}).strict()]),I({invitation:Sc}).strict();var wc=I({credential:xc});I({status:R(`revoked`)}),I({session:M().uuid(),port:N().int().min(1).max(65535)}).extend({path:M().max(8192).default(`/`)});var Tc=I({url:M().url()});I({invitation:Sc}).strict(),I({t:R(`invite`),secret:M().max(128).optional()}).strict(),I({url:M().url()}).strict();var Ec=I({instance:M().uuid(),refreshId:M().uuid().nullable(),upstream:L([`ready`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`])}),Dc=I({id:M(),hash:M(),lastUsed:N()}),Oc=I({hash:M(),browser:M(),prefix:M()});I({version:R(1),origin:M(),target:M(),browsers:F(Dc),proxies:F(Oc)});var kc={imageBytes:4*1024*1024,chunkBytes:64*1024,idleMs:6e4,lifetimeMs:5*6e4};io(`action`,[I({action:R(`start`),upload:M().uuid(),mime:Fs,size:N().int().positive().max(kc.imageBytes)}).strict(),I({action:R(`chunk`),upload:M().uuid(),offset:N().int().nonnegative().max(kc.imageBytes),data:M().min(4).max(4*Math.ceil(kc.chunkBytes/3)).regex(/^[A-Za-z0-9+/]+={0,2}$/).refine(e=>{let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return e.length%4==0&&e.length/4*3-t<=kc.chunkBytes},`Image chunk is too large or malformed`)}).strict(),I({action:R(`finish`),upload:M().uuid()}).strict(),I({action:R(`cancel`),upload:M().uuid()}).strict()]);var Ac=I({received:N().int().nonnegative().max(kc.imageBytes)}),jc=I({id:V,secret:H}).strict(),Mc=I({key:V,iv:M().regex(/^[a-f0-9]{24}$/),ciphertext:M().min(32).max(3072).regex(/^(?:[a-f0-9]{2})+$/)}).strict();I({subscription:I({endpoint:M().max(2048).url().refine(e=>{let t;try{t=new URL(e)}catch{return!1}let n=t.hostname;return t.protocol===`https:`&&!t.username&&!t.password&&!t.port&&!t.hash&&(n===`fcm.googleapis.com`||n===`updates.push.services.mozilla.com`||n===`web.push.apple.com`||n.endsWith(`.notify.windows.com`))},`Unsupported push service`),expirationTime:N().positive().nullable().optional(),keys:I({p256dh:M().regex(/^[A-Za-z0-9_-]{87}={0,1}$/),auth:M().regex(/^[A-Za-z0-9_-]{22}={0,2}$/)}).strict()}).strict().nullable(),preview_key:jc.optional()}).strict().omit({preview_key:!0}).extend({credential:H,device:V}).strict(),I({credential:H,devices:F(V).min(1).max(64),id:V,preview:Mc.optional()}).strict(),I({id:V,host:V,preview:Mc.optional()}).strict(),I({t:R(`notify`),id:V,content:Wo.optional()}).strict(),I({accepted:N().int().nonnegative(),failed:N().int().nonnegative()}).strict(),I({enabled:P()}).strict();var Nc=256*1024,Pc=M().min(1).max(Nc).refine(e=>new TextEncoder().encode(e).length<=Nc,`Source exceeds 256 KiB`),Fc=I({agent:M().min(1).max(100),account:no([M().min(1).max(100),N().int().positive()]).optional(),project:M().min(1).max(200).optional(),worktree:M().min(1).max(4096).optional(),path:M().min(1).max(4096).optional(),title:M().min(1).max(200).optional()}).refine(e=>!!e.path!=!!e.project,`Choose path or project`).refine(e=>!e.path||!e.worktree,`worktree requires project`),Ic=I({runtime_id:Da(),session_id:zo}),Lc=I({prompt:M().min(1).max(128*1024),output_schema:co(M(),Ya()).optional()}),Rc=I({id:Da(),source:Pc,input:Ya().optional(),accounts:co(M(),no([M(),N().int().positive()])).default({}),max_turns:N().int().min(1).max(1e3).default(50),max_agents:N().int().min(1).max(32).default(8),timeout_ms:N().int().min(1e3).max(1440*60*1e3).default(3600*1e3)});I({id:Da(),profile_id:Vo,source_hash:M(),status:L([`running`,`completed`,`failed`,`cancelled`,`interrupted`]),result:Ya().nullable(),error:M().nullable(),created_at:M(),updated_at:M()}),I({events:F(I({sequence:N().int(),run_id:Da(),type:M(),data:Ya(),created_at:M()}))});var U=io(`op`,[I({op:R(`spawn`),options:Fc}),I({op:R(`attach`),reference:M().min(1).max(100)}),I({op:R(`ask`),handle:Ic,request:Lc}),I({op:R(`stop`),handle:Ic})]);io(`type`,[I({type:R(`operation`),id:N().int(),operation:U}),I({type:R(`finished`),result:Ya().optional(),error:M().max(8192).optional()})]),io(`type`,[I({type:R(`start`),source:Pc,input:Ya().optional()}),I({type:R(`reply`),id:N().int(),value:Ya().optional(),error:M().optional()})]),I({profile:I({id:Vo,name:M()}),projects:F(I({id:M(),name:M(),path:M()})),accounts:F(I({id:N(),label:M(),agent:M(),logged_in:P()})),agents:F(I({id:M(),scripted_turns:P()}))}),I({jsonrpc:R(`2.0`),id:no([M(),N()]).optional(),method:M(),params:co(M(),Ya()).optional()}),I({name:M(),arguments:Ya().optional()});var zc=Rc,Bc=I({id:Da()}),Vc=Bc.extend({after:N().int().nonnegative().default(0)});[[`puddlang_context`,`List this host profile, projects, accounts and supported agents.`,I({}).strict(),!0],[`puddlang_run`,`Execute a trusted single-file TypeScript programme on the host. Imports: puddlang (spawn, attach, input, z), zod, node: built-ins. Returns immediately with a durable run id; use status/events. Supply a fresh UUID id, or reuse it with identical input to recover an uncertain submission. spawn({agent:"codex",project:"name",account:"label"}); await agent.ask("task"); export default result. Supports structured ask({prompt,input,schema:z.object(...)}) and agent.stop().`,zc,!1],[`puddlang_status`,`Read a run and its final default export, if finished.`,Bc,!0],[`puddlang_events`,`Read up to 100 events after a sequence; paginate until empty.`,Vc,!0],[`puddlang_cancel`,`Cancel a run, interrupt its pending asks, and stop agents it created. Attached agents are retained.`,Bc,!1]].map(([e,t,n,r])=>({name:e,description:t,inputSchema:Zi(n,{io:`input`}),annotations:{readOnlyHint:r,destructiveHint:!r,idempotentHint:!0,openWorldHint:!r}}));var Hc=null;function Uc(){return Hc}function Wc(e){return e}function Gc(e){let t=new Set;return{get:()=>localStorage.getItem(Wc(e)),set(n){n===null?localStorage.removeItem(Wc(e)):localStorage.setItem(Wc(e),n);for(let e of t)e()},subscribe(e){return t.add(e),()=>t.delete(e)}}}var Kc=Gc(`puddle.browser-authorisation`);async function qc(){localStorage.removeItem(`puddle.token`);let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`invite`);if(e.has(`invite`)||e.has(`token`)){let e=new URL(window.location.href);e.hash=``,history.replaceState(null,``,e)}if(t)try{let e=await fetch(`/cockpit/bootstrap`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({invitation:t})});if(!e.ok)return;Kc.set(wc.parse(await e.json()).credential)}catch{}}function Jc(){Kc.set(null)}var Yc=e(n(),1),Xc=[{id:`system`,label:`System`},{id:`rangefinder`,label:`Rangefinder`},{id:`drafting`,label:`Drafting`},{id:`invert`,label:`Invert`}],Zc=`system`;function Qc(e){return Xc.some(t=>t.id===e)?e:Zc}var $c={uiFontSize:16,cursorPackage:Zc,terminalFontSize:13,editorFontSize:14,density:`compact`,terminalScrollback:2e4,editorTabSize:2,editorWordWrap:!1,editorLinkSshHost:``,projectBasedLayout:!0,showAllProjectSessions:!0},el=`puddle.client-settings`,tl=new Set,W=null;function nl(e){let t={...e};return t.projectBasedLayout===void 0&&t.showAllProjectSessions!==void 0&&(t.projectBasedLayout=!t.showAllProjectSessions),t.showAllProjectSessions===void 0&&t.projectBasedLayout!==void 0&&(t.showAllProjectSessions=!t.projectBasedLayout),t}function rl(e){return e.terminalScrollback===5e3?{...e,terminalScrollback:$c.terminalScrollback}:e}function il(){if(W)return W;let e={};try{e=JSON.parse(localStorage.getItem(el)??`{}`)}catch{}let t={...$c,...rl(nl(e))};return W={...t,cursorPackage:Qc(t.cursorPackage)},W}function al(e){document.documentElement.style.setProperty(`--ui-font-size`,`${e.uiFontSize}px`),document.documentElement.dataset.density=e.density,document.documentElement.dataset.cursorPackage=e.cursorPackage}function ol(){return il()}function sl(e){let t={...il(),...e};W={...t,cursorPackage:Qc(t.cursorPackage)},localStorage.setItem(el,JSON.stringify(W)),al(W);for(let e of tl)e()}function G(){al(il())}function cl(){return(0,Yc.useSyncExternalStore)(e=>(tl.add(e),()=>tl.delete(e)),()=>il())}function ll(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function ul(e){return e.replace(/[%#? ]/g,e=>encodeURIComponent(e))}function dl(e,t,n){let r=ll(t);return n?`${e}://vscode-remote/ssh-remote+${ul(n)}${r}`:`${e}://file${r}`}function fl(e,t){return e.trim()||t||null}var pl=Gc(`puddle.host`);function ml(){return fl(ol().editorLinkSshHost,pl.get())}function hl(e){return new URLSearchParams(e).get(`host`)?.trim()||null}function gl(e,t,n){return hl(e)||(/[#&](?:invite|token)=/.test(t)?null:n)}function _l(){let e=gl(window.location.search,window.location.hash,pl.get());if(pl.set(e),hl(window.location.search)!==null){let e=new URL(window.location.href);e.searchParams.delete(`host`),history.replaceState(null,``,e)}}var vl=[`dark`,`light`],yl=`puddle.theme`,bl=`system`,xl=`dark`,Sl=new Set;function Cl(){return window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function wl(e){return e===`system`?Cl():e}function Tl(){let e=localStorage.getItem(yl);return e===`system`||vl.includes(e??``)?e:bl}function El(){let e=document.documentElement.dataset.theme;return vl.includes(e??``)?e:xl}function Dl(e){localStorage.setItem(yl,e);let t=wl(e);document.documentElement.dataset.theme=t;for(let e of Sl)e(t);return t}function Ol(){Dl(Tl()),window.matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{Tl()===`system`&&Dl(`system`)})}function kl(e){return Sl.add(e),()=>Sl.delete(e)}function Al(e){let t=/^#([0-9a-fA-F]{3,4})$/.exec(e);return t?.[1]?`#${[...t[1]].map(e=>e+e).join(``)}`:e}function jl(){let e=getComputedStyle(document.documentElement);return t=>Al(e.getPropertyValue(t).trim())}var Ml=4.5;function Nl(e){return{background:e(`--bg-base`),foreground:e(`--text-primary`),cursor:e(`--accent`),cursorAccent:e(`--bg-base`),selectionBackground:e(`--selection`),black:e(`--ansi-black`),red:e(`--ansi-red`),green:e(`--ansi-green`),yellow:e(`--ansi-yellow`),blue:e(`--ansi-blue`),magenta:e(`--ansi-magenta`),cyan:e(`--ansi-cyan`),white:e(`--ansi-white`),brightBlack:e(`--ansi-bright-black`),brightRed:e(`--ansi-bright-red`),brightGreen:e(`--ansi-bright-green`),brightYellow:e(`--ansi-bright-yellow`),brightBlue:e(`--ansi-bright-blue`),brightMagenta:e(`--ansi-bright-magenta`),brightCyan:e(`--ansi-bright-cyan`),brightWhite:e(`--ansi-bright-white`)}}function Pl(){return Nl(jl())}function Fl(e){return{theme:Nl(e),minimumContrastRatio:Ml}}function Il(){return Fl(jl())}function Ll(e){return e.replace(`#`,``)}function Rl(e,t){return{base:t===`light`?`vs`:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:Ll(e(`--text-muted`)),fontStyle:`italic`},{token:`string`,foreground:Ll(e(`--ansi-green`))},{token:`number`,foreground:Ll(e(`--ansi-yellow`))},{token:`keyword`,foreground:Ll(e(`--ansi-blue`))},{token:`type`,foreground:Ll(e(`--ansi-cyan`))},{token:`function`,foreground:Ll(e(`--ansi-magenta`))}],colors:{"editor.background":e(`--bg-base`),"editor.foreground":e(`--text-primary`),"editor.selectionBackground":e(`--selection`),"editor.lineHighlightBackground":e(`--bg-surface`),"editorCursor.foreground":e(`--accent`),"editorLineNumber.foreground":e(`--text-muted`),"editorLineNumber.activeForeground":e(`--text-secondary`),"editorWidget.background":e(`--bg-elevated`),"editorWidget.border":e(`--border`),focusBorder:e(`--focus-ring`),"diffEditor.insertedTextBackground":e(`--diff-added`),"diffEditor.removedTextBackground":e(`--diff-removed`)}}}function K(){return Rl(jl(),El())}var q=t((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})),J=t(((e,t)=>{t.exports=q()})),Y=J(),X=`modulepreload`,zl=function(e){return`/`+e},Bl={},Vl=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),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?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=zl(t,n),t=s(t),t in Bl)return;Bl[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:X,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}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)})};Ol(),G(),_l(),qc().then(async()=>{let{App:e}=await Vl(async()=>{let{App:e}=await import(`./App-XpQccO6u.js`);return{App:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));(0,Fo.createRoot)(document.getElementById(`root`)).render((0,Y.jsx)(e,{}))});export{qo as $,ic as A,Ps as B,kc as C,vc as D,Tc as E,Js as F,xs as G,Os as H,Rs as I,Zo as J,Xo as K,zs as L,ec as M,Qs as N,pc as O,Us as P,es as Q,Fs as R,Uc as S,Ec as T,Ms as U,Es as V,bs as W,ts as X,$o as Y,ns as Z,Xc as _,El as a,M as at,Gc as b,Tl as c,dl as d,Go as et,ml as f,cl as g,sl as h,jl as i,F as it,fc as j,mc as k,Pl as l,ol as m,J as n,Uo as nt,K as o,o as ot,pl as p,Qo as q,Dl as r,Io as rt,kl as s,Vl as t,Ho as tt,Il as u,Jc as v,Ac as w,Wc as x,Kc as y,Is as z};
|
|
82
|
+
Then proceed with the task below (or await instructions if none is given).`,Qo=`[puddle] You are joining an existing branch and worktree that other agents may be working in concurrently. Files can change underneath you, so re-check the working tree before you act, and avoid disruptive git operations (resetting, force-pushing, or deleting the branch) that would disrupt work already in progress by others.`,$o=`This session was interrupted (daemon or machine restart). Processes you started are gone; re-verify your environment before continuing.`,es=[[`name`,`the resolved display name: user rename, else agent name, else sequence, else id`],[`title`,`the user rename override only (empty when unset)`],[`agentName`,`the agent's own session name (empty when the agent has not named it)`],[`sequence`,`the terminal-title name the process set (empty when it set none)`],[`branch`,`the git branch`],[`cwd`,`the worktree directory's name`],[`id`,`the first 8 characters of the session id`],[`status`,`the session status (running, waiting_input, …)`],[`agent`,`the agent type (empty for terminal sessions)`],[`separator`,`an em dash that appears only between two non-empty neighbours`]],ts="${name}",ns=[`navy`,`gold`,`blue`,`green`,`red`,`violet`,`cyan`];I({id:Vo,name:Yo,branch_prefix:M(),icon:M().nullable().default(null),icon_colour:M().nullable().default(null),created_at:Lo}),I({name:Yo,branch_prefix:M().max(64).optional()}),I({name:Yo.optional(),branch_prefix:M().max(64).optional(),icon:M().max(64).nullable().optional(),icon_colour:M().max(32).nullable().optional()});var rs=eo({baseBranch:M().optional(),separateBranch:P().optional(),separateWorktree:P().optional()}),is=eo({agent:rs.optional(),terminal:rs.optional()});eo({allowSkipPermissions:P().default(!1),captureSessionEnv:P().default(!0),terminalAppShortcuts:P().default(!0),onboardingTemplate:M().optional(),concurrentTemplate:M().optional(),restartTemplate:M().optional(),tabTitleTemplate:M().optional(),projectOrder:F(M()).optional(),sessionDefaults:is.optional(),hotkeys:co(M(),M()).optional()}),co(M(),Ya());var as=M().regex(/^untitled-\d+\.md$/);I({name:as}),I({name:as,content:M(),mtime_ms:N()}),I({content:M()}),I({mtime_ms:N()}),I({id:Ro,profile_id:Vo,agent_type:M(),label:M(),config_dir:M(),skip_permissions_default:P(),logged_in:P(),created_at:Lo}),I({profile_id:Vo,agent_type:M().min(1),label:Yo,skip_permissions_default:P().optional(),import_dir:M().min(1).optional()}),I({label:Yo.optional(),skip_permissions_default:P().optional()}),I({stream:M(),term:M(),hint:M().optional()}),eo({account_id:Ro,logged_in:P(),session_count:N().int().nonnegative(),active_session_count:N().int().nonnegative(),last_activity_at:Lo.nullable(),agent_usage:I({input_tokens:N().int().nonnegative(),output_tokens:N().int().nonnegative(),cache_read_input_tokens:N().int().nonnegative(),cache_creation_input_tokens:N().int().nonnegative(),message_count:N().int().nonnegative()}).nullable(),live_usage:I({captured_at:Lo,context_used_percentage:N().nullable(),total_cost_usd:N().nullable(),model:M().nullable()}).nullable(),subscription:I({windows:F(I({key:M(),label:M(),used_percentage:N(),resets:M().nullable()}))}).nullable()}),I({id:M(),display_name:M(),capabilities:I({resume:P(),skip_permissions:P()}),binary:M().optional(),available:P().optional()}),I({id:Ro,path:M(),default_base_branch:M(),onboarding_notes:M().nullable(),fetch_enabled:P(),last_fetched_at:Lo.nullable()}).extend({orphan_worktrees:F(M())}),I({path:M().min(1),default_base_branch:M().optional(),onboarding_notes:M().nullable().optional(),fetch_enabled:P().optional()}),I({branches:F(I({name:M(),is_session:P(),session_title:M().nullable()}))});var os=I({path:M(),branch:M().nullable(),is_primary:P(),dirty:P().optional(),local_only:P().optional()}),ss=I({name:M(),local_only:P()});I({worktrees:F(os),orphan_branches:F(ss)}),I({default_base_branch:M().optional(),onboarding_notes:M().nullable().optional(),fetch_enabled:P().optional()});var cs=L([`starting`,`running`,`waiting_input`,`exited`,`interrupted`,`archived`]),ls=L([`agent`,`terminal`]),us=I({id:zo,project_id:Bo,account_id:Ro.nullable(),worktree_path:M(),base_branch:M(),branch:M(),separate_branch:P(),kind:ls,agent_type:M().nullable(),detected_agent_type:M().nullable().optional(),agent_session_ref:M().nullable(),conversation_id:Ro.nullable().optional(),parent_conversation_id:Ro.nullable().optional(),title:M().nullable(),agent_title:M().nullable().optional(),conversation_missing:P().optional(),branch_owner:P().optional(),native_sync:L([`pending`,`full`,`fallback`]).optional(),osc_title:M().nullable().optional(),status:cs,cwd:M().nullable().optional(),skip_permissions:P(),created_at:Lo,updated_at:Lo,last_activity_at:Lo.nullable(),worktree_missing:P().optional(),stale_running:P().optional(),git_summary:I({ahead:N().int().nonnegative(),behind:N().int().nonnegative(),dirty_files:N().int().nonnegative()}).nullable().optional()});I({project_id:Bo,account_id:Ro.optional(),kind:ls.optional(),base_branch:M().min(1).optional(),branch:M().min(1).max(200).optional(),separate_branch:P().optional(),separate_worktree:P().optional(),join_worktree:M().optional(),cwd:M().optional(),title:M().min(1).max(200).optional(),prompt:M().optional(),skip_permissions:P().optional()}),I({title:M().max(200)}),I({account_id:Ro}),I({account_id:Ro}),I({vars:F(I({name:M(),bytes:N().int().nonnegative(),value:M().optional()}))}),I({cleared:N().int().nonnegative()}),I({force:P().default(!1),delete_branch:P().default(!1)});var ds=M().min(1).max(5),fs=I({id:Bo,profile_id:Vo,repo_id:Ro,name:M(),abbrev:ds.nullable().default(null),archived:P().default(!1),created_at:Lo,updated_at:Lo});I({profile_id:Vo,repo_id:Ro,name:M().min(1).max(100),abbrev:ds.optional()}),I({name:M().min(1).max(100).optional(),abbrev:ds.optional(),archived:P().optional()}),I({project:fs,sessions:F(us)});var ps=L([`project`,`profile`]);I({id:Ro,profile_id:Vo,scope:ps,project_id:Bo.nullable(),title:M().nullable(),body:M(),tags:F(M()),agent_type:M().nullable(),position:N(),created_at:Lo,updated_at:Lo}),I({profile_id:Vo,scope:ps,project_id:Bo.optional(),title:M().max(200).optional(),body:M().min(1),tags:F(M()).optional(),agent_type:M().optional()}),I({scope:ps.optional(),project_id:Bo.nullable().optional(),title:M().max(200).nullable().optional(),body:M().min(1).optional(),tags:F(M()).optional(),agent_type:M().nullable().optional(),position:N().optional()});var ms=L([`on_demand`,`eager`]),hs=I({session:zo,path:M().min(1),root:M().min(1).optional()}),gs=M().regex(/^[a-z][a-z0-9_-]*$/);I({providers:F(I({id:gs,display_name:M().min(1),extensions:F(M().regex(/^[a-z0-9]+$/)).min(1),input_extensions:F(M().regex(/^[a-z0-9]+$/)).min(1),available:P(),executor:M().min(1).nullable(),eager:P()}))});var _s=I({source:hs,provider:gs.optional(),profile_id:Vo.optional(),project_id:Bo.optional()}),vs=I({role:M().min(1),media_type:M().min(1),file:hs}),ys=I({source:hs,severity:L([`error`,`warning`,`info`]),message:M().min(1),line:N().int().positive(),column:N().int().positive().optional(),end_line:N().int().positive().optional(),end_column:N().int().positive().optional()}),bs=I({source:hs.optional(),output:M().optional(),diagnostics:F(ys).optional()}),xs=bs.extend({message:M().min(1)}),Ss=I({provider:gs,executor:M().min(1),revision:N().int().nonnegative(),source:hs,artifacts:F(vs),navigation:I({kind:M().min(1)}).optional()});_s.extend({mode:ms}),I({provider:gs,mode:ms,state:L([`idle`,`running`,`succeeded`,`failed`]),revision:N().int().nonnegative(),result:Ss.nullable(),error:xs.nullable()});var Cs=I({placeholder:M().regex(/^\{\{[a-z][a-z0-9_]*\}\}$/),description:M().min(1)}),ws=I({mode:ms,run_when:L([`when_clicked`,`upon_file_change`]),default_command:M().min(1).nullable(),override_command:M().min(1).nullable()}),Ts=_s.extend({profile_id:Vo,project_id:Bo});I({provider:gs,display_name:M().min(1),file_type:M().regex(/^[a-z0-9][a-z0-9_-]*$/),file_path:M().min(1),variables:F(Cs),commands:F(ws).min(1)}),Ts.extend({mode:ms,command:M().trim().min(1).max(16384).nullable()});var Es=`00000000-0000-0000-0000-000000000000`,Ds=I({session:zo,path:M(),kind:L([`file`,`diff`,`commit`,`external`,`untitled`]).optional(),sha:M().optional(),git_area:L([`staged`,`unstaged`]).optional(),root:M().optional(),view:L([`source`,`preview`,`linked`,`locked`]).optional(),compile_mode:ms.optional(),generated_by:gs.optional()}),Os=io(`type`,[I({type:R(`editor`),tab:Ds}),I({type:R(`terminal`),session:zo})]),ks=I({kind:R(`leaf`),id:M(),tabs:F(Os).default([]),activeKey:M().nullable().default(null),previewKey:M().nullable().default(null)}),As=jo(()=>io(`kind`,[ks,I({kind:R(`split`),id:M(),direction:L([`row`,`col`]),children:F(As),sizes:F(N())})])),js=eo({layout_tree:As.nullable().default(null),active_session:zo.nullable().default(null),layout_ref:Ro.nullable().default(null)}),Ms=eo({session_tabs:F(zo).default([]),active_session:zo.nullable().default(null),editor_tabs:F(Ds).default([]),layout:eo({}).default({}),explorer_pin:zo.nullable().default(null),active_editor_tab:Ds.nullable().default(null),explorer_open:P().default(!0),sidebar_mode:L([`files`,`diff`,`history`,`changes`,`search`,`worktrees`]).default(`files`),sidebar_collapsed:P().default(!1),sessions_collapsed:P().default(!1),right_panel:L([`sessions`,`scratchpad`]).optional(),session_order:F(zo).default([]),layout_tree:As.nullable().default(null),layout_mode:L([`profile`,`project`]).optional(),project_layouts:co(M(),js).default({}),layout_ref:Ro.nullable().default(null)});I({ui_state:Ms}),I({ui_state:Ms,updated_at:Lo});var Ns=L([`project`,`profile`]);I({id:Ro,profile_id:Vo,scope:Ns,project_id:Bo.nullable(),name:M(),layout_tree:As.nullable(),active_session:zo.nullable(),created_at:Lo,updated_at:Lo}),I({profile_id:Vo,scope:Ns,project_id:Bo.optional(),name:M().min(1).max(200),layout_tree:As.nullable(),active_session:zo.nullable().optional()}),I({name:M().min(1).max(200).optional(),layout_tree:As.nullable().optional(),active_session:zo.nullable().optional()}),hs.extend({root:M().min(1),page:N().int().positive(),x:N().finite().nonnegative(),y:N().finite().nonnegative()});var Ps=hs.extend({line:N().int().positive(),column:N().int().nonnegative().optional()}),Fs=L([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);I({mime:Fs,data:M().min(1)});var Is=I({path:M()});I({path:M(),line:N().int().nullable(),kind:L([`file`,`dir`]).optional(),relative_path:M().optional(),root:M().optional()});var Ls=I({name:M(),type:L([`file`,`dir`,`symlink`]),size:N().int().nonnegative().nullable(),symlink:P().default(!1)});I({path:M(),entries:F(Ls)});var Rs=I({path:M(),content:M().nullable(),binary:P(),size:N().int().nonnegative(),mtime_ms:N()}),zs=I({mime:M().min(1).max(128),data:M().max(4*2796203)});I({content:M(),expected_mtime_ms:N().optional()}),I({path:M(),mtime_ms:N(),size:N().int().nonnegative()}),I({files:F(I({path:M(),size:N().int().nonnegative()}))}),I({path:M().min(1),kind:L([`file`,`dir`])}),I({from:M().min(1),to:M().min(1)}),I({from:M().min(1),to:M().min(1)}),I({operation:L([`copy`,`move`]),source:I({session_id:zo,root:M().optional()}),from:M().min(1),to:M().min(1)}),I({path:M().min(1)}),I({ok:R(!0),path:M()});var Bs=L([`added`,`modified`,`deleted`,`renamed`]),Vs=L([`staged`,`unstaged`]),Hs=I({path:M(),status:Bs,old_path:M().nullable()}),Us=I({against:M(),base_ref:M().nullable(),entries:F(Hs),area:Vs.optional()}),Ws=L([`untracked`,`modified`,`added`,`deleted`,`renamed`,`conflicted`,`ignored`]),Gs=I({path:M(),status:Ws});I({entries:F(Gs)});var Ks=I({path:M(),status:Ws.exclude([`ignored`]),old_path:M().nullable()});I({repositories:F(I({root:M(),relative_path:M(),name:M(),owning:P(),submodule:P(),initialised:P(),head:M().nullable(),branch:M().nullable(),detached:P(),upstream:M().nullable(),ahead:N().int().nonnegative(),behind:N().int().nonnegative(),has_remote:P(),staged:F(Ks),unstaged:F(Ks),conflicts:F(Ks)})),entries:F(Gs)});var qs=I({repository:M().min(1)});qs.extend({paths:F(M().min(1)).min(1)}),qs.extend({message:M().trim().min(1),stage_all:P().optional()}),qs.extend({set_upstream:P().optional()}),I({ok:R(!0),sha:M().optional()}),I({path:M(),content:M().nullable(),binary:P(),exists:P()}),I({path:M(),repository:M().nullable(),repository_path:M().nullable(),head:M().nullable(),content:M().nullable(),binary:P(),exists:P(),tracked:P(),ignored:P()});var Js=I({path:M(),ref:M(),content:M().nullable(),binary:P()}),Ys=I({sha:M(),subject:M(),author_name:M(),author_email:M(),authored_at:Lo,parents:F(M()).optional()});I({commits:F(Ys),has_more:P()}),I({commit:Ys.extend({body:M()}),parents:F(M()),files:F(Hs)});var Xs=I({line:N().int().positive(),text:M()}),Zs=I({path:M(),matches:F(Xs)});I({query:M(),files:F(M()),content:F(Zs),truncated:P()}),I({ports:F(I({port:N().int().min(1).max(65535),pid:N().int(),command:M(),address:M()})),scanned_at:Lo}),I({refreshId:M().uuid()}).strict();var Qs=I({status:R(`refreshing`),refreshId:M().uuid(),instance:M().uuid()}),$s=M().regex(/^(agent|shell-[0-9]+)$/),ec=`home`,tc={cols:N().int().min(2).max(1e3),rows:N().int().min(2).max(500)},nc=io(`t`,[I({t:R(`auth`),token:M().max(128),resource:M().regex(/^[a-f0-9]{64}$/).optional()}),I({t:R(`attach`),session:M(),term:$s,...tc}),I({t:R(`stdin`),session:M(),term:$s,data:M()}),I({t:R(`resize`),session:M(),term:$s,...tc}),I({t:R(`detach`),session:M(),term:$s}),I({t:R(`spawn-shell`),session:M()}),I({t:R(`kill-shell`),session:M(),term:$s}),I({t:R(`subscribe-status`)}),I({t:R(`theme`),fg:M().regex(/^#[0-9a-fA-F]{6}$/),bg:M().regex(/^#[0-9a-fA-F]{6}$/)})]),rc=io(`t`,[Ko,I({t:R(`authenticated`)}),I({t:R(`shell-spawned`),session:M(),term:M()}),I({t:R(`replay`),session:M(),term:M(),data:M()}),I({t:R(`output`),session:M(),term:M(),data:M()}),I({t:R(`status`),session:M(),status:cs,last_activity_at:M().nullable()}),I({t:R(`renamed`),session:M(),title:M().nullable(),agent_title:M().nullable().optional(),osc_title:M().nullable().optional()}),I({t:R(`exit`),session:M(),term:M(),code:N()}),I({t:R(`notice`),level:L([`error`,`warning`]),title:M(),detail:M().optional(),session:M().optional(),term:M().optional()}),I({t:R(`account`),account_id:N(),profile_id:M(),logged_in:P()}),I({t:R(`session-switched`),source_session:M(),target_session:M(),target_project:M(),cause:L([`clear`,`resume`,`fork`]),outcome:L([`rebound`,`focused-existing`])}),I({t:R(`sessions-changed`),project_ids:F(M())}),I({t:R(`error`),message:M()})]),ic={chunkBytes:32*1024,frameBytes:48*1024,requestBytes:256*1024,responseBytes:16*1024*1024,queueBytes:1024*1024,relayQueueBytes:64*1024*1024,requests:8,connectionsPerHost:8,connectionsPerAccount:16,connections:128,handshakeMs:1e4,invitationMs:3e5,idleMs:720*60*60*1e3,absoluteMs:2160*60*60*1e3},V=M().uuid(),H=M().regex(/^[a-f0-9]{64}$/),ac=M().min(20).max(128),oc=M().min(1).max(128),sc=M().trim().min(1).max(80).regex(/^[^\u0000-\u001f\u007f]+$/),cc=M().url().refine(e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.origin===e&&!t.username&&!t.password}catch{return!1}},`An exact HTTPS origin is required`),lc=I({version:R(3),service:cc,host:V,peer:ac,invitation:H,expires:N().int().positive()}).strict();I({t:R(`connect`),host:V}).strict(),io(`t`,[I({t:R(`registered`),host:V}).strict(),I({t:R(`open`),connection:V,account:oc}).strict(),I({t:R(`ready`),connection:V,account:oc}).strict()]);var uc=I({id:V,peer:ac,account:oc,label:sc,created:N(),lastUsed:N(),expires:N(),status:L([`pending`,`approved`,`revoked`])}),dc=io(`t`,[I({t:R(`status`)}).strict(),I({t:R(`pair`)}).strict(),I({t:R(`devices`)}).strict(),I({t:R(`approve`),id:V}).strict(),I({t:R(`revoke`),id:V}).strict(),I({t:R(`disable`)}).strict()]),fc=I({enabled:P().optional(),connected:P().optional(),host:V.optional(),peer:ac.optional(),invitation:lc.optional(),url:M().url().optional(),devices:F(uc).optional(),error:M().max(256).optional()}).strict();io(`t`,[I({t:R(`hello`),account:oc,label:sc,invitation:H.optional()}).strict(),I({t:R(`pending`),device:uc}).strict(),I({t:R(`admitted`),generation:V,device:V}).strict(),I({t:R(`challenge`),nonce:H,generation:V}).strict(),I({t:R(`participate`),nonce:H,generation:V,resources:F(V).max(ic.requests+1)}).strict(),I({t:R(`request`),id:V,method:L([`GET`,`POST`,`PATCH`]),path:M().max(8192),body:Ya().optional()}).strict(),I({t:R(`response`),id:V,status:N().int().min(100).max(599),body:Ya()}).strict(),I({t:R(`cancel`),id:V}).strict(),I({t:R(`stream`),id:V}).strict(),I({t:R(`terminal`),id:V,message:nc}).strict(),I({t:R(`event`),message:rc}).strict(),I({t:R(`sent`),id:V}).strict(),I({t:R(`admin`),id:V,request:dc}).strict(),I({t:R(`admin-result`),id:V,result:fc}).strict(),I({t:R(`error`),code:L([`rejected`,`expired`,`unavailable`,`protocol_mismatch`]),message:M().max(256)}).strict()]),I({id:V,index:N().int().min(0).max(8192),end:P(),data:M().max(ic.chunkBytes)}).strict(),I({id:V,label:sc,online:P()}),I({push_public_key:M().max(100).optional(),push_encrypted_previews:P().optional(),providers:F(L([`google`,`github`])),protocol:R(3)}),I({user:I({id:oc,name:M(),email:M(),emailVerified:P(),twoFactorEnabled:P()}).nullable(),mfaRequired:P()}),I({label:sc}).strict(),I({host:V,code:H,expires:N()}).strict(),I({code:H}).strict(),I({credential:H}).strict();var pc=I({challenge:H,label:sc,service:cc,app:cc,expires:N().int().positive()}).strict(),mc=I({ready:P()}).strict();I({host:V,account:oc,credential:H}).strict().extend({service:cc,app:cc,enabled:P()}).strict();var hc=I({service:cc.optional(),app:cc.optional(),code:H.optional(),managed:P().default(!0)}).strict(),gc=F(N().int().min(0).max(255)).min(32).max(256);I({host:V,peer:ac,account:oc,service:cc,label:M(),privateKey:gc}).strict();var _c=no([dc,I({t:R(`delete_registration`)}).strict()]);no([_c,I({t:R(`enable`),registration:I({service:cc,app:cc,code:H}).strict().optional()}).strict(),I({t:R(`reset`)}).strict()]),I({service:cc,code:H}).strict();var vc=I({availability:L([`ready`,`not_installed`,`upgrade_required`]),configured:P(),enabled:P(),connected:P(),canDeleteRegistration:P().optional(),supervisor:L([`systemd`,`launchd`]).nullable(),host:V.optional(),peer:ac.optional(),service:cc.optional(),app:cc.optional(),devices:F(uc)});I({profile:Vo}).strict(),I({profile:Vo,request:_c}).strict(),I({profile:Vo,setup:hc}).strict();var yc=M().regex(/^[a-f0-9]{64}$/),bc=M().regex(/^cn_[a-f0-9]{64}$/),xc=M().regex(/^br_[a-f0-9]{64}$/),Sc=M().regex(/^iv_[a-f0-9]{64}$/);L([`browser_rejected`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`]),io(`t`,[I({t:R(`open`),profile:Vo.optional()}).strict(),I({t:R(`renew`),resources:F(yc).max(2048)}).strict(),I({t:R(`close`)}).strict()]);var Cc=I({t:R(`inspection`),port:N().int().min(1).max(65535),version:qo,liveSessions:N().int().nonnegative()});io(`t`,[I({t:R(`authority`),generation:M().uuid(),token:bc.optional(),validForMs:N().int().positive().max(45e3),port:N().int().min(1).max(65535),version:qo}).strict(),Cc,I({t:R(`error`),code:L([`unavailable`,`rejected`,`invalid_control`])}).strict()]),I({invitation:Sc}).strict();var wc=I({credential:xc});I({status:R(`revoked`)}),I({session:M().uuid(),port:N().int().min(1).max(65535)}).extend({path:M().max(8192).default(`/`)});var Tc=I({url:M().url()});I({invitation:Sc}).strict(),I({t:R(`invite`),secret:M().max(128).optional()}).strict(),I({url:M().url()}).strict();var Ec=I({instance:M().uuid(),refreshId:M().uuid().nullable(),upstream:L([`ready`,`upstream_expired`,`upstream_unavailable`,`protocol_mismatch`])}),Dc=I({id:M(),hash:M(),lastUsed:N()}),Oc=I({hash:M(),browser:M(),prefix:M()});I({version:R(1),origin:M(),target:M(),browsers:F(Dc),proxies:F(Oc)});var kc={imageBytes:4*1024*1024,chunkBytes:64*1024,idleMs:6e4,lifetimeMs:5*6e4};io(`action`,[I({action:R(`start`),upload:M().uuid(),mime:Fs,size:N().int().positive().max(kc.imageBytes)}).strict(),I({action:R(`chunk`),upload:M().uuid(),offset:N().int().nonnegative().max(kc.imageBytes),data:M().min(4).max(4*Math.ceil(kc.chunkBytes/3)).regex(/^[A-Za-z0-9+/]+={0,2}$/).refine(e=>{let t=e.endsWith(`==`)?2:+!!e.endsWith(`=`);return e.length%4==0&&e.length/4*3-t<=kc.chunkBytes},`Image chunk is too large or malformed`)}).strict(),I({action:R(`finish`),upload:M().uuid()}).strict(),I({action:R(`cancel`),upload:M().uuid()}).strict()]);var Ac=I({received:N().int().nonnegative().max(kc.imageBytes)}),jc=I({id:V,secret:H}).strict(),Mc=I({key:V,iv:M().regex(/^[a-f0-9]{24}$/),ciphertext:M().min(32).max(3072).regex(/^(?:[a-f0-9]{2})+$/)}).strict();I({subscription:I({endpoint:M().max(2048).url().refine(e=>{let t;try{t=new URL(e)}catch{return!1}let n=t.hostname;return t.protocol===`https:`&&!t.username&&!t.password&&!t.port&&!t.hash&&(n===`fcm.googleapis.com`||n===`updates.push.services.mozilla.com`||n===`web.push.apple.com`||n.endsWith(`.notify.windows.com`))},`Unsupported push service`),expirationTime:N().positive().nullable().optional(),keys:I({p256dh:M().regex(/^[A-Za-z0-9_-]{87}={0,1}$/),auth:M().regex(/^[A-Za-z0-9_-]{22}={0,2}$/)}).strict()}).strict().nullable(),preview_key:jc.optional()}).strict().omit({preview_key:!0}).extend({credential:H,device:V}).strict(),I({credential:H,devices:F(V).min(1).max(64),id:V,preview:Mc.optional()}).strict(),I({id:V,host:V,preview:Mc.optional()}).strict(),I({t:R(`notify`),id:V,content:Wo.optional()}).strict(),I({accepted:N().int().nonnegative(),failed:N().int().nonnegative()}).strict(),I({enabled:P()}).strict();var Nc=256*1024,Pc=M().min(1).max(Nc).refine(e=>new TextEncoder().encode(e).length<=Nc,`Source exceeds 256 KiB`),Fc=I({agent:M().min(1).max(100),account:no([M().min(1).max(100),N().int().positive()]).optional(),project:M().min(1).max(200).optional(),worktree:M().min(1).max(4096).optional(),path:M().min(1).max(4096).optional(),title:M().min(1).max(200).optional()}).refine(e=>!!e.path!=!!e.project,`Choose path or project`).refine(e=>!e.path||!e.worktree,`worktree requires project`),Ic=I({runtime_id:Da(),session_id:zo}),Lc=I({prompt:M().min(1).max(128*1024),output_schema:co(M(),Ya()).optional()}),Rc=I({id:Da(),source:Pc,input:Ya().optional(),accounts:co(M(),no([M(),N().int().positive()])).default({}),max_turns:N().int().min(1).max(1e3).default(50),max_agents:N().int().min(1).max(32).default(8),timeout_ms:N().int().min(1e3).max(1440*60*1e3).default(3600*1e3)});I({id:Da(),profile_id:Vo,source_hash:M(),status:L([`running`,`completed`,`failed`,`cancelled`,`interrupted`]),result:Ya().nullable(),error:M().nullable(),created_at:M(),updated_at:M()}),I({events:F(I({sequence:N().int(),run_id:Da(),type:M(),data:Ya(),created_at:M()}))});var U=io(`op`,[I({op:R(`spawn`),options:Fc}),I({op:R(`attach`),reference:M().min(1).max(100)}),I({op:R(`ask`),handle:Ic,request:Lc}),I({op:R(`stop`),handle:Ic})]);io(`type`,[I({type:R(`operation`),id:N().int(),operation:U}),I({type:R(`finished`),result:Ya().optional(),error:M().max(8192).optional()})]),io(`type`,[I({type:R(`start`),source:Pc,input:Ya().optional()}),I({type:R(`reply`),id:N().int(),value:Ya().optional(),error:M().optional()})]),I({profile:I({id:Vo,name:M()}),projects:F(I({id:M(),name:M(),path:M()})),accounts:F(I({id:N(),label:M(),agent:M(),logged_in:P()})),agents:F(I({id:M(),scripted_turns:P()}))}),I({jsonrpc:R(`2.0`),id:no([M(),N()]).optional(),method:M(),params:co(M(),Ya()).optional()}),I({name:M(),arguments:Ya().optional()});var zc=Rc,Bc=I({id:Da()}),Vc=Bc.extend({after:N().int().nonnegative().default(0)});[[`puddlang_context`,`List this host profile, projects, accounts and supported agents.`,I({}).strict(),!0],[`puddlang_run`,`Execute a trusted single-file TypeScript programme on the host. Imports: puddlang (spawn, attach, input, z), zod, node: built-ins. Returns immediately with a durable run id; use status/events. Supply a fresh UUID id, or reuse it with identical input to recover an uncertain submission. spawn({agent:"codex",project:"name",account:"label"}); await agent.ask("task"); export default result. Supports structured ask({prompt,input,schema:z.object(...)}) and agent.stop().`,zc,!1],[`puddlang_status`,`Read a run and its final default export, if finished.`,Bc,!0],[`puddlang_events`,`Read up to 100 events after a sequence; paginate until empty.`,Vc,!0],[`puddlang_cancel`,`Cancel a run, interrupt its pending asks, and stop agents it created. Attached agents are retained.`,Bc,!1]].map(([e,t,n,r])=>({name:e,description:t,inputSchema:Zi(n,{io:`input`}),annotations:{readOnlyHint:r,destructiveHint:!r,idempotentHint:!0,openWorldHint:!r}}));var Hc=null;function Uc(){return Hc}function Wc(e){return e}function Gc(e){let t=new Set;return{get:()=>localStorage.getItem(Wc(e)),set(n){n===null?localStorage.removeItem(Wc(e)):localStorage.setItem(Wc(e),n);for(let e of t)e()},subscribe(e){return t.add(e),()=>t.delete(e)}}}var Kc=Gc(`puddle.browser-authorisation`);async function qc(){localStorage.removeItem(`puddle.token`);let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`invite`);if(e.has(`invite`)||e.has(`token`)){let e=new URL(window.location.href);e.hash=``,history.replaceState(null,``,e)}if(t)try{let e=await fetch(`/cockpit/bootstrap`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({invitation:t})});if(!e.ok)return;Kc.set(wc.parse(await e.json()).credential)}catch{}}function Jc(){Kc.set(null)}var Yc=e(n(),1),Xc=[{id:`system`,label:`System`},{id:`rangefinder`,label:`Rangefinder`},{id:`drafting`,label:`Drafting`},{id:`invert`,label:`Invert`}],Zc=`system`;function Qc(e){return Xc.some(t=>t.id===e)?e:Zc}var $c={uiFontSize:16,cursorPackage:Zc,terminalFontSize:13,editorFontSize:14,density:`compact`,terminalScrollback:2e4,editorTabSize:2,editorWordWrap:!1,editorLinkSshHost:``,projectBasedLayout:!0,showAllProjectSessions:!0},el=`puddle.client-settings`,tl=new Set,W=null;function nl(e){let t={...e};return t.projectBasedLayout===void 0&&t.showAllProjectSessions!==void 0&&(t.projectBasedLayout=!t.showAllProjectSessions),t.showAllProjectSessions===void 0&&t.projectBasedLayout!==void 0&&(t.showAllProjectSessions=!t.projectBasedLayout),t}function rl(e){return e.terminalScrollback===5e3?{...e,terminalScrollback:$c.terminalScrollback}:e}function il(){if(W)return W;let e={};try{e=JSON.parse(localStorage.getItem(el)??`{}`)}catch{}let t={...$c,...rl(nl(e))};return W={...t,cursorPackage:Qc(t.cursorPackage)},W}function al(e){document.documentElement.style.setProperty(`--ui-font-size`,`${e.uiFontSize}px`),document.documentElement.dataset.density=e.density,document.documentElement.dataset.cursorPackage=e.cursorPackage}function ol(){return il()}function sl(e){let t={...il(),...e};W={...t,cursorPackage:Qc(t.cursorPackage)},localStorage.setItem(el,JSON.stringify(W)),al(W);for(let e of tl)e()}function G(){al(il())}function cl(){return(0,Yc.useSyncExternalStore)(e=>(tl.add(e),()=>tl.delete(e)),()=>il())}function ll(e){return e.split(`/`).map(encodeURIComponent).join(`/`)}function ul(e){return e.replace(/[%#? ]/g,e=>encodeURIComponent(e))}function dl(e,t,n){let r=ll(t);return n?`${e}://vscode-remote/ssh-remote+${ul(n)}${r}`:`${e}://file${r}`}function fl(e,t){return e.trim()||t||null}var pl=Gc(`puddle.host`);function ml(){return fl(ol().editorLinkSshHost,pl.get())}function hl(e){return new URLSearchParams(e).get(`host`)?.trim()||null}function gl(e,t,n){return hl(e)||(/[#&](?:invite|token)=/.test(t)?null:n)}function _l(){let e=gl(window.location.search,window.location.hash,pl.get());if(pl.set(e),hl(window.location.search)!==null){let e=new URL(window.location.href);e.searchParams.delete(`host`),history.replaceState(null,``,e)}}var vl=[`dark`,`light`],yl=`puddle.theme`,bl=`system`,xl=`dark`,Sl=new Set;function Cl(){return window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function wl(e){return e===`system`?Cl():e}function Tl(){let e=localStorage.getItem(yl);return e===`system`||vl.includes(e??``)?e:bl}function El(){let e=document.documentElement.dataset.theme;return vl.includes(e??``)?e:xl}function Dl(e){localStorage.setItem(yl,e);let t=wl(e);document.documentElement.dataset.theme=t;for(let e of Sl)e(t);return t}function Ol(){Dl(Tl()),window.matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{Tl()===`system`&&Dl(`system`)})}function kl(e){return Sl.add(e),()=>Sl.delete(e)}function Al(e){let t=/^#([0-9a-fA-F]{3,4})$/.exec(e);return t?.[1]?`#${[...t[1]].map(e=>e+e).join(``)}`:e}function jl(){let e=getComputedStyle(document.documentElement);return t=>Al(e.getPropertyValue(t).trim())}var Ml=4.5;function Nl(e){return{background:e(`--bg-base`),foreground:e(`--text-primary`),cursor:e(`--accent`),cursorAccent:e(`--bg-base`),selectionBackground:e(`--selection`),black:e(`--ansi-black`),red:e(`--ansi-red`),green:e(`--ansi-green`),yellow:e(`--ansi-yellow`),blue:e(`--ansi-blue`),magenta:e(`--ansi-magenta`),cyan:e(`--ansi-cyan`),white:e(`--ansi-white`),brightBlack:e(`--ansi-bright-black`),brightRed:e(`--ansi-bright-red`),brightGreen:e(`--ansi-bright-green`),brightYellow:e(`--ansi-bright-yellow`),brightBlue:e(`--ansi-bright-blue`),brightMagenta:e(`--ansi-bright-magenta`),brightCyan:e(`--ansi-bright-cyan`),brightWhite:e(`--ansi-bright-white`)}}function Pl(){return Nl(jl())}function Fl(e){return{theme:Nl(e),minimumContrastRatio:Ml}}function Il(){return Fl(jl())}function Ll(e){return e.replace(`#`,``)}function Rl(e,t){return{base:t===`light`?`vs`:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:Ll(e(`--text-muted`)),fontStyle:`italic`},{token:`string`,foreground:Ll(e(`--ansi-green`))},{token:`number`,foreground:Ll(e(`--ansi-yellow`))},{token:`keyword`,foreground:Ll(e(`--ansi-blue`))},{token:`type`,foreground:Ll(e(`--ansi-cyan`))},{token:`function`,foreground:Ll(e(`--ansi-magenta`))}],colors:{"editor.background":e(`--bg-base`),"editor.foreground":e(`--text-primary`),"editor.selectionBackground":e(`--selection`),"editor.lineHighlightBackground":e(`--bg-surface`),"editorCursor.foreground":e(`--accent`),"editorLineNumber.foreground":e(`--text-muted`),"editorLineNumber.activeForeground":e(`--text-secondary`),"editorWidget.background":e(`--bg-elevated`),"editorWidget.border":e(`--border`),focusBorder:e(`--focus-ring`),"diffEditor.insertedTextBackground":e(`--diff-added`),"diffEditor.removedTextBackground":e(`--diff-removed`)}}}function K(){return Rl(jl(),El())}var q=t((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})),J=t(((e,t)=>{t.exports=q()})),Y=J(),X=`modulepreload`,zl=function(e){return`/`+e},Bl={},Vl=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),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?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=zl(t,n),t=s(t),t in Bl)return;Bl[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:X,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}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)})};Ol(),G(),_l(),qc().then(async()=>{let{App:e}=await Vl(async()=>{let{App:e}=await import(`./App-CNmIJjl_.js`);return{App:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]));(0,Fo.createRoot)(document.getElementById(`root`)).render((0,Y.jsx)(e,{}))});export{qo as $,ic as A,Ps as B,kc as C,vc as D,Tc as E,Js as F,xs as G,Os as H,Rs as I,Zo as J,Xo as K,zs as L,ec as M,Qs as N,pc as O,Us as P,es as Q,Fs as R,Uc as S,Ec as T,Ms as U,Es as V,bs as W,ts as X,$o as Y,ns as Z,Xc as _,El as a,M as at,Gc as b,Tl as c,dl as d,Go as et,ml as f,cl as g,sl as h,jl as i,F as it,fc as j,mc as k,Pl as l,ol as m,J as n,Uo as nt,K as o,o as ot,pl as p,Qo as q,Dl as r,Io as rt,kl as s,Vl as t,Ho as tt,Il as u,Jc as v,Ac as w,Wc as x,Kc as y,Is as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{w as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-CdD2_EOh.js";import{w as e}from"./mermaid-parser.core-Cy8AG-qQ.js";export{e as createInfoServices};
|
package/dist/public/assets/{infoDiagram-27XIBGKW-DZM1jHkq.js → infoDiagram-27XIBGKW-BIJ52Gpm.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-Cy8AG-qQ.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{c as r}from"./chunk-DU6HZSFF-p5k9qXhh.js";import{t as i}from"./chunk-CLGD4ZFX-Dx1fE4HX.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
|
|
2
2
|
`+e);let o=i(t);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-p5k9qXhh.js";import{p as d}from"./chunk-75Z2AOVW-DmsoAjw5.js";import{t as f}from"./chunk-CLGD4ZFX-Dx1fE4HX.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-p5k9qXhh.js";import{t as d}from"./arc-BjSQqbzd.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-BSaAmHi0.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as e,p as t}from"./editor.api2-4X9Vh9Zw.js";import{h as n}from"./buffer-store-
|
|
1
|
+
import{h as e,p as t}from"./editor.api2-4X9Vh9Zw.js";import{h as n}from"./buffer-store-B24QspY2.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-x2nWJpem.js";var x=120*1e3,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-Oa9UrkKE.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&E(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&E(e.charCodeAt(r)))for(r++;r<e.length&&E(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&E(e.charCodeAt(r))){for(r++;r<e.length&&E(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
2
2
|
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(T(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
3
3
|
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!T(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,T(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!E(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(w(e)||T(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t));var O=200;Array(O).fill(0).map((e,t)=>`
|
|
4
4
|
`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-_wZywoZs.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-_wZywoZs.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-p5k9qXhh.js";import"./chunk-75Z2AOVW-DmsoAjw5.js";import{t as l}from"./chunk-CLGD4ZFX-Dx1fE4HX.js";import"./chunk-PWAF6VOD-BXxrEmLT.js";import"./chunk-GMAD6QVW-Dna8BJJq.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-CfrZ7JB4.js";import"./chunk-4HAMMTFA-CFf6LTHp.js";import{i as d,r as f}from"./chunk-GVQU2GXP-DOhlGSDl.js";import{n as p}from"./chunk-L3NEJ4N5-BwcBPm7M.js";import{n as m,t as h}from"./chunk-LNGE3PJU-DNNNwF8Y.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-BWPyau1x.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-75Z2AOVW-
|
|
1
|
+
import{n as e,t}from"./path-BWPyau1x.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-75Z2AOVW-DmsoAjw5.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t<r&&c(i=e[t],t,e))===a&&((a=!a)?d.lineStart():d.lineEnd()),a&&d.point(+o(i,t,e),+s(i,t,e));if(p)return d=null,p+``||null}return p.x=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),p):o},p.y=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),p):s},p.defined=function(t){return arguments.length?(c=typeof t==`function`?t:e(!!t),p):c},p.curve=function(e){return arguments.length?(u=e,l!=null&&(d=u(l)),p):u},p.context=function(e){return arguments.length?(e==null?l=d=null:d=u(l=e),p):l},p}export{o as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-
|
|
2
|
-
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DoDuR-5f.js","assets/index-CPDXsNn7.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/index-CAvJOpdz.css","assets/purify.es-D8QhFVkO.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/chunk-DU6HZSFF-p5k9qXhh.js","assets/chunk-75Z2AOVW-DmsoAjw5.js","assets/dist-D9sYb5Oa.js","assets/chunk-CLGD4ZFX-Dx1fE4HX.js","assets/chunk-PWAF6VOD-BXxrEmLT.js","assets/chunk-GMAD6QVW-Dna8BJJq.js","assets/chunk-P2QGCYS3-CfrZ7JB4.js","assets/chunk-4HAMMTFA-CFf6LTHp.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-DOhlGSDl.js","assets/chunk-OSK3NFVY-82MNmgWe.js","assets/line-C0YxHEKk.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-L3NEJ4N5-BwcBPm7M.js","assets/chunk-TLUHSLCS-D9SadBk_.js","assets/chunk-2E4U76K2-BBFx22L7.js","assets/graphlib-DS17s2tU.js","assets/chunk-LNGE3PJU-DNNNwF8Y.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./index-CPDXsNn7.js";var r=e({MERMAID_SELECTOR:()=>i,renderMermaidDiagrams:()=>s}),i=`[data-puddle-mermaid]`,a=0,o=Promise.resolve();function s(e,t,n,r=!1){let i=o.then(()=>c(e,t,n,r));return o=i.catch(()=>void 0),i}async function c(e,r,o,s=!1){if(o?.aborted)return;let c=[...e.querySelectorAll(i)];if(c.length===0)return;let d;try{({default:d}=await n(()=>import(`./mermaid.core-DoDuR-5f.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26])))}catch{if(!o?.aborted)for(let e of c)l(e,`Mermaid could not be loaded`);return}if(!o?.aborted){try{let n=t(),i=getComputedStyle(e).fontSize,a=Number.parseFloat(i);d.initialize({startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,theme:`base`,htmlLabels:!1,fontFamily:n(`--font-sans`),...s&&Number.isFinite(a)?{flowchart:{nodeSpacing:a,rankSpacing:a*2,padding:a/2,subGraphTitleMargin:{top:a/2,bottom:a}},sequence:{diagramMarginY:a/2,messageMargin:a,actorMargin:a}}:{},secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`maxEdges`,`suppressErrorRendering`,`theme`,`themeCSS`,`themeVariables`,`fontFamily`],themeVariables:{darkMode:r===`dark`,background:n(`--bg-base`),primaryColor:n(`--bg-elevated`),primaryTextColor:n(`--text-primary`),primaryBorderColor:n(`--border`),secondaryColor:n(`--bg-surface`),secondaryTextColor:n(`--text-primary`),secondaryBorderColor:n(`--border`),tertiaryColor:n(`--bg-base`),tertiaryTextColor:n(`--text-secondary`),tertiaryBorderColor:n(`--border`),lineColor:n(`--text-muted`),textColor:n(`--text-primary`),fontFamily:n(`--font-sans`),fontSize:i}})}catch(e){if(!o?.aborted)for(let t of c)l(t,u(e));return}for(let e of c){if(o?.aborted||!e.isConnected)return;let t=e.textContent??``,n=`puddle-mermaid-${a++}`;try{let{svg:r}=await d.render(n,t);if(o?.aborted||!e.isConnected)continue;e.innerHTML=r,e.removeAttribute(`data-puddle-mermaid`)}catch(t){document.getElementById(n)?.remove(),!o?.aborted&&e.isConnected&&l(e,u(t))}}}}function l(e,t){if(e.querySelector(`.mermaid-error`))return;let n=document.createElement(`p`);n.className=`mermaid-error`,n.textContent=`Unable to render Mermaid diagram.`,n.title=t,e.prepend(n)}function u(e){return e instanceof Error?e.message:String(e)}export{s as n,r as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,n,r}from"./FindWidget-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,n,r}from"./FindWidget-PycvFKIo.js";var i=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},a=/([A-Z])/g,o=e=>e.replace(a,`-$1`).toLowerCase(),s={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},c=/[&><"']/g,l=e=>String(e).replace(c,e=>s[e]),u=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?u(e.body[0]):e:e.type===`font`?u(e.body):e,d=new Set([`mathord`,`textord`,`atom`]),f=e=>d.has(u(e).type),p=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},m={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function h(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function g(e){return e.default===void 0?h(Array.isArray(e.type)?e.type[0]:e.type):e.default}function _(e,t,n,r){var i=n[t];e[t]=i===void 0?g(r):r.processor?r.processor(i):i}var v=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(m)){var n=m[t];n&&_(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new i(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=p(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},y=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ee[te[this.id]]}sub(){return ee[ne[this.id]]}fracNum(){return ee[re[this.id]]}fracDen(){return ee[ie[this.id]]}cramp(){return ee[ae[this.id]]}text(){return ee[oe[this.id]]}isTight(){return this.size>=2}},b=0,x=1,S=2,C=3,w=4,T=5,E=6,D=7,ee=[new y(b,0,!1),new y(x,0,!0),new y(S,1,!1),new y(C,1,!0),new y(w,2,!1),new y(T,2,!0),new y(E,3,!1),new y(D,3,!0)],te=[w,T,w,T,E,D,E,D],ne=[T,T,T,T,D,D,D,D],re=[S,C,w,T,E,D,E,D],ie=[C,C,T,T,D,D,D,D],ae=[x,x,C,C,T,T,D,D],oe=[b,x,S,C,S,C,S,C],O={DISPLAY:ee[b],TEXT:ee[S],SCRIPT:ee[w],SCRIPTSCRIPT:ee[E]},se=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function ce(e){for(var t=0;t<se.length;t++)for(var n=se[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var le=[];se.forEach(e=>e.blocks.forEach(e=>le.push(...e)));function ue(e){for(var t=0;t<le.length;t+=2)if(e>=le[t]&&e<=le[t+1])return!0;return!1}var de=e=>e+` `+e,fe=80,pe=function(e,t){return`M95,`+(622+e+t)+`
|
|
2
2
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
3
3
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
4
4
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
package/dist/public/assets/{media-refresh-store-BemN_6sc.js → media-refresh-store-CcMOJ-U-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-BP-EF5G2.js";import{a as r,i,n as a}from"./dist-CzEdee3K.js";import{At as o,Ft as s,Lt as c,Nt as l,Ot as u,Rt as d,jt as f,kt as p}from"./protocol-support-Dm8bEo7Y.js";import{t as m}from"./createLucideIcon-DyMAgLa3.js";var h=class extends s{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,l=n.fetchMeta?.fetchMore?.direction,u=o&&l===`forward`,f=i&&l===`forward`,p=o&&l===`backward`,m=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:c(t,n.data),hasPreviousPage:d(t,n.data),isFetchNextPageError:u,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!p,isRefetching:a&&!f&&!m}}};function g(e,t){return f(e,h,t)}var ee=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=50;function v(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function y(e){return e?{placeholderData:e=>e}:{}}function b(e,t,n){let r=e!==void 0;return o({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${v(n)}`),enabled:r,...y(r)})}function x(e,t,n){let r=n?.root;return o({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:u(3e3),refetchOnWindowFocus:!0}:{}})}function S(e,t){let n=l();return p({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${v(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function te(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,s=e!==void 0&&(t?.enabled??!0);return o({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${v(a)}`)},enabled:s,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(s)})}function ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return o({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${C(n)}`),enabled:r,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(r)})}function re(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return o({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${v(r)}`),enabled:a,refetchInterval:u(1e4),refetchOnWindowFocus:!0})}function ie(e,t,n){let r=n?.root;return o({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function ae(e,t){let n=l();return p({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${C(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function oe(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return o({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${C(n)}`),enabled:r,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(r)})}function C(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function se(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${C(r)}`,{path:t,kind:n})}function ce(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${C(r)}`,{from:t,to:n})}function le(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${C(r)}`,{from:t,to:n})}function ue(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${C(n)}`,t)}function de(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${C(n)}`,{path:t})}function fe(e,t,n){let{query:r,regex:a,caseSensitive:s,wholeWord:c}=t;return o({queryKey:[`wt-search`,e,r,a,s,c,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),s&&t.set(`case`,`1`),c&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function pe(e,t,n,r){let a=r?.root;return o({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${v(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function me(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return g({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${_}&skip=${t}${v(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*_:void 0,enabled:r,...y(r)})}function w(e,t,n){return o({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${C(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var T=64*1024*1024;function E(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function D(e,t,n,i){let a=[];for(let o of E(n,T)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${v(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function O(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function k(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${v(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=O(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var A=e(t(),1),j=[],M=new Map,N=new Map,P=new Map;function F(e,t){let n=M.get(e)??j;t.length===0?M.delete(e):M.set(e,t);let r=new Set([...n.map(e=>B(e.source)),...t.map(e=>B(e.source))]);for(let e of r)z(e)}function I(e){F(e,j)}function L(e,t,n){let r=B({session:e,path:t,...n===void 0?{}:{root:n}});return(0,A.useSyncExternalStore)((0,A.useCallback)(e=>he(r,e),[r]),()=>R({session:e,path:t,...n===void 0?{}:{root:n}}))}function R(e){return N.get(B(e))??j}function z(e){let t=[...M.values()].flatMap(t=>t.filter(t=>B(t.source)===e));t.length===0?N.delete(e):N.set(e,t);for(let t of P.get(e)??[])t()}function he(e,t){let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t),n.size===0&&P.delete(e)}}function B(e){return JSON.stringify([e.session,e.root??null,e.path])}function V(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var H=new Map;function ge(e,t,n){let r={save:t,...n?{target:n}:{}};return H.set(e,r),()=>{H.get(e)===r&&H.delete(e)}}function _e(e){if(e===null)return!1;let t=H.get(e);return t?(t.save(),!0):!1}async function ve(e,t){let n=V(e.session,e.path,e.root),r=[...H.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ye(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ye(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var be=`UTC`;function xe(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:be})}var U=60,W=60*U,G=24*W,Se=7*G;function Ce(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<U?`just now`:r<W?`${Math.floor(r/U)} m ago`:r<G?`${Math.floor(r/W)} h ago`:r<Se?`${Math.floor(r/G)} d ago`:xe(n)}function we(e,t){return t?`added`:e}function Te(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function K(e,t){return[`untitled`,e,t]}function Ee(e,t){return o({queryKey:K(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function De(e,t,n,r){e.setQueryData(K(t,n),e=>e===void 0?e:{...e,content:r})}function Oe(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function ke(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var q=null,J=new Map;function Ae(e){q=e}function je(e){q?.(e)}function Me(e,t){J.set(e,t)}function Ne(e){return J.get(e)}function Pe(e){J.delete(e)}var Y=n(),X=(0,A.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function Fe({children:e}){let[t,n]=(0,A.useState)(null),r=(0,A.useCallback)(e=>n(()=>e),[]),i=(0,A.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,A.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,Y.jsx)(X.Provider,{value:o,children:e})}function Ie(){let{openFile:e}=(0,A.useContext)(X);return{openFile:e}}function Le(e){let{setHandler:t}=(0,A.useContext)(X),n=(0,A.useRef)(e);n.current=e,(0,A.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var Z=new Map,Q=new Map;function Re(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function ze(e,t,n){let r=$(e,t,n),i=(0,A.useCallback)(e=>Be(r,e),[r]),a=(0,A.useCallback)(()=>Z.get(r)??0,[r]);return(0,A.useSyncExternalStore)(i,a,a)}function Be(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{v as A,te as B,F as C,de as D,se as E,ae as F,b as G,oe as H,re as I,ee as K,ne as L,D as M,w as N,k as O,pe as P,ie as R,I as S,le as T,me as U,x as V,fe as W,Ce as _,Le as a,ve as b,je as c,Te as d,ke as f,we as g,Ee as h,Ie as i,ue as j,ce as k,Ae as l,De as m,ze as n,Pe as o,Oe as p,Fe as r,Me as s,Re as t,Ne as u,ge as v,L as w,V as x,_e as y,S as z};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n}from"./index-CPDXsNn7.js";import{a as r,i,n as a}from"./dist-qyIRFVt1.js";import{At as o,Ft as s,Lt as c,Nt as l,Ot as u,Rt as d,jt as f,kt as p}from"./protocol-support-DWTHwckn.js";import{t as m}from"./createLucideIcon-DyMAgLa3.js";var h=class extends s{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,l=n.fetchMeta?.fetchMore?.direction,u=o&&l===`forward`,f=i&&l===`forward`,p=o&&l===`backward`,m=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:c(t,n.data),hasPreviousPage:d(t,n.data),isFetchNextPageError:u,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!p,isRefetching:a&&!f&&!m}}};function g(e,t){return f(e,h,t)}var ee=m(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),_=50;function v(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function y(e){return e?{placeholderData:e=>e}:{}}function b(e,t,n){let r=e!==void 0;return o({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${v(n)}`),enabled:r,...y(r)})}function x(e,t,n){let r=n?.root;return o({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:u(3e3),refetchOnWindowFocus:!0}:{}})}function S(e,t){let n=l();return p({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${v(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function te(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,s=e!==void 0&&(t?.enabled??!0);return o({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${v(a)}`)},enabled:s,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(s)})}function ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return o({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${C(n)}`),enabled:r,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(r)})}function re(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return o({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${v(r)}`),enabled:a,refetchInterval:u(1e4),refetchOnWindowFocus:!0})}function ie(e,t,n){let r=n?.root;return o({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${v(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function ae(e,t){let n=l();return p({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${C(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function oe(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return o({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${C(n)}`),enabled:r,refetchInterval:u(1e4),refetchOnWindowFocus:!0,...y(r)})}function C(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function se(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${C(r)}`,{path:t,kind:n})}function ce(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${C(r)}`,{from:t,to:n})}function le(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${C(r)}`,{from:t,to:n})}function ue(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${C(n)}`,t)}function de(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${C(n)}`,{path:t})}function fe(e,t,n){let{query:r,regex:a,caseSensitive:s,wholeWord:c}=t;return o({queryKey:[`wt-search`,e,r,a,s,c,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),s&&t.set(`case`,`1`),c&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function pe(e,t,n,r){let a=r?.root;return o({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${v(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function me(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return g({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${_}&skip=${t}${v(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*_:void 0,enabled:r,...y(r)})}function w(e,t,n){return o({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${C(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var T=64*1024*1024;function E(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function D(e,t,n,i){let a=[];for(let o of E(n,T)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${v(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function O(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function k(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${v(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=O(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var A=e(t(),1),j=[],M=new Map,N=new Map,P=new Map;function F(e,t){let n=M.get(e)??j;t.length===0?M.delete(e):M.set(e,t);let r=new Set([...n.map(e=>B(e.source)),...t.map(e=>B(e.source))]);for(let e of r)z(e)}function I(e){F(e,j)}function L(e,t,n){let r=B({session:e,path:t,...n===void 0?{}:{root:n}});return(0,A.useSyncExternalStore)((0,A.useCallback)(e=>he(r,e),[r]),()=>R({session:e,path:t,...n===void 0?{}:{root:n}}))}function R(e){return N.get(B(e))??j}function z(e){let t=[...M.values()].flatMap(t=>t.filter(t=>B(t.source)===e));t.length===0?N.delete(e):N.set(e,t);for(let t of P.get(e)??[])t()}function he(e,t){let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t),n.size===0&&P.delete(e)}}function B(e){return JSON.stringify([e.session,e.root??null,e.path])}function V(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var H=new Map;function ge(e,t,n){let r={save:t,...n?{target:n}:{}};return H.set(e,r),()=>{H.get(e)===r&&H.delete(e)}}function _e(e){if(e===null)return!1;let t=H.get(e);return t?(t.save(),!0):!1}async function ve(e,t){let n=V(e.session,e.path,e.root),r=[...H.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ye(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ye(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var be=`UTC`;function xe(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:be})}var U=60,W=60*U,G=24*W,Se=7*G;function Ce(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<U?`just now`:r<W?`${Math.floor(r/U)} m ago`:r<G?`${Math.floor(r/W)} h ago`:r<Se?`${Math.floor(r/G)} d ago`:xe(n)}function we(e,t){return t?`added`:e}function Te(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function K(e,t){return[`untitled`,e,t]}function Ee(e,t){return o({queryKey:K(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function De(e,t,n,r){e.setQueryData(K(t,n),e=>e===void 0?e:{...e,content:r})}function Oe(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function ke(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var q=null,J=new Map;function Ae(e){q=e}function je(e){q?.(e)}function Me(e,t){J.set(e,t)}function Ne(e){return J.get(e)}function Pe(e){J.delete(e)}var Y=n(),X=(0,A.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function Fe({children:e}){let[t,n]=(0,A.useState)(null),r=(0,A.useCallback)(e=>n(()=>e),[]),i=(0,A.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,A.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,Y.jsx)(X.Provider,{value:o,children:e})}function Ie(){let{openFile:e}=(0,A.useContext)(X);return{openFile:e}}function Le(e){let{setHandler:t}=(0,A.useContext)(X),n=(0,A.useRef)(e);n.current=e,(0,A.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var Z=new Map,Q=new Map;function Re(e,t,n){let r=$(e,t,n);Z.set(r,(Z.get(r)??0)+1);for(let e of Q.get(r)??[])e()}function ze(e,t,n){let r=$(e,t,n),i=(0,A.useCallback)(e=>Be(r,e),[r]),a=(0,A.useCallback)(()=>Z.get(r)??0,[r]);return(0,A.useSyncExternalStore)(i,a,a)}function Be(e,t){let n=Q.get(e);return n||(n=new Set,Q.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&Q.delete(e)}}function $(e,t,n){return JSON.stringify([e,n??null,t])}export{v as A,te as B,F as C,de as D,se as E,ae as F,b as G,oe as H,re as I,ee as K,ne as L,D as M,w as N,k as O,pe as P,ie as R,I as S,le as T,me as U,x as V,fe as W,Ce as _,Le as a,ve as b,je as c,Te as d,ke as f,we as g,Ee as h,Ie as i,ue as j,ce as k,Ae as l,De as m,ze as n,Pe as o,Oe as p,Fe as r,Me as s,Re as t,Ne as u,ge as v,L as w,V as x,_e as y,S as z};
|