@kabmo-labs/kabmo 0.53.0 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +183 -183
- package/dist/client/static/js/{Body-sdq2yhmp.js → Body-3v975hq3.js} +3 -3
- package/dist/client/static/js/{CsvGrid-afz6vr3m.js → CsvGrid-8xcj58sw.js} +1 -1
- package/dist/client/static/js/{DocxView-xwjgt7qq.js → DocxView-fwmfpsg7.js} +1 -1
- package/dist/client/static/js/{DrawioView-7m4e8zcm.js → DrawioView-gdtqj2vv.js} +1 -1
- package/dist/client/static/js/{HtmlPreview-tad0dezn.js → HtmlPreview-g4bp5mgq.js} +1 -1
- package/dist/client/static/js/{ImageView-7bpm4xhb.js → ImageView-5e3vdyc9.js} +1 -1
- package/dist/client/static/js/{LayoutWrapper-ehxhj6t3.js → LayoutWrapper-ssxr6q2d.js} +2 -2
- package/dist/client/static/js/MergeDiffView-6t5t6exc.js +1 -0
- package/dist/client/static/js/{Modal-5qt3v5gn.js → Modal-px8tcv9m.js} +9 -9
- package/dist/client/static/js/{PdfView-hbgnnana.js → PdfView-92rx0s88.js} +1 -1
- package/dist/client/static/js/{SessionsView-rv9jmr2e.js → SessionsView-s3d9nceb.js} +1 -1
- package/dist/client/static/js/{SheetView-55e0a8as.js → SheetView-yeg7gtf9.js} +1 -1
- package/dist/client/static/js/{SvgPreview-10fa6mj1.js → SvgPreview-6evr72fg.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-9w4p3dhe.js → abnfDiagram-O67JEVCF-a6n0cab2.js} +1 -1
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-5x6sb253.js → architectureDiagram-NJMV4G6O-z9k17qfg.js} +2 -2
- package/dist/client/static/js/{astro-m3fcq2sa.js → astro-asmathwv.js} +1 -1
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-2c6y4pkn.js → blockDiagram-BEXU5L5S-63d683v3.js} +2 -2
- package/dist/client/static/js/c-20y64hcp.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-45rtm401.js → c4Diagram-YGBWAQC7-5bk6kv13.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-rksw3aw9.js → classDiagram-v2-NBCMYWYE-s6rmr6vt.js} +2 -2
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-4hxtttt5.js → cose-bilkent-JH36ORCC-wd5v7q2m.js} +1 -1
- package/dist/client/static/js/cpp-ty6n0dg9.js +1 -0
- package/dist/client/static/js/css-ncvxaxt0.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-5dhexpf2.js → cynefinDiagram-VND7K2PF-j71tvbhy.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-1k3w4qm9.js → dagre-6A5THRUB-q6x3d9xb.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-fw76k272.js → diagram-22UHCM2B-g6e427jm.js} +2 -2
- package/dist/client/static/js/{diagram-3UASUU5V-qnb2gn31.js → diagram-3UASUU5V-rg3nty46.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-cavnxzpf.js → diagram-ATOU4E4O-m82xv6ka.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-6dxaj054.js → diagram-CDSNMT55-q3aa8sv0.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-f16fv9ay.js → diagram-MLGK6HIB-nkyd150x.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-zsryj72g.js → diagram-MPIPVDR6-1gchkss2.js} +1 -1
- package/dist/client/static/js/{dockerfile-frznktsa.js → dockerfile-f51g7549.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-1zz5h7sw.js → ebnfDiagram-ZINNZB2B-4dsm3p06.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-25pehy1p.js → elk-276RUBZZ-d8wtwxae.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-ezpjhgzw.js → erDiagram-OPXOYQCR-bq865cmc.js} +2 -2
- package/dist/client/static/js/flowDiagram-KWPJA3E3-z01c78q6.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-n11hq4ag.js → ganttDiagram-FUAMR5RP-ndnqbbzn.js} +1 -1
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-3znkxh7y.js → gitGraphDiagram-X574FWY7-d9y6fnz0.js} +1 -1
- package/dist/client/static/js/{index-acpn178r.js → index-046kc8ft.js} +1 -1
- package/dist/client/static/js/{index-s78f7j47.js → index-049xtm14.js} +1 -1
- package/dist/client/static/js/{index-y79ebmam.js → index-0ccj7j87.js} +1 -1
- package/dist/client/static/js/{index-vjmy9r20.js → index-0fpc1h6v.js} +1 -1
- package/dist/client/static/js/{index-j97qmbbv.js → index-25g1ydkd.js} +1 -1
- package/dist/client/static/js/{index-4nvcwtvr.js → index-25zpywv7.js} +1 -1
- package/dist/client/static/js/{index-1qjxg7mh.js → index-2jtkrmry.js} +1 -1
- package/dist/client/static/js/{index-scmtzcv1.js → index-396g4zz4.js} +2 -2
- package/dist/client/static/js/{index-qrpx4sk1.js → index-3x88t8g9.js} +2 -2
- package/dist/client/static/js/{index-7ag37ghj.js → index-4kchzh9y.js} +8 -8
- package/dist/client/static/js/{index-5z7f6bq4.js → index-4pwk5cjy.js} +1 -1
- package/dist/client/static/js/{index-ht164kw9.js → index-53hrj27y.js} +1 -1
- package/dist/client/static/js/{index-2k6wyyds.js → index-5g21qv2b.js} +4 -4
- package/dist/client/static/js/{index-wvw70pgd.js → index-668fc1df.js} +2 -2
- package/dist/client/static/js/{index-gmea6fjd.js → index-6775m1pa.js} +5 -5
- package/dist/client/static/js/{index-5j0wejvq.js → index-6pxh5p8g.js} +2 -2
- package/dist/client/static/js/{index-4faphth3.js → index-79qddnbx.js} +1 -1
- package/dist/client/static/js/{index-tnhnysj1.js → index-7fkdwm69.js} +1 -1
- package/dist/client/static/js/index-7jr49rd4.js +2 -0
- package/dist/client/static/js/{index-ey0ckd66.js → index-8k568z0z.js} +2 -2
- package/dist/client/static/js/{index-dzp9rwy0.js → index-8w69r0c4.js} +161 -161
- package/dist/client/static/js/{index-m1hd7ska.js → index-9eddntv4.js} +25 -25
- package/dist/client/static/js/{index-zkkttvtx.js → index-bcns8arc.js} +2 -2
- package/dist/client/static/js/{index-8972fxm9.js → index-f7sssx5h.js} +1 -1
- package/dist/client/static/js/{index-1w92sjkm.js → index-g46qcgp8.js} +2 -2
- package/dist/client/static/js/{index-hqc2cazc.js → index-gm9cqsqg.js} +4 -4
- package/dist/client/static/js/{index-02skcm4d.js → index-gr5wd7hv.js} +1 -1
- package/dist/client/static/js/{index-5pbf6dcz.js → index-h9p3748x.js} +3 -3
- package/dist/client/static/js/{index-me7ag6sy.js → index-hav1hhbr.js} +1 -1
- package/dist/client/static/js/{index-58kgkwxt.js → index-hn0brpdf.js} +4 -4
- package/dist/client/static/js/{index-qj6b15r4.js → index-k8ks184k.js} +2 -2
- package/dist/client/static/js/{index-er7pj5k6.js → index-m6eh5g1q.js} +1 -1
- package/dist/client/static/js/{index-kyarw08m.js → index-mnadx740.js} +2 -2
- package/dist/client/static/js/{index-5hqjscys.js → index-mttf7ej7.js} +2 -2
- package/dist/client/static/js/{index-10cxm9ty.js → index-pd4s49n5.js} +2 -2
- package/dist/client/static/js/{index-32gh2645.js → index-pnjnvdvb.js} +1 -1
- package/dist/client/static/js/index-rc8f8gjk.js +1 -0
- package/dist/client/static/js/{index-ej1va073.js → index-rsyqf691.js} +2 -2
- package/dist/client/static/js/{index-e0h6xkpv.js → index-stfccv2r.js} +1 -1
- package/dist/client/static/js/{index-1e7fek0v.js → index-v8fztm3w.js} +1 -1
- package/dist/client/static/js/{index-z9msykm1.js → index-vjk01ja9.js} +1 -1
- package/dist/client/static/js/{index-b039ef9w.js → index-w39c85k3.js} +2 -2
- package/dist/client/static/js/{index-899yw6fh.js → index-x3g8fwkc.js} +2 -2
- package/dist/client/static/js/{index-dkz8d77n.js → index-xakrt0sx.js} +1 -1
- package/dist/client/static/js/{index-dzsjyzht.js → index-xf662xsf.js} +2 -2
- package/dist/client/static/js/{index-9n1cg95f.js → index-z0vvdpkv.js} +1 -1
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-kmv3jtrd.js → infoDiagram-VRGFBTTK-t52bsrem.js} +1 -1
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-5kp6geeh.js → ishikawaDiagram-OU5B5YK6-vysv38pr.js} +1 -1
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-6w5f1ddc.js → journeyDiagram-ZHPQQLJL-7222yn0y.js} +2 -2
- package/dist/client/static/js/json-xha2drny.js +1 -0
- package/dist/client/static/js/{julia-nwh5w343.js → julia-d18zhpyp.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-6esn6xqn.js → kanban-definition-PNTS6WVX-9cg88rcn.js} +2 -2
- package/dist/client/static/js/lua-njwwdj4s.js +1 -0
- package/dist/client/static/js/{mermaid.core-z83pf8ch.js → mermaid.core-3qc3zvgb.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-0h1nhw66.js → mindmap-definition-NLK3R4M7-hdbsk349.js} +1 -1
- package/dist/client/static/js/one-dark-pro-3570ra7e.js +1 -0
- package/dist/client/static/js/one-light-3v5yk200.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-xdcpr8my.js → pegDiagram-GJSIUBJH-jtqqcrhq.js} +1 -1
- package/dist/client/static/js/{perl-wb4wtc9x.js → perl-sns2qvmf.js} +1 -1
- package/dist/client/static/js/{php-9g594k9f.js → php-3q6v9eey.js} +1 -1
- package/dist/client/static/js/{pieDiagram-5QR66LMP-0210zd5b.js → pieDiagram-5QR66LMP-2c82jghr.js} +1 -1
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-j0rtvvcm.js → quadrantDiagram-O4NWA36T-vp2hw2a8.js} +1 -1
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-mzxat5g5.js → railroadDiagram-XR7U4H2S-4168nq4f.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-zq5b9ts2.js → requirementDiagram-PLB6GJNP-gwqcyxag.js} +2 -2
- package/dist/client/static/js/{ruby-c4hxsegh.js → ruby-f9k99tfq.js} +1 -1
- package/dist/client/static/js/{rust-vmn352hx.js → rust-6m8myprw.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-06s3r7bv.js → sankeyDiagram-IPEJSGJF-y5fakn56.js} +2 -2
- package/dist/client/static/js/{sass-6yxywx7t.js → sass-2syegq28.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-7s4gz4t5.js → sequenceDiagram-PO4LG4MO-z140kern.js} +3 -3
- package/dist/client/static/js/{sizeCapture-INFHLROL-yensh9k2.js → sizeCapture-INFHLROL-gfez373x.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1q8p06fk.js → stateDiagram-v2-GCMORJYK-1d6h03nr.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-2mfxddzf.js → swimlanes-2SLR337P-75wg3n6d.js} +1 -1
- package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-k2xf0gby.js → swimlanesDiagram-TC7HE7FX-18fj17m7.js} +1 -1
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-xrk07evk.js → timeline-definition-EJHVYXUP-q750z70f.js} +2 -2
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ca9h5skn.js → usecaseDiagram-POWQR4AR-9q7tg456.js} +1 -1
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-c0y47znt.js → vennDiagram-UO4OBE2U-010nw1kd.js} +1 -1
- package/dist/client/static/js/{vue-rcdqpz7q.js → vue-e8e3q3hj.js} +1 -1
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-mfk1ck3n.js → wardleyDiagram-VNRHLVJA-7n33n10f.js} +1 -1
- package/dist/client/static/js/xml-8516fzfp.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-6f8xt89k.js → xychartDiagram-PMCCYNJV-7q0n5vvd.js} +2 -2
- package/package.json +1 -1
- package/src/client/hooks/chat/timeline/new-chat-open.ts +5 -3
- package/src/client/hooks/chat/timeline/new-chat.test.ts +18 -2
- package/src/client/hooks/chat/timeline/new-chat.ts +13 -12
- package/src/client/hooks/chat/timeline/scope.test.ts +100 -0
- package/src/client/hooks/chat/timeline/scope.ts +9 -9
- package/src/client/lib/tts/gapless.ts +205 -0
- package/src/client/lib/tts/player.test.ts +83 -64
- package/src/client/lib/tts/player.ts +48 -98
- package/src/server/lib/fs/fs-write-git.test.ts +2 -51
- package/src/server/lib/fs/git-ignore.test.ts +101 -0
- package/src/server/lib/fs/git-ignore.ts +38 -1
- package/src/server/lib/fs/listing.test.ts +19 -0
- package/src/shared/lib/workspace/active-project.test.ts +45 -0
- package/src/shared/lib/workspace/active-project.ts +21 -0
- package/dist/client/static/js/MergeDiffView-28xkyts9.js +0 -1
- package/dist/client/static/js/c-ypdp030b.js +0 -1
- package/dist/client/static/js/cpp-cxwev3gs.js +0 -1
- package/dist/client/static/js/css-6mxcqf8c.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-zh6hmn6g.js +0 -1
- package/dist/client/static/js/index-qva2vqbh.js +0 -2
- package/dist/client/static/js/index-xvh25zer.js +0 -1
- package/dist/client/static/js/json-mb8k0b1n.js +0 -1
- package/dist/client/static/js/lua-nxnqww9z.js +0 -1
- package/dist/client/static/js/one-dark-pro-wsgaqq27.js +0 -1
- package/dist/client/static/js/one-light-w8zdrvyc.js +0 -1
- package/dist/client/static/js/xml-vtrdnrn6.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,qp,l,w,ne,M,O,G,z,j,q,H,m,b,Zi,mc,Xi,Lg,Gn,ah,ci,So,cl,V}from"./index-m1hd7ska.js";import{Jl,od,Ep,id,Aa}from"./index-kyarw08m.js";import{xn,$n}from"./index-8pqx5n2p.js";var fn=$n(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(x){return x.add(4-x.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(x){if(!this.$utils().u(x))return this.add(7*(x-this.isoWeek()),e);var C,E,Y,rt,A=a(this),F=(C=this.isoWeekYear(),E=this.$u,Y=(E?i.utc:i)().year(C).startOf("year"),rt=4-Y.isoWeekday(),Y.isoWeekday()>4&&(rt+=7),Y.add(rt,e));return A.diff(F,"week")+1},s.isoWeekday=function(x){return this.$utils().u(x)?this.day()||7:this.day(this.day()%7?x:x-7)};var c=s.startOf;s.startOf=function(x,C){var E=this.$utils(),Y=!!E.u(C)||C;return E.p(x)==="isoweek"?Y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(x,C)}}})});var dn=$n(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},x=function(W){return(W=+W)+(W>68?1900:2000)},C=function(W){return function(N){this[W]=+N}},E=[/[+-]\d\d:?(\d\d)?|Z/,function(W){(this.zone||(this.zone={})).offset=function(N){if(!N)return 0;if(N==="Z")return 0;var I=N.match(/([+-]|\d\d)/g),J=60*I[1]+(+I[2]||0);return J===0?0:I[0]==="+"?-J:J}(W)}],Y=function(W){var N=c[W];return N&&(N.indexOf?N:N.s.concat(N.f))},rt=function(W,N){var I,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(W.indexOf(J(lt,0,N))>-1){I=lt>12;break}}else I=W===(N?"pm":"PM");return I},A={A:[s,function(W){this.afternoon=rt(W,!1)}],a:[s,function(W){this.afternoon=rt(W,!0)}],Q:[n,function(W){this.month=3*(W-1)+1}],S:[n,function(W){this.milliseconds=100*+W}],SS:[i,function(W){this.milliseconds=10*+W}],SSS:[/\d{3}/,function(W){this.milliseconds=+W}],s:[a,C("seconds")],ss:[a,C("seconds")],m:[a,C("minutes")],mm:[a,C("minutes")],H:[a,C("hours")],h:[a,C("hours")],HH:[a,C("hours")],hh:[a,C("hours")],D:[a,C("day")],DD:[i,C("day")],Do:[s,function(W){var N=c.ordinal,I=W.match(/\d+/);if(this.day=I[0],N)for(var J=1;J<=31;J+=1)N(J).replace(/\[|\]/g,"")===W&&(this.day=J)}],w:[a,C("week")],ww:[i,C("week")],M:[a,C("month")],MM:[i,C("month")],MMM:[s,function(W){var N=Y("months"),I=(Y("monthsShort")||N.map(function(J){return J.slice(0,3)})).indexOf(W)+1;if(I<1)throw Error();this.month=I%12||I}],MMMM:[s,function(W){var N=Y("months").indexOf(W)+1;if(N<1)throw Error();this.month=N%12||N}],Y:[/[+-]?\d+/,C("year")],YY:[i,function(W){this.year=x(W)}],YYYY:[/\d{4}/,C("year")],Z:E,ZZ:E};function F(W){var N,I;N=W,I=c&&c.formats;for(var J=(W=N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,T){var _=T&&T.toUpperCase();return et||I[T]||e[T]||I[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,L,f){return L||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var P=J[it],D=A[P],u=D&&D[0],U=D&&D[1];J[it]=U?{regex:u,parser:U}:P.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},T=0,_=0;T<lt;T+=1){var S=J[T];if(typeof S=="string")_+=S.length;else{var{regex:L,parser:f}=S,v=tt.slice(_),p=L.exec(v)[0];f.call(et,p),tt=tt.replace(p,"")}}return function(k){var Z=k.afternoon;if(Z!==void 0){var o=k.hours;Z?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(W,N,I){I.p.customParseFormat=!0,W&&W.parseTwoDigitYear&&(x=W.parseTwoDigitYear);var J=N.prototype,lt=J.parse;J.parse=function(it){var{date:P,utc:D,args:u}=it;this.$u=D;var U=u[1];if(typeof U=="string"){var tt=u[2]===!0,et=u[3]===!0,T=tt||et,_=u[2];et&&(_=u[2]),c=this.$locale(),!tt&&_&&(c=I.Ls[_]),this.$d=function(v,p,k,Z){try{if(["x","X"].indexOf(p)>-1)return new Date((p==="X"?1000:1)*v);var o=F(p)(v),{year:X,month:h,day:dt,hours:d,minutes:B,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,R=dt||(X||h?1:g.getDate()),K=X||g.getFullYear(),y=0;X&&!h||(y=h>0?h-1:g.getMonth());var mt,at=d||0,st=B||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,R,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,R,at,st,ht,yt)):(mt=new Date(K,y,R,at,st,ht,yt),nt&&(mt=Z(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(P,U,D,I),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),T&&P!=this.format(U)&&(this.$d=new Date("")),c={}}else if(U instanceof Array)for(var S=U.length,L=1;L<=S;L+=1){u[1]=U[L-1];var f=I.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}L===S&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var mn=$n(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var x=this.$utils(),C=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(E){switch(E){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return x.s(s.week(),E==="w"?1:2,"0");case"W":case"WW":return x.s(s.isoWeek(),E==="W"?1:2,"0");case"k":case"kk":return x.s(String(s.$H===0?24:s.$H),E==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return E}});return i.bind(this)(C)}}})});var hn=$n(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,x=2628000000,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,E=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,Y={years:c,months:x,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(P){return P instanceof lt},A=function(P,D,u){return new lt(P,u,D.$l)},F=function(P){return r.p(P)+"s"},W=function(P){return P<0},N=function(P){return W(P)?Math.ceil(P):Math.floor(P)},I=function(P){return Math.abs(P)},J=function(P,D){return P?W(P)?{negative:!0,format:""+I(P)+D}:{negative:!1,format:""+P+D}:{negative:!1,format:""}},lt=function(){function P(u,U,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return A(u*Y[F(U)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(S){et.$d[F(S)]=u[S]}),this.calMilliseconds(),this;if(typeof u=="string"){var T=u.match(C);if(T){var _=T.slice(2).map(function(S){return S!=null?Number(S):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var D=P.prototype;return D.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(U,tt){return U+(u.$d[tt]||0)*Y[tt]},0)},D.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=N(u/c),u%=c,this.$d.months=N(u/x),u%=x,this.$d.days=N(u/s),u%=s,this.$d.hours=N(u/a),u%=a,this.$d.minutes=N(u/i),u%=i,this.$d.seconds=N(u/n),u%=n,this.$d.milliseconds=u},D.toISOString=function(){var u=J(this.$d.years,"Y"),U=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),T=J(this.$d.hours,"H"),_=J(this.$d.minutes,"M"),S=this.$d.seconds||0;this.$d.milliseconds&&(S+=this.$d.milliseconds/1000,S=Math.round(1000*S)/1000);var L=J(S,"S"),f=u.negative||U.negative||et.negative||T.negative||_.negative||L.negative,v=T.format||_.format||L.format?"T":"",p=(f?"-":"")+"P"+u.format+U.format+et.format+v+T.format+_.format+L.format;return p==="P"||p==="-P"?"P0D":p},D.toJSON=function(){return this.toISOString()},D.format=function(u){var U=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(E,function(et,T){return T||String(tt[et])})},D.as=function(u){return this.$ms/Y[F(u)]},D.get=function(u){var U=this.$ms,tt=F(u);return tt==="milliseconds"?U%=1000:U=tt==="weeks"?N(U/Y[tt]):this.$d[tt],U||0},D.add=function(u,U,tt){var et;return et=U?u*Y[F(U)]:rt(u)?u.$ms:A(u,this).$ms,A(this.$ms+et*(tt?-1:1),this)},D.subtract=function(u,U){return this.add(u,U,!0)},D.locale=function(u){var U=this.clone();return U.$l=u,U},D.clone=function(){return A(this.$ms,this)},D.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},D.valueOf=function(){return this.asMilliseconds()},D.milliseconds=function(){return this.get("milliseconds")},D.asMilliseconds=function(){return this.as("milliseconds")},D.seconds=function(){return this.get("seconds")},D.asSeconds=function(){return this.as("seconds")},D.minutes=function(){return this.get("minutes")},D.asMinutes=function(){return this.as("minutes")},D.hours=function(){return this.get("hours")},D.asHours=function(){return this.as("hours")},D.days=function(){return this.get("days")},D.asDays=function(){return this.as("days")},D.weeks=function(){return this.get("weeks")},D.asWeeks=function(){return this.as("weeks")},D.months=function(){return this.get("months")},D.asMonths=function(){return this.as("months")},D.years=function(){return this.get("years")},D.asYears=function(){return this.as("years")},P}(),it=function(P,D,u){return P.add(D.years()*u,"y").add(D.months()*u,"M").add(D.days()*u,"d").add(D.hours()*u,"h").add(D.minutes()*u,"m").add(D.seconds()*u,"s").add(D.milliseconds()*u,"ms")};return function(P,D,u){e=u,r=u().$utils(),u.duration=function(et,T){var _=u.locale();return A(et,{$l:_},T)},u.isDuration=rt;var U=D.prototype.add,tt=D.prototype.subtract;D.prototype.add=function(et,T){return rt(et)?it(this,et,1):U.bind(this)(et,T)},D.prototype.subtract=function(et,T){return rt(et)?it(this,et,-1):tt.bind(this)(et,T)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function Ln(e){return"translate("+e+",0)"}function Wn(e){return"translate(0,"+e+")"}function En(e){return(r)=>+e(r)}function An(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function On(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,x=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,E=e===me||e===de?-1:1,Y=e===de||e===We?"x":"y",rt=e===me||e===Ee?Ln:Wn;function A(F){var W=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,N=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,I=Math.max(s,0)+x,J=r.range(),lt=+J[0]+C,it=+J[J.length-1]+C,P=(r.bandwidth?An:En)(r.copy(),C),D=F.selection?F.selection():F,u=D.selectAll(".domain").data([null]),U=D.selectAll(".tick").data(W,r).order(),tt=U.exit(),et=U.enter().append("g").attr("class","tick"),T=U.select("line"),_=U.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),U=U.merge(et),T=T.merge(et.append("line").attr("stroke","currentColor").attr(Y+"2",E*s)),_=_.merge(et.append("text").attr("fill","currentColor").attr(Y,E*I).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),F!==D)u=u.transition(F),U=U.transition(F),T=T.transition(F),_=_.transition(F),tt=tt.transition(F).attr("opacity",wr).attr("transform",function(S){return isFinite(S=P(S))?rt(S+C):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(S){var L=this.parentNode.__axis;return rt((L&&isFinite(L=L(S))?L:P(S))+C)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+E*c+","+lt+"H"+C+"V"+it+"H"+E*c:"M"+C+","+lt+"V"+it:c?"M"+lt+","+E*c+"V"+C+"H"+it+"V"+E*c:"M"+lt+","+C+"H"+it),U.attr("opacity",1).attr("transform",function(S){return rt(P(S)+C)}),T.attr(Y+"2",E*s),_.attr(Y,E*I).text(N),D.filter(On).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),D.each(function(){this.__axis=P})}return A.scale=function(F){return arguments.length?(r=F,A):r},A.ticks=function(){return n=Array.from(arguments),A},A.tickArguments=function(F){return arguments.length?(n=F==null?[]:Array.from(F),A):n.slice()},A.tickValues=function(F){return arguments.length?(i=F==null?null:Array.from(F),A):i&&i.slice()},A.tickFormat=function(F){return arguments.length?(a=F,A):a},A.tickSize=function(F){return arguments.length?(s=c=+F,A):s},A.tickSizeInner=function(F){return arguments.length?(s=+F,A):s},A.tickSizeOuter=function(F){return arguments.length?(c=+F,A):c},A.tickPadding=function(F){return arguments.length?(x=+F,A):x},A.offset=function(F){return arguments.length?(C=+F,A):C},A}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Hn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof Gn))e=Lg(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Zi(_t,Lr,mc(Xi,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new Gn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Hn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Nn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Nn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Zi(Wt,ye,mc(Xi,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=ci(r.c,n.c),s=ci(r.l,n.l),c=ci(r.opacity,n.opacity);return function(x){return r.h=i(x),r.c=a(x),r.l=s(x),r.opacity=c(x),r+""}}}var Ar=Er(ah),Ds=Er(ci);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),x=a.ceil(s);return s-c<x-s?c:x},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,x)=>{let C=[];if(s=a.ceil(s),x=x==null?1:Math.floor(x),!(s<c)||!(x>0))return C;let E;do C.push(E=new Date(+s)),r(s,x),e(s);while(E<s&&s<c);return C},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,x)=>{if(c>=c)if(x<0)while(++x<=0)while(r(c,-1),!s(c));else while(--x>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Pn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),Vn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),zn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Rn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Bn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),Zn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),jn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,Xn=Nt.range,qn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,ai=Vr.range,si=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),oi=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ui=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var li=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function x(E,Y,rt){let A=Y<E;if(A)[E,Y]=[Y,E];let F=rt&&typeof rt.range==="function"?rt:C(E,Y,rt),W=F?F.range(E,+Y+1):[];return A?W.reverse():W}function C(E,Y,rt){let A=Math.abs(Y-E)/rt,F=Jl(([,,I])=>I).right(c,A);if(F===c.length)return e.every(od(E/ge,Y/ge,rt));if(F===0)return Yt.every(Math.max(od(E,Y,rt),1));let[W,N]=c[A/c[F-1][2]<c[F][2]/A?F-1:F];return W.every(N)}return[x,C]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:x,shortMonths:C}=e,E=oe(a),Y=ce(a),rt=oe(s),A=ce(s),F=oe(c),W=ce(c),N=oe(x),I=ce(x),J=oe(C),lt=ce(C),it={a:k,A:Z,b:o,B:X,c:null,d:Qr,e:Qr,f:Ai,g:ji,G:Gi,H:Li,I:Wi,j:Ei,L:rn,m:Oi,M:$i,p:h,q:dt,Q:tn,s:en,S:Hi,u:Ni,U:Pi,V:Vi,w:zi,W:Ri,x:null,X:null,y:Bi,Y:qi,Z:Qi,"%":Kr},P={a:d,A:B,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ea,g:fa,G:ma,H:Ji,I:Ki,j:ta,L:an,m:ra,M:na,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},D={a:T,A:_,b:S,B:L,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Ui,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:v,X:p,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),P.x=u(n,P),P.X=u(i,P),P.c=u(r,P);function u(g,R){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=R[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function U(g,R){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(R&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,R,K,y){var mt=0,at=R.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=R.charCodeAt(mt++),ht===37){if(ht=R.charAt(mt++),yt=D[ht in Zr?R.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,R,K){var y=E.exec(R.slice(K));return y?(g.p=Y.get(y[0].toLowerCase()),K+y[0].length):-1}function T(g,R,K){var y=F.exec(R.slice(K));return y?(g.w=W.get(y[0].toLowerCase()),K+y[0].length):-1}function _(g,R,K){var y=rt.exec(R.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,R,K){var y=J.exec(R.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function L(g,R,K){var y=N.exec(R.slice(K));return y?(g.m=I.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,R,K){return tt(g,r,R,K)}function v(g,R,K){return tt(g,n,R,K)}function p(g,R,K){return tt(g,i,R,K)}function k(g){return c[g.getDay()]}function Z(g){return s[g.getDay()]}function o(g){return C[g.getMonth()]}function X(g){return x[g.getMonth()]}function h(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function B(g){return s[g.getUTCDay()]}function Q(g){return C[g.getUTCMonth()]}function ct(g){return x[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var R=u(g+="",it);return R.toString=function(){return g},R},parse:function(g){var R=U(g+="",!1);return R.toString=function(){return g},R},utcFormat:function(g){var R=u(g+="",P);return R.toString=function(){return g},R},utcParse:function(g){var R=U(g+="",!0);return R.toString=function(){return g},R}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Ui(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Li(e,r){return ot(e.getHours(),r,2)}function Wi(e,r){return ot(e.getHours()%12||12,r,2)}function Ei(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Ai(e,r){return rn(e,r)+"000"}function Oi(e,r){return ot(e.getMonth()+1,r,2)}function $i(e,r){return ot(e.getMinutes(),r,2)}function Hi(e,r){return ot(e.getSeconds(),r,2)}function Ni(e){var r=e.getDay();return r===0?7:r}function Pi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function Vi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function zi(e){return e.getDay()}function Ri(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Bi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function qi(e,r){return ot(e.getFullYear()%1e4,r,4)}function Gi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Qi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Ji(e,r){return ot(e.getUTCHours(),r,2)}function Ki(e,r){return ot(e.getUTCHours()%12||12,r,2)}function ta(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ea(e,r){return an(e,r)+"000"}function ra(e,r){return ot(e.getUTCMonth()+1,r,2)}function na(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,on,cn,un;Qe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qe(e){return Gt=Ge(e),Bt=Gt.format,on=Gt.parse,cn=Gt.utcFormat,un=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function ln(e,r,n,i,a,s,c,x,C,E){var Y=id(),{invert:rt,domain:A}=Y,F=E(".%L"),W=E(":%S"),N=E("%I:%M"),I=E("%I %p"),J=E("%a %d"),lt=E("%b %d"),it=E("%B"),P=E("%Y");function D(u){return(C(u)<u?F:x(u)<u?W:c(u)<u?N:s(u)<u?I:i(u)<u?a(u)<u?J:lt:n(u)<u?it:P)(u)}return Y.invert=function(u){return new Date(rt(u))},Y.domain=function(u){return arguments.length?A(Array.from(u,ga)):A().map(ya)},Y.ticks=function(u){var U=A();return e(U[0],U[U.length-1],u==null?10:u)},Y.tickFormat=function(u,U){return U==null?D:E(U)},Y.nice=function(u){var U=A();if(!u||typeof u.range!=="function")u=r(U[0],U[U.length-1],u==null?10:u);return u?A(Ve(U,u)):Y},Y.copy=function(){return Ep(Y,ln(e,r,n,i,a,s,c,x,C,E))},Y}function Je(){return So.apply(ln(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var pn=xn(cl(),1),bt=xn(qp(),1),Tn=xn(fn(),1),vn=xn(dn(),1),bn=xn(mn(),1),Jt=xn(qp(),1),Un=xn(hn(),1);var cr=function(){var e=t(function(L,f,v,p){for(v=v||{},p=L.length;p--;v[L[p]]=f);return v},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],c=[1,30],x=[1,31],C=[1,32],E=[1,33],Y=[1,34],rt=[1,9],A=[1,10],F=[1,11],W=[1,12],N=[1,13],I=[1,14],J=[1,15],lt=[1,16],it=[1,19],P=[1,20],D=[1,21],u=[1,22],U=[1,23],tt=[1,25],et=[1,35],T={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:t(function(f,v,p,k,Z,o,X){var h=o.length-1;switch(Z){case 1:return o[h-1];case 2:this.$=[];break;case 3:o[h-1].push(o[h]),this.$=o[h-1];break;case 4:case 5:this.$=o[h];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[h].substr(18);break;case 19:k.TopAxis(),this.$=o[h].substr(8);break;case 20:k.setAxisFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 21:k.setTickInterval(o[h].substr(13)),this.$=o[h].substr(13);break;case 22:k.setExcludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 23:k.setIncludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 24:k.setTodayMarker(o[h].substr(12)),this.$=o[h].substr(12);break;case 27:k.setDiagramTitle(o[h].substr(6)),this.$=o[h].substr(6);break;case 28:this.$=o[h].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[h].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[h].substr(8)),this.$=o[h].substr(8);break;case 33:k.addTask(o[h-1],o[h]),this.$="task";break;case 34:this.$=o[h-1],k.setClickEvent(o[h-1],o[h],null);break;case 35:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],o[h]);break;case 36:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],null),k.setLink(o[h-2],o[h]);break;case 37:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-2],o[h-1]),k.setLink(o[h-3],o[h]);break;case 38:this.$=o[h-2],k.setClickEvent(o[h-2],o[h],null),k.setLink(o[h-2],o[h-1]);break;case 39:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-1],o[h]),k.setLink(o[h-3],o[h-2]);break;case 40:this.$=o[h-1],k.setLink(o[h-1],o[h]);break;case 41:case 47:this.$=o[h-1]+" "+o[h];break;case 42:case 43:case 45:this.$=o[h-2]+" "+o[h-1]+" "+o[h];break;case 44:case 46:this.$=o[h-3]+" "+o[h-2]+" "+o[h-1]+" "+o[h];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,v){if(v.recoverable)this.trace(f);else{var p=Error(f);throw p.hash=v,p}},"parseError"),parse:t(function(f){var v=this,p=[0],k=[],Z=[null],o=[],X=this.table,h="",dt=0,d=0,B=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var R in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,R))g.yy[R]=this.yy[R];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){p.length=p.length-2*wt,Z.length=Z.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=v.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,cs,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=p[p.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=X[yt]&&X[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in X[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
|
|
1
|
+
import{t,qp,l,w,ne,M,O,G,z,j,q,H,m,b,Ji,mc,Zi,Lg,Gn,ah,li,_o,ll,V}from"./index-9eddntv4.js";import{Jl,od,Ep,id,Aa}from"./index-mnadx740.js";import{xn,$n}from"./index-8pqx5n2p.js";var fn=$n(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(x){return x.add(4-x.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(x){if(!this.$utils().u(x))return this.add(7*(x-this.isoWeek()),e);var C,E,Y,rt,A=a(this),F=(C=this.isoWeekYear(),E=this.$u,Y=(E?i.utc:i)().year(C).startOf("year"),rt=4-Y.isoWeekday(),Y.isoWeekday()>4&&(rt+=7),Y.add(rt,e));return A.diff(F,"week")+1},s.isoWeekday=function(x){return this.$utils().u(x)?this.day()||7:this.day(this.day()%7?x:x-7)};var c=s.startOf;s.startOf=function(x,C){var E=this.$utils(),Y=!!E.u(C)||C;return E.p(x)==="isoweek"?Y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(x,C)}}})});var dn=$n(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},x=function(W){return(W=+W)+(W>68?1900:2000)},C=function(W){return function(N){this[W]=+N}},E=[/[+-]\d\d:?(\d\d)?|Z/,function(W){(this.zone||(this.zone={})).offset=function(N){if(!N)return 0;if(N==="Z")return 0;var I=N.match(/([+-]|\d\d)/g),J=60*I[1]+(+I[2]||0);return J===0?0:I[0]==="+"?-J:J}(W)}],Y=function(W){var N=c[W];return N&&(N.indexOf?N:N.s.concat(N.f))},rt=function(W,N){var I,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(W.indexOf(J(lt,0,N))>-1){I=lt>12;break}}else I=W===(N?"pm":"PM");return I},A={A:[s,function(W){this.afternoon=rt(W,!1)}],a:[s,function(W){this.afternoon=rt(W,!0)}],Q:[n,function(W){this.month=3*(W-1)+1}],S:[n,function(W){this.milliseconds=100*+W}],SS:[i,function(W){this.milliseconds=10*+W}],SSS:[/\d{3}/,function(W){this.milliseconds=+W}],s:[a,C("seconds")],ss:[a,C("seconds")],m:[a,C("minutes")],mm:[a,C("minutes")],H:[a,C("hours")],h:[a,C("hours")],HH:[a,C("hours")],hh:[a,C("hours")],D:[a,C("day")],DD:[i,C("day")],Do:[s,function(W){var N=c.ordinal,I=W.match(/\d+/);if(this.day=I[0],N)for(var J=1;J<=31;J+=1)N(J).replace(/\[|\]/g,"")===W&&(this.day=J)}],w:[a,C("week")],ww:[i,C("week")],M:[a,C("month")],MM:[i,C("month")],MMM:[s,function(W){var N=Y("months"),I=(Y("monthsShort")||N.map(function(J){return J.slice(0,3)})).indexOf(W)+1;if(I<1)throw Error();this.month=I%12||I}],MMMM:[s,function(W){var N=Y("months").indexOf(W)+1;if(N<1)throw Error();this.month=N%12||N}],Y:[/[+-]?\d+/,C("year")],YY:[i,function(W){this.year=x(W)}],YYYY:[/\d{4}/,C("year")],Z:E,ZZ:E};function F(W){var N,I;N=W,I=c&&c.formats;for(var J=(W=N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,T){var _=T&&T.toUpperCase();return et||I[T]||e[T]||I[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,L,f){return L||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var P=J[it],D=A[P],u=D&&D[0],U=D&&D[1];J[it]=U?{regex:u,parser:U}:P.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},T=0,_=0;T<lt;T+=1){var S=J[T];if(typeof S=="string")_+=S.length;else{var{regex:L,parser:f}=S,v=tt.slice(_),p=L.exec(v)[0];f.call(et,p),tt=tt.replace(p,"")}}return function(k){var Z=k.afternoon;if(Z!==void 0){var o=k.hours;Z?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(W,N,I){I.p.customParseFormat=!0,W&&W.parseTwoDigitYear&&(x=W.parseTwoDigitYear);var J=N.prototype,lt=J.parse;J.parse=function(it){var{date:P,utc:D,args:u}=it;this.$u=D;var U=u[1];if(typeof U=="string"){var tt=u[2]===!0,et=u[3]===!0,T=tt||et,_=u[2];et&&(_=u[2]),c=this.$locale(),!tt&&_&&(c=I.Ls[_]),this.$d=function(v,p,k,Z){try{if(["x","X"].indexOf(p)>-1)return new Date((p==="X"?1000:1)*v);var o=F(p)(v),{year:X,month:h,day:dt,hours:d,minutes:B,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,R=dt||(X||h?1:g.getDate()),K=X||g.getFullYear(),y=0;X&&!h||(y=h>0?h-1:g.getMonth());var mt,at=d||0,st=B||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,R,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,R,at,st,ht,yt)):(mt=new Date(K,y,R,at,st,ht,yt),nt&&(mt=Z(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(P,U,D,I),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),T&&P!=this.format(U)&&(this.$d=new Date("")),c={}}else if(U instanceof Array)for(var S=U.length,L=1;L<=S;L+=1){u[1]=U[L-1];var f=I.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}L===S&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var mn=$n(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var x=this.$utils(),C=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(E){switch(E){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return x.s(s.week(),E==="w"?1:2,"0");case"W":case"WW":return x.s(s.isoWeek(),E==="W"?1:2,"0");case"k":case"kk":return x.s(String(s.$H===0?24:s.$H),E==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return E}});return i.bind(this)(C)}}})});var hn=$n(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,x=2628000000,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,E=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,Y={years:c,months:x,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(P){return P instanceof lt},A=function(P,D,u){return new lt(P,u,D.$l)},F=function(P){return r.p(P)+"s"},W=function(P){return P<0},N=function(P){return W(P)?Math.ceil(P):Math.floor(P)},I=function(P){return Math.abs(P)},J=function(P,D){return P?W(P)?{negative:!0,format:""+I(P)+D}:{negative:!1,format:""+P+D}:{negative:!1,format:""}},lt=function(){function P(u,U,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return A(u*Y[F(U)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(S){et.$d[F(S)]=u[S]}),this.calMilliseconds(),this;if(typeof u=="string"){var T=u.match(C);if(T){var _=T.slice(2).map(function(S){return S!=null?Number(S):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var D=P.prototype;return D.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(U,tt){return U+(u.$d[tt]||0)*Y[tt]},0)},D.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=N(u/c),u%=c,this.$d.months=N(u/x),u%=x,this.$d.days=N(u/s),u%=s,this.$d.hours=N(u/a),u%=a,this.$d.minutes=N(u/i),u%=i,this.$d.seconds=N(u/n),u%=n,this.$d.milliseconds=u},D.toISOString=function(){var u=J(this.$d.years,"Y"),U=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),T=J(this.$d.hours,"H"),_=J(this.$d.minutes,"M"),S=this.$d.seconds||0;this.$d.milliseconds&&(S+=this.$d.milliseconds/1000,S=Math.round(1000*S)/1000);var L=J(S,"S"),f=u.negative||U.negative||et.negative||T.negative||_.negative||L.negative,v=T.format||_.format||L.format?"T":"",p=(f?"-":"")+"P"+u.format+U.format+et.format+v+T.format+_.format+L.format;return p==="P"||p==="-P"?"P0D":p},D.toJSON=function(){return this.toISOString()},D.format=function(u){var U=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(E,function(et,T){return T||String(tt[et])})},D.as=function(u){return this.$ms/Y[F(u)]},D.get=function(u){var U=this.$ms,tt=F(u);return tt==="milliseconds"?U%=1000:U=tt==="weeks"?N(U/Y[tt]):this.$d[tt],U||0},D.add=function(u,U,tt){var et;return et=U?u*Y[F(U)]:rt(u)?u.$ms:A(u,this).$ms,A(this.$ms+et*(tt?-1:1),this)},D.subtract=function(u,U){return this.add(u,U,!0)},D.locale=function(u){var U=this.clone();return U.$l=u,U},D.clone=function(){return A(this.$ms,this)},D.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},D.valueOf=function(){return this.asMilliseconds()},D.milliseconds=function(){return this.get("milliseconds")},D.asMilliseconds=function(){return this.as("milliseconds")},D.seconds=function(){return this.get("seconds")},D.asSeconds=function(){return this.as("seconds")},D.minutes=function(){return this.get("minutes")},D.asMinutes=function(){return this.as("minutes")},D.hours=function(){return this.get("hours")},D.asHours=function(){return this.as("hours")},D.days=function(){return this.get("days")},D.asDays=function(){return this.as("days")},D.weeks=function(){return this.get("weeks")},D.asWeeks=function(){return this.as("weeks")},D.months=function(){return this.get("months")},D.asMonths=function(){return this.as("months")},D.years=function(){return this.get("years")},D.asYears=function(){return this.as("years")},P}(),it=function(P,D,u){return P.add(D.years()*u,"y").add(D.months()*u,"M").add(D.days()*u,"d").add(D.hours()*u,"h").add(D.minutes()*u,"m").add(D.seconds()*u,"s").add(D.milliseconds()*u,"ms")};return function(P,D,u){e=u,r=u().$utils(),u.duration=function(et,T){var _=u.locale();return A(et,{$l:_},T)},u.isDuration=rt;var U=D.prototype.add,tt=D.prototype.subtract;D.prototype.add=function(et,T){return rt(et)?it(this,et,1):U.bind(this)(et,T)},D.prototype.subtract=function(et,T){return rt(et)?it(this,et,-1):tt.bind(this)(et,T)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function Ln(e){return"translate("+e+",0)"}function Wn(e){return"translate(0,"+e+")"}function En(e){return(r)=>+e(r)}function An(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function On(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,x=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,E=e===me||e===de?-1:1,Y=e===de||e===We?"x":"y",rt=e===me||e===Ee?Ln:Wn;function A(F){var W=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,N=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,I=Math.max(s,0)+x,J=r.range(),lt=+J[0]+C,it=+J[J.length-1]+C,P=(r.bandwidth?An:En)(r.copy(),C),D=F.selection?F.selection():F,u=D.selectAll(".domain").data([null]),U=D.selectAll(".tick").data(W,r).order(),tt=U.exit(),et=U.enter().append("g").attr("class","tick"),T=U.select("line"),_=U.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),U=U.merge(et),T=T.merge(et.append("line").attr("stroke","currentColor").attr(Y+"2",E*s)),_=_.merge(et.append("text").attr("fill","currentColor").attr(Y,E*I).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),F!==D)u=u.transition(F),U=U.transition(F),T=T.transition(F),_=_.transition(F),tt=tt.transition(F).attr("opacity",wr).attr("transform",function(S){return isFinite(S=P(S))?rt(S+C):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(S){var L=this.parentNode.__axis;return rt((L&&isFinite(L=L(S))?L:P(S))+C)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+E*c+","+lt+"H"+C+"V"+it+"H"+E*c:"M"+C+","+lt+"V"+it:c?"M"+lt+","+E*c+"V"+C+"H"+it+"V"+E*c:"M"+lt+","+C+"H"+it),U.attr("opacity",1).attr("transform",function(S){return rt(P(S)+C)}),T.attr(Y+"2",E*s),_.attr(Y,E*I).text(N),D.filter(On).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),D.each(function(){this.__axis=P})}return A.scale=function(F){return arguments.length?(r=F,A):r},A.ticks=function(){return n=Array.from(arguments),A},A.tickArguments=function(F){return arguments.length?(n=F==null?[]:Array.from(F),A):n.slice()},A.tickValues=function(F){return arguments.length?(i=F==null?null:Array.from(F),A):i&&i.slice()},A.tickFormat=function(F){return arguments.length?(a=F,A):a},A.tickSize=function(F){return arguments.length?(s=c=+F,A):s},A.tickSizeInner=function(F){return arguments.length?(s=+F,A):s},A.tickSizeOuter=function(F){return arguments.length?(c=+F,A):c},A.tickPadding=function(F){return arguments.length?(x=+F,A):x},A.offset=function(F){return arguments.length?(C=+F,A):C},A}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Hn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof Gn))e=Lg(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Ji(_t,Lr,mc(Zi,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new Gn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Hn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Nn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Nn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Ji(Wt,ye,mc(Zi,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=li(r.c,n.c),s=li(r.l,n.l),c=li(r.opacity,n.opacity);return function(x){return r.h=i(x),r.c=a(x),r.l=s(x),r.opacity=c(x),r+""}}}var Ar=Er(ah),Ds=Er(li);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),x=a.ceil(s);return s-c<x-s?c:x},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,x)=>{let C=[];if(s=a.ceil(s),x=x==null?1:Math.floor(x),!(s<c)||!(x>0))return C;let E;do C.push(E=new Date(+s)),r(s,x),e(s);while(E<s&&s<c);return C},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,x)=>{if(c>=c)if(x<0)while(++x<=0)while(r(c,-1),!s(c));else while(--x>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Pn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),Vn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),zn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Rn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Bn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),Zn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),jn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,Xn=Nt.range,qn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,ai=Vr.range,si=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),oi=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ci=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var ui=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function x(E,Y,rt){let A=Y<E;if(A)[E,Y]=[Y,E];let F=rt&&typeof rt.range==="function"?rt:C(E,Y,rt),W=F?F.range(E,+Y+1):[];return A?W.reverse():W}function C(E,Y,rt){let A=Math.abs(Y-E)/rt,F=Jl(([,,I])=>I).right(c,A);if(F===c.length)return e.every(od(E/ge,Y/ge,rt));if(F===0)return Yt.every(Math.max(od(E,Y,rt),1));let[W,N]=c[A/c[F-1][2]<c[F][2]/A?F-1:F];return W.every(N)}return[x,C]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:x,shortMonths:C}=e,E=oe(a),Y=ce(a),rt=oe(s),A=ce(s),F=oe(c),W=ce(c),N=oe(x),I=ce(x),J=oe(C),lt=ce(C),it={a:k,A:Z,b:o,B:X,c:null,d:Qr,e:Qr,f:Ai,g:ji,G:qi,H:Li,I:Wi,j:Ei,L:rn,m:Oi,M:$i,p:h,q:dt,Q:tn,s:en,S:Hi,u:Ni,U:Pi,V:Vi,w:zi,W:Ri,x:null,X:null,y:Bi,Y:Xi,Z:Gi,"%":Kr},P={a:d,A:B,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ea,g:fa,G:ma,H:Qi,I:Ki,j:ta,L:an,m:ra,M:na,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},D={a:T,A:_,b:S,B:L,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Ui,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:v,X:p,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),P.x=u(n,P),P.X=u(i,P),P.c=u(r,P);function u(g,R){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=R[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function U(g,R){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(R&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,R,K,y){var mt=0,at=R.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=R.charCodeAt(mt++),ht===37){if(ht=R.charAt(mt++),yt=D[ht in Zr?R.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,R,K){var y=E.exec(R.slice(K));return y?(g.p=Y.get(y[0].toLowerCase()),K+y[0].length):-1}function T(g,R,K){var y=F.exec(R.slice(K));return y?(g.w=W.get(y[0].toLowerCase()),K+y[0].length):-1}function _(g,R,K){var y=rt.exec(R.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,R,K){var y=J.exec(R.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function L(g,R,K){var y=N.exec(R.slice(K));return y?(g.m=I.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,R,K){return tt(g,r,R,K)}function v(g,R,K){return tt(g,n,R,K)}function p(g,R,K){return tt(g,i,R,K)}function k(g){return c[g.getDay()]}function Z(g){return s[g.getDay()]}function o(g){return C[g.getMonth()]}function X(g){return x[g.getMonth()]}function h(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function B(g){return s[g.getUTCDay()]}function Q(g){return C[g.getUTCMonth()]}function ct(g){return x[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var R=u(g+="",it);return R.toString=function(){return g},R},parse:function(g){var R=U(g+="",!1);return R.toString=function(){return g},R},utcFormat:function(g){var R=u(g+="",P);return R.toString=function(){return g},R},utcParse:function(g){var R=U(g+="",!0);return R.toString=function(){return g},R}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Ui(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Li(e,r){return ot(e.getHours(),r,2)}function Wi(e,r){return ot(e.getHours()%12||12,r,2)}function Ei(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Ai(e,r){return rn(e,r)+"000"}function Oi(e,r){return ot(e.getMonth()+1,r,2)}function $i(e,r){return ot(e.getMinutes(),r,2)}function Hi(e,r){return ot(e.getSeconds(),r,2)}function Ni(e){var r=e.getDay();return r===0?7:r}function Pi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function Vi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function zi(e){return e.getDay()}function Ri(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Bi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function Xi(e,r){return ot(e.getFullYear()%1e4,r,4)}function qi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Gi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Qi(e,r){return ot(e.getUTCHours(),r,2)}function Ki(e,r){return ot(e.getUTCHours()%12||12,r,2)}function ta(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ea(e,r){return an(e,r)+"000"}function ra(e,r){return ot(e.getUTCMonth()+1,r,2)}function na(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,on,cn,un;Qe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qe(e){return Gt=Ge(e),Bt=Gt.format,on=Gt.parse,cn=Gt.utcFormat,un=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function ln(e,r,n,i,a,s,c,x,C,E){var Y=id(),{invert:rt,domain:A}=Y,F=E(".%L"),W=E(":%S"),N=E("%I:%M"),I=E("%I %p"),J=E("%a %d"),lt=E("%b %d"),it=E("%B"),P=E("%Y");function D(u){return(C(u)<u?F:x(u)<u?W:c(u)<u?N:s(u)<u?I:i(u)<u?a(u)<u?J:lt:n(u)<u?it:P)(u)}return Y.invert=function(u){return new Date(rt(u))},Y.domain=function(u){return arguments.length?A(Array.from(u,ga)):A().map(ya)},Y.ticks=function(u){var U=A();return e(U[0],U[U.length-1],u==null?10:u)},Y.tickFormat=function(u,U){return U==null?D:E(U)},Y.nice=function(u){var U=A();if(!u||typeof u.range!=="function")u=r(U[0],U[U.length-1],u==null?10:u);return u?A(Ve(U,u)):Y},Y.copy=function(){return Ep(Y,ln(e,r,n,i,a,s,c,x,C,E))},Y}function Je(){return _o.apply(ln(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var pn=xn(ll(),1),bt=xn(qp(),1),Tn=xn(fn(),1),vn=xn(dn(),1),bn=xn(mn(),1),Jt=xn(qp(),1),Un=xn(hn(),1);var cr=function(){var e=t(function(L,f,v,p){for(v=v||{},p=L.length;p--;v[L[p]]=f);return v},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],c=[1,30],x=[1,31],C=[1,32],E=[1,33],Y=[1,34],rt=[1,9],A=[1,10],F=[1,11],W=[1,12],N=[1,13],I=[1,14],J=[1,15],lt=[1,16],it=[1,19],P=[1,20],D=[1,21],u=[1,22],U=[1,23],tt=[1,25],et=[1,35],T={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:t(function(f,v,p,k,Z,o,X){var h=o.length-1;switch(Z){case 1:return o[h-1];case 2:this.$=[];break;case 3:o[h-1].push(o[h]),this.$=o[h-1];break;case 4:case 5:this.$=o[h];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[h].substr(18);break;case 19:k.TopAxis(),this.$=o[h].substr(8);break;case 20:k.setAxisFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 21:k.setTickInterval(o[h].substr(13)),this.$=o[h].substr(13);break;case 22:k.setExcludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 23:k.setIncludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 24:k.setTodayMarker(o[h].substr(12)),this.$=o[h].substr(12);break;case 27:k.setDiagramTitle(o[h].substr(6)),this.$=o[h].substr(6);break;case 28:this.$=o[h].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[h].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[h].substr(8)),this.$=o[h].substr(8);break;case 33:k.addTask(o[h-1],o[h]),this.$="task";break;case 34:this.$=o[h-1],k.setClickEvent(o[h-1],o[h],null);break;case 35:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],o[h]);break;case 36:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],null),k.setLink(o[h-2],o[h]);break;case 37:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-2],o[h-1]),k.setLink(o[h-3],o[h]);break;case 38:this.$=o[h-2],k.setClickEvent(o[h-2],o[h],null),k.setLink(o[h-2],o[h-1]);break;case 39:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-1],o[h]),k.setLink(o[h-3],o[h-2]);break;case 40:this.$=o[h-1],k.setLink(o[h-1],o[h]);break;case 41:case 47:this.$=o[h-1]+" "+o[h];break;case 42:case 43:case 45:this.$=o[h-2]+" "+o[h-1]+" "+o[h];break;case 44:case 46:this.$=o[h-3]+" "+o[h-2]+" "+o[h-1]+" "+o[h];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,v){if(v.recoverable)this.trace(f);else{var p=Error(f);throw p.hash=v,p}},"parseError"),parse:t(function(f){var v=this,p=[0],k=[],Z=[null],o=[],X=this.table,h="",dt=0,d=0,B=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var R in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,R))g.yy[R]=this.yy[R];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){p.length=p.length-2*wt,Z.length=Z.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=v.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,cs,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=p[p.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=X[yt]&&X[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in X[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+nt.showPosition()+`
|
|
3
3
|
Expecting `+fe.join(", ")+", got '"+(this.terminals_[st]||st)+"'";else Fe="Parse error on line "+(dt+1)+": Unexpected "+(st==ct?"end of input":"'"+(this.terminals_[st]||st)+"'");this.parseError(Fe,{text:nt.match,token:this.terminals_[st]||st,line:nt.yylineno,loc:K,expected:fe})}if(pt[0]instanceof Array&&pt.length>1)throw Error("Parse Error: multiple actions possible at state: "+yt+", token: "+st);switch(pt[0]){case 1:if(p.push(st),Z.push(nt.yytext),o.push(nt.yylloc),p.push(pt[1]),st=null,!ht){if(d=nt.yyleng,h=nt.yytext,dt=nt.yylineno,K=nt.yylloc,B>0)B--}else st=ht,ht=null;break;case 2:if(Lt=this.productions_[pt[1]][1],jt.$=Z[Z.length-Lt],jt._$={first_line:o[o.length-(Lt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Lt||1)].first_column,last_column:o[o.length-1].last_column},y)jt._$.range=[o[o.length-(Lt||1)].range[0],o[o.length-1].range[1]];if(Ye=this.performAction.apply(jt,[h,d,dt,g.yy,pt[1],Z,o].concat(ut)),typeof Ye<"u")return Ye;if(Lt)p=p.slice(0,-1*Lt*2),Z=Z.slice(0,-1*Lt),o=o.slice(0,-1*Lt);p.push(this.productions_[pt[1]][0]),Z.push(jt.$),o.push(jt._$),br=X[p[p.length-2]][p[p.length-1]],p.push(br);break;case 3:return!0}}return!0},"parse")},_=function(){var L={EOF:1,parseError:t(function(v,p){if(this.yy.parser)this.yy.parser.parseError(v,p);else throw Error(v)},"parseError"),setInput:t(function(f,v){if(this.yy=v||this.yy||{},this._input=f,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var v=f.match(/(?:\r\n?|\n).*/g);if(v)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),f},"input"),unput:t(function(f){var v=f.length,p=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1)this.yylineno-=p.length-1;var Z=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===k.length?this.yylloc.first_column:0)+k[k.length-p.length].length-p[0].length:this.yylloc.first_column-v},this.options.ranges)this.yylloc.range=[Z[0],Z[0]+this.yyleng-v];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(f){this.unput(this.match.slice(f))},"less"),pastInput:t(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var f=this.match;if(f.length<20)f+=this._input.substr(0,20-f.length);return(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var f=this.pastInput(),v=Array(f.length+1).join("-");return f+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{zi}from"./index-dzsjyzht.js";import{xe}from"./index-ht164kw9.js";import{t,l,Y,C,w,M,O,G,z,j,q,H,m,pc,b,Og,le,V}from"./index-m1hd7ska.js";import{$e}from"./index-cwwg7k5f.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=Y.gitGraph,U=t(()=>le({...Ce,...C().gitGraph}),"getConfig"),h=new zi(()=>{let e=U(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return Og({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var ve=t(function(e){h.records.direction=e},"setDirection"),Ee=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{h.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return h.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=U();a=w.sanitizeText(a,d),r=w.sanitizeText(r,d),c=c?.map((o)=>w.sanitizeText(o,d));let s={id:a?a:h.records.seq+"-"+ae(),message:r,seq:h.records.seq++,type:n??k.NORMAL,tags:c??[],parents:h.records.head==null?[]:[h.records.head.id],branch:h.records.currBranch};if(h.records.head=s,l.info("main branch",d.mainBranchName),h.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);h.records.commits.set(s.id,s),h.records.branches.set(h.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=w.sanitizeText(r,U()),h.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);h.records.branches.set(r,h.records.head!=null?h.records.head.id:null),h.records.branchConfig.set(r,{name:r,order:a}),pe(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=U();if(r=w.sanitizeText(r,d),a)a=w.sanitizeText(a,d);let s=h.records.branches.get(h.records.currBranch),o=h.records.branches.get(r),g=s?h.records.commits.get(s):void 0,p=o?h.records.commits.get(o):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(h.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${h.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!h.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(p===void 0||!p){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===p){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&h.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let y=o?o:"",f={id:a||`${h.records.seq}-${ae()}`,message:`merged branch ${r} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,y],branch:h.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};h.records.head=f,h.records.commits.set(f.id,f),h.records.branches.set(h.records.currBranch,f.id),l.debug(h.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=U();if(r=w.sanitizeText(r,d),a=w.sanitizeText(a,d),n=n?.map((g)=>w.sanitizeText(g,d)),c=w.sanitizeText(c,d),!r||!h.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=h.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!h.records.commits.has(a)){if(o===h.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=h.records.branches.get(h.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let p=h.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y={id:h.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,s.id],branch:h.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};h.records.head=y,h.records.commits.set(y.id,y),h.records.branches.set(h.records.currBranch,y.id),l.debug(h.records.branches),l.debug("in cherryPick")}},"cherryPick"),pe=t(function(e){if(e=w.sanitizeText(e,U()),!h.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{h.records.currBranch=e;let r=h.records.branches.get(h.records.currBranch);if(r===void 0||!r)h.records.head=null;else h.records.head=h.records.commits.get(r)??null}},"checkout");function ce(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ce,"upsert");function de(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in h.records.branches)if(h.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=h.records.commits.get(r.parents[0]);if(ce(e,r,c),r.parents[1])e.push(h.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=h.records.commits.get(r.parents[0]);ce(e,r,c)}e=fe(e,(c)=>c.id),de(e)}t(de,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(h.records.commits);let e=ye()[0];de([e])},"prettyPrint"),Ie=t(function(){h.reset(),M()},"clear"),_e=t(function(){return[...h.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return h.records.branches},"getBranches"),De=t(function(){return h.records.commits},"getCommits"),ye=t(function(){let e=[...h.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return h.records.currBranch},"getCurrentBranch"),qe=t(function(){return h.records.direction},"getDirection"),Ae=t(function(){return h.records.head},"getHead"),ue={commitType:k,getConfig:U,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:pe,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:ye,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H},He=t((e,r)=>{if(xe(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await $e("gitGraph",e);l.debug(r),He(r,ue)},"parse")},S=10,N=40,_=4,W=2,F=8,oe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),ie=12,he=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),K=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,R=new Map,te=30,J=new Map,re=[],A=0,u="LR",Ve=t(()=>{P.clear(),R.clear(),J.clear(),A=0,re=[],u="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),we=t((e)=>{let r,a,n;if(u==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=u==="TB"||u=="BT"?R.get(c)?.y:R.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=R.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=R.get(g).y-N,n<=c)c=n;let p=P.get(o.branch).pos,y=n-S;R.set(o.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=R.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return R.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;R.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=m(),o=oe.has(s??""),g=he.has(s??""),p=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${K(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${K(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let y=e.append("circle");if(y.attr("cx",a.x),y.attr("cy",a.y),y.attr("r",o?7:10),y.attr("class",`commit ${r.id} commit${K(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-W).attr("y",a.y+13.5).attr("width",g.width+2*W).attr("height",g.height+2*W),u==="TB"||u==="BT")s.attr("x",a.x-(g.width+4*_+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*_)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(u==="TB"||u==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;d.attr("transform","translate("+p+", "+y+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:y,rect:p,yOffset:c}),c+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{$i}from"./index-xf662xsf.js";import{xe}from"./index-53hrj27y.js";import{t,l,Y,C,w,M,O,G,z,j,q,H,m,pc,b,Og,le,V}from"./index-9eddntv4.js";import{$e}from"./index-cwwg7k5f.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=Y.gitGraph,U=t(()=>le({...Ce,...C().gitGraph}),"getConfig"),h=new $i(()=>{let e=U(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return Og({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var ve=t(function(e){h.records.direction=e},"setDirection"),Ee=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{h.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return h.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=U();a=w.sanitizeText(a,d),r=w.sanitizeText(r,d),c=c?.map((o)=>w.sanitizeText(o,d));let s={id:a?a:h.records.seq+"-"+ae(),message:r,seq:h.records.seq++,type:n??k.NORMAL,tags:c??[],parents:h.records.head==null?[]:[h.records.head.id],branch:h.records.currBranch};if(h.records.head=s,l.info("main branch",d.mainBranchName),h.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);h.records.commits.set(s.id,s),h.records.branches.set(h.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=w.sanitizeText(r,U()),h.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);h.records.branches.set(r,h.records.head!=null?h.records.head.id:null),h.records.branchConfig.set(r,{name:r,order:a}),pe(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=U();if(r=w.sanitizeText(r,d),a)a=w.sanitizeText(a,d);let s=h.records.branches.get(h.records.currBranch),o=h.records.branches.get(r),g=s?h.records.commits.get(s):void 0,p=o?h.records.commits.get(o):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(h.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${h.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!h.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(p===void 0||!p){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===p){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&h.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let y=o?o:"",f={id:a||`${h.records.seq}-${ae()}`,message:`merged branch ${r} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,y],branch:h.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};h.records.head=f,h.records.commits.set(f.id,f),h.records.branches.set(h.records.currBranch,f.id),l.debug(h.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=U();if(r=w.sanitizeText(r,d),a=w.sanitizeText(a,d),n=n?.map((g)=>w.sanitizeText(g,d)),c=w.sanitizeText(c,d),!r||!h.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=h.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!h.records.commits.has(a)){if(o===h.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=h.records.branches.get(h.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let p=h.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y={id:h.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,s.id],branch:h.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};h.records.head=y,h.records.commits.set(y.id,y),h.records.branches.set(h.records.currBranch,y.id),l.debug(h.records.branches),l.debug("in cherryPick")}},"cherryPick"),pe=t(function(e){if(e=w.sanitizeText(e,U()),!h.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{h.records.currBranch=e;let r=h.records.branches.get(h.records.currBranch);if(r===void 0||!r)h.records.head=null;else h.records.head=h.records.commits.get(r)??null}},"checkout");function ce(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ce,"upsert");function de(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in h.records.branches)if(h.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=h.records.commits.get(r.parents[0]);if(ce(e,r,c),r.parents[1])e.push(h.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=h.records.commits.get(r.parents[0]);ce(e,r,c)}e=fe(e,(c)=>c.id),de(e)}t(de,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(h.records.commits);let e=ye()[0];de([e])},"prettyPrint"),Ie=t(function(){h.reset(),M()},"clear"),_e=t(function(){return[...h.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return h.records.branches},"getBranches"),De=t(function(){return h.records.commits},"getCommits"),ye=t(function(){let e=[...h.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return h.records.currBranch},"getCurrentBranch"),qe=t(function(){return h.records.direction},"getDirection"),Ae=t(function(){return h.records.head},"getHead"),ue={commitType:k,getConfig:U,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:pe,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:ye,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H},He=t((e,r)=>{if(xe(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await $e("gitGraph",e);l.debug(r),He(r,ue)},"parse")},S=10,N=40,_=4,W=2,F=8,oe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),ie=12,he=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),K=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,R=new Map,te=30,J=new Map,re=[],A=0,u="LR",Ve=t(()=>{P.clear(),R.clear(),J.clear(),A=0,re=[],u="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),we=t((e)=>{let r,a,n;if(u==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=u==="TB"||u=="BT"?R.get(c)?.y:R.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=R.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=R.get(g).y-N,n<=c)c=n;let p=P.get(o.branch).pos,y=n-S;R.set(o.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=R.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return R.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;R.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=m(),o=oe.has(s??""),g=he.has(s??""),p=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${K(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${K(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let y=e.append("circle");if(y.attr("cx",a.x),y.attr("cy",a.y),y.attr("r",o?7:10),y.attr("class",`commit ${r.id} commit${K(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-W).attr("y",a.y+13.5).attr("width",g.width+2*W).attr("height",g.height+2*W),u==="TB"||u==="BT")s.attr("x",a.x-(g.width+4*_+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*_)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(u==="TB"||u==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;d.attr("transform","translate("+p+", "+y+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:y,rect:p,yOffset:c}),c+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${n-d/2-_/2},${B+W}
|
|
3
3
|
${n-d/2-_/2},${B-W}
|
|
4
4
|
${a.posWithOffset-d/2-_},${B-i-W}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,l,Yt,C,te,ne,M,m,Ae}from"./index-
|
|
1
|
+
import{t,l,Yt,C,te,ne,M,m,Ae}from"./index-9eddntv4.js";var A="",O="",D="",E=[],b=new Map,S=t((e)=>te(e,m()),"sanitizeText"),R=t((e)=>{switch(e.type){case"terminal":return{...e,value:S(e.value)};case"nonterminal":return{...e,name:S(e.name)};case"sequence":return{...e,elements:e.elements.map(R)};case"choice":return{...e,alternatives:e.alternatives.map(R)};case"optional":return{...e,element:R(e.element)};case"repetition":return{...e,element:R(e.element),separator:e.separator?R(e.separator):void 0};case"special":return{...e,text:S(e.text)}}},"sanitizeAstNode"),H=t(()=>{A="",O="",D="",E.length=0,b.clear(),M(),l.debug("[Railroad] Database cleared")},"clear"),Y=t((e)=>{A=S(e),l.debug("[Railroad] Title set:",e)},"setTitle"),P=t(()=>A,"getTitle"),q=t((e)=>{let n={...e,name:S(e.name),definition:R(e.definition),comment:e.comment?S(e.comment):void 0};if(l.debug("[Railroad] Adding rule:",n.name),b.has(n.name))l.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);E.push(n),b.set(n.name,n)},"addRule"),G=t(()=>E,"getRules"),U=t((e)=>b.get(e),"getRule"),j=t((e)=>{O=S(e).replace(/^\s+/g,""),l.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),K=t(()=>O,"getAccTitle"),J=t((e)=>{D=S(e).replace(/\n\s+/g,`
|
|
2
2
|
`),l.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),Q=t(()=>D,"getAccDescription"),Z=Y,V=P,je={clear:H,setTitle:Y,getTitle:P,addRule:q,getRules:G,getRule:U,setAccTitle:j,getAccTitle:K,setAccDescription:J,getAccDescription:Q,setDiagramTitle:Z,getDiagramTitle:V},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ee=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,re=/^[\w "',.-]+$/,ie=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=t((e)=>{if(!e)return!1;return Object.keys(e).every((n)=>n==="railroad"||ie.has(n))},"isRailroadStyleOptions"),ae=t((e)=>{if(!e)return{};if("railroad"in e&&e.railroad)return e.railroad;return L(e)?e:{}},"extractRailroadOverrides"),oe=t((e)=>{if(!e||L(e))return{};let{railroad:n,svgId:o,theme:i,look:r,...a}=e;return a},"extractThemeOverrides"),u=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return ee.test(o)?o:n},"sanitizeColorValue"),I=t((e,n)=>{if(typeof e!=="string")return n;let o=e.trim();return re.test(o)?o:n},"sanitizeFontFamilyValue"),y=t((e,n)=>{let o=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(o)&&o>=0?o:n},"sanitizeNumberValue"),le=t((e)=>{let n=typeof e==="number"?e:typeof e==="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),se=t((e)=>{let n=I(e.fontFamily,T.fontFamily),o=le(e.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:o,terminalFill:u(e.secondBkg??e.secondaryColor,T.terminalFill),terminalStroke:u(e.secondaryBorderColor??e.lineColor,T.terminalStroke),terminalTextColor:u(e.secondaryTextColor??e.textColor,T.terminalTextColor),nonTerminalFill:u(e.mainBkg??e.background,T.nonTerminalFill),nonTerminalStroke:u(e.primaryBorderColor??e.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(e.primaryTextColor??e.textColor,T.nonTerminalTextColor),lineColor:u(e.lineColor,T.lineColor),markerFill:u(e.lineColor,T.markerFill),commentFill:u(e.labelBackground??e.tertiaryColor,T.commentFill),commentStroke:u(e.tertiaryBorderColor??e.lineColor,T.commentStroke),commentTextColor:u(e.tertiaryTextColor??e.textColor,T.commentTextColor),specialFill:u(e.tertiaryColor??e.secondaryColor,T.specialFill),specialStroke:u(e.tertiaryBorderColor??e.secondaryBorderColor,T.specialStroke),ruleNameColor:u(e.titleColor??e.textColor,T.ruleNameColor)}},"buildThemeDefaults"),W=t((e)=>{let n=C(),o={...Yt(),...n.themeVariables??{},...oe(e)},i=se(o),r={...n.railroad??{},...ae(e)};return{compactMode:r.compactMode??i.compactMode,padding:y(r.padding,i.padding),verticalSeparation:y(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:y(r.horizontalSeparation,i.horizontalSeparation),arcRadius:y(r.arcRadius,i.arcRadius),fontSize:y(r.fontSize,i.fontSize),fontFamily:I(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:y(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:y(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Va=t((e)=>{let{fontFamily:n,fontSize:o,terminalFill:i,terminalStroke:r,terminalTextColor:a,nonTerminalFill:g,nonTerminalStroke:c,nonTerminalTextColor:s,lineColor:f,strokeWidth:p,markerFill:h,commentFill:k,commentStroke:d,commentTextColor:x,specialFill:z,specialStroke:F,ruleNameColor:v}=W(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,n,o,i,u,a,ue,e,s,f,E,ce,Ro,ae,pe,h,Em,Te,T,xt,so,nt,he,Re,Sh,Bi}from"./index-dzp9rwy0.js";var se={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]},F=s(se);function O(l,r,c=1e6){return{sessionId:l,sessionTitle:r,modelId:"",modelName:"",timestamp:"",contextUsed:0,contextLimit:c,contextPercent:0,messagesCount:0,userCount:0,assistantCount:0,totalCost:0,costFormatted:"$0.00",cacheHitAverage:0,costBreakdown:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},lastMessage:{input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,cacheHitPercent:0},distribution:{userTokens:0,userPercent:0,assistantTokens:0,assistantPercent:0,toolTokens:0,toolPercent:0,otherTokens:0,otherPercent:100},rawMessages:[]}}function J({used:l,limit:r,percent:c}){let b=l.toLocaleString(),x=r.toLocaleString(),m=Math.min(100,Math.max(0,c));return e("div",{className:"bg-canvas border border-ink/10 rounded-xl p-4 transition-all",children:[e("div",{className:"flex items-center justify-between text-xs mb-2",children:[e("span",{className:"font-semibold text-ink/80",children:"Context"}),e("span",{className:"font-mono text-ink/70 text-[11px]",children:[b," / ",x]})]}),e("div",{className:"w-full h-1.5 bg-ink/10 rounded-full overflow-hidden mb-2",children:e("div",{className:"h-full bg-ink/70 rounded-full transition-all duration-500 ease-out",style:{width:`${m}%`}})}),e("div",{className:"text-[11px] font-mono text-ink/50 text-left",children:[m.toFixed(1),"% used"]})]})}function L(l){return l<0.01?"$0.01":`$${l.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`}function Z({open:l,onClose:r,breakdown:c,costFormatted:b}){let x=i(null);if(he(x,r),!l)return null;let m=c?[{label:"Total Cost",value:L(c.total),strong:!0},{label:"Input (cache miss)",value:L(c.input)},{label:"Output",value:L(c.output)},{label:"Cache Read (cache hit)",value:L(c.cacheRead)},{label:"Cache Write",value:L(c.cacheWrite)}]:[{label:"Total Cost",value:b??"$0.01",strong:!0}];return e("div",{ref:x,className:"glass-popover absolute top-full right-0 mt-1.5 z-50 w-64 bg-paper border border-ink/10 rounded-lg shadow-lg p-3",role:"dialog","aria-modal":"false",children:[e("div",{className:"flex items-center justify-between mb-2.5",children:[e("span",{className:"text-xs font-semibold text-ink tracking-tight",children:"Cost Breakdown"}),e("button",{type:"button",onClick:r,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink transition-colors","aria-label":"Close cost breakdown",children:e(h,{size:14})})]}),e("div",{className:"space-y-1.5",children:m.map((t)=>e("div",{className:"flex items-center justify-between text-[11px] font-mono border-b border-ink/5 last:border-0 pb-1.5 last:pb-0",children:[e("span",{className:"text-ink/60",children:t.label}),e("span",{className:`${t.strong?"font-semibold text-ink":"text-ink/80"}`,children:t.value})]},t.label))})]})}function V({messagesCount:l,userCount:r,assistantCount:c,costFormatted:b,cacheHitAverage:x,costBreakdown:m}){let[t,v]=n(!1);return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Session Stats"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(Re,{variant:"compact",label:"Messages",value:l}),e(Re,{variant:"compact",label:"User",value:r}),e(Re,{variant:"compact",label:"Assistant",value:c}),e(Re,{variant:"compact",label:"Cache Hit",value:x!==void 0?`${x.toFixed(1)}%`:"–"}),e("div",{className:"relative bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[e("span",{className:"text-[10px] font-medium text-ink/50 flex items-center gap-1",children:["Cost",e("button",{type:"button",onClick:()=>v(!0),className:"p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors","aria-label":"Show cost breakdown",title:"Cost breakdown",children:e(pe,{size:11})})]}),e("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:b}),e(Z,{open:t,onClose:()=>v(!1),breakdown:m,costFormatted:b})]})]})]})}function z({input:l,output:r,reasoning:c,cacheRead:b,cacheWrite:x,cacheHitPercent:m}){return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Last Assistant Message"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(Re,{variant:"compact",label:"In",value:l.toLocaleString()}),e(Re,{variant:"compact",label:"Out",value:r.toLocaleString()}),e(Re,{variant:"compact",label:"Reason",value:c.toLocaleString()}),e(Re,{variant:"compact",label:"Cache",value:`${b.toLocaleString()}/${x.toLocaleString()}`}),e(Re,{variant:"compact",label:"Hit",value:`${m.toFixed(1)}%`})]})]})}function Q({userPercent:l,assistantPercent:r,toolPercent:c,otherPercent:b}){return e("div",{className:"space-y-2.5",children:[e("div",{className:"w-full h-1.5 rounded-full overflow-hidden flex bg-ink/10",children:[e("div",{className:"h-full bg-emerald-500 transition-all duration-300",style:{width:`${l}%`},title:`User: ${l}%`}),e("div",{className:"h-full bg-sky-500 transition-all duration-300",style:{width:`${r}%`},title:`Assistant: ${r}%`}),e("div",{className:"h-full bg-amber-500 transition-all duration-300",style:{width:`${c}%`},title:`Tool Calls: ${c}%`}),e("div",{className:"h-full bg-slate-400 transition-all duration-300",style:{width:`${b}%`},title:`Other: ${b}%`})]}),e("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-ink/70",children:[e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-emerald-500 flex-shrink-0"}),e("span",{children:["User ",l,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"}),e("span",{children:["Assistant ",r,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-amber-500 flex-shrink-0"}),e("span",{children:["Tool Calls ",c,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-slate-400 flex-shrink-0"}),e("span",{children:["Other ",b,"%"]})]})]})]})}function G({data:l}){Bi();let[r,c]=n(!1),b=i(null),x=i(null),m=JSON.stringify(l,null,2),t=Sh(m),v=a((C)=>{let g=x.current;if(!g)return;g.scrollLeft=C.currentTarget.scrollLeft,g.scrollTop=C.currentTarget.scrollTop},[]),y=a(async(C)=>{C.stopPropagation();try{await navigator.clipboard.writeText(m)}catch{let g=document.createElement("textarea");g.value=m,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}c(!0),setTimeout(()=>c(!1),2000)},[m]);return e("div",{className:"relative my-1.5 rounded-lg bg-paper/80 border border-ink/10 overflow-hidden",children:[e("div",{className:"flex items-center justify-between px-2.5 py-1.5 bg-ink/[0.04] border-b border-ink/10",children:[e("span",{className:"text-[10px] font-mono text-ink/50 select-none",children:[Object.keys(l).length," keys · ",m.length," chars"]}),e("button",{type:"button",onClick:y,className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas hover:bg-paper text-ink/70 hover:text-ink border border-ink/10 text-[10px] transition-colors shadow-xs",title:"Copy Pretty JSON",children:r?e(d,{children:[e(f,{size:11,className:"text-success"}),e("span",{className:"text-success font-sans font-medium",children:"Copied"})]}):e(d,{children:[e(ae,{size:11}),e("span",{className:"font-sans",children:"Copy JSON"})]})})]}),e("div",{className:"relative",children:[e("pre",{ref:x,"aria-hidden":!0,className:"absolute inset-0 p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre pointer-events-none",dangerouslySetInnerHTML:{__html:t}}),e("pre",{ref:b,onScroll:v,className:"relative p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre select-text selection:bg-ink selection:text-canvas",children:e("code",{className:"text-transparent",children:m})})]})]})}var j=["bg-emerald-500","bg-sky-500","bg-amber-500","bg-violet-500","bg-rose-500","bg-teal-500","bg-indigo-500","bg-fuchsia-500","bg-lime-500","bg-cyan-500","bg-orange-500","bg-pink-500","bg-yellow-500","bg-purple-500","bg-red-500","bg-blue-500","bg-green-500","bg-cyan-600","bg-violet-600","bg-amber-600"],_=20;function K(l){let r=0;for(let c=0;c<l.length;c++)r=r*31+l.charCodeAt(c)|0;return Math.abs(r)}function q(l){let r=l.indexOf("/"),c=r>0?l.slice(0,r):l,b=r>0?l.slice(r+1):"";return b?`${c} · ${b}`:c}function Y(l,r){if(r<=7)return Array.from({length:r},(t,v)=>v+1);let c=new Set([1,r,l,l-1,l+1]);if(l<=3)[2,3,4].forEach((t)=>c.add(t));if(l>=r-2)[r-3,r-2,r-1].forEach((t)=>c.add(t));let b=[...c].filter((t)=>t>=1&&t<=r).sort((t,v)=>t-v),x=[],m=0;for(let t of b){if(t-m>1)x.push("…");x.push(t),m=t}return x}function X({sessionId:l,refreshKey:r=0}){let[c,b]=T("context.rawExpandedIds",{}),[x,m]=T("context.rawFilterRole","all"),[t,v]=n(1),[y,C]=n([]),[g,I]=n(0),[W,S]=n(!1),w=i(0),U=i(!1),B=a((p)=>{if(typeof window>"u")return;let k=++w.current;if(!p?.silent)S(!0);let P=new URLSearchParams({page:String(t),pageSize:String(_),role:x});if(l)P.set("sessionId",l);fetch(`/api/telemetry/raw-messages?${P.toString()}`).then((N)=>N.ok?N.json():null).then((N)=>{if(U.current||k!==w.current)return;C(N&&Array.isArray(N.items)?N.items:[]),I(N&&Number.isFinite(N.filteredTotal)?N.filteredTotal:0)}).catch(()=>{if(U.current||k!==w.current)return;C([]),I(0)}).finally(()=>{if(!p?.silent&&k===w.current)S(!1)})},[l,t,x]);o(()=>(U.current=!1,B(),()=>{U.current=!0}),[B,r]);let R=Math.max(1,Math.ceil(g/_)),M=Math.min(t,R),D=(p)=>v(Math.min(Math.max(1,p),R)),ee=(p)=>{b((k)=>({...k,[p]:!k[p]}))},te=()=>{if(y.every((k)=>c[k.id]))b({});else{let k={};y.forEach((P)=>{k[P.id]=!0}),b(k)}},H=u(()=>{let p=[];for(let k of y){let P=k.info.modelID;if(!P||p.includes(P))continue;p.push(P)}return p},[y]),A=(p)=>p?j[K(p)%j.length]:"bg-ink/20";return e("div",{className:"space-y-3",children:[H.length>0&&e("div",{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Legend"})}),e("div",{className:"bg-canvas border border-ink/10 rounded-xl px-3 py-2",children:e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] font-mono text-ink/60",children:H.map((p)=>e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${A(p)}`}),e("span",{children:q(p)})]},p))})})]}),e("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-2",children:[e("span",{className:"text-xs font-semibold text-ink/80",children:"Raw Messages"}),e("span",{className:"text-[10px] font-mono text-ink/50 bg-ink/5 px-1.5 py-0.5 rounded-full border border-ink/10",children:g})]}),e("div",{className:"flex items-center space-x-1",children:[e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-lg p-0.5 text-[10px]",children:[e("button",{type:"button",onClick:()=>{m("all"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="all"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"All"}),e("button",{type:"button",onClick:()=>{m("assistant"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="assistant"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"AI"}),e("button",{type:"button",onClick:()=>{m("user"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="user"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"User"})]}),e("button",{type:"button",onClick:te,className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors text-[10px] flex items-center",title:"Expand / Collapse All",children:e(F,{size:14})})]})]}),e("div",{className:"space-y-1.5",children:!W&&y.length===0?e("div",{className:"p-4 text-center text-xs text-ink/40 italic bg-canvas rounded-xl border border-ink/10",children:"No raw messages recorded yet."}):y.map((p)=>{let k=Boolean(c[p.id]);return e("div",{className:`bg-canvas border border-ink/10 rounded-xl overflow-hidden transition-all duration-200 ${W?"opacity-50":""}`,children:[e("button",{type:"button",onClick:()=>ee(p.id),className:"w-full text-left px-3.5 py-2.5 flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer",children:[e("div",{className:"flex items-center space-x-2 min-w-0 flex-1 mr-2",children:[e("span",{className:"text-ink/40 flex-shrink-0",children:k?e(E,{size:14}):e(ce,{size:14})}),e("span",{className:"text-xs font-mono text-ink/90 truncate",children:p.badgeLabel})]}),e("div",{className:"flex items-center space-x-3 text-[11px] font-mono text-ink/50 flex-shrink-0",children:[p.tokenSummary&&e("span",{className:"text-ink/60",children:p.tokenSummary}),e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${A(p.info.modelID)}`}),e("span",{children:p.timestamp})]})]})]}),k&&e("div",{className:"px-3.5 pb-3 pt-1 border-t border-ink/5 bg-canvas/60",children:e(G,{data:p.rawPayload})})]},p.id)})}),R>1&&e("div",{className:"flex items-center justify-between pt-1",children:[e("span",{className:"text-[10px] font-mono text-ink/50",children:[(M-1)*_+1,"–",Math.min(M*_,g)," of ",g]}),e("div",{className:"flex items-center gap-0.5",children:[e("button",{type:"button",disabled:M<=1,onClick:()=>D(M-1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Previous page",children:e(Ro,{size:14})}),Y(M,R).map((p,k)=>p==="…"?e("span",{className:"px-1 text-[10px] font-mono text-ink/40 select-none",children:"…"},`gap-${k}`):e("button",{type:"button",onClick:()=>D(p),className:`min-w-[22px] h-[22px] px-1 rounded text-[10px] font-mono transition-colors ${p===M?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink hover:bg-ink/5"}`,children:p},p)),e("button",{type:"button",disabled:M>=R,onClick:()=>D(M+1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Next page",children:e(ce,{size:14})})]})]})]})}function mt({className:l="",enabled:r=!0,refreshKey:c=0,tabsMode:b=!1}){let[x]=ue(),m=x.get("sessionId"),[t,v]=n(()=>O(m||"default","Session not started")),y=i(!1),C=a(()=>{if(typeof window>"u")return;let S=m?`?sessionId=${encodeURIComponent(m)}`:"";fetch(`/api/telemetry/context${S}`).then((w)=>w.ok?w.json():null).then((w)=>{if(!y.current&&w&&w.telemetry)v(w.telemetry)}).catch((w)=>{if(!y.current)console.warn("Failed to fetch context telemetry:",w)})},[m]);o(()=>{if(y.current=!1,!r)return;return C(),()=>{y.current=!0}},[r,c,C]);let g=Te(m?Em(m):null,{enabled:r}),[I,W]=n(0);if(o(()=>{if(g.data)v(g.data),W((S)=>S+1)},[g.data]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});if(t.messagesCount===0)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono",children:"Session not started"})});return e("div",{className:`flex flex-col h-full bg-paper text-ink overflow-hidden select-none ${l}`,children:[e(xt,{left:e(d,{children:[e(so,{id:"context",tabsMode:b,children:e("h2",{className:"text-xs font-medium text-ink tracking-tight truncate",children:t.sessionTitle})}),e("span",{className:"text-[11px] text-ink/50 truncate font-mono",children:t.timestamp})]}),right:e(nt,{label:"Refresh context telemetry",onClick:()=>{g.refresh(),C()},busy:g.refreshing,disabled:!r})}),e("div",{className:"flex-1 scrollbar-overlay-container p-4 space-y-4",children:[e(J,{used:t.contextUsed,limit:t.contextLimit,percent:t.contextPercent}),e(V,{messagesCount:t.messagesCount,userCount:t.userCount,assistantCount:t.assistantCount,costFormatted:t.costFormatted,cacheHitAverage:t.cacheHitAverage,costBreakdown:t.costBreakdown}),e(z,{input:t.lastMessage.input,output:t.lastMessage.output,reasoning:t.lastMessage.reasoning,cacheRead:t.lastMessage.cacheRead,cacheWrite:t.lastMessage.cacheWrite,cacheHitPercent:t.lastMessage.cacheHitPercent}),e(Q,{userPercent:t.distribution.userPercent,assistantPercent:t.distribution.assistantPercent,toolPercent:t.distribution.toolPercent,otherPercent:t.distribution.otherPercent}),e(X,{sessionId:m,refreshKey:c+I})]})]})}export{mt as ContextPanel};
|
|
1
|
+
import{d,n,o,i,u,a,ue,e,s,f,E,ce,Qo,ae,pe,h,Em,Te,T,xt,so,nt,he,Re,Sh,Ei}from"./index-8w69r0c4.js";var se={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]},F=s(se);function O(l,r,c=1e6){return{sessionId:l,sessionTitle:r,modelId:"",modelName:"",timestamp:"",contextUsed:0,contextLimit:c,contextPercent:0,messagesCount:0,userCount:0,assistantCount:0,totalCost:0,costFormatted:"$0.00",cacheHitAverage:0,costBreakdown:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},lastMessage:{input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,cacheHitPercent:0},distribution:{userTokens:0,userPercent:0,assistantTokens:0,assistantPercent:0,toolTokens:0,toolPercent:0,otherTokens:0,otherPercent:100},rawMessages:[]}}function J({used:l,limit:r,percent:c}){let b=l.toLocaleString(),x=r.toLocaleString(),m=Math.min(100,Math.max(0,c));return e("div",{className:"bg-canvas border border-ink/10 rounded-xl p-4 transition-all",children:[e("div",{className:"flex items-center justify-between text-xs mb-2",children:[e("span",{className:"font-semibold text-ink/80",children:"Context"}),e("span",{className:"font-mono text-ink/70 text-[11px]",children:[b," / ",x]})]}),e("div",{className:"w-full h-1.5 bg-ink/10 rounded-full overflow-hidden mb-2",children:e("div",{className:"h-full bg-ink/70 rounded-full transition-all duration-500 ease-out",style:{width:`${m}%`}})}),e("div",{className:"text-[11px] font-mono text-ink/50 text-left",children:[m.toFixed(1),"% used"]})]})}function L(l){return l<0.01?"$0.01":`$${l.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`}function Z({open:l,onClose:r,breakdown:c,costFormatted:b}){let x=i(null);if(he(x,r),!l)return null;let m=c?[{label:"Total Cost",value:L(c.total),strong:!0},{label:"Input (cache miss)",value:L(c.input)},{label:"Output",value:L(c.output)},{label:"Cache Read (cache hit)",value:L(c.cacheRead)},{label:"Cache Write",value:L(c.cacheWrite)}]:[{label:"Total Cost",value:b??"$0.01",strong:!0}];return e("div",{ref:x,className:"glass-popover absolute top-full right-0 mt-1.5 z-50 w-64 bg-paper border border-ink/10 rounded-lg shadow-lg p-3",role:"dialog","aria-modal":"false",children:[e("div",{className:"flex items-center justify-between mb-2.5",children:[e("span",{className:"text-xs font-semibold text-ink tracking-tight",children:"Cost Breakdown"}),e("button",{type:"button",onClick:r,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink transition-colors","aria-label":"Close cost breakdown",children:e(h,{size:14})})]}),e("div",{className:"space-y-1.5",children:m.map((t)=>e("div",{className:"flex items-center justify-between text-[11px] font-mono border-b border-ink/5 last:border-0 pb-1.5 last:pb-0",children:[e("span",{className:"text-ink/60",children:t.label}),e("span",{className:`${t.strong?"font-semibold text-ink":"text-ink/80"}`,children:t.value})]},t.label))})]})}function V({messagesCount:l,userCount:r,assistantCount:c,costFormatted:b,cacheHitAverage:x,costBreakdown:m}){let[t,v]=n(!1);return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Session Stats"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(Re,{variant:"compact",label:"Messages",value:l}),e(Re,{variant:"compact",label:"User",value:r}),e(Re,{variant:"compact",label:"Assistant",value:c}),e(Re,{variant:"compact",label:"Cache Hit",value:x!==void 0?`${x.toFixed(1)}%`:"–"}),e("div",{className:"relative bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[e("span",{className:"text-[10px] font-medium text-ink/50 flex items-center gap-1",children:["Cost",e("button",{type:"button",onClick:()=>v(!0),className:"p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors","aria-label":"Show cost breakdown",title:"Cost breakdown",children:e(pe,{size:11})})]}),e("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:b}),e(Z,{open:t,onClose:()=>v(!1),breakdown:m,costFormatted:b})]})]})]})}function z({input:l,output:r,reasoning:c,cacheRead:b,cacheWrite:x,cacheHitPercent:m}){return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Last Assistant Message"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(Re,{variant:"compact",label:"In",value:l.toLocaleString()}),e(Re,{variant:"compact",label:"Out",value:r.toLocaleString()}),e(Re,{variant:"compact",label:"Reason",value:c.toLocaleString()}),e(Re,{variant:"compact",label:"Cache",value:`${b.toLocaleString()}/${x.toLocaleString()}`}),e(Re,{variant:"compact",label:"Hit",value:`${m.toFixed(1)}%`})]})]})}function Q({userPercent:l,assistantPercent:r,toolPercent:c,otherPercent:b}){return e("div",{className:"space-y-2.5",children:[e("div",{className:"w-full h-1.5 rounded-full overflow-hidden flex bg-ink/10",children:[e("div",{className:"h-full bg-emerald-500 transition-all duration-300",style:{width:`${l}%`},title:`User: ${l}%`}),e("div",{className:"h-full bg-sky-500 transition-all duration-300",style:{width:`${r}%`},title:`Assistant: ${r}%`}),e("div",{className:"h-full bg-amber-500 transition-all duration-300",style:{width:`${c}%`},title:`Tool Calls: ${c}%`}),e("div",{className:"h-full bg-slate-400 transition-all duration-300",style:{width:`${b}%`},title:`Other: ${b}%`})]}),e("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-ink/70",children:[e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-emerald-500 flex-shrink-0"}),e("span",{children:["User ",l,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"}),e("span",{children:["Assistant ",r,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-amber-500 flex-shrink-0"}),e("span",{children:["Tool Calls ",c,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-slate-400 flex-shrink-0"}),e("span",{children:["Other ",b,"%"]})]})]})]})}function G({data:l}){Ei();let[r,c]=n(!1),b=i(null),x=i(null),m=JSON.stringify(l,null,2),t=Sh(m),v=a((C)=>{let g=x.current;if(!g)return;g.scrollLeft=C.currentTarget.scrollLeft,g.scrollTop=C.currentTarget.scrollTop},[]),y=a(async(C)=>{C.stopPropagation();try{await navigator.clipboard.writeText(m)}catch{let g=document.createElement("textarea");g.value=m,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}c(!0),setTimeout(()=>c(!1),2000)},[m]);return e("div",{className:"relative my-1.5 rounded-lg bg-paper/80 border border-ink/10 overflow-hidden",children:[e("div",{className:"flex items-center justify-between px-2.5 py-1.5 bg-ink/[0.04] border-b border-ink/10",children:[e("span",{className:"text-[10px] font-mono text-ink/50 select-none",children:[Object.keys(l).length," keys · ",m.length," chars"]}),e("button",{type:"button",onClick:y,className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas hover:bg-paper text-ink/70 hover:text-ink border border-ink/10 text-[10px] transition-colors shadow-xs",title:"Copy Pretty JSON",children:r?e(d,{children:[e(f,{size:11,className:"text-success"}),e("span",{className:"text-success font-sans font-medium",children:"Copied"})]}):e(d,{children:[e(ae,{size:11}),e("span",{className:"font-sans",children:"Copy JSON"})]})})]}),e("div",{className:"relative",children:[e("pre",{ref:x,"aria-hidden":!0,className:"absolute inset-0 p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre pointer-events-none",dangerouslySetInnerHTML:{__html:t}}),e("pre",{ref:b,onScroll:v,className:"relative p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre select-text selection:bg-ink selection:text-canvas",children:e("code",{className:"text-transparent",children:m})})]})]})}var j=["bg-emerald-500","bg-sky-500","bg-amber-500","bg-violet-500","bg-rose-500","bg-teal-500","bg-indigo-500","bg-fuchsia-500","bg-lime-500","bg-cyan-500","bg-orange-500","bg-pink-500","bg-yellow-500","bg-purple-500","bg-red-500","bg-blue-500","bg-green-500","bg-cyan-600","bg-violet-600","bg-amber-600"],_=20;function K(l){let r=0;for(let c=0;c<l.length;c++)r=r*31+l.charCodeAt(c)|0;return Math.abs(r)}function q(l){let r=l.indexOf("/"),c=r>0?l.slice(0,r):l,b=r>0?l.slice(r+1):"";return b?`${c} · ${b}`:c}function Y(l,r){if(r<=7)return Array.from({length:r},(t,v)=>v+1);let c=new Set([1,r,l,l-1,l+1]);if(l<=3)[2,3,4].forEach((t)=>c.add(t));if(l>=r-2)[r-3,r-2,r-1].forEach((t)=>c.add(t));let b=[...c].filter((t)=>t>=1&&t<=r).sort((t,v)=>t-v),x=[],m=0;for(let t of b){if(t-m>1)x.push("…");x.push(t),m=t}return x}function X({sessionId:l,refreshKey:r=0}){let[c,b]=T("context.rawExpandedIds",{}),[x,m]=T("context.rawFilterRole","all"),[t,v]=n(1),[y,C]=n([]),[g,I]=n(0),[W,S]=n(!1),w=i(0),U=i(!1),B=a((p)=>{if(typeof window>"u")return;let k=++w.current;if(!p?.silent)S(!0);let P=new URLSearchParams({page:String(t),pageSize:String(_),role:x});if(l)P.set("sessionId",l);fetch(`/api/telemetry/raw-messages?${P.toString()}`).then((N)=>N.ok?N.json():null).then((N)=>{if(U.current||k!==w.current)return;C(N&&Array.isArray(N.items)?N.items:[]),I(N&&Number.isFinite(N.filteredTotal)?N.filteredTotal:0)}).catch(()=>{if(U.current||k!==w.current)return;C([]),I(0)}).finally(()=>{if(!p?.silent&&k===w.current)S(!1)})},[l,t,x]);o(()=>(U.current=!1,B(),()=>{U.current=!0}),[B,r]);let R=Math.max(1,Math.ceil(g/_)),M=Math.min(t,R),D=(p)=>v(Math.min(Math.max(1,p),R)),ee=(p)=>{b((k)=>({...k,[p]:!k[p]}))},te=()=>{if(y.every((k)=>c[k.id]))b({});else{let k={};y.forEach((P)=>{k[P.id]=!0}),b(k)}},H=u(()=>{let p=[];for(let k of y){let P=k.info.modelID;if(!P||p.includes(P))continue;p.push(P)}return p},[y]),A=(p)=>p?j[K(p)%j.length]:"bg-ink/20";return e("div",{className:"space-y-3",children:[H.length>0&&e("div",{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Legend"})}),e("div",{className:"bg-canvas border border-ink/10 rounded-xl px-3 py-2",children:e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] font-mono text-ink/60",children:H.map((p)=>e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${A(p)}`}),e("span",{children:q(p)})]},p))})})]}),e("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-2",children:[e("span",{className:"text-xs font-semibold text-ink/80",children:"Raw Messages"}),e("span",{className:"text-[10px] font-mono text-ink/50 bg-ink/5 px-1.5 py-0.5 rounded-full border border-ink/10",children:g})]}),e("div",{className:"flex items-center space-x-1",children:[e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-lg p-0.5 text-[10px]",children:[e("button",{type:"button",onClick:()=>{m("all"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="all"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"All"}),e("button",{type:"button",onClick:()=>{m("assistant"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="assistant"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"AI"}),e("button",{type:"button",onClick:()=>{m("user"),v(1)},className:`px-1.5 py-0.5 rounded ${x==="user"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"User"})]}),e("button",{type:"button",onClick:te,className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors text-[10px] flex items-center",title:"Expand / Collapse All",children:e(F,{size:14})})]})]}),e("div",{className:"space-y-1.5",children:!W&&y.length===0?e("div",{className:"p-4 text-center text-xs text-ink/40 italic bg-canvas rounded-xl border border-ink/10",children:"No raw messages recorded yet."}):y.map((p)=>{let k=Boolean(c[p.id]);return e("div",{className:`bg-canvas border border-ink/10 rounded-xl overflow-hidden transition-all duration-200 ${W?"opacity-50":""}`,children:[e("button",{type:"button",onClick:()=>ee(p.id),className:"w-full text-left px-3.5 py-2.5 flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer",children:[e("div",{className:"flex items-center space-x-2 min-w-0 flex-1 mr-2",children:[e("span",{className:"text-ink/40 flex-shrink-0",children:k?e(E,{size:14}):e(ce,{size:14})}),e("span",{className:"text-xs font-mono text-ink/90 truncate",children:p.badgeLabel})]}),e("div",{className:"flex items-center space-x-3 text-[11px] font-mono text-ink/50 flex-shrink-0",children:[p.tokenSummary&&e("span",{className:"text-ink/60",children:p.tokenSummary}),e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${A(p.info.modelID)}`}),e("span",{children:p.timestamp})]})]})]}),k&&e("div",{className:"px-3.5 pb-3 pt-1 border-t border-ink/5 bg-canvas/60",children:e(G,{data:p.rawPayload})})]},p.id)})}),R>1&&e("div",{className:"flex items-center justify-between pt-1",children:[e("span",{className:"text-[10px] font-mono text-ink/50",children:[(M-1)*_+1,"–",Math.min(M*_,g)," of ",g]}),e("div",{className:"flex items-center gap-0.5",children:[e("button",{type:"button",disabled:M<=1,onClick:()=>D(M-1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Previous page",children:e(Qo,{size:14})}),Y(M,R).map((p,k)=>p==="…"?e("span",{className:"px-1 text-[10px] font-mono text-ink/40 select-none",children:"…"},`gap-${k}`):e("button",{type:"button",onClick:()=>D(p),className:`min-w-[22px] h-[22px] px-1 rounded text-[10px] font-mono transition-colors ${p===M?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink hover:bg-ink/5"}`,children:p},p)),e("button",{type:"button",disabled:M>=R,onClick:()=>D(M+1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Next page",children:e(ce,{size:14})})]})]})]})}function mt({className:l="",enabled:r=!0,refreshKey:c=0,tabsMode:b=!1}){let[x]=ue(),m=x.get("sessionId"),[t,v]=n(()=>O(m||"default","Session not started")),y=i(!1),C=a(()=>{if(typeof window>"u")return;let S=m?`?sessionId=${encodeURIComponent(m)}`:"";fetch(`/api/telemetry/context${S}`).then((w)=>w.ok?w.json():null).then((w)=>{if(!y.current&&w&&w.telemetry)v(w.telemetry)}).catch((w)=>{if(!y.current)console.warn("Failed to fetch context telemetry:",w)})},[m]);o(()=>{if(y.current=!1,!r)return;return C(),()=>{y.current=!0}},[r,c,C]);let g=Te(m?Em(m):null,{enabled:r}),[I,W]=n(0);if(o(()=>{if(g.data)v(g.data),W((S)=>S+1)},[g.data]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});if(t.messagesCount===0)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono",children:"Session not started"})});return e("div",{className:`flex flex-col h-full bg-paper text-ink overflow-hidden select-none ${l}`,children:[e(xt,{left:e(d,{children:[e(so,{id:"context",tabsMode:b,children:e("h2",{className:"text-xs font-medium text-ink tracking-tight truncate",children:t.sessionTitle})}),e("span",{className:"text-[11px] text-ink/50 truncate font-mono",children:t.timestamp})]}),right:e(nt,{label:"Refresh context telemetry",onClick:()=>{g.refresh(),C()},busy:g.refreshing,disabled:!r})}),e("div",{className:"flex-1 scrollbar-overlay-container p-4 space-y-4",children:[e(J,{used:t.contextUsed,limit:t.contextLimit,percent:t.contextPercent}),e(V,{messagesCount:t.messagesCount,userCount:t.userCount,assistantCount:t.assistantCount,costFormatted:t.costFormatted,cacheHitAverage:t.cacheHitAverage,costBreakdown:t.costBreakdown}),e(z,{input:t.lastMessage.input,output:t.lastMessage.output,reasoning:t.lastMessage.reasoning,cacheRead:t.lastMessage.cacheRead,cacheWrite:t.lastMessage.cacheWrite,cacheHitPercent:t.lastMessage.cacheHitPercent}),e(Q,{userPercent:t.distribution.userPercent,assistantPercent:t.distribution.assistantPercent,toolPercent:t.distribution.toolPercent,otherPercent:t.distribution.otherPercent}),e(X,{sessionId:m,refreshKey:c+I})]})]})}export{mt as ContextPanel};
|