werkmeister 0.93.2 → 0.93.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/{budget-TJ5ZCV63.js → budget-M6Q2T6LB.js} +2 -2
  2. package/dist/{cache-JBDXLM35.js → cache-JBZR4WPQ.js} +2 -2
  3. package/dist/{chunk-XR7D4UBS.js → chunk-2RXLRCHL.js} +2 -2
  4. package/dist/{chunk-FO7AF54Y.js → chunk-3QVQNEW2.js} +2 -2
  5. package/dist/{chunk-LJPNME4Q.js → chunk-3Y3BULLF.js} +2 -2
  6. package/dist/{chunk-3WTHSTYS.js → chunk-4FPAKI7C.js} +2 -2
  7. package/dist/{chunk-4T7IEMCY.js → chunk-4NCV6JR7.js} +2 -2
  8. package/dist/{chunk-ICUBRHZI.js → chunk-5PLIRGOA.js} +2 -2
  9. package/dist/{chunk-MQ6R526K.js → chunk-5QV4XDJZ.js} +2 -2
  10. package/dist/{chunk-IRJVVN7Y.js → chunk-5X3N6AZP.js} +2 -2
  11. package/dist/{chunk-ECZBAD7L.js → chunk-76FS62DP.js} +2 -2
  12. package/dist/{chunk-JVMT5KGE.js → chunk-ACHONTIB.js} +2 -2
  13. package/dist/{chunk-ZZFJD6PY.js → chunk-B63EVTK3.js} +2 -2
  14. package/dist/{chunk-P3VQER4Q.js → chunk-B7RRUAOW.js} +2 -2
  15. package/dist/{chunk-ASF553GS.js → chunk-CB4VFJEL.js} +2 -2
  16. package/dist/{chunk-5VOJOWY3.js → chunk-CTD3M3ZO.js} +15 -10
  17. package/dist/{chunk-52FZE4KH.js → chunk-DJAG45GG.js} +2 -2
  18. package/dist/{chunk-ULR6EH4M.js → chunk-EAQJ3OP2.js} +2 -2
  19. package/dist/{chunk-3MJUN7FF.js → chunk-EHFZN2TL.js} +2 -2
  20. package/dist/{chunk-AUCJEXWT.js → chunk-F4IMOZQW.js} +2 -2
  21. package/dist/{chunk-YRQU5A47.js → chunk-FER2NQNY.js} +2 -2
  22. package/dist/{chunk-AIWEEDTX.js → chunk-FR6GPITJ.js} +2 -2
  23. package/dist/{chunk-SBAMBSFX.js → chunk-FVBAAF7Z.js} +3 -3
  24. package/dist/{chunk-DKMPT57Q.js → chunk-GL2LH3ZK.js} +2 -2
  25. package/dist/{chunk-OAFCZWMU.js → chunk-GRHGF46X.js} +2 -2
  26. package/dist/chunk-ID5DURPG.js +4 -0
  27. package/dist/{chunk-JKG6JQCB.js → chunk-JB5CVVN2.js} +2 -2
  28. package/dist/{chunk-JQWKJBDP.js → chunk-JDHBMVSN.js} +2 -2
  29. package/dist/{chunk-LTYMB2XG.js → chunk-JGUVBPJI.js} +2 -2
  30. package/dist/{chunk-VB6RAA25.js → chunk-K4WOL6WD.js} +2 -2
  31. package/dist/{chunk-QM2A7HTB.js → chunk-K6RCSRE3.js} +2 -2
  32. package/dist/{chunk-KSUASOM5.js → chunk-KQ3OMGNX.js} +2 -2
  33. package/dist/{chunk-S6BQOL3K.js → chunk-KR27O6KM.js} +2 -2
  34. package/dist/{chunk-4PXUFOF2.js → chunk-KXBHMOYS.js} +2 -2
  35. package/dist/{chunk-3GVGMLBB.js → chunk-LOARA444.js} +2 -2
  36. package/dist/{chunk-RWUX6TEA.js → chunk-MUSFRIK3.js} +2 -2
  37. package/dist/chunk-NORRRFBV.js +33 -0
  38. package/dist/{chunk-KMMUMNYM.js → chunk-O4K73Q2I.js} +2 -2
  39. package/dist/{chunk-F6C37Y2R.js → chunk-O76M2QHE.js} +2 -2
  40. package/dist/{chunk-QXGFYFNP.js → chunk-ORWGD7MD.js} +2 -2
  41. package/dist/{chunk-TMVSY33D.js → chunk-PZSUMAJA.js} +2 -2
  42. package/dist/{chunk-ZXV6DXRJ.js → chunk-Q2YBMEPF.js} +2 -2
  43. package/dist/{chunk-SO2T2ZN3.js → chunk-QDLSCYDM.js} +2 -2
  44. package/dist/{chunk-TOOLPUVG.js → chunk-QHKVGE7Y.js} +2 -2
  45. package/dist/{chunk-GQAD4XJ4.js → chunk-R4K233AX.js} +2 -2
  46. package/dist/{chunk-PEGGGOE6.js → chunk-RF3G4YRP.js} +3 -3
  47. package/dist/{chunk-K3ZGG5IK.js → chunk-RJF7ZLAO.js} +2 -2
  48. package/dist/{chunk-VJW6Y5WR.js → chunk-RPFKVTPE.js} +2 -2
  49. package/dist/{chunk-SFEYI3ND.js → chunk-RTBYODJT.js} +2 -2
  50. package/dist/{chunk-XEKGITG4.js → chunk-RXP24ITU.js} +2 -2
  51. package/dist/{chunk-LJGLMBOR.js → chunk-SE4JKSDJ.js} +2 -2
  52. package/dist/{chunk-3VFQKUDX.js → chunk-T3N2TU7T.js} +2 -2
  53. package/dist/{chunk-ODW2JE2W.js → chunk-UJ6DPS4B.js} +2 -2
  54. package/dist/{chunk-WYYM4CFN.js → chunk-UKEGRHTM.js} +2 -2
  55. package/dist/{chunk-6AVTZQKD.js → chunk-ULNRIE5C.js} +2 -2
  56. package/dist/{chunk-DXS5IA3V.js → chunk-UT262DG6.js} +2 -2
  57. package/dist/{chunk-DGSP7G7R.js → chunk-WP5YT7VS.js} +2 -2
  58. package/dist/{chunk-7EGC7C44.js → chunk-X57IXE7Q.js} +2 -2
  59. package/dist/{chunk-6YZIYPAV.js → chunk-XDBPLBUZ.js} +2 -2
  60. package/dist/{chunk-4SR6YMSK.js → chunk-XMDARS6Z.js} +2 -2
  61. package/dist/{chunk-A4JOBS3X.js → chunk-XY5RD66R.js} +2 -2
  62. package/dist/{chunk-W235VC3S.js → chunk-YE4G6SF3.js} +3 -3
  63. package/dist/{chunk-AZ5IHBXV.js → chunk-YGQHHRX3.js} +2 -2
  64. package/dist/{chunk-HMT3WVA6.js → chunk-YUZPGBGJ.js} +2 -2
  65. package/dist/{chunk-5KV6OR7H.js → chunk-ZH3PHAJR.js} +2 -2
  66. package/dist/{chunk-Y363LJO2.js → chunk-ZHIPODEL.js} +2 -2
  67. package/dist/{chunk-HDFC52G6.js → chunk-ZQWOS5LL.js} +2 -2
  68. package/dist/{chunk-IMB62QG5.js → chunk-ZTFZLNXX.js} +47 -46
  69. package/dist/clean-RJ3UU47I.js +8 -0
  70. package/dist/close_out-XIQZEV4X.js +8 -0
  71. package/dist/code-45HVFOAZ.js +4 -0
  72. package/dist/{config-UBWBZ526.js → config-OHK7YXIF.js} +2 -2
  73. package/dist/{connect-3WA3SGCE.js → connect-P23ZRHED.js} +2 -2
  74. package/dist/{daemon-M2SUJGYP.js → daemon-2EIJPAZM.js} +2 -2
  75. package/dist/dashboard.js +1 -1
  76. package/dist/{detect-K3CN6IUG.js → detect-E2F2QASJ.js} +2 -2
  77. package/dist/{down-ZFVUSJOQ.js → down-6RCGHBG2.js} +3 -3
  78. package/dist/{fixture-XI47YOTE.js → fixture-XFOURTGK.js} +2 -2
  79. package/dist/form-cli.js +1 -1
  80. package/dist/hooks-BKAQWOPG.js +4 -0
  81. package/dist/{hooks_gen-4AZQMABH.js → hooks_gen-LIAHG2UF.js} +2 -2
  82. package/dist/infra-5O4SJKCC.js +4 -0
  83. package/dist/init_workspace-JHW77HJE.js +4 -0
  84. package/dist/{intercept-FUF5W7RD.js → intercept-C255V2OV.js} +2 -2
  85. package/dist/{issue-V4VPVO27.js → issue-RJLHB4VC.js} +2 -2
  86. package/dist/lib/agent_state.js +1 -1
  87. package/dist/lib/gate.js +1 -1
  88. package/dist/lib/pr_guard.js +1 -1
  89. package/dist/list_workspaces-2ZIAWC44.js +7 -0
  90. package/dist/logs-NZDOMMJL.js +6 -0
  91. package/dist/main.js +3 -3
  92. package/dist/mcp-proxy.js +1 -1
  93. package/dist/mcp.js +1 -1
  94. package/dist/{migrate-43AUCURJ.js → migrate-Y76LMJRA.js} +2 -2
  95. package/dist/notes-EEC3POAG.js +4 -0
  96. package/dist/{open-CWS4TVAG.js → open-UFINFQTM.js} +2 -2
  97. package/dist/{optimize-CTUQ46VD.js → optimize-OFAEZOA3.js} +2 -2
  98. package/dist/pause-D7E4JCRV.js +4 -0
  99. package/dist/pr-XXYDX2GP.js +5 -0
  100. package/dist/proxy_reload-M7ZPWN7G.js +6 -0
  101. package/dist/{registry-TY7M6R7Y.js → registry-QM5A4VPM.js} +2 -2
  102. package/dist/remove-J5VGVFAF.js +7 -0
  103. package/dist/remove_workspace-ZTYN732K.js +8 -0
  104. package/dist/restart-PPKQGQ6V.js +8 -0
  105. package/dist/resume-67ZGI4WD.js +8 -0
  106. package/dist/{safari-N2QANFEN.js → safari-5WV7JRN4.js} +2 -2
  107. package/dist/{sandbox-VVWEZD6R.js → sandbox-GXF43IY4.js} +2 -2
  108. package/dist/{services-YWGYI3CQ.js → services-6DREGT73.js} +2 -2
  109. package/dist/{setup-I43XSSB4.js → setup-VODRPG5U.js} +2 -2
  110. package/dist/skills-IB6LCOBR.js +4 -0
  111. package/dist/{slots-HNHA6KFD.js → slots-WG2LH372.js} +2 -2
  112. package/dist/{standards-HGMR36O4.js → standards-XXNNGBGT.js} +2 -2
  113. package/dist/start_args-6MQ5NNOP.js +4 -0
  114. package/dist/starting_prompt-ZBOK5FP4.js +4 -0
  115. package/dist/stats-NCDLCTRZ.js +4 -0
  116. package/dist/{status-ETR5TAXK.js → status-LUGHPZ2I.js} +2 -2
  117. package/dist/{stop-WNGMPPKQ.js → stop-UTIAHN4W.js} +2 -2
  118. package/dist/{telepresence-JEAKY7YW.js → telepresence-5NETEVMM.js} +2 -2
  119. package/dist/{test-OWKCU4X5.js → test-XHXO7IVL.js} +2 -2
  120. package/dist/{tokens-A3GTX5YY.js → tokens-WLASHMKS.js} +2 -2
  121. package/dist/{up-O2NQFRV3.js → up-ODVE35OY.js} +3 -3
  122. package/dist/{v4-KHIQIC5F.js → v4-V57BX2LR.js} +2 -2
  123. package/dist/wait_load-DPC7TY2Z.js +4 -0
  124. package/dist/werkmeister-workspaces.vsix +0 -0
  125. package/dist/{workspace-XKDHTRRP.js → workspace-R6NV7VSO.js} +2 -2
  126. package/package.json +3 -3
  127. package/dist/chunk-4C7VSSUG.js +0 -33
  128. package/dist/chunk-PB7AQAOV.js +0 -4
  129. package/dist/clean-54XTEURK.js +0 -8
  130. package/dist/close_out-JXBKRFIH.js +0 -8
  131. package/dist/code-WXYZZQMV.js +0 -4
  132. package/dist/hooks-GWOEKWGH.js +0 -4
  133. package/dist/infra-BMUPVG5C.js +0 -4
  134. package/dist/init_workspace-4KPETNIV.js +0 -4
  135. package/dist/list_workspaces-RD6EFH5Y.js +0 -7
  136. package/dist/logs-C6ZXA5K7.js +0 -6
  137. package/dist/notes-SY3WCUNO.js +0 -4
  138. package/dist/pause-OMECBDI7.js +0 -4
  139. package/dist/pr-3LUOTDYG.js +0 -5
  140. package/dist/proxy_reload-OGIIIHFA.js +0 -6
  141. package/dist/remove-ITDIKN4D.js +0 -7
  142. package/dist/remove_workspace-FX6BIX43.js +0 -8
  143. package/dist/restart-FOSPANRH.js +0 -8
  144. package/dist/resume-UKM6SUOD.js +0 -8
  145. package/dist/skills-TYDZRM6G.js +0 -4
  146. package/dist/start_args-72UTJD5L.js +0 -4
  147. package/dist/starting_prompt-CFW7DZQ2.js +0 -4
  148. package/dist/stats-WBWNRK5Z.js +0 -4
  149. package/dist/wait_load-VZEA7F67.js +0 -4
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{c as v,k as L}from"./chunk-SBAMBSFX.js";import"./chunk-4T7IEMCY.js";import"./chunk-ULR6EH4M.js";import"./chunk-KSUASOM5.js";import"./chunk-AZ5IHBXV.js";import"./chunk-LJPNME4Q.js";import"./chunk-5VOJOWY3.js";import"./chunk-DGSP7G7R.js";import"./chunk-3GVGMLBB.js";import"./chunk-3WTHSTYS.js";import"./chunk-S6BQOL3K.js";import"./chunk-SFEYI3ND.js";import"./chunk-IRJVVN7Y.js";import"./chunk-ICUBRHZI.js";import"./chunk-4C7VSSUG.js";import"./chunk-5KV6OR7H.js";import"./chunk-P3VQER4Q.js";import"./chunk-ZXV6DXRJ.js";import{B as h,C as w,I as b,L as y,Q as k,v as f,w as $}from"./chunk-HDFC52G6.js";import"./chunk-6YZIYPAV.js";import"./chunk-ECZBAD7L.js";import"./chunk-7EGC7C44.js";import"./chunk-A4JOBS3X.js";import{o as d}from"./chunk-KMMUMNYM.js";import"./chunk-DKMPT57Q.js";import"./chunk-JKG6JQCB.js";import"./chunk-DXS5IA3V.js";import"./chunk-MQ6R526K.js";import"./chunk-ASF553GS.js";import"./chunk-Y363LJO2.js";import"./chunk-6AVTZQKD.js";import"./chunk-YRQU5A47.js";import{a as c,f as g}from"./chunk-AUCJEXWT.js";g();import N from"node:os";var M=2**30,x=c((r,t)=>Number.isFinite(r)?`${Number(r.toFixed(1))}${t}`:"no limit","limit");async function P(r){let t=await h(),m=w(N.cpus().length),u=$(),l=await k(),n=L(),a=f(y(l,n??[])).map((o,e)=>{let s=u[o.feature]?.workspace,i=s&&d(s)?.services||null,B=s?b(s,i??void 0):null;return{...o,position:e+1,services:i,cost:B}});if(r.json){let o=c(e=>Number.isFinite(e)?e:null,"n");console.log(JSON.stringify({budget:{memory:o(t.memory),cpus:o(t.cpus),preempt:t.preempt},host_load:m,leases:u,waiting:l,running:n?.map(e=>({feature:e.feature,cpus:e.cost.cpus,memory:e.cost.memory,rank:e.rank,busy:e.busy}))??null,waiters:a.map(e=>({feature:e.feature,position:e.position,services:e.services,cpus:e.cost?.cpus??null,memory:e.cost?.memory??null,waited_ms:e.waitedMs,gate:e.gate}))}));return}console.log(`Budget: ${x(t.memory/M," GiB")} memory, ${x(t.cpus," CPUs")}, host load ${m||"unchecked"}, preemption ${t.preempt?"on":"off"}`);let p=Object.entries(u).sort(([,o],[,e])=>o.slot-e.slot);console.log(p.length?"Slots:":"Slots: none held");for(let[o,e]of p)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(n?n.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...n??[]].sort((e,s)=>s.cost.cpus-e.cost.cpus))console.log(` ${v(o)}`);console.log(a.length?"Waiting:":"Waiting: none");for(let o of a){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",s=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/M).toFixed(1)} GiB)`:"",i=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.position===1&&o.waitedMs>=3e5?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${s}${i}`)}}c(P,"run");export{P as run};
4
- //# sourceMappingURL=budget-TJ5ZCV63.js.map
3
+ import{c as v,k as L}from"./chunk-FVBAAF7Z.js";import"./chunk-4NCV6JR7.js";import"./chunk-EAQJ3OP2.js";import"./chunk-KQ3OMGNX.js";import"./chunk-YGQHHRX3.js";import"./chunk-3Y3BULLF.js";import"./chunk-CTD3M3ZO.js";import"./chunk-WP5YT7VS.js";import"./chunk-LOARA444.js";import"./chunk-4FPAKI7C.js";import"./chunk-KR27O6KM.js";import"./chunk-RTBYODJT.js";import"./chunk-5X3N6AZP.js";import"./chunk-5PLIRGOA.js";import"./chunk-NORRRFBV.js";import"./chunk-ZH3PHAJR.js";import"./chunk-B7RRUAOW.js";import"./chunk-Q2YBMEPF.js";import{B as h,C as w,I as b,L as y,Q as k,v as f,w as $}from"./chunk-ZQWOS5LL.js";import"./chunk-XDBPLBUZ.js";import"./chunk-76FS62DP.js";import"./chunk-X57IXE7Q.js";import"./chunk-XY5RD66R.js";import{o as d}from"./chunk-O4K73Q2I.js";import"./chunk-GL2LH3ZK.js";import"./chunk-JB5CVVN2.js";import"./chunk-UT262DG6.js";import"./chunk-5QV4XDJZ.js";import"./chunk-CB4VFJEL.js";import"./chunk-ZHIPODEL.js";import"./chunk-ULNRIE5C.js";import"./chunk-FER2NQNY.js";import{a as c,f as g}from"./chunk-F4IMOZQW.js";g();import N from"node:os";var M=2**30,x=c((r,t)=>Number.isFinite(r)?`${Number(r.toFixed(1))}${t}`:"no limit","limit");async function P(r){let t=await h(),m=w(N.cpus().length),u=$(),l=await k(),n=L(),a=f(y(l,n??[])).map((o,e)=>{let s=u[o.feature]?.workspace,i=s&&d(s)?.services||null,B=s?b(s,i??void 0):null;return{...o,position:e+1,services:i,cost:B}});if(r.json){let o=c(e=>Number.isFinite(e)?e:null,"n");console.log(JSON.stringify({budget:{memory:o(t.memory),cpus:o(t.cpus),preempt:t.preempt},host_load:m,leases:u,waiting:l,running:n?.map(e=>({feature:e.feature,cpus:e.cost.cpus,memory:e.cost.memory,rank:e.rank,busy:e.busy}))??null,waiters:a.map(e=>({feature:e.feature,position:e.position,services:e.services,cpus:e.cost?.cpus??null,memory:e.cost?.memory??null,waited_ms:e.waitedMs,gate:e.gate}))}));return}console.log(`Budget: ${x(t.memory/M," GiB")} memory, ${x(t.cpus," CPUs")}, host load ${m||"unchecked"}, preemption ${t.preempt?"on":"off"}`);let p=Object.entries(u).sort(([,o],[,e])=>o.slot-e.slot);console.log(p.length?"Slots:":"Slots: none held");for(let[o,e]of p)console.log(` ${e.slot} ${o}${e.workspace?` ${e.workspace}`:""}`);console.log(n?n.length?"Running:":"Running: none":"Running: docker unavailable");for(let o of[...n??[]].sort((e,s)=>s.cost.cpus-e.cost.cpus))console.log(` ${v(o)}`);console.log(a.length?"Waiting:":"Waiting: none");for(let o of a){let e=o.services?`${o.services.join(", ")}${o.gate?" for a running feature":""}`:"whole feature",s=o.cost?` (${Number(o.cost.cpus.toFixed(1))} CPUs, ${(o.cost.memory/M).toFixed(1)} GiB)`:"",i=o.waitedMs?` waited ${Math.round(o.waitedMs/6e4)} min${o.position===1&&o.waitedMs>=3e5?", gets the next free room":""}`:"";console.log(` ${o.position}. ${o.feature} ${e}${s}${i}`)}}c(P,"run");export{P as run};
4
+ //# sourceMappingURL=budget-M6Q2T6LB.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import"./chunk-PB7AQAOV.js";import{c as s}from"./chunk-LJPNME4Q.js";import"./chunk-ICUBRHZI.js";import"./chunk-6YZIYPAV.js";import"./chunk-7EGC7C44.js";import"./chunk-Y363LJO2.js";import{h as e,l as c}from"./chunk-6AVTZQKD.js";import"./chunk-YRQU5A47.js";import{a as r,f as i}from"./chunk-AUCJEXWT.js";i();async function u(o){o.action!=="prune"&&(c(`Unknown action \`${String(o.action)}\` \u2014 the only action is \`prune\`.`),process.exit(2));let t=await s({name:typeof o.name=="string"?o.name:void 0,reset:!!o.reset,force:!!o.force,dryRun:!!o.dry_run});t.length||console.log("No caches in the registry.");for(let n of t){let a=n.ok?`${e.GREEN}\u2713${e.RESET}`:`${e.RED}\u2717${e.RESET}`;console.log(`${a} ${n.name} (${n.action}): ${n.detail}`)}t.some(n=>!n.ok)&&process.exit(1)}r(u,"run");export{u as run};
4
- //# sourceMappingURL=cache-JBDXLM35.js.map
3
+ import"./chunk-ID5DURPG.js";import{c as s}from"./chunk-3Y3BULLF.js";import"./chunk-5PLIRGOA.js";import"./chunk-XDBPLBUZ.js";import"./chunk-X57IXE7Q.js";import"./chunk-ZHIPODEL.js";import{h as e,l as c}from"./chunk-ULNRIE5C.js";import"./chunk-FER2NQNY.js";import{a as r,f as i}from"./chunk-F4IMOZQW.js";i();async function u(o){o.action!=="prune"&&(c(`Unknown action \`${String(o.action)}\` \u2014 the only action is \`prune\`.`),process.exit(2));let t=await s({name:typeof o.name=="string"?o.name:void 0,reset:!!o.reset,force:!!o.force,dryRun:!!o.dry_run});t.length||console.log("No caches in the registry.");for(let n of t){let a=n.ok?`${e.GREEN}\u2713${e.RESET}`:`${e.RED}\u2717${e.RESET}`;console.log(`${a} ${n.name} (${n.action}): ${n.detail}`)}t.some(n=>!n.ok)&&process.exit(1)}r(u,"run");export{u as run};
4
+ //# sourceMappingURL=cache-JBZR4WPQ.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as s}from"./chunk-GQAD4XJ4.js";import{a as e,e as o,f as i}from"./chunk-AUCJEXWT.js";i();var r=o(s(),1);function p(n){if(n)try{return r.default.parse(n).type}catch{let t=(n.split(";",1)[0]??"").trim().toLowerCase();return t===""||n.slice(t.length).includes(",")?void 0:t}}e(p,"mediaTypeEssence");function u(n){return n==="application/json"?!0:p(n)==="application/json"}e(u,"isJsonContentType");export{p as a,u as b};
4
- //# sourceMappingURL=chunk-XR7D4UBS.js.map
3
+ import{a as s}from"./chunk-R4K233AX.js";import{a as e,e as o,f as i}from"./chunk-F4IMOZQW.js";i();var r=o(s(),1);function p(n){if(n)try{return r.default.parse(n).type}catch{let t=(n.split(";",1)[0]??"").trim().toLowerCase();return t===""||n.slice(t.length).includes(",")?void 0:t}}e(p,"mediaTypeEssence");function u(n){return n==="application/json"?!0:p(n)==="application/json"}e(u,"isJsonContentType");export{p as a,u as b};
4
+ //# sourceMappingURL=chunk-2RXLRCHL.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{j as a}from"./chunk-PEGGGOE6.js";import{m as n}from"./chunk-6AVTZQKD.js";import{b as m}from"./chunk-YRQU5A47.js";import{a as s,f as p}from"./chunk-AUCJEXWT.js";p();import*as f from"node:fs";import*as o from"node:path";function c(i){let t=o.resolve(i??"."),r=t;for(;!f.existsSync(o.join(m(r),"workspace.yml"));){let e=o.dirname(r);e===r&&(n(`No .werkmeister/workspace.yml found from ${t}`),process.exit(1)),r=e}return r}s(c,"findWorkspaceDir");function h(i){let t=c(i.start),r=a(t).starting_prompt;(typeof r!="string"||!r.trim())&&(n(`${t} has no starting_prompt`),process.exit(2)),console.log(r.trim())}s(h,"run");export{c as a,h as b};
4
- //# sourceMappingURL=chunk-FO7AF54Y.js.map
3
+ import{j as a}from"./chunk-RF3G4YRP.js";import{m as n}from"./chunk-ULNRIE5C.js";import{b as m}from"./chunk-FER2NQNY.js";import{a as s,f as p}from"./chunk-F4IMOZQW.js";p();import*as f from"node:fs";import*as o from"node:path";function c(i){let t=o.resolve(i??"."),r=t;for(;!f.existsSync(o.join(m(r),"workspace.yml"));){let e=o.dirname(r);e===r&&(n(`No .werkmeister/workspace.yml found from ${t}`),process.exit(1)),r=e}return r}s(c,"findWorkspaceDir");function h(i){let t=c(i.start),r=a(t).starting_prompt;(typeof r!="string"||!r.trim())&&(n(`${t} has no starting_prompt`),process.exit(2)),console.log(r.trim())}s(h,"run");export{c as a,h as b};
4
+ //# sourceMappingURL=chunk-3QVQNEW2.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as S}from"./chunk-ICUBRHZI.js";import{m as z,n as O}from"./chunk-6YZIYPAV.js";import{m as j}from"./chunk-7EGC7C44.js";import{U as w}from"./chunk-6AVTZQKD.js";import{a as l,f as _}from"./chunk-AUCJEXWT.js";_();import*as k from"node:fs";import*as d from"node:path";function g(n,e){return e.host?{kind:"host",name:e.host}:{kind:"volume",name:e.volume??`werkmeister-${n}`}}l(g,"cacheSource");function R(n,e){return e.host||e.volume?null:`sandbox-${n}`}l(R,"legacyCacheVolume");function I(n,e,i){for(let t=e;;t=d.dirname(t)){if(n.some(o=>k.existsSync(d.join(t,o))))return!0;if(t===i||!t.startsWith(i))return!1}}l(I,"detectedIn");function N(n,e,i,t,o){let s;if(Array.isArray(e.caches))s=[...e.caches];else{let r=S(e,i)?.caches??[],u=o&&k.existsSync(o)?Object.keys(t).filter(c=>{let a=t[c]?.detect??[];return a.length>0&&I(a,d.resolve(o,e.path??"."),d.resolve(o))}):[];s=[...new Set([...r,...u])]}for(let r of s)if(!(r in t))throw new Error(`services.yaml: service '${n}' names unknown cache '${r}' \u2014 no \`caches.${r}\` entry`);return s.sort()}l(N,"serviceCaches");function C(n,e,i){let t=[...n.extra_volumes??[]],o={};for(let s of e){let r=i[s],u=g(s,r),c=`${u.kind==="volume"?`^${u.name}`:u.name}:${r.path}`;t.includes(c)||t.push(c),o={...o,...r.env}}return{...n,extra_volumes:t,environment:{...o,...n.environment}}}l(C,"withCaches");function W(n,e,i,t,o){if(Object.keys(t).length===0)return[n,e];let s={},r=new Map;for(let[c,a]of Object.entries(n)){let h=a.repo?d.join(o,a.repo):null,m=N(c,a,i,t,h);if(s[c]=m.length?C(a,m,t):a,a.setup_service&&m.length){let p=r.get(a.setup_service)??new Set;for(let v of m)p.add(v);r.set(a.setup_service,p)}}let u={};for(let[c,a]of Object.entries(e)){let h=[...r.get(c)??[]].sort();u[c]=h.length?C(a,h,t):a}return[s,u]}l(W,"applyCaches");function B(n){let e=0;for(let i of k.readdirSync(n,{withFileTypes:!0,recursive:!0}))i.isFile()&&(e+=k.statSync(d.join(i.parentPath,i.name)).size);return e}l(B,"dirSize");async function E(n=w(),e=void 0){return e??=await z(),Object.keys(n).sort().flatMap(i=>{let t=n[i],o=R(i,t),s=o?e?.get(o):void 0,r=g(i,t),u=A(i,r,e);return s&&o?[u,A(i,{kind:"volume",name:o},e)]:[u]})}l(E,"cacheSnapshots");function A(n,e,i){if(e.kind==="host"){let o=k.statSync(e.name,{throwIfNoEntry:!1});return{name:n,kind:e.kind,source:e.name,exists:!!o,size_bytes:o?B(e.name):null,created_at:o?o.birthtime.toISOString():null}}let t=i?.get(e.name);return{name:n,kind:e.kind,source:e.name,exists:!!t,size_bytes:t&&t.size>=0?t.size:null,created_at:t?.createdAt??null}}l(A,"snapshotOf");var F=l(()=>({caches:w(),snapshots:l(n=>E(n),"snapshots"),busy:O,run:l(n=>j(n,{capture:!0}),"run")}),"defaultDeps");async function q(n={},e=F()){let{caches:i}=e;if(n.name!==void 0&&!(n.name in i)){let s=Object.keys(i).sort().join(", ")||"none";return[{name:n.name,action:"skipped",detail:`unknown cache (known: ${s})`,ok:!1}]}let t=(await e.snapshots(i)).filter(s=>n.name===void 0||s.name===n.name),o=[];for(let s of t){let r=i[s.name],u=s.source===g(s.name,r).name?s.name:`${s.name} (${s.source})`,c=l((f,y=!0)=>o.push({name:u,action:"skipped",detail:f,ok:y}),"skip");if(!s.exists){c("not created");continue}let a="";if(!n.force){let f=await e.busy(s.source);if(f===null){c("Docker is unreachable",!1);continue}if(f.length&&!n.dryRun){c(`in use by ${f.join(", ")} (--force to prune anyway)`);continue}f.length&&(a=` (in use by ${f.join(", ")})`)}let h=`'${r.path}'`,m,p,v=[];if(n.reset)m="reset",p=`find ${h} -mindepth 1 -delete`;else if(r.max_age){let f=/^([1-9][0-9]*)d$/.exec(r.max_age)?.[1];if(!f){c(`max_age '${r.max_age}' is not <N>d`,!1);continue}m="max_age";let y=`find ${h} -mindepth 1 -type f -mmin +${Number(f)*1440}`;p=n.dryRun?`${y} | wc -l`:`${y} -delete && find ${h} -mindepth 1 -type d -empty -delete`}else if(r.prune)m="prune",p=r.prune,v=Object.entries(r.env??{}).flatMap(([f,y])=>["-e",`${f}=${y}`]);else{c("no prune rule; use --reset");continue}if(n.dryRun&&m!=="max_age"){let f=s.size_bytes===null?"unknown size":`${s.size_bytes} bytes`,y=m==="reset"?`would empty ${f}`:`would run: ${p}`;o.push({name:u,action:m,detail:y+a,ok:!0});continue}let x=["docker","run","--rm","-v",`${s.source}:${r.path}`,...v];x.push(r.image??"node:22","sh","-c",p);let $=e.run(x),b=$.stdout.trim(),M=$.status!==0?$.stderr.trim()||`exit ${$.status}`:n.dryRun?`would delete ${b} file(s) older than ${r.max_age}${a}`:b||"done";o.push({name:u,action:m,detail:M,ok:$.status===0})}return o}l(q,"pruneCaches");export{W as a,E as b,q as c};
4
- //# sourceMappingURL=chunk-LJPNME4Q.js.map
3
+ import{a as S}from"./chunk-5PLIRGOA.js";import{m as z,n as O}from"./chunk-XDBPLBUZ.js";import{m as j}from"./chunk-X57IXE7Q.js";import{U as w}from"./chunk-ULNRIE5C.js";import{a as l,f as _}from"./chunk-F4IMOZQW.js";_();import*as k from"node:fs";import*as d from"node:path";function g(n,e){return e.host?{kind:"host",name:e.host}:{kind:"volume",name:e.volume??`werkmeister-${n}`}}l(g,"cacheSource");function R(n,e){return e.host||e.volume?null:`sandbox-${n}`}l(R,"legacyCacheVolume");function I(n,e,i){for(let t=e;;t=d.dirname(t)){if(n.some(o=>k.existsSync(d.join(t,o))))return!0;if(t===i||!t.startsWith(i))return!1}}l(I,"detectedIn");function N(n,e,i,t,o){let s;if(Array.isArray(e.caches))s=[...e.caches];else{let r=S(e,i)?.caches??[],u=o&&k.existsSync(o)?Object.keys(t).filter(c=>{let a=t[c]?.detect??[];return a.length>0&&I(a,d.resolve(o,e.path??"."),d.resolve(o))}):[];s=[...new Set([...r,...u])]}for(let r of s)if(!(r in t))throw new Error(`services.yaml: service '${n}' names unknown cache '${r}' \u2014 no \`caches.${r}\` entry`);return s.sort()}l(N,"serviceCaches");function C(n,e,i){let t=[...n.extra_volumes??[]],o={};for(let s of e){let r=i[s],u=g(s,r),c=`${u.kind==="volume"?`^${u.name}`:u.name}:${r.path}`;t.includes(c)||t.push(c),o={...o,...r.env}}return{...n,extra_volumes:t,environment:{...o,...n.environment}}}l(C,"withCaches");function W(n,e,i,t,o){if(Object.keys(t).length===0)return[n,e];let s={},r=new Map;for(let[c,a]of Object.entries(n)){let h=a.repo?d.join(o,a.repo):null,m=N(c,a,i,t,h);if(s[c]=m.length?C(a,m,t):a,a.setup_service&&m.length){let p=r.get(a.setup_service)??new Set;for(let v of m)p.add(v);r.set(a.setup_service,p)}}let u={};for(let[c,a]of Object.entries(e)){let h=[...r.get(c)??[]].sort();u[c]=h.length?C(a,h,t):a}return[s,u]}l(W,"applyCaches");function B(n){let e=0;for(let i of k.readdirSync(n,{withFileTypes:!0,recursive:!0}))i.isFile()&&(e+=k.statSync(d.join(i.parentPath,i.name)).size);return e}l(B,"dirSize");async function E(n=w(),e=void 0){return e??=await z(),Object.keys(n).sort().flatMap(i=>{let t=n[i],o=R(i,t),s=o?e?.get(o):void 0,r=g(i,t),u=A(i,r,e);return s&&o?[u,A(i,{kind:"volume",name:o},e)]:[u]})}l(E,"cacheSnapshots");function A(n,e,i){if(e.kind==="host"){let o=k.statSync(e.name,{throwIfNoEntry:!1});return{name:n,kind:e.kind,source:e.name,exists:!!o,size_bytes:o?B(e.name):null,created_at:o?o.birthtime.toISOString():null}}let t=i?.get(e.name);return{name:n,kind:e.kind,source:e.name,exists:!!t,size_bytes:t&&t.size>=0?t.size:null,created_at:t?.createdAt??null}}l(A,"snapshotOf");var F=l(()=>({caches:w(),snapshots:l(n=>E(n),"snapshots"),busy:O,run:l(n=>j(n,{capture:!0}),"run")}),"defaultDeps");async function q(n={},e=F()){let{caches:i}=e;if(n.name!==void 0&&!(n.name in i)){let s=Object.keys(i).sort().join(", ")||"none";return[{name:n.name,action:"skipped",detail:`unknown cache (known: ${s})`,ok:!1}]}let t=(await e.snapshots(i)).filter(s=>n.name===void 0||s.name===n.name),o=[];for(let s of t){let r=i[s.name],u=s.source===g(s.name,r).name?s.name:`${s.name} (${s.source})`,c=l((f,y=!0)=>o.push({name:u,action:"skipped",detail:f,ok:y}),"skip");if(!s.exists){c("not created");continue}let a="";if(!n.force){let f=await e.busy(s.source);if(f===null){c("Docker is unreachable",!1);continue}if(f.length&&!n.dryRun){c(`in use by ${f.join(", ")} (--force to prune anyway)`);continue}f.length&&(a=` (in use by ${f.join(", ")})`)}let h=`'${r.path}'`,m,p,v=[];if(n.reset)m="reset",p=`find ${h} -mindepth 1 -delete`;else if(r.max_age){let f=/^([1-9][0-9]*)d$/.exec(r.max_age)?.[1];if(!f){c(`max_age '${r.max_age}' is not <N>d`,!1);continue}m="max_age";let y=`find ${h} -mindepth 1 -type f -mmin +${Number(f)*1440}`;p=n.dryRun?`${y} | wc -l`:`${y} -delete && find ${h} -mindepth 1 -type d -empty -delete`}else if(r.prune)m="prune",p=r.prune,v=Object.entries(r.env??{}).flatMap(([f,y])=>["-e",`${f}=${y}`]);else{c("no prune rule; use --reset");continue}if(n.dryRun&&m!=="max_age"){let f=s.size_bytes===null?"unknown size":`${s.size_bytes} bytes`,y=m==="reset"?`would empty ${f}`:`would run: ${p}`;o.push({name:u,action:m,detail:y+a,ok:!0});continue}let x=["docker","run","--rm","-v",`${s.source}:${r.path}`,...v];x.push(r.image??"node:22","sh","-c",p);let $=e.run(x),b=$.stdout.trim(),M=$.status!==0?$.stderr.trim()||`exit ${$.status}`:n.dryRun?`would delete ${b} file(s) older than ${r.max_age}${a}`:b||"done";o.push({name:u,action:m,detail:M,ok:$.status===0})}return o}l(q,"pruneCaches");export{W as a,E as b,q as c};
4
+ //# sourceMappingURL=chunk-3Y3BULLF.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{l as k,m as x}from"./chunk-7EGC7C44.js";import{a as w}from"./chunk-6AVTZQKD.js";import{a as s,e as h,f as i}from"./chunk-AUCJEXWT.js";i();var j=h(w(),1);import*as c from"node:fs";import*as f from"node:path";function D(e){let t=e.split("/");return t.some((r,o)=>r==="node_modules"||o<t.length-1&&r.startsWith("."))}s(D,"pruned");function A(e,t=""){let r=[];for(let o of c.readdirSync(f.join(e,t),{withFileTypes:!0})){let a=t?`${t}/${o.name}`:o.name;if(o.isDirectory()){if(o.name==="node_modules"||o.name.startsWith("."))continue;r.push(...A(e,a))}else o.isFile()&&r.push(a)}return r}s(A,"walk");function z(e,t){let[r,o]=t(["git","-C",e,"ls-files","--cached","--others","--exclude-standard"]);return(r===0?o.split(`
3
+ import{l as k,m as x}from"./chunk-X57IXE7Q.js";import{a as w}from"./chunk-ULNRIE5C.js";import{a as s,e as h,f as i}from"./chunk-F4IMOZQW.js";i();var j=h(w(),1);import*as c from"node:fs";import*as f from"node:path";function D(e){let t=e.split("/");return t.some((r,o)=>r==="node_modules"||o<t.length-1&&r.startsWith("."))}s(D,"pruned");function A(e,t=""){let r=[];for(let o of c.readdirSync(f.join(e,t),{withFileTypes:!0})){let a=t?`${t}/${o.name}`:o.name;if(o.isDirectory()){if(o.name==="node_modules"||o.name.startsWith("."))continue;r.push(...A(e,a))}else o.isFile()&&r.push(a)}return r}s(A,"walk");function z(e,t){let[r,o]=t(["git","-C",e,"ls-files","--cached","--others","--exclude-standard"]);return(r===0?o.split(`
4
4
  `).map(n=>n.trim()).filter(Boolean):A(e)).filter(n=>!D(n)&&c.existsSync(f.join(e,n))).sort()}s(z,"listRepoFiles");function y(e,t){return c.readFileSync(f.join(e.root,t),"utf8")}s(y,"readText");function S(e,t){if(!e.files.includes(t))return null;let r=JSON.parse(y(e,t));return r&&typeof r=="object"&&!Array.isArray(r)?r:null}s(S,"readJson");function J(e){return(0,j.parseAllDocuments)(e).map(t=>{if(t.errors.length)throw new Error(t.errors[0].message);return t.toJS()})}s(J,"yamlDocs");function O(e){try{let t=x(e,{capture:!0,timeout:120});return[t.status,t.status===0?t.stdout||"":(t.stderr||t.stdout||"").trim()]}catch(t){if(t instanceof k&&t.code==="ENOENT")return[127,`${e[0]}: command not found`];if(t instanceof k&&t.code==="ETIMEDOUT")return[124,`${e.join(" ")}: timed out`];throw t}}s(O,"stdoutRunner");i();var b=h(w(),1);import*as m from"node:path";i();function g(e,t){return{value:e,source:t,confidence:"stated"}}s(g,"stated");function I(e,t){return{value:e,source:t,confidence:"guessed"}}s(I,"guessed");var T={npm:"npm install",pnpm:"corepack enable && pnpm install",yarn:"corepack enable && yarn install"},W={npm:["package-lock.json","npm ci"],pnpm:["pnpm-lock.yaml","corepack enable && pnpm install --frozen-lockfile"]};function K(e){return[e("pnpm-lock.yaml")&&"pnpm install --frozen-lockfile",e("package-lock.json")&&"npm ci",e("yarn.lock")&&(e(".yarnrc.yml")?"yarn install --immutable":"yarn install --frozen-lockfile"),e("uv.lock")&&"uv sync --frozen"].filter(t=>!!t)}s(K,"frozenInstalls");function F(e,t){let r=s(n=>new RegExp("^"+n.replace(/^\.\//,"").replace(/\/+$/,"").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"\0").replace(/\*/g,"[^/]+").replace(/\0/g,".+")+"$"),"toRe"),o=e.filter(n=>!n.startsWith("!")).map(r),a=e.filter(n=>n.startsWith("!")).map(n=>r(n.slice(1)));return t.filter(n=>n.endsWith("/package.json")).map(n=>m.posix.dirname(n)).filter(n=>o.some(l=>l.test(n))&&!a.some(l=>l.test(n))).sort()}s(F,"expandWorkspaceGlobs");function M(e,t=null,r=null){let o=s(p=>e.files.includes(p),"has"),a=o("pnpm-lock.yaml")||o("pnpm-workspace.yaml")?"pnpm":o("yarn.lock")?"yarn":"npm",n=S(e,"package.json");if(!n)return{pm:a,packageDirs:[],setupName:null,setupFields:{}};let l=[],u="package.json";if(o("pnpm-workspace.yaml")){let p=(0,b.parse)(y(e,"pnpm-workspace.yaml"))?.packages;l=Array.isArray(p)?p.map(String):[],u="pnpm-workspace.yaml"}else{let p=n.workspaces;l=Array.isArray(p)?p.map(String):Array.isArray(p?.packages)?p.packages.map(String):[],l.length&&(u="package.json \u2192 workspaces")}let d=W[a],E=d&&o(d[0])?d[1]:T[a];return{pm:a,packageDirs:F(l,e.files),setupName:t??`${m.basename(e.root)}-install`,setupFields:{command:g(E,`${u} (${a})`),node_modules_volume:g(r??`${m.basename(e.root)}-node-modules`,u)}}}s(M,"detectWorkspace");export{z as a,y as b,S as c,J as d,O as e,g as f,I as g,K as h,M as i};
5
- //# sourceMappingURL=chunk-3WTHSTYS.js.map
5
+ //# sourceMappingURL=chunk-4FPAKI7C.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{V as x}from"./chunk-HDFC52G6.js";import{f as y,g as b,h as w}from"./chunk-6YZIYPAV.js";import{b as S}from"./chunk-YRQU5A47.js";import{a,f as h}from"./chunk-AUCJEXWT.js";h();import*as l from"node:fs";import*as m from"node:os";import*as d from"node:path";var M=10,j=2e3,A=5*6e4;function v(t){return d.join(S(t),"starts.json")}a(v,"startsFile");function D(t){try{let e=JSON.parse(l.readFileSync(v(t),"utf8"));return Array.isArray(e)?e:[]}catch{return[]}}a(D,"readStarts");function C(t,e,r,n=Date.now()){try{let s=v(t),o=[...D(t),{by:e,from:new Date(r).toISOString(),to:new Date(n).toISOString()}].slice(-M);l.mkdirSync(d.dirname(s),{recursive:!0}),l.writeFileSync(s,`${JSON.stringify(o,null,2)}
3
+ import{V as x}from"./chunk-ZQWOS5LL.js";import{f as y,g as b,h as w}from"./chunk-XDBPLBUZ.js";import{b as S}from"./chunk-FER2NQNY.js";import{a,f as h}from"./chunk-F4IMOZQW.js";h();import*as l from"node:fs";import*as m from"node:os";import*as d from"node:path";var M=10,j=2e3,A=5*6e4;function v(t){return d.join(S(t),"starts.json")}a(v,"startsFile");function D(t){try{let e=JSON.parse(l.readFileSync(v(t),"utf8"));return Array.isArray(e)?e:[]}catch{return[]}}a(D,"readStarts");function C(t,e,r,n=Date.now()){try{let s=v(t),o=[...D(t),{by:e,from:new Date(r).toISOString(),to:new Date(n).toISOString()}].slice(-M);l.mkdirSync(d.dirname(s),{recursive:!0}),l.writeFileSync(s,`${JSON.stringify(o,null,2)}
4
4
  `)}catch{}}a(C,"recordStart");async function W(t,e,r){let n=Date.now();try{return await r()}finally{C(t,e,n)}}a(W,"withStartRecord");function O(t,e){for(let r=e.length-1;r>=0;r--){let n=e[r];if(t>=Date.parse(n.from)-j&&t<=Date.parse(n.to)+j)return n.by}return"person"}a(O,"startedBy");function L(t,e,r){return t.state==="restarting"?!0:!e||e.restartCount===0?!1:t.state!=="running"||r-e.startedAt<A}a(L,"isCrashLoop");function P(t){return t.state==="running"||t.state==="restarting"||t.state==="exited"&&t.exitCode!==0}a(P,"worthInspecting");function k(t,e,r,n){let s=new Map,o=new Map;for(let c of t){let i=c.labels["com.docker.compose.project"];if(!i)continue;let f=s.get(i)??{started:null,crashLoops:[]};s.set(i,f);let u=e.get(c.name);if(L(c,u,n)&&f.crashLoops.push({service:c.service,restarts:u?.restartCount??0,lastLog:null}),c.state!=="running"||!u||Number.isNaN(u.startedAt))continue;let g=o.get(i);(!g||u.startedAt<g.at)&&o.set(i,{at:u.startedAt,workingDir:c.labels["com.docker.compose.project.working_dir"]??""})}for(let[c,{at:i,workingDir:f}]of o){let u=s.get(c);u.started={at:new Date(i).toISOString(),by:f?O(i,r(f)):"person"}}for(let c of s.values())c.crashLoops.sort((i,f)=>i.service.localeCompare(f.service));return s}a(k,"healthOf");async function B(t,e=Date.now()){let r=t.filter(P),n=await b(r.map(o=>o.name)),s=k(r,n,D,e);return await Promise.all(r.filter(o=>L(o,n.get(o.name),e)).map(async o=>{let c=s.get(o.labels["com.docker.compose.project"])?.crashLoops.find(i=>i.service===o.service&&i.lastLog===null);c&&(c.lastLog=await w(o.name,n.get(o.name)?.tty??!1))})),s}a(B,"projectHealth");var p=a(t=>Math.round(t*10)/10,"round1");function _(t){let e={};for(let r of t){let n=r.labels["com.docker.compose.project"];if(!n)continue;let s=e[n]??={cpuPercent:0,memMib:0};s.cpuPercent+=r.cpuPercent,s.memMib+=r.memMib}for(let r of Object.values(e))r.cpuPercent=p(r.cpuPercent),r.memMib=Math.round(r.memMib);return e}a(_,"usageByProject");function N(t,e=m.loadavg(),r=m.availableParallelism()){let n=t.filter(s=>{let o=x(s.labels,"feature");return o&&o!=="infra"});return{load:[p(e[0]),p(e[1]),p(e[2])],cores:r,featureCpuPercent:p(n.reduce((s,o)=>s+o.cpuPercent,0))}}a(N,"hostSummary");function H(t,e){let[r,n,s]=t.map(o=>p(o).toFixed(1));return`host load ${r} / ${n} / ${s} (1, 5, 15 min) on ${e} cores`}a(H,"loadNote");async function J(t=2e4){let e=await y(AbortSignal.timeout(t));return{projects:_(e),host:N(e)}}a(J,"getWorkspaceResources");export{W as a,B as b,H as c,J as d};
5
- //# sourceMappingURL=chunk-4T7IEMCY.js.map
5
+ //# sourceMappingURL=chunk-4NCV6JR7.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{S as f}from"./chunk-6AVTZQKD.js";import{a as c,f as m}from"./chunk-AUCJEXWT.js";m();function u(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}c(u,"isDict");function p(n,t){if(!u(n))return null;let e=n.archetype;if(e!=null){t==null&&(t=f());let i=t[e];return u(i)?i:null}let r=n.standards;return r?.length?{standards:Array.from(r)}:null}c(p,"resolveServiceArchetype");function j(n,t){let e=p(n,t);return Array.from(e?.standards??[])}c(j,"serviceStandards");function v(n,t,e){if(!u(t)||S(t)!==null)return null;let r=t.test;if(r)return String(r);let o=p(t,e)?.test;return o?String(o).split("{service}").join(n):null}c(v,"serviceTestCommand");function S(n){let t=u(n)?/^none(?::\s*(.*))?$/i.exec(String(n.test??"").trim()):null;return t?t[1]?.trim()||"test: none":null}c(S,"serviceNoTests");function k(n,t,e){return`docker exec ${n}-${t} sh -c '${e}'`}c(k,"containerTestCommand");function x(n){return!/[|;&{}()`\n]|\$\(/.test(n.split("&&").join(""))}c(x,"isPlainChain");function C(n,t,e){let r=e?`${e} && ${t}`:t;return n?x(r)&&!r.includes("&&")?`${n} ${r}`:`${n} sh -c '${r.split("'").join("'\\''")}'`:r}c(C,"wrappedTestCommand");function g(n,t){if(!u(n))return null;let e=n.validate;if(e)return String(e);let r=p(n,t)?.validate;return r?String(r):null}c(g,"serviceValidation");function y(n,t,e){return e?.length?[...e]:n.flatMap(r=>t[r]?.services??[])}c(y,"candidateServiceNames");function b(n,t,e,r=new Set){e==null&&(e=f());let i=[];for(let o of[...new Set(n)].sort()){let s=t[o];if(!u(s))continue;let l=g(s,e);i.push({service:o,repo:String(s.repo??""),path:String(s.path??"."),test:v(o,s,e),validate:l??(r.has(o)?"URL health check (see Quick Health Checks)":"No validation guidance registered in services.yaml; say so instead of inventing one")})}return i}c(b,"validationRows");function $(n,t,e,r,i){i==null&&(i=f());let o=y(n,e,r),s={};for(let a of o){let h=t[a];if(!u(h))continue;let d=h.archetype;d&&d in i&&(s[d]??=[]).push(a)}let l={};for(let a of Object.keys(s).sort())l[a]=[...new Set(s[a])].sort();return l}c($,"resolvePresentArchetypes");function T(n,t,e,r,i){let o=(t.SERVICES??"").split(",").map(s=>s.trim()).filter(s=>s);return $(n.map(([s])=>s),e,r,o,i)}c(T,"presentArchetypes");function N(n,t){let e=[];for(let[r,i]of Object.entries(n)){if(!u(i))continue;let o=i.archetype;o!=null&&(o in t||e.push(`services.yaml: service '${r}' references unknown archetype '${o}' \u2014 no \`archetypes.${o}\` entry`),i.standards?.length&&e.push(`services.yaml: service '${r}' declares both \`archetype:\` and legacy \`standards:\` \u2014 drop \`standards:\` (the archetype wins)`))}return e}c(N,"validateServiceArchetypes");export{p as a,j as b,v as c,S as d,k as e,x as f,C as g,g as h,y as i,b as j,T as k,N as l};
4
- //# sourceMappingURL=chunk-ICUBRHZI.js.map
3
+ import{S as f}from"./chunk-ULNRIE5C.js";import{a as c,f as m}from"./chunk-F4IMOZQW.js";m();function u(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}c(u,"isDict");function p(n,t){if(!u(n))return null;let e=n.archetype;if(e!=null){t==null&&(t=f());let i=t[e];return u(i)?i:null}let r=n.standards;return r?.length?{standards:Array.from(r)}:null}c(p,"resolveServiceArchetype");function j(n,t){let e=p(n,t);return Array.from(e?.standards??[])}c(j,"serviceStandards");function v(n,t,e){if(!u(t)||S(t)!==null)return null;let r=t.test;if(r)return String(r);let o=p(t,e)?.test;return o?String(o).split("{service}").join(n):null}c(v,"serviceTestCommand");function S(n){let t=u(n)?/^none(?::\s*(.*))?$/i.exec(String(n.test??"").trim()):null;return t?t[1]?.trim()||"test: none":null}c(S,"serviceNoTests");function k(n,t,e){return`docker exec ${n}-${t} sh -c '${e}'`}c(k,"containerTestCommand");function x(n){return!/[|;&{}()`\n]|\$\(/.test(n.split("&&").join(""))}c(x,"isPlainChain");function C(n,t,e){let r=e?`${e} && ${t}`:t;return n?x(r)&&!r.includes("&&")?`${n} ${r}`:`${n} sh -c '${r.split("'").join("'\\''")}'`:r}c(C,"wrappedTestCommand");function g(n,t){if(!u(n))return null;let e=n.validate;if(e)return String(e);let r=p(n,t)?.validate;return r?String(r):null}c(g,"serviceValidation");function y(n,t,e){return e?.length?[...e]:n.flatMap(r=>t[r]?.services??[])}c(y,"candidateServiceNames");function b(n,t,e,r=new Set){e==null&&(e=f());let i=[];for(let o of[...new Set(n)].sort()){let s=t[o];if(!u(s))continue;let l=g(s,e);i.push({service:o,repo:String(s.repo??""),path:String(s.path??"."),test:v(o,s,e),validate:l??(r.has(o)?"URL health check (see Quick Health Checks)":"No validation guidance registered in services.yaml; say so instead of inventing one")})}return i}c(b,"validationRows");function $(n,t,e,r,i){i==null&&(i=f());let o=y(n,e,r),s={};for(let a of o){let h=t[a];if(!u(h))continue;let d=h.archetype;d&&d in i&&(s[d]??=[]).push(a)}let l={};for(let a of Object.keys(s).sort())l[a]=[...new Set(s[a])].sort();return l}c($,"resolvePresentArchetypes");function T(n,t,e,r,i){let o=(t.SERVICES??"").split(",").map(s=>s.trim()).filter(s=>s);return $(n.map(([s])=>s),e,r,o,i)}c(T,"presentArchetypes");function N(n,t){let e=[];for(let[r,i]of Object.entries(n)){if(!u(i))continue;let o=i.archetype;o!=null&&(o in t||e.push(`services.yaml: service '${r}' references unknown archetype '${o}' \u2014 no \`archetypes.${o}\` entry`),i.standards?.length&&e.push(`services.yaml: service '${r}' declares both \`archetype:\` and legacy \`standards:\` \u2014 drop \`standards:\` (the archetype wins)`))}return e}c(N,"validateServiceArchetypes");export{p as a,j as b,v as c,S as d,k as e,x as f,C as g,g as h,y as i,b as j,T as k,N as l};
4
+ //# sourceMappingURL=chunk-5PLIRGOA.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{b as f}from"./chunk-YRQU5A47.js";import{a as n,f as m}from"./chunk-AUCJEXWT.js";m();import{randomBytes as u}from"node:crypto";import*as r from"node:fs";import*as p from"node:os";import*as o from"node:path";var h="token";function a(){return o.join(f(p.homedir()),"tokens")}n(a,"tokensDir");function l(e){return o.join(f(e),h)}n(l,"workspaceTokenFile");function x(e,s){let i=o.join(a(),e),t="";try{t=r.readFileSync(i,"utf8").trim()}catch{}t||=u(32).toString("hex");for(let c of[i,l(s)])r.mkdirSync(o.dirname(c),{recursive:!0}),r.writeFileSync(c,`${t}
3
+ import{b as f}from"./chunk-FER2NQNY.js";import{a as n,f as m}from"./chunk-F4IMOZQW.js";m();import{randomBytes as u}from"node:crypto";import*as r from"node:fs";import*as p from"node:os";import*as o from"node:path";var h="token";function a(){return o.join(f(p.homedir()),"tokens")}n(a,"tokensDir");function l(e){return o.join(f(e),h)}n(l,"workspaceTokenFile");function x(e,s){let i=o.join(a(),e),t="";try{t=r.readFileSync(i,"utf8").trim()}catch{}t||=u(32).toString("hex");for(let c of[i,l(s)])r.mkdirSync(o.dirname(c),{recursive:!0}),r.writeFileSync(c,`${t}
4
4
  `,{mode:384}),r.chmodSync(c,384);return t}n(x,"mintWorkspaceToken");function F(e){r.rmSync(o.join(a(),e),{force:!0})}n(F,"revokeWorkspaceToken");function T(e){let s=new Set(r.readdirSync(e,{withFileTypes:!0}).filter(t=>t.isDirectory()||t.isSymbolicLink()&&y(o.join(e,t.name))).map(t=>t.name)),i=[];try{i=r.readdirSync(a())}catch{}if(i.length&&!s.size)throw new Error(`no workspace folders found under ${e}`);return i.filter(t=>!s.has(t)).sort()}n(T,"staleTokens");function y(e){try{return r.statSync(e).isDirectory()}catch{return!1}}n(y,"isDir");export{a,l as b,x as c,F as d,T as e};
5
- //# sourceMappingURL=chunk-MQ6R526K.js.map
5
+ //# sourceMappingURL=chunk-5QV4XDJZ.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{b as C,l as G}from"./chunk-ICUBRHZI.js";import{m as x}from"./chunk-7EGC7C44.js";import{d as g,e as P,u as L}from"./chunk-ASF553GS.js";import{G as F,M as W,S as T,a as X}from"./chunk-6AVTZQKD.js";import{b as I}from"./chunk-YRQU5A47.js";import{a,e as Q,f as O}from"./chunk-AUCJEXWT.js";O();var K=Q(X(),1);import*as d from"node:fs";import*as u from"node:path";O();import*as D from"node:fs";import*as y from"node:path";var ee=5;function te(t){let e=t.trim().replace(/\.git$/,""),n=/^(?:ssh:\/\/)?git@([^:/]+)[:/](.+)$/.exec(e);return n?`https://${n[1]}/${n[2]}`:/^https?:\/\//.test(e)?e:""}a(te,"httpsRemote");function ne(t=g()){let e=a((...i)=>{try{let r=x(["git","-C",t,...i],{capture:!0,timeout:ee});return r.status===0?r.stdout.trim():""}catch{return""}},"git"),n=te(e("remote","get-url","origin"));return n?{base:n,prefix:e("rev-parse","--show-prefix").replace(/\/+$/,"")}:null}a(ne,"standardsSource");function H(t,e,n="blob"){if(!t)return"";let i=y.posix.normalize(y.posix.join(t.prefix,e)).replace(/\/+$/,"");return i==="."?`${t.base}/${n}/HEAD`:`${t.base}/${n}/HEAD/${i}`}a(H,"standardsUrl");function re(){let t=L();return t?`https://github.com/${t}`:""}a(re,"serviceRepoBase");var se=`<!--
3
+ import{b as C,l as G}from"./chunk-5PLIRGOA.js";import{m as x}from"./chunk-X57IXE7Q.js";import{d as g,e as P,u as L}from"./chunk-CB4VFJEL.js";import{G as F,M as W,S as T,a as X}from"./chunk-ULNRIE5C.js";import{b as I}from"./chunk-FER2NQNY.js";import{a,e as Q,f as O}from"./chunk-F4IMOZQW.js";O();var K=Q(X(),1);import*as d from"node:fs";import*as u from"node:path";O();import*as D from"node:fs";import*as y from"node:path";var ee=5;function te(t){let e=t.trim().replace(/\.git$/,""),n=/^(?:ssh:\/\/)?git@([^:/]+)[:/](.+)$/.exec(e);return n?`https://${n[1]}/${n[2]}`:/^https?:\/\//.test(e)?e:""}a(te,"httpsRemote");function ne(t=g()){let e=a((...i)=>{try{let r=x(["git","-C",t,...i],{capture:!0,timeout:ee});return r.status===0?r.stdout.trim():""}catch{return""}},"git"),n=te(e("remote","get-url","origin"));return n?{base:n,prefix:e("rev-parse","--show-prefix").replace(/\/+$/,"")}:null}a(ne,"standardsSource");function H(t,e,n="blob"){if(!t)return"";let i=y.posix.normalize(y.posix.join(t.prefix,e)).replace(/\/+$/,"");return i==="."?`${t.base}/${n}/HEAD`:`${t.base}/${n}/HEAD/${i}`}a(H,"standardsUrl");function re(){let t=L();return t?`https://github.com/${t}`:""}a(re,"serviceRepoBase");var se=`<!--
4
4
  AUTO-GENERATED FILE \u2014 DO NOT EDIT BY HAND.
5
5
  Source: {source} (edit that file instead)
6
6
  Generator: werkmeister workspace init / werkmeister skills sync
@@ -28,4 +28,4 @@ Full file: \`${n}\`${c}
28
28
  `))return{};let n=e.indexOf(`
29
29
  ---`,4);if(n===-1)return{};let i;try{i=K.parse(e.slice(4,n))}catch{return{}}return R(i)?i:{}}a(w,"parseFrontmatter");function ge(t,e,n){n==null&&(n=T());let i=G(t,n);for(let r of Object.keys(n).sort()){let s=n[r];if(R(s))for(let o of s.standards??[])o in e||i.push(`services.yaml: archetype '${r}' lists unknown standard '${o}' \u2014 no docs/standards/${o}.md with \`domain: ${o}\``)}for(let[r,s]of Object.entries(t))if(!(!R(s)||s.archetype))for(let o of s.standards??[])o in e||i.push(`services.yaml: service '${r}' lists unknown standard '${o}' \u2014 no docs/standards/${o}.md with \`domain: ${o}\``);return i}a(ge,"validateServiceStandards");function z(t){t==null&&(t=g());let e=[];if(!(d.existsSync(t)&&d.statSync(t).isDirectory()))return e;for(let n of J(t)){let i=u.relative(t,n),r=w(n),s=r.domain;if(!(typeof s=="string"&&s.trim())){e.push(`${i}: unparseable frontmatter or missing \`domain:\``);continue}let o=r.summary;typeof o=="string"&&o.trim()||e.push(`${i}: missing or empty \`summary:\``);let c=r.applies_to;Array.isArray(c)&&c.length&&c.every(h=>typeof h=="string"&&h.trim())||e.push(`${i}: \`applies_to:\` must be a non-empty list of non-empty globs (empty means the standard never loads and never re-injects)`);let f=r.phase;f!=null&&!(Array.isArray(f)&&f.length&&f.every(h=>typeof h=="string"&&h.trim()))&&e.push(`${i}: \`phase:\` if present must be a non-empty list of strings (a scalar string silently breaks skill_gen's substring gate)`);let m=r.universal;m!=null&&!Number.isInteger(m)&&e.push(`${i}: \`universal:\` if present must be an integer (its load order) \u2014 \`universal: true\` reads as universal but silently is not`);let p=u.basename(n)==="STANDARD.md"?u.basename(u.dirname(n)):u.basename(n,".md");s.trim()!==p&&e.push(`${i}: \`domain: ${s}\` does not match its location (expected \`${p}\` \u2014 w9r-<domain>-standard would diverge from where the standard lives)`)}return e}a(z,"validateStandardModules");function _e(){let t=g(),e=$e(),n=P();if(n)return{dir:t,repoTrees:e,moduleCount:0,errors:[n]};let i=k();if(!Object.keys(i).length)return{dir:t,repoTrees:e,moduleCount:0,errors:[`no standard modules found in ${t}`]};let r={...i},s=[];for(let o of e){let c=u.basename(u.resolve(o,"..","..")),f=N(o),m=a(p=>`${c}: ${p}`,"tag");s.push(...z(o).map(m)),s.push(...E(f).map(m));for(let p of Object.keys(f))p in i?s.push(m(`\`${p}\` is also a module in ${t}, which wins; rename this one`)):r[p]=f[p]}return{dir:t,repoTrees:e,moduleCount:Object.keys(r).length,errors:[...z(),...E(i),...s,...ge(W(),r)]}}a(_e,"checkStandards");function $e(t=F()){let e;try{e=d.readdirSync(t).sort()}catch{return[]}return e.map(n=>u.join(t,n)).filter(n=>d.statSync(u.join(n,".git"),{throwIfNoEntry:!1})?.isDirectory()).map(Y).filter(n=>d.statSync(n,{throwIfNoEntry:!1})?.isDirectory())}a($e,"repoStandardTrees");function be(t,e){if(!t)return new Set;let n=t.toLowerCase(),i=new Set;for(let[r,s]of Object.entries(e))(s.task_signatures??[]).some(c=>n.includes(String(c).toLowerCase()))&&i.add(r);return i}a(be,"domainsMatchingTaskText");function Me(t,e,n,i,r,s,o){r==null&&(r=k()),o==null&&(o=T());let c;s?.length?c=[...s]:c=t.flatMap(l=>n[l]?.services??[]);let f=new Set;for(let l of c)for(let v of C(e[l],o))f.add(v);let m=i??{},p=m.standards_override??{};for(let l of p.add??[])f.add(l);for(let[l,v]of Object.entries(r))v.repo&&f.add(l);let h=["starting_prompt","task","description"].map(l=>m[l]?String(m[l]):"").join(" ");for(let l of be(h,r))f.add(l);for(let l of p.remove??[])f.delete(l);let $=_(r);for(let l of $)f.add(l);for(let l of[...f])l in r||f.delete(l);let M=a(l=>$.includes(l)?[0,$.indexOf(l),""]:[1,0,l],"sortKey"),q=[...f].sort((l,v)=>{let b=M(l),S=M(v);return b[0]!==S[0]?b[0]-S[0]:b[1]!==S[1]?b[1]-S[1]:b[2]<S[2]?-1:b[2]>S[2]?1:0}),V=Object.keys(r).filter(l=>!f.has(l)).sort();return[q,V]}a(Me,"resolveActiveStandards");function Ie(t,e,n=null){let i=_(e),r={};for(let o of t)i.includes(o)||(r[o]={applies_to:Array.from(e[o]?.applies_to??[]),summary:String(e[o]?.summary??"").trim()});let s={generated_by:"werkmeister workspace init",universal:t.filter(o=>i.includes(o)),domains:r};return n&&(s.phase_gate={...n}),s}a(Ie,"buildStandardsManifest");function Fe(t,e){let n=u.join(I(t),"standards.json");return d.mkdirSync(u.dirname(n),{recursive:!0}),d.writeFileSync(n,JSON.stringify(e,null,2)+`
30
30
  `),n}a(Fe,"writeStandardsManifest");export{ne as a,H as b,j as c,we as d,E as e,_ as f,me as g,U as h,Ne as i,k as j,ge as k,_e as l,Me as m,Ie as n,Fe as o};
31
- //# sourceMappingURL=chunk-IRJVVN7Y.js.map
31
+ //# sourceMappingURL=chunk-5X3N6AZP.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as r,f as c}from"./chunk-AUCJEXWT.js";c();import*as t from"node:fs";import*as s from"node:path";var i="compose.yml",p="docker-compose.yml";function f(o){try{return t.statSync(o).isFile()}catch{return!1}}r(f,"isFile");function m(o){for(let e of[i,p]){let n=s.join(o,e);if(f(n))return n}return null}r(m,"findWorkspaceCompose");function u(o){let e=s.join(o,p),n=s.join(o,i);f(e)&&!t.existsSync(n)&&t.renameSync(e,n)}r(u,"migrateWorkspaceCompose");export{i as a,p as b,m as c,u as d};
4
- //# sourceMappingURL=chunk-ECZBAD7L.js.map
3
+ import{a as r,f as c}from"./chunk-F4IMOZQW.js";c();import*as t from"node:fs";import*as s from"node:path";var i="compose.yml",p="docker-compose.yml";function f(o){try{return t.statSync(o).isFile()}catch{return!1}}r(f,"isFile");function m(o){for(let e of[i,p]){let n=s.join(o,e);if(f(n))return n}return null}r(m,"findWorkspaceCompose");function u(o){let e=s.join(o,p),n=s.join(o,i);f(e)&&!t.existsSync(n)&&t.renameSync(e,n)}r(u,"migrateWorkspaceCompose");export{i as a,p as b,m as c,u as d};
4
+ //# sourceMappingURL=chunk-76FS62DP.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{d as rt}from"./chunk-ODW2JE2W.js";import{a as Xe,b as M,c as Ze,e as et,g as tt}from"./chunk-LTYMB2XG.js";import{d as Qe,o as qe}from"./chunk-ULR6EH4M.js";import{b as ze,c as ce,g as ae,h as Je,i as fe,j as Ye}from"./chunk-KSUASOM5.js";import{n as Ke}from"./chunk-5VOJOWY3.js";import{r as se,s as ie,u as Ve}from"./chunk-DGSP7G7R.js";import{c as ne,d as Le}from"./chunk-3GVGMLBB.js";import{c as Oe}from"./chunk-SFEYI3ND.js";import{h as je}from"./chunk-IRJVVN7Y.js";import{k as Ae}from"./chunk-ICUBRHZI.js";import{A as Ne,F as te,G as Fe,I as z,K as re,N as Me,R as Ue,S as oe,i as Te,o as j,p as We,w as Ie,y as ee,z as De}from"./chunk-4C7VSSUG.js";import{b as Ge,e as He,g as Be}from"./chunk-HDFC52G6.js";import{a as B}from"./chunk-ECZBAD7L.js";import{m as K}from"./chunk-7EGC7C44.js";import{a as Pe}from"./chunk-A4JOBS3X.js";import{b as be}from"./chunk-DXS5IA3V.js";import{b as Re,c as Ce}from"./chunk-MQ6R526K.js";import{o as _e,p as Z,s as xe}from"./chunk-ASF553GS.js";import{b as ve}from"./chunk-Y363LJO2.js";import{G as X,M as Se,S as $e,T as Ee,a as Rt,h as A,j as k,k as y,l as g,m as V,n as F,o as ge,r as ye,s as q}from"./chunk-6AVTZQKD.js";import{b as N}from"./chunk-YRQU5A47.js";import{a as i,e as xt,f as C}from"./chunk-AUCJEXWT.js";C();import*as T from"node:fs";import*as J from"node:path";var ot=i(e=>J.join(N(e),"issue.md"),"issueCopyPath"),U=class extends Error{static{i(this,"IssueFetchError")}};async function nt(e,r=()=>new Date,o=j({text:e})){let t=await o.fetchIssue(e);if(!t)throw new U(`couldn't read ${e} from ${o.label}`);return{ref:t.ref,url:t.url??o.url(t.ref),tracker:o.id,title:t.title??"",status:t.status??"",body:t.description??"",comments:t.comments??[],fetchedAt:r().toISOString()}}i(nt,"fetchIssueSnapshot");var ue=`
3
+ import{d as rt}from"./chunk-UJ6DPS4B.js";import{a as Xe,b as M,c as Ze,e as et,g as tt}from"./chunk-JGUVBPJI.js";import{d as Qe,o as qe}from"./chunk-EAQJ3OP2.js";import{b as ze,c as ce,g as ae,h as Je,i as fe,j as Ye}from"./chunk-KQ3OMGNX.js";import{n as Ke}from"./chunk-CTD3M3ZO.js";import{r as se,s as ie,u as Ve}from"./chunk-WP5YT7VS.js";import{c as ne,d as Le}from"./chunk-LOARA444.js";import{c as Oe}from"./chunk-RTBYODJT.js";import{h as je}from"./chunk-5X3N6AZP.js";import{k as Ae}from"./chunk-5PLIRGOA.js";import{A as Ne,F as te,G as Fe,I as z,K as re,N as Me,R as Ue,S as oe,i as Te,o as j,p as We,w as Ie,y as ee,z as De}from"./chunk-NORRRFBV.js";import{b as Ge,e as He,g as Be}from"./chunk-ZQWOS5LL.js";import{a as B}from"./chunk-76FS62DP.js";import{m as K}from"./chunk-X57IXE7Q.js";import{a as Pe}from"./chunk-XY5RD66R.js";import{b as be}from"./chunk-UT262DG6.js";import{b as Re,c as Ce}from"./chunk-5QV4XDJZ.js";import{o as _e,p as Z,s as xe}from"./chunk-CB4VFJEL.js";import{b as ve}from"./chunk-ZHIPODEL.js";import{G as X,M as Se,S as $e,T as Ee,a as Rt,h as A,j as k,k as y,l as g,m as V,n as F,o as ge,r as ye,s as q}from"./chunk-ULNRIE5C.js";import{b as N}from"./chunk-FER2NQNY.js";import{a as i,e as xt,f as C}from"./chunk-F4IMOZQW.js";C();import*as T from"node:fs";import*as J from"node:path";var ot=i(e=>J.join(N(e),"issue.md"),"issueCopyPath"),U=class extends Error{static{i(this,"IssueFetchError")}};async function nt(e,r=()=>new Date,o=j({text:e})){let t=await o.fetchIssue(e);if(!t)throw new U(`couldn't read ${e} from ${o.label}`);return{ref:t.ref,url:t.url??o.url(t.ref),tracker:o.id,title:t.title??"",status:t.status??"",body:t.description??"",comments:t.comments??[],fetchedAt:r().toISOString()}}i(nt,"fetchIssueSnapshot");var ue=`
4
4
 
5
5
  ## Comments
6
6
  `;function Ct(e){let r=["---",`ref: ${e.ref}`,`url: ${e.url??""}`,`tracker: ${e.tracker}`,`status: ${e.status}`,`fetched: ${e.fetchedAt}`,"---","",`# ${e.title}`,"",e.body].join(`
@@ -33,4 +33,4 @@ ${A.BOLD}Workspace initialised.${A.RESET} Open a new Claude Code session from th
33
33
  ${A.BOLD}Workspace ready.${A.RESET} cd ${a} and open a Claude Code session from there.
34
34
 
35
35
  `),a):(g(`Workspace created at ${a}, but its containers are not set up: it has no slot (see the slot warning above). Free a slot with \`werkmeister feature down <feature>\`, then run \`werkmeister workspace init\` there.`),a)}i(Lr,"provisionWorkspace");export{U as a,nt as b,R as c,de as d,wt as e,Xt as f,Lr as g};
36
- //# sourceMappingURL=chunk-JVMT5KGE.js.map
36
+ //# sourceMappingURL=chunk-ACHONTIB.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as o,c as v,f}from"./chunk-AUCJEXWT.js";var et=v(C=>{"use strict";f();Object.defineProperty(C,"__esModule",{value:!0});C.regexpCode=C.getEsmExportName=C.getProperty=C.safeStringify=C.stringify=C.strConcat=C.addCodeArg=C.str=C._=C.nil=C._Code=C.Name=C.IDENTIFIER=C._CodeOrName=void 0;var Xe=class{static{o(this,"_CodeOrName")}};C._CodeOrName=Xe;C.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Se=class extends Xe{static{o(this,"Name")}constructor(e){if(super(),!C.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};C.Name=Se;var ee=class extends Xe{static{o(this,"_Code")}constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Se&&(r[s.str]=(r[s.str]||0)+1),r),{})}};C._Code=ee;C.nil=new ee("");function nn(t,...e){let r=[t[0]],s=0;for(;s<e.length;)fr(r,e[s]),r.push(t[++s]);return new ee(r)}o(nn,"_");C._=nn;var dr=new ee("+");function on(t,...e){let r=[Ye(t[0])],s=0;for(;s<e.length;)r.push(dr),fr(r,e[s]),r.push(dr,Ye(t[++s]));return Gi(r),new ee(r)}o(on,"str");C.str=on;function fr(t,e){e instanceof ee?t.push(...e._items):e instanceof Se?t.push(e):t.push(Wi(e))}o(fr,"addCodeArg");C.addCodeArg=fr;function Gi(t){let e=1;for(;e<t.length-1;){if(t[e]===dr){let r=Ji(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}o(Gi,"optimize");function Ji(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Se||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Se))return`"${t}${e.slice(1)}`}o(Ji,"mergeExprItems");function Bi(t,e){return e.emptyStr()?t:t.emptyStr()?e:on`${t}${e}`}o(Bi,"strConcat");C.strConcat=Bi;function Wi(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ye(Array.isArray(t)?t.join(","):t)}o(Wi,"interpolate");function Qi(t){return new ee(Ye(t))}o(Qi,"stringify");C.stringify=Qi;function Ye(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o(Ye,"safeStringify");C.safeStringify=Ye;function Zi(t){return typeof t=="string"&&C.IDENTIFIER.test(t)?new ee(`.${t}`):nn`[${t}]`}o(Zi,"getProperty");C.getProperty=Zi;function Xi(t){if(typeof t=="string"&&C.IDENTIFIER.test(t))return new ee(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}o(Xi,"getEsmExportName");C.getEsmExportName=Xi;function Yi(t){return new ee(t.toString())}o(Yi,"regexpCode");C.regexpCode=Yi});var mr=v(Q=>{"use strict";f();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var W=et(),hr=class extends Error{static{o(this,"ValueError")}constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ot;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ot||(Q.UsedValueState=Ot={}));Q.varKinds={const:new W.Name("const"),let:new W.Name("let"),var:new W.Name("var")};var kt=class{static{o(this,"Scope")}constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof W.Name?e:this.name(e)}name(e){return new W.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=kt;var qt=class extends W.Name{static{o(this,"ValueScopeName")}constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,W._)`.${new W.Name(r)}[${s}]`}};Q.ValueScopeName=qt;var ea=(0,W._)`\n`,pr=class extends kt{static{o(this,"ValueScope")}constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ea:W.nil}}get(){return this._scope}name(e){return new qt(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,a=(s=r.key)!==null&&s!==void 0?s:r.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,n);let u=this._scope[i]||(this._scope[i]=[]),d=u.length;return u[d]=r.ref,n.setValue(r,{property:i,itemIndex:d}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,W._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=W.nil;for(let a in e){let c=e[a];if(!c)continue;let u=s[a]=s[a]||new Map;c.forEach(d=>{if(u.has(d))return;u.set(d,Ot.Started);let l=r(d);if(l){let h=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,W._)`${i}${h} ${d} = ${l};${this.opts._n}`}else if(l=n?.(d))i=(0,W._)`${i}${l}${this.opts._n}`;else throw new hr(d);u.set(d,Ot.Completed)})}return i}};Q.ValueScope=pr});var q=v(k=>{"use strict";f();Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var j=et(),ne=mr(),ge=et();Object.defineProperty(k,"_",{enumerable:!0,get:o(function(){return ge._},"get")});Object.defineProperty(k,"str",{enumerable:!0,get:o(function(){return ge.str},"get")});Object.defineProperty(k,"strConcat",{enumerable:!0,get:o(function(){return ge.strConcat},"get")});Object.defineProperty(k,"nil",{enumerable:!0,get:o(function(){return ge.nil},"get")});Object.defineProperty(k,"getProperty",{enumerable:!0,get:o(function(){return ge.getProperty},"get")});Object.defineProperty(k,"stringify",{enumerable:!0,get:o(function(){return ge.stringify},"get")});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:o(function(){return ge.regexpCode},"get")});Object.defineProperty(k,"Name",{enumerable:!0,get:o(function(){return ge.Name},"get")});var Tt=mr();Object.defineProperty(k,"Scope",{enumerable:!0,get:o(function(){return Tt.Scope},"get")});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:o(function(){return Tt.ValueScope},"get")});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:o(function(){return Tt.ValueScopeName},"get")});Object.defineProperty(k,"varKinds",{enumerable:!0,get:o(function(){return Tt.varKinds},"get")});k.operators={GT:new j._Code(">"),GTE:new j._Code(">="),LT:new j._Code("<"),LTE:new j._Code("<="),EQ:new j._Code("==="),NEQ:new j._Code("!=="),NOT:new j._Code("!"),OR:new j._Code("||"),AND:new j._Code("&&"),ADD:new j._Code("+")};var he=class{static{o(this,"Node")}optimizeNodes(){return this}optimizeNames(e,r){return this}},yr=class extends he{static{o(this,"Def")}constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ne.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Me(this.rhs,e,r)),this}get names(){return this.rhs instanceof j._CodeOrName?this.rhs.names:{}}},It=class extends he{static{o(this,"Assign")}constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof j.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Me(this.rhs,e,r),this}get names(){let e=this.lhs instanceof j.Name?{}:{...this.lhs.names};return Rt(e,this.rhs)}},gr=class extends It{static{o(this,"AssignOp")}constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},_r=class extends he{static{o(this,"Label")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},$r=class extends he{static{o(this,"Break")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},vr=class extends he{static{o(this,"Throw")}constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},wr=class extends he{static{o(this,"AnyCode")}constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Me(this.code,e,r),this}get names(){return this.code instanceof j._CodeOrName?this.code.names:{}}},tt=class extends he{static{o(this,"ParentNode")}constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(ta(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Oe(e,r.names),{})}},pe=class extends tt{static{o(this,"BlockNode")}render(e){return"{"+e._n+super.render(e)+"}"+e._n}},br=class extends tt{static{o(this,"Root")}},De=class extends pe{static{o(this,"Else")}};De.kind="else";var Pe=class t extends pe{static{o(this,"If")}constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new De(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(an(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Me(this.condition,e,r),this}get names(){let e=super.names;return Rt(e,this.condition),this.else&&Oe(e,this.else.names),e}};Pe.kind="if";var Ne=class extends pe{static{o(this,"For")}};Ne.kind="for";var Er=class extends Ne{static{o(this,"ForLoop")}constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Me(this.iteration,e,r),this}get names(){return Oe(super.names,this.iteration.names)}},Sr=class extends Ne{static{o(this,"ForRange")}constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ne.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=Rt(super.names,this.from);return Rt(e,this.to)}},jt=class extends Ne{static{o(this,"ForIter")}constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Me(this.iterable,e,r),this}get names(){return Oe(super.names,this.iterable.names)}},rt=class extends pe{static{o(this,"Func")}constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};rt.kind="func";var st=class extends tt{static{o(this,"Return")}render(e){return"return "+super.render(e)}};st.kind="return";var Pr=class extends pe{static{o(this,"Try")}render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Oe(e,this.catch.names),this.finally&&Oe(e,this.finally.names),e}},nt=class extends pe{static{o(this,"Catch")}constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};nt.kind="catch";var ot=class extends pe{static{o(this,"Finally")}render(e){return"finally"+super.render(e)}};ot.kind="finally";var Nr=class{static{o(this,"CodeGen")}constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
3
+ import{a as o,c as v,f}from"./chunk-F4IMOZQW.js";var et=v(C=>{"use strict";f();Object.defineProperty(C,"__esModule",{value:!0});C.regexpCode=C.getEsmExportName=C.getProperty=C.safeStringify=C.stringify=C.strConcat=C.addCodeArg=C.str=C._=C.nil=C._Code=C.Name=C.IDENTIFIER=C._CodeOrName=void 0;var Xe=class{static{o(this,"_CodeOrName")}};C._CodeOrName=Xe;C.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Se=class extends Xe{static{o(this,"Name")}constructor(e){if(super(),!C.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};C.Name=Se;var ee=class extends Xe{static{o(this,"_Code")}constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Se&&(r[s.str]=(r[s.str]||0)+1),r),{})}};C._Code=ee;C.nil=new ee("");function nn(t,...e){let r=[t[0]],s=0;for(;s<e.length;)fr(r,e[s]),r.push(t[++s]);return new ee(r)}o(nn,"_");C._=nn;var dr=new ee("+");function on(t,...e){let r=[Ye(t[0])],s=0;for(;s<e.length;)r.push(dr),fr(r,e[s]),r.push(dr,Ye(t[++s]));return Gi(r),new ee(r)}o(on,"str");C.str=on;function fr(t,e){e instanceof ee?t.push(...e._items):e instanceof Se?t.push(e):t.push(Wi(e))}o(fr,"addCodeArg");C.addCodeArg=fr;function Gi(t){let e=1;for(;e<t.length-1;){if(t[e]===dr){let r=Ji(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}o(Gi,"optimize");function Ji(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Se||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Se))return`"${t}${e.slice(1)}`}o(Ji,"mergeExprItems");function Bi(t,e){return e.emptyStr()?t:t.emptyStr()?e:on`${t}${e}`}o(Bi,"strConcat");C.strConcat=Bi;function Wi(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Ye(Array.isArray(t)?t.join(","):t)}o(Wi,"interpolate");function Qi(t){return new ee(Ye(t))}o(Qi,"stringify");C.stringify=Qi;function Ye(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}o(Ye,"safeStringify");C.safeStringify=Ye;function Zi(t){return typeof t=="string"&&C.IDENTIFIER.test(t)?new ee(`.${t}`):nn`[${t}]`}o(Zi,"getProperty");C.getProperty=Zi;function Xi(t){if(typeof t=="string"&&C.IDENTIFIER.test(t))return new ee(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}o(Xi,"getEsmExportName");C.getEsmExportName=Xi;function Yi(t){return new ee(t.toString())}o(Yi,"regexpCode");C.regexpCode=Yi});var mr=v(Q=>{"use strict";f();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var W=et(),hr=class extends Error{static{o(this,"ValueError")}constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ot;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ot||(Q.UsedValueState=Ot={}));Q.varKinds={const:new W.Name("const"),let:new W.Name("let"),var:new W.Name("var")};var kt=class{static{o(this,"Scope")}constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof W.Name?e:this.name(e)}name(e){return new W.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=kt;var qt=class extends W.Name{static{o(this,"ValueScopeName")}constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,W._)`.${new W.Name(r)}[${s}]`}};Q.ValueScopeName=qt;var ea=(0,W._)`\n`,pr=class extends kt{static{o(this,"ValueScope")}constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ea:W.nil}}get(){return this._scope}name(e){return new qt(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,a=(s=r.key)!==null&&s!==void 0?s:r.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,n);let u=this._scope[i]||(this._scope[i]=[]),d=u.length;return u[d]=r.ref,n.setValue(r,{property:i,itemIndex:d}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,W._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=W.nil;for(let a in e){let c=e[a];if(!c)continue;let u=s[a]=s[a]||new Map;c.forEach(d=>{if(u.has(d))return;u.set(d,Ot.Started);let l=r(d);if(l){let h=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,W._)`${i}${h} ${d} = ${l};${this.opts._n}`}else if(l=n?.(d))i=(0,W._)`${i}${l}${this.opts._n}`;else throw new hr(d);u.set(d,Ot.Completed)})}return i}};Q.ValueScope=pr});var q=v(k=>{"use strict";f();Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var j=et(),ne=mr(),ge=et();Object.defineProperty(k,"_",{enumerable:!0,get:o(function(){return ge._},"get")});Object.defineProperty(k,"str",{enumerable:!0,get:o(function(){return ge.str},"get")});Object.defineProperty(k,"strConcat",{enumerable:!0,get:o(function(){return ge.strConcat},"get")});Object.defineProperty(k,"nil",{enumerable:!0,get:o(function(){return ge.nil},"get")});Object.defineProperty(k,"getProperty",{enumerable:!0,get:o(function(){return ge.getProperty},"get")});Object.defineProperty(k,"stringify",{enumerable:!0,get:o(function(){return ge.stringify},"get")});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:o(function(){return ge.regexpCode},"get")});Object.defineProperty(k,"Name",{enumerable:!0,get:o(function(){return ge.Name},"get")});var Tt=mr();Object.defineProperty(k,"Scope",{enumerable:!0,get:o(function(){return Tt.Scope},"get")});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:o(function(){return Tt.ValueScope},"get")});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:o(function(){return Tt.ValueScopeName},"get")});Object.defineProperty(k,"varKinds",{enumerable:!0,get:o(function(){return Tt.varKinds},"get")});k.operators={GT:new j._Code(">"),GTE:new j._Code(">="),LT:new j._Code("<"),LTE:new j._Code("<="),EQ:new j._Code("==="),NEQ:new j._Code("!=="),NOT:new j._Code("!"),OR:new j._Code("||"),AND:new j._Code("&&"),ADD:new j._Code("+")};var he=class{static{o(this,"Node")}optimizeNodes(){return this}optimizeNames(e,r){return this}},yr=class extends he{static{o(this,"Def")}constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ne.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Me(this.rhs,e,r)),this}get names(){return this.rhs instanceof j._CodeOrName?this.rhs.names:{}}},It=class extends he{static{o(this,"Assign")}constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof j.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Me(this.rhs,e,r),this}get names(){let e=this.lhs instanceof j.Name?{}:{...this.lhs.names};return Rt(e,this.rhs)}},gr=class extends It{static{o(this,"AssignOp")}constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},_r=class extends he{static{o(this,"Label")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},$r=class extends he{static{o(this,"Break")}constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},vr=class extends he{static{o(this,"Throw")}constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},wr=class extends he{static{o(this,"AnyCode")}constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Me(this.code,e,r),this}get names(){return this.code instanceof j._CodeOrName?this.code.names:{}}},tt=class extends he{static{o(this,"ParentNode")}constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(ta(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Oe(e,r.names),{})}},pe=class extends tt{static{o(this,"BlockNode")}render(e){return"{"+e._n+super.render(e)+"}"+e._n}},br=class extends tt{static{o(this,"Root")}},De=class extends pe{static{o(this,"Else")}};De.kind="else";var Pe=class t extends pe{static{o(this,"If")}constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new De(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(an(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Me(this.condition,e,r),this}get names(){let e=super.names;return Rt(e,this.condition),this.else&&Oe(e,this.else.names),e}};Pe.kind="if";var Ne=class extends pe{static{o(this,"For")}};Ne.kind="for";var Er=class extends Ne{static{o(this,"ForLoop")}constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Me(this.iteration,e,r),this}get names(){return Oe(super.names,this.iteration.names)}},Sr=class extends Ne{static{o(this,"ForRange")}constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ne.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=Rt(super.names,this.from);return Rt(e,this.to)}},jt=class extends Ne{static{o(this,"ForIter")}constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Me(this.iterable,e,r),this}get names(){return Oe(super.names,this.iterable.names)}},rt=class extends pe{static{o(this,"Func")}constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};rt.kind="func";var st=class extends tt{static{o(this,"Return")}render(e){return"return "+super.render(e)}};st.kind="return";var Pr=class extends pe{static{o(this,"Try")}render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Oe(e,this.catch.names),this.finally&&Oe(e,this.finally.names),e}},nt=class extends pe{static{o(this,"Catch")}constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};nt.kind="catch";var ot=class extends pe{static{o(this,"Finally")}render(e){return"finally"+super.render(e)}};ot.kind="finally";var Nr=class{static{o(this,"CodeGen")}constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
4
4
  `:""},this._extScope=e,this._scope=new ne.Scope({parent:e}),this._nodes=[new br]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let i=this._scope.toName(r);return s!==void 0&&n&&(this._constants[i.str]=s),this._leafNode(new yr(e,i,s)),i}const(e,r,s){return this._def(ne.varKinds.const,e,r,s)}let(e,r,s){return this._def(ne.varKinds.let,e,r,s)}var(e,r,s){return this._def(ne.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new It(e,r,s))}add(e,r){return this._leafNode(new gr(e,k.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==j.nil&&this._leafNode(new wr(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,j.addCodeArg)(r,n));return r.push("}"),new j._Code(r)}if(e,r,s){if(this._blockNode(new Pe(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Pe(e))}else(){return this._elseNode(new De)}endIf(){return this._endBlockNode(Pe,De)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Er(e),r)}forRange(e,r,s,n,i=this.opts.es5?ne.varKinds.var:ne.varKinds.let){let a=this._scope.toName(e);return this._for(new Sr(i,a,r,s),()=>n(a))}forOf(e,r,s,n=ne.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=r instanceof j.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,j._)`${a}.length`,c=>{this.var(i,(0,j._)`${a}[${c}]`),s(i)})}return this._for(new jt("of",n,i,r),()=>s(i))}forIn(e,r,s,n=this.opts.es5?ne.varKinds.var:ne.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,j._)`Object.keys(${r})`,s);let i=this._scope.toName(e);return this._for(new jt("in",n,i,r),()=>s(i))}endFor(){return this._endBlockNode(Ne)}label(e){return this._leafNode(new _r(e))}break(e){return this._leafNode(new $r(e))}return(e){let r=new st;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(st)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Pr;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new nt(i),r(i)}return s&&(this._currNode=n.finally=new ot,this.code(s)),this._endBlockNode(nt,ot)}throw(e){return this._leafNode(new vr(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=j.nil,s,n){return this._blockNode(new rt(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(rt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Pe))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};k.CodeGen=Nr;function Oe(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}o(Oe,"addNames");function Rt(t,e){return e instanceof j._CodeOrName?Oe(t,e.names):t}o(Rt,"addExprNames");function Me(t,e,r){if(t instanceof j.Name)return s(t);if(!n(t))return t;return new j._Code(t._items.reduce((i,a)=>(a instanceof j.Name&&(a=s(a)),a instanceof j._Code?i.push(...a._items):i.push(a),i),[]));function s(i){let a=r[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function n(i){return i instanceof j._Code&&i._items.some(a=>a instanceof j.Name&&e[a.str]===1&&r[a.str]!==void 0)}}o(Me,"optimizeExpr");function ta(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}o(ta,"subtractNames");function an(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,j._)`!${Or(t)}`}o(an,"not");k.not=an;var ra=cn(k.operators.AND);function sa(...t){return t.reduce(ra)}o(sa,"and");k.and=sa;var na=cn(k.operators.OR);function oa(...t){return t.reduce(na)}o(oa,"or");k.or=oa;function cn(t){return(e,r)=>e===j.nil?r:r===j.nil?e:(0,j._)`${Or(e)} ${t} ${Or(r)}`}o(cn,"mappend");function Or(t){return t instanceof j.Name?t:(0,j._)`(${t})`}o(Or,"par")});var R=v(I=>{"use strict";f();Object.defineProperty(I,"__esModule",{value:!0});I.checkStrictMode=I.getErrorPath=I.Type=I.useFunc=I.setEvaluated=I.evaluatedPropsToName=I.mergeEvaluated=I.eachItem=I.unescapeJsonPointer=I.escapeJsonPointer=I.escapeFragment=I.unescapeFragment=I.schemaRefOrVal=I.schemaHasRulesButRef=I.schemaHasRules=I.checkUnknownRules=I.alwaysValidSchema=I.toHash=void 0;var M=q(),ia=et();function aa(t){let e={};for(let r of t)e[r]=!0;return e}o(aa,"toHash");I.toHash=aa;function ca(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(dn(t,e),!fn(e,t.self.RULES.all))}o(ca,"alwaysValidSchema");I.alwaysValidSchema=ca;function dn(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let i in e)n[i]||mn(t,`unknown keyword: "${i}"`)}o(dn,"checkUnknownRules");I.checkUnknownRules=dn;function fn(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}o(fn,"schemaHasRules");I.schemaHasRules=fn;function ua(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}o(ua,"schemaHasRulesButRef");I.schemaHasRulesButRef=ua;function la({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,M._)`${r}`}return(0,M._)`${t}${e}${(0,M.getProperty)(s)}`}o(la,"schemaRefOrVal");I.schemaRefOrVal=la;function da(t){return hn(decodeURIComponent(t))}o(da,"unescapeFragment");I.unescapeFragment=da;function fa(t){return encodeURIComponent(qr(t))}o(fa,"escapeFragment");I.escapeFragment=fa;function qr(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}o(qr,"escapeJsonPointer");I.escapeJsonPointer=qr;function hn(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}o(hn,"unescapeJsonPointer");I.unescapeJsonPointer=hn;function ha(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}o(ha,"eachItem");I.eachItem=ha;function un({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,i,a,c)=>{let u=a===void 0?i:a instanceof M.Name?(i instanceof M.Name?t(n,i,a):e(n,i,a),a):i instanceof M.Name?(e(n,a,i),i):r(i,a);return c===M.Name&&!(u instanceof M.Name)?s(n,u):u}}o(un,"makeMergeEvaluated");I.mergeEvaluated={props:un({mergeNames:o((t,e,r)=>t.if((0,M._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,M._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,M._)`${r} || {}`).code((0,M._)`Object.assign(${r}, ${e})`))}),"mergeNames"),mergeToName:o((t,e,r)=>t.if((0,M._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,M._)`${r} || {}`),Ir(t,r,e))}),"mergeToName"),mergeValues:o((t,e)=>t===!0?!0:{...t,...e},"mergeValues"),resultToName:pn}),items:un({mergeNames:o((t,e,r)=>t.if((0,M._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,M._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),"mergeNames"),mergeToName:o((t,e,r)=>t.if((0,M._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,M._)`${r} > ${e} ? ${r} : ${e}`)),"mergeToName"),mergeValues:o((t,e)=>t===!0?!0:Math.max(t,e),"mergeValues"),resultToName:o((t,e)=>t.var("items",e),"resultToName")})};function pn(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,M._)`{}`);return e!==void 0&&Ir(t,r,e),r}o(pn,"evaluatedPropsToName");I.evaluatedPropsToName=pn;function Ir(t,e,r){Object.keys(r).forEach(s=>t.assign((0,M._)`${e}${(0,M.getProperty)(s)}`,!0))}o(Ir,"setEvaluated");I.setEvaluated=Ir;var ln={};function pa(t,e){return t.scopeValue("func",{ref:e,code:ln[e.code]||(ln[e.code]=new ia._Code(e.code))})}o(pa,"useFunc");I.useFunc=pa;var kr;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(kr||(I.Type=kr={}));function ma(t,e,r){if(t instanceof M.Name){let s=e===kr.Num;return r?s?(0,M._)`"[" + ${t} + "]"`:(0,M._)`"['" + ${t} + "']"`:s?(0,M._)`"/" + ${t}`:(0,M._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,M.getProperty)(t).toString():"/"+qr(t)}o(ma,"getErrorPath");I.getErrorPath=ma;function mn(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}o(mn,"checkStrictMode");I.checkStrictMode=mn});var me=v(jr=>{"use strict";f();Object.defineProperty(jr,"__esModule",{value:!0});var K=q(),ya={data:new K.Name("data"),valCxt:new K.Name("valCxt"),instancePath:new K.Name("instancePath"),parentData:new K.Name("parentData"),parentDataProperty:new K.Name("parentDataProperty"),rootData:new K.Name("rootData"),dynamicAnchors:new K.Name("dynamicAnchors"),vErrors:new K.Name("vErrors"),errors:new K.Name("errors"),this:new K.Name("this"),self:new K.Name("self"),scope:new K.Name("scope"),json:new K.Name("json"),jsonPos:new K.Name("jsonPos"),jsonLen:new K.Name("jsonLen"),jsonPart:new K.Name("jsonPart")};jr.default=ya});var it=v(H=>{"use strict";f();Object.defineProperty(H,"__esModule",{value:!0});H.extendErrors=H.resetErrorsCount=H.reportExtraError=H.reportError=H.keyword$DataError=H.keywordError=void 0;var T=q(),Ct=R(),J=me();H.keywordError={message:o(({keyword:t})=>(0,T.str)`must pass "${t}" keyword validation`,"message")};H.keyword$DataError={message:o(({keyword:t,schemaType:e})=>e?(0,T.str)`"${t}" keyword must be ${e} ($data)`:(0,T.str)`"${t}" keyword is invalid ($data)`,"message")};function ga(t,e=H.keywordError,r,s){let{it:n}=t,{gen:i,compositeRule:a,allErrors:c}=n,u=_n(t,e,r);s??(a||c)?yn(i,u):gn(n,(0,T._)`[${u}]`)}o(ga,"reportError");H.reportError=ga;function _a(t,e=H.keywordError,r){let{it:s}=t,{gen:n,compositeRule:i,allErrors:a}=s,c=_n(t,e,r);yn(n,c),i||a||gn(s,J.default.vErrors)}o(_a,"reportExtraError");H.reportExtraError=_a;function $a(t,e){t.assign(J.default.errors,e),t.if((0,T._)`${J.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,T._)`${J.default.vErrors}.length`,e),()=>t.assign(J.default.vErrors,null)))}o($a,"resetErrorsCount");H.resetErrorsCount=$a;function va({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",n,J.default.errors,c=>{t.const(a,(0,T._)`${J.default.vErrors}[${c}]`),t.if((0,T._)`${a}.instancePath === undefined`,()=>t.assign((0,T._)`${a}.instancePath`,(0,T.strConcat)(J.default.instancePath,i.errorPath))),t.assign((0,T._)`${a}.schemaPath`,(0,T.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,T._)`${a}.schema`,r),t.assign((0,T._)`${a}.data`,s))})}o(va,"extendErrors");H.extendErrors=va;function yn(t,e){let r=t.const("err",e);t.if((0,T._)`${J.default.vErrors} === null`,()=>t.assign(J.default.vErrors,(0,T._)`[${r}]`),(0,T._)`${J.default.vErrors}.push(${r})`),t.code((0,T._)`${J.default.errors}++`)}o(yn,"addError");function gn(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,T._)`new ${t.ValidationError}(${e})`):(r.assign((0,T._)`${s}.errors`,e),r.return(!1))}o(gn,"returnErrors");var ke={keyword:new T.Name("keyword"),schemaPath:new T.Name("schemaPath"),params:new T.Name("params"),propertyName:new T.Name("propertyName"),message:new T.Name("message"),schema:new T.Name("schema"),parentSchema:new T.Name("parentSchema")};function _n(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,T._)`{}`:wa(t,e,r)}o(_n,"errorObjectCode");function wa(t,e,r={}){let{gen:s,it:n}=t,i=[ba(n,r),Ea(t,r)];return Sa(t,e,i),s.object(...i)}o(wa,"errorObject");function ba({errorPath:t},{instancePath:e}){let r=e?(0,T.str)`${t}${(0,Ct.getErrorPath)(e,Ct.Type.Str)}`:t;return[J.default.instancePath,(0,T.strConcat)(J.default.instancePath,r)]}o(ba,"errorInstancePath");function Ea({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,T.str)`${e}/${t}`;return r&&(n=(0,T.str)`${n}${(0,Ct.getErrorPath)(r,Ct.Type.Str)}`),[ke.schemaPath,n]}o(Ea,"errorSchemaPath");function Sa(t,{params:e,message:r},s){let{keyword:n,data:i,schemaValue:a,it:c}=t,{opts:u,propertyName:d,topSchemaRef:l,schemaPath:h}=c;s.push([ke.keyword,n],[ke.params,typeof e=="function"?e(t):e||(0,T._)`{}`]),u.messages&&s.push([ke.message,typeof r=="function"?r(t):r]),u.verbose&&s.push([ke.schema,a],[ke.parentSchema,(0,T._)`${l}${h}`],[J.default.data,i]),d&&s.push([ke.propertyName,d])}o(Sa,"extraErrorProps")});var vn=v(xe=>{"use strict";f();Object.defineProperty(xe,"__esModule",{value:!0});xe.boolOrEmptySchema=xe.topBoolOrEmptySchema=void 0;var Pa=it(),Na=q(),Oa=me(),ka={message:"boolean schema is false"};function qa(t){let{gen:e,schema:r,validateName:s}=t;r===!1?$n(t,!1):typeof r=="object"&&r.$async===!0?e.return(Oa.default.data):(e.assign((0,Na._)`${s}.errors`,null),e.return(!0))}o(qa,"topBoolOrEmptySchema");xe.topBoolOrEmptySchema=qa;function Ia(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),$n(t)):r.var(e,!0)}o(Ia,"boolOrEmptySchema");xe.boolOrEmptySchema=Ia;function $n(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Pa.reportError)(n,ka,void 0,e)}o($n,"falseSchemaError")});var Rr=v(Fe=>{"use strict";f();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.getRules=Fe.isJSONType=void 0;var ja=["string","number","integer","boolean","null","object","array"],Ra=new Set(ja);function Ta(t){return typeof t=="string"&&Ra.has(t)}o(Ta,"isJSONType");Fe.isJSONType=Ta;function Ca(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}o(Ca,"getRules");Fe.getRules=Ca});var Tr=v(_e=>{"use strict";f();Object.defineProperty(_e,"__esModule",{value:!0});_e.shouldUseRule=_e.shouldUseGroup=_e.schemaHasRulesForType=void 0;function Aa({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&wn(t,s)}o(Aa,"schemaHasRulesForType");_e.schemaHasRulesForType=Aa;function wn(t,e){return e.rules.some(r=>bn(t,r))}o(wn,"shouldUseGroup");_e.shouldUseGroup=wn;function bn(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}o(bn,"shouldUseRule");_e.shouldUseRule=bn});var at=v(L=>{"use strict";f();Object.defineProperty(L,"__esModule",{value:!0});L.reportTypeError=L.checkDataTypes=L.checkDataType=L.coerceAndCheckDataType=L.getJSONTypes=L.getSchemaTypes=L.DataType=void 0;var Da=Rr(),Ma=Tr(),xa=it(),O=q(),En=R(),Ve;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ve||(L.DataType=Ve={}));function Fa(t){let e=Sn(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}o(Fa,"getSchemaTypes");L.getSchemaTypes=Fa;function Sn(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Da.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}o(Sn,"getJSONTypes");L.getJSONTypes=Sn;function Va(t,e){let{gen:r,data:s,opts:n}=t,i=za(e,n.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,Ma.schemaHasRulesForType)(t,e[0]));if(a){let c=Ar(e,s,n.strictNumbers,Ve.Wrong);r.if(c,()=>{i.length?Ua(t,e,i):Dr(t)})}return a}o(Va,"coerceAndCheckDataType");L.coerceAndCheckDataType=Va;var Pn=new Set(["string","number","integer","boolean","null"]);function za(t,e){return e?t.filter(r=>Pn.has(r)||e==="array"&&r==="array"):[]}o(za,"coerceToTypes");function Ua(t,e,r){let{gen:s,data:n,opts:i}=t,a=s.let("dataType",(0,O._)`typeof ${n}`),c=s.let("coerced",(0,O._)`undefined`);i.coerceTypes==="array"&&s.if((0,O._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,O._)`${n}[0]`).assign(a,(0,O._)`typeof ${n}`).if(Ar(e,n,i.strictNumbers),()=>s.assign(c,n))),s.if((0,O._)`${c} !== undefined`);for(let d of r)(Pn.has(d)||d==="array"&&i.coerceTypes==="array")&&u(d);s.else(),Dr(t),s.endIf(),s.if((0,O._)`${c} !== undefined`,()=>{s.assign(n,c),Ka(t,c)});function u(d){switch(d){case"string":s.elseIf((0,O._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,O._)`"" + ${n}`).elseIf((0,O._)`${n} === null`).assign(c,(0,O._)`""`);return;case"number":s.elseIf((0,O._)`${a} == "boolean" || ${n} === null
5
5
  || (${a} == "string" && ${n} && ${n} == +${n})`).assign(c,(0,O._)`+${n}`);return;case"integer":s.elseIf((0,O._)`${a} === "boolean" || ${n} === null
6
6
  || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(c,(0,O._)`+${n}`);return;case"boolean":s.elseIf((0,O._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(c,!1).elseIf((0,O._)`${n} === "true" || ${n} === 1`).assign(c,!0);return;case"null":s.elseIf((0,O._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(c,null);return;case"array":s.elseIf((0,O._)`${a} === "string" || ${a} === "number"
@@ -8,4 +8,4 @@ import{a as o,c as v,f}from"./chunk-AUCJEXWT.js";var et=v(C=>{"use strict";f();O
8
8
  missingProperty: ${s},
9
9
  depsCount: ${e},
10
10
  deps: ${r}}`,"params")};var Id={keyword:"dependencies",type:"object",schemaType:"object",error:de.error,code(t){let[e,r]=jd(t);hi(t,e),pi(t,r)}};function jd({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s]}return[e,r]}o(jd,"splitDependencies");function hi(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let i=r.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let u=(0,Nt.propertyInData)(r,s,a,n.opts.ownProperties);t.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),n.allErrors?r.if(u,()=>{for(let d of c)(0,Nt.checkReportMissingProp)(t,d)}):(r.if((0,Ds._)`${u} && (${(0,Nt.checkMissingProp)(t,c,i)})`),(0,Nt.reportMissingProp)(t,i),r.else())}}o(hi,"validatePropertyDeps");de.validatePropertyDeps=hi;function pi(t,e=t.schema){let{gen:r,data:s,keyword:n,it:i}=t,a=r.name("valid");for(let c in e)(0,qd.alwaysValidSchema)(i,e[c])||(r.if((0,Nt.propertyInData)(r,s,c,i.opts.ownProperties),()=>{let u=t.subschema({keyword:n,schemaProp:c},a);t.mergeValidEvaluated(u,a)},()=>r.var(a,!0)),t.ok(a))}o(pi,"validateSchemaDeps");de.validateSchemaDeps=pi;de.default=Id});var gi=v(Ms=>{"use strict";f();Object.defineProperty(Ms,"__esModule",{value:!0});var yi=q(),Rd=R(),Td={message:"property name must be valid",params:o(({params:t})=>(0,yi._)`{propertyName: ${t.propertyName}}`,"params")},Cd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Td,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0,Rd.alwaysValidSchema)(n,r))return;let i=e.name("valid");e.forIn("key",s,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,yi.not)(i),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(i)}};Ms.default=Cd});var Fs=v(xs=>{"use strict";f();Object.defineProperty(xs,"__esModule",{value:!0});var tr=te(),ae=q(),Ad=me(),rr=R(),Dd={message:"must NOT have additional properties",params:o(({params:t})=>(0,ae._)`{additionalProperty: ${t.additionalProperty}}`,"params")},Md={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Dd,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:i,it:a}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:c,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,rr.alwaysValidSchema)(a,r))return;let d=(0,tr.allSchemaProperties)(s.properties),l=(0,tr.allSchemaProperties)(s.patternProperties);h(),t.ok((0,ae._)`${i} === ${Ad.default.errors}`);function h(){e.forIn("key",n,y=>{!d.length&&!l.length?m(y):e.if(_(y),()=>m(y))})}o(h,"checkAdditionalProperties");function _(y){let $;if(d.length>8){let S=(0,rr.schemaRefOrVal)(a,s.properties,"properties");$=(0,tr.isOwnProperty)(e,S,y)}else d.length?$=(0,ae.or)(...d.map(S=>(0,ae._)`${y} === ${S}`)):$=ae.nil;return l.length&&($=(0,ae.or)($,...l.map(S=>(0,ae._)`${(0,tr.usePattern)(t,S)}.test(${y})`))),(0,ae.not)($)}o(_,"isAdditional");function g(y){e.code((0,ae._)`delete ${n}[${y}]`)}o(g,"deleteAdditional");function m(y){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){g(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),c||e.break();return}if(typeof r=="object"&&!(0,rr.alwaysValidSchema)(a,r)){let $=e.name("valid");u.removeAdditional==="failing"?(p(y,$,!1),e.if((0,ae.not)($),()=>{t.reset(),g(y)})):(p(y,$),c||e.if((0,ae.not)($),()=>e.break()))}}o(m,"additionalPropertyCode");function p(y,$,S){let P={keyword:"additionalProperties",dataProp:y,dataPropType:rr.Type.Str};S===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(P,$)}o(p,"applyAdditionalSchema")}};xs.default=Md});var vi=v(zs=>{"use strict";f();Object.defineProperty(zs,"__esModule",{value:!0});var xd=dt(),_i=te(),Vs=R(),$i=Fs(),Fd={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:i}=t;i.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&$i.default.code(new xd.KeywordCxt(i,$i.default,"additionalProperties"));let a=(0,_i.allSchemaProperties)(r);for(let h of a)i.definedProperties.add(h);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Vs.mergeEvaluated.props(e,(0,Vs.toHash)(a),i.props));let c=a.filter(h=>!(0,Vs.alwaysValidSchema)(i,r[h]));if(c.length===0)return;let u=e.name("valid");for(let h of c)d(h)?l(h):(e.if((0,_i.propertyInData)(e,n,h,i.opts.ownProperties)),l(h),i.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(u);function d(h){return i.opts.useDefaults&&!i.compositeRule&&r[h].default!==void 0}o(d,"hasDefault");function l(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},u)}o(l,"applyPropertySchema")}};zs.default=Fd});var Si=v(Us=>{"use strict";f();Object.defineProperty(Us,"__esModule",{value:!0});var wi=te(),sr=q(),bi=R(),Ei=R(),Vd={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:i}=t,{opts:a}=i,c=(0,wi.allSchemaProperties)(r),u=c.filter(p=>(0,bi.alwaysValidSchema)(i,r[p]));if(c.length===0||u.length===c.length&&(!i.opts.unevaluated||i.props===!0))return;let d=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof sr.Name)&&(i.props=(0,Ei.evaluatedPropsToName)(e,i.props));let{props:h}=i;_();function _(){for(let p of c)d&&g(p),i.allErrors?m(p):(e.var(l,!0),m(p),e.if(l))}o(_,"validatePatternProperties");function g(p){for(let y in d)new RegExp(p).test(y)&&(0,bi.checkStrictMode)(i,`property ${y} matches pattern ${p} (use allowMatchingProperties)`)}o(g,"checkMatchingProperties");function m(p){e.forIn("key",s,y=>{e.if((0,sr._)`${(0,wi.usePattern)(t,p)}.test(${y})`,()=>{let $=u.includes(p);$||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:y,dataPropType:Ei.Type.Str},l),i.opts.unevaluated&&h!==!0?e.assign((0,sr._)`${h}[${y}]`,!0):!$&&!i.allErrors&&e.if((0,sr.not)(l),()=>e.break())})})}o(m,"validateProperties")}};Us.default=Vd});var Pi=v(Ks=>{"use strict";f();Object.defineProperty(Ks,"__esModule",{value:!0});var zd=R(),Ud={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:s}=t;if((0,zd.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ks.default=Ud});var Ni=v(Hs=>{"use strict";f();Object.defineProperty(Hs,"__esModule",{value:!0});var Kd=te(),Hd={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Kd.validateUnion,error:{message:"must match a schema in anyOf"}};Hs.default=Hd});var Oi=v(Ls=>{"use strict";f();Object.defineProperty(Ls,"__esModule",{value:!0});var nr=q(),Ld=R(),Gd={message:"must match exactly one schema in oneOf",params:o(({params:t})=>(0,nr._)`{passingSchemas: ${t.passing}}`,"params")},Jd={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Gd,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let i=r,a=e.let("valid",!1),c=e.let("passing",null),u=e.name("_valid");t.setParams({passing:c}),e.block(d),t.result(a,()=>t.reset(),()=>t.error(!0));function d(){i.forEach((l,h)=>{let _;(0,Ld.alwaysValidSchema)(n,l)?e.var(u,!0):_=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},u),h>0&&e.if((0,nr._)`${u} && ${a}`).assign(a,!1).assign(c,(0,nr._)`[${c}, ${h}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(c,h),_&&t.mergeEvaluated(_,nr.Name)})})}o(d,"validateOneOf")}};Ls.default=Jd});var ki=v(Gs=>{"use strict";f();Object.defineProperty(Gs,"__esModule",{value:!0});var Bd=R(),Wd={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((i,a)=>{if((0,Bd.alwaysValidSchema)(s,i))return;let c=t.subschema({keyword:"allOf",schemaProp:a},n);t.ok(n),t.mergeEvaluated(c)})}};Gs.default=Wd});var ji=v(Js=>{"use strict";f();Object.defineProperty(Js,"__esModule",{value:!0});var or=q(),Ii=R(),Qd={message:o(({params:t})=>(0,or.str)`must match "${t.ifClause}" schema`,"message"),params:o(({params:t})=>(0,or._)`{failingKeyword: ${t.ifClause}}`,"params")},Zd={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Qd,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Ii.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=qi(s,"then"),i=qi(s,"else");if(!n&&!i)return;let a=e.let("valid",!0),c=e.name("_valid");if(u(),t.reset(),n&&i){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(c,d("then",l),d("else",l))}else n?e.if(c,d("then")):e.if((0,or.not)(c),d("else"));t.pass(a,()=>t.error(!0));function u(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(l)}o(u,"validateIf");function d(l,h){return()=>{let _=t.subschema({keyword:l},c);e.assign(a,c),t.mergeValidEvaluated(_,a),h?e.assign(h,(0,or._)`${l}`):t.setParams({ifClause:l})}}o(d,"validateClause")}};function qi(t,e){let r=t.schema[e];return r!==void 0&&!(0,Ii.alwaysValidSchema)(t,r)}o(qi,"hasSchema");Js.default=Zd});var Ri=v(Bs=>{"use strict";f();Object.defineProperty(Bs,"__esModule",{value:!0});var Xd=R(),Yd={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Xd.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Bs.default=Yd});var Ti=v(Ws=>{"use strict";f();Object.defineProperty(Ws,"__esModule",{value:!0});var ef=js(),tf=ui(),rf=Rs(),sf=di(),nf=fi(),of=mi(),af=gi(),cf=Fs(),uf=vi(),lf=Si(),df=Pi(),ff=Ni(),hf=Oi(),pf=ki(),mf=ji(),yf=Ri();function gf(t=!1){let e=[df.default,ff.default,hf.default,pf.default,mf.default,yf.default,af.default,cf.default,of.default,uf.default,lf.default];return t?e.push(tf.default,sf.default):e.push(ef.default,rf.default),e.push(nf.default),e}o(gf,"getApplicator");Ws.default=gf});var Ci=v(Qs=>{"use strict";f();Object.defineProperty(Qs,"__esModule",{value:!0});var V=q(),_f={message:o(({schemaCode:t})=>(0,V.str)`must match format "${t}"`,"message"),params:o(({schemaCode:t})=>(0,V._)`{format: ${t}}`,"params")},$f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:_f,code(t,e){let{gen:r,data:s,$data:n,schema:i,schemaCode:a,it:c}=t,{opts:u,errSchemaPath:d,schemaEnv:l,self:h}=c;if(!u.validateFormats)return;n?_():g();function _(){let m=r.scopeValue("formats",{ref:h.formats,code:u.code.formats}),p=r.const("fDef",(0,V._)`${m}[${a}]`),y=r.let("fType"),$=r.let("format");r.if((0,V._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>r.assign(y,(0,V._)`${p}.type || "string"`).assign($,(0,V._)`${p}.validate`),()=>r.assign(y,(0,V._)`"string"`).assign($,p)),t.fail$data((0,V.or)(S(),P()));function S(){return u.strictSchema===!1?V.nil:(0,V._)`${a} && !${$}`}o(S,"unknownFmt");function P(){let A=l.$async?(0,V._)`(${p}.async ? await ${$}(${s}) : ${$}(${s}))`:(0,V._)`${$}(${s})`,N=(0,V._)`(typeof ${$} == "function" ? ${A} : ${$}.test(${s}))`;return(0,V._)`${$} && ${$} !== true && ${y} === ${e} && !${N}`}o(P,"invalidFmt")}o(_,"validate$DataFormat");function g(){let m=h.formats[i];if(!m){S();return}if(m===!0)return;let[p,y,$]=P(m);p===e&&t.pass(A());function S(){if(u.strictSchema===!1){h.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${i}" ignored in schema at path "${d}"`}}o(S,"unknownFormat");function P(N){let ce=N instanceof RegExp?(0,V.regexpCode)(N):u.code.formats?(0,V._)`${u.code.formats}${(0,V.getProperty)(i)}`:void 0,fe=r.scopeValue("formats",{key:i,ref:N,code:ce});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,V._)`${fe}.validate`]:["string",N,fe]}o(P,"getFormat");function A(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,V._)`await ${$}(${s})`}return typeof y=="function"?(0,V._)`${$}(${s})`:(0,V._)`${$}.test(${s})`}o(A,"validCondition")}o(g,"validateFormat")}};Qs.default=$f});var Ai=v(Zs=>{"use strict";f();Object.defineProperty(Zs,"__esModule",{value:!0});var vf=Ci(),wf=[vf.default];Zs.default=wf});var Di=v(Je=>{"use strict";f();Object.defineProperty(Je,"__esModule",{value:!0});Je.contentVocabulary=Je.metadataVocabulary=void 0;Je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var xi=v(Xs=>{"use strict";f();Object.defineProperty(Xs,"__esModule",{value:!0});var bf=Lo(),Ef=oi(),Sf=Ti(),Pf=Ai(),Mi=Di(),Nf=[bf.default,Ef.default,(0,Sf.default)(),Pf.default,Mi.metadataVocabulary,Mi.contentVocabulary];Xs.default=Nf});var Vi=v(ir=>{"use strict";f();Object.defineProperty(ir,"__esModule",{value:!0});ir.DiscrError=void 0;var Fi;(function(t){t.Tag="tag",t.Mapping="mapping"})(Fi||(ir.DiscrError=Fi={}))});var Ui=v(en=>{"use strict";f();Object.defineProperty(en,"__esModule",{value:!0});var Be=q(),Ys=Vi(),zi=zt(),Of=ft(),kf=R(),qf={message:o(({params:{discrError:t,tagName:e}})=>t===Ys.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,"message"),params:o(({params:{discrError:t,tag:e,tagName:r}})=>(0,Be._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`,"params")},If={keyword:"discriminator",type:"object",schemaType:"object",error:qf,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:i}=t,{oneOf:a}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let c=s.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),d=e.const("tag",(0,Be._)`${r}${(0,Be.getProperty)(c)}`);e.if((0,Be._)`typeof ${d} == "string"`,()=>l(),()=>t.error(!1,{discrError:Ys.DiscrError.Tag,tag:d,tagName:c})),t.ok(u);function l(){let g=_();e.if(!1);for(let m in g)e.elseIf((0,Be._)`${d} === ${m}`),e.assign(u,h(g[m]));e.else(),t.error(!1,{discrError:Ys.DiscrError.Mapping,tag:d,tagName:c}),e.endIf()}o(l,"validateMapping");function h(g){let m=e.name("valid"),p=t.subschema({keyword:"oneOf",schemaProp:g},m);return t.mergeEvaluated(p,Be.Name),m}o(h,"applyTagSchema");function _(){var g;let m={},p=$(n),y=!0;for(let A=0;A<a.length;A++){let N=a[A];if(N?.$ref&&!(0,kf.schemaHasRulesButRef)(N,i.self.RULES)){let fe=N.$ref;if(N=zi.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,fe),N instanceof zi.SchemaEnv&&(N=N.schema),N===void 0)throw new Of.default(i.opts.uriResolver,i.baseId,fe)}let ce=(g=N?.properties)===null||g===void 0?void 0:g[c];if(typeof ce!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);y=y&&(p||$(N)),S(ce,A)}if(!y)throw new Error(`discriminator: "${c}" must be required`);return m;function $({required:A}){return Array.isArray(A)&&A.includes(c)}function S(A,N){if(A.const)P(A.const,N);else if(A.enum)for(let ce of A.enum)P(ce,N);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function P(A,N){if(typeof A!="string"||A in m)throw new Error(`discriminator: "${c}" values must be unique strings`);m[A]=N}}o(_,"getMapping")}};en.default=If});var Ki=v((iy,jf)=>{jf.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ff=v((F,tn)=>{"use strict";f();Object.defineProperty(F,"__esModule",{value:!0});F.MissingRefError=F.ValidationError=F.CodeGen=F.Name=F.nil=F.stringify=F.str=F._=F.KeywordCxt=F.Ajv=void 0;var Rf=Fo(),Tf=xi(),Cf=Ui(),Hi=Ki(),Af=["/properties"],ar="http://json-schema.org/draft-07/schema",We=class extends Rf.default{static{o(this,"Ajv")}_addVocabularies(){super._addVocabularies(),Tf.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Cf.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Hi,Af):Hi;this.addMetaSchema(e,ar,!1),this.refs["http://json-schema.org/schema"]=ar}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ar)?ar:void 0)}};F.Ajv=We;tn.exports=F=We;tn.exports.Ajv=We;Object.defineProperty(F,"__esModule",{value:!0});F.default=We;var Df=dt();Object.defineProperty(F,"KeywordCxt",{enumerable:!0,get:o(function(){return Df.KeywordCxt},"get")});var Qe=q();Object.defineProperty(F,"_",{enumerable:!0,get:o(function(){return Qe._},"get")});Object.defineProperty(F,"str",{enumerable:!0,get:o(function(){return Qe.str},"get")});Object.defineProperty(F,"stringify",{enumerable:!0,get:o(function(){return Qe.stringify},"get")});Object.defineProperty(F,"nil",{enumerable:!0,get:o(function(){return Qe.nil},"get")});Object.defineProperty(F,"Name",{enumerable:!0,get:o(function(){return Qe.Name},"get")});Object.defineProperty(F,"CodeGen",{enumerable:!0,get:o(function(){return Qe.CodeGen},"get")});var Mf=Ft();Object.defineProperty(F,"ValidationError",{enumerable:!0,get:o(function(){return Mf.default},"get")});var xf=ft();Object.defineProperty(F,"MissingRefError",{enumerable:!0,get:o(function(){return xf.default},"get")})});export{q as a,Ff as b};
11
- //# sourceMappingURL=chunk-ZZFJD6PY.js.map
11
+ //# sourceMappingURL=chunk-B63EVTK3.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{x as $}from"./chunk-6AVTZQKD.js";import{a,f as y}from"./chunk-AUCJEXWT.js";y();var j=new Set(["PASTE_TOKEN_HERE","<your-atlassian-login-email>","https://your-org.atlassian.net"]),d=a(e=>j.has(e.trim().replace(/\/+$/,"")),"isJiraPlaceholder");function h(e,t,s){let n=e.trim();for(;n.endsWith("/");)n=n.slice(0,-1);return!n||!t||!s||d(n)||d(t)||d(s)?null:{baseUrl:n,email:t,token:s}}a(h,"normalizeCreds");async function u(){let e=h(process.env.JIRA_BASE_URL??"",process.env.JIRA_EMAIL??"",process.env.JIRA_API_TOKEN??"");if(e)return e;try{let t=$().jira??{};return h(String(t.base_url??""),String(t.email??""),String(t.api_token??""))}catch{return null}}a(u,"jiraCreds");async function f(e,t,s){let n=await fetch(`${e.baseUrl}${t}`,{method:s===void 0?"GET":"POST",headers:{Authorization:"Basic "+Buffer.from(`${e.email}:${e.token}`).toString("base64"),Accept:"application/json",...s===void 0?{}:{"Content-Type":"application/json"}},body:s===void 0?void 0:JSON.stringify(s),signal:AbortSignal.timeout(1e4)});if(!n.ok){let o=(await n.text().catch(()=>"")).trim().slice(0,500);throw new Error(`Jira REST ${t} \u2192 HTTP ${n.status}${o?`: ${o}`:""}`)}return n}a(f,"jiraFetch");async function S(){let e=await u();if(!e)return null;let s=await(await f(e,"/rest/api/3/myself")).json();return{who:s.emailAddress??s.displayName??e.email}}a(S,"jiraMyself");async function l(e,t){return await(await f(e,t)).json()}a(l,"jiraGet");var C="summary,description,status,issuetype,assignee,comment";async function T(e,t){let s=await u();if(!s)return t?.push("no Jira REST credentials"),null;try{return await l(s,`/rest/api/2/issue/${encodeURIComponent(e)}?fields=${C}`)}catch(n){return t?.push(E(n)),null}}a(T,"fetchIssueRest");function E(e){let t=e;if(t.message?.startsWith("Jira REST "))return t.message;let s=t.cause?.code??t.cause?.message;return`Jira REST: ${t.message}${s?` (${s})`:""}`}a(E,"restFailure");async function A(e){if(!e.length)return{};let t=await u();if(!t)return null;let s=encodeURIComponent(`key in (${e.join(",")})`);try{let n=await l(t,`/rest/api/2/search/jql?jql=${s}&fields=status&maxResults=100`),o={};for(let r of n.issues??[]){let c=r.fields?.status?.name;r.key&&c&&(o[r.key.toUpperCase()]=c)}return o}catch{return null}}a(A,"fetchStatusesRest");var R="fields=summary,status&maxResults=100";async function b(e){let t=await u();return t?(await l(t,`/rest/api/2/search/jql?jql=${encodeURIComponent(e)}&${R}`)).issues??[]:null}a(b,"searchIssuesRest");async function L(e,t){let s=await u();if(!s)return null;let n=encodeURIComponent(e),{columnConfig:o}=await l(s,`/rest/agile/1.0/board/${n}/configuration`),r=o?.columns??[],c=r.find(p=>p.name?.toLowerCase()===t.toLowerCase());if(!c)throw new Error(`board ${e} has no "${t}" column (it has: ${r.map(p=>p.name).join(", ")})`);let i=(c.statuses??[]).flatMap(p=>p.id?[p.id]:[]);if(!i.length)return[];let m=encodeURIComponent(`status in (${i.join(",")})`);return(await l(s,`/rest/agile/1.0/board/${n}/issue?jql=${m}&${R}`)).issues??[]}a(L,"boardColumnRest");async function x(e){let t=await u();if(!t)return null;let s=encodeURIComponent(e.project),{issueTypes:n=[]}=await l(t,`/rest/api/2/issue/createmeta/${s}/issuetypes`),o=a(m=>n.some(w=>w.name?.toLowerCase()===m.toLowerCase()),"has"),r=o(e.issueType)||!o("Task")?e.issueType:"Task",c=await f(t,"/rest/api/2/issue",{fields:{project:{key:e.project},issuetype:{name:r},summary:e.summary,description:e.description,...r===e.issueType?{}:{labels:[e.fallbackLabel]}}}),{key:i}=await c.json();return{key:i,url:`${t.baseUrl}/browse/${i}`,issueType:r}}a(x,"createIssueRest");async function U(e,t){let s=await u();return s?(await f(s,"/rest/api/2/issueLink",{type:{name:"Relates"},inwardIssue:{key:e},outwardIssue:{key:t}}),!0):null}a(U,"linkIssueRest");async function _(e,t){let s=await u();if(!s)return null;let n=`/rest/api/2/issue/${encodeURIComponent(e)}`;if(t.status){let o=t.status.trim().toLowerCase(),{transitions:r=[]}=await l(s,`${n}/transitions`),c=r.find(i=>i.to?.name?.toLowerCase()===o)??r.find(i=>i.name?.toLowerCase()===o);if(!c){let i=r.map(m=>m.to?.name??m.name).filter(Boolean).join(", ");throw new Error(`${e} has no transition to "${t.status}" (available: ${i||"none"})`)}await f(s,`${n}/transitions`,{transition:{id:c.id}})}return t.comment&&await f(s,`${n}/comment`,{body:t.comment}),!0}a(_,"updateIssueRest");export{j as a,d as b,S as c,T as d,A as e,b as f,L as g,x as h,U as i,_ as j};
4
- //# sourceMappingURL=chunk-P3VQER4Q.js.map
3
+ import{x as $}from"./chunk-ULNRIE5C.js";import{a,f as y}from"./chunk-F4IMOZQW.js";y();var j=new Set(["PASTE_TOKEN_HERE","<your-atlassian-login-email>","https://your-org.atlassian.net"]),d=a(e=>j.has(e.trim().replace(/\/+$/,"")),"isJiraPlaceholder");function h(e,t,s){let n=e.trim();for(;n.endsWith("/");)n=n.slice(0,-1);return!n||!t||!s||d(n)||d(t)||d(s)?null:{baseUrl:n,email:t,token:s}}a(h,"normalizeCreds");async function u(){let e=h(process.env.JIRA_BASE_URL??"",process.env.JIRA_EMAIL??"",process.env.JIRA_API_TOKEN??"");if(e)return e;try{let t=$().jira??{};return h(String(t.base_url??""),String(t.email??""),String(t.api_token??""))}catch{return null}}a(u,"jiraCreds");async function f(e,t,s){let n=await fetch(`${e.baseUrl}${t}`,{method:s===void 0?"GET":"POST",headers:{Authorization:"Basic "+Buffer.from(`${e.email}:${e.token}`).toString("base64"),Accept:"application/json",...s===void 0?{}:{"Content-Type":"application/json"}},body:s===void 0?void 0:JSON.stringify(s),signal:AbortSignal.timeout(1e4)});if(!n.ok){let o=(await n.text().catch(()=>"")).trim().slice(0,500);throw new Error(`Jira REST ${t} \u2192 HTTP ${n.status}${o?`: ${o}`:""}`)}return n}a(f,"jiraFetch");async function S(){let e=await u();if(!e)return null;let s=await(await f(e,"/rest/api/3/myself")).json();return{who:s.emailAddress??s.displayName??e.email}}a(S,"jiraMyself");async function l(e,t){return await(await f(e,t)).json()}a(l,"jiraGet");var C="summary,description,status,issuetype,assignee,comment";async function T(e,t){let s=await u();if(!s)return t?.push("no Jira REST credentials"),null;try{return await l(s,`/rest/api/2/issue/${encodeURIComponent(e)}?fields=${C}`)}catch(n){return t?.push(E(n)),null}}a(T,"fetchIssueRest");function E(e){let t=e;if(t.message?.startsWith("Jira REST "))return t.message;let s=t.cause?.code??t.cause?.message;return`Jira REST: ${t.message}${s?` (${s})`:""}`}a(E,"restFailure");async function A(e){if(!e.length)return{};let t=await u();if(!t)return null;let s=encodeURIComponent(`key in (${e.join(",")})`);try{let n=await l(t,`/rest/api/2/search/jql?jql=${s}&fields=status&maxResults=100`),o={};for(let r of n.issues??[]){let c=r.fields?.status?.name;r.key&&c&&(o[r.key.toUpperCase()]=c)}return o}catch{return null}}a(A,"fetchStatusesRest");var R="fields=summary,status&maxResults=100";async function b(e){let t=await u();return t?(await l(t,`/rest/api/2/search/jql?jql=${encodeURIComponent(e)}&${R}`)).issues??[]:null}a(b,"searchIssuesRest");async function L(e,t){let s=await u();if(!s)return null;let n=encodeURIComponent(e),{columnConfig:o}=await l(s,`/rest/agile/1.0/board/${n}/configuration`),r=o?.columns??[],c=r.find(p=>p.name?.toLowerCase()===t.toLowerCase());if(!c)throw new Error(`board ${e} has no "${t}" column (it has: ${r.map(p=>p.name).join(", ")})`);let i=(c.statuses??[]).flatMap(p=>p.id?[p.id]:[]);if(!i.length)return[];let m=encodeURIComponent(`status in (${i.join(",")})`);return(await l(s,`/rest/agile/1.0/board/${n}/issue?jql=${m}&${R}`)).issues??[]}a(L,"boardColumnRest");async function x(e){let t=await u();if(!t)return null;let s=encodeURIComponent(e.project),{issueTypes:n=[]}=await l(t,`/rest/api/2/issue/createmeta/${s}/issuetypes`),o=a(m=>n.some(w=>w.name?.toLowerCase()===m.toLowerCase()),"has"),r=o(e.issueType)||!o("Task")?e.issueType:"Task",c=await f(t,"/rest/api/2/issue",{fields:{project:{key:e.project},issuetype:{name:r},summary:e.summary,description:e.description,...r===e.issueType?{}:{labels:[e.fallbackLabel]}}}),{key:i}=await c.json();return{key:i,url:`${t.baseUrl}/browse/${i}`,issueType:r}}a(x,"createIssueRest");async function U(e,t){let s=await u();return s?(await f(s,"/rest/api/2/issueLink",{type:{name:"Relates"},inwardIssue:{key:e},outwardIssue:{key:t}}),!0):null}a(U,"linkIssueRest");async function _(e,t){let s=await u();if(!s)return null;let n=`/rest/api/2/issue/${encodeURIComponent(e)}`;if(t.status){let o=t.status.trim().toLowerCase(),{transitions:r=[]}=await l(s,`${n}/transitions`),c=r.find(i=>i.to?.name?.toLowerCase()===o)??r.find(i=>i.name?.toLowerCase()===o);if(!c){let i=r.map(m=>m.to?.name??m.name).filter(Boolean).join(", ");throw new Error(`${e} has no transition to "${t.status}" (available: ${i||"none"})`)}await f(s,`${n}/transitions`,{transition:{id:c.id}})}return t.comment&&await f(s,`${n}/comment`,{body:t.comment}),!0}a(_,"updateIssueRest");export{j as a,d as b,S as c,T as d,A as e,b as f,L as g,x as h,U as i,_ as j};
4
+ //# sourceMappingURL=chunk-B7RRUAOW.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{b as M}from"./chunk-Y363LJO2.js";import{X as C,a as ee,l as E,r as S,s as g,v as l,w as b,x as I}from"./chunk-6AVTZQKD.js";import{b as j}from"./chunk-YRQU5A47.js";import{a as o,e as q,f as y}from"./chunk-AUCJEXWT.js";y();var x=["jira","github"];y();y();var P=q(ee(),1);import*as a from"node:fs";import*as m from"node:os";import*as p from"node:path";var O="^/\\S*$";function L(){return p.join(b(),"env.sh")}o(L,"envShPath");function te(){let e=u().overrides?.standards_dir;return e?p.resolve(S(String(e))):p.join(C(),"docs","standards")}o(te,"standardsDirPath");function re(){let e=te();return a.existsSync(e)&&a.statSync(e).isDirectory()?"":u().overrides?.standards_dir?`standards tree not found: ${e} (overrides.standards_dir in ${l()})`:`no standards tree: overrides.standards_dir is unset in ${l()} and the default ${e} does not exist`}o(re,"standardsDirProblem");function je(){return p.join(b(),"secrets.env")}o(je,"secretsPath");function F(){return p.join(m.homedir(),".zshenv")}o(F,"zshenvPath");function oe(){return p.join(m.homedir(),".zshrc")}o(oe,"zshrcPath");function G(){return p.join(m.homedir(),"Library","Application Support","Claude","claude_desktop_config.json")}o(G,"desktopConfigPath");var ne=[["paths","werkmeister_root","WERKMEISTER_ROOT"],["paths","repos_root","WERKMEISTER_REPOS_ROOT"],["paths","workspaces_root","WERKMEISTER_WORKSPACES_ROOT"],["overrides","mcp_port","WERKMEISTER_MCP_PORT"],["overrides","node","WERKMEISTER_NODE"],["overrides","services_yaml","WERKMEISTER_SERVICES_YAML"],["overrides","ports_yaml","WERKMEISTER_PORTS_YAML"],["overrides","model_pricing_yaml","WERKMEISTER_MODEL_PRICING_YAML"],["overrides","cache_file","WERKMEISTER_CACHE_FILE"],["ingress","certs_dir","WERKMEISTER_CERTS_DIR"]],$="# >>> werkmeister config >>>",B="# <<< werkmeister config <<<",W="# >>> werkmeister completion >>>",N="# <<< werkmeister completion <<<",se=["SANDBOX_ROOT","SANDBOX_REPOS_ROOT","SANDBOX_WORKSPACES_ROOT"],Ie=[{key:"repos_root",label:"Repos root (absolute path)",help:"Directory holding the canonical source-repo clones (exported as WERKMEISTER_REPOS_ROOT).",acceptEmpty:!1,pattern:O,placeholder:"/Users/you/workspace"},{key:"workspaces_root",label:"Workspaces root (absolute path)",help:"Directory holding per-feature worktree workspaces (exported as WERKMEISTER_WORKSPACES_ROOT).",acceptEmpty:!1,pattern:O,placeholder:"/Users/you/workspace/features"}],z={repos_root:"REPOS_ROOT",workspaces_root:"WORKSPACES_ROOT"};function ie(e,t=""){let r=t||p.join(m.homedir(),"workspace");return e==="workspaces_root"?p.join(r,"features"):r}o(ie,"builtinPathDefault");function Ce(e,t,r={}){let n=(t??u()).paths??{},i=n[e]||g(z[e]);if(i)return String(i);let s=r.repos_root||String(n.repos_root||g(z.repos_root)||"");return ie(e,s)}o(Ce,"pathDefault");function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(_,"isDict");var ae=/token|secret|pass(word|wd)|credential|api_?key|private_?key|access_?key|auth/i,ce=o(e=>e===""||e==null||typeof e=="object"&&Object.keys(e).length===0,"isEmpty");function A(e){return Array.isArray(e)?e.map(A):_(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,ae.test(t)&&!ce(r)?"<redacted>":A(r)])):e}o(A,"redact");function Me(e){return P.stringify(A(e))}o(Me,"redactedYaml");function u(){try{return I()}catch(e){return E(`Could not parse ${l()}: ${e}`),{}}}o(u,"load");function pe(){let e=u().paths;return _(e)?e:{}}o(pe,"loadPaths");function De(){let e=pe().workspaces_root,t=e?[p.resolve(S(e))]:[];return[...new Set([...t,p.join(m.homedir(),"workspace")])]}o(De,"candidateWorkspaceRoots");function We(){let e=u().jira;return _(e)?e:{}}o(We,"loadJira");var R={local_domain:"local.werkmeister.io",remote_domain:"remote.werkmeister.io",certs_dir:p.join(m.homedir(),".docker","certs")};function Ne(e){let t=(e??u()).ingress,r=_(t)?t:{},n=o(i=>{let s=r[i];return typeof s=="string"&&s.trim()?s.trim():R[i]},"pick");return{local_domain:n("local_domain"),remote_domain:n("remote_domain"),certs_dir:S(n("certs_dir"))}}o(Ne,"loadIngress");function ue(e){let t=(e??u()).overrides?.workspace_repo;return typeof t=="string"?t.trim():""}o(ue,"loadWorkspaceRepo");var de="[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?/[A-Za-z0-9._-]+$",ze={key:"workspace_repo",label:"Workspace config repo (owner/repo)",help:"GitHub repo cloned under the repos root and worktree'd as the root of every feature workspace, so .werkmeister/ configs and notes get history. Defaults to your own; point it at a shared <org>/sandbox-workspace to share workspace configs with your team.",acceptEmpty:!1,pattern:de,placeholder:"your-org/sandbox-workspace"};function Ke(e){let t=e??u(),r=t.overrides?.github_org;return typeof r=="string"&&r.trim()?r.trim():ue(t).split("/")[0]??""}o(Ke,"loadGithubOrg");function Ze(e){let t=(e??u()).overrides?.werkmeister_issues_project,r=typeof t=="string"?t.trim().toUpperCase():"";return/^[A-Z][A-Z0-9]+$/.test(r)?r:""}o(Ze,"loadSandboxIssuesProject");var Le={key:"github_org",label:"GitHub org for service repos",help:"Owner of the repos in your services registry. Used to link the canonical examples that standards docs cite (github.com/<org>/<repo>).",acceptEmpty:!1,pattern:"[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$",placeholder:"your-org"},K="[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$",Fe=[{key:"local_domain",label:"Local ingress domain",help:"Base domain for docker features \u2014 each routed service is served at <service>.<domain> and Caddy terminates TLS for it.",acceptEmpty:!1,pattern:K,placeholder:R.local_domain},{key:"remote_domain",label:"Remote (K8s) ingress domain",help:"Base domain for services routed to the dev cluster instead of a local container \u2014 served at <service>.<domain>.",acceptEmpty:!1,pattern:K,placeholder:R.remote_domain},{key:"certs_dir",label:"Certificate directory (absolute path)",help:"Where bin/generate-certs.sh writes localhost.crt/.key; bind-mounted into the Caddy container (exported as WERKMEISTER_CERTS_DIR).",acceptEmpty:!1,pattern:O,placeholder:R.certs_dir}],fe="# Global werkmeister configuration \u2014 single source of truth.\n# Managed by `werkmeister machine config`; safe to hand-edit, then run `werkmeister machine config --check`.\n";function le(e=process.env,t="/.dockerenv"){return!!(e.WERKMEISTER_FEATURE??e.SANDBOX_FEATURE)&&a.existsSync(t)}o(le,"insideContainer");function H(e){if(le()&&!g("CONFIG_FILE"))throw new M(`Refusing to write ${e} from inside a workspace container: it is the host's machine config, bind-mounted here, and the running checkout is the container's /app.
3
+ import{b as M}from"./chunk-ZHIPODEL.js";import{X as C,a as ee,l as E,r as S,s as g,v as l,w as b,x as I}from"./chunk-ULNRIE5C.js";import{b as j}from"./chunk-FER2NQNY.js";import{a as o,e as q,f as y}from"./chunk-F4IMOZQW.js";y();var x=["jira","github"];y();y();var P=q(ee(),1);import*as a from"node:fs";import*as m from"node:os";import*as p from"node:path";var O="^/\\S*$";function L(){return p.join(b(),"env.sh")}o(L,"envShPath");function te(){let e=u().overrides?.standards_dir;return e?p.resolve(S(String(e))):p.join(C(),"docs","standards")}o(te,"standardsDirPath");function re(){let e=te();return a.existsSync(e)&&a.statSync(e).isDirectory()?"":u().overrides?.standards_dir?`standards tree not found: ${e} (overrides.standards_dir in ${l()})`:`no standards tree: overrides.standards_dir is unset in ${l()} and the default ${e} does not exist`}o(re,"standardsDirProblem");function je(){return p.join(b(),"secrets.env")}o(je,"secretsPath");function F(){return p.join(m.homedir(),".zshenv")}o(F,"zshenvPath");function oe(){return p.join(m.homedir(),".zshrc")}o(oe,"zshrcPath");function G(){return p.join(m.homedir(),"Library","Application Support","Claude","claude_desktop_config.json")}o(G,"desktopConfigPath");var ne=[["paths","werkmeister_root","WERKMEISTER_ROOT"],["paths","repos_root","WERKMEISTER_REPOS_ROOT"],["paths","workspaces_root","WERKMEISTER_WORKSPACES_ROOT"],["overrides","mcp_port","WERKMEISTER_MCP_PORT"],["overrides","node","WERKMEISTER_NODE"],["overrides","services_yaml","WERKMEISTER_SERVICES_YAML"],["overrides","ports_yaml","WERKMEISTER_PORTS_YAML"],["overrides","model_pricing_yaml","WERKMEISTER_MODEL_PRICING_YAML"],["overrides","cache_file","WERKMEISTER_CACHE_FILE"],["ingress","certs_dir","WERKMEISTER_CERTS_DIR"]],$="# >>> werkmeister config >>>",B="# <<< werkmeister config <<<",W="# >>> werkmeister completion >>>",N="# <<< werkmeister completion <<<",se=["SANDBOX_ROOT","SANDBOX_REPOS_ROOT","SANDBOX_WORKSPACES_ROOT"],Ie=[{key:"repos_root",label:"Repos root (absolute path)",help:"Directory holding the canonical source-repo clones (exported as WERKMEISTER_REPOS_ROOT).",acceptEmpty:!1,pattern:O,placeholder:"/Users/you/workspace"},{key:"workspaces_root",label:"Workspaces root (absolute path)",help:"Directory holding per-feature worktree workspaces (exported as WERKMEISTER_WORKSPACES_ROOT).",acceptEmpty:!1,pattern:O,placeholder:"/Users/you/workspace/features"}],z={repos_root:"REPOS_ROOT",workspaces_root:"WORKSPACES_ROOT"};function ie(e,t=""){let r=t||p.join(m.homedir(),"workspace");return e==="workspaces_root"?p.join(r,"features"):r}o(ie,"builtinPathDefault");function Ce(e,t,r={}){let n=(t??u()).paths??{},i=n[e]||g(z[e]);if(i)return String(i);let s=r.repos_root||String(n.repos_root||g(z.repos_root)||"");return ie(e,s)}o(Ce,"pathDefault");function _(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(_,"isDict");var ae=/token|secret|pass(word|wd)|credential|api_?key|private_?key|access_?key|auth/i,ce=o(e=>e===""||e==null||typeof e=="object"&&Object.keys(e).length===0,"isEmpty");function A(e){return Array.isArray(e)?e.map(A):_(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,ae.test(t)&&!ce(r)?"<redacted>":A(r)])):e}o(A,"redact");function Me(e){return P.stringify(A(e))}o(Me,"redactedYaml");function u(){try{return I()}catch(e){return E(`Could not parse ${l()}: ${e}`),{}}}o(u,"load");function pe(){let e=u().paths;return _(e)?e:{}}o(pe,"loadPaths");function De(){let e=pe().workspaces_root,t=e?[p.resolve(S(e))]:[];return[...new Set([...t,p.join(m.homedir(),"workspace")])]}o(De,"candidateWorkspaceRoots");function We(){let e=u().jira;return _(e)?e:{}}o(We,"loadJira");var R={local_domain:"local.werkmeister.io",remote_domain:"remote.werkmeister.io",certs_dir:p.join(m.homedir(),".docker","certs")};function Ne(e){let t=(e??u()).ingress,r=_(t)?t:{},n=o(i=>{let s=r[i];return typeof s=="string"&&s.trim()?s.trim():R[i]},"pick");return{local_domain:n("local_domain"),remote_domain:n("remote_domain"),certs_dir:S(n("certs_dir"))}}o(Ne,"loadIngress");function ue(e){let t=(e??u()).overrides?.workspace_repo;return typeof t=="string"?t.trim():""}o(ue,"loadWorkspaceRepo");var de="[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?/[A-Za-z0-9._-]+$",ze={key:"workspace_repo",label:"Workspace config repo (owner/repo)",help:"GitHub repo cloned under the repos root and worktree'd as the root of every feature workspace, so .werkmeister/ configs and notes get history. Defaults to your own; point it at a shared <org>/sandbox-workspace to share workspace configs with your team.",acceptEmpty:!1,pattern:de,placeholder:"your-org/sandbox-workspace"};function Ke(e){let t=e??u(),r=t.overrides?.github_org;return typeof r=="string"&&r.trim()?r.trim():ue(t).split("/")[0]??""}o(Ke,"loadGithubOrg");function Ze(e){let t=(e??u()).overrides?.werkmeister_issues_project,r=typeof t=="string"?t.trim().toUpperCase():"";return/^[A-Z][A-Z0-9]+$/.test(r)?r:""}o(Ze,"loadSandboxIssuesProject");var Le={key:"github_org",label:"GitHub org for service repos",help:"Owner of the repos in your services registry. Used to link the canonical examples that standards docs cite (github.com/<org>/<repo>).",acceptEmpty:!1,pattern:"[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$",placeholder:"your-org"},K="[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$",Fe=[{key:"local_domain",label:"Local ingress domain",help:"Base domain for docker features \u2014 each routed service is served at <service>.<domain> and Caddy terminates TLS for it.",acceptEmpty:!1,pattern:K,placeholder:R.local_domain},{key:"remote_domain",label:"Remote (K8s) ingress domain",help:"Base domain for services routed to the dev cluster instead of a local container \u2014 served at <service>.<domain>.",acceptEmpty:!1,pattern:K,placeholder:R.remote_domain},{key:"certs_dir",label:"Certificate directory (absolute path)",help:"Where bin/generate-certs.sh writes localhost.crt/.key; bind-mounted into the Caddy container (exported as WERKMEISTER_CERTS_DIR).",acceptEmpty:!1,pattern:O,placeholder:R.certs_dir}],fe="# Global werkmeister configuration \u2014 single source of truth.\n# Managed by `werkmeister machine config`; safe to hand-edit, then run `werkmeister machine config --check`.\n";function le(e=process.env,t="/.dockerenv"){return!!(e.WERKMEISTER_FEATURE??e.SANDBOX_FEATURE)&&a.existsSync(t)}o(le,"insideContainer");function H(e){if(le()&&!g("CONFIG_FILE"))throw new M(`Refusing to write ${e} from inside a workspace container: it is the host's machine config, bind-mounted here, and the running checkout is the container's /app.
4
4
  Run it from the host, or set WERKMEISTER_CONFIG_FILE to a scratch file.`,"INSIDE_CONTAINER")}o(H,"refuseInsideContainer");function me(){for(let e of(process.env.PATH??"").split(p.delimiter))if(e)try{return p.dirname(a.realpathSync(p.join(e,"werkmeister")))}catch{}return null}o(me,"installedRoot");function Y(e){let t=e.paths?.werkmeister_root,r=u().paths?.werkmeister_root;if(!e.paths||!t||!r||t===r)return;let n=o(i=>{try{return a.realpathSync(i)}catch{return i}},"real");n(t)===n(r)||n(t)===me()||(E(`Keeping werkmeister_root ${r}: the running checkout ${t} is not the installed werkmeister. Edit ${l()} to move it.`),e.paths.werkmeister_root=r)}o(Y,"keepStoredRoot");function Ge(e){let t=l();return H(t),Y(e),a.mkdirSync(p.dirname(t),{recursive:!0}),a.writeFileSync(t,fe+P.stringify(e)),a.chmodSync(t,384),t}o(Ge,"save");function he(e){return e===""?"''":/^[A-Za-z0-9_@%+=:,./-]+$/.test(e)?e:"'"+e.replace(/'/g,`'"'"'`)+"'"}o(he,"shQuote");function U(e){let t=[`# Generated by \`werkmeister machine config\` from ${l()} \u2014 DO NOT EDIT.`,"# Sourced by ~/.zshenv and the `werkmeister` wrapper for backward compatibility."];for(let[r,n,i]of ne){let s=e[r]?.[n];if(s==null||s==="")continue;let c=String(s);t.push(`export ${i}=${he(c.startsWith("~")?S(c):c)}`)}return t.join(`
5
5
  `)+`
6
6
  `}o(U,"renderEnvSh");function Be(e){let t=L();return H(t),Y(e),a.mkdirSync(p.dirname(t),{recursive:!0}),a.writeFileSync(t,U(e)),t}o(Be,"writeEnvSh");function _e(){let e=p.basename(j(m.homedir()));return`${$}
@@ -23,4 +23,4 @@ fi
23
23
  ${N}
24
24
  `;return V(t,n,i,r)}o(Ye,"ensureZshrcCompletion");function v(e){let t=String(e.command??"");return p.basename(t)==="werkmeister"&&w(e).length>0}o(v,"isSandboxServer");function w(e){let t=e.args??[];return t[0]==="mcp"||t[0]==="internal"&&t[1]==="mcp"?t:[]}o(w,"serverArgs");function Ue(e,t=!1){let r=e??G();if(!a.existsSync(r))return!1;let n;try{n=JSON.parse(a.readFileSync(r,"utf8"))}catch(s){return E(`Could not parse ${r}: ${s}`),!1}let i=!1;for(let s of Object.values(n.mcpServers??{}))!_(s)||!v(s)||("env"in s&&(delete s.env,i=!0),w(s)[0]==="mcp"&&(s.args=["internal",...w(s)],i=!0));return i&&!t&&a.writeFileSync(r,JSON.stringify(n,null,2)+`
25
25
  `),i}o(Ue,"patchDesktopConfig");function Je(e){let t=[];if(!a.existsSync(l()))return t.push(`config file missing: ${l()} \u2014 run \`werkmeister machine config --write\``),t;let r=e.paths??{};for(let f of["repos_root","workspaces_root"]){let d=r[f];if(!d)t.push(`paths.${f} is not set`);else{let T=S(String(d));a.existsSync(T)&&a.statSync(T).isDirectory()||t.push(`paths.${f} does not exist: ${d} \u2014 create it, or set another with \`werkmeister machine config --${f.replace("_","-")} <path>\``)}}let n=re();n&&t.push(n),t.push(...Z(e));let i=L();a.existsSync(i)?a.readFileSync(i,"utf8")!==U(e)&&t.push(`${i} is stale \u2014 run \`werkmeister machine config --write\` to regenerate`):t.push(`${i} missing \u2014 run \`werkmeister machine config --write\``);let s=F();(!a.existsSync(s)||!a.readFileSync(s,"utf8").includes($))&&t.push(`${s} does not source env.sh \u2014 run \`werkmeister machine config --write\``);let c=G();if(a.existsSync(c))try{let f=JSON.parse(a.readFileSync(c,"utf8"));for(let d of Object.values(f.mcpServers??{}))_(d)&&v(d)&&"env"in d&&t.push(`${c}: werkmeister server still has a stale \`env\` block \u2014 run \`werkmeister machine config --write\``),_(d)&&v(d)&&w(d)[0]==="mcp"&&t.push(`${c}: werkmeister server still launches \`mcp\`, not \`internal mcp\` \u2014 run \`werkmeister machine config --write\``)}catch{}return t}o(Je,"check");var Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,Se=/^[A-Z][A-Z0-9]+$/,ke=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,k=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isDict"),h=o(e=>typeof e=="string"||typeof e=="number"?String(e).trim():"","str");function ge(e,t){if(!Ee.test(e))return"name must be lowercase letters, digits and single hyphens";if(!k(t))return"must be a map";let r=k(t.tracker)?t.tracker:{},n=h(r.id);if(!x.includes(n))return`tracker.id must be one of ${x.join(", ")}`;let i={};if(n==="jira"){let c=h(r.project).toUpperCase();if(!Se.test(c))return"tracker.project must be a Jira project key (e.g. SW)";i.project=c}else{let c=h(r.org);if(!c)return"tracker.org must name the GitHub owner";if(i.org=c,r.repos!==void 0){let f=Array.isArray(r.repos)?r.repos.map(h):[];if(!f.length||!f.every(d=>ke.test(d)))return"tracker.repos must be a list of owner/repo";i.repos=f}}let s;if(t.board!==void 0){let c=k(t.board)?t.board:{};if(!h(c.id)||!h(c.ready))return"board needs both id and ready";s={id:h(c.id),ready:h(c.ready)}}return t.issue_statuses!==void 0&&!k(t.issue_statuses)?"issue_statuses must be a map":{name:e,tracker:n,scope:i,...s?{board:s}:{},issueStatuses:k(t.issue_statuses)?t.issue_statuses:{},default:t.default===!0}}o(ge,"parse");function Q(e){let t=e.projects,r=[],n=[];if(t==null)return{projects:r,problems:n};if(!k(t))return{projects:r,problems:["projects: must be a map of name \u2192 project"]};for(let s of Object.keys(t).sort()){let c=ge(s,t[s]);typeof c=="string"?n.push(`projects.${s}: ${c}`):r.push(c)}let i=r.filter(s=>s.default).map(s=>s.name);return i.length>1&&n.push(`projects: only one project may set default: true (${i.join(", ")})`),{projects:r,problems:n}}o(Q,"parseAll");function Z(e){return Q(e??u()).problems}o(Z,"projectProblems");var X=new Set;function rt(e){let{projects:t,problems:r}=Q(e??u());for(let n of r)X.has(n)||(X.add(n),E(`${n} \u2014 skipped (werkmeister machine config --check)`));return t}o(rt,"loadProjects");export{x as a,rt as b,L as c,te as d,re as e,je as f,F as g,oe as h,G as i,Ie as j,ie as k,Ce as l,Me as m,u as n,pe as o,De as p,We as q,Ne as r,ue as s,ze as t,Ke as u,Ze as v,Le as w,Fe as x,Ge as y,U as z,Be as A,J as B,He as C,Ye as D,Ue as E,Je as F};
26
- //# sourceMappingURL=chunk-ASF553GS.js.map
26
+ //# sourceMappingURL=chunk-CB4VFJEL.js.map