claude-sessions-mcp 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/index.js +169 -128
- package/dist/mcp/index.js.map +1 -1
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css +1 -0
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.XO-DXdC4.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js +1 -0
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/B2IHY0Hs.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js +1 -0
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/BCJVXGHY.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js +1 -0
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CMwK7N_O.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js +1 -0
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CZTho13P.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js +2 -0
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/F-H9hLgW.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js +2 -0
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/gR9AL7GA.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js +2 -0
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.Boej0hfY.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js +1 -0
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js.br +2 -0
- package/dist/web/client/_app/immutable/entry/start.CVYJWPd9.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js +1 -0
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Lbeu1dpo.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js +1 -0
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.DvRsCtcA.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js +73 -0
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.CjVN0Bwe.js.gz +0 -0
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/client/_app/version.json.br +0 -0
- package/dist/web/client/_app/version.json.gz +0 -0
- package/dist/web/server/chunks/{0-CpLgwGZT.js → 0-C_hzGzlo.js} +4 -4
- package/dist/web/server/chunks/{0-CpLgwGZT.js.map → 0-C_hzGzlo.js.map} +1 -1
- package/dist/web/server/chunks/{1-Co8-9FdW.js → 1-CSNAjAzD.js} +2 -2
- package/dist/web/server/chunks/{1-Co8-9FdW.js.map → 1-CSNAjAzD.js.map} +1 -1
- package/dist/web/server/chunks/2-D_ZAFGkV.js +9 -0
- package/dist/web/server/chunks/{2-CXKmp7vO.js.map → 2-D_ZAFGkV.js.map} +1 -1
- package/dist/web/server/chunks/{_layout.svelte-g4K2eFdi.js → _layout.svelte-BWDuddeu.js} +6 -2
- package/dist/web/server/chunks/_layout.svelte-BWDuddeu.js.map +1 -0
- package/dist/web/server/chunks/{_page.svelte-Bu5w4fE4.js → _page.svelte-BTPPI5f9.js} +12 -4
- package/dist/web/server/chunks/_page.svelte-BTPPI5f9.js.map +1 -0
- package/dist/web/server/chunks/{_server.ts-9dSpOSZD.js → _server.ts-B0JVJ9FB.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-9dSpOSZD.js.map → _server.ts-B0JVJ9FB.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-uDQ4gQW0.js → _server.ts-BLGLFyUk.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-uDQ4gQW0.js.map → _server.ts-BLGLFyUk.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-XEsSs7Il.js → _server.ts-BaqmP9oG.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-XEsSs7Il.js.map → _server.ts-BaqmP9oG.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BoS0ijI9.js → _server.ts-Beze9L3_.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BoS0ijI9.js.map → _server.ts-Beze9L3_.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-C9C0bsVO.js → _server.ts-BlgHsHoW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-C9C0bsVO.js.map → _server.ts-BlgHsHoW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DCZgqkA_.js → _server.ts-Cb5-fa8C.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DCZgqkA_.js.map → _server.ts-Cb5-fa8C.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-zkRNh3d2.js → _server.ts-ChE2aT-W.js} +6 -3
- package/dist/web/server/chunks/_server.ts-ChE2aT-W.js.map +1 -0
- package/dist/web/server/chunks/{_server.ts-Dq5i1Bg9.js → _server.ts-Cksv90lD.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Dq5i1Bg9.js.map → _server.ts-Cksv90lD.js.map} +1 -1
- package/dist/web/server/chunks/_server.ts-D80JJ66s.js +26 -0
- package/dist/web/server/chunks/_server.ts-D80JJ66s.js.map +1 -0
- package/dist/web/server/chunks/{_server.ts-DNSYjrWg.js → _server.ts-DjWf5N-i.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DNSYjrWg.js.map → _server.ts-DjWf5N-i.js.map} +1 -1
- package/dist/web/server/chunks/{session-BAE596_s.js → session-DmOGNZUD.js} +380 -13
- package/dist/web/server/chunks/session-DmOGNZUD.js.map +1 -0
- package/dist/web/server/index.js +1 -1
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +20 -13
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/_app/immutable/assets/0.bo32IKJI.css +0 -1
- package/dist/web/client/_app/immutable/assets/0.bo32IKJI.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.bo32IKJI.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/BpzfNVdV.js +0 -1
- package/dist/web/client/_app/immutable/chunks/BpzfNVdV.js.br +0 -1
- package/dist/web/client/_app/immutable/chunks/BpzfNVdV.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CM_W2Y6b.js +0 -1
- package/dist/web/client/_app/immutable/chunks/CM_W2Y6b.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CM_W2Y6b.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CkYrZ5uP.js +0 -1
- package/dist/web/client/_app/immutable/chunks/CkYrZ5uP.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CkYrZ5uP.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DhpCfsq_.js +0 -2
- package/dist/web/client/_app/immutable/chunks/DhpCfsq_.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DhpCfsq_.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/JuVRPOYA.js +0 -1
- package/dist/web/client/_app/immutable/chunks/JuVRPOYA.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/JuVRPOYA.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/qEz027d4.js +0 -1
- package/dist/web/client/_app/immutable/chunks/qEz027d4.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/qEz027d4.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.B3ErwcNl.js +0 -2
- package/dist/web/client/_app/immutable/entry/app.B3ErwcNl.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.B3ErwcNl.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.DfAnAPV3.js +0 -1
- package/dist/web/client/_app/immutable/entry/start.DfAnAPV3.js.br +0 -2
- package/dist/web/client/_app/immutable/entry/start.DfAnAPV3.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.0G4u1RwN.js +0 -1
- package/dist/web/client/_app/immutable/nodes/0.0G4u1RwN.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.0G4u1RwN.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.BTCUCPE9.js +0 -1
- package/dist/web/client/_app/immutable/nodes/1.BTCUCPE9.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.BTCUCPE9.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.rvNN8qKE.js +0 -69
- package/dist/web/client/_app/immutable/nodes/2.rvNN8qKE.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.rvNN8qKE.js.gz +0 -0
- package/dist/web/server/chunks/2-CXKmp7vO.js +0 -9
- package/dist/web/server/chunks/_layout.svelte-g4K2eFdi.js.map +0 -1
- package/dist/web/server/chunks/_page.svelte-Bu5w4fE4.js.map +0 -1
- package/dist/web/server/chunks/_server.ts-zkRNh3d2.js.map +0 -1
- package/dist/web/server/chunks/session-BAE596_s.js.map +0 -1
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
var mr=Object.defineProperty;var vr=(t,e,r)=>e in t?mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var j=(t,e,r)=>vr(t,typeof e!="symbol"?e+"":e,r);import{d as yt,f as E,a as S,s as M,c as de,e as Nt}from"../chunks/DhpCfsq_.js";import{aI as Xt,aJ as Jt,aK as wr,v as fe,A as Vt,aL as _r,z as Yt,aM as Mt,H as Kt,F as et,C as dt,G as De,a6 as $t,al as Qe,ad as st,a9 as xt,aN as yr,af as Sr,aO as Tr,aP as Rr,a7 as Ar,aQ as Er,q as pt,J as Ir,a as c,b as zr,B as Pr,w as Je,K as Cr,aG as Lr,m as Nr,aR as Ae,t as kt,y as Mr,aE as St,aS as Br,aT as Dr,aU as jr,r as er,o as tr,aV as ft,M as qr,aD as Or,n as Hr,aW as rr,aX as Zr,aY as Fr,aZ as Qr,N as Ge,U as Q,V as We,T as z,R as w,Y as m,ab as q,Q as ne,W as ye,s as R,a_ as Ur,c as Ve,O as Gr}from"../chunks/CkYrZ5uP.js";import{B as Wr,i as Z}from"../chunks/qEz027d4.js";import{o as Xr,a as Jr,b as Vr,l as Yr,d as Kr,r as $r,e as en,f as tn,h as Bt,u as rn,i as nn}from"../chunks/BpzfNVdV.js";import{p as nr}from"../chunks/JuVRPOYA.js";const sn=[];function an(t,e=!1,r=!1){return tt(t,new Map,"",sn,null,r)}function tt(t,e,r,s,n=null,i=!1){if(typeof t=="object"&&t!==null){var l=e.get(t);if(l!==void 0)return l;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(Xt(t)){var a=Array(t.length);e.set(t,a),n!==null&&e.set(n,a);for(var u=0;u<t.length;u+=1){var o=t[u];u in t&&(a[u]=tt(o,e,r,s,null,i))}return a}if(Jt(t)===wr){a={},e.set(t,a),n!==null&&e.set(n,a);for(var p in t)a[p]=tt(t[p],e,r,s,null,i);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!i)return tt(t.toJSON(),e,r,s,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}const Dt=0,gt=1;function ln(t,e,r,s,n){fe&&Vt();var i=_r(),l=Er,a=i?st(l):xt(l,!1,!1),u=i?st(l):xt(l,!1,!1),o=new Wr(t);Yt(()=>{var p=e(),d=!1;let f=fe&&Mt(p)===(t.data===Kt);if(f&&(et(dt()),De(!1)),Mt(p)){var h=yr(),v=!1;const x=g=>{if(!d){v=!0,h(!1),Sr.ensure(),fe&&De(!1);try{g()}finally{Tr(),Rr||Ar()}}};p.then(g=>{x(()=>{Qe(a,g),o.ensure(gt,s&&(_=>s(_,a)))})},g=>{x(()=>{if(Qe(u,g),o.ensure(gt,n&&(_=>n(_,u))),!n)throw u.v})}),fe?o.ensure(Dt,r):$t(()=>{v||x(()=>{o.ensure(Dt,r)})})}else Qe(a,p),o.ensure(gt,s&&(x=>s(x,a)));return f&&De(!0),()=>{d=!0}})}function bt(t,e){return e}function on(t,e,r){for(var s=[],n=e.length,i,l=e.length,a=0;a<n;a++){let d=e[a];tr(d,()=>{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var f=t.outrogroups;mt(St(i.done)),f.delete(i),f.size===0&&(t.outrogroups=null)}}else l-=1},!1)}if(l===0){var u=s.length===0&&r!==null;if(u){var o=r,p=o.parentNode;Or(p),p.append(o),t.items.clear()}mt(e,!u)}else i={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(i)}function mt(t,e=!0){for(var r=0;r<t.length;r++)Hr(t[r],e)}var jt;function at(t,e,r,s,n,i=null){var l=t,a=new Map,u=(e&rr)!==0;if(u){var o=t;l=fe?et(Ir(o)):o.appendChild(pt())}fe&&Vt();var p=null,d=zr(()=>{var _=r();return Xt(_)?_:_==null?[]:St(_)}),f,h=!0;function v(){g.fallback=p,cn(g,f,l,e,s),p!==null&&(f.length===0?(p.f&Ae)===0?er(p):(p.f^=Ae,He(p,null,l)):tr(p,()=>{p=null}))}var x=Yt(()=>{f=c(d);var _=f.length;let U=!1;if(fe){var O=Pr(l)===Kt;O!==(_===0)&&(l=dt(),et(l),De(!1),U=!0)}for(var C=new Set,X=Nr,J=Mr(),L=0;L<_;L+=1){fe&&Je.nodeType===Cr&&Je.data===Lr&&(l=Je,U=!0,De(!1));var y=f[L],A=s(y,L),N=h?null:a.get(A);N?(N.v&&Qe(N.v,y),N.i&&Qe(N.i,L),J&&X.skipped_effects.delete(N.e)):(N=un(a,h?l:jt??(jt=pt()),y,A,L,n,e,r),h||(N.e.f|=Ae),a.set(A,N)),C.add(A)}if(_===0&&i&&!p&&(h?p=kt(()=>i(l)):(p=kt(()=>i(jt??(jt=pt()))),p.f|=Ae)),fe&&_>0&&et(dt()),!h)if(J){for(const[ee,F]of a)C.has(ee)||X.skipped_effects.add(F.e);X.oncommit(v),X.ondiscard(()=>{})}else v();U&&De(!0),c(d)}),g={effect:x,items:a,outrogroups:null,fallback:p};h=!1,fe&&(l=Je)}function cn(t,e,r,s,n){var N,ee,F,G,k,b,T,D,I;var i=(s&Zr)!==0,l=e.length,a=t.items,u=t.effect.first,o,p=null,d,f=[],h=[],v,x,g,_;if(i)for(_=0;_<l;_+=1)v=e[_],x=n(v,_),g=a.get(x).e,(g.f&Ae)===0&&((ee=(N=g.nodes)==null?void 0:N.a)==null||ee.measure(),(d??(d=new Set)).add(g));for(_=0;_<l;_+=1){if(v=e[_],x=n(v,_),g=a.get(x).e,t.outrogroups!==null)for(const H of t.outrogroups)H.pending.delete(g),H.done.delete(g);if((g.f&Ae)!==0)if(g.f^=Ae,g===u)He(g,null,r);else{var U=p?p.next:u;g===t.effect.last&&(t.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Ee(t,p,g),Ee(t,g,U),He(g,U,r),p=g,f=[],h=[],u=p.next;continue}if((g.f&ft)!==0&&(er(g),i&&((G=(F=g.nodes)==null?void 0:F.a)==null||G.unfix(),(d??(d=new Set)).delete(g))),g!==u){if(o!==void 0&&o.has(g)){if(f.length<h.length){var O=h[0],C;p=O.prev;var X=f[0],J=f[f.length-1];for(C=0;C<f.length;C+=1)He(f[C],O,r);for(C=0;C<h.length;C+=1)o.delete(h[C]);Ee(t,X.prev,J.next),Ee(t,p,X),Ee(t,J,O),u=O,p=J,_-=1,f=[],h=[]}else o.delete(g),He(g,u,r),Ee(t,g.prev,g.next),Ee(t,g,p===null?t.effect.first:p.next),Ee(t,p,g),p=g;continue}for(f=[],h=[];u!==null&&u!==g;)(o??(o=new Set)).add(u),h.push(u),u=u.next;if(u===null)continue}(g.f&Ae)===0&&f.push(g),p=g,u=g.next}if(t.outrogroups!==null){for(const H of t.outrogroups)H.pending.size===0&&(mt(St(H.done)),(k=t.outrogroups)==null||k.delete(H));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||o!==void 0){var L=[];if(o!==void 0)for(g of o)(g.f&ft)===0&&L.push(g);for(;u!==null;)(u.f&ft)===0&&u!==t.fallback&&L.push(u),u=u.next;var y=L.length;if(y>0){var A=(s&rr)!==0&&l===0?r:null;if(i){for(_=0;_<y;_+=1)(T=(b=L[_].nodes)==null?void 0:b.a)==null||T.measure();for(_=0;_<y;_+=1)(I=(D=L[_].nodes)==null?void 0:D.a)==null||I.fix()}on(t,L,A)}}i&&$t(()=>{var H,Y;if(d!==void 0)for(g of d)(Y=(H=g.nodes)==null?void 0:H.a)==null||Y.apply()})}function un(t,e,r,s,n,i,l,a){var u=(l&Br)!==0?(l&Dr)===0?xt(r,!1,!1):st(r):null,o=(l&jr)!==0?st(n):null;return{v:u,i:o,e:kt(()=>(i(e,u??r,o??n,a),()=>{t.delete(s)}))}}function He(t,e,r){if(t.nodes)for(var s=t.nodes.start,n=t.nodes.end,i=e&&(e.f&Ae)===0?e.nodes.start:r;s!==null;){var l=qr(s);if(i.before(s),s===n)return;s=l}}function Ee(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function hn(t,e,r){var s=t==null?"":""+t;return s===""?null:s}function rt(t,e,r,s,n,i){var l=t.__className;if(fe||l!==r||l===void 0){var a=hn(r);(!fe||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):t.className=a),t.__className=r}return i}const pn=Symbol("is custom element"),fn=Symbol("is html");function Ze(t,e,r,s){var n=gn(t);fe&&(n[e]=t.getAttribute(e)),n[e]!==(n[e]=r)&&(r==null?t.removeAttribute(e):typeof r!="string"&&dn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function gn(t){return t.__attributes??(t.__attributes={[pn]:t.nodeName.includes("-"),[fn]:t.namespaceURI===Fr})}var qt=new Map;function dn(t){var e=t.getAttribute("is")||t.nodeName,r=qt.get(e);if(r)return r;qt.set(e,r=[]);for(var s,n=t,i=Element.prototype;i!==n;){s=Qr(n);for(var l in s)s[l].set&&r.push(l);n=Jt(n)}return r}function Tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ne=Tt();function sr(t){Ne=t}var Ue={exec:()=>null};function P(t,e=""){let r=typeof t=="string"?t:t.source,s={replace:(n,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(se.caret,"$1"),r=r.replace(n,l),s},getRegex:()=>new RegExp(r,e)};return s}var xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},kn=/^(?:[ \t]*(?:\n|$))+/,bn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Rt=/(?:[*+-]|\d{1,9}[.)])/,ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ir=P(ar).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),wn=P(ar).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),At=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_n=/^[^\n]+/,Et=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yn=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Et).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sn=P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Rt).getRegex(),ct="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",It=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tn=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",It).replace("tag",ct).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lr=P(At).replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ct).getRegex(),Rn=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lr).getRegex(),zt={blockquote:Rn,code:bn,def:yn,fences:mn,heading:vn,hr:Xe,html:Tn,lheading:ir,list:Sn,newline:kn,paragraph:lr,table:Ue,text:_n},Ot=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ct).getRegex(),An={...zt,lheading:wn,table:Ot,paragraph:P(At).replace("hr",Xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ot).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ct).getRegex()},En={...zt,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",It).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ue,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(At).replace("hr",Xe).replace("heading",` *#{1,6} *[^
|
|
2
|
-
]`).replace("lheading",ir).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},In=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,or=/^( {2,}|\\)\n(?!\s*$)/,Pn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ut=/[\p{P}\p{S}]/u,Pt=/[\s\p{P}\p{S}]/u,cr=/[^\s\p{P}\p{S}]/u,Cn=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Pt).getRegex(),ur=/(?!~)[\p{P}\p{S}]/u,Ln=/(?!~)[\s\p{P}\p{S}]/u,Nn=/(?:[^\s\p{P}\p{S}]|~)/u,Mn=P(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",xn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),hr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bn=P(hr,"u").replace(/punct/g,ut).getRegex(),Dn=P(hr,"u").replace(/punct/g,ur).getRegex(),pr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",jn=P(pr,"gu").replace(/notPunctSpace/g,cr).replace(/punctSpace/g,Pt).replace(/punct/g,ut).getRegex(),qn=P(pr,"gu").replace(/notPunctSpace/g,Nn).replace(/punctSpace/g,Ln).replace(/punct/g,ur).getRegex(),On=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cr).replace(/punctSpace/g,Pt).replace(/punct/g,ut).getRegex(),Hn=P(/\\(punct)/,"gu").replace(/punct/g,ut).getRegex(),Zn=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Fn=P(It).replace("(?:-->|$)","-->").getRegex(),Qn=P("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Fn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),it=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Un=P(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",it).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fr=P(/^!?\[(label)\]\[(ref)\]/).replace("label",it).replace("ref",Et).getRegex(),gr=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Et).getRegex(),Gn=P("reflink|nolink(?!\\()","g").replace("reflink",fr).replace("nolink",gr).getRegex(),Ht=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ct={_backpedal:Ue,anyPunctuation:Hn,autolink:Zn,blockSkip:Mn,br:or,code:zn,del:Ue,emStrongLDelim:Bn,emStrongRDelimAst:jn,emStrongRDelimUnd:On,escape:In,link:Un,nolink:gr,punctuation:Cn,reflink:fr,reflinkSearch:Gn,tag:Qn,text:Pn,url:Ue},Wn={...Ct,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",it).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",it).getRegex()},vt={...Ct,emStrongRDelimAst:qn,emStrongLDelim:Dn,url:P(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ht).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:P(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ht).getRegex()},Xn={...vt,br:P(or).replace("{2,}","*").getRegex(),text:P(vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ye={normal:zt,gfm:An,pedantic:En},qe={normal:Ct,gfm:vt,breaks:Xn,pedantic:Wn},Jn={"&":"&","<":"<",">":">",'"':""","'":"'"},Zt=t=>Jn[t];function Re(t,e){if(e){if(se.escapeTest.test(t))return t.replace(se.escapeReplace,Zt)}else if(se.escapeTestNoEncode.test(t))return t.replace(se.escapeReplaceNoEncode,Zt);return t}function Ft(t){try{t=encodeURI(t).replace(se.percentDecode,"%")}catch{return null}return t}function Qt(t,e){var i;let r=t.replace(se.findPipe,(l,a,u)=>{let o=!1,p=a;for(;--p>=0&&u[p]==="\\";)o=!o;return o?"|":" |"}),s=r.split(se.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(se.slashPipe,"|");return s}function Oe(t,e,r){let s=t.length;if(s===0)return"";let n=0;for(;n<s&&t.charAt(s-n-1)===e;)n++;return t.slice(0,s-n)}function Vn(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])r++;else if(t[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Ut(t,e,r,s,n){let i=e.href,l=e.title||null,a=t[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:l,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,u}function Yn(t,e,r){let s=t.match(r.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
3
|
-
`).map(i=>{let l=i.match(r.other.beginningSpace);if(l===null)return i;let[a]=l;return a.length>=n.length?i.slice(n.length):i}).join(`
|
|
4
|
-
`)}var lt=class{constructor(t){j(this,"options");j(this,"rules");j(this,"lexer");this.options=t||Ne}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Oe(r,`
|
|
5
|
-
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],s=Yn(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let s=Oe(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Oe(e[0],`
|
|
6
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Oe(e[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),s="",n="",i=[];for(;r.length>0;){let l=!1,a=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))a.push(r[u]),l=!0;else if(!l)a.push(r[u]);else break;r=r.slice(u);let o=a.join(`
|
|
9
|
-
`),p=o.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
11
|
-
${o}`:o,n=n?`${n}
|
|
12
|
-
${p}`:p;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=d,r.length===0)break;let f=i.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let h=f,v=h.raw+`
|
|
13
|
-
`+r.join(`
|
|
14
|
-
`),x=this.blockquote(v);i[i.length-1]=x,s=s.substring(0,s.length-h.raw.length)+x.raw,n=n.substring(0,n.length-h.text.length)+x.text;break}else if((f==null?void 0:f.type)==="list"){let h=f,v=h.raw+`
|
|
15
|
-
`+r.join(`
|
|
16
|
-
`),x=this.list(v);i[i.length-1]=x,s=s.substring(0,s.length-f.raw.length)+x.raw,n=n.substring(0,n.length-h.raw.length)+x.raw,r=v.substring(i.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(t){var r,s;let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,l={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),u=!1;for(;t;){let p=!1,d="",f="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let h=e[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),v=t.split(`
|
|
19
|
-
`,1)[0],x=!h.trim(),g=0;if(this.options.pedantic?(g=2,f=h.trimStart()):x?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,f=h.slice(g),g+=e[1].length),x&&this.rules.other.blankLine.test(v)&&(d+=v+`
|
|
20
|
-
`,t=t.substring(v.length+1),p=!0),!p){let _=this.rules.other.nextBulletRegex(g),U=this.rules.other.hrRegex(g),O=this.rules.other.fencesBeginRegex(g),C=this.rules.other.headingBeginRegex(g),X=this.rules.other.htmlBeginRegex(g);for(;t;){let J=t.split(`
|
|
21
|
-
`,1)[0],L;if(v=J,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),L=v):L=v.replace(this.rules.other.tabCharGlobal," "),O.test(v)||C.test(v)||X.test(v)||_.test(v)||U.test(v))break;if(L.search(this.rules.other.nonSpaceChar)>=g||!v.trim())f+=`
|
|
22
|
-
`+L.slice(g);else{if(x||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||O.test(h)||C.test(h)||U.test(h))break;f+=`
|
|
23
|
-
`+v}!x&&!v.trim()&&(x=!0),d+=J+`
|
|
24
|
-
`,t=t.substring(J.length+1),h=L.slice(g)}}l.loose||(u?l.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(u=!0)),l.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),l.raw+=d}let o=l.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let p of l.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),((r=p.tokens[0])==null?void 0:r.type)==="text"||((s=p.tokens[0])==null?void 0:s.type)==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(p.raw);if(d){let f={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};p.checked=f.checked,l.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=f.raw+p.tokens[0].raw,p.tokens[0].text=f.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(f)):p.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):p.tokens.unshift(f)}}if(!l.loose){let d=p.tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));l.loose=f}}if(l.loose)for(let p of l.items){p.loose=!0;for(let d of p.tokens)d.type==="text"&&(d.type="paragraph")}return l}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:s,title:n}}}table(t){var l;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Qt(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(l=e[3])!=null&&l.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
-
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<r.length;a++)i.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push(Qt(a,i.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:i.align[o]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
26
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Oe(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=Vn(e[2],"()");if(i===-2)return;if(i>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),Ut(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Ut(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...s[0]].length-1,i,l,a=n,u=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*t.length+n);(s=o.exec(e))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if((s[5]||s[6])&&n%3&&!((n+l)%3)){u+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+u);let p=[...s[0]][0].length,d=t.slice(0,n+s.index+p+l);if(Math.min(n,l)%2){let h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,s;return e[2]==="@"?(r=e[1],s="mailto:"+r):(r=e[1],s=r),{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},be=class wt{constructor(e){j(this,"tokens");j(this,"options");j(this,"state");j(this,"inlineQueue");j(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ne,this.options.tokenizer=this.options.tokenizer||new lt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:se,block:Ye.normal,inline:qe.normal};this.options.pedantic?(r.block=Ye.pedantic,r.inline=qe.pedantic):this.options.gfm&&(r.block=Ye.gfm,this.options.breaks?r.inline=qe.breaks:r.inline=qe.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ye,inline:qe}}static lex(e,r){return new wt(r).lex(e)}static lexInline(e,r){return new wt(r).inlineTokens(e)}lex(e){e=e.replace(se.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],s=!1){var n,i,l;for(this.options.pedantic&&(e=e.replace(se.tabCharGlobal," ").replace(se.spaceLine,""));e;){let a;if((i=(n=this.options.extensions)==null?void 0:n.block)!=null&&i.some(o=>(a=o.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let o=r.at(-1);a.raw.length===1&&o!==void 0?o.raw+=`
|
|
28
|
-
`:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let o=r.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
29
|
-
`)?"":`
|
|
30
|
-
`)+a.raw,o.text+=`
|
|
31
|
-
`+a.text,this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let o=r.at(-1);(o==null?void 0:o.type)==="paragraph"||(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
32
|
-
`)?"":`
|
|
33
|
-
`)+a.raw,o.text+=`
|
|
34
|
-
`+a.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),r.push(a);continue}let u=e;if((l=this.options.extensions)!=null&&l.startBlock){let o=1/0,p=e.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},p),typeof d=="number"&&d>=0&&(o=Math.min(o,d))}),o<1/0&&o>=0&&(u=e.substring(0,o+1))}if(this.state.top&&(a=this.tokenizer.paragraph(u))){let o=r.at(-1);s&&(o==null?void 0:o.type)==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
35
|
-
`)?"":`
|
|
36
|
-
`)+a.raw,o.text+=`
|
|
37
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a),s=u.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let o=r.at(-1);(o==null?void 0:o.type)==="text"?(o.raw+=(o.raw.endsWith(`
|
|
38
|
-
`)?"":`
|
|
39
|
-
`)+a.raw,o.text+=`
|
|
40
|
-
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(a);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,o,p,d,f;let s=e,n=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=((o=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:o.call({lexer:this},s))??s;let l=!1,a="";for(;e;){l||(a=""),l=!1;let h;if((d=(p=this.options.extensions)==null?void 0:p.inline)!=null&&d.some(x=>(h=x.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let x=r.at(-1);h.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=h.raw,x.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(e,s,a)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),r.push(h);continue}let v=e;if((f=this.options.extensions)!=null&&f.startInline){let x=1/0,g=e.slice(1),_;this.options.extensions.startInline.forEach(U=>{_=U.call({lexer:this},g),typeof _=="number"&&_>=0&&(x=Math.min(x,_))}),x<1/0&&x>=0&&(v=e.substring(0,x+1))}if(h=this.tokenizer.inlineText(v)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),l=!0;let x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=h.raw,x.text+=h.text):r.push(h);continue}if(e){let x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},ot=class{constructor(t){j(this,"options");j(this,"parser");this.options=t||Ne}space(t){return""}code({text:t,lang:e,escaped:r}){var i;let s=(i=(e||"").match(se.notSpaceStart))==null?void 0:i[0],n=t.replace(se.endingNewline,"")+`
|
|
41
|
-
`;return s?'<pre><code class="language-'+Re(s)+'">'+(r?n:Re(n,!0))+`</code></pre>
|
|
42
|
-
`:"<pre><code>"+(r?n:Re(n,!0))+`</code></pre>
|
|
43
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
44
|
-
${this.parser.parse(t)}</blockquote>
|
|
45
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
46
|
-
`}hr(t){return`<hr>
|
|
47
|
-
`}list(t){let e=t.ordered,r=t.start,s="";for(let l=0;l<t.items.length;l++){let a=t.items[l];s+=this.listitem(a)}let n=e?"ol":"ul",i=e&&r!==1?' start="'+r+'"':"";return"<"+n+i+`>
|
|
48
|
-
`+s+"</"+n+`>
|
|
49
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
50
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
51
|
-
`}table(t){let e="",r="";for(let n=0;n<t.header.length;n++)r+=this.tablecell(t.header[n]);e+=this.tablerow({text:r});let s="";for(let n=0;n<t.rows.length;n++){let i=t.rows[n];r="";for(let l=0;l<i.length;l++)r+=this.tablecell(i[l]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
52
|
-
<thead>
|
|
53
|
-
`+e+`</thead>
|
|
54
|
-
`+s+`</table>
|
|
55
|
-
`}tablerow({text:t}){return`<tr>
|
|
56
|
-
${t}</tr>
|
|
57
|
-
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
58
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Re(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let s=this.parser.parseInline(r),n=Ft(t);if(n===null)return s;t=n;let i='<a href="'+t+'"';return e&&(i+=' title="'+Re(e)+'"'),i+=">"+s+"</a>",i}image({href:t,title:e,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let n=Ft(t);if(n===null)return Re(r);t=n;let i=`<img src="${t}" alt="${r}"`;return e&&(i+=` title="${Re(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Re(t.text)}},Lt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},me=class _t{constructor(e){j(this,"options");j(this,"renderer");j(this,"textRenderer");this.options=e||Ne,this.options.renderer=this.options.renderer||new ot,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Lt}static parse(e,r){return new _t(r).parse(e)}static parseInline(e,r){return new _t(r).parseInline(e)}parse(e){var s,n;let r="";for(let i=0;i<e.length;i++){let l=e[i];if((n=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&n[l.type]){let u=l,o=this.options.extensions.renderers[u.type].call({parser:this},u);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){r+=o||"";continue}}let a=l;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(e,r=this.renderer){var n,i;let s="";for(let l=0;l<e.length;l++){let a=e[l];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=o||"";continue}}let u=a;switch(u.type){case"escape":{s+=r.text(u);break}case"html":{s+=r.html(u);break}case"link":{s+=r.link(u);break}case"image":{s+=r.image(u);break}case"checkbox":{s+=r.checkbox(u);break}case"strong":{s+=r.strong(u);break}case"em":{s+=r.em(u);break}case"codespan":{s+=r.codespan(u);break}case"br":{s+=r.br(u);break}case"del":{s+=r.del(u);break}case"text":{s+=r.text(u);break}default:{let o='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},$e,Fe=($e=class{constructor(t){j(this,"options");j(this,"block");this.options=t||Ne}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?be.lex:be.lexInline}provideParser(){return this.block?me.parse:me.parseInline}},j($e,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),j($e,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),$e),Kn=class{constructor(...t){j(this,"defaults",Tt());j(this,"options",this.setOptions);j(this,"parse",this.parseMarkdown(!0));j(this,"parseInline",this.parseMarkdown(!1));j(this,"Parser",me);j(this,"Renderer",ot);j(this,"TextRenderer",Lt);j(this,"Lexer",be);j(this,"Tokenizer",lt);j(this,"Hooks",Fe);this.use(...t)}walkTokens(t,e){var s,n;let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let l=i;for(let a of l.header)r=r.concat(this.walkTokens(a.tokens,e));for(let a of l.rows)for(let u of a)r=r.concat(this.walkTokens(u.tokens,e));break}case"list":{let l=i;r=r.concat(this.walkTokens(l.items,e));break}default:{let l=i;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{let u=l[a].flat(1/0);r=r.concat(this.walkTokens(u,e))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...l){let a=n.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),r.renderer){let n=this.defaults.renderer||new ot(this.defaults);for(let i in r.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=r.renderer[l],u=n[l];n[l]=(...o)=>{let p=a.apply(n,o);return p===!1&&(p=u.apply(n,o)),p||""}}s.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new lt(this.defaults);for(let i in r.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=r.tokenizer[l],u=n[l];n[l]=(...o)=>{let p=a.apply(n,o);return p===!1&&(p=u.apply(n,o)),p}}s.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new Fe;for(let i in r.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=r.hooks[l],u=n[l];Fe.passThroughHooks.has(i)?n[l]=o=>{if(this.defaults.async&&Fe.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await a.call(n,o);return u.call(n,d)})();let p=a.call(n,o);return u.call(n,p)}:n[l]=(...o)=>{if(this.defaults.async)return(async()=>{let d=await a.apply(n,o);return d===!1&&(d=await u.apply(n,o)),d})();let p=a.apply(n,o);return p===!1&&(p=u.apply(n,o)),p}}s.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,i=r.walkTokens;s.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),n&&(a=a.concat(n.call(this,l))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return be.lex(t,e??this.defaults)}parser(t,e){return me.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let s={...r},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let l=n.hooks?await n.hooks.preprocess(e):e,a=await(n.hooks?await n.hooks.provideLexer():t?be.lex:be.lexInline)(l,n),u=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(u,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser():t?me.parse:me.parseInline)(u,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let l=(n.hooks?n.hooks.provideLexer():t?be.lex:be.lexInline)(e,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let a=(n.hooks?n.hooks.provideParser():t?me.parse:me.parseInline)(l,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(t,e){return r=>{if(r.message+=`
|
|
59
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Re(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},Le=new Kn;function B(t,e){return Le.parse(t,e)}B.options=B.setOptions=function(t){return Le.setOptions(t),B.defaults=Le.defaults,sr(B.defaults),B};B.getDefaults=Tt;B.defaults=Ne;B.use=function(...t){return Le.use(...t),B.defaults=Le.defaults,sr(B.defaults),B};B.walkTokens=function(t,e){return Le.walkTokens(t,e)};B.parseInline=Le.parseInline;B.Parser=me;B.parser=me.parse;B.Renderer=ot;B.TextRenderer=Lt;B.Lexer=be;B.lexer=be.lex;B.Tokenizer=lt;B.Hooks=Fe;B.parse=B;B.options;B.setOptions;B.use;B.walkTokens;B.parseInline;me.parse;be.lex;B.setOptions({breaks:!0,gfm:!0});const Ke=t=>t?new Date(t).toLocaleString():"-",dr=(t,e)=>t.length>e?t.slice(0,e)+"...":t,$n=t=>t.replace(/^\/Users\/[^/]+/,"~"),nt=t=>typeof t=="string"?t:Array.isArray(t)?t.map(nt).join(""):t.type==="text"?t.text??"":t.type==="tool_result"?t.content?nt(t.content):"0":t.content?nt(t.content):"",Gt=t=>{const e=t.message;return e!=null&&e.content?nt(e.content):""};var es=E('<li class="py-2 px-8 text-gh-text-secondary text-sm">Loading...</li>'),ts=E(`<li><button><span class="flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap"> </span> <span class="flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border
|
|
60
|
-
px-1.5 py-px rounded-lg"> </span></button> <div class="flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity"><button class="bg-transparent border-none cursor-pointer p-1 rounded
|
|
61
|
-
hover:bg-gh-border text-xs" title="Rename">✏️</button> <button class="bg-transparent border-none cursor-pointer p-1 rounded
|
|
62
|
-
hover:bg-gh-red/20 text-xs" title="Delete">🗑️</button></div></li>`),rs=E('<ul class="bg-gh-bg"><!></ul>'),ns=E('<li class="border-b border-gh-border-subtle"><button><span class="text-xs w-3 text-gh-text-secondary"> </span> <span class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap"> </span> <span class="bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal"> </span></button> <!></li>'),ss=E('<aside class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><h2 class="p-4 text-base font-semibold border-b border-gh-border bg-gh-bg"> </h2> <ul class="overflow-y-auto flex-1"></ul></aside>');function as(t,e){Ge(e,!0);const r=q(()=>e.projects.filter(a=>a.sessionCount>0));var s=ss(),n=w(s),i=w(n);m(n);var l=z(n,2);at(l,21,()=>c(r),bt,(a,u)=>{var o=ns(),p=w(o);p.__click=()=>e.onToggleProject(c(u).name);var d=w(p),f=w(d,!0);m(d);var h=z(d,2),v=w(h,!0);m(h);var x=z(h,2),g=w(x,!0);m(x),m(p);var _=z(p,2);{var U=O=>{var C=rs(),X=w(C);{var J=y=>{var A=es();S(y,A)},L=y=>{var A=de(),N=ne(A);at(N,17,()=>e.projectSessions.get(c(u).name)??[],bt,(ee,F)=>{const G=q(()=>{var V;return((V=e.selectedSession)==null?void 0:V.id)===c(F).id});var k=ts(),b=w(k);b.__click=()=>e.onSelectSession(c(F));var T=w(b),D=w(T,!0);m(T);var I=z(T,2),H=w(I,!0);m(I),m(b);var Y=z(b,2),ae=w(Y);ae.__click=V=>e.onRenameSession(V,c(F));var Se=z(ae,2);Se.__click=V=>e.onDeleteSession(V,c(F)),m(Y),m(k),Q(()=>{rt(k,1,`flex items-center border-t border-gh-border-subtle group ${c(G)?"bg-gh-accent/20 border-l-3 border-l-gh-accent":""}`),rt(b,1,`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${c(G)?"pl-[calc(2rem-3px)]":"pl-8"}`),M(D,c(F).title??"Untitled"),M(H,c(F).messageCount)}),S(ee,k)}),S(y,A)};Z(X,y=>{e.loadingProject===c(u).name?y(J):y(L,!1)})}m(C),S(O,C)};Z(_,O=>{e.expandedProjects.has(c(u).name)&&O(U)})}m(o),Q((O,C,X)=>{rt(p,1,`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${O??""}`),M(f,C),Ze(h,"title",c(u).display_name),M(v,X),M(g,c(u).sessionCount)},[()=>e.expandedProjects.has(c(u).name)?"bg-gh-accent/10":"",()=>e.expandedProjects.has(c(u).name)?"▼":"▶",()=>$n(c(u).display_name)]),S(a,o)}),m(l),m(s),Q(()=>M(i,`Projects (${c(r).length??""})`)),S(t,s),We()}yt(["click"]);var is=E('<button class="absolute bottom-1 left-1/2 -translate-x-1/2 px-3 py-1 text-xs bg-gh-border hover:bg-gh-border-muted rounded-full cursor-pointer border-none text-gh-text-secondary transition-all"> </button>'),ls=E('<div class="absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-gh-canvas to-transparent pointer-events-none"></div> <!>',1),os=E('<button class="mt-2 px-3 py-1 text-xs bg-gh-border hover:bg-gh-border-muted rounded-full cursor-pointer border-none text-gh-text-secondary">Collapse</button>'),cs=E('<div class="relative"><pre class="whitespace-pre-wrap font-mono text-xs text-gh-text-secondary overflow-x-auto"> </pre> <!></div>'),us=E('<pre class="whitespace-pre-wrap font-mono text-xs text-gh-text-secondary overflow-x-auto"> </pre>');function Wt(t,e){Ge(e,!0);let r=nr(e,"maxLines",3,10),s=ye(!1),n=ye(!1);const i=q(()=>e.content.split(`
|
|
63
|
-
`)),l=q(()=>c(i).length>r()),a=q(()=>c(l)&&!c(s)?c(i).slice(0,r()).join(`
|
|
64
|
-
`):e.content);var u=de(),o=ne(u);{var p=f=>{var h=cs(),v=w(h),x=w(v,!0);m(v);var g=z(v,2);{var _=O=>{var C=ls(),X=z(ne(C),2);{var J=L=>{var y=is();y.__click=()=>R(s,!0);var A=w(y);m(y),Q(()=>M(A,`Click to expand (${c(i).length-r()} more lines)`)),S(L,y)};Z(X,L=>{c(n)&&L(J)})}S(O,C)},U=O=>{var C=os();C.__click=()=>R(s,!1),S(O,C)};Z(g,O=>{c(s)?O(U,!1):O(_)})}m(h),Q(()=>M(x,c(a))),Nt("mouseenter",h,()=>R(n,!0)),Nt("mouseleave",h,()=>R(n,!1)),S(f,h)},d=f=>{var h=us(),v=w(h,!0);m(h),Q(()=>M(v,e.content)),S(f,h)};Z(o,f=>{c(l)?f(p):f(d,!1)})}S(t,u),We()}yt(["click"]);var hs=E('<button class="opacity-0 group-hover:opacity-100 transition-opacity bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-accent/20 text-xs" title="Split session from this message">✂️</button>'),ps=E('<button class="opacity-0 group-hover:opacity-100 transition-opacity bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs" title="Delete message">🗑️</button>'),fs=E('<button class="text-gh-accent hover:underline cursor-pointer bg-transparent border-none p-0" title="Open backup in VS Code"> </button>'),gs=E('<span class="text-gh-text-secondary"> </span>'),ds=E('<li class="font-mono text-xs truncate"><!></li>'),xs=E('<div class="p-4 rounded-lg bg-amber-500/10 border-l-3 border-l-amber-500 group relative"><div class="flex justify-between mb-2 text-xs text-gh-text-secondary"><span class="uppercase font-semibold text-amber-400"> </span> <div class="flex items-center gap-2"><span> </span> <!> <!></div></div> <ul class="space-y-1"></ul></div>'),ks=E('<p class="mt-1 text-sm text-gh-text-secondary"> </p>'),bs=E('<div class="p-3 rounded-lg bg-cyan-500/10 border-l-3 border-l-cyan-500 group relative"><div class="flex justify-between items-center text-xs text-gh-text-secondary"><span class="font-semibold text-cyan-400"> </span> <div class="flex items-center gap-2"><span> </span> <!> <!></div></div> <!></div>'),ms=E('<button class="mt-1 text-sm text-gh-accent hover:underline cursor-pointer bg-transparent border-none p-0 font-mono truncate block max-w-full text-left"> </button>'),vs=E('<span class="mt-1 text-sm text-gh-text-secondary font-mono"> </span>'),ws=E('<span class="mt-1 text-sm text-gh-text-secondary font-mono"> </span>'),_s=E('<p class="mt-1 text-sm text-gh-text-secondary font-mono truncate"> </p>'),ys=E('<div class="p-3 rounded-lg bg-violet-500/10 border-l-3 border-l-violet-500 group relative"><div class="flex justify-between items-center text-xs text-gh-text-secondary"><span class="font-semibold text-violet-400"> </span> <div class="flex items-center gap-2"><span> </span> <!> <!></div></div> <!></div>'),Ss=E('<button class="opacity-0 group-hover:opacity-100 transition-opacity bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs" title="Edit title">✏️</button>'),Ts=E('<span class="font-semibold text-purple-400"> </span>'),Rs=E('<p class="whitespace-pre-wrap"> </p>'),As=E('<div class="message-content text-sm"><!></div>'),Es=E('<div><div class="flex justify-between text-xs text-gh-text-secondary"><span class="uppercase font-semibold"> </span> <div class="flex items-center gap-2"><span class="group-hover:hidden"> </span> <span class="hidden group-hover:inline font-mono text-gh-text-secondary/70"> </span> <!> <!> <!></div></div> <!></div>');function Is(t,e){Ge(e,!0);const r=y=>{var A=de(),N=ne(A);{var ee=F=>{var G=hs();G.__click=()=>e.onSplit(e.msg),S(F,G)};Z(N,F=>{e.onSplit&&!n()&&F(ee)})}S(y,A)},s=y=>{var A=ps();A.__click=()=>e.onDelete(e.msg),S(y,A)};let n=nr(e,"isFirst",3,!1);const i=q(()=>e.msg.type==="assistant"),l=q(()=>e.msg.type==="custom-title"),a=q(()=>e.msg.type==="file-history-snapshot"),u=q(()=>e.msg.type==="human"||e.msg.type==="user"),o=q(()=>e.msg.type==="system"&&e.msg.subtype==="local_command"),p=q(()=>e.msg.type==="queue-operation"),d=q(()=>{var y,A,N;return e.msg.type==="user"&&((N=(A=(y=e.msg.message)==null?void 0:y.content)==null?void 0:A[0])==null?void 0:N.type)==="tool_result"}),f=q(()=>{if(!c(a))return null;const y=e.msg.snapshot,A=(y==null?void 0:y.trackedFileBackups)??{};return{files:Object.entries(A),timestamp:y==null?void 0:y.timestamp}}),h=q(()=>{var N,ee,F,G;if(!c(o))return null;const y=((ee=(N=e.msg.content)==null?void 0:N.match(/<command-name>([^<]+)<\/command-name>/))==null?void 0:ee[1])??"",A=((G=(F=e.msg.content)==null?void 0:F.match(/<command-message>([^<]+)<\/command-message>/))==null?void 0:G[1])??"";return{name:y,message:A}}),v=["Read","Write","Edit"],x=q(()=>{if(!c(i))return null;const y=e.msg.message;if(!Array.isArray(y==null?void 0:y.content))return null;const A=y.content.find(N=>typeof N=="object"&&N!==null&&N.type==="tool_use");return A?{name:A.name,input:A.input,filePath:v.includes(A.name)?A.input.file_path:null}:null}),g=q(()=>e.msg.customTitle??""),_=q(()=>e.msg.uuid||e.msg.messageId||""),U=q(()=>c(p)?!1:c(a)||c(o)||c(l)||c(x)||Gt(e.msg).trim().length>0?!0:((e.msg.type==="user"||e.msg.type==="human")&&console.warn("User message without content:",an(e.msg)),!1)),O=q(()=>c(u)?"bg-gh-accent/15 border-l-3 border-l-gh-accent":c(i)?"bg-gh-green/15 border-l-3 border-l-gh-green":c(l)?"bg-purple-500/15 border-l-3 border-l-purple-500":"bg-gh-border-subtle");var C=de(),X=ne(C);{var J=y=>{},L=y=>{var A=de(),N=ne(A);{var ee=G=>{var k=xs(),b=w(k),T=w(b),D=w(T);m(T);var I=z(T,2),H=w(I),Y=w(H,!0);m(H);var ae=z(H,2);r(ae);var Se=z(ae,2);s(Se),m(I),m(b);var V=z(b,2);at(V,21,()=>c(f).files,bt,(K,xe)=>{var ce=q(()=>Ur(c(xe),2));let Te=()=>c(ce)[0],ve=()=>c(ce)[1];const ke=q(()=>!!(ve().backupFileName&&e.sessionId));var ie=ds(),te=w(ie);{var Ie=we=>{var ue=fs();ue.__click=()=>Xr(e.sessionId,ve().backupFileName);var le=w(ue,!0);m(ue),Q(()=>M(le,Te())),S(we,ue)},Me=we=>{var ue=gs(),le=w(ue,!0);m(ue),Q(()=>M(le,Te())),S(we,ue)};Z(te,we=>{c(ke)?we(Ie):we(Me,!1)})}m(ie),Q(()=>Ze(ie,"title",Te())),S(K,ie)}),m(V),m(k),Q(K=>{M(D,`📁 File Backups (${c(f).files.length??""})`),M(Y,K)},[()=>Ke(c(f).timestamp)]),S(G,k)},F=G=>{var k=de(),b=ne(k);{var T=I=>{var H=bs(),Y=w(H),ae=w(Y),Se=w(ae);m(ae);var V=z(ae,2),K=w(V),xe=w(K,!0);m(K);var ce=z(K,2);r(ce);var Te=z(ce,2);s(Te),m(V),m(Y);var ve=z(Y,2);{var ke=ie=>{var te=ks(),Ie=w(te,!0);m(te),Q(()=>M(Ie,c(h).message)),S(ie,te)};Z(ve,ie=>{var te;c(h).message&&c(h).message!==((te=c(h).name)==null?void 0:te.slice(1))&&ie(ke)})}m(H),Q(ie=>{M(Se,`⚡ ${(c(h).name||"Command")??""}`),M(xe,ie)},[()=>Ke(e.msg.timestamp)]),S(I,H)},D=I=>{var H=de(),Y=ne(H);{var ae=V=>{var K=ys(),xe=w(K),ce=w(xe),Te=w(ce);m(ce);var ve=z(ce,2),ke=w(ve),ie=w(ke,!0);m(ke);var te=z(ke,2);r(te);var Ie=z(te,2);s(Ie),m(ve),m(xe);var Me=z(xe,2);{var we=le=>{var ze=de(),je=ne(ze);ln(je,()=>Vr(c(x).filePath),re=>{var oe=ws(),he=w(oe,!0);m(oe),Q(pe=>M(he,pe),[()=>c(x).filePath.split("/").pop()]),S(re,oe)},(re,oe)=>{var he=de(),pe=ne(he);{var Pe=W=>{var $=ms();$.__click=()=>Jr(c(x).filePath);var _e=w($,!0);m($),Q(Ce=>{Ze($,"title",c(x).filePath),M(_e,Ce)},[()=>c(x).filePath.split("/").pop()]),S(W,$)},ge=W=>{var $=vs(),_e=w($,!0);m($),Q(Ce=>{Ze($,"title",c(x).filePath),M(_e,Ce)},[()=>c(x).filePath.split("/").pop()]),S(W,$)};Z(pe,W=>{c(oe)?W(Pe):W(ge,!1)})}S(re,he)}),S(le,ze)},ue=le=>{var ze=de(),je=ne(ze);{var re=he=>{var pe=_s(),Pe=w(pe,!0);m(pe),Q((ge,W)=>{Ze(pe,"title",ge),M(Pe,W)},[()=>String(c(x).input.command),()=>dr(String(c(x).input.command),100)]),S(he,pe)},oe=he=>{var pe=de(),Pe=ne(pe);{var ge=W=>{const $=q(()=>{const{path:_e,...Ce}=c(x).input;return{_path:_e,grepInput:Ce}});{let _e=q(()=>JSON.stringify(c($).grepInput,null,2));Wt(W,{get content(){return c(_e)},maxLines:6})}};Z(Pe,W=>{c(x).name==="Grep"&&W(ge)},!0)}S(he,pe)};Z(je,he=>{c(x).input.command?he(re):he(oe,!1)},!0)}S(le,ze)};Z(Me,le=>{c(x).filePath?le(we):le(ue,!1)})}m(K),Q(le=>{M(Te,`🔧 ${c(x).name??""}`),M(ie,le)},[()=>Ke(e.msg.timestamp)]),S(V,K)},Se=V=>{var K=Es(),xe=w(K),ce=w(xe),Te=w(ce,!0);m(ce);var ve=z(ce,2),ke=w(ve),ie=w(ke,!0);m(ke);var te=z(ke,2),Ie=w(te,!0);m(te);var Me=z(te,2);{var we=re=>{var oe=Ss();oe.__click=()=>e.onEditTitle(e.msg),S(re,oe)};Z(Me,re=>{c(l)&&e.onEditTitle&&re(we)})}var ue=z(Me,2);r(ue);var le=z(ue,2);s(le),m(ve),m(xe);var ze=z(xe,2);{var je=re=>{var oe=As(),he=w(oe);{var pe=ge=>{var W=Ts(),$=w(W,!0);m(W),Q(()=>M($,c(g))),S(ge,W)},Pe=ge=>{const W=q(()=>Gt(e.msg)),$=q(()=>c(W).split(`
|
|
65
|
-
`));var _e=de(),Ce=ne(_e);{var xr=Be=>{Wt(Be,{get content(){return c(W)},maxLines:10})},kr=Be=>{var ht=Rs(),br=w(ht,!0);m(ht),Q(()=>M(br,c(W))),S(Be,ht)};Z(Ce,Be=>{c($).length>10?Be(xr):Be(kr,!1)})}S(ge,_e)};Z(he,ge=>{c(l)?ge(pe):ge(Pe,!1)})}m(oe),S(re,oe)};Z(ze,re=>{c(U)&&re(je)})}m(K),Q(re=>{rt(K,1,`p-4 rounded-lg group relative ${c(O)??""} flex flex-col ${c(U)?"gap-2":""}`),M(Te,c(d)?"OUT":e.msg.type),M(ie,re),M(Ie,c(_))},[()=>Ke(e.msg.timestamp)]),S(V,K)};Z(Y,V=>{c(x)?V(ae):V(Se,!1)},!0)}S(I,H)};Z(b,I=>{c(o)&&c(h)?I(T):I(D,!1)},!0)}S(G,k)};Z(N,G=>{c(a)&&c(f)?G(ee):G(F,!1)},!0)}S(y,A)};Z(X,y=>{c(p)?y(J):y(L,!1)})}S(t,C),We()}yt(["click"]);var zs=E('<h2 class="text-base font-semibold"> </h2> <p class="text-xs text-gh-text-secondary font-mono mt-1"> </p>',1),Ps=E('<h2 class="text-base font-semibold">Messages</h2>'),Cs=E('<div class="overflow-y-auto flex-1 p-4 flex flex-col gap-4"></div>'),Ls=E('<p class="p-8 text-center text-gh-text-secondary">Select a session</p>'),Ns=E('<section class="bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col"><div class="p-4 border-b border-gh-border bg-gh-bg"><!></div> <!></section>');function Ms(t,e){Ge(e,!0);const r=q(()=>e.messages.findIndex(d=>d.type==="user"||d.type==="assistant"||d.type==="human"));var s=Ns(),n=w(s),i=w(n);{var l=d=>{var f=zs(),h=ne(f),v=w(h);m(h);var x=z(h,2),g=w(x,!0);m(x),Q(_=>{M(v,`${_??""} (${e.messages.length??""} messages)`),M(g,e.session.id)},[()=>dr(e.session.title??"Untitled",50)]),S(d,f)},a=d=>{var f=Ps();S(d,f)};Z(i,d=>{e.session?d(l):d(a,!1)})}m(n);var u=z(n,2);{var o=d=>{var f=Cs();at(f,23,()=>e.messages,(h,v)=>h.uuid??`idx-${v}`,(h,v,x)=>{{let g=q(()=>c(x)===0||c(x)===c(r));Is(h,{get msg(){return c(v)},get sessionId(){return e.session.id},get isFirst(){return c(g)},get onDelete(){return e.onDeleteMessage},get onEditTitle(){return e.onEditTitle},get onSplit(){return e.onSplitSession}})}}),m(f),S(d,f)},p=d=>{var f=Ls();S(d,f)};Z(u,d=>{e.session?d(o):d(p,!1)})}m(s),S(t,s),We()}var Bs=E('<div class="fixed bottom-4 right-4 bg-gh-accent text-white px-4 py-2 rounded">Loading...</div>'),Ds=E('<div class="fixed bottom-4 right-4 bg-gh-red text-white px-4 py-2 rounded"> </div>'),js=E('<div class="grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]"><!> <!></div> <!> <!>',1);function Us(t,e){Ge(e,!0);let r=ye(Ve([])),s=ye(Ve(new Map)),n=ye(Ve(new Set)),i=ye(null),l=ye(Ve([])),a=ye(!1),u=ye(null),o=ye(null);const p=()=>{const k=window.location.hash.slice(1),b=new URLSearchParams(k);return{project:b.get("project")??void 0,session:b.get("session")??void 0}},d=(k,b)=>{const T=new URLSearchParams;k&&T.set("project",k),b&&T.set("session",b);const D=T.toString();window.history.replaceState(null,"",D?`#${D}`:window.location.pathname)},f=async()=>{R(a,!0),R(o,null);try{R(r,await Yr(),!0)}catch(k){R(o,String(k),!0)}finally{R(a,!1)}},h=async k=>{if(!c(s).has(k)){R(u,k,!0);try{const b=await Bt(k);c(s).set(k,b),R(s,new Map(c(s)),!0)}catch(b){R(o,String(b),!0)}finally{R(u,null)}}},v=async()=>{const{project:k,session:b}=p();if(k&&(await h(k),c(n).add(k),R(n,new Set(c(n)),!0),b)){const T=c(s).get(k),D=T==null?void 0:T.find(I=>I.id===b);D&&await g(D,!1)}},x=async k=>{var b,T;c(n).has(k)?(c(n).delete(k),R(n,new Set(c(n)),!0),((b=c(i))==null?void 0:b.projectName)===k&&d()):(await h(k),c(n).add(k),R(n,new Set(c(n)),!0),d(k,((T=c(i))==null?void 0:T.projectName)===k?c(i).id:void 0))},g=async(k,b=!0)=>{R(i,k,!0),R(a,!0),R(o,null);try{R(l,await en(k.projectName,k.id),!0),b&&d(k.projectName,k.id)}catch(T){R(o,String(T),!0)}finally{R(a,!1)}},_=async(k,b)=>{var T;if(k.stopPropagation(),!!confirm(`Delete session "${b.title}"?`))try{await Kr(b.projectName,b.id);const D=c(s).get(b.projectName);D&&(c(s).set(b.projectName,D.filter(I=>I.id!==b.id)),R(s,new Map(c(s)),!0)),((T=c(i))==null?void 0:T.id)===b.id&&(R(i,null),R(l,[],!0),d(b.projectName))}catch(D){R(o,String(D),!0)}},U=async(k,b)=>{k.stopPropagation();const T=prompt("Enter new title:",b.title);if(T)try{await $r(b.projectName,b.id,T),b.title=T,R(s,new Map(c(s)),!0)}catch(D){R(o,String(D),!0)}},O=async k=>{if(!c(i)||!confirm("Delete this message?"))return;const b=k.uuid||k.messageId;if(b)try{await nn(c(i).projectName,c(i).id,b),R(l,c(l).filter(I=>(I.uuid||I.messageId)!==b),!0);const T=c(s).get(c(i).projectName),D=T==null?void 0:T.find(I=>I.id===c(i).id);D&&(D.messageCount=c(l).length,R(s,new Map(c(s)),!0))}catch(T){R(o,String(T),!0)}},C=async k=>{if(!c(i))return;const b=k.customTitle??"",T=prompt("Enter new custom title:",b);if(!(T===null||T===b))try{await rn(c(i).projectName,c(i).id,k.uuid,T),k.customTitle=T,R(l,[...c(l)],!0)}catch(D){R(o,String(D),!0)}},X=async k=>{if(!c(i))return;const b=c(l).findIndex(I=>I.uuid===k.uuid),T=b,D=c(l).length-b;if(confirm(`Split session at this message?
|
|
66
|
-
|
|
67
|
-
This session will keep ${T} messages.
|
|
68
|
-
New session will have ${D} messages.`))try{R(a,!0);const I=await tn(c(i).projectName,c(i).id,k.uuid);if(I.success&&I.newSessionId){const H=await Bt(c(i).projectName);c(s).set(c(i).projectName,H),R(s,new Map(c(s)),!0),R(l,c(l).slice(0,b),!0);const Y=c(s).get(c(i).projectName),ae=Y==null?void 0:Y.find(Se=>Se.id===c(i).id);ae&&(ae.messageCount=c(l).length,R(s,new Map(c(s)),!0)),alert(`Session split successfully!
|
|
69
|
-
New session ID: ${I.newSessionId}`)}else R(o,I.error??"Failed to split session",!0)}catch(I){R(o,String(I),!0)}finally{R(a,!1)}};Gr(async()=>(await f(),await v(),window.addEventListener("hashchange",v),()=>window.removeEventListener("hashchange",v)));var J=js(),L=ne(J),y=w(L);as(y,{get projects(){return c(r)},get projectSessions(){return c(s)},get expandedProjects(){return c(n)},get selectedSession(){return c(i)},get loadingProject(){return c(u)},onToggleProject:x,onSelectSession:g,onRenameSession:U,onDeleteSession:_});var A=z(y,2);Ms(A,{get session(){return c(i)},get messages(){return c(l)},onDeleteMessage:O,onEditTitle:C,onSplitSession:X}),m(L);var N=z(L,2);{var ee=k=>{var b=Bs();S(k,b)};Z(N,k=>{c(a)&&k(ee)})}var F=z(N,2);{var G=k=>{var b=Ds(),T=w(b,!0);m(b),Q(()=>M(T,c(o))),S(k,b)};Z(F,k=>{c(o)&&k(G)})}S(t,J),We()}export{Us as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const index = 2;
|
|
2
|
-
let component_cache;
|
|
3
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-Bu5w4fE4.js')).default;
|
|
4
|
-
const imports = ["_app/immutable/nodes/2.rvNN8qKE.js","_app/immutable/chunks/DhpCfsq_.js","_app/immutable/chunks/CkYrZ5uP.js","_app/immutable/chunks/qEz027d4.js","_app/immutable/chunks/BpzfNVdV.js","_app/immutable/chunks/JuVRPOYA.js"];
|
|
5
|
-
const stylesheets = [];
|
|
6
|
-
const fonts = [];
|
|
7
|
-
|
|
8
|
-
export { component, fonts, imports, index, stylesheets };
|
|
9
|
-
//# sourceMappingURL=2-CXKmp7vO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_layout.svelte-g4K2eFdi.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { w as head, x as attr } from \"../../chunks/index.js\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { children } = $$props;\n let cleaning = false;\n let shuttingDown = false;\n head(\"12qhfyh\", $$renderer2, ($$renderer3) => {\n $$renderer3.title(($$renderer4) => {\n $$renderer4.push(`<title>Claude Session Manager</title>`);\n });\n });\n $$renderer2.push(`<div class=\"min-h-screen flex flex-col bg-gh-bg text-gh-text\"><header class=\"bg-gh-bg-secondary border-b border-gh-border px-8 py-4 flex justify-between items-center\"><div class=\"flex items-center gap-3\"><h1 class=\"text-2xl font-semibold\">Claude Session Manager</h1> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></div> <div class=\"flex gap-2\"><button class=\"bg-gh-border-subtle border border-gh-border text-gh-text px-4 py-2 rounded-md text-sm transition-colors hover:bg-gh-border hover:border-gh-text-secondary disabled:opacity-50 disabled:cursor-not-allowed\"${attr(\"disabled\", cleaning, true)}>${escape_html(\"Clear Empty Sessions\")}</button> <button class=\"bg-gh-red border border-gh-red text-white px-4 py-2 rounded-md text-sm transition-colors hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed\"${attr(\"disabled\", shuttingDown, true)}>${escape_html(\"Shutdown\")}</button></div></header> <main class=\"flex-1 p-8 max-w-7xl mx-auto w-full\">`);\n children($$renderer2);\n $$renderer2.push(`<!----></main></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC9B,IAAI,IAAI,QAAQ,GAAG,KAAK;AACxB,IAAI,IAAI,YAAY,GAAG,KAAK;AAC5B,IAAI,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,WAAW,KAAK;AAClD,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,KAAK;AACzC,QAAQ,WAAW,CAAC,IAAI,CAAC,CAAC,qCAAqC,CAAC,CAAC;AACjE,MAAM,CAAC,CAAC;AACR,IAAI,CAAC,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,2QAA2Q,CAAC,CAAC;AACnS,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,gQAAgQ,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,mLAAmL,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,2EAA2E,CAAC,CAAC;AAClqB,IAAI,QAAQ,CAAC,WAAW,CAAC;AACzB,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC;AAC7C,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_page.svelte-Bu5w4fE4.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/pages/_page.svelte.js"],"sourcesContent":["import { y as ensure_array_like, z as attr_class, x as attr, F as stringify } from \"../../chunks/index.js\";\nimport { marked } from \"marked\";\nimport { e as escape_html } from \"../../chunks/context.js\";\nmarked.setOptions({\n breaks: true,\n gfm: true\n});\nconst formatProjectName = (displayName) => {\n return displayName.replace(/^\\/Users\\/[^/]+/, \"~\");\n};\nfunction ProjectTree($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n projects,\n projectSessions,\n expandedProjects,\n selectedSession,\n loadingProject\n } = $$props;\n const nonEmptyProjects = projects.filter((p) => p.sessionCount > 0);\n $$renderer2.push(`<aside class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><h2 class=\"p-4 text-base font-semibold border-b border-gh-border bg-gh-bg\">Projects (${escape_html(nonEmptyProjects.length)})</h2> <ul class=\"overflow-y-auto flex-1\"><!--[-->`);\n const each_array = ensure_array_like(nonEmptyProjects);\n for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {\n let project = each_array[$$index_1];\n $$renderer2.push(`<li class=\"border-b border-gh-border-subtle\"><button${attr_class(`w-full py-3 px-4 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 font-medium hover:bg-gh-border-subtle ${stringify(expandedProjects.has(project.name) ? \"bg-gh-accent/10\" : \"\")}`)}><span class=\"text-xs w-3 text-gh-text-secondary\">${escape_html(expandedProjects.has(project.name) ? \"▼\" : \"▶\")}</span> <span class=\"flex-1 overflow-hidden text-ellipsis whitespace-nowrap\"${attr(\"title\", project.display_name)}>${escape_html(formatProjectName(project.display_name))}</span> <span class=\"bg-gh-border px-2 py-0.5 rounded-full text-xs font-normal\">${escape_html(project.sessionCount)}</span></button> `);\n if (expandedProjects.has(project.name)) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<ul class=\"bg-gh-bg\">`);\n if (loadingProject === project.name) {\n $$renderer2.push(\"<!--[-->\");\n $$renderer2.push(`<li class=\"py-2 px-8 text-gh-text-secondary text-sm\">Loading...</li>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<!--[-->`);\n const each_array_1 = ensure_array_like(projectSessions.get(project.name) ?? []);\n for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {\n let session = each_array_1[$$index];\n const isSelected = selectedSession?.id === session.id;\n $$renderer2.push(`<li${attr_class(`flex items-center border-t border-gh-border-subtle group ${stringify(isSelected ? \"bg-gh-accent/20 border-l-3 border-l-gh-accent\" : \"\")}`)}><button${attr_class(`flex-1 min-w-0 py-2 pr-2 bg-transparent border-none text-gh-text cursor-pointer text-left flex items-center gap-2 text-sm hover:bg-gh-border-subtle ${stringify(isSelected ? \"pl-[calc(2rem-3px)]\" : \"pl-8\")}`)}><span class=\"flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap\">${escape_html(session.title ?? \"Untitled\")}</span> <span class=\"flex-shrink-0 text-xs text-gh-text-secondary bg-gh-border px-1.5 py-px rounded-lg\">${escape_html(session.messageCount)}</span></button> <div class=\"flex gap-0.5 pr-2 opacity-0 group-hover:opacity-100 transition-opacity\"><button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-border text-xs\" title=\"Rename\">✏️</button> <button class=\"bg-transparent border-none cursor-pointer p-1 rounded hover:bg-gh-red/20 text-xs\" title=\"Delete\">🗑️</button></div></li>`);\n }\n $$renderer2.push(`<!--]-->`);\n }\n $$renderer2.push(`<!--]--></ul>`);\n } else {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--></li>`);\n }\n $$renderer2.push(`<!--]--></ul></aside>`);\n });\n}\nfunction MessageList($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let {\n messages\n } = $$props;\n messages.findIndex((m) => m.type === \"user\" || m.type === \"assistant\" || m.type === \"human\");\n $$renderer2.push(`<section class=\"bg-gh-bg-secondary border border-gh-border rounded-lg overflow-hidden flex flex-col\"><div class=\"p-4 border-b border-gh-border bg-gh-bg\">`);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<h2 class=\"text-base font-semibold\">Messages</h2>`);\n }\n $$renderer2.push(`<!--]--></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n $$renderer2.push(`<p class=\"p-8 text-center text-gh-text-secondary\">Select a session</p>`);\n }\n $$renderer2.push(`<!--]--></section>`);\n });\n}\nfunction _page($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let projects = [];\n let projectSessions = /* @__PURE__ */ new Map();\n let expandedProjects = /* @__PURE__ */ new Set();\n let selectedSession = null;\n let messages = [];\n let loadingProject = null;\n $$renderer2.push(`<div class=\"grid grid-cols-[350px_1fr] gap-4 h-[calc(100vh-120px)]\">`);\n ProjectTree($$renderer2, {\n projects,\n projectSessions,\n expandedProjects,\n selectedSession,\n loadingProject\n });\n $$renderer2.push(`<!----> `);\n MessageList($$renderer2, {\n messages\n });\n $$renderer2.push(`<!----></div> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]--> `);\n {\n $$renderer2.push(\"<!--[!-->\");\n }\n $$renderer2.push(`<!--]-->`);\n });\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;AAGA,MAAM,CAAC,UAAU,CAAC;AAClB,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,GAAG,EAAE;AACP,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,WAAW,KAAK;AAC3C,EAAE,OAAO,WAAW,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC;AACpD,CAAC;AACD,SAAS,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE;AAC1C,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI;AACR,MAAM,QAAQ;AACd,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,eAAe;AACrB,MAAM;AACN,KAAK,GAAG,OAAO;AACf,IAAI,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC;AACvE,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,wLAAwL,EAAE,WAAW,CAAC,gBAAgB,CAAC,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AAC,CAAC,oEAAoE,CAAC,CAAC;AAC5F,IAAI,WAAW,CAAC,WAAW,EAAE;AAC7B,MAAM,QAAQ;AACd,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,eAAe;AACrB,MAAM;AACN,KAAK,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,IAAI,WAAW,CAAC,WAAW,EAAE;AAC7B,MAAM;AACN,KAAK,CAAC;AACN,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACtC,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;AACjC,IAAI;AACJ,MAAM,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;AACnC,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChC,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-zkRNh3d2.js","sources":["../../../../web/.svelte-kit/adapter-node/entries/endpoints/api/cleanup/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { Effect } from \"effect\";\nimport { p as previewCleanup, c as clearSessions } from \"../../../../chunks/session.js\";\nconst GET = async ({ url }) => {\n const projectName = url.searchParams.get(\"project\") ?? void 0;\n const result = await Effect.runPromise(previewCleanup(projectName));\n return json(result);\n};\nconst POST = async ({ request }) => {\n const body = await request.json();\n const result = await Effect.runPromise(\n clearSessions({\n projectName: body.project,\n clearEmpty: body.clearEmpty,\n clearInvalid: body.clearInvalid\n })\n );\n return json(result);\n};\nexport {\n GET,\n POST\n};\n"],"names":[],"mappings":";;;;;;;AAGK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,MAAM;AAC/D,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AACrE,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;AACK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AACpC,EAAE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AACnC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU;AACxC,IAAI,aAAa,CAAC;AAClB,MAAM,WAAW,EAAE,IAAI,CAAC,OAAO;AAC/B,MAAM,UAAU,EAAE,IAAI,CAAC,UAAU;AACjC,MAAM,YAAY,EAAE,IAAI,CAAC;AACzB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-BAE596_s.js","sources":["../../../../web/.svelte-kit/adapter-node/chunks/session.js"],"sourcesContent":["import { Effect, pipe, Array as Array$1, Option } from \"effect\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport * as os from \"node:os\";\nconst getSessionsDir = () => path.join(os.homedir(), \".claude\", \"projects\");\nconst extractTextContent = (message) => {\n if (!message) return \"\";\n const content = message.content;\n if (!content) return \"\";\n if (typeof content === \"string\") return content;\n if (Array.isArray(content)) {\n return content.filter((item) => typeof item === \"object\" && item?.type === \"text\").map((item) => item.text ?? \"\").join(\"\");\n }\n return \"\";\n};\nconst extractTitle = (text) => {\n if (!text) return \"Untitled\";\n let cleaned = text.replace(/<ide_[^>]*>[\\s\\S]*?<\\/ide_[^>]*>/g, \"\").trim();\n if (!cleaned) return \"Untitled\";\n if (cleaned.includes(\"\\n\\n\")) {\n cleaned = cleaned.split(\"\\n\\n\")[0];\n } else if (cleaned.includes(\"\\n\")) {\n cleaned = cleaned.split(\"\\n\")[0];\n }\n if (cleaned.length > 100) {\n return cleaned.slice(0, 100) + \"...\";\n }\n return cleaned || \"Untitled\";\n};\nconst listProjects = Effect.gen(function* () {\n const sessionsDir = getSessionsDir();\n const exists = yield* Effect.tryPromise(\n () => fs.access(sessionsDir).then(() => true).catch(() => false)\n );\n if (!exists) {\n return [];\n }\n const entries = yield* Effect.tryPromise(() => fs.readdir(sessionsDir, { withFileTypes: true }));\n const projects = yield* Effect.all(\n entries.filter((e) => e.isDirectory() && !e.name.startsWith(\".\")).map(\n (entry) => Effect.gen(function* () {\n const projectPath = path.join(sessionsDir, entry.name);\n const files = yield* Effect.tryPromise(() => fs.readdir(projectPath));\n const sessionFiles = files.filter((f) => f.endsWith(\".jsonl\") && !f.startsWith(\"agent-\"));\n const displayName = entry.name.replace(/^-/, \"/\").replace(/--/g, \"/.\").replace(/-/g, \"/\");\n return {\n name: entry.name,\n display_name: displayName,\n path: projectPath,\n sessionCount: sessionFiles.length\n };\n })\n ),\n { concurrency: 10 }\n );\n return projects;\n});\nconst listSessions = (projectName) => Effect.gen(function* () {\n const projectPath = path.join(getSessionsDir(), projectName);\n const files = yield* Effect.tryPromise(() => fs.readdir(projectPath));\n const sessionFiles = files.filter((f) => f.endsWith(\".jsonl\") && !f.startsWith(\"agent-\"));\n const sessions = yield* Effect.all(\n sessionFiles.map(\n (file) => Effect.gen(function* () {\n const filePath = path.join(projectPath, file);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n const messages = lines.map((line) => JSON.parse(line));\n const sessionId = file.replace(\".jsonl\", \"\");\n const userAssistantMessages = messages.filter(\n (m) => m.type === \"user\" || m.type === \"assistant\"\n );\n const firstMessage = userAssistantMessages[0];\n const lastMessage = userAssistantMessages[userAssistantMessages.length - 1];\n const title = pipe(\n messages,\n Array$1.findFirst((m) => m.type === \"user\"),\n Option.map((m) => {\n const text = extractTextContent(m.message);\n return extractTitle(text);\n }),\n Option.getOrElse(() => `Session ${sessionId.slice(0, 8)}`)\n );\n return {\n id: sessionId,\n projectName,\n title,\n messageCount: userAssistantMessages.length,\n createdAt: firstMessage?.timestamp,\n updatedAt: lastMessage?.timestamp\n };\n })\n ),\n { concurrency: 10 }\n );\n return sessions.sort((a, b) => {\n const dateA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0;\n const dateB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0;\n return dateB - dateA;\n });\n});\nconst readSession = (projectName, sessionId) => Effect.gen(function* () {\n const filePath = path.join(getSessionsDir(), projectName, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n return lines.map((line) => JSON.parse(line));\n});\nconst deleteSession = (projectName, sessionId) => Effect.gen(function* () {\n const sessionsDir = getSessionsDir();\n const filePath = path.join(sessionsDir, projectName, `${sessionId}.jsonl`);\n const stat = yield* Effect.tryPromise(() => fs.stat(filePath));\n if (stat.size === 0) {\n yield* Effect.tryPromise(() => fs.unlink(filePath));\n return { success: true };\n }\n const backupDir = path.join(sessionsDir, \".bak\");\n yield* Effect.tryPromise(() => fs.mkdir(backupDir, { recursive: true }));\n const backupPath = path.join(backupDir, `${projectName}_${sessionId}.jsonl`);\n yield* Effect.tryPromise(() => fs.rename(filePath, backupPath));\n return { success: true, backupPath };\n});\nconst renameSession = (projectName, sessionId, newTitle) => Effect.gen(function* () {\n const filePath = path.join(getSessionsDir(), projectName, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n if (lines.length === 0) {\n return { success: false, error: \"Empty session\" };\n }\n const messages = lines.map((line) => JSON.parse(line));\n const firstUserIdx = messages.findIndex((m) => m.type === \"user\");\n if (firstUserIdx === -1) {\n return { success: false, error: \"No user message found\" };\n }\n const firstMsg = messages[firstUserIdx];\n if (firstMsg?.message?.content && Array.isArray(firstMsg.message.content)) {\n const textIdx = firstMsg.message.content.findIndex(\n (item) => typeof item === \"object\" && item?.type === \"text\" && !item.text?.trim().startsWith(\"<ide_\")\n );\n if (textIdx >= 0) {\n const item = firstMsg.message.content[textIdx];\n const oldText = item.text ?? \"\";\n const cleanedText = oldText.replace(/^[^\\n]+\\n\\n/, \"\");\n item.text = `${newTitle}\n\n${cleanedText}`;\n }\n }\n const newContent = messages.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(filePath, newContent, \"utf-8\"));\n return { success: true };\n});\nconst updateCustomTitle = (projectName, sessionId, messageUuid, newTitle) => Effect.gen(function* () {\n const filePath = path.join(getSessionsDir(), projectName, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n const messages = lines.map((line) => JSON.parse(line));\n const targetIndex = messages.findIndex((m) => m.uuid === messageUuid);\n if (targetIndex === -1) {\n return { success: false, error: \"Message not found\" };\n }\n const msg = messages[targetIndex];\n if (msg.type !== \"custom-title\") {\n return { success: false, error: \"Message is not a custom-title type\" };\n }\n msg.customTitle = newTitle;\n const newContent = messages.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(filePath, newContent, \"utf-8\"));\n return { success: true };\n});\nconst deleteMessage = (projectName, sessionId, messageUuid) => Effect.gen(function* () {\n const filePath = path.join(getSessionsDir(), projectName, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n const messages = lines.map((line) => JSON.parse(line));\n const targetIndex = messages.findIndex(\n (m) => m.uuid === messageUuid || m.messageId === messageUuid\n );\n if (targetIndex === -1) {\n return { success: false, error: \"Message not found\" };\n }\n const deletedMsg = messages[targetIndex];\n const parentUuid = deletedMsg?.parentUuid;\n const nextMsg = messages[targetIndex + 1];\n if (nextMsg) {\n nextMsg.parentUuid = parentUuid;\n }\n messages.splice(targetIndex, 1);\n const newContent = messages.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(filePath, newContent, \"utf-8\"));\n return { success: true };\n});\nconst previewCleanup = (projectName) => Effect.gen(function* () {\n const projects = yield* listProjects;\n const targetProjects = projectName ? projects.filter((p) => p.name === projectName) : projects;\n const results = yield* Effect.all(\n targetProjects.map(\n (project) => Effect.gen(function* () {\n const sessions = yield* listSessions(project.name);\n const emptySessions = sessions.filter((s) => s.messageCount === 0);\n const invalidSessions = sessions.filter(\n (s) => s.title?.includes(\"Invalid API key\") || s.title?.includes(\"API key\")\n );\n return {\n project: project.name,\n emptySessions,\n invalidSessions\n };\n })\n ),\n { concurrency: 5 }\n );\n return results;\n});\nconst isInvalidApiKeyMessage = (msg) => {\n const text = extractTextContent(msg.message);\n return text.includes(\"Invalid API key\");\n};\nconst cleanInvalidMessages = (projectName, sessionId) => Effect.gen(function* () {\n const filePath = path.join(getSessionsDir(), projectName, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n if (lines.length === 0) return { removedCount: 0, remainingCount: 0 };\n const messages = lines.map((line) => JSON.parse(line));\n const invalidIndices = [];\n messages.forEach((msg, idx) => {\n if (isInvalidApiKeyMessage(msg)) {\n invalidIndices.push(idx);\n }\n });\n if (invalidIndices.length === 0) {\n const userAssistantCount = messages.filter(\n (m) => m.type === \"user\" || m.type === \"assistant\"\n ).length;\n return { removedCount: 0, remainingCount: userAssistantCount };\n }\n const filtered = [];\n let lastValidUuid = null;\n for (let i = 0; i < messages.length; i++) {\n if (invalidIndices.includes(i)) {\n continue;\n }\n const msg = messages[i];\n if (msg.parentUuid && invalidIndices.some((idx) => messages[idx]?.uuid === msg.parentUuid)) {\n msg.parentUuid = lastValidUuid;\n }\n filtered.push(msg);\n lastValidUuid = msg.uuid;\n }\n const newContent = filtered.length > 0 ? filtered.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\" : \"\";\n yield* Effect.tryPromise(() => fs.writeFile(filePath, newContent, \"utf-8\"));\n const remainingUserAssistant = filtered.filter(\n (m) => m.type === \"user\" || m.type === \"assistant\"\n ).length;\n return { removedCount: invalidIndices.length, remainingCount: remainingUserAssistant };\n});\nconst getSessionFiles = (projectName, sessionId) => Effect.gen(function* () {\n const messages = yield* readSession(projectName, sessionId);\n const fileChanges = [];\n const seenFiles = /* @__PURE__ */ new Set();\n for (const msg of messages) {\n if (msg.type === \"file-history-snapshot\") {\n const snapshot = msg;\n const backups = snapshot.snapshot?.trackedFileBackups;\n if (backups && typeof backups === \"object\") {\n for (const filePath of Object.keys(backups)) {\n if (!seenFiles.has(filePath)) {\n seenFiles.add(filePath);\n fileChanges.push({\n path: filePath,\n action: \"modified\",\n timestamp: snapshot.snapshot?.timestamp,\n messageUuid: snapshot.messageId ?? msg.uuid\n });\n }\n }\n }\n }\n if (msg.type === \"assistant\" && msg.message?.content) {\n const content = msg.message.content;\n if (Array.isArray(content)) {\n for (const item of content) {\n if (item && typeof item === \"object\" && \"type\" in item && item.type === \"tool_use\") {\n const toolUse = item;\n if ((toolUse.name === \"Write\" || toolUse.name === \"Edit\") && toolUse.input?.file_path) {\n const filePath = toolUse.input.file_path;\n if (!seenFiles.has(filePath)) {\n seenFiles.add(filePath);\n fileChanges.push({\n path: filePath,\n action: toolUse.name === \"Write\" ? \"created\" : \"modified\",\n timestamp: msg.timestamp,\n messageUuid: msg.uuid\n });\n }\n }\n }\n }\n }\n }\n }\n return {\n sessionId,\n projectName,\n files: fileChanges,\n totalChanges: fileChanges.length\n };\n});\nconst splitSession = (projectName, sessionId, splitAtMessageUuid) => Effect.gen(function* () {\n const projectPath = path.join(getSessionsDir(), projectName);\n const filePath = path.join(projectPath, `${sessionId}.jsonl`);\n const content = yield* Effect.tryPromise(() => fs.readFile(filePath, \"utf-8\"));\n const lines = content.trim().split(\"\\n\").filter(Boolean);\n const allMessages = lines.map((line) => JSON.parse(line));\n const splitIndex = allMessages.findIndex((m) => m.uuid === splitAtMessageUuid);\n if (splitIndex === -1) {\n return { success: false, error: \"Message not found\" };\n }\n if (splitIndex === 0) {\n return { success: false, error: \"Cannot split at first message\" };\n }\n const newSessionId = crypto.randomUUID();\n const remainingMessages = allMessages.slice(0, splitIndex);\n const movedMessages = allMessages.slice(splitIndex);\n const updatedMovedMessages = movedMessages.map((msg, index) => {\n const updated = { ...msg, sessionId: newSessionId };\n if (index === 0) {\n updated.parentUuid = null;\n }\n return updated;\n });\n const remainingContent = remainingMessages.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(filePath, remainingContent, \"utf-8\"));\n const newFilePath = path.join(projectPath, `${newSessionId}.jsonl`);\n const newContent = updatedMovedMessages.map((m) => JSON.stringify(m)).join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(newFilePath, newContent, \"utf-8\"));\n const agentFiles = yield* Effect.tryPromise(() => fs.readdir(projectPath));\n const agentJsonlFiles = agentFiles.filter((f) => f.startsWith(\"agent-\") && f.endsWith(\".jsonl\"));\n for (const agentFile of agentJsonlFiles) {\n const agentPath = path.join(projectPath, agentFile);\n const agentContent = yield* Effect.tryPromise(() => fs.readFile(agentPath, \"utf-8\"));\n const agentLines = agentContent.trim().split(\"\\n\").filter(Boolean);\n if (agentLines.length === 0) continue;\n const firstAgentMsg = JSON.parse(agentLines[0]);\n if (firstAgentMsg.sessionId === sessionId) {\n const agentId = agentFile.replace(\"agent-\", \"\").replace(\".jsonl\", \"\");\n const isRelatedToMoved = movedMessages.some(\n (msg) => msg.agentId === agentId\n );\n if (isRelatedToMoved) {\n const updatedAgentMessages = agentLines.map((line) => {\n const msg = JSON.parse(line);\n return JSON.stringify({ ...msg, sessionId: newSessionId });\n });\n const updatedAgentContent = updatedAgentMessages.join(\"\\n\") + \"\\n\";\n yield* Effect.tryPromise(() => fs.writeFile(agentPath, updatedAgentContent, \"utf-8\"));\n }\n }\n }\n return {\n success: true,\n newSessionId,\n newSessionPath: newFilePath,\n movedMessageCount: movedMessages.length\n };\n});\nconst clearSessions = (options) => Effect.gen(function* () {\n const { projectName, clearEmpty = true } = options;\n const projects = yield* listProjects;\n const targetProjects = projectName ? projects.filter((p) => p.name === projectName) : projects;\n let deletedSessionCount = 0;\n let removedMessageCount = 0;\n const sessionsToDelete = [];\n for (const project of targetProjects) {\n const projectPath = path.join(getSessionsDir(), project.name);\n const files = yield* Effect.tryPromise(() => fs.readdir(projectPath));\n const sessionFiles = files.filter((f) => f.endsWith(\".jsonl\") && !f.startsWith(\"agent-\"));\n for (const file of sessionFiles) {\n const sessionId = file.replace(\".jsonl\", \"\");\n const result = yield* cleanInvalidMessages(project.name, sessionId);\n removedMessageCount += result.removedCount;\n if (result.remainingCount === 0) {\n sessionsToDelete.push({ project: project.name, sessionId });\n }\n }\n }\n if (clearEmpty) {\n for (const project of targetProjects) {\n const sessions = yield* listSessions(project.name);\n for (const session of sessions) {\n if (session.messageCount === 0) {\n const alreadyMarked = sessionsToDelete.some(\n (s) => s.project === project.name && s.sessionId === session.id\n );\n if (!alreadyMarked) {\n sessionsToDelete.push({ project: project.name, sessionId: session.id });\n }\n }\n }\n }\n }\n for (const { project, sessionId } of sessionsToDelete) {\n yield* deleteSession(project, sessionId);\n deletedSessionCount++;\n }\n return {\n success: true,\n deletedCount: deletedSessionCount,\n removedMessageCount\n };\n});\nexport {\n listSessions as a,\n deleteSession as b,\n clearSessions as c,\n deleteMessage as d,\n renameSession as e,\n getSessionFiles as g,\n listProjects as l,\n previewCleanup as p,\n readSession as r,\n splitSession as s,\n updateCustomTitle as u\n};\n"],"names":[],"mappings":";;;;;AAIA,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,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