@task-handoff/controlled-instance 0.0.64 → 0.0.65

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 (66) hide show
  1. package/dist/controlled-instance-cli.js +4 -4
  2. package/dist/opencode-story-plugin.mjs +1 -1
  3. package/package.json +1 -1
  4. package/ui/assets/{abnfDiagram-VRR7QNED-DdsKR9rz.js → abnfDiagram-VRR7QNED-DFBdqSvu.js} +1 -1
  5. package/ui/assets/{arc-fRRnKp5C.js → arc-t8uFvpBL.js} +1 -1
  6. package/ui/assets/{architectureDiagram-ZJ3FMSHR-CsPoRIs5.js → architectureDiagram-ZJ3FMSHR-Bokx3Sab.js} +1 -1
  7. package/ui/assets/{blockDiagram-677ZJIJ3-CrGZ-Zxn.js → blockDiagram-677ZJIJ3-BEcrXXFl.js} +1 -1
  8. package/ui/assets/{c4Diagram-LMCZKHZV-Bx5IDump.js → c4Diagram-LMCZKHZV-Dygrf-fy.js} +1 -1
  9. package/ui/assets/channel-CJR5QT2X.js +1 -0
  10. package/ui/assets/{chunk-2Q5K7J3B-BxHH6ZiV.js → chunk-2Q5K7J3B-UHP7kwhk.js} +1 -1
  11. package/ui/assets/{chunk-32BRIVSS-DXSSorIA.js → chunk-32BRIVSS-Bv0rLdAk.js} +1 -1
  12. package/ui/assets/{chunk-5VM5RSS4-B3wNkmRh.js → chunk-5VM5RSS4-CciRB8_R.js} +1 -1
  13. package/ui/assets/{chunk-EX3LRPZG-DTWed9No.js → chunk-EX3LRPZG-D6pV84xS.js} +1 -1
  14. package/ui/assets/{chunk-JWPE2WC7-LlktxTt8.js → chunk-JWPE2WC7-vaUCMiXE.js} +1 -1
  15. package/ui/assets/{chunk-MOJQB5TN-Bvvq09F7.js → chunk-MOJQB5TN-CKZKh7tl.js} +1 -1
  16. package/ui/assets/{chunk-RYQCIY6F-BN9MBgAw.js → chunk-RYQCIY6F-CIRvAb7o.js} +1 -1
  17. package/ui/assets/{chunk-V7JOEXUC-vzoCl-Vn.js → chunk-V7JOEXUC-C_iz46Vd.js} +1 -1
  18. package/ui/assets/{chunk-VR4S4FIN-8YTK89GO.js → chunk-VR4S4FIN-Deg9CbXq.js} +1 -1
  19. package/ui/assets/{chunk-XXDRQBXY-CmhwudqI.js → chunk-XXDRQBXY-B2c1fud-.js} +1 -1
  20. package/ui/assets/classDiagram-OUVF2IWQ-GRZ-aS8k.js +1 -0
  21. package/ui/assets/classDiagram-v2-EOCWNBFH-GRZ-aS8k.js +1 -0
  22. package/ui/assets/{cose-bilkent-JH36ORCC-Bp-Bx9lz.js → cose-bilkent-JH36ORCC-BNBdsm9O.js} +1 -1
  23. package/ui/assets/{cynefin-VYW2F7L2-DS0kc3q2.js → cynefin-VYW2F7L2-DWwhi8x_.js} +1 -1
  24. package/ui/assets/{cynefinDiagram-TSTJHNR4-BxcFVhi5.js → cynefinDiagram-TSTJHNR4-CUlzZCV1.js} +1 -1
  25. package/ui/assets/{dagre-VKFMJZFB-BISatjvE.js → dagre-VKFMJZFB-DV4zk7vn.js} +1 -1
  26. package/ui/assets/{diagram-FQU43EPY-OIyZxc3z.js → diagram-FQU43EPY-NfHes2_G.js} +1 -1
  27. package/ui/assets/{diagram-G47NLZAW-COvc4QuR.js → diagram-G47NLZAW-Bk-Fz8Nx.js} +1 -1
  28. package/ui/assets/{diagram-NH7WQ7WH-4yoQdLzE.js → diagram-NH7WQ7WH-BDMPIHfI.js} +1 -1
  29. package/ui/assets/{diagram-OA4YK3LP-YxHI6fmc.js → diagram-OA4YK3LP-Czl5Kftp.js} +1 -1
  30. package/ui/assets/{diagram-WEI45ONY-CW09aioU.js → diagram-WEI45ONY-B1ul-SKc.js} +1 -1
  31. package/ui/assets/{ebnfDiagram-CCIWWBDH-3PktXyQO.js → ebnfDiagram-CCIWWBDH-BhwMpvV_.js} +1 -1
  32. package/ui/assets/{erDiagram-Q63AITRT-CpCIFrRh.js → erDiagram-Q63AITRT-CQ927K-6.js} +1 -1
  33. package/ui/assets/{flowDiagram-23GEKE2U-M15nYZUG.js → flowDiagram-23GEKE2U-Cw_ZHU7N.js} +1 -1
  34. package/ui/assets/{ganttDiagram-NO4QXBWP-CtgpIRKO.js → ganttDiagram-NO4QXBWP-BsCF5II7.js} +1 -1
  35. package/ui/assets/{gitGraphDiagram-IHSO6WYX-COg2jNxc.js → gitGraphDiagram-IHSO6WYX-B4Yl92T9.js} +1 -1
  36. package/ui/assets/{index-CXxN_Zsn.js → index-CGZZBmID.js} +1 -1
  37. package/ui/assets/{index-Dz83-RYZ.css → index-DNwrk0eJ.css} +1 -1
  38. package/ui/assets/{infoDiagram-FWYZ7A6U-mWUF2spt.js → infoDiagram-FWYZ7A6U-CTW0M6Zt.js} +1 -1
  39. package/ui/assets/{ishikawaDiagram-FXEZZL3T-BxavjyZ4.js → ishikawaDiagram-FXEZZL3T-DXpnq6cA.js} +1 -1
  40. package/ui/assets/{journeyDiagram-5HDEW3XC-Cq75iG83.js → journeyDiagram-5HDEW3XC-DhlqMmX3.js} +1 -1
  41. package/ui/assets/{kanban-definition-HUTT4EX6-QVfQBeMY.js → kanban-definition-HUTT4EX6-HyZPYqKf.js} +1 -1
  42. package/ui/assets/{linear-C3gp15PB.js → linear-BOBTZMoW.js} +1 -1
  43. package/ui/assets/{mermaid.core-BKb28sVZ.js → mermaid.core-CWTrOXge.js} +4 -4
  44. package/ui/assets/{mindmap-definition-LN4V7U3C-YyZP7V4L.js → mindmap-definition-LN4V7U3C-DbKlkx_m.js} +1 -1
  45. package/ui/assets/{pegDiagram-2B236MQR-Btatrghs.js → pegDiagram-2B236MQR-BFRq7u8G.js} +1 -1
  46. package/ui/assets/{pieDiagram-ENE6RG2P-DdqpN2bI.js → pieDiagram-ENE6RG2P-DBa5QlaA.js} +1 -1
  47. package/ui/assets/{quadrantDiagram-ABIIQ3AL-DRYnCCSr.js → quadrantDiagram-ABIIQ3AL-BtFfu8GK.js} +1 -1
  48. package/ui/assets/{railroadDiagram-RFXS5EU6-DUhOeRGU.js → railroadDiagram-RFXS5EU6-iyjb-Htb.js} +1 -1
  49. package/ui/assets/{requirementDiagram-TGXJPOKE-ee6CLIAy.js → requirementDiagram-TGXJPOKE-CNUxwqlD.js} +1 -1
  50. package/ui/assets/{sankeyDiagram-HTMAVEWB-aNXbPYof.js → sankeyDiagram-HTMAVEWB-CA1uhP77.js} +1 -1
  51. package/ui/assets/{sequenceDiagram-DBY2YBRQ-DPhGVaSa.js → sequenceDiagram-DBY2YBRQ-0ym7r3H9.js} +1 -1
  52. package/ui/assets/{sizeCapture-X5ZJPWSS-C408_UGf.js → sizeCapture-X5ZJPWSS-CBoDiE78.js} +1 -1
  53. package/ui/assets/{stateDiagram-2N3HPSRC-CB7Cc5Wu.js → stateDiagram-2N3HPSRC-Yx6P-rtI.js} +1 -1
  54. package/ui/assets/stateDiagram-v2-6OUMAXLB-C2H43Org.js +1 -0
  55. package/ui/assets/{swimlanes-5IMT3BWC-BeB6XVjI.js → swimlanes-5IMT3BWC-Dc_pcRGt.js} +2 -2
  56. package/ui/assets/swimlanesDiagram-G3AALYLV-BoHED9v0.js +8 -0
  57. package/ui/assets/{timeline-definition-FHXFAJF6-CuIVjSn2.js → timeline-definition-FHXFAJF6-DEwqgWk_.js} +1 -1
  58. package/ui/assets/{vennDiagram-L72KCM5P-DJuIfaoZ.js → vennDiagram-L72KCM5P-BG4pg9Ry.js} +1 -1
  59. package/ui/assets/{wardleyDiagram-EHGQE667-C-9pDxT9.js → wardleyDiagram-EHGQE667-8QlaGdtE.js} +1 -1
  60. package/ui/assets/{xychartDiagram-FW5EYKEG-BNZyCAT0.js → xychartDiagram-FW5EYKEG-a-EylgLj.js} +1 -1
  61. package/ui/index.html +2 -2
  62. package/ui/assets/channel-jvCVO-ea.js +0 -1
  63. package/ui/assets/classDiagram-OUVF2IWQ-0Jp44wA5.js +0 -1
  64. package/ui/assets/classDiagram-v2-EOCWNBFH-0Jp44wA5.js +0 -1
  65. package/ui/assets/stateDiagram-v2-6OUMAXLB-dE-Mgns5.js +0 -1
  66. package/ui/assets/swimlanesDiagram-G3AALYLV-B7FeNnWd.js +0 -8
@@ -1,4 +1,4 @@
1
- import{R as on,aZ as On,T as cn,Y as un,a as ln,aL as ue,ak as Hn,a2 as Nn,b2 as Pn,a6 as Vn,b5 as Rn,a3 as zn,b3 as qn,b as d,a5 as Yt,b0 as Bt,E as Zn,O as it,aE as Tt,z as Bn,V as Xn,t as Gn,bn as jn}from"./mermaid.core-BKb28sVZ.js";import{g as oe}from"./index-CXxN_Zsn.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-C3gp15PB.js";import{i as er}from"./init-Gi6I4Gst.js";import"./ui-vendor-CYGfnfwU.js";import"./xterm-C0x2rdqx.js";import"./defaultLocale-CrowFXzY.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),Z=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(Z),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,Z]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(Z)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),Z=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Ze,e:Ze,f:Br,g:qe,G:ze,H:Be,I:Be,j:Rr,L:Zr,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,B,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[B=h.charAt(++tt)])!=null?B=h.charAt(++tt):st=B==="e"?" ":"0",(at=N[B])&&(B=at(V,st)),f.push(B),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,B,st;tt<A;){if(f>=Q)return-1;if(B=N.charCodeAt(tt++),B===37){if(B=N.charAt(tt++),st=G[B in Re?N.charAt(tt++):B],!st||(f=st(h,V,f))<0)return-1}else if(B!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=Z.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),Z=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?Z:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),Z=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(Z,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function Z(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=Z(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,B=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,B,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,B,st,at,pt)):(Q=new Date(tt,A,f,B,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Zi=oe(qi);var Kt={exports:{}},Bi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Bi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},Z=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[Z(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[Z(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[Z(p)]},k.get=function(p){var L=this.$ms,x=Z(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[Z(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],Z=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:Z,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:Z,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,B,st,at={},pt,ut,He,Zt;;){if(Q=b[b.length-1],this.defaultActions[Q]?B=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),B=W[Q]&&W[Q][A]),typeof B>"u"||!B.length||!B[0]){var ce="";Zt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Zt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
1
+ import{R as on,aZ as On,T as cn,Y as un,a as ln,aL as ue,ak as Hn,a2 as Nn,b2 as Pn,a6 as Vn,b5 as Rn,a3 as zn,b3 as qn,b as d,a5 as Yt,b0 as Bt,E as Zn,O as it,aE as Tt,z as Bn,V as Xn,t as Gn,bn as jn}from"./mermaid.core-CWTrOXge.js";import{g as oe}from"./index-CGZZBmID.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-BOBTZMoW.js";import{i as er}from"./init-Gi6I4Gst.js";import"./ui-vendor-CYGfnfwU.js";import"./xterm-C0x2rdqx.js";import"./defaultLocale-CrowFXzY.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),Z=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(Z),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,Z]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(Z)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),Z=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Ze,e:Ze,f:Br,g:qe,G:ze,H:Be,I:Be,j:Rr,L:Zr,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,B,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[B=h.charAt(++tt)])!=null?B=h.charAt(++tt):st=B==="e"?" ":"0",(at=N[B])&&(B=at(V,st)),f.push(B),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,B,st;tt<A;){if(f>=Q)return-1;if(B=N.charCodeAt(tt++),B===37){if(B=N.charAt(tt++),st=G[B in Re?N.charAt(tt++):B],!st||(f=st(h,V,f))<0)return-1}else if(B!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=Z.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),Z=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?Z:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),Z=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(Z,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function Z(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=Z(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,B=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,B,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,B,st,at,pt)):(Q=new Date(tt,A,f,B,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Zi=oe(qi);var Kt={exports:{}},Bi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Bi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},Z=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[Z(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[Z(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[Z(p)]},k.get=function(p){var L=this.$ms,x=Z(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[Z(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],Z=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:Z,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:Z,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,B,st,at={},pt,ut,He,Zt;;){if(Q=b[b.length-1],this.defaultActions[Q]?B=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),B=W[Q]&&W[Q][A]),typeof B>"u"||!B.length||!B[0]){var ce="";Zt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Zt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
2
2
  `+H.showPosition()+`
3
3
  Expecting `+Zt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Zt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(B[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(B[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[B[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,B[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[B[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{I as le}from"./chunk-2Q5K7J3B-BxHH6ZiV.js";import{p as he}from"./chunk-JWPE2WC7-LlktxTt8.js";import{a6 as $e,b5 as fe,b2 as ge,a2 as ue,a3 as ye,b3 as xe,b as h,a4 as J,aE as w,b0 as me,a5 as q,bn as pe,b9 as be,t as we,z as B,s as ke,S as ve,aU as Ce}from"./mermaid.core-BKb28sVZ.js";import{p as Ee}from"./cynefin-VYW2F7L2-DS0kc3q2.js";import"./index-CXxN_Zsn.js";import"./ui-vendor-CYGfnfwU.js";import"./xterm-C0x2rdqx.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as le}from"./chunk-2Q5K7J3B-UHP7kwhk.js";import{p as he}from"./chunk-JWPE2WC7-vaUCMiXE.js";import{a6 as $e,b5 as fe,b2 as ge,a2 as ue,a3 as ye,b3 as xe,b as h,a4 as J,aE as w,b0 as me,a5 as q,bn as pe,b9 as be,t as we,z as B,s as ke,S as ve,aU as Ce}from"./mermaid.core-CWTrOXge.js";import{p as Ee}from"./cynefin-VYW2F7L2-DWwhi8x_.js";import"./index-CGZZBmID.js";import"./ui-vendor-CYGfnfwU.js";import"./xterm-C0x2rdqx.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+R}
3
3
  ${s-i/2-L/2},${x-R}
4
4
  ${t.posWithOffset-i/2-L},${x-c-R}
@@ -321,7 +321,7 @@ l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
321
321
  `;const c=aw(r,s);return`${a}<pre${l}><code class="hljs language-${Bn(s)}">${c}</code></pre>${o}
322
322
  `}function aw(e,t){const n=String(e??""),r=String(t??"").trim().toLowerCase();return!r||!ho.getLanguage(r)?Bn(n):ho.highlight(n,{language:r,ignoreIllegals:!0}).value}function ow(e,t){const n=String(e??"").trim();if(!n)return!1;let r;try{r=t?new URL(n,t):new URL(n)}catch{return!1}if(r.protocol!=="http:"&&r.protocol!=="https:")return!1;if(!t)return!0;try{return r.origin!==new URL(t).origin}catch{return!0}}function lw(e={}){const t=new Is;return t.html=({text:n})=>Bn(n),t.table=function(n){return`<div class="markdown-table-wrapper">${Reflect.apply(Is.prototype.table,this,[n])}</div>
323
323
  `},t.code=({text:n,lang:r})=>iw(n,r,e.codeTools),e.resolveImageSrc&&(t.image=function(n){const r=e.resolveImageSrc(n.href);return r?Reflect.apply(Is.prototype.image,this,[{...n,href:r}]):Bn(n.text)}),t}ut.use(ew({nonStandard:!0,strict:"warn",throwOnError:!1}));ut.use({async:!1,breaks:!0,gfm:!0});function cw(e,t={}){const n=String(e??"").replace(/\r\n?/g,`
324
- `).trim();return n?ut.parse(n,{async:!1,renderer:lw(t)}):""}const Hl=new WeakMap;async function uw(e){const t=e.target instanceof Element?e.target.closest(".markdown-code-copy"):void 0;if(!t)return!1;const n=t.closest(".markdown-code-block")?.querySelector("pre code")?.textContent;if(n===void 0||typeof navigator>"u"||!navigator.clipboard?.writeText)return!1;try{await navigator.clipboard.writeText(n)}catch{return!1}const r=t.dataset.copyLabel||t.textContent||"",s=t.dataset.copiedLabel||r;t.textContent=s,t.setAttribute("aria-label",s);const i=Hl.get(t);return i&&clearTimeout(i),Hl.set(t,setTimeout(()=>{t.isConnected&&(t.textContent=r,t.setAttribute("aria-label",r),Hl.delete(t))},1600)),!0}const dw="modulepreload",fw=function(e,t){return new URL(e,t).href},df={},hw=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const a=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");s=c(n.map(u=>{if(u=fw(u,r),u in df)return;df[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(r)for(let y=a.length-1;y>=0;y--){const b=a[y];if(b.href===u&&(!f||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":dw,f||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((y,b)=>{h.addEventListener("load",y),h.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};let ff=0,hf=Promise.resolve();function pw(e,t){const n=hf.then(async()=>{const{default:r}=await hw(async()=>{const{default:s}=await import("./mermaid.core-BKb28sVZ.js").then(i=>i.aJ);return{default:s}},[],import.meta.url);return r.initialize({flowchart:{htmlLabels:!1},securityLevel:"strict",startOnLoad:!1,suppressErrorRendering:!0,theme:t}),ff+=1,r.render(`markdown-mermaid-${ff}`,e)});return hf=n.then(()=>{},()=>{}),n}const mw=["innerHTML"],gw=Re({__name:"MarkdownContent",props:{codeTools:{},content:{},resolveImageSrc:{type:Function}},setup(e){const t=e,n=Oe(),r=we(()=>cw(t.content,{codeTools:t.codeTools,resolveImageSrc:t.resolveImageSrc})),s=new WeakMap;let i=0,a;async function o(f){const m=f.target instanceof Element?f.target.closest("a[href]"):void 0;if(m&&typeof window<"u"&&ow(m.getAttribute("href"),window.location.href)){f.preventDefault(),window.open(m.href,"_blank","noopener,noreferrer");return}await uw(f)}function l(){const f=document.documentElement.dataset.theme;return f==="dark"?"dark":f==="light"?"default":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function c(f,m,h){const y=document.createElement("pre"),b=document.createElement("code");if(b.textContent=m,y.append(b),f.replaceChildren(y),h){const S=document.createElement("small");S.className="markdown-mermaid-error",S.textContent=h,f.append(S)}}async function u(){i+=1;const f=i;await ur();const m=n.value;if(!m)return;const h=Array.from(m.querySelectorAll(".markdown-mermaid")),y=l();for(const b of h){const S=s.get(b)??b.querySelector("code")?.textContent??"";s.set(b,S),b.dataset.mermaidState="loading";try{const k=await pw(S,y);if(f!==i||!b.isConnected)return;b.innerHTML=k.svg,k.bindFunctions?.(b),b.dataset.mermaidState="rendered"}catch(k){if(f!==i||!b.isConnected)return;c(b,S,k instanceof Error?k.message:"Mermaid diagram could not be rendered."),b.dataset.mermaidState="error"}}}return pn(r,()=>{u()},{flush:"post"}),nc(()=>{u(),a=new MutationObserver(()=>{u()}),a.observe(document.documentElement,{attributeFilter:["class","data-theme"],attributes:!0})}),zo(()=>{i+=1,a?.disconnect()}),(f,m)=>(O(),j("div",{ref_key:"root",ref:n,class:"markdown-content",innerHTML:r.value,onClick:o},null,8,mw))}}),pa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Vi=pa(gw,[["__scopeId","data-v-10978998"]]),vw={class:"ai-session-composer__toolbar"},bw={class:"ai-session-composer__actions"},yw=["data-action","disabled","title"],ww={key:0,class:"ai-session-composer__error"},Sw=Re({__name:"AiSessionComposer",props:{modelValue:{},busy:{type:Boolean},canInterrupt:{type:Boolean},error:{},placeholder:{}},emits:["update:modelValue","add-context","run","steer"],setup(e,{emit:t}){const n=e,r=t,s=we({get:()=>n.modelValue,set:m=>r("update:modelValue",String(m))}),i=we(()=>n.modelValue.trim().length>0),a=we(()=>i.value||!n.canInterrupt?"send":"stop"),o=we(()=>i.value||!n.busy&&n.canInterrupt),l=we(()=>n.busy&&i.value),c=we(()=>a.value==="stop"?"Stop current AI turn":"Send message");function u(){o.value&&r("run")}function f(m){m.key!=="Enter"||m.shiftKey||m.isComposing||(m.preventDefault(),i.value&&u())}return(m,h)=>(O(),j("form",{class:"ai-session-composer",onSubmit:en(u,["prevent"])},[T(g(or),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=y=>s.value=y),class:"ai-session-composer__input",placeholder:e.placeholder||"Ask for follow-up changes",rows:"4",onKeydown:f},null,8,["modelValue","placeholder"]),x("div",vw,[x("button",{type:"button",class:"ai-session-composer__tool",title:"Add context",onClick:h[1]||(h[1]=y=>r("add-context"))},[T(g(vc),{size:18})]),x("div",bw,[l.value?(O(),j("button",{key:0,type:"button",class:"ai-session-composer__tool",title:"Steer current AI turn",onClick:h[2]||(h[2]=y=>r("steer"))},[T(g(vy),{size:18})])):pe("",!0),x("button",{type:"submit",class:"ai-session-composer__primary","data-action":a.value,disabled:!o.value,title:c.value},[a.value==="send"?(O(),Se(g(Jb),{key:0,size:18})):(O(),Se(g(By),{key:1,size:16}))],8,yw)])]),e.error?(O(),j("p",ww,Z(e.error),1)):pe("",!0)],32))}}),xw=pa(Sw,[["__scopeId","data-v-5417f399"]]);function kw(){const e=Oe({});function t(a){return a.turnCount??i1(a).length}function n(a){const o=t(a);if(!o)return 0;const l=e.value[a.id];return!l||l.index>=l.count-1&&o!==l.count?o-1:Math.min(Math.max(l.index,0),o-1)}function r(a,o){const l=t(a);l&&(e.value={...e.value,[a.id]:{index:(o+l)%l,count:l}})}function s(a){r(a,n(a)-1)}function i(a){r(a,n(a)+1)}return{nextPrompt:i,previousPrompt:s,promptCount:t,promptIndexFor:n}}function _w(){const e=Oe();function t(a,o){const l=e.value;e.value=l?.sessionId===a&&l.kind===o?void 0:{sessionId:a,kind:o}}function n(a){t(a,"prompt")}function r(a){t(a,"message")}function s(){e.value=void 0}function i(a){const o=a.target instanceof Element?a.target:void 0;!o||o.closest(".ai-session-expanded-preview")||o.closest("[data-ai-preview-trigger]")||(e.value=void 0)}return gv(document,"click",i,{capture:!0}),{collapseExpandedPreview:s,expandMessage:r,expandedPreview:e,expandPrompt:n}}function r1(e){if(!e)return"";const t=Math.max(0,Math.round((Date.now()-Date.parse(e))/1e3));if(t<60)return`${t}s ago`;const n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}function Ew(e){return[...e].sort((t,n)=>pf(n)-pf(t)||mf(t).localeCompare(mf(n)))}function pf(e){return e.status==="waiting"?4:e.status==="failed"?3:e.status==="running"?2:e.status==="idle"?1:0}function mf(e){return[e.cwd||"",e.agent||"",e.providerSessionId||e.id].join("\0")}function s1(e){return e?e.status==="waiting"?e.phase==="approval"?"waiting for approval":"waiting":e.status==="running"?e.currentTool?.name?`running · ${e.currentTool.name}`:e.phase==="tool"?"running · tool":e.phase==="editing"?"running · editing":e.phase==="responding"?"running · responding":"running":e.status==="failed"?"failed":"idle":"idle"}function Fc(e,t){if(!e)return"No recent AI activity";const n=a1(e);if(n.length&&t!==void 0){const s=Math.min(Math.max(t,0),n.length-1),i=n[s];return i?.lastMessage?.trim()?i.lastMessage:i?.summary?.trim()?i.summary:Vl(e)}const r=n.at(-1);return r&&!r.lastMessage?.trim()&&!r.summary?.trim()?Vl(e):e.lastMessage?.trim()?e.lastMessage:e.summary?.trim()?e.summary:Vl(e)}function i1(e){return e?a1(e).map(t=>t.userPrompt?.trim()||"").filter(Boolean):[]}function Aw(e){return(e?.turns||[]).filter(t=>t.userPrompt?.trim()||t.lastMessage?.trim()||t.summary?.trim())}function a1(e){if(!e)return[];const t=Aw(e),n=e.userPrompt?.trim();if(!n)return t;const r=e.activeTurnId?t.find(i=>i.id===e.activeTurnId):void 0;if(r)return(e.status==="running"||e.status==="waiting")&&r.userPrompt?.trim()===n?[...t.filter(i=>i.id!==r.id),r]:t;const s=t.at(-1);if(s?.userPrompt?.trim()===n&&!s.lastMessage?.trim()&&!s.summary?.trim())return t;if(e.status==="running"||e.status==="waiting"){const i={id:e.activeTurnId||`${e.id}:active`,userPrompt:n,status:e.status==="waiting"?"waiting":"running",phase:e.phase,revision:0,updatedAt:e.updatedAt};return[...t,i]}return t}function Vl(e){return e.currentTool?.name?e.currentTool.inputPreview?`${e.currentTool.name}: ${e.currentTool.inputPreview}`:e.currentTool.name:e.status==="running"?"Running...":e.status==="waiting"?e.phase==="approval"?"Waiting for approval.":"Waiting...":"-"}function Uc(e,t){if(!e)return"No AI session selected";const n=i1(e);if(n.length){const r=t===void 0?n.length-1:Math.min(Math.max(t,0),n.length-1);return n[r]}return"-"}function Tw(e){const t=Iw(e.cwd),n=Rw(e.providerSessionId||e.id);return t&&n?`${t} · ${n}`:t||n||e.agent}function Iw(e){return e?e.split(/[\\/]/).filter(Boolean).at(-1)||e:""}function Rw(e){return e?e.length>12?e.slice(0,12):e:""}function Cw(e){return{active:e.filter(t=>t.status==="running").length,idle:e.filter(t=>t.status==="idle").length,waiting:e.filter(t=>t.status==="waiting").length}}function So(e){const t=e.agent==="claude"&&typeof e.providerMeta?.short=="string";return!!((e.activeTurnId||t)&&(e.status==="running"||e.status==="waiting"))}function o1(e){return e.status==="waiting"&&e.phase==="approval"}const Ow={class:"ai-session-detail-content"},Nw={class:"ai-session-detail-block ai-session-detail-block-user"},Mw={class:"ai-session-detail-block ai-session-detail-block-assistant"},zw={key:0,class:"ai-session-approval-actions"},$w=["disabled"],Dw=["disabled"],Pw=["disabled"],Bw={key:1,class:"ai-session-detail-block ai-session-queue"},Lw={class:"ai-session-queue-list"},Fw=["data-state"],Uw={key:0},qw=["disabled","onClick"],Hw=["disabled","onClick"],Vw=["disabled","onClick"],jw={key:2,class:"ai-session-tool"},Gw={key:0},Zw={class:"ai-session-meta"},Kw=Re({__name:"AiSessionDetail",props:{busy:{type:Boolean},error:{},hasAppSession:{type:Boolean},messageDraft:{},promptIndex:{},session:{},sessionTitle:{}},emits:["open-app-session","remove-queued","resolve-approval","retry-queued","run-action","steer-draft","steer-queued","update:messageDraft"],setup(e){return(t,n)=>(O(),Se(g(In),{class:"ai-session-detail","aria-label":"AI session detail"},{default:$(()=>[x("aside",Ow,[x("header",null,[x("div",null,[x("span",null,Z(e.sessionTitle),1),x("strong",null,Z(g(s1)(e.session)),1)]),x("small",null,Z(g(r1)(e.session.updatedAt)),1)]),x("section",Nw,[n[7]||(n[7]=x("span",null,"User Message",-1)),T(g(In),{class:"ai-session-detail-block-scroll"},{default:$(()=>[T(Vi,{content:g(Uc)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),x("section",Mw,[n[8]||(n[8]=x("span",null,"AI Response / Progress",-1)),T(g(In),{class:"ai-session-detail-block-scroll"},{default:$(()=>[T(Vi,{content:g(Fc)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),g(o1)(e.session)?(O(),j("div",zw,[x("button",{type:"button",disabled:e.busy,onClick:n[0]||(n[0]=r=>t.$emit("resolve-approval","allow"))},[T(g(Ep),{size:14}),n[9]||(n[9]=x("span",null,"Allow",-1))],8,$w),x("button",{type:"button",disabled:e.busy,onClick:n[1]||(n[1]=r=>t.$emit("resolve-approval","skip"))},[T(g(Xb),{size:14}),n[10]||(n[10]=x("span",null,"Skip",-1))],8,Dw),x("button",{type:"button",disabled:e.busy,onClick:n[2]||(n[2]=r=>t.$emit("resolve-approval","deny"))},[T(g(Os),{size:14}),n[11]||(n[11]=x("span",null,"Deny",-1))],8,Pw)])):pe("",!0),e.session.queue?.items.length?(O(),j("section",Bw,[x("span",null,"Queue · "+Z(e.session.queue.pendingCount),1),x("div",Lw,[(O(!0),j(lt,null,Ht(e.session.queue.items,r=>(O(),j("article",{key:r.id,class:"ai-session-queue-item","data-state":r.status},[x("p",null,Z(r.message),1),r.error?(O(),j("small",Uw,Z(r.error),1)):pe("",!0),x("div",null,[x("button",{type:"button",disabled:e.busy||!g(So)(e.session),onClick:s=>t.$emit("steer-queued",r.id)},"Steer",8,qw),r.status==="failed"?(O(),j("button",{key:0,type:"button",disabled:e.busy,onClick:s=>t.$emit("retry-queued",r.id)},"Retry",8,Hw)):pe("",!0),x("button",{type:"button",disabled:e.busy,onClick:s=>t.$emit("remove-queued",r.id)},"Remove",8,Vw)])],8,Fw))),128))])])):pe("",!0),T(xw,{"model-value":e.messageDraft,class:"ai-session-compose",busy:e.busy,"can-interrupt":g(So)(e.session),error:e.error,"onUpdate:modelValue":n[3]||(n[3]=r=>t.$emit("update:messageDraft",r)),onRun:n[4]||(n[4]=r=>t.$emit("run-action")),onSteer:n[5]||(n[5]=r=>t.$emit("steer-draft"))},null,8,["model-value","busy","can-interrupt","error"]),e.session.currentTool?.name?(O(),j("div",jw,[n[12]||(n[12]=x("span",null,"Current Tool",-1)),x("strong",null,Z(e.session.currentTool.name),1),e.session.currentTool.inputPreview?(O(),j("small",Gw,Z(e.session.currentTool.inputPreview),1)):pe("",!0)])):pe("",!0),x("dl",Zw,[x("div",null,[n[13]||(n[13]=x("dt",null,"Workspace",-1)),x("dd",null,Z(e.session.cwd||"Unknown"),1)]),x("div",null,[n[14]||(n[14]=x("dt",null,"Session",-1)),x("dd",null,Z(e.session.providerSessionId||e.session.id),1)]),x("div",null,[n[15]||(n[15]=x("dt",null,"App Binding",-1)),x("dd",null,Z(e.session.appSessionId||"Not bound"),1)])]),e.hasAppSession?(O(),j("button",{key:3,type:"button",class:"ai-session-detail-open",onClick:n[6]||(n[6]=r=>t.$emit("open-app-session",e.session))},[T(g(Tp),{size:14}),n[16]||(n[16]=x("span",null,"Open App Session",-1))])):pe("",!0)])]),_:1}))}}),Ww=pa(Kw,[["__scopeId","data-v-5ae5e9eb"]]),Qw=["data-state","data-selected","data-expanded"],Jw={class:"ai-session-status"},Yw={class:"ai-session-card-meta"},Xw={class:"ai-session-context"},e9={key:0,class:"ai-session-turn-nav"},t9=["aria-label"],n9=["aria-label"],r9={class:"ai-session-expanded-head"},s9={class:"ai-session-card-tools","aria-label":"AI session card controls"},i9=["aria-label"],a9=Re({__name:"AiSessionListRow",props:{expandedPreview:{},hasAppSession:{type:Boolean},promptCount:{},promptIndex:{},selected:{type:Boolean},session:{},sessionTitle:{}},emits:["collapse-expanded-preview","expand-message","expand-prompt","next-prompt","open-app-session","previous-prompt","select"],setup(e){const t=e;function n(){return t.expandedPreview?.kind==="prompt"?Uc(t.session,t.promptIndex):Fc(t.session,t.promptIndex)}return(r,s)=>(O(),j("article",{class:"ai-session-row","data-state":e.session.status,"data-selected":e.selected,"data-expanded":e.expandedPreview?.sessionId===e.session.id?e.expandedPreview.kind:void 0},[x("div",{class:"ai-session-select",role:"button",tabindex:"0",onClick:s[4]||(s[4]=i=>r.$emit("select",e.session.id)),onKeydown:[s[5]||(s[5]=Qs(en(i=>r.$emit("select",e.session.id),["prevent"]),["enter"])),s[6]||(s[6]=Qs(en(i=>r.$emit("select",e.session.id),["prevent"]),["space"]))]},[x("div",Jw,[s[9]||(s[9]=x("span",{class:"ai-session-dot"},null,-1)),x("strong",null,Z(e.sessionTitle),1),x("small",null,Z(g(s1)(e.session)),1)]),x("div",{class:"ai-session-preview-field ai-session-preview-field-user","data-ai-preview-trigger":"",onClick:s[0]||(s[0]=en(i=>r.$emit("expand-prompt",e.session.id),["stop"]))},[T(Vi,{class:"ai-session-question",content:g(Uc)(e.session,e.promptIndex)},null,8,["content"]),s[10]||(s[10]=x("small",null,"展开用户消息",-1))]),x("div",{class:"ai-session-preview-field ai-session-preview-field-assistant","data-ai-preview-trigger":"",onClick:s[1]||(s[1]=en(i=>r.$emit("expand-message",e.session.id),["stop"]))},[T(Vi,{class:"ai-session-message",content:g(Fc)(e.session,e.promptIndex)},null,8,["content"]),s[11]||(s[11]=x("small",null,"展开 AI 进展",-1))]),x("div",Yw,[x("small",Xw,Z(g(Tw)(e.session)),1),e.promptCount>1?(O(),j("span",e9,[x("button",{type:"button","aria-label":`Previous user message for ${e.session.agent}`,onClick:s[2]||(s[2]=en(i=>r.$emit("previous-prompt",e.session),["stop"]))},[T(g(iy),{size:13})],8,t9),x("small",null,Z(e.promptIndex+1)+" / "+Z(e.promptCount),1),x("button",{type:"button","aria-label":`Next user message for ${e.session.agent}`,onClick:s[3]||(s[3]=en(i=>r.$emit("next-prompt",e.session),["stop"]))},[T(g(oy),{size:13})],8,n9)])):pe("",!0)])],32),e.expandedPreview?.sessionId===e.session.id?(O(),j("div",{key:0,class:"ai-session-expanded-preview",onClick:s[7]||(s[7]=en(i=>r.$emit("collapse-expanded-preview"),["stop"]))},[x("div",r9,[x("strong",null,Z(e.expandedPreview.kind==="prompt"?"User Message":"AI Response / Progress"),1),s[12]||(s[12]=x("small",null,"滚动查看完整内容",-1))]),T(g(In),{class:"ai-session-expanded-content"},{default:$(()=>[T(Vi,{class:"ai-session-expanded-content-inner",content:n()},null,8,["content"])]),_:1})])):pe("",!0),x("div",s9,[e.hasAppSession?(O(),j("button",{key:0,type:"button",class:"ai-session-open","aria-label":`Open app session for ${e.session.agent}`,title:"Open app session",onClick:s[8]||(s[8]=i=>r.$emit("open-app-session",e.session))},[T(g(Tp),{size:14})],8,i9)):pe("",!0)])],8,Qw))}}),o9=pa(a9,[["__scopeId","data-v-1a5bafd9"]]),l9={class:"ai-sessions-panel","aria-label":"AI sessions"},c9={class:"ai-sessions-head"},u9={class:"ai-session-chips","aria-label":"AI session counts"},d9={"data-tone":"active"},f9={"data-tone":"idle"},h9={"data-tone":"waiting"},p9={key:0,class:"ai-sessions-empty"},m9={key:1,class:"ai-sessions-empty"},g9={key:2,class:"ai-session-workspace"},v9={class:"ai-session-list-content"},b9=Re({__name:"AiSessionsPanel",setup(e){const t=rp(),n=di(),r=fi(),s=we(()=>Ew(t.data.value?.sessions||[])),i=Oe(""),a=we(()=>s.value.find(se=>se.id===i.value)||s.value[0]),{nextPrompt:o,previousPrompt:l,promptCount:c,promptIndexFor:u}=kw(),{collapseExpandedPreview:f,expandMessage:m,expandedPreview:h,expandPrompt:y}=_w(),b=Oe(""),S=Oe(!1),k=Oe(""),P=we(()=>Cw(s.value)),z=we(()=>{const se=t.data.value?.updatedAt;return se?`updated ${r1(se)}`:""});pn(s,se=>{if(!se.length){i.value="";return}se.some(re=>re.id===i.value)||(i.value=se[0].id)},{immediate:!0}),pn(a,()=>{k.value=""});function I(se){f(),i.value=se}function E(se){const re=he(se);re&&r.open(da(re))}async function _(){const se=a.value;if(!(!se||S.value||!b.value.trim()&&!So(se))){if(b.value.trim()){await L();return}await X()}}async function L(){const se=a.value,re=b.value.trim();if(!(!se||!re||S.value)){S.value=!0,k.value="";try{await Yu(se.id,re),b.value=""}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}async function N(){const se=a.value,re=b.value.trim();if(!(!se||!re||S.value)){S.value=!0,k.value="";try{await Yu(se.id,re,"steer"),b.value="",await t.refetch()}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}async function G(se){const re=a.value;re&&await q(()=>D2(re.id,se))}async function D(se){const re=a.value;re&&await q(()=>P2(re.id,se))}async function W(se){const re=a.value;re&&await q(()=>B2(re.id,se))}async function q(se){if(!S.value){S.value=!0,k.value="";try{await se(),await t.refetch()}catch(re){k.value=re instanceof Error?re.message:String(re)}finally{S.value=!1}}}async function X(){const se=a.value;if(!(!se||!So(se)||S.value||b.value.trim())){S.value=!0,k.value="";try{await G2(se.id),await t.refetch()}catch(re){k.value=re instanceof Error?re.message:String(re)}finally{S.value=!1}}}async function ne(se){const re=a.value;if(!(!re||!o1(re)||S.value)){S.value=!0,k.value="";try{await L2(re.id,se),await t.refetch()}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}function he(se){const re=n.data.value||[];if(se.appSessionId){const ie=re.find(je=>je.id===se.appSessionId&&je.status==="running");if(ie)return ie}const ze=typeof se.providerMeta?.short=="string"?se.providerMeta.short:"";return ze?re.find(ie=>ie.status==="running"&&ie.ai?.claude?.short===ze):void 0}function Ae(se){return he(se)?.title||se.agent}return(se,re)=>(O(),j("section",l9,[x("header",c9,[x("div",null,[re[1]||(re[1]=x("span",null,"AI Sessions",-1)),x("span",u9,[x("strong",d9,Z(P.value.active)+" Active",1),x("strong",f9,Z(P.value.idle)+" Idle",1),x("strong",h9,Z(P.value.waiting)+" Waiting",1)])]),x("small",null,Z(z.value),1)]),g(t).isLoading.value?(O(),j("div",p9,"Loading sessions...")):s.value.length?(O(),j("div",g9,[T(g(In),{class:"ai-session-list",role:"listbox","aria-label":"AI session list"},{default:$(()=>[x("div",v9,[(O(!0),j(lt,null,Ht(s.value,ze=>(O(),Se(o9,{key:ze.id,"expanded-preview":g(h),"has-app-session":!!he(ze),"prompt-count":g(c)(ze),"prompt-index":g(u)(ze),selected:a.value?.id===ze.id,session:ze,"session-title":Ae(ze),onCollapseExpandedPreview:g(f),onExpandMessage:g(m),onExpandPrompt:g(y),onNextPrompt:g(o),onOpenAppSession:E,onPreviousPrompt:g(l),onSelect:I},null,8,["expanded-preview","has-app-session","prompt-count","prompt-index","selected","session","session-title","onCollapseExpandedPreview","onExpandMessage","onExpandPrompt","onNextPrompt","onPreviousPrompt"]))),128))])]),_:1}),a.value?(O(),Se(Ww,{key:0,"message-draft":b.value,"onUpdate:messageDraft":re[0]||(re[0]=ze=>b.value=ze),busy:S.value,error:k.value,"has-app-session":!!he(a.value),"prompt-index":g(u)(a.value),session:a.value,"session-title":Ae(a.value),onOpenAppSession:E,onRemoveQueued:W,onResolveApproval:ne,onRetryQueued:D,onRunAction:_,onSteerDraft:N,onSteerQueued:G},null,8,["message-draft","busy","error","has-app-session","prompt-index","session","session-title"])):pe("",!0)])):(O(),j("div",m9,"No AI sessions yet."))]))}}),y9=pa(b9,[["__scopeId","data-v-28f6ca67"]]),w9={class:"desktop-workspace"},S9={key:0,class:"desktop-tabs"},x9={class:"workspace-workbar"},k9={class:"workspace-tab-list"},_9=["draggable","onClick","onKeydown","onDragstart","onDrop"],E9=["aria-invalid","disabled","title","onKeydown","onBlur"],A9={key:1,class:"workspace-tab-title"},T9={class:"tab-kind"},I9=["onClick"],R9=["src","title"],C9={key:2,class:"gui-session"},O9=["src","title"],N9={key:1,class:"logs-empty"},M9={key:4,class:"logs-empty"},z9={key:2,class:"logs-empty"},$9={key:1,class:"desktop-empty"},D9=Re({__name:"WorkspaceTabs",setup(e){const t=ds(),n=$s(),r=fi(),s=di(),i=we(()=>r.tabs.find(q=>q.id===r.activeTabId)),a=we(()=>y0(i.value,s.data.value||[])),o=Oe(""),l=Oe(""),c=Oe(""),u=Oe(""),f=Oe(!1),m=Oe();function h(q){m.value=q instanceof HTMLInputElement?q:void 0}Pn(()=>{if(!s.data.value)return;const q=s.data.value||[];r.pruneSession(new Set(q.map(X=>X.id)),ti(q)),r.syncSessionTitles(q)});function y(q){return q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"}function b(q){y(q)&&(r.setActive(q.id),l.value=q.id,c.value=q.title,u.value="",f.value=!1,ur(()=>m.value?.select()))}function S(){l.value="",c.value="",u.value="",f.value=!1}async function k(q){if(l.value!==q.id||!y(q)||f.value)return;const X=c.value.trim();if(!X){u.value="Session title is required.",ur(()=>m.value?.focus());return}if(X===q.title){S();return}f.value=!0;try{const ne=await W2(q.sessionId,X);r.syncSessionTitles([ne]),S()}catch(ne){f.value=!1,u.value=ne instanceof Error?ne.message:String(ne),ur(()=>m.value?.focus())}}function P(q){if(q.vnc?.backend==="kasmvnc"){const Ae=r.guiHidpi?E():1,se=new URLSearchParams({path:io(`/api/apps/sessions/${q.id}/web/websockify`),autoconnect:"1",resize:r.vncResizeMode,enable_hidpi:r.guiHidpi&&Ae>1?"1":"0",show_control_bar:"1"}),re=I(q,Ae);return r.vncResizeMode==="scale"&&re&&(se.set("forced_resolution_x",String(re.width)),se.set("forced_resolution_y",String(re.height))),n.token&&se.set("token",n.token),`${jn(q.vnc.webPath)}?${se.toString()}`}const X=n.token?`?token=${encodeURIComponent(n.token)}`:"",ne=q.vnc?.webPath?`${io(q.vnc.webPath)}${X}`:"",he=new URLSearchParams({path:ne,autoconnect:"1",resize:r.vncResizeMode});return jn(`/api/novnc/vnc.html?${he.toString()}`)}function z(q,X){if(X.vnc?.backend!=="kasmvnc")return;const ne=q.target;if(!(ne instanceof HTMLIFrameElement))return;ne.contentWindow?.postMessage({action:"resize",value:r.vncResizeMode},"*");const he=I(X,r.guiHidpi?E():1);r.vncResizeMode==="scale"&&he&&ne.contentWindow?.postMessage({action:"set_resolution",value_x:he.width,value_y:he.height},"*")}function I(q,X){if(!q.display)return;const ne=X>1?X:1;return{width:Math.max(1,Math.round(q.display.width/ne)),height:Math.max(1,Math.round(q.display.height/ne))}}function E(){return typeof window>"u"?1:window.devicePixelRatio||1}function _(q){const X=jn(q.web?.webPath||"");return n.token?`${X}${X.includes("?")?"&":"?"}token=${encodeURIComponent(n.token)}`:X}function L(q){return q.type==="ai-sessions"?"ai":q.type==="logs"?"logs":q.type==="shared-vnc"?"shared":q.type==="app-vnc"?"vnc":q.type==="app-web"?"web":"tty"}function N(q,X){o.value=X.id,q.dataTransfer?.setData("text/plain",X.id),q.dataTransfer&&(q.dataTransfer.effectAllowed="move")}function G(q,X){if(o.value){const he=(q.currentTarget instanceof HTMLElement?q.currentTarget:void 0)?.getBoundingClientRect(),Ae=he&&q.clientX>he.left+he.width/2?"after":"before";r.moveTab(o.value,X.id,Ae)}D()}function D(){o.value=""}async function W(q){if(q.type==="ai-sessions"){r.close(q.id);return}if(q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"){await Cs(q.sessionId),r.close(q.id),await t.invalidateQueries({queryKey:["status"]});return}r.close(q.id)}return(q,X)=>(O(),j("section",w9,[g(r).tabs.length?(O(),j("div",S9,[x("div",x9,[T(g(In),{class:"workspace-tab-list-scroll"},{default:$(()=>[x("div",k9,[(O(!0),j(lt,null,Ht(g(r).tabs,ne=>(O(),Se(g(Ip),{key:ne.id},{default:$(()=>[T(g(Cp),{"as-child":""},{default:$(()=>[x("div",{class:At(["workspace-tab",{active:g(r).activeTabId===ne.id,dragging:o.value===ne.id,editing:l.value===ne.id}]),role:"button",tabindex:"0",draggable:l.value!==ne.id,onClick:he=>g(r).setActive(ne.id),onKeydown:[Qs(he=>g(r).setActive(ne.id),["enter"]),Qs(en(he=>g(r).setActive(ne.id),["prevent"]),["space"])],onDragstart:he=>N(he,ne),onDragover:X[2]||(X[2]=en(()=>{},["prevent"])),onDragenter:X[3]||(X[3]=en(()=>{},["prevent"])),onDrop:en(he=>G(he,ne),["prevent"]),onDragend:D},[l.value===ne.id?No((O(),j("input",{key:0,ref_for:!0,ref:h,"onUpdate:modelValue":X[0]||(X[0]=he=>c.value=he),class:"workspace-tab-title-input","aria-invalid":!!u.value,disabled:f.value,title:u.value,maxlength:"120",onClick:X[1]||(X[1]=en(()=>{},["stop"])),onKeydown:[Qs(en(he=>k(ne),["stop","prevent"]),["enter"]),Qs(en(S,["stop","prevent"]),["escape"])],onBlur:he=>k(ne)},null,40,E9)),[[Mo,c.value]]):(O(),j("span",A9,Z(ne.title),1)),x("span",T9,Z(L(ne)),1),x("span",{class:"tab-close",title:"Close tab","aria-label":"Close tab",onClick:en(he=>W(ne),["stop"])},[T(g(Os),{size:13,"stroke-width":2.2})],8,I9)],42,_9)]),_:2},1024),T(g(Rp),null,{default:$(()=>[T(g(Gs),{disabled:!y(ne),onSelect:he=>b(ne)},{default:$(()=>[...X[5]||(X[5]=[fe("Rename session",-1)])]),_:1},8,["disabled","onSelect"])]),_:2},1024)]),_:2},1024))),128))])]),_:1})]),x("div",{class:At(["workspace-tab-panel desktop-tab-panel",{"workspace-log-panel":i.value?.type==="logs","workspace-ai-panel":i.value?.type==="ai-sessions"}])},[i.value?.type==="ai-sessions"?(O(),Se(y9,{key:0})):a.value&&i.value?(O(),j(lt,{key:1},[i.value.type==="app-tty"&&a.value.status==="running"?(O(),Se(Lp,{key:0,session:a.value},null,8,["session"])):i.value.type==="app-web"&&a.value.status==="running"&&a.value.web?(O(),j("iframe",{key:1,class:"web-frame",src:_(a.value),title:a.value.title,allow:"clipboard-read; clipboard-write; fullscreen"},null,8,R9)):i.value.type==="app-vnc"||i.value.type==="shared-vnc"?(O(),j("div",C9,[a.value.vnc?(O(),j("iframe",{key:`${a.value.id}:${g(r).vncResizeMode}:${g(r).guiHidpi?"hidpi":"1x"}`,class:"vnc-frame workspace-vnc-frame",src:P(a.value),title:`${i.value.title} VNC`,allow:"clipboard-read; clipboard-write; fullscreen",onLoad:X[4]||(X[4]=ne=>z(ne,a.value))},null,40,O9)):(O(),j("p",N9,"VNC is unavailable for this session."))])):i.value.type==="logs"?(O(),Se(g(In),{key:3,class:"workspace-log-scroll"},{default:$(()=>[T(Bp,{session:a.value},null,8,["session"])]),_:1})):(O(),j("p",M9,"Runtime view is unavailable for this session state."))],64)):(O(),j("p",z9,"The selected workspace tab no longer has a running session."))],2)])):(O(),j("div",$9,[...X[6]||(X[6]=[x("h1",null,"TaskHandoff Desktop",-1),x("p",null,"Launch an app from the dock.",-1)])]))]))}});function qc(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function gf(e,t="|"){return e.map(n=>f1(n)).join(t)}function Hc(e,t){return typeof t=="bigint"?t.toString():t}class P9{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function Jo(e){return new P9(e)}function B9(e){return e==null}function Z0(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function L9(e,t){const n=e/t,r=Math.round(n),s=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<s?0:n-r}function Dr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function K0(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Or(e){return K0(e._zod.def)??e._zod.def.shape}function l1(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Dr(this,t,r),r},enumerable:!0,configurable:!0})}function c1(e,t,n){t in e?Dr(e,t,n):e[t]=n}function Ms(e,t,n,r){const s=Or(t);for(const i of n){const a=Object.getOwnPropertyDescriptor(s,i);a.enumerable&&(a.get?l1(e,i,()=>{const o=t._zod.def.shape[i];return r?r(o,i):o}):c1(e,i,r?r(a.value,i):a.value))}}function F9(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?l1(e,n,()=>t[n]):c1(e,n,r.value))}}function Tn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function U9(e){return JSON.stringify(e)}function q9(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const u1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const H9=Jo(()=>{if(Zn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ii(e){if(sa(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(sa(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function d1(e){return ii(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const V9=new Set(["string","number","symbol"]);function ai(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ps(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function f1(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function j9(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const h1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},G9={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Z9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return Ms(i,e,Yo(e,t)),ps(e,Tn(n,{shape:i,checks:[]}))}function Yo(e,t){const n=Or(e),r=[];for(const s of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,s)?.enumerable)throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&r.push(s)}return r}function K9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(Yo(e,t)),a={};return Ms(a,e,Reflect.ownKeys(Or(e)).filter(o=>!i.has(o))),ps(e,Tn(n,{shape:a,checks:[]}))}function W9(e,t){if(!ii(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=Or(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ps(e,Tn(e._zod.def,{shape:p1(e,t)}))}function p1(e,t){const n={};return Ms(n,e,Reflect.ownKeys(Or(e))),F9(n,t),n}function Q9(e,t){if(!ii(t))throw new Error("Invalid input to safeExtend: expected a plain object");return ps(e,Tn(e._zod.def,{shape:p1(e,t)}))}function J9(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};Ms(n,e,Reflect.ownKeys(Or(e))),Ms(n,t,Reflect.ownKeys(Or(t)));const r=Tn(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ps(e,r)}function vf(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const o=n?new Set(Yo(t,n)):void 0,l={};return Ms(l,t,Reflect.ownKeys(Or(t)),e&&((c,u)=>o&&!o.has(u)?c:new e({type:"optional",innerType:c}))),ps(t,Tn(t._zod.def,{shape:l,checks:[]}))}function Y9(e,t,n){const r=n?new Set(Yo(t,n)):void 0,s={};return Ms(s,t,Reflect.ownKeys(Or(t)),(i,a)=>r&&!r.has(a)?i:new e({type:"nonoptional",innerType:i})),ps(t,Tn(t._zod.def,{shape:s}))}function Ar(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function X9(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Js(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ci(e){return typeof e=="string"?e:e?.message}function bf(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const s=r.maximum??r.length??r.size;s>=0&&t.push([s,n])}return t}function Vc(e,t,n){var r;for(let s=t;s<e.length;s++)(r=e[s]).schema??(r.schema=n)}function ls(e,t,n){var r;const s=e.inst?._zod?.traits;s?.has("$ZodType")&&(s.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Ci(e.inst?._zod.def?.error?.(e))??Ci(i?.(e))??Ci(t?.error?.(e))??Ci(n.customError?.(e))??Ci(n.localeError?.(e))??"Invalid input",o={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(o[l]=e[l]);return o.path??(o.path=[]),o.message=a,t?.reportInput&&(o.input=e.input),o}const eS=/[\uD800-\uDBFF]/;function W0(e){const t=e.length;if(!eS.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Q0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function tS(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ia(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function nS(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):rS(e,n,r.value)}}function cs(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function m1(e,t,n){return cs(e,t,n,!1)}function g1(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return cs(this,n,r(this))},set(s){cs(this,n,s)}})}return t}function rS(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:cs(this,t,n.bind(this))},set(r){cs(this,t,r)}})}function sS(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let jl,Kr=!1;const iS={configurable:!0,get(){Kr=!0}};function ft(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&jl!==e._zod){jl=void 0;return}jl=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,iS);const s=Kr;Kr=!1;try{const i=n(this);return Kr?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Kr=Kr||s,i}catch(i){throw delete this[t],Kr=Kr||s,i}},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s})}})}function aS(e,t,n,r){const s=sS(e,t);s&&Object.defineProperty(s,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const oS="~constantCatch";function lS(e){const t=()=>e;return t[oS]=!0,t}var yf;const Gl={value:void 0,enumerable:!1};let wf="captureStackTrace"in Error?Error:null;function cS(e){const t=wf;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return wf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function J(e,t,n,r){const s={};function i(m){this.def=m,this.constr=f,this.traits=new Set}i.prototype=s;const a=n,o=a&&new WeakSet;function l(m,h){if(m._zod){if(m._zod.traits.has(e))return}else{Gl.value=new i(h);try{Object.defineProperty(m,"_zod",Gl)}finally{Gl.value=void 0}}if(m._zod.traits.add(e),t(m,h),o){const b=Object.getPrototypeOf(m),S=m._zod.constr.prototype;let k=b;for(;k&&k!==S;)k=Object.getPrototypeOf(k);const P=k??b;o.has(P)||(o.add(P),nS(P,a))}const y=f.prototype;for(const b in y)Object.prototype.hasOwnProperty.call(y,b)&&(b in m||(m[b]=y[b].bind(m)))}const c=r?.Parent??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function f(m){const h=r?.Parent?cS(u):this;l(h,m);const y=h._zod.deferred;if(y){for(const S of y)S();h._zod.deferred=void 0}const b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(h),h}return Object.defineProperty(f,"init",{value:l}),Object.defineProperty(f,Symbol.hasInstance,{value:m=>r?.Parent&&m instanceof r.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Rs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class v1 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(yf=globalThis).__zod_globalConfig??(yf.__zod_globalConfig={});const Zn=globalThis.__zod_globalConfig;function dr(e){return e&&Object.assign(Zn,e),Zn}function uS(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Hc,2)),e.message}function dS(e){this._zod.message=e}const fS={get:uS,set:dS,enumerable:!0,configurable:!0},Zl={value:void 0,enumerable:!1},Sf=new WeakSet([Object.prototype,Error.prototype]),hS=(e,t)=>{e.name="$ZodError",Zl.value=t,Object.defineProperty(e,"issues",Zl),Zl.value=void 0,Object.defineProperty(e,"message",fS);const n=Object.getPrototypeOf(e);Sf.has(n)||(Sf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},pS=J("$ZodError",hS);function mS(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function gS(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?mS(n,s.path[0],()=>[]).push(t(s)):r.push(t(s));return{formErrors:r,fieldErrors:n}}function vS(e,t=n=>n.message){const n={_errors:[]},r=(s,i=[])=>{for(const a of s.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>r({issues:o},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{const o=[...i,...a.path];if(o.length===0)n._errors.push(t(a));else{let l=n,c=0;for(;c<o.length;){const u=o[c],f=c===o.length-1;if(u==="_errors"){f&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,u)||Object.defineProperty(l,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const m=l[u];f&&m._errors.push(t(a)),l=m,c++}}}};return r(e),n}function Xo(e,t){return{callee:t?.callee??e,Err:t?.Err}}const J0=e=>{const t=(n,r,s,i)=>{const a=s?{...s,async:!1}:{async:!1},o=n._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new Rs;if(o.issues.length){const l=new(i?.Err??e)(o.issues.map(c=>ls(c,a,dr())));throw u1(l,i?.callee??t),l}return o.value};return t},Y0=e=>{const t=async(n,r,s,i)=>{const a=s?{...s,async:!0}:{async:!0};let o=n._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){const l=new(i?.Err??e)(o.issues.map(c=>ls(c,a,dr())));throw u1(l,i?.callee??t),l}return o.value};return t},X0=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Rs;return i.issues.length?b1(e,i.issues,s):{success:!0,data:i.value}};function b1(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(s=>ls(s,n,dr()))),t=void 0,n=void 0),r},set error(s){r=s,t=void 0,n=void 0}}}const eu=e=>async(t,n,r)=>{const s=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?b1(e,i.issues,s):{success:!0,data:i.value}},bS=Symbol.for("zod.compile.invalid"),yS=Symbol.for("zod.compile.fallback"),wS=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==bS)return!0;if(r.definite===!0&&n===void 0)return!1}return SS(e,t,n)});function SS(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},s=e._zod.bag.fallbackRun;let i;if(s?(r[yS]=!0,i=s({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new Rs;return i.issues.length===0}const xS=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let s=e._zod.run({value:t,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length===0},kS=e=>{const t=J0(e),n=(r,s,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,s,o,Xo(n,a))};return n},_S=e=>{const t=J0(e),n=(r,s,i,a)=>t(r,s,i,Xo(n,a));return n},ES=e=>{const t=Y0(e),n=async(r,s,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,s,o,Xo(n,a))};return n},AS=e=>{const t=Y0(e),n=async(r,s,i,a)=>await t(r,s,i,Xo(n,a));return n},TS=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return X0(e)(t,n,s)},IS=e=>(t,n,r)=>X0(e)(t,n,r),RS=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return eu(e)(t,n,s)},CS=e=>async(t,n,r)=>eu(e)(t,n,r),OS=/^[cC][0-9a-z]{6,}$/,NS=/^[0-9a-z]+$/,MS=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,zS=/^[0-9a-vA-V]{20}$/,$S=/^[A-Za-z0-9]{27}$/,DS=/^[a-zA-Z0-9_-]{21}$/;function PS(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const BS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,LS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FS=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,US="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function qS(){return new RegExp(US,"u")}const HS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,VS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,GS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,KS=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,WS=/^https?$/,QS=/^\+[1-9]\d{6,14}$/,y1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function JS(e){return new RegExp(`^${e}$`)}const YS=JS(y1);function jc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function XS(e){return new RegExp(`^${jc(e)}$`)}function ex(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${jc({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${jc({precision:e.precision})}`:n;return new RegExp(`^${y1}T(?:${r})$`)}const tx=/^[\s\S]{0,}$/,nx=/^-?\d+$/,tu=/^-?\d+(?:\.\d+)?$/,rx=/^(?:true|false)$/i,sx=/^[^A-Z]*$/,ix=/^[^a-z]*$/,Sn=J("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nu=e=>{const t=e.value;return!B9(t)&&t.length!==void 0},xo={number:"number",bigint:"bigint",object:"date"},w1=J("$ZodCheckLessThan",(e,t)=>{Sn.init(e,t);const n=xo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:xo[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),S1=J("$ZodCheckGreaterThan",(e,t)=>{Sn.init(e,t);const n=xo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:xo[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ax=J("$ZodCheckMultipleOf",(e,t)=>{Sn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):L9(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ox=J("$ZodCheckNumberFormat",(e,t)=>{Sn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=h1[t.format];e._zod.check=a=>{const o=a.value;if(n){if(!Number.isInteger(o)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}o<s&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),o>i&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),lx=J("$ZodCheckMaxLength",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length;if((typeof s=="string"&&i>t.maximum?W0(s):i)<=t.maximum)return;const o=Q0(s);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),cx=J("$ZodCheckMinLength",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length;if((typeof s=="string"&&i>=t.minimum&&i<t.minimum*2?W0(s):i)>=t.minimum)return;const o=Q0(s);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ux=J("$ZodCheckLengthEquals",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length,a=typeof s=="string"&&i>=t.length&&i<=t.length*2?W0(s):i;if(a===t.length)return;const o=Q0(s),l=a>t.length;r.issues.push({origin:o,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),el=J("$ZodCheckStringFormat",(e,t)=>{var n,r;Sn.init(e,t),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),dx=J("$ZodCheckRegex",(e,t)=>{el.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fx=J("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=sx),el.init(e,t)}),hx=J("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ix),el.init(e,t)}),px=J("$ZodCheckIncludes",(e,t)=>{Sn.init(e,t);const n=ai(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),mx=J("$ZodCheckStartsWith",(e,t)=>{Sn.init(e,t);const n=new RegExp(`^${ai(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),gx=J("$ZodCheckEndsWith",(e,t)=>{Sn.init(e,t);const n=new RegExp(`.*${ai(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),vx=J("$ZodCheckOverwrite",(e,t)=>{Sn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class bx{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
324
+ `).trim();return n?ut.parse(n,{async:!1,renderer:lw(t)}):""}const Hl=new WeakMap;async function uw(e){const t=e.target instanceof Element?e.target.closest(".markdown-code-copy"):void 0;if(!t)return!1;const n=t.closest(".markdown-code-block")?.querySelector("pre code")?.textContent;if(n===void 0||typeof navigator>"u"||!navigator.clipboard?.writeText)return!1;try{await navigator.clipboard.writeText(n)}catch{return!1}const r=t.dataset.copyLabel||t.textContent||"",s=t.dataset.copiedLabel||r;t.textContent=s,t.setAttribute("aria-label",s);const i=Hl.get(t);return i&&clearTimeout(i),Hl.set(t,setTimeout(()=>{t.isConnected&&(t.textContent=r,t.setAttribute("aria-label",r),Hl.delete(t))},1600)),!0}const dw="modulepreload",fw=function(e,t){return new URL(e,t).href},df={},hw=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const a=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");s=c(n.map(u=>{if(u=fw(u,r),u in df)return;df[u]=!0;const f=u.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(r)for(let y=a.length-1;y>=0;y--){const b=a[y];if(b.href===u&&(!f||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${m}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":dw,f||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((y,b)=>{h.addEventListener("load",y),h.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};let ff=0,hf=Promise.resolve();function pw(e,t){const n=hf.then(async()=>{const{default:r}=await hw(async()=>{const{default:s}=await import("./mermaid.core-CWTrOXge.js").then(i=>i.aJ);return{default:s}},[],import.meta.url);return r.initialize({flowchart:{htmlLabels:!1},securityLevel:"strict",startOnLoad:!1,suppressErrorRendering:!0,theme:t}),ff+=1,r.render(`markdown-mermaid-${ff}`,e)});return hf=n.then(()=>{},()=>{}),n}const mw=["innerHTML"],gw=Re({__name:"MarkdownContent",props:{codeTools:{},content:{},resolveImageSrc:{type:Function}},setup(e){const t=e,n=Oe(),r=we(()=>cw(t.content,{codeTools:t.codeTools,resolveImageSrc:t.resolveImageSrc})),s=new WeakMap;let i=0,a;async function o(f){const m=f.target instanceof Element?f.target.closest("a[href]"):void 0;if(m&&typeof window<"u"&&ow(m.getAttribute("href"),window.location.href)){f.preventDefault(),window.open(m.href,"_blank","noopener,noreferrer");return}await uw(f)}function l(){const f=document.documentElement.dataset.theme;return f==="dark"?"dark":f==="light"?"default":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"default"}function c(f,m,h){const y=document.createElement("pre"),b=document.createElement("code");if(b.textContent=m,y.append(b),f.replaceChildren(y),h){const S=document.createElement("small");S.className="markdown-mermaid-error",S.textContent=h,f.append(S)}}async function u(){i+=1;const f=i;await ur();const m=n.value;if(!m)return;const h=Array.from(m.querySelectorAll(".markdown-mermaid")),y=l();for(const b of h){const S=s.get(b)??b.querySelector("code")?.textContent??"";s.set(b,S),b.dataset.mermaidState="loading";try{const k=await pw(S,y);if(f!==i||!b.isConnected)return;b.innerHTML=k.svg,k.bindFunctions?.(b),b.dataset.mermaidState="rendered"}catch(k){if(f!==i||!b.isConnected)return;c(b,S,k instanceof Error?k.message:"Mermaid diagram could not be rendered."),b.dataset.mermaidState="error"}}}return pn(r,()=>{u()},{flush:"post"}),nc(()=>{u(),a=new MutationObserver(()=>{u()}),a.observe(document.documentElement,{attributeFilter:["class","data-theme"],attributes:!0})}),zo(()=>{i+=1,a?.disconnect()}),(f,m)=>(O(),j("div",{ref_key:"root",ref:n,class:"markdown-content",innerHTML:r.value,onClick:o},null,8,mw))}}),pa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Vi=pa(gw,[["__scopeId","data-v-10978998"]]),vw={class:"ai-session-composer__toolbar"},bw={class:"ai-session-composer__actions"},yw=["data-action","disabled","title"],ww={key:0,class:"ai-session-composer__error"},Sw=Re({__name:"AiSessionComposer",props:{modelValue:{},busy:{type:Boolean},canInterrupt:{type:Boolean},error:{},placeholder:{}},emits:["update:modelValue","add-context","run","steer"],setup(e,{emit:t}){const n=e,r=t,s=we({get:()=>n.modelValue,set:m=>r("update:modelValue",String(m))}),i=we(()=>n.modelValue.trim().length>0),a=we(()=>i.value||!n.canInterrupt?"send":"stop"),o=we(()=>i.value||!n.busy&&n.canInterrupt),l=we(()=>n.busy&&i.value),c=we(()=>a.value==="stop"?"Stop current AI turn":"Send message");function u(){o.value&&r("run")}function f(m){m.key!=="Enter"||m.shiftKey||m.isComposing||(m.preventDefault(),i.value&&u())}return(m,h)=>(O(),j("form",{class:"ai-session-composer",onSubmit:en(u,["prevent"])},[T(g(or),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=y=>s.value=y),class:"ai-session-composer__input",placeholder:e.placeholder||"Ask for follow-up changes",rows:"4",onKeydown:f},null,8,["modelValue","placeholder"]),x("div",vw,[x("button",{type:"button",class:"ai-session-composer__tool",title:"Add context",onClick:h[1]||(h[1]=y=>r("add-context"))},[T(g(vc),{size:18})]),x("div",bw,[l.value?(O(),j("button",{key:0,type:"button",class:"ai-session-composer__tool",title:"Steer current AI turn",onClick:h[2]||(h[2]=y=>r("steer"))},[T(g(vy),{size:18})])):pe("",!0),x("button",{type:"submit",class:"ai-session-composer__primary","data-action":a.value,disabled:!o.value,title:c.value},[a.value==="send"?(O(),Se(g(Jb),{key:0,size:18})):(O(),Se(g(By),{key:1,size:16}))],8,yw)])]),e.error?(O(),j("p",ww,Z(e.error),1)):pe("",!0)],32))}}),xw=pa(Sw,[["__scopeId","data-v-5417f399"]]);function kw(){const e=Oe({});function t(a){return a.turnCount??i1(a).length}function n(a){const o=t(a);if(!o)return 0;const l=e.value[a.id];return!l||l.index>=l.count-1&&o!==l.count?o-1:Math.min(Math.max(l.index,0),o-1)}function r(a,o){const l=t(a);l&&(e.value={...e.value,[a.id]:{index:(o+l)%l,count:l}})}function s(a){r(a,n(a)-1)}function i(a){r(a,n(a)+1)}return{nextPrompt:i,previousPrompt:s,promptCount:t,promptIndexFor:n}}function _w(){const e=Oe();function t(a,o){const l=e.value;e.value=l?.sessionId===a&&l.kind===o?void 0:{sessionId:a,kind:o}}function n(a){t(a,"prompt")}function r(a){t(a,"message")}function s(){e.value=void 0}function i(a){const o=a.target instanceof Element?a.target:void 0;!o||o.closest(".ai-session-expanded-preview")||o.closest("[data-ai-preview-trigger]")||(e.value=void 0)}return gv(document,"click",i,{capture:!0}),{collapseExpandedPreview:s,expandMessage:r,expandedPreview:e,expandPrompt:n}}function r1(e){if(!e)return"";const t=Math.max(0,Math.round((Date.now()-Date.parse(e))/1e3));if(t<60)return`${t}s ago`;const n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}function Ew(e){return[...e].sort((t,n)=>pf(n)-pf(t)||mf(t).localeCompare(mf(n)))}function pf(e){return e.status==="waiting"?4:e.status==="failed"?3:e.status==="running"?2:e.status==="idle"?1:0}function mf(e){return[e.cwd||"",e.agent||"",e.providerSessionId||e.id].join("\0")}function s1(e){return e?e.status==="waiting"?e.phase==="approval"?"waiting for approval":"waiting":e.status==="running"?e.currentTool?.name?`running · ${e.currentTool.name}`:e.phase==="tool"?"running · tool":e.phase==="editing"?"running · editing":e.phase==="responding"?"running · responding":"running":e.status==="failed"?"failed":"idle":"idle"}function Fc(e,t){if(!e)return"No recent AI activity";const n=a1(e);if(n.length&&t!==void 0){const s=Math.min(Math.max(t,0),n.length-1),i=n[s];return i?.lastMessage?.trim()?i.lastMessage:i?.summary?.trim()?i.summary:Vl(e)}const r=n.at(-1);return r&&!r.lastMessage?.trim()&&!r.summary?.trim()?Vl(e):e.lastMessage?.trim()?e.lastMessage:e.summary?.trim()?e.summary:Vl(e)}function i1(e){return e?a1(e).map(t=>t.userPrompt?.trim()||"").filter(Boolean):[]}function Aw(e){return(e?.turns||[]).filter(t=>t.userPrompt?.trim()||t.lastMessage?.trim()||t.summary?.trim())}function a1(e){if(!e)return[];const t=Aw(e),n=e.userPrompt?.trim();if(!n)return t;const r=e.activeTurnId?t.find(i=>i.id===e.activeTurnId):void 0;if(r)return(e.status==="running"||e.status==="waiting")&&r.userPrompt?.trim()===n?[...t.filter(i=>i.id!==r.id),r]:t;const s=t.at(-1);if(s?.userPrompt?.trim()===n&&!s.lastMessage?.trim()&&!s.summary?.trim())return t;if(e.status==="running"||e.status==="waiting"){const i={id:e.activeTurnId||`${e.id}:active`,userPrompt:n,status:e.status==="waiting"?"waiting":"running",phase:e.phase,revision:0,updatedAt:e.updatedAt};return[...t,i]}return t}function Vl(e){return e.currentTool?.name?e.currentTool.inputPreview?`${e.currentTool.name}: ${e.currentTool.inputPreview}`:e.currentTool.name:e.status==="running"?"Running...":e.status==="waiting"?e.phase==="approval"?"Waiting for approval.":"Waiting...":"-"}function Uc(e,t){if(!e)return"No AI session selected";const n=i1(e);if(n.length){const r=t===void 0?n.length-1:Math.min(Math.max(t,0),n.length-1);return n[r]}return"-"}function Tw(e){const t=Iw(e.cwd),n=Rw(e.providerSessionId||e.id);return t&&n?`${t} · ${n}`:t||n||e.agent}function Iw(e){return e?e.split(/[\\/]/).filter(Boolean).at(-1)||e:""}function Rw(e){return e?e.length>12?e.slice(0,12):e:""}function Cw(e){return{active:e.filter(t=>t.status==="running").length,idle:e.filter(t=>t.status==="idle").length,waiting:e.filter(t=>t.status==="waiting").length}}function So(e){const t=e.agent==="claude"&&typeof e.providerMeta?.short=="string";return!!((e.activeTurnId||t)&&(e.status==="running"||e.status==="waiting"))}function o1(e){return e.status==="waiting"&&e.phase==="approval"}const Ow={class:"ai-session-detail-content"},Nw={class:"ai-session-detail-block ai-session-detail-block-user"},Mw={class:"ai-session-detail-block ai-session-detail-block-assistant"},zw={key:0,class:"ai-session-approval-actions"},$w=["disabled"],Dw=["disabled"],Pw=["disabled"],Bw={key:1,class:"ai-session-detail-block ai-session-queue"},Lw={class:"ai-session-queue-list"},Fw=["data-state"],Uw={key:0},qw=["disabled","onClick"],Hw=["disabled","onClick"],Vw=["disabled","onClick"],jw={key:2,class:"ai-session-tool"},Gw={key:0},Zw={class:"ai-session-meta"},Kw=Re({__name:"AiSessionDetail",props:{busy:{type:Boolean},error:{},hasAppSession:{type:Boolean},messageDraft:{},promptIndex:{},session:{},sessionTitle:{}},emits:["open-app-session","remove-queued","resolve-approval","retry-queued","run-action","steer-draft","steer-queued","update:messageDraft"],setup(e){return(t,n)=>(O(),Se(g(In),{class:"ai-session-detail","aria-label":"AI session detail"},{default:$(()=>[x("aside",Ow,[x("header",null,[x("div",null,[x("span",null,Z(e.sessionTitle),1),x("strong",null,Z(g(s1)(e.session)),1)]),x("small",null,Z(g(r1)(e.session.updatedAt)),1)]),x("section",Nw,[n[7]||(n[7]=x("span",null,"User Message",-1)),T(g(In),{class:"ai-session-detail-block-scroll"},{default:$(()=>[T(Vi,{content:g(Uc)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),x("section",Mw,[n[8]||(n[8]=x("span",null,"AI Response / Progress",-1)),T(g(In),{class:"ai-session-detail-block-scroll"},{default:$(()=>[T(Vi,{content:g(Fc)(e.session,e.promptIndex)},null,8,["content"])]),_:1})]),g(o1)(e.session)?(O(),j("div",zw,[x("button",{type:"button",disabled:e.busy,onClick:n[0]||(n[0]=r=>t.$emit("resolve-approval","allow"))},[T(g(Ep),{size:14}),n[9]||(n[9]=x("span",null,"Allow",-1))],8,$w),x("button",{type:"button",disabled:e.busy,onClick:n[1]||(n[1]=r=>t.$emit("resolve-approval","skip"))},[T(g(Xb),{size:14}),n[10]||(n[10]=x("span",null,"Skip",-1))],8,Dw),x("button",{type:"button",disabled:e.busy,onClick:n[2]||(n[2]=r=>t.$emit("resolve-approval","deny"))},[T(g(Os),{size:14}),n[11]||(n[11]=x("span",null,"Deny",-1))],8,Pw)])):pe("",!0),e.session.queue?.items.length?(O(),j("section",Bw,[x("span",null,"Queue · "+Z(e.session.queue.pendingCount),1),x("div",Lw,[(O(!0),j(lt,null,Ht(e.session.queue.items,r=>(O(),j("article",{key:r.id,class:"ai-session-queue-item","data-state":r.status},[x("p",null,Z(r.message),1),r.error?(O(),j("small",Uw,Z(r.error),1)):pe("",!0),x("div",null,[x("button",{type:"button",disabled:e.busy||!g(So)(e.session),onClick:s=>t.$emit("steer-queued",r.id)},"Steer",8,qw),r.status==="failed"?(O(),j("button",{key:0,type:"button",disabled:e.busy,onClick:s=>t.$emit("retry-queued",r.id)},"Retry",8,Hw)):pe("",!0),x("button",{type:"button",disabled:e.busy,onClick:s=>t.$emit("remove-queued",r.id)},"Remove",8,Vw)])],8,Fw))),128))])])):pe("",!0),T(xw,{"model-value":e.messageDraft,class:"ai-session-compose",busy:e.busy,"can-interrupt":g(So)(e.session),error:e.error,"onUpdate:modelValue":n[3]||(n[3]=r=>t.$emit("update:messageDraft",r)),onRun:n[4]||(n[4]=r=>t.$emit("run-action")),onSteer:n[5]||(n[5]=r=>t.$emit("steer-draft"))},null,8,["model-value","busy","can-interrupt","error"]),e.session.currentTool?.name?(O(),j("div",jw,[n[12]||(n[12]=x("span",null,"Current Tool",-1)),x("strong",null,Z(e.session.currentTool.name),1),e.session.currentTool.inputPreview?(O(),j("small",Gw,Z(e.session.currentTool.inputPreview),1)):pe("",!0)])):pe("",!0),x("dl",Zw,[x("div",null,[n[13]||(n[13]=x("dt",null,"Workspace",-1)),x("dd",null,Z(e.session.cwd||"Unknown"),1)]),x("div",null,[n[14]||(n[14]=x("dt",null,"Session",-1)),x("dd",null,Z(e.session.providerSessionId||e.session.id),1)]),x("div",null,[n[15]||(n[15]=x("dt",null,"App Binding",-1)),x("dd",null,Z(e.session.appSessionId||"Not bound"),1)])]),e.hasAppSession?(O(),j("button",{key:3,type:"button",class:"ai-session-detail-open",onClick:n[6]||(n[6]=r=>t.$emit("open-app-session",e.session))},[T(g(Tp),{size:14}),n[16]||(n[16]=x("span",null,"Open App Session",-1))])):pe("",!0)])]),_:1}))}}),Ww=pa(Kw,[["__scopeId","data-v-5ae5e9eb"]]),Qw=["data-state","data-selected","data-expanded"],Jw={class:"ai-session-status"},Yw={class:"ai-session-card-meta"},Xw={class:"ai-session-context"},e9={key:0,class:"ai-session-turn-nav"},t9=["aria-label"],n9=["aria-label"],r9={class:"ai-session-expanded-head"},s9={class:"ai-session-card-tools","aria-label":"AI session card controls"},i9=["aria-label"],a9=Re({__name:"AiSessionListRow",props:{expandedPreview:{},hasAppSession:{type:Boolean},promptCount:{},promptIndex:{},selected:{type:Boolean},session:{},sessionTitle:{}},emits:["collapse-expanded-preview","expand-message","expand-prompt","next-prompt","open-app-session","previous-prompt","select"],setup(e){const t=e;function n(){return t.expandedPreview?.kind==="prompt"?Uc(t.session,t.promptIndex):Fc(t.session,t.promptIndex)}return(r,s)=>(O(),j("article",{class:"ai-session-row","data-state":e.session.status,"data-selected":e.selected,"data-expanded":e.expandedPreview?.sessionId===e.session.id?e.expandedPreview.kind:void 0},[x("div",{class:"ai-session-select",role:"button",tabindex:"0",onClick:s[4]||(s[4]=i=>r.$emit("select",e.session.id)),onKeydown:[s[5]||(s[5]=Qs(en(i=>r.$emit("select",e.session.id),["prevent"]),["enter"])),s[6]||(s[6]=Qs(en(i=>r.$emit("select",e.session.id),["prevent"]),["space"]))]},[x("div",Jw,[s[9]||(s[9]=x("span",{class:"ai-session-dot"},null,-1)),x("strong",null,Z(e.sessionTitle),1),x("small",null,Z(g(s1)(e.session)),1)]),x("div",{class:"ai-session-preview-field ai-session-preview-field-user","data-ai-preview-trigger":"",onClick:s[0]||(s[0]=en(i=>r.$emit("expand-prompt",e.session.id),["stop"]))},[T(Vi,{class:"ai-session-question",content:g(Uc)(e.session,e.promptIndex)},null,8,["content"]),s[10]||(s[10]=x("small",null,"展开用户消息",-1))]),x("div",{class:"ai-session-preview-field ai-session-preview-field-assistant","data-ai-preview-trigger":"",onClick:s[1]||(s[1]=en(i=>r.$emit("expand-message",e.session.id),["stop"]))},[T(Vi,{class:"ai-session-message",content:g(Fc)(e.session,e.promptIndex)},null,8,["content"]),s[11]||(s[11]=x("small",null,"展开 AI 进展",-1))]),x("div",Yw,[x("small",Xw,Z(g(Tw)(e.session)),1),e.promptCount>1?(O(),j("span",e9,[x("button",{type:"button","aria-label":`Previous user message for ${e.session.agent}`,onClick:s[2]||(s[2]=en(i=>r.$emit("previous-prompt",e.session),["stop"]))},[T(g(iy),{size:13})],8,t9),x("small",null,Z(e.promptIndex+1)+" / "+Z(e.promptCount),1),x("button",{type:"button","aria-label":`Next user message for ${e.session.agent}`,onClick:s[3]||(s[3]=en(i=>r.$emit("next-prompt",e.session),["stop"]))},[T(g(oy),{size:13})],8,n9)])):pe("",!0)])],32),e.expandedPreview?.sessionId===e.session.id?(O(),j("div",{key:0,class:"ai-session-expanded-preview",onClick:s[7]||(s[7]=en(i=>r.$emit("collapse-expanded-preview"),["stop"]))},[x("div",r9,[x("strong",null,Z(e.expandedPreview.kind==="prompt"?"User Message":"AI Response / Progress"),1),s[12]||(s[12]=x("small",null,"滚动查看完整内容",-1))]),T(g(In),{class:"ai-session-expanded-content"},{default:$(()=>[T(Vi,{class:"ai-session-expanded-content-inner",content:n()},null,8,["content"])]),_:1})])):pe("",!0),x("div",s9,[e.hasAppSession?(O(),j("button",{key:0,type:"button",class:"ai-session-open","aria-label":`Open app session for ${e.session.agent}`,title:"Open app session",onClick:s[8]||(s[8]=i=>r.$emit("open-app-session",e.session))},[T(g(Tp),{size:14})],8,i9)):pe("",!0)])],8,Qw))}}),o9=pa(a9,[["__scopeId","data-v-1a5bafd9"]]),l9={class:"ai-sessions-panel","aria-label":"AI sessions"},c9={class:"ai-sessions-head"},u9={class:"ai-session-chips","aria-label":"AI session counts"},d9={"data-tone":"active"},f9={"data-tone":"idle"},h9={"data-tone":"waiting"},p9={key:0,class:"ai-sessions-empty"},m9={key:1,class:"ai-sessions-empty"},g9={key:2,class:"ai-session-workspace"},v9={class:"ai-session-list-content"},b9=Re({__name:"AiSessionsPanel",setup(e){const t=rp(),n=di(),r=fi(),s=we(()=>Ew(t.data.value?.sessions||[])),i=Oe(""),a=we(()=>s.value.find(se=>se.id===i.value)||s.value[0]),{nextPrompt:o,previousPrompt:l,promptCount:c,promptIndexFor:u}=kw(),{collapseExpandedPreview:f,expandMessage:m,expandedPreview:h,expandPrompt:y}=_w(),b=Oe(""),S=Oe(!1),k=Oe(""),P=we(()=>Cw(s.value)),z=we(()=>{const se=t.data.value?.updatedAt;return se?`updated ${r1(se)}`:""});pn(s,se=>{if(!se.length){i.value="";return}se.some(re=>re.id===i.value)||(i.value=se[0].id)},{immediate:!0}),pn(a,()=>{k.value=""});function I(se){f(),i.value=se}function E(se){const re=he(se);re&&r.open(da(re))}async function _(){const se=a.value;if(!(!se||S.value||!b.value.trim()&&!So(se))){if(b.value.trim()){await L();return}await X()}}async function L(){const se=a.value,re=b.value.trim();if(!(!se||!re||S.value)){S.value=!0,k.value="";try{await Yu(se.id,re),b.value=""}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}async function N(){const se=a.value,re=b.value.trim();if(!(!se||!re||S.value)){S.value=!0,k.value="";try{await Yu(se.id,re,"steer"),b.value="",await t.refetch()}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}async function G(se){const re=a.value;re&&await q(()=>D2(re.id,se))}async function D(se){const re=a.value;re&&await q(()=>P2(re.id,se))}async function W(se){const re=a.value;re&&await q(()=>B2(re.id,se))}async function q(se){if(!S.value){S.value=!0,k.value="";try{await se(),await t.refetch()}catch(re){k.value=re instanceof Error?re.message:String(re)}finally{S.value=!1}}}async function X(){const se=a.value;if(!(!se||!So(se)||S.value||b.value.trim())){S.value=!0,k.value="";try{await G2(se.id),await t.refetch()}catch(re){k.value=re instanceof Error?re.message:String(re)}finally{S.value=!1}}}async function ne(se){const re=a.value;if(!(!re||!o1(re)||S.value)){S.value=!0,k.value="";try{await L2(re.id,se),await t.refetch()}catch(ze){k.value=ze instanceof Error?ze.message:String(ze)}finally{S.value=!1}}}function he(se){const re=n.data.value||[];if(se.appSessionId){const ie=re.find(je=>je.id===se.appSessionId&&je.status==="running");if(ie)return ie}const ze=typeof se.providerMeta?.short=="string"?se.providerMeta.short:"";return ze?re.find(ie=>ie.status==="running"&&ie.ai?.claude?.short===ze):void 0}function Ae(se){return he(se)?.title||se.agent}return(se,re)=>(O(),j("section",l9,[x("header",c9,[x("div",null,[re[1]||(re[1]=x("span",null,"AI Sessions",-1)),x("span",u9,[x("strong",d9,Z(P.value.active)+" Active",1),x("strong",f9,Z(P.value.idle)+" Idle",1),x("strong",h9,Z(P.value.waiting)+" Waiting",1)])]),x("small",null,Z(z.value),1)]),g(t).isLoading.value?(O(),j("div",p9,"Loading sessions...")):s.value.length?(O(),j("div",g9,[T(g(In),{class:"ai-session-list",role:"listbox","aria-label":"AI session list"},{default:$(()=>[x("div",v9,[(O(!0),j(lt,null,Ht(s.value,ze=>(O(),Se(o9,{key:ze.id,"expanded-preview":g(h),"has-app-session":!!he(ze),"prompt-count":g(c)(ze),"prompt-index":g(u)(ze),selected:a.value?.id===ze.id,session:ze,"session-title":Ae(ze),onCollapseExpandedPreview:g(f),onExpandMessage:g(m),onExpandPrompt:g(y),onNextPrompt:g(o),onOpenAppSession:E,onPreviousPrompt:g(l),onSelect:I},null,8,["expanded-preview","has-app-session","prompt-count","prompt-index","selected","session","session-title","onCollapseExpandedPreview","onExpandMessage","onExpandPrompt","onNextPrompt","onPreviousPrompt"]))),128))])]),_:1}),a.value?(O(),Se(Ww,{key:0,"message-draft":b.value,"onUpdate:messageDraft":re[0]||(re[0]=ze=>b.value=ze),busy:S.value,error:k.value,"has-app-session":!!he(a.value),"prompt-index":g(u)(a.value),session:a.value,"session-title":Ae(a.value),onOpenAppSession:E,onRemoveQueued:W,onResolveApproval:ne,onRetryQueued:D,onRunAction:_,onSteerDraft:N,onSteerQueued:G},null,8,["message-draft","busy","error","has-app-session","prompt-index","session","session-title"])):pe("",!0)])):(O(),j("div",m9,"No AI sessions yet."))]))}}),y9=pa(b9,[["__scopeId","data-v-28f6ca67"]]),w9={class:"desktop-workspace"},S9={key:0,class:"desktop-tabs"},x9={class:"workspace-workbar"},k9={class:"workspace-tab-list"},_9=["draggable","onClick","onKeydown","onDragstart","onDrop"],E9=["aria-invalid","disabled","title","onKeydown","onBlur"],A9={key:1,class:"workspace-tab-title"},T9={class:"tab-kind"},I9=["onClick"],R9=["src","title"],C9={key:2,class:"gui-session"},O9=["src","title"],N9={key:1,class:"logs-empty"},M9={key:4,class:"logs-empty"},z9={key:2,class:"logs-empty"},$9={key:1,class:"desktop-empty"},D9=Re({__name:"WorkspaceTabs",setup(e){const t=ds(),n=$s(),r=fi(),s=di(),i=we(()=>r.tabs.find(q=>q.id===r.activeTabId)),a=we(()=>y0(i.value,s.data.value||[])),o=Oe(""),l=Oe(""),c=Oe(""),u=Oe(""),f=Oe(!1),m=Oe();function h(q){m.value=q instanceof HTMLInputElement?q:void 0}Pn(()=>{if(!s.data.value)return;const q=s.data.value||[];r.pruneSession(new Set(q.map(X=>X.id)),ti(q)),r.syncSessionTitles(q)});function y(q){return q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"}function b(q){y(q)&&(r.setActive(q.id),l.value=q.id,c.value=q.title,u.value="",f.value=!1,ur(()=>m.value?.select()))}function S(){l.value="",c.value="",u.value="",f.value=!1}async function k(q){if(l.value!==q.id||!y(q)||f.value)return;const X=c.value.trim();if(!X){u.value="Session title is required.",ur(()=>m.value?.focus());return}if(X===q.title){S();return}f.value=!0;try{const ne=await W2(q.sessionId,X);r.syncSessionTitles([ne]),S()}catch(ne){f.value=!1,u.value=ne instanceof Error?ne.message:String(ne),ur(()=>m.value?.focus())}}function P(q){if(q.vnc?.backend==="kasmvnc"){const Ae=r.guiHidpi?E():1,se=new URLSearchParams({path:io(`/api/apps/sessions/${q.id}/web/websockify`),autoconnect:"1",resize:r.vncResizeMode,enable_hidpi:r.guiHidpi&&Ae>1?"1":"0",show_control_bar:"1"}),re=I(q,Ae);return r.vncResizeMode==="scale"&&re&&(se.set("forced_resolution_x",String(re.width)),se.set("forced_resolution_y",String(re.height))),n.token&&se.set("token",n.token),`${jn(q.vnc.webPath)}?${se.toString()}`}const X=n.token?`?token=${encodeURIComponent(n.token)}`:"",ne=q.vnc?.webPath?`${io(q.vnc.webPath)}${X}`:"",he=new URLSearchParams({path:ne,autoconnect:"1",resize:r.vncResizeMode});return jn(`/api/novnc/vnc.html?${he.toString()}`)}function z(q,X){if(X.vnc?.backend!=="kasmvnc")return;const ne=q.target;if(!(ne instanceof HTMLIFrameElement))return;ne.contentWindow?.postMessage({action:"resize",value:r.vncResizeMode},"*");const he=I(X,r.guiHidpi?E():1);r.vncResizeMode==="scale"&&he&&ne.contentWindow?.postMessage({action:"set_resolution",value_x:he.width,value_y:he.height},"*")}function I(q,X){if(!q.display)return;const ne=X>1?X:1;return{width:Math.max(1,Math.round(q.display.width/ne)),height:Math.max(1,Math.round(q.display.height/ne))}}function E(){return typeof window>"u"?1:window.devicePixelRatio||1}function _(q){const X=jn(q.web?.webPath||"");return n.token?`${X}${X.includes("?")?"&":"?"}token=${encodeURIComponent(n.token)}`:X}function L(q){return q.type==="ai-sessions"?"ai":q.type==="logs"?"logs":q.type==="shared-vnc"?"shared":q.type==="app-vnc"?"vnc":q.type==="app-web"?"web":"tty"}function N(q,X){o.value=X.id,q.dataTransfer?.setData("text/plain",X.id),q.dataTransfer&&(q.dataTransfer.effectAllowed="move")}function G(q,X){if(o.value){const he=(q.currentTarget instanceof HTMLElement?q.currentTarget:void 0)?.getBoundingClientRect(),Ae=he&&q.clientX>he.left+he.width/2?"after":"before";r.moveTab(o.value,X.id,Ae)}D()}function D(){o.value=""}async function W(q){if(q.type==="ai-sessions"){r.close(q.id);return}if(q.type==="app-vnc"||q.type==="app-web"||q.type==="app-tty"){await Cs(q.sessionId),r.close(q.id),await t.invalidateQueries({queryKey:["status"]});return}r.close(q.id)}return(q,X)=>(O(),j("section",w9,[g(r).tabs.length?(O(),j("div",S9,[x("div",x9,[T(g(In),{class:"workspace-tab-list-scroll"},{default:$(()=>[x("div",k9,[(O(!0),j(lt,null,Ht(g(r).tabs,ne=>(O(),Se(g(Ip),{key:ne.id},{default:$(()=>[T(g(Cp),{"as-child":""},{default:$(()=>[x("div",{class:At(["workspace-tab",{active:g(r).activeTabId===ne.id,dragging:o.value===ne.id,editing:l.value===ne.id}]),role:"button",tabindex:"0",draggable:l.value!==ne.id,onClick:he=>g(r).setActive(ne.id),onKeydown:[Qs(he=>g(r).setActive(ne.id),["enter"]),Qs(en(he=>g(r).setActive(ne.id),["prevent"]),["space"])],onDragstart:he=>N(he,ne),onDragover:X[2]||(X[2]=en(()=>{},["prevent"])),onDragenter:X[3]||(X[3]=en(()=>{},["prevent"])),onDrop:en(he=>G(he,ne),["prevent"]),onDragend:D},[l.value===ne.id?No((O(),j("input",{key:0,ref_for:!0,ref:h,"onUpdate:modelValue":X[0]||(X[0]=he=>c.value=he),class:"workspace-tab-title-input","aria-invalid":!!u.value,disabled:f.value,title:u.value,maxlength:"120",onClick:X[1]||(X[1]=en(()=>{},["stop"])),onKeydown:[Qs(en(he=>k(ne),["stop","prevent"]),["enter"]),Qs(en(S,["stop","prevent"]),["escape"])],onBlur:he=>k(ne)},null,40,E9)),[[Mo,c.value]]):(O(),j("span",A9,Z(ne.title),1)),x("span",T9,Z(L(ne)),1),x("span",{class:"tab-close",title:"Close tab","aria-label":"Close tab",onClick:en(he=>W(ne),["stop"])},[T(g(Os),{size:13,"stroke-width":2.2})],8,I9)],42,_9)]),_:2},1024),T(g(Rp),null,{default:$(()=>[T(g(Gs),{disabled:!y(ne),onSelect:he=>b(ne)},{default:$(()=>[...X[5]||(X[5]=[fe("Rename session",-1)])]),_:1},8,["disabled","onSelect"])]),_:2},1024)]),_:2},1024))),128))])]),_:1})]),x("div",{class:At(["workspace-tab-panel desktop-tab-panel",{"workspace-log-panel":i.value?.type==="logs","workspace-ai-panel":i.value?.type==="ai-sessions"}])},[i.value?.type==="ai-sessions"?(O(),Se(y9,{key:0})):a.value&&i.value?(O(),j(lt,{key:1},[i.value.type==="app-tty"&&a.value.status==="running"?(O(),Se(Lp,{key:0,session:a.value},null,8,["session"])):i.value.type==="app-web"&&a.value.status==="running"&&a.value.web?(O(),j("iframe",{key:1,class:"web-frame",src:_(a.value),title:a.value.title,allow:"clipboard-read; clipboard-write; fullscreen"},null,8,R9)):i.value.type==="app-vnc"||i.value.type==="shared-vnc"?(O(),j("div",C9,[a.value.vnc?(O(),j("iframe",{key:`${a.value.id}:${g(r).vncResizeMode}:${g(r).guiHidpi?"hidpi":"1x"}`,class:"vnc-frame workspace-vnc-frame",src:P(a.value),title:`${i.value.title} VNC`,allow:"clipboard-read; clipboard-write; fullscreen",onLoad:X[4]||(X[4]=ne=>z(ne,a.value))},null,40,O9)):(O(),j("p",N9,"VNC is unavailable for this session."))])):i.value.type==="logs"?(O(),Se(g(In),{key:3,class:"workspace-log-scroll"},{default:$(()=>[T(Bp,{session:a.value},null,8,["session"])]),_:1})):(O(),j("p",M9,"Runtime view is unavailable for this session state."))],64)):(O(),j("p",z9,"The selected workspace tab no longer has a running session."))],2)])):(O(),j("div",$9,[...X[6]||(X[6]=[x("h1",null,"TaskHandoff Desktop",-1),x("p",null,"Launch an app from the dock.",-1)])]))]))}});function qc(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function gf(e,t="|"){return e.map(n=>f1(n)).join(t)}function Hc(e,t){return typeof t=="bigint"?t.toString():t}class P9{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function Jo(e){return new P9(e)}function B9(e){return e==null}function Z0(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function L9(e,t){const n=e/t,r=Math.round(n),s=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<s?0:n-r}function Dr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function K0(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Or(e){return K0(e._zod.def)??e._zod.def.shape}function l1(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Dr(this,t,r),r},enumerable:!0,configurable:!0})}function c1(e,t,n){t in e?Dr(e,t,n):e[t]=n}function Ms(e,t,n,r){const s=Or(t);for(const i of n){const a=Object.getOwnPropertyDescriptor(s,i);a.enumerable&&(a.get?l1(e,i,()=>{const o=t._zod.def.shape[i];return r?r(o,i):o}):c1(e,i,r?r(a.value,i):a.value))}}function F9(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?l1(e,n,()=>t[n]):c1(e,n,r.value))}}function Tn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function U9(e){return JSON.stringify(e)}function q9(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const u1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const H9=Jo(()=>{if(Zn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ii(e){if(sa(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(sa(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function d1(e){return ii(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const V9=new Set(["string","number","symbol"]);function ai(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ps(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function f1(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function j9(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const h1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},G9={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Z9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return Ms(i,e,Yo(e,t)),ps(e,Tn(n,{shape:i,checks:[]}))}function Yo(e,t){const n=Or(e),r=[];for(const s of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,s)?.enumerable)throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&r.push(s)}return r}function K9(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(Yo(e,t)),a={};return Ms(a,e,Reflect.ownKeys(Or(e)).filter(o=>!i.has(o))),ps(e,Tn(n,{shape:a,checks:[]}))}function W9(e,t){if(!ii(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=Or(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ps(e,Tn(e._zod.def,{shape:p1(e,t)}))}function p1(e,t){const n={};return Ms(n,e,Reflect.ownKeys(Or(e))),F9(n,t),n}function Q9(e,t){if(!ii(t))throw new Error("Invalid input to safeExtend: expected a plain object");return ps(e,Tn(e._zod.def,{shape:p1(e,t)}))}function J9(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};Ms(n,e,Reflect.ownKeys(Or(e))),Ms(n,t,Reflect.ownKeys(Or(t)));const r=Tn(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ps(e,r)}function vf(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const o=n?new Set(Yo(t,n)):void 0,l={};return Ms(l,t,Reflect.ownKeys(Or(t)),e&&((c,u)=>o&&!o.has(u)?c:new e({type:"optional",innerType:c}))),ps(t,Tn(t._zod.def,{shape:l,checks:[]}))}function Y9(e,t,n){const r=n?new Set(Yo(t,n)):void 0,s={};return Ms(s,t,Reflect.ownKeys(Or(t)),(i,a)=>r&&!r.has(a)?i:new e({type:"nonoptional",innerType:i})),ps(t,Tn(t._zod.def,{shape:s}))}function Ar(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function X9(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Js(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ci(e){return typeof e=="string"?e:e?.message}function bf(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const s=r.maximum??r.length??r.size;s>=0&&t.push([s,n])}return t}function Vc(e,t,n){var r;for(let s=t;s<e.length;s++)(r=e[s]).schema??(r.schema=n)}function ls(e,t,n){var r;const s=e.inst?._zod?.traits;s?.has("$ZodType")&&(s.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Ci(e.inst?._zod.def?.error?.(e))??Ci(i?.(e))??Ci(t?.error?.(e))??Ci(n.customError?.(e))??Ci(n.localeError?.(e))??"Invalid input",o={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(o[l]=e[l]);return o.path??(o.path=[]),o.message=a,t?.reportInput&&(o.input=e.input),o}const eS=/[\uD800-\uDBFF]/;function W0(e){const t=e.length;if(!eS.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Q0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function tS(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ia(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function nS(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):rS(e,n,r.value)}}function cs(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function m1(e,t,n){return cs(e,t,n,!1)}function g1(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return cs(this,n,r(this))},set(s){cs(this,n,s)}})}return t}function rS(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:cs(this,t,n.bind(this))},set(r){cs(this,t,r)}})}function sS(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let jl,Kr=!1;const iS={configurable:!0,get(){Kr=!0}};function ft(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&jl!==e._zod){jl=void 0;return}jl=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,iS);const s=Kr;Kr=!1;try{const i=n(this);return Kr?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Kr=Kr||s,i}catch(i){throw delete this[t],Kr=Kr||s,i}},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s})}})}function aS(e,t,n,r){const s=sS(e,t);s&&Object.defineProperty(s,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const oS="~constantCatch";function lS(e){const t=()=>e;return t[oS]=!0,t}var yf;const Gl={value:void 0,enumerable:!1};let wf="captureStackTrace"in Error?Error:null;function cS(e){const t=wf;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return wf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function J(e,t,n,r){const s={};function i(m){this.def=m,this.constr=f,this.traits=new Set}i.prototype=s;const a=n,o=a&&new WeakSet;function l(m,h){if(m._zod){if(m._zod.traits.has(e))return}else{Gl.value=new i(h);try{Object.defineProperty(m,"_zod",Gl)}finally{Gl.value=void 0}}if(m._zod.traits.add(e),t(m,h),o){const b=Object.getPrototypeOf(m),S=m._zod.constr.prototype;let k=b;for(;k&&k!==S;)k=Object.getPrototypeOf(k);const P=k??b;o.has(P)||(o.add(P),nS(P,a))}const y=f.prototype;for(const b in y)Object.prototype.hasOwnProperty.call(y,b)&&(b in m||(m[b]=y[b].bind(m)))}const c=r?.Parent??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function f(m){const h=r?.Parent?cS(u):this;l(h,m);const y=h._zod.deferred;if(y){for(const S of y)S();h._zod.deferred=void 0}const b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(h),h}return Object.defineProperty(f,"init",{value:l}),Object.defineProperty(f,Symbol.hasInstance,{value:m=>r?.Parent&&m instanceof r.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Rs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class v1 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(yf=globalThis).__zod_globalConfig??(yf.__zod_globalConfig={});const Zn=globalThis.__zod_globalConfig;function dr(e){return e&&Object.assign(Zn,e),Zn}function uS(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Hc,2)),e.message}function dS(e){this._zod.message=e}const fS={get:uS,set:dS,enumerable:!0,configurable:!0},Zl={value:void 0,enumerable:!1},Sf=new WeakSet([Object.prototype,Error.prototype]),hS=(e,t)=>{e.name="$ZodError",Zl.value=t,Object.defineProperty(e,"issues",Zl),Zl.value=void 0,Object.defineProperty(e,"message",fS);const n=Object.getPrototypeOf(e);Sf.has(n)||(Sf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},pS=J("$ZodError",hS);function mS(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function gS(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?mS(n,s.path[0],()=>[]).push(t(s)):r.push(t(s));return{formErrors:r,fieldErrors:n}}function vS(e,t=n=>n.message){const n={_errors:[]},r=(s,i=[])=>{for(const a of s.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>r({issues:o},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{const o=[...i,...a.path];if(o.length===0)n._errors.push(t(a));else{let l=n,c=0;for(;c<o.length;){const u=o[c],f=c===o.length-1;if(u==="_errors"){f&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,u)||Object.defineProperty(l,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const m=l[u];f&&m._errors.push(t(a)),l=m,c++}}}};return r(e),n}function Xo(e,t){return{callee:t?.callee??e,Err:t?.Err}}const J0=e=>{const t=(n,r,s,i)=>{const a=s?{...s,async:!1}:{async:!1},o=n._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new Rs;if(o.issues.length){const l=new(i?.Err??e)(o.issues.map(c=>ls(c,a,dr())));throw u1(l,i?.callee??t),l}return o.value};return t},Y0=e=>{const t=async(n,r,s,i)=>{const a=s?{...s,async:!0}:{async:!0};let o=n._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){const l=new(i?.Err??e)(o.issues.map(c=>ls(c,a,dr())));throw u1(l,i?.callee??t),l}return o.value};return t},X0=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Rs;return i.issues.length?b1(e,i.issues,s):{success:!0,data:i.value}};function b1(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(s=>ls(s,n,dr()))),t=void 0,n=void 0),r},set error(s){r=s,t=void 0,n=void 0}}}const eu=e=>async(t,n,r)=>{const s=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?b1(e,i.issues,s):{success:!0,data:i.value}},bS=Symbol.for("zod.compile.invalid"),yS=Symbol.for("zod.compile.fallback"),wS=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==bS)return!0;if(r.definite===!0&&n===void 0)return!1}return SS(e,t,n)});function SS(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},s=e._zod.bag.fallbackRun;let i;if(s?(r[yS]=!0,i=s({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new Rs;return i.issues.length===0}const xS=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let s=e._zod.run({value:t,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length===0},kS=e=>{const t=J0(e),n=(r,s,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,s,o,Xo(n,a))};return n},_S=e=>{const t=J0(e),n=(r,s,i,a)=>t(r,s,i,Xo(n,a));return n},ES=e=>{const t=Y0(e),n=async(r,s,i,a)=>{const o=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,s,o,Xo(n,a))};return n},AS=e=>{const t=Y0(e),n=async(r,s,i,a)=>await t(r,s,i,Xo(n,a));return n},TS=e=>(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return X0(e)(t,n,s)},IS=e=>(t,n,r)=>X0(e)(t,n,r),RS=e=>async(t,n,r)=>{const s=r?{...r,direction:"backward"}:{direction:"backward"};return eu(e)(t,n,s)},CS=e=>async(t,n,r)=>eu(e)(t,n,r),OS=/^[cC][0-9a-z]{6,}$/,NS=/^[0-9a-z]+$/,MS=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,zS=/^[0-9a-vA-V]{20}$/,$S=/^[A-Za-z0-9]{27}$/,DS=/^[a-zA-Z0-9_-]{21}$/;function PS(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const BS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,LS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FS=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,US="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function qS(){return new RegExp(US,"u")}const HS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,VS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,GS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,KS=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,WS=/^https?$/,QS=/^\+[1-9]\d{6,14}$/,y1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function JS(e){return new RegExp(`^${e}$`)}const YS=JS(y1);function jc(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function XS(e){return new RegExp(`^${jc(e)}$`)}function ex(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${jc({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${jc({precision:e.precision})}`:n;return new RegExp(`^${y1}T(?:${r})$`)}const tx=/^[\s\S]{0,}$/,nx=/^-?\d+$/,tu=/^-?\d+(?:\.\d+)?$/,rx=/^(?:true|false)$/i,sx=/^[^A-Z]*$/,ix=/^[^a-z]*$/,Sn=J("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nu=e=>{const t=e.value;return!B9(t)&&t.length!==void 0},xo={number:"number",bigint:"bigint",object:"date"},w1=J("$ZodCheckLessThan",(e,t)=>{Sn.init(e,t);const n=xo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:xo[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),S1=J("$ZodCheckGreaterThan",(e,t)=>{Sn.init(e,t);const n=xo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:xo[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ax=J("$ZodCheckMultipleOf",(e,t)=>{Sn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):L9(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ox=J("$ZodCheckNumberFormat",(e,t)=>{Sn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=h1[t.format];e._zod.check=a=>{const o=a.value;if(n){if(!Number.isInteger(o)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}o<s&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),o>i&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),lx=J("$ZodCheckMaxLength",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length;if((typeof s=="string"&&i>t.maximum?W0(s):i)<=t.maximum)return;const o=Q0(s);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),cx=J("$ZodCheckMinLength",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length;if((typeof s=="string"&&i>=t.minimum&&i<t.minimum*2?W0(s):i)>=t.minimum)return;const o=Q0(s);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ux=J("$ZodCheckLengthEquals",(e,t)=>{var n;Sn.init(e,t),(n=e._zod.def).when??(n.when=nu),e._zod.check=r=>{const s=r.value,i=s.length,a=typeof s=="string"&&i>=t.length&&i<=t.length*2?W0(s):i;if(a===t.length)return;const o=Q0(s),l=a>t.length;r.issues.push({origin:o,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),el=J("$ZodCheckStringFormat",(e,t)=>{var n,r;Sn.init(e,t),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),dx=J("$ZodCheckRegex",(e,t)=>{el.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fx=J("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=sx),el.init(e,t)}),hx=J("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ix),el.init(e,t)}),px=J("$ZodCheckIncludes",(e,t)=>{Sn.init(e,t);const n=ai(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),mx=J("$ZodCheckStartsWith",(e,t)=>{Sn.init(e,t);const n=new RegExp(`^${ai(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),gx=J("$ZodCheckEndsWith",(e,t)=>{Sn.init(e,t);const n=new RegExp(`.*${ai(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),vx=J("$ZodCheckOverwrite",(e,t)=>{Sn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class bx{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
325
325
  `).filter(a=>a),s=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(s)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
326
326
  ${n.join(`
327
327
  `)}