@vantran-se/openchamber-web 1.24.3 → 1.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/assets/{CodeMirrorCommentWidgets-BjJHrzmU.js → CodeMirrorCommentWidgets-B4a0JkUz.js} +1 -1
  2. package/dist/assets/{DiffView-COVQhWGd.js → DiffView-B2CD9wC8.js} +1 -1
  3. package/dist/assets/{FilesView-B1V5JxFX.js → FilesView-C4vMFclc.js} +1 -1
  4. package/dist/assets/{GitView-CDOJy5Ay.js → GitView-Byu2DY7s.js} +1 -1
  5. package/dist/assets/{GuestAttachDialog-D3S0Rjic.js → GuestAttachDialog-B808E0-d.js} +1 -1
  6. package/dist/assets/{JsonTreeView-D0C9nU7K.js → JsonTreeView-VW_7czo3.js} +1 -1
  7. package/dist/assets/{LinearIssuesView-D7FKg1XJ.js → LinearIssuesView-EzGNCGrd.js} +1 -1
  8. package/dist/assets/{MarkdownImageGallery-BrFjAVEf.js → MarkdownImageGallery-B2YUDFaB.js} +1 -1
  9. package/dist/assets/{MarkdownRendererImpl-DWepTafh.js → MarkdownRendererImpl-B4ikIzR3.js} +1 -1
  10. package/dist/assets/{OnboardingScreen-Dyxxiqdt.js → OnboardingScreen-CQHBSTEi.js} +1 -1
  11. package/dist/assets/{PatchDiff-DnEhjXcC.js → PatchDiff-DCjGhlYV.js} +1 -1
  12. package/dist/assets/{PierreDiffViewer-DyxZVVVR.js → PierreDiffViewer-CEDZNkU2.js} +1 -1
  13. package/dist/assets/{PlanView-LW2z_EAP.js → PlanView-D3x-pTkZ.js} +1 -1
  14. package/dist/assets/{PluginPane-B4tKno2h.js → PluginPane-DEcgDQ9h.js} +1 -1
  15. package/dist/assets/{SettingsView-DEaMulN9.js → SettingsView-CSinuH-1.js} +1 -1
  16. package/dist/assets/{SettingsWindow-FLDJXOgQ.js → SettingsWindow-B5CHoJFZ.js} +1 -1
  17. package/dist/assets/{SubmoduleDiffSummary-CvVwD-Vi.js → SubmoduleDiffSummary-oxeACCWs.js} +1 -1
  18. package/dist/assets/{ToolOutputDialog-BiP0x2Rw.js → ToolOutputDialog-tLNWmfcW.js} +1 -1
  19. package/dist/assets/{ToolPartDiffPreview-CkR4msKP.js → ToolPartDiffPreview-CflzmK-x.js} +1 -1
  20. package/dist/assets/{VirtualizedFileDiff-0pyr_mHY.js → VirtualizedFileDiff-NU0FHFhT.js} +1 -1
  21. package/dist/assets/{WalkthroughView-yNj4nOP5.js → WalkthroughView-BZyjhqHv.js} +1 -1
  22. package/dist/assets/{appThemeRegistry-BuUKhbYQ.js → appThemeRegistry-DLicw4dH.js} +1 -1
  23. package/dist/assets/{commitAndPush-DvJKa3Ks.js → commitAndPush-BDftrjr6.js} +1 -1
  24. package/dist/assets/{computeVirtualFileMetrics-DxTBMuu-.js → computeVirtualFileMetrics-DlWlEM3x.js} +1 -1
  25. package/dist/assets/{de-DgxgFyGG.js → de-Bro6_zyl.js} +1 -1
  26. package/dist/assets/{es-BFsZj5F_.js → es-Bb9XQZvd.js} +1 -1
  27. package/dist/assets/{fr-jdZ5KKQi.js → fr-Dgfzn-IL.js} +1 -1
  28. package/dist/assets/{index-CKHjPKbq.js → index-CtQNmqUL.js} +1 -1
  29. package/dist/assets/{index-Cbci4i1W.js → index-Dqc6USl3.js} +1 -1
  30. package/dist/assets/{isDiffPlainText-D7FkBMP6.js → isDiffPlainText-CO4e5J_S.js} +1 -1
  31. package/dist/assets/{isFilePlainText-CL2vsrIZ.js → isFilePlainText-ue6kCou7.js} +1 -1
  32. package/dist/assets/{ja-C5kKrhO4.js → ja-BYsakGFh.js} +1 -1
  33. package/dist/assets/{ko-DXDTT_0O.js → ko-BSaQz9aN.js} +1 -1
  34. package/dist/assets/{main-CgXMBNvG.js → main-B62_pjL5.js} +2 -2
  35. package/dist/assets/{main-CZALtVek.js → main-BEdcOI2P.js} +4 -4
  36. package/dist/assets/{markdownCore-Dh7WEsdM.js → markdownCore-CK48LG0z.js} +1 -1
  37. package/dist/assets/{miniChat-CwTmDixi.js → miniChat-LT8Rqofr.js} +2 -2
  38. package/dist/assets/{mobile-CLf2vCtO.js → mobile-CqarEynh.js} +2 -2
  39. package/dist/assets/{patchFileDiff-Bsba8KFp.js → patchFileDiff-D7QVlovD.js} +1 -1
  40. package/dist/assets/{pl-D-7x4Y8Q.js → pl-OIviPdoj.js} +1 -1
  41. package/dist/assets/{pt-BR-CSBZrHa8.js → pt-BR-Cltg-E6s.js} +1 -1
  42. package/dist/assets/{renderElectronMiniChatApp-C5gAFBk0.js → renderElectronMiniChatApp-COyLTtZx.js} +2 -2
  43. package/dist/assets/{renderMobileApp-V4hYd32H.js → renderMobileApp-BC1MHg6g.js} +3 -3
  44. package/dist/assets/{runtimeEndpointReset-DhlHCn-2.js → runtimeEndpointReset-DdrazOVH.js} +3 -3
  45. package/dist/assets/{scheduledTasksApi-DzjbLd8P.js → scheduledTasksApi-B2SWMGEU.js} +1 -1
  46. package/dist/assets/{shikiHighlight-8_3csmr6.js → shikiHighlight-BPu3JiQs.js} +1 -1
  47. package/dist/assets/{textMateThemeFromAppTheme-CHo2fCgW.js → textMateThemeFromAppTheme-DWqRPo9A.js} +1 -1
  48. package/dist/assets/{tr-Dr-oJ22L.js → tr-CQI-KPre.js} +1 -1
  49. package/dist/assets/{uk-9Nx83UcI.js → uk-CqW7R4DA.js} +1 -1
  50. package/dist/assets/{useAppFontEffects-khZXpFL_.js → useAppFontEffects-ne84JBVL.js} +9 -9
  51. package/dist/assets/{useInlineCommentController-DkQ_gqpn.js → useInlineCommentController-CgS0fnw_.js} +1 -1
  52. package/dist/assets/{useRootScrollLock-DdvHf9Pt.js → useRootScrollLock-Cpf1qoGp.js} +2 -2
  53. package/dist/assets/{vendor-codemirror-language-data-CdzUmUyZ.js → vendor-codemirror-language-data-Bx2EHc1O.js} +2 -2
  54. package/dist/assets/{web-components-B8IcVQAA.js → web-components-DxX8bZ1o.js} +1 -1
  55. package/dist/assets/{zh-CN-Bxy_Hj3r.js → zh-CN-CVZG_o_J.js} +1 -1
  56. package/dist/assets/{zh-TW-0BB4gpHM.js → zh-TW-D5ZxzCZp.js} +1 -1
  57. package/dist/index.html +2 -2
  58. package/dist/mini-chat.html +2 -2
  59. package/dist/mobile.html +2 -2
  60. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- import{f as he,r as re,j as s,R as ue}from"./vendor-react-BUCujlKS.js";import{f as xe,h as ce,cp as Se,B as _e,I as ae,cf as Le,ce as je,bg as De,bZ as Ne,cI as Re,z as pe,af as Ie,cd as de,ih as Te,ii as ve,t as Ee,fZ as Me}from"./useAppFontEffects-khZXpFL_.js";import{a as ke}from"./index-Cbci4i1W.js";const Ce="inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-interactive-hover hover:text-foreground";function Xe(t){const e=he.c(61),{draft:i,onEdit:b,onDelete:f,className:E,maxWidth:O}=t,{t:n}=xe(),[N,W]=re.useState(!1),M=i.text;let U;e[0]!==M?(U=M.length>150||M.split(`
1
+ import{f as he,r as re,j as s,R as ue}from"./vendor-react-BUCujlKS.js";import{f as xe,h as ce,cp as Se,B as _e,I as ae,cf as Le,ce as je,bg as De,bZ as Ne,cI as Re,z as pe,af as Ie,cd as de,ih as Te,ii as ve,t as Ee,fZ as Me}from"./useAppFontEffects-ne84JBVL.js";import{a as ke}from"./index-Dqc6USl3.js";const Ce="inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-interactive-hover hover:text-foreground";function Xe(t){const e=he.c(61),{draft:i,onEdit:b,onDelete:f,className:E,maxWidth:O}=t,{t:n}=xe(),[N,W]=re.useState(!1),M=i.text;let U;e[0]!==M?(U=M.length>150||M.split(`
2
2
  `).length>3,e[0]=M,e[1]=U):U=e[1];const m=U;let c;e[2]!==E?(c=ce("w-full max-w-[min(100%,calc(var(--oc-context-panel-width,100vw)-var(--oc-editor-gutter-width,0px)))] overflow-hidden rounded-xl border border-[var(--interactive-border)] bg-[var(--surface-elevated)] shadow-none",E),e[2]=E,e[3]=c):c=e[3];const d=O?`${Math.max(200,Math.floor(O))}px`:void 0;let k;e[4]!==d?(k={maxWidth:d},e[4]=d,e[5]=k):k=e[5];let z;e[6]===Symbol.for("react.memo_cache_sentinel")?(z={backgroundColor:"color-mix(in srgb, var(--surface-muted-foreground) 8%, transparent)"},e[6]=z):z=e[6];let C;e[7]!==i.fileLabel?(C=s.jsx("span",{className:"min-w-0 max-w-[200px] truncate text-xs font-medium text-foreground",title:i.fileLabel,children:i.fileLabel}),e[7]=i.fileLabel,e[8]=C):C=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("span",{className:"text-xs text-muted-foreground",children:"•"}),e[9]=w):w=e[9];let u;e[10]!==i.endLine||e[11]!==i.startLine||e[12]!==n?(u=n("inlineComment.range.lines",{start:i.startLine,end:i.endLine}),e[10]=i.endLine,e[11]=i.startLine,e[12]=n,e[13]=u):u=e[13];const B=i.side?` (${i.side})`:"";let a;e[14]!==u||e[15]!==B?(a=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-muted-foreground",children:[u,B]}),e[14]=u,e[15]=B,e[16]=a):a=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R={minHeight:0,minWidth:0},e[17]=R):R=e[17];let x;e[18]!==n?(x=n("inlineComment.actions.editComment"),e[18]=n,e[19]=x):x=e[19];let g;e[20]!==n?(g=n("inlineComment.actions.editComment"),e[20]=n,e[21]=g):g=e[21];let I;e[22]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ae,{name:"pencil",className:"h-3 w-3"}),e[22]=I):I=e[22];let l;e[23]!==b||e[24]!==x||e[25]!==g?(l=s.jsx("button",{type:"button",className:Ce,style:R,onClick:b,"aria-label":x,title:g,children:I}),e[23]=b,e[24]=x,e[25]=g,e[26]=l):l=e[26];let j;e[27]===Symbol.for("react.memo_cache_sentinel")?(j={minHeight:0,minWidth:0},e[27]=j):j=e[27];let p;e[28]!==n?(p=n("inlineComment.actions.deleteComment"),e[28]=n,e[29]=p):p=e[29];let v;e[30]!==n?(v=n("inlineComment.actions.deleteComment"),e[30]=n,e[31]=v):v=e[31];let $;e[32]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ae,{name:"close",className:"h-3 w-3"}),e[32]=$):$=e[32];let S;e[33]!==f||e[34]!==p||e[35]!==v?(S=s.jsx("button",{type:"button",className:Ce,style:j,onClick:f,"aria-label":p,title:v,children:$}),e[33]=f,e[34]=p,e[35]=v,e[36]=S):S=e[36];let D;e[37]!==a||e[38]!==l||e[39]!==S||e[40]!==C?(D=s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5",style:z,children:[C,w,a,l,S]}),e[37]=a,e[38]=l,e[39]=S,e[40]=C,e[41]=D):D=e[41];const _=N||!m,K=!N&&m&&"line-clamp-3";let h;e[42]!==K?(h=ce("whitespace-pre-wrap break-words text-sm leading-relaxed text-foreground",K),e[42]=K,e[43]=h):h=e[43];let Y;e[44]!==M||e[45]!==h?(Y=s.jsx("div",{className:h,children:M}),e[44]=M,e[45]=h,e[46]=Y):Y=e[46];let L;e[47]!==m||e[48]!==N||e[49]!==n?(L=m&&s.jsx(Se,{asChild:!0,children:s.jsx(_e,{variant:"ghost",size:"sm",className:"mt-1 h-6 w-full justify-start px-0 text-xs text-muted-foreground hover:text-foreground",children:N?s.jsxs(s.Fragment,{children:[s.jsx(ae,{name:"arrow-up-s",className:"mr-1 size-3"}),n("inlineComment.actions.showLess")]}):s.jsxs(s.Fragment,{children:[s.jsx(ae,{name:"arrow-down-s",className:"mr-1 size-3"}),n("inlineComment.actions.showMore")]})})}),e[47]=m,e[48]=N,e[49]=n,e[50]=L):L=e[50];let F;e[51]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Le,{}),e[51]=F):F=e[51];let T;e[52]!==_||e[53]!==Y||e[54]!==L?(T=s.jsx("div",{className:"px-3 py-2",children:s.jsxs(je,{open:_,onOpenChange:W,children:[Y,L,F]})}),e[52]=_,e[53]=Y,e[54]=L,e[55]=T):T=e[55];let P;return e[56]!==c||e[57]!==D||e[58]!==T||e[59]!==k?(P=s.jsxs("div",{className:c,style:k,"data-comment-card":"true",children:[D,T]}),e[56]=c,e[57]=D,e[58]=T,e[59]=k,e[60]=P):P=e[60],P}function Ge(t){const e=he.c(62),{initialText:i,onTextChange:b,onSave:f,onCancel:E,fileLabel:O,lineRange:n,isEditing:N,className:W,maxWidth:M}=t,U=i===void 0?"":i,{t:m}=xe(),{isMobile:c}=De(),[d,k]=ue.useState(U),z=re.useRef(null),C=Ne("enter");let w,u;e[0]!==b?(w=o=>{k(o),b?.(o),u()},u=()=>{const o=z.current;o&&(o.style.height="auto",o.style.height=`${Math.min(o.scrollHeight,120)}px`)},e[0]=b,e[1]=w,e[2]=u):(w=e[1],u=e[2]);const B=re.useRef(n);let a,R;e[3]!==n?(a=()=>{n&&(B.current=n)},R=[n],e[3]=n,e[4]=a,e[5]=R):(a=e[4],R=e[5]),re.useEffect(a,R);const x=Pe,g=x(n);let I;e[6]!==c||e[7]!==u?(I=()=>{const o=z.current;if(!o)return;u();const ie=o.closest(".overlay-scrollbar-container"),ge=ie?.scrollTop??window.scrollY,ye=ie?.scrollLeft??window.scrollX;if(c){o.scrollIntoView({behavior:"auto",block:"nearest"});try{o.focus({preventScroll:!0})}catch{o.focus()}return}try{o.focus({preventScroll:!0})}catch{o.focus()}const be=o.value.length;try{o.setSelectionRange(be,be)}catch{}requestAnimationFrame(()=>{ie?(ie.scrollTop=ge,ie.scrollLeft=ye):window.scrollTo({top:ge,left:ye})})},e[6]=c,e[7]=u,e[8]=I):I=e[8];let l;e[9]!==c?(l=[c],e[9]=c,e[10]=l):l=e[10],re.useEffect(I,l);let j;e[11]!==f||e[12]!==d?(j=()=>{d.trim()&&f(d,x(B.current))},e[11]=f,e[12]=d,e[13]=j):j=e[13];const p=j;let v;e[14]!==c||e[15]!==E||e[16]!==p?(v=o=>{Re(o)||(o.key==="Enter"&&!o.shiftKey&&(!c||o.metaKey||o.ctrlKey)?(o.preventDefault(),p()):o.key==="Escape"&&(o.preventDefault(),E()))},e[14]=c,e[15]=E,e[16]=p,e[17]=v):v=e[17];const $=v;let S;e[18]!==p?(S=o=>{o.stopPropagation(),p()},e[18]=p,e[19]=S):S=e[19];const D=S;let _;e[20]!==W?(_=ce("w-full max-w-[min(100%,calc(var(--oc-context-panel-width,100vw)-var(--oc-editor-gutter-width,0px)))] animate-in fade-in zoom-in-95 duration-200",W),e[20]=W,e[21]=_):_=e[21];const K=M?`${Math.max(200,Math.floor(M))}px`:void 0;let h;e[22]!==K?(h={maxWidth:K},e[22]=K,e[23]=h):h=e[23];const Y="true",L=Fe,F=Ke,T="oc-glass-popover rounded-xl border border-[var(--interactive-border)] shadow-[0_4px_16px_-4px_rgb(0_0_0_/_0.12)]",P=O||g?s.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2 text-xs font-medium text-muted-foreground opacity-60",children:[O?s.jsx("span",{className:"max-w-[200px] truncate",children:O}):null,O&&g?s.jsx("span",{children:"•"}):null,g?s.jsx("span",{children:m("inlineComment.range.lines",{start:g.start,end:g.end})}):null]}):null,X="flex items-end gap-2 py-1 pl-3 pr-1",oe=1;let H;e[24]!==w?(H=o=>w(o.target.value),e[24]=w,e[25]=H):H=e[25];const r=c?m("inlineComment.input.placeholderShort"):m("inlineComment.input.placeholder",{shortcut:C}),y=c?"py-1.5 text-base leading-6":"py-1.5";let A;e[26]!==y?(A=ce("min-w-0 flex-1 resize-none bg-transparent text-sm leading-5 text-foreground outline-none placeholder:text-muted-foreground placeholder:opacity-60",y),e[26]=y,e[27]=A):A=e[27];let V;e[28]===Symbol.for("react.memo_cache_sentinel")?(V={minHeight:0,height:"auto"},e[28]=V):V=e[28];let Z;e[29]!==$||e[30]!==H||e[31]!==r||e[32]!==A||e[33]!==d?(Z=s.jsx("textarea",{ref:z,rows:oe,value:d,onChange:H,onKeyDown:$,placeholder:r,className:A,style:V}),e[29]=$,e[30]=H,e[31]=r,e[32]=A,e[33]=d,e[34]=Z):Z=e[34];let q;e[35]!==d?(q=d.trim(),e[35]=d,e[36]=q):q=e[36];const G=!q,le=c?"h-9 w-9":"h-8 w-8";let J;e[37]!==le?(J=ce("mb-0.5 flex shrink-0 items-center justify-center rounded-full bg-[var(--primary-base)] text-[var(--primary-foreground)] transition-opacity duration-150 hover:opacity-90 disabled:opacity-40",le),e[37]=le,e[38]=J):J=e[38];let Q;e[39]!==m?(Q=m("inlineComment.actions.comment"),e[39]=m,e[40]=Q):Q=e[40];let ee;e[41]!==m?(ee=m("inlineComment.actions.comment"),e[41]=m,e[42]=ee):ee=e[42];let me;e[43]===Symbol.for("react.memo_cache_sentinel")?(me=s.jsx(ae,{name:"attachment-2",className:"h-4 w-4"}),e[43]=me):me=e[43];let te;e[44]!==D||e[45]!==G||e[46]!==J||e[47]!==Q||e[48]!==ee?(te=s.jsx("button",{type:"button",onClick:D,onPointerDown:$e,onTouchStart:ze,disabled:G,className:J,"aria-label":Q,title:ee,children:me}),e[44]=D,e[45]=G,e[46]=J,e[47]=Q,e[48]=ee,e[49]=te):te=e[49];let ne;e[50]!==Z||e[51]!==te?(ne=s.jsxs("div",{className:X,children:[Z,te]}),e[50]=Z,e[51]=te,e[52]=ne):ne=e[52];let se;e[53]!==P||e[54]!==ne?(se=s.jsxs("div",{className:T,children:[P,ne]}),e[53]=P,e[54]=ne,e[55]=se):se=e[55];let fe;return e[56]!==_||e[57]!==h||e[58]!==L||e[59]!==F||e[60]!==se?(fe=s.jsx("div",{className:_,style:h,"data-comment-input":Y,onPointerDown:L,onTouchStart:F,children:se}),e[56]=_,e[57]=h,e[58]=L,e[59]=F,e[60]=se,e[61]=fe):fe=e[61],fe}function ze(t){return t.stopPropagation()}function $e(t){return t.stopPropagation()}function Ke(t){return t.stopPropagation()}function Fe(t){return t.stopPropagation()}function Pe(t){if(!t)return;const e=Math.min(t.start,t.end),i=Math.max(t.start,t.end);return{...t,start:e,end:i}}const Ae=t=>{const e=Math.min(t.startLine,t.endLine),i=Math.max(t.startLine,t.endLine);return{...t,startLine:e,endLine:i}},we=t=>{const e=Math.min(t.start,t.end),i=Math.max(t.start,t.end);return{...t,start:e,end:i}};function Je(t){const e=he.c(47),{t:i}=xe(),{source:b,fileLabel:f,language:E,getCodeForRange:O,toStoreRange:n,fromDraftRange:N}=t,W=pe(Be),M=pe(qe),U=Ie();let m;e[0]!==W?(m=r=>W?r.getDirectoryForSession(W):null,e[0]=W,e[1]=m):m=e[1];const c=pe(m),d=de(He),k=de(We),z=de(Oe),[C,w]=ue.useState(null),[u,B]=ue.useState(""),[a,R]=ue.useState(null),x=W??(M?"draft":null),g=c??U;let I;e:{if(!x||!g){I=null;break e}let r;e[2]!==g||e[3]!==x?(r={directory:g,sessionKey:x},e[2]=g,e[3]=x,e[4]=r):r=e[4],I=r}const l=I;let j;e[5]!==l?(j=l?Te(ke(),l.directory,l.sessionKey):null,e[5]=l,e[6]=j):j=e[6];const p=j;let v;e[7]!==p?(v=r=>p?r.drafts[p]??ve:ve,e[7]=p,e[8]=v):v=e[8];const $=de(v);let S;e:{if(!l||!f){let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[9]=y):y=e[9],S=y;break e}let r;if(e[10]!==f||e[11]!==$||e[12]!==b){let y;e[14]!==f||e[15]!==b?(y=A=>A.source===b&&A.fileLabel===f,e[14]=f,e[15]=b,e[16]=y):y=e[16],r=$.filter(y),e[10]=f,e[11]=$,e[12]=b,e[13]=r}else r=e[13];S=r}const D=S;let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{w(null),B(""),R(null)},e[17]=_):_=e[17];const K=_;let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{K()},e[18]=h):h=e[18];const Y=h;let L;e[19]!==N?(L=r=>{const y=we(N(r));w(y),B(r.text),R(r.id)},e[19]=N,e[20]=L):L=e[20];const F=L;let T;e[21]!==a||e[22]!==z||e[23]!==l?(T=r=>{l&&(z(l,r.id),a===r.id&&K())},e[21]=a,e[22]=z,e[23]=l,e[24]=T):T=e[24];const P=T;let X;e[25]!==d||e[26]!==a||e[27]!==f||e[28]!==O||e[29]!==E||e[30]!==C||e[31]!==b||e[32]!==i||e[33]!==l||e[34]!==n||e[35]!==k?(X=(r,y)=>{const A=y??C,V=r.trim();if(!A||!V||!f)return;if(!l){Ee.error(i("inlineComment.toast.selectSessionToSave"));return}const Z=we(A),q=Ae(n(Z)),G=O(Z),le=!a;a?k(l,a,{fileLabel:f,startLine:q.startLine,endLine:q.endLine,side:q.side,code:G,language:E,text:V}):d(l,{source:b,fileLabel:f,startLine:q.startLine,endLine:q.endLine,side:q.side,code:G,language:E,text:V}),K(),le&&requestAnimationFrame(Me)},e[25]=d,e[26]=a,e[27]=f,e[28]=O,e[29]=E,e[30]=C,e[31]=b,e[32]=i,e[33]=l,e[34]=n,e[35]=k,e[36]=X):X=e[36];const oe=X;let H;return e[37]!==u||e[38]!==P||e[39]!==D||e[40]!==a||e[41]!==N||e[42]!==oe||e[43]!==C||e[44]!==x||e[45]!==F?(H={sessionKey:x,drafts:D,selection:C,setSelection:w,commentText:u,setCommentText:B,editingDraftId:a,setEditingDraftId:R,reset:K,cancel:Y,startEdit:F,deleteDraft:P,saveComment:oe,fromDraftRange:N},e[37]=u,e[38]=P,e[39]=D,e[40]=a,e[41]=N,e[42]=oe,e[43]=C,e[44]=x,e[45]=F,e[46]=H):H=e[46],H}function Oe(t){return t.removeDraft}function We(t){return t.updateDraft}function He(t){return t.addDraft}function qe(t){return t.newSessionDraft?.open}function Be(t){return t.currentSessionId}export{Ge as I,Xe as a,we as n,Je as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GuestAttachDialog-D3S0Rjic.js","assets/vendor-react-BUCujlKS.js","assets/vendor-scheduler-7OC5HNn7.js","assets/useAppFontEffects-khZXpFL_.js","assets/index-Cbci4i1W.js","assets/vendor-zod-CgAdXWZO.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-zustand-BAGL70zf.js","assets/vendor-opencode-sdk-BJ73u-bH.js","assets/index-DqaMWNrC.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-base-ui-CsXYnR5c.js","assets/vendor-floating-ui-utils-D6FqdtJt.js","assets/vendor-floating-ui-react-dom-DxYCWdHj.js","assets/vendor-floating-ui-dom-BTvzWks8.js","assets/vendor-floating-ui-core-PuGzNPnN.js","assets/vendor-use-sync-external-store-D6wYuSt-.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-dnd-kit-core-BZknOX2w.js","assets/vendor-dnd-kit-utilities-B_MdXhJC.js","assets/vendor-dnd-kit-accessibility-BHxJPORy.js","assets/vendor-dnd-kit-sortable-CsEagZ81.js","assets/vendor-framer-motion-Bq3iTZ6r.js","assets/vendor-motion-dom-DcCgeG69.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-tanstack-react-virtual-ClYN8CzB.js","assets/vendor-tanstack-virtual-core-BewVQryB.js","assets/contextPanelEmbeddedChat-CirXEPJq.js","assets/vendor-sonner-DFyL3AvE.js","assets/vendor-cmdk-DgLInKvT.js","assets/vendor-radix-ui-react-dialog-B94Bt2qq.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-DcAh5WdT.js","assets/vendor-radix-ui-react-context-Czxm7Z62.js","assets/vendor-radix-ui-react-id-f5BLKEVw.js","assets/vendor-radix-ui-react-use-layout-effect-D_3IhJdJ.js","assets/vendor-radix-ui-react-use-controllable-state-BFT5YmkA.js","assets/vendor-radix-ui-react-dismissable-layer-D7kXcwgJ.js","assets/vendor-radix-ui-react-primitive-DhVoX9SD.js","assets/vendor-radix-ui-react-slot-BQgQOasS.js","assets/vendor-radix-ui-react-use-callback-ref-BZPnuXAC.js","assets/vendor-radix-ui-react-use-escape-keydown-oph88g-F.js","assets/vendor-radix-ui-react-focus-scope-CiaxW4dD.js","assets/vendor-radix-ui-react-portal-BMJYHWck.js","assets/vendor-radix-ui-react-presence-CNxf-uq4.js","assets/vendor-radix-ui-react-focus-guards-B6qJXYua.js","assets/vendor-react-remove-scroll-DO7dCTnK.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-BcFYyj3E.js","assets/vendor-react-style-singleton-q6EMHnwf.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-zDC0RhA3.js","assets/vendor-use-callback-ref-D3RC8gqK.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-language-BgPj_McA.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-C9awkmn-.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-CiLROUVV.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-codemirror-lang-javascript-Cc2ZYbgX.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-DzPz9Wgq.js","assets/vendor-codemirror-lang-json-CMBS2tG9.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-css-O0cZX78y.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-html-CfgK872x.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-markdown-BPGOH9ye.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-language-data-CdzUmUyZ.js","assets/vendor-codemirror-lang-python-HahnQaAS.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-commands-B7H_j0iU.js","assets/vendor-legendapp-list-BuBPBC3R.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/PluginPane-B4tKno2h.js"])))=>i.map(i=>d[i]);
2
- import{f as se,R as H,j as n,r as Be}from"./vendor-react-BUCujlKS.js";import{u as De,aP as He,aQ as qe,aR as Ve,V as me,aS as Me}from"./index-Cbci4i1W.js";import{cu as Pe,f as Le,h as te,ac as Ke,x as Qe,y as Ye,I as B,R as Je,ab as Xe,aa as Ze,aq as et,as as tt,ap as st,z as Ie,A as nt,gi as ot,c6 as it,C as rt,D as lt,F as at,r as ct,gj as $e,gk as dt,gl as ut}from"./useAppFontEffects-khZXpFL_.js";import{M as Re}from"./vendor-base-ui-CsXYnR5c.js";import{_ as Ue}from"./vendor-vite-runtime-DD1OZmLC.js";function Yt(){const t=se.c(5),e=De(mt);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=He(),t[0]=s):s=t[0];const d=s;let l;t[1]!==e?(l=qe(e),t[1]=e,t[2]=l):l=t[2];const c=l;let i;return t[3]!==c?(i={usesFramelessChrome:d,side:c},t[3]=c,t[4]=i):i=t[4],i}function mt(t){return t.desktopWindowControlsPosition}const Ee=t=>!Number.isFinite(t)||t<=0?new Intl.NumberFormat(Pe(),{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(0):new Intl.NumberFormat(Pe(),{style:"currency",currency:"USD",minimumFractionDigits:t<.01?4:2,maximumFractionDigits:t<.01?4:2}).format(t),ze="—",Jt=t=>{const e=se.c(156),{reading:s,contextLimit:d,outputLimit:l,cost:c,size:i,isMobile:a,hideIcon:u,showPercentIcon:h,className:o,valueClassName:f,percentIconClassName:g,onClick:p,pressed:x}=t,w=c===void 0?null:c,j=i===void 0?"default":i,y=a===void 0?!1:a,_=u===void 0?!1:u,L=h===void 0?!1:h,P=x===void 0?!1:x,{t:r}=Le(),[T,$]=H.useState(!1),m=s.state==="measured",v=m?s.percentage:0,C=m?s.colorPercentage??v:0;let b,k,D,N,I,S,z,q,E,ne,oe;if(e[0]!==C||e[1]!==d||e[2]!==w||e[3]!==_||e[4]!==m||e[5]!==y||e[6]!==p||e[7]!==l||e[8]!==g||e[9]!==v||e[10]!==s.totalTokens||e[11]!==L||e[12]!==r||e[13]!==f){const ue=Qe(v)??0,re=Ye(C),ce=re==="critical"?"var(--status-error)":re==="warn"?"var(--status-warning)":"var(--status-success)";b=ft,k=pt;const le=2*Math.PI*8.5,de=le*(1-ue/100);z=typeof l=="number"?Math.max(l,0):0,I=w??0;let X;e[25]!==I?(X=I>0&&Number.isFinite(I),e[25]=I,e[26]=X):X=e[26],D=X;let Z;e[27]!==m||e[28]!==v?(Z=m?`${Math.min(v,999).toFixed(1)}%`:ze,e[27]=m,e[28]=v,e[29]=Z):Z=e[29],S=Z;let A;e[30]!==m||e[31]!==s.totalTokens||e[32]!==r?(A=m?r("contextUsage.tooltip.usedTokens",{tokens:b(s.totalTokens)}):r("contextUsage.compacted.description"),e[30]=m,e[31]=s.totalTokens,e[32]=r,e[33]=A):A=e[33];let O;e[34]!==d||e[35]!==r?(O=r("contextUsage.tooltip.contextLimit",{tokens:b(d)}),e[34]=d,e[35]=r,e[36]=O):O=e[36];let G;e[37]!==z||e[38]!==r?(G=r("contextUsage.tooltip.outputLimit",{tokens:b(z)}),e[37]=z,e[38]=r,e[39]=G):G=e[39];let W;e[40]!==D||e[41]!==I||e[42]!==r?(W=D?[r("contextUsage.tooltip.cost",{cost:Ee(I)})]:[],e[40]=D,e[41]=I,e[42]=r,e[43]=W):W=e[43];let ee;e[44]!==A||e[45]!==O||e[46]!==G||e[47]!==W?(ee=[A,O,G,...W],e[44]=A,e[45]=O,e[46]=G,e[47]=W,e[48]=ee):ee=e[48],oe=ee,N=!y&&typeof p=="function",e[49]!==_||e[50]!==y?(ne=!y&&!_&&n.jsx(B,{name:"donut-chart",className:"h-4 w-4 flex-shrink-0"}),e[49]=_,e[50]=y,e[51]=ne):ne=e[51],e[52]!==f?(q=te("font-medium inline-flex items-center gap-1.5",f),e[52]=f,e[53]=q):q=e[53],E=L?n.jsxs(n.Fragment,{children:[n.jsxs("svg",{viewBox:"0 0 20 20",className:te("h-3.5 w-3.5 -rotate-90",g),role:"progressbar","aria-valuenow":m?Math.round(ue):void 0,"aria-valuemin":0,"aria-valuemax":100,children:[n.jsx("circle",{cx:10,cy:10,r:8.5,fill:"none",stroke:"var(--interactive-border)",strokeWidth:3}),m?n.jsx("circle",{cx:10,cy:10,r:8.5,fill:"none",stroke:ce,strokeWidth:3,strokeLinecap:"round",strokeDasharray:le,strokeDashoffset:de,className:"transition-[stroke-dashoffset,stroke] duration-300"}):null]}),n.jsx("span",{className:"text-foreground",children:S})]}):n.jsx(n.Fragment,{children:m?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:k(C),children:Math.min(v,999).toFixed(1)}),"%"]}):n.jsx("span",{children:ze})}),e[0]=C,e[1]=d,e[2]=w,e[3]=_,e[4]=m,e[5]=y,e[6]=p,e[7]=l,e[8]=g,e[9]=v,e[10]=s.totalTokens,e[11]=L,e[12]=r,e[13]=f,e[14]=b,e[15]=k,e[16]=D,e[17]=N,e[18]=I,e[19]=S,e[20]=z,e[21]=q,e[22]=E,e[23]=ne,e[24]=oe}else b=e[14],k=e[15],D=e[16],N=e[17],I=e[18],S=e[19],z=e[20],q=e[21],E=e[22],ne=e[23],oe=e[24];let M;e[54]!==q||e[55]!==E?(M=n.jsx("span",{className:q,children:E}),e[54]=q,e[55]=E,e[56]=M):M=e[56];let ae;e[57]!==M||e[58]!==ne?(ae=n.jsxs(n.Fragment,{children:[ne,M]}),e[57]=M,e[58]=ne,e[59]=ae):ae=e[59];const V=ae,ie=j==="compact"?"typography-micro":"typography-meta";let K;e[60]!==o||e[61]!==N||e[62]!==ie?(K=te("app-region-no-drag flex items-center gap-1.5 select-none",ie,N?te("rounded-md px-2 py-1.5 text-foreground transition-colors","hover:bg-interactive-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"):"text-muted-foreground/60",o),e[60]=o,e[61]=N,e[62]=ie,e[63]=K):K=e[63];const Q=K;let Y;e[64]!==V||e[65]!==N||e[66]!==y||e[67]!==p||e[68]!==P||e[69]!==Q||e[70]!==r?(Y=N?n.jsx("button",{type:"button",className:Q,"aria-label":r("contextUsage.aria.label"),"aria-pressed":P,onClick:p,children:V}):n.jsx("div",{className:Q,"aria-label":r("contextUsage.aria.label"),onClick:y?()=>$(!0):void 0,children:V}),e[64]=V,e[65]=N,e[66]=y,e[67]=p,e[68]=P,e[69]=Q,e[70]=r,e[71]=Y):Y=e[71];const R=Y;if(y){let ue;e[72]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>$(!1),e[72]=ue):ue=e[72];let re;e[73]!==r?(re=r("contextUsage.mobile.title"),e[73]=r,e[74]=re):re=e[74];let ce;e[75]!==r?(ce=r("contextUsage.mobile.usedTokens"),e[75]=r,e[76]=ce):ce=e[76];let le;e[77]!==ce?(le=n.jsx("span",{className:"typography-meta text-muted-foreground",children:ce}),e[77]=ce,e[78]=le):le=e[78];let de;e[79]!==b||e[80]!==m||e[81]!==s.totalTokens?(de=m?b(s.totalTokens):ze,e[79]=b,e[80]=m,e[81]=s.totalTokens,e[82]=de):de=e[82];let X;e[83]!==de?(X=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:de}),e[83]=de,e[84]=X):X=e[84];let Z;e[85]!==le||e[86]!==X?(Z=n.jsxs("div",{className:"flex justify-between items-center",children:[le,X]}),e[85]=le,e[86]=X,e[87]=Z):Z=e[87];let A;e[88]!==r?(A=r("contextUsage.mobile.contextLimit"),e[88]=r,e[89]=A):A=e[89];let O;e[90]!==A?(O=n.jsx("span",{className:"typography-meta text-muted-foreground",children:A}),e[90]=A,e[91]=O):O=e[91];let G;e[92]!==d||e[93]!==b?(G=b(d),e[92]=d,e[93]=b,e[94]=G):G=e[94];let W;e[95]!==G?(W=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:G}),e[95]=G,e[96]=W):W=e[96];let ee;e[97]!==O||e[98]!==W?(ee=n.jsxs("div",{className:"flex justify-between items-center",children:[O,W]}),e[97]=O,e[98]=W,e[99]=ee):ee=e[99];let fe;e[100]!==r?(fe=r("contextUsage.mobile.outputLimit"),e[100]=r,e[101]=fe):fe=e[101];let pe;e[102]!==fe?(pe=n.jsx("span",{className:"typography-meta text-muted-foreground",children:fe}),e[102]=fe,e[103]=pe):pe=e[103];let he;e[104]!==b||e[105]!==z?(he=b(z),e[104]=b,e[105]=z,e[106]=he):he=e[106];let xe;e[107]!==he?(xe=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:he}),e[107]=he,e[108]=xe):xe=e[108];let ge;e[109]!==pe||e[110]!==xe?(ge=n.jsxs("div",{className:"flex justify-between items-center",children:[pe,xe]}),e[109]=pe,e[110]=xe,e[111]=ge):ge=e[111];let be;e[112]!==D||e[113]!==I||e[114]!==r?(be=D?n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"typography-meta text-muted-foreground",children:r("contextUsage.mobile.cost")}),n.jsx("span",{className:"typography-meta text-foreground font-medium",children:Ee(I)})]}):null,e[112]=D,e[113]=I,e[114]=r,e[115]=be):be=e[115];let we;e[116]!==r?(we=r("contextUsage.mobile.usage"),e[116]=r,e[117]=we):we=e[117];let je;e[118]!==we?(je=n.jsx("span",{className:"typography-meta text-muted-foreground",children:we}),e[118]=we,e[119]=je):je=e[119];let ye;e[120]!==C||e[121]!==k||e[122]!==m?(ye=te("typography-meta font-semibold",m?k(C):"text-muted-foreground"),e[120]=C,e[121]=k,e[122]=m,e[123]=ye):ye=e[123];let ve;e[124]!==S||e[125]!==ye?(ve=n.jsx("span",{className:ye,children:S}),e[124]=S,e[125]=ye,e[126]=ve):ve=e[126];let _e;e[127]!==je||e[128]!==ve?(_e=n.jsxs("div",{className:"flex justify-between items-center pt-1 border-t border-border/40",children:[je,ve]}),e[127]=je,e[128]=ve,e[129]=_e):_e=e[129];let Ne;e[130]!==Z||e[131]!==ee||e[132]!==ge||e[133]!==be||e[134]!==_e?(Ne=n.jsxs("div",{className:"rounded-xl border border-border/40 bg-sidebar/30 px-3 py-2 space-y-1",children:[Z,ee,ge,be,_e]}),e[130]=Z,e[131]=ee,e[132]=ge,e[133]=be,e[134]=_e,e[135]=Ne):Ne=e[135];let Se;e[136]!==m||e[137]!==r?(Se=m?null:n.jsx("p",{className:"px-1 typography-meta text-muted-foreground",children:r("contextUsage.compacted.description")}),e[136]=m,e[137]=r,e[138]=Se):Se=e[138];let Ce;e[139]!==Ne||e[140]!==Se?(Ce=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[Ne,Se]}),e[139]=Ne,e[140]=Se,e[141]=Ce):Ce=e[141];let ke;e[142]!==T||e[143]!==re||e[144]!==Ce?(ke=n.jsx(Je,{open:T,onClose:ue,title:re,children:Ce}),e[142]=T,e[143]=re,e[144]=Ce,e[145]=ke):ke=e[145];let Te;return e[146]!==R||e[147]!==ke?(Te=n.jsxs(n.Fragment,{children:[R,ke]}),e[146]=R,e[147]=ke,e[148]=Te):Te=e[148],Te}let U;e[149]!==R?(U=n.jsx(Xe,{asChild:!0,children:R}),e[149]=R,e[150]=U):U=e[150];let J;e[151]!==oe?(J=n.jsx(Ke,{children:n.jsx("div",{className:"space-y-0.5",children:oe.map(ht)})}),e[151]=oe,e[152]=J):J=e[152];let F;return e[153]!==U||e[154]!==J?(F=n.jsxs(Ze,{children:[U,J]}),e[153]=U,e[154]=J,e[155]=F):F=e[155],F};function ft(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toFixed(1).replace(/\.0$/,"")}function pt(t){return t>=90?"text-status-error":t>=75?"text-status-warning":"text-status-success"}function ht(t){return n.jsx("p",{className:"typography-micro leading-tight",children:t},t)}const Xt=t=>t.state==="compacted"?{state:"compacted"}:{state:"measured",totalTokens:t.totalTokens,percentage:t.contextLimit>0?Math.min(999,t.totalTokens/t.contextLimit*100):0,colorPercentage:t.percentage},xt={close:"#FF5F57",minimize:"#FEBC2E",maximize:"#28C940"},gt="rgba(0, 0, 0, 0.7)",bt=t=>{const e=se.c(3),{action:s}=t;if(s==="close"){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(B,{name:"close",className:"size-[10px]"}),e[0]=l):l=e[0],l}if(s==="minimize"){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(B,{name:"subtract",className:"size-[10px]"}),e[1]=l):l=e[1],l}let d;return e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(B,{name:"add",className:"size-[10px]"}),e[2]=d):d=e[2],d},wt=t=>{const e=se.c(18),{action:s,isMaximized:d,onActivate:l}=t,{t:c}=Le(),i=xt[s];let a;e[0]!==s||e[1]!==d||e[2]!==c?(a=c(s==="close"?"header.windowControls.close":s==="minimize"?"header.windowControls.minimize":d?"header.windowControls.restore":"header.windowControls.maximize"),e[0]=s,e[1]=d,e[2]=c,e[3]=a):a=e[3];const u=a;let h;e[4]!==s||e[5]!==l?(h=()=>l(s),e[4]=s,e[5]=l,e[6]=h):h=e[6];let o;e[7]!==i?(o={backgroundColor:i,color:gt},e[7]=i,e[8]=o):o=e[8];let f;e[9]!==s?(f=n.jsx("span",{className:"flex items-center justify-center opacity-0 transition-opacity duration-75 group-hover/wctl:opacity-100",children:n.jsx(bt,{action:s})}),e[9]=s,e[10]=f):f=e[10];let g;e[11]!==o||e[12]!==f?(g=n.jsx("span",{className:"flex size-3.5 items-center justify-center rounded-full shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.28)] transition-[filter] duration-75 active:brightness-90",style:o,children:f}),e[11]=o,e[12]=f,e[13]=g):g=e[13];let p;return e[14]!==u||e[15]!==h||e[16]!==g?(p=n.jsx("button",{type:"button",onClick:h,title:u,"aria-label":u,className:"app-region-no-drag flex h-8 w-[24px] items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:g}),e[14]=u,e[15]=h,e[16]=g,e[17]=p):p=e[17],p},Zt=H.memo(function(e){const s=se.c(25),{visible:d,position:l}=e,c=l===void 0?"right":l,{t:i}=Le(),[a,u]=H.useState(!1),h=De(jt);let o,f;if(s[0]!==d?(o=()=>{if(!d)return;let _=!1;me("desktop_get_current_window_state").then(P=>{_||u(!!P?.maximized)}).catch(yt);const L=P=>{const r=P.detail;u(!!r?.maximized)};return window.addEventListener("openchamber:window-maximized-changed",L),()=>{_=!0,window.removeEventListener("openchamber:window-maximized-changed",L)}},f=[d],s[0]=d,s[1]=o,s[2]=f):(o=s[1],f=s[2]),Be.useEffect(o,f),!d)return null;const g=c==="left";let p,x,w,j;if(s[3]!==h||s[4]!==g||s[5]!==a||s[6]!==c||s[7]!==i){j=Symbol.for("react.early_return_sentinel");e:{const _=Ve(c);let L;s[12]===Symbol.for("react.memo_cache_sentinel")?(L=m=>{if(m==="close"){me("desktop_close_current_window");return}if(m==="minimize"){me("desktop_minimize_current_window");return}me("desktop_toggle_current_window_maximized").then(v=>u(!!v?.maximized)).catch(vt)},s[12]=L):L=s[12];const P=L;if(h==="traffic-lights"){const m=g?"mr-1":"ml-1 mr-3";let v;s[13]!==m?(v=te("app-region-no-drag group/wctl flex h-8 shrink-0 items-center",m),s[13]=m,s[14]=v):v=s[14];let C;s[15]!==i?(C=i("header.windowControls.groupAria"),s[15]=i,s[16]=C):C=s[16];let b;s[17]!==a?(b=k=>n.jsx(wt,{action:k,isMaximized:a,onActivate:P},k),s[17]=a,s[18]=b):b=s[18],j=n.jsx("div",{className:v,"aria-label":C,children:_.map(b)});break e}const r=te("app-region-no-drag inline-flex items-center justify-center text-muted-foreground transition-colors hover:bg-interactive-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",g?"h-8 w-8 rounded-md":"h-12 w-11"),T=g?"app-region-no-drag mr-1 flex h-8 shrink-0 items-center":"app-region-no-drag ml-1 flex h-12 shrink-0 items-center",$=m=>m==="minimize"?n.jsx("button",{type:"button",className:r,onClick:_t,title:i("header.windowControls.minimize"),"aria-label":i("header.windowControls.minimize"),children:n.jsx(B,{name:"subtract",className:"h-4 w-4"})},"minimize"):m==="maximize"?n.jsx("button",{type:"button",className:r,onClick:()=>{me("desktop_toggle_current_window_maximized").then(v=>u(!!v?.maximized)).catch(Nt)},title:i(a?"header.windowControls.restore":"header.windowControls.maximize"),"aria-label":i(a?"header.windowControls.restore":"header.windowControls.maximize"),children:n.jsx(B,{name:a?"fullscreen-exit":"checkbox-blank",className:"h-3.5 w-3.5"})},"maximize"):n.jsx("button",{type:"button",className:te(r,"hover:bg-[var(--status-error)] hover:text-[var(--status-error-foreground)]"),onClick:St,title:i("header.windowControls.close"),"aria-label":i("header.windowControls.close"),children:n.jsx(B,{name:"close",className:"h-4 w-4"})},"close");p=T,s[19]!==i?(x=i("header.windowControls.groupAria"),s[19]=i,s[20]=x):x=s[20],w=_.map($)}s[3]=h,s[4]=g,s[5]=a,s[6]=c,s[7]=i,s[8]=p,s[9]=x,s[10]=w,s[11]=j}else p=s[8],x=s[9],w=s[10],j=s[11];if(j!==Symbol.for("react.early_return_sentinel"))return j;let y;return s[21]!==p||s[22]!==x||s[23]!==w?(y=n.jsx("div",{className:p,"aria-label":x,children:w}),s[21]=p,s[22]=x,s[23]=w,s[24]=y):y=s[24],y});function jt(t){return t.desktopWindowControlsStyle}function yt(){}function vt(){}function _t(){me("desktop_minimize_current_window")}function Nt(){}function St(){me("desktop_close_current_window")}const Fe="new-session";function es(t){const e=se.c(18),{children:s,variant:d,scopeProjectId:l,align:c}=t,i=d===void 0?"default":d,a=l===void 0?null:l,u=c===void 0?"start":c,h=De(kt),o=De(Ct);let f;e[0]!==s?(f=n.jsx(et,{asChild:!0,children:s}),e[0]=s,e[1]=f):f=e[1];const g=i==="compact"?"w-[280px]":"w-[360px]";let p;e[2]!==g?(p=te("overflow-hidden p-1 max-w-[calc(100vw-32px)]",g),e[2]=g,e[3]=p):p=e[3];let x;e[4]!==h||e[5]!==a||e[6]!==o||e[7]!==i?(x=h?n.jsx(It,{onSelect:()=>o(!1),variant:i,scopeProjectId:a}):null,e[4]=h,e[5]=a,e[6]=o,e[7]=i,e[8]=x):x=e[8];let w;e[9]!==u||e[10]!==p||e[11]!==x?(w=n.jsx(tt,{align:u,sideOffset:6,className:p,children:x}),e[9]=u,e[10]=p,e[11]=x,e[12]=w):w=e[12];let j;return e[13]!==h||e[14]!==o||e[15]!==f||e[16]!==w?(j=n.jsxs(st,{open:h,onOpenChange:o,modal:!1,disableGlobalShortcuts:!0,children:[f,w]}),e[13]=h,e[14]=o,e[15]=f,e[16]=w,e[17]=j):j=e[17],j}function Ct(t){return t.setSessionDropdownOpen}function kt(t){return t.isSessionDropdownOpen}function It(t){const e=se.c(31),{onSelect:s,variant:d,scopeProjectId:l}=t,c=Ie(Tt),i=Ie(Lt);let a;e[0]!==c||e[1]!==l?(a={scopeProjectId:l,currentSessionId:c},e[0]=c,e[1]=l,e[2]=a):a=e[2];const u=nt(!0,a),h=Ie(Dt),{t:o}=Le();let f;e[3]!==s||e[4]!==h?(f=()=>{s(),h()},e[3]=s,e[4]=h,e[5]=f):f=e[5];const g=f;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=new Set,e[6]=p):p=e[6];const[x,w]=H.useState(p),j=H.useRef(null),y=H.useRef(!1),_=i?Fe:c;let L;e[7]===Symbol.for("react.memo_cache_sentinel")?(L=N=>{w(I=>{const S=new Set(I);return S.has(N)?S.delete(N):S.add(N),S})},e[7]=L):L=e[7];const P=L;let r,T;e[8]!==x||e[9]!==_||e[10]!==u?(r=()=>{if(y.current||!_)return;const N=_===Fe?[]:ot(u,_);if(!N)return;if(N.some(S=>!x.has(S))){w(S=>new Set([...S,...N]));return}const I=requestAnimationFrame(()=>{const S=Array.from(j.current?.querySelectorAll("[data-switcher-item-id]")??[]).find(z=>z.dataset.switcherItemId===_);S&&(S.focus(),S.scrollIntoView({block:"nearest"}),y.current=!0)});return()=>cancelAnimationFrame(I)},T=[x,_,u],e[8]=x,e[9]=_,e[10]=u,e[11]=r,e[12]=T):(r=e[11],T=e[12]),H.useLayoutEffect(r,T);let $,m;e[13]===Symbol.for("react.memo_cache_sentinel")?($=te("group relative flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 outline-hidden select-none","data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover"),m=n.jsx(B,{name:"chat-new",className:"h-4 w-4 flex-shrink-0 text-muted-foreground"}),e[13]=$,e[14]=m):($=e[13],m=e[14]);let v;e[15]!==o?(v=o("sessions.sidebar.header.actions.newSession"),e[15]=o,e[16]=v):v=e[16];let C;e[17]!==v?(C=n.jsx("span",{className:"truncate typography-ui-label font-normal leading-tight text-foreground",children:v}),e[17]=v,e[18]=C):C=e[18];let b;e[19]!==g||e[20]!==C?(b=n.jsxs(Re,{"data-switcher-item-id":Fe,onClick:g,className:$,children:[m,C]}),e[19]=g,e[20]=C,e[21]=b):b=e[21];let k;e[22]!==x||e[23]!==u||e[24]!==s||e[25]!==o||e[26]!==d?(k=u.length===0?n.jsx("div",{className:"px-3 py-4 text-center typography-meta text-muted-foreground",children:o("sessions.switcher.empty")}):u.map(N=>n.jsx(Ae,{item:N,depth:0,variant:d,expandedParents:x,toggleParent:P,closeDropdown:s},N.node.session.id)),e[22]=x,e[23]=u,e[24]=s,e[25]=o,e[26]=d,e[27]=k):k=e[27];let D;return e[28]!==b||e[29]!==k?(D=n.jsx(it,{ref:j,outerClassName:"max-h-[60vh]",disableHorizontal:!0,children:n.jsxs("div",{className:"space-y-0.5",children:[b,k]})}),e[28]=b,e[29]=k,e[30]=D):D=e[30],D}function Dt(t){return t.openNewSessionDraft}function Lt(t){return t.newSessionDraft.open===!0}function Tt(t){return t.currentSessionId}function Ae(t){const e=se.c(31),{item:s,depth:d,variant:l,expandedParents:c,toggleParent:i,closeDropdown:a}=t,{node:u,secondaryMeta:h}=s,o=u.session,f=u.children.length>0;let g;e[0]!==c||e[1]!==o.id?(g=c.has(o.id),e[0]=c,e[1]=o.id,e[2]=g):g=e[2];const p=g;let x;e[3]!==f||e[4]!==o.id||e[5]!==i?(x=f?()=>i(o.id):void 0,e[3]=f,e[4]=o.id,e[5]=i,e[6]=x):x=e[6];let w;e[7]!==a||e[8]!==d||e[9]!==f||e[10]!==p||e[11]!==h||e[12]!==o||e[13]!==x||e[14]!==l?(w=n.jsx(zt,{session:o,depth:d,variant:l,secondaryMeta:h,hasChildren:f,isExpanded:p,onToggleExpand:x,closeDropdown:a}),e[7]=a,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=o,e[13]=x,e[14]=l,e[15]=w):w=e[15];let j;e[16]!==a||e[17]!==d||e[18]!==c||e[19]!==f||e[20]!==p||e[21]!==s.groupDirectory||e[22]!==s.projectId||e[23]!==u.children||e[24]!==h||e[25]!==i||e[26]!==l?(j=f&&p?u.children.map(_=>n.jsx(Ae,{item:{node:_,projectId:s.projectId,groupDirectory:s.groupDirectory,secondaryMeta:h},depth:d+1,variant:l,expandedParents:c,toggleParent:i,closeDropdown:a},_.session.id)):null,e[16]=a,e[17]=d,e[18]=c,e[19]=f,e[20]=p,e[21]=s.groupDirectory,e[22]=s.projectId,e[23]=u.children,e[24]=h,e[25]=i,e[26]=l,e[27]=j):j=e[27];let y;return e[28]!==w||e[29]!==j?(y=n.jsxs(n.Fragment,{children:[w,j]}),e[28]=w,e[29]=j,e[30]=y):y=e[30],y}function zt(t){const e=se.c(57),{session:s,depth:d,variant:l,secondaryMeta:c,hasChildren:i,isExpanded:a,onToggleExpand:u,closeDropdown:h}=t,{t:o}=Le(),f=Ie($t),g=Ie(Pt),p=De(Ft),x=rt(s.id),w=lt(s.id),j=f===s.id;let y;e[0]!==s.title||e[1]!==o?(y=s.title?.trim()||o("sessions.sidebar.session.untitled"),e[0]=s.title,e[1]=o,e[2]=y):y=e[2];const _=y,L=!!s.parentID,P=w>0&&(!L||p),r=x?.type??"idle",T=r==="busy"||r==="retry",$=!T&&P&&!j;let m;e[3]!==s.time?.created||e[4]!==s.time?.updated?(m=s.time?.updated||s.time?.created||Date.now(),e[3]=s.time?.created,e[4]=s.time?.updated,e[5]=m):m=e[5];const v=m;let C;e[6]!==v?(C=at(v),e[6]=v,e[7]=C):C=e[7];const b=C;let k;e[8]!==c?.projectLabel?(k=c?.projectLabel?.trim()||null,e[8]=c?.projectLabel,e[9]=k):k=e[9];const D=k;let N;e[10]!==c?.branchLabel?(N=c?.branchLabel?.trim()||null,e[10]=c?.branchLabel,e[11]=N):N=e[11];const I=N,S=I&&I!=="HEAD"?I:null;let z;e[12]!==h||e[13]!==j||e[14]!==s||e[15]!==g?(z=()=>{if(j){h();return}const F=ct(s);g(s.id,F??null),h()},e[12]=h,e[13]=j,e[14]=s,e[15]=g,e[16]=z):z=e[16];const q=z;let E;e[17]!==q?(E=F=>{if(F.target?.closest("[data-switcher-expand]")){F.preventDefault();return}q()},e[17]=q,e[18]=E):E=e[18];const ne=s.id,oe=j&&"bg-interactive-selection text-interactive-selection-foreground hover:bg-interactive-selection data-[highlighted]:bg-interactive-selection";let M;e[19]!==oe?(M=te("group relative flex w-full cursor-pointer items-start gap-2 rounded-lg px-2 py-1.5 outline-hidden select-none","data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover",oe),e[19]=oe,e[20]=M):M=e[20];const ae=8+d*12;let V;e[21]!==ae?(V={paddingLeft:ae},e[21]=ae,e[22]=V):V=e[22];let ie;e[23]!==i||e[24]!==a||e[25]!==u||e[26]!==o||e[27]!==l?(ie=l==="compact"&&i?n.jsx("span",{role:"button",tabIndex:-1,"data-switcher-expand":!0,onClick:F=>{F.preventDefault(),F.stopPropagation(),u?.()},className:"inline-flex h-3.5 w-3.5 flex-shrink-0 items-center justify-center rounded text-muted-foreground/70 hover:text-foreground","aria-label":o(a?"sessions.sidebar.session.subsessions.collapse":"sessions.sidebar.session.subsessions.expand"),children:a?n.jsx(B,{name:"arrow-down-s",className:"h-3.5 w-3.5"}):n.jsx(B,{name:"arrow-right-s",className:"h-3.5 w-3.5"})}):null,e[23]=i,e[24]=a,e[25]=u,e[26]=o,e[27]=l,e[28]=ie):ie=e[28];let K;e[29]!==_?(K=n.jsx("span",{className:"truncate typography-ui-label font-normal leading-tight text-foreground",children:_}),e[29]=_,e[30]=K):K=e[30];let Q;e[31]!==ie||e[32]!==K?(Q=n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[ie,K]}),e[31]=ie,e[32]=K,e[33]=Q):Q=e[33];let Y;e[34]!==S||e[35]!==i||e[36]!==a||e[37]!==u||e[38]!==D||e[39]!==o||e[40]!==b||e[41]!==l?(Y=l==="default"?n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5 truncate text-muted-foreground/70 leading-tight",style:{fontSize:"calc(var(--text-ui-label) * 0.85)"},children:[i?n.jsx("span",{role:"button",tabIndex:-1,"data-switcher-expand":!0,onClick:F=>{F.preventDefault(),F.stopPropagation(),u?.()},className:"inline-flex h-3 w-3 flex-shrink-0 items-center justify-center rounded text-muted-foreground/70 hover:text-foreground","aria-label":o(a?"sessions.sidebar.session.subsessions.collapse":"sessions.sidebar.session.subsessions.expand"),children:a?n.jsx(B,{name:"arrow-down-s",className:"h-3 w-3"}):n.jsx(B,{name:"arrow-right-s",className:"h-3 w-3"})}):null,n.jsx("span",{className:"flex-shrink-0",children:b}),D?n.jsx("span",{className:"truncate",children:D}):null,S?n.jsxs("span",{className:"inline-flex min-w-0 items-center gap-0.5",children:[n.jsx(B,{name:"git-branch",className:"h-3 w-3 flex-shrink-0 text-muted-foreground/70"}),n.jsx("span",{className:"truncate",children:S})]}):null]}):null,e[34]=S,e[35]=i,e[36]=a,e[37]=u,e[38]=D,e[39]=o,e[40]=b,e[41]=l,e[42]=Y):Y=e[42];let R;e[43]!==Q||e[44]!==Y?(R=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[Q,Y]}),e[43]=Q,e[44]=Y,e[45]=R):R=e[45];let U;e[46]!==T||e[47]!==$||e[48]!==o?(U=T||$?n.jsx("span",{className:"flex h-3 w-3 flex-shrink-0 items-center justify-center self-center",children:T?n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary animate-busy-pulse","aria-label":o("sessions.sidebar.session.status.active"),title:o("sessions.sidebar.session.status.active")}):n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--status-info)]","aria-label":o("sessions.sidebar.session.status.unread"),title:o("sessions.sidebar.session.status.unread")})}):null,e[46]=T,e[47]=$,e[48]=o,e[49]=U):U=e[49];let J;return e[50]!==s.id||e[51]!==M||e[52]!==V||e[53]!==R||e[54]!==U||e[55]!==E?(J=n.jsxs(Re,{onClick:E,"data-slot":"session-switcher-item","data-switcher-item-id":ne,className:M,style:V,children:[R,U]}),e[50]=s.id,e[51]=M,e[52]=V,e[53]=R,e[54]=U,e[55]=E,e[56]=J):J=e[56],J}function Ft(t){return t.notifyOnSubtasks}function Pt(t){return t.setCurrentSession}function $t(t){return t.currentSessionId}const Et=H.lazy(()=>Ue(()=>import("./GuestAttachDialog-D3S0Rjic.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83])).then(t=>({default:t.GuestAttachDialog}))),Oe=H.lazy(()=>Ue(()=>import("./PluginPane-B4tKno2h.js").then(t=>t.k),__vite__mapDeps([83,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82])).then(t=>({default:t.PluginPane}))),ts=()=>{const t=se.c(11),e=$e(Mt),s=$e(Rt),d=dt(Ut),l=ut(At);let c;t[0]!==l?(c=l.map(Ot),t[0]=l,t[1]=c):c=t[1];let i;t[2]!==s||t[3]!==e?(i=e?n.jsx(H.Suspense,{fallback:null,children:n.jsx(Et,{guestId:e.guestId,item:e.item,onOpenChange:h=>{h||s()}})}):null,t[2]=s,t[3]=e,t[4]=i):i=t[4];let a;t[5]!==d?(a=d?n.jsx("div",{"aria-hidden":"true",className:"pointer-events-none fixed top-0 -left-[9999px] h-px w-px overflow-hidden",children:n.jsx(H.Suspense,{fallback:null,children:n.jsx(Oe,{mode:Me(d),surface:"panel",headless:!0})})}):null,t[5]=d,t[6]=a):a=t[6];let u;return t[7]!==c||t[8]!==i||t[9]!==a?(u=n.jsxs(n.Fragment,{children:[c,i,a]}),t[7]=c,t[8]=i,t[9]=a,t[10]=u):u=t[10],u};function Mt(t){return t.request}function Rt(t){return t.close}function Ut(t){return t.guestId}function At(t){return t.requests}function Ot(t){return n.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none fixed top-0 -left-[9999px] h-px w-px overflow-hidden",children:n.jsx(H.Suspense,{fallback:null,children:n.jsx(Oe,{mode:Me(t.guestId),surface:"background",headless:!0,backgroundAction:t})})},t.id)}const Ge=()=>{const t=[document.documentElement,document.body],e=document.getElementById("root");return e&&t.push(e),t},We=()=>{let t=!1;for(const e of Ge())e.scrollTop!==0&&(e.scrollTop=0,t=!0),e.scrollLeft!==0&&(e.scrollLeft=0,t=!0);return t},Gt=t=>t===document||Ge().some(e=>e===t),ss=()=>{const t=se.c(1);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0],H.useEffect(Bt,e)};function Wt(t){Gt(t.target)&&We()}function Bt(){const t=Wt;return document.addEventListener("scroll",t,{capture:!0,passive:!0}),We(),()=>document.removeEventListener("scroll",t,{capture:!0})}export{Jt as C,ts as G,es as S,Zt as W,ss as a,Ee as f,Xt as t,Yt as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GuestAttachDialog-B808E0-d.js","assets/vendor-react-BUCujlKS.js","assets/vendor-scheduler-7OC5HNn7.js","assets/useAppFontEffects-ne84JBVL.js","assets/index-Dqc6USl3.js","assets/vendor-zod-CgAdXWZO.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-zustand-BAGL70zf.js","assets/vendor-opencode-sdk-BJ73u-bH.js","assets/index-DqaMWNrC.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-base-ui-CsXYnR5c.js","assets/vendor-floating-ui-utils-D6FqdtJt.js","assets/vendor-floating-ui-react-dom-DxYCWdHj.js","assets/vendor-floating-ui-dom-BTvzWks8.js","assets/vendor-floating-ui-core-PuGzNPnN.js","assets/vendor-use-sync-external-store-D6wYuSt-.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-dnd-kit-core-BZknOX2w.js","assets/vendor-dnd-kit-utilities-B_MdXhJC.js","assets/vendor-dnd-kit-accessibility-BHxJPORy.js","assets/vendor-dnd-kit-sortable-CsEagZ81.js","assets/vendor-framer-motion-Bq3iTZ6r.js","assets/vendor-motion-dom-DcCgeG69.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-tanstack-react-virtual-ClYN8CzB.js","assets/vendor-tanstack-virtual-core-BewVQryB.js","assets/contextPanelEmbeddedChat-CirXEPJq.js","assets/vendor-sonner-DFyL3AvE.js","assets/vendor-cmdk-DgLInKvT.js","assets/vendor-radix-ui-react-dialog-B94Bt2qq.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-DcAh5WdT.js","assets/vendor-radix-ui-react-context-Czxm7Z62.js","assets/vendor-radix-ui-react-id-f5BLKEVw.js","assets/vendor-radix-ui-react-use-layout-effect-D_3IhJdJ.js","assets/vendor-radix-ui-react-use-controllable-state-BFT5YmkA.js","assets/vendor-radix-ui-react-dismissable-layer-D7kXcwgJ.js","assets/vendor-radix-ui-react-primitive-DhVoX9SD.js","assets/vendor-radix-ui-react-slot-BQgQOasS.js","assets/vendor-radix-ui-react-use-callback-ref-BZPnuXAC.js","assets/vendor-radix-ui-react-use-escape-keydown-oph88g-F.js","assets/vendor-radix-ui-react-focus-scope-CiaxW4dD.js","assets/vendor-radix-ui-react-portal-BMJYHWck.js","assets/vendor-radix-ui-react-presence-CNxf-uq4.js","assets/vendor-radix-ui-react-focus-guards-B6qJXYua.js","assets/vendor-react-remove-scroll-DO7dCTnK.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-BcFYyj3E.js","assets/vendor-react-style-singleton-q6EMHnwf.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-zDC0RhA3.js","assets/vendor-use-callback-ref-D3RC8gqK.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-language-BgPj_McA.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-C9awkmn-.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-CiLROUVV.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-codemirror-lang-javascript-Cc2ZYbgX.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-DzPz9Wgq.js","assets/vendor-codemirror-lang-json-CMBS2tG9.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-css-O0cZX78y.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-html-CfgK872x.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-markdown-BPGOH9ye.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-language-data-Bx2EHc1O.js","assets/vendor-codemirror-lang-python-HahnQaAS.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-commands-B7H_j0iU.js","assets/vendor-legendapp-list-BuBPBC3R.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/PluginPane-DEcgDQ9h.js"])))=>i.map(i=>d[i]);
2
+ import{f as se,R as H,j as n,r as Be}from"./vendor-react-BUCujlKS.js";import{u as De,aP as He,aQ as qe,aR as Ve,V as me,aS as Me}from"./index-Dqc6USl3.js";import{cu as Pe,f as Le,h as te,ac as Ke,x as Qe,y as Ye,I as B,R as Je,ab as Xe,aa as Ze,aq as et,as as tt,ap as st,z as Ie,A as nt,gi as ot,c6 as it,C as rt,D as lt,F as at,r as ct,gj as $e,gk as dt,gl as ut}from"./useAppFontEffects-ne84JBVL.js";import{M as Re}from"./vendor-base-ui-CsXYnR5c.js";import{_ as Ue}from"./vendor-vite-runtime-DD1OZmLC.js";function Yt(){const t=se.c(5),e=De(mt);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=He(),t[0]=s):s=t[0];const d=s;let l;t[1]!==e?(l=qe(e),t[1]=e,t[2]=l):l=t[2];const c=l;let i;return t[3]!==c?(i={usesFramelessChrome:d,side:c},t[3]=c,t[4]=i):i=t[4],i}function mt(t){return t.desktopWindowControlsPosition}const Ee=t=>!Number.isFinite(t)||t<=0?new Intl.NumberFormat(Pe(),{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(0):new Intl.NumberFormat(Pe(),{style:"currency",currency:"USD",minimumFractionDigits:t<.01?4:2,maximumFractionDigits:t<.01?4:2}).format(t),ze="—",Jt=t=>{const e=se.c(156),{reading:s,contextLimit:d,outputLimit:l,cost:c,size:i,isMobile:a,hideIcon:u,showPercentIcon:h,className:o,valueClassName:f,percentIconClassName:g,onClick:p,pressed:x}=t,w=c===void 0?null:c,j=i===void 0?"default":i,y=a===void 0?!1:a,_=u===void 0?!1:u,L=h===void 0?!1:h,P=x===void 0?!1:x,{t:r}=Le(),[T,$]=H.useState(!1),m=s.state==="measured",v=m?s.percentage:0,C=m?s.colorPercentage??v:0;let b,k,D,N,I,S,z,q,E,ne,oe;if(e[0]!==C||e[1]!==d||e[2]!==w||e[3]!==_||e[4]!==m||e[5]!==y||e[6]!==p||e[7]!==l||e[8]!==g||e[9]!==v||e[10]!==s.totalTokens||e[11]!==L||e[12]!==r||e[13]!==f){const ue=Qe(v)??0,re=Ye(C),ce=re==="critical"?"var(--status-error)":re==="warn"?"var(--status-warning)":"var(--status-success)";b=ft,k=pt;const le=2*Math.PI*8.5,de=le*(1-ue/100);z=typeof l=="number"?Math.max(l,0):0,I=w??0;let X;e[25]!==I?(X=I>0&&Number.isFinite(I),e[25]=I,e[26]=X):X=e[26],D=X;let Z;e[27]!==m||e[28]!==v?(Z=m?`${Math.min(v,999).toFixed(1)}%`:ze,e[27]=m,e[28]=v,e[29]=Z):Z=e[29],S=Z;let A;e[30]!==m||e[31]!==s.totalTokens||e[32]!==r?(A=m?r("contextUsage.tooltip.usedTokens",{tokens:b(s.totalTokens)}):r("contextUsage.compacted.description"),e[30]=m,e[31]=s.totalTokens,e[32]=r,e[33]=A):A=e[33];let O;e[34]!==d||e[35]!==r?(O=r("contextUsage.tooltip.contextLimit",{tokens:b(d)}),e[34]=d,e[35]=r,e[36]=O):O=e[36];let G;e[37]!==z||e[38]!==r?(G=r("contextUsage.tooltip.outputLimit",{tokens:b(z)}),e[37]=z,e[38]=r,e[39]=G):G=e[39];let W;e[40]!==D||e[41]!==I||e[42]!==r?(W=D?[r("contextUsage.tooltip.cost",{cost:Ee(I)})]:[],e[40]=D,e[41]=I,e[42]=r,e[43]=W):W=e[43];let ee;e[44]!==A||e[45]!==O||e[46]!==G||e[47]!==W?(ee=[A,O,G,...W],e[44]=A,e[45]=O,e[46]=G,e[47]=W,e[48]=ee):ee=e[48],oe=ee,N=!y&&typeof p=="function",e[49]!==_||e[50]!==y?(ne=!y&&!_&&n.jsx(B,{name:"donut-chart",className:"h-4 w-4 flex-shrink-0"}),e[49]=_,e[50]=y,e[51]=ne):ne=e[51],e[52]!==f?(q=te("font-medium inline-flex items-center gap-1.5",f),e[52]=f,e[53]=q):q=e[53],E=L?n.jsxs(n.Fragment,{children:[n.jsxs("svg",{viewBox:"0 0 20 20",className:te("h-3.5 w-3.5 -rotate-90",g),role:"progressbar","aria-valuenow":m?Math.round(ue):void 0,"aria-valuemin":0,"aria-valuemax":100,children:[n.jsx("circle",{cx:10,cy:10,r:8.5,fill:"none",stroke:"var(--interactive-border)",strokeWidth:3}),m?n.jsx("circle",{cx:10,cy:10,r:8.5,fill:"none",stroke:ce,strokeWidth:3,strokeLinecap:"round",strokeDasharray:le,strokeDashoffset:de,className:"transition-[stroke-dashoffset,stroke] duration-300"}):null]}),n.jsx("span",{className:"text-foreground",children:S})]}):n.jsx(n.Fragment,{children:m?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:k(C),children:Math.min(v,999).toFixed(1)}),"%"]}):n.jsx("span",{children:ze})}),e[0]=C,e[1]=d,e[2]=w,e[3]=_,e[4]=m,e[5]=y,e[6]=p,e[7]=l,e[8]=g,e[9]=v,e[10]=s.totalTokens,e[11]=L,e[12]=r,e[13]=f,e[14]=b,e[15]=k,e[16]=D,e[17]=N,e[18]=I,e[19]=S,e[20]=z,e[21]=q,e[22]=E,e[23]=ne,e[24]=oe}else b=e[14],k=e[15],D=e[16],N=e[17],I=e[18],S=e[19],z=e[20],q=e[21],E=e[22],ne=e[23],oe=e[24];let M;e[54]!==q||e[55]!==E?(M=n.jsx("span",{className:q,children:E}),e[54]=q,e[55]=E,e[56]=M):M=e[56];let ae;e[57]!==M||e[58]!==ne?(ae=n.jsxs(n.Fragment,{children:[ne,M]}),e[57]=M,e[58]=ne,e[59]=ae):ae=e[59];const V=ae,ie=j==="compact"?"typography-micro":"typography-meta";let K;e[60]!==o||e[61]!==N||e[62]!==ie?(K=te("app-region-no-drag flex items-center gap-1.5 select-none",ie,N?te("rounded-md px-2 py-1.5 text-foreground transition-colors","hover:bg-interactive-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"):"text-muted-foreground/60",o),e[60]=o,e[61]=N,e[62]=ie,e[63]=K):K=e[63];const Q=K;let Y;e[64]!==V||e[65]!==N||e[66]!==y||e[67]!==p||e[68]!==P||e[69]!==Q||e[70]!==r?(Y=N?n.jsx("button",{type:"button",className:Q,"aria-label":r("contextUsage.aria.label"),"aria-pressed":P,onClick:p,children:V}):n.jsx("div",{className:Q,"aria-label":r("contextUsage.aria.label"),onClick:y?()=>$(!0):void 0,children:V}),e[64]=V,e[65]=N,e[66]=y,e[67]=p,e[68]=P,e[69]=Q,e[70]=r,e[71]=Y):Y=e[71];const R=Y;if(y){let ue;e[72]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>$(!1),e[72]=ue):ue=e[72];let re;e[73]!==r?(re=r("contextUsage.mobile.title"),e[73]=r,e[74]=re):re=e[74];let ce;e[75]!==r?(ce=r("contextUsage.mobile.usedTokens"),e[75]=r,e[76]=ce):ce=e[76];let le;e[77]!==ce?(le=n.jsx("span",{className:"typography-meta text-muted-foreground",children:ce}),e[77]=ce,e[78]=le):le=e[78];let de;e[79]!==b||e[80]!==m||e[81]!==s.totalTokens?(de=m?b(s.totalTokens):ze,e[79]=b,e[80]=m,e[81]=s.totalTokens,e[82]=de):de=e[82];let X;e[83]!==de?(X=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:de}),e[83]=de,e[84]=X):X=e[84];let Z;e[85]!==le||e[86]!==X?(Z=n.jsxs("div",{className:"flex justify-between items-center",children:[le,X]}),e[85]=le,e[86]=X,e[87]=Z):Z=e[87];let A;e[88]!==r?(A=r("contextUsage.mobile.contextLimit"),e[88]=r,e[89]=A):A=e[89];let O;e[90]!==A?(O=n.jsx("span",{className:"typography-meta text-muted-foreground",children:A}),e[90]=A,e[91]=O):O=e[91];let G;e[92]!==d||e[93]!==b?(G=b(d),e[92]=d,e[93]=b,e[94]=G):G=e[94];let W;e[95]!==G?(W=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:G}),e[95]=G,e[96]=W):W=e[96];let ee;e[97]!==O||e[98]!==W?(ee=n.jsxs("div",{className:"flex justify-between items-center",children:[O,W]}),e[97]=O,e[98]=W,e[99]=ee):ee=e[99];let fe;e[100]!==r?(fe=r("contextUsage.mobile.outputLimit"),e[100]=r,e[101]=fe):fe=e[101];let pe;e[102]!==fe?(pe=n.jsx("span",{className:"typography-meta text-muted-foreground",children:fe}),e[102]=fe,e[103]=pe):pe=e[103];let he;e[104]!==b||e[105]!==z?(he=b(z),e[104]=b,e[105]=z,e[106]=he):he=e[106];let xe;e[107]!==he?(xe=n.jsx("span",{className:"typography-meta text-foreground font-medium",children:he}),e[107]=he,e[108]=xe):xe=e[108];let ge;e[109]!==pe||e[110]!==xe?(ge=n.jsxs("div",{className:"flex justify-between items-center",children:[pe,xe]}),e[109]=pe,e[110]=xe,e[111]=ge):ge=e[111];let be;e[112]!==D||e[113]!==I||e[114]!==r?(be=D?n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"typography-meta text-muted-foreground",children:r("contextUsage.mobile.cost")}),n.jsx("span",{className:"typography-meta text-foreground font-medium",children:Ee(I)})]}):null,e[112]=D,e[113]=I,e[114]=r,e[115]=be):be=e[115];let we;e[116]!==r?(we=r("contextUsage.mobile.usage"),e[116]=r,e[117]=we):we=e[117];let je;e[118]!==we?(je=n.jsx("span",{className:"typography-meta text-muted-foreground",children:we}),e[118]=we,e[119]=je):je=e[119];let ye;e[120]!==C||e[121]!==k||e[122]!==m?(ye=te("typography-meta font-semibold",m?k(C):"text-muted-foreground"),e[120]=C,e[121]=k,e[122]=m,e[123]=ye):ye=e[123];let ve;e[124]!==S||e[125]!==ye?(ve=n.jsx("span",{className:ye,children:S}),e[124]=S,e[125]=ye,e[126]=ve):ve=e[126];let _e;e[127]!==je||e[128]!==ve?(_e=n.jsxs("div",{className:"flex justify-between items-center pt-1 border-t border-border/40",children:[je,ve]}),e[127]=je,e[128]=ve,e[129]=_e):_e=e[129];let Ne;e[130]!==Z||e[131]!==ee||e[132]!==ge||e[133]!==be||e[134]!==_e?(Ne=n.jsxs("div",{className:"rounded-xl border border-border/40 bg-sidebar/30 px-3 py-2 space-y-1",children:[Z,ee,ge,be,_e]}),e[130]=Z,e[131]=ee,e[132]=ge,e[133]=be,e[134]=_e,e[135]=Ne):Ne=e[135];let Se;e[136]!==m||e[137]!==r?(Se=m?null:n.jsx("p",{className:"px-1 typography-meta text-muted-foreground",children:r("contextUsage.compacted.description")}),e[136]=m,e[137]=r,e[138]=Se):Se=e[138];let Ce;e[139]!==Ne||e[140]!==Se?(Ce=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[Ne,Se]}),e[139]=Ne,e[140]=Se,e[141]=Ce):Ce=e[141];let ke;e[142]!==T||e[143]!==re||e[144]!==Ce?(ke=n.jsx(Je,{open:T,onClose:ue,title:re,children:Ce}),e[142]=T,e[143]=re,e[144]=Ce,e[145]=ke):ke=e[145];let Te;return e[146]!==R||e[147]!==ke?(Te=n.jsxs(n.Fragment,{children:[R,ke]}),e[146]=R,e[147]=ke,e[148]=Te):Te=e[148],Te}let U;e[149]!==R?(U=n.jsx(Xe,{asChild:!0,children:R}),e[149]=R,e[150]=U):U=e[150];let J;e[151]!==oe?(J=n.jsx(Ke,{children:n.jsx("div",{className:"space-y-0.5",children:oe.map(ht)})}),e[151]=oe,e[152]=J):J=e[152];let F;return e[153]!==U||e[154]!==J?(F=n.jsxs(Ze,{children:[U,J]}),e[153]=U,e[154]=J,e[155]=F):F=e[155],F};function ft(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toFixed(1).replace(/\.0$/,"")}function pt(t){return t>=90?"text-status-error":t>=75?"text-status-warning":"text-status-success"}function ht(t){return n.jsx("p",{className:"typography-micro leading-tight",children:t},t)}const Xt=t=>t.state==="compacted"?{state:"compacted"}:{state:"measured",totalTokens:t.totalTokens,percentage:t.contextLimit>0?Math.min(999,t.totalTokens/t.contextLimit*100):0,colorPercentage:t.percentage},xt={close:"#FF5F57",minimize:"#FEBC2E",maximize:"#28C940"},gt="rgba(0, 0, 0, 0.7)",bt=t=>{const e=se.c(3),{action:s}=t;if(s==="close"){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(B,{name:"close",className:"size-[10px]"}),e[0]=l):l=e[0],l}if(s==="minimize"){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(B,{name:"subtract",className:"size-[10px]"}),e[1]=l):l=e[1],l}let d;return e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(B,{name:"add",className:"size-[10px]"}),e[2]=d):d=e[2],d},wt=t=>{const e=se.c(18),{action:s,isMaximized:d,onActivate:l}=t,{t:c}=Le(),i=xt[s];let a;e[0]!==s||e[1]!==d||e[2]!==c?(a=c(s==="close"?"header.windowControls.close":s==="minimize"?"header.windowControls.minimize":d?"header.windowControls.restore":"header.windowControls.maximize"),e[0]=s,e[1]=d,e[2]=c,e[3]=a):a=e[3];const u=a;let h;e[4]!==s||e[5]!==l?(h=()=>l(s),e[4]=s,e[5]=l,e[6]=h):h=e[6];let o;e[7]!==i?(o={backgroundColor:i,color:gt},e[7]=i,e[8]=o):o=e[8];let f;e[9]!==s?(f=n.jsx("span",{className:"flex items-center justify-center opacity-0 transition-opacity duration-75 group-hover/wctl:opacity-100",children:n.jsx(bt,{action:s})}),e[9]=s,e[10]=f):f=e[10];let g;e[11]!==o||e[12]!==f?(g=n.jsx("span",{className:"flex size-3.5 items-center justify-center rounded-full shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.28)] transition-[filter] duration-75 active:brightness-90",style:o,children:f}),e[11]=o,e[12]=f,e[13]=g):g=e[13];let p;return e[14]!==u||e[15]!==h||e[16]!==g?(p=n.jsx("button",{type:"button",onClick:h,title:u,"aria-label":u,className:"app-region-no-drag flex h-8 w-[24px] items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:g}),e[14]=u,e[15]=h,e[16]=g,e[17]=p):p=e[17],p},Zt=H.memo(function(e){const s=se.c(25),{visible:d,position:l}=e,c=l===void 0?"right":l,{t:i}=Le(),[a,u]=H.useState(!1),h=De(jt);let o,f;if(s[0]!==d?(o=()=>{if(!d)return;let _=!1;me("desktop_get_current_window_state").then(P=>{_||u(!!P?.maximized)}).catch(yt);const L=P=>{const r=P.detail;u(!!r?.maximized)};return window.addEventListener("openchamber:window-maximized-changed",L),()=>{_=!0,window.removeEventListener("openchamber:window-maximized-changed",L)}},f=[d],s[0]=d,s[1]=o,s[2]=f):(o=s[1],f=s[2]),Be.useEffect(o,f),!d)return null;const g=c==="left";let p,x,w,j;if(s[3]!==h||s[4]!==g||s[5]!==a||s[6]!==c||s[7]!==i){j=Symbol.for("react.early_return_sentinel");e:{const _=Ve(c);let L;s[12]===Symbol.for("react.memo_cache_sentinel")?(L=m=>{if(m==="close"){me("desktop_close_current_window");return}if(m==="minimize"){me("desktop_minimize_current_window");return}me("desktop_toggle_current_window_maximized").then(v=>u(!!v?.maximized)).catch(vt)},s[12]=L):L=s[12];const P=L;if(h==="traffic-lights"){const m=g?"mr-1":"ml-1 mr-3";let v;s[13]!==m?(v=te("app-region-no-drag group/wctl flex h-8 shrink-0 items-center",m),s[13]=m,s[14]=v):v=s[14];let C;s[15]!==i?(C=i("header.windowControls.groupAria"),s[15]=i,s[16]=C):C=s[16];let b;s[17]!==a?(b=k=>n.jsx(wt,{action:k,isMaximized:a,onActivate:P},k),s[17]=a,s[18]=b):b=s[18],j=n.jsx("div",{className:v,"aria-label":C,children:_.map(b)});break e}const r=te("app-region-no-drag inline-flex items-center justify-center text-muted-foreground transition-colors hover:bg-interactive-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",g?"h-8 w-8 rounded-md":"h-12 w-11"),T=g?"app-region-no-drag mr-1 flex h-8 shrink-0 items-center":"app-region-no-drag ml-1 flex h-12 shrink-0 items-center",$=m=>m==="minimize"?n.jsx("button",{type:"button",className:r,onClick:_t,title:i("header.windowControls.minimize"),"aria-label":i("header.windowControls.minimize"),children:n.jsx(B,{name:"subtract",className:"h-4 w-4"})},"minimize"):m==="maximize"?n.jsx("button",{type:"button",className:r,onClick:()=>{me("desktop_toggle_current_window_maximized").then(v=>u(!!v?.maximized)).catch(Nt)},title:i(a?"header.windowControls.restore":"header.windowControls.maximize"),"aria-label":i(a?"header.windowControls.restore":"header.windowControls.maximize"),children:n.jsx(B,{name:a?"fullscreen-exit":"checkbox-blank",className:"h-3.5 w-3.5"})},"maximize"):n.jsx("button",{type:"button",className:te(r,"hover:bg-[var(--status-error)] hover:text-[var(--status-error-foreground)]"),onClick:St,title:i("header.windowControls.close"),"aria-label":i("header.windowControls.close"),children:n.jsx(B,{name:"close",className:"h-4 w-4"})},"close");p=T,s[19]!==i?(x=i("header.windowControls.groupAria"),s[19]=i,s[20]=x):x=s[20],w=_.map($)}s[3]=h,s[4]=g,s[5]=a,s[6]=c,s[7]=i,s[8]=p,s[9]=x,s[10]=w,s[11]=j}else p=s[8],x=s[9],w=s[10],j=s[11];if(j!==Symbol.for("react.early_return_sentinel"))return j;let y;return s[21]!==p||s[22]!==x||s[23]!==w?(y=n.jsx("div",{className:p,"aria-label":x,children:w}),s[21]=p,s[22]=x,s[23]=w,s[24]=y):y=s[24],y});function jt(t){return t.desktopWindowControlsStyle}function yt(){}function vt(){}function _t(){me("desktop_minimize_current_window")}function Nt(){}function St(){me("desktop_close_current_window")}const Fe="new-session";function es(t){const e=se.c(18),{children:s,variant:d,scopeProjectId:l,align:c}=t,i=d===void 0?"default":d,a=l===void 0?null:l,u=c===void 0?"start":c,h=De(kt),o=De(Ct);let f;e[0]!==s?(f=n.jsx(et,{asChild:!0,children:s}),e[0]=s,e[1]=f):f=e[1];const g=i==="compact"?"w-[280px]":"w-[360px]";let p;e[2]!==g?(p=te("overflow-hidden p-1 max-w-[calc(100vw-32px)]",g),e[2]=g,e[3]=p):p=e[3];let x;e[4]!==h||e[5]!==a||e[6]!==o||e[7]!==i?(x=h?n.jsx(It,{onSelect:()=>o(!1),variant:i,scopeProjectId:a}):null,e[4]=h,e[5]=a,e[6]=o,e[7]=i,e[8]=x):x=e[8];let w;e[9]!==u||e[10]!==p||e[11]!==x?(w=n.jsx(tt,{align:u,sideOffset:6,className:p,children:x}),e[9]=u,e[10]=p,e[11]=x,e[12]=w):w=e[12];let j;return e[13]!==h||e[14]!==o||e[15]!==f||e[16]!==w?(j=n.jsxs(st,{open:h,onOpenChange:o,modal:!1,disableGlobalShortcuts:!0,children:[f,w]}),e[13]=h,e[14]=o,e[15]=f,e[16]=w,e[17]=j):j=e[17],j}function Ct(t){return t.setSessionDropdownOpen}function kt(t){return t.isSessionDropdownOpen}function It(t){const e=se.c(31),{onSelect:s,variant:d,scopeProjectId:l}=t,c=Ie(Tt),i=Ie(Lt);let a;e[0]!==c||e[1]!==l?(a={scopeProjectId:l,currentSessionId:c},e[0]=c,e[1]=l,e[2]=a):a=e[2];const u=nt(!0,a),h=Ie(Dt),{t:o}=Le();let f;e[3]!==s||e[4]!==h?(f=()=>{s(),h()},e[3]=s,e[4]=h,e[5]=f):f=e[5];const g=f;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=new Set,e[6]=p):p=e[6];const[x,w]=H.useState(p),j=H.useRef(null),y=H.useRef(!1),_=i?Fe:c;let L;e[7]===Symbol.for("react.memo_cache_sentinel")?(L=N=>{w(I=>{const S=new Set(I);return S.has(N)?S.delete(N):S.add(N),S})},e[7]=L):L=e[7];const P=L;let r,T;e[8]!==x||e[9]!==_||e[10]!==u?(r=()=>{if(y.current||!_)return;const N=_===Fe?[]:ot(u,_);if(!N)return;if(N.some(S=>!x.has(S))){w(S=>new Set([...S,...N]));return}const I=requestAnimationFrame(()=>{const S=Array.from(j.current?.querySelectorAll("[data-switcher-item-id]")??[]).find(z=>z.dataset.switcherItemId===_);S&&(S.focus(),S.scrollIntoView({block:"nearest"}),y.current=!0)});return()=>cancelAnimationFrame(I)},T=[x,_,u],e[8]=x,e[9]=_,e[10]=u,e[11]=r,e[12]=T):(r=e[11],T=e[12]),H.useLayoutEffect(r,T);let $,m;e[13]===Symbol.for("react.memo_cache_sentinel")?($=te("group relative flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 outline-hidden select-none","data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover"),m=n.jsx(B,{name:"chat-new",className:"h-4 w-4 flex-shrink-0 text-muted-foreground"}),e[13]=$,e[14]=m):($=e[13],m=e[14]);let v;e[15]!==o?(v=o("sessions.sidebar.header.actions.newSession"),e[15]=o,e[16]=v):v=e[16];let C;e[17]!==v?(C=n.jsx("span",{className:"truncate typography-ui-label font-normal leading-tight text-foreground",children:v}),e[17]=v,e[18]=C):C=e[18];let b;e[19]!==g||e[20]!==C?(b=n.jsxs(Re,{"data-switcher-item-id":Fe,onClick:g,className:$,children:[m,C]}),e[19]=g,e[20]=C,e[21]=b):b=e[21];let k;e[22]!==x||e[23]!==u||e[24]!==s||e[25]!==o||e[26]!==d?(k=u.length===0?n.jsx("div",{className:"px-3 py-4 text-center typography-meta text-muted-foreground",children:o("sessions.switcher.empty")}):u.map(N=>n.jsx(Ae,{item:N,depth:0,variant:d,expandedParents:x,toggleParent:P,closeDropdown:s},N.node.session.id)),e[22]=x,e[23]=u,e[24]=s,e[25]=o,e[26]=d,e[27]=k):k=e[27];let D;return e[28]!==b||e[29]!==k?(D=n.jsx(it,{ref:j,outerClassName:"max-h-[60vh]",disableHorizontal:!0,children:n.jsxs("div",{className:"space-y-0.5",children:[b,k]})}),e[28]=b,e[29]=k,e[30]=D):D=e[30],D}function Dt(t){return t.openNewSessionDraft}function Lt(t){return t.newSessionDraft.open===!0}function Tt(t){return t.currentSessionId}function Ae(t){const e=se.c(31),{item:s,depth:d,variant:l,expandedParents:c,toggleParent:i,closeDropdown:a}=t,{node:u,secondaryMeta:h}=s,o=u.session,f=u.children.length>0;let g;e[0]!==c||e[1]!==o.id?(g=c.has(o.id),e[0]=c,e[1]=o.id,e[2]=g):g=e[2];const p=g;let x;e[3]!==f||e[4]!==o.id||e[5]!==i?(x=f?()=>i(o.id):void 0,e[3]=f,e[4]=o.id,e[5]=i,e[6]=x):x=e[6];let w;e[7]!==a||e[8]!==d||e[9]!==f||e[10]!==p||e[11]!==h||e[12]!==o||e[13]!==x||e[14]!==l?(w=n.jsx(zt,{session:o,depth:d,variant:l,secondaryMeta:h,hasChildren:f,isExpanded:p,onToggleExpand:x,closeDropdown:a}),e[7]=a,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=o,e[13]=x,e[14]=l,e[15]=w):w=e[15];let j;e[16]!==a||e[17]!==d||e[18]!==c||e[19]!==f||e[20]!==p||e[21]!==s.groupDirectory||e[22]!==s.projectId||e[23]!==u.children||e[24]!==h||e[25]!==i||e[26]!==l?(j=f&&p?u.children.map(_=>n.jsx(Ae,{item:{node:_,projectId:s.projectId,groupDirectory:s.groupDirectory,secondaryMeta:h},depth:d+1,variant:l,expandedParents:c,toggleParent:i,closeDropdown:a},_.session.id)):null,e[16]=a,e[17]=d,e[18]=c,e[19]=f,e[20]=p,e[21]=s.groupDirectory,e[22]=s.projectId,e[23]=u.children,e[24]=h,e[25]=i,e[26]=l,e[27]=j):j=e[27];let y;return e[28]!==w||e[29]!==j?(y=n.jsxs(n.Fragment,{children:[w,j]}),e[28]=w,e[29]=j,e[30]=y):y=e[30],y}function zt(t){const e=se.c(57),{session:s,depth:d,variant:l,secondaryMeta:c,hasChildren:i,isExpanded:a,onToggleExpand:u,closeDropdown:h}=t,{t:o}=Le(),f=Ie($t),g=Ie(Pt),p=De(Ft),x=rt(s.id),w=lt(s.id),j=f===s.id;let y;e[0]!==s.title||e[1]!==o?(y=s.title?.trim()||o("sessions.sidebar.session.untitled"),e[0]=s.title,e[1]=o,e[2]=y):y=e[2];const _=y,L=!!s.parentID,P=w>0&&(!L||p),r=x?.type??"idle",T=r==="busy"||r==="retry",$=!T&&P&&!j;let m;e[3]!==s.time?.created||e[4]!==s.time?.updated?(m=s.time?.updated||s.time?.created||Date.now(),e[3]=s.time?.created,e[4]=s.time?.updated,e[5]=m):m=e[5];const v=m;let C;e[6]!==v?(C=at(v),e[6]=v,e[7]=C):C=e[7];const b=C;let k;e[8]!==c?.projectLabel?(k=c?.projectLabel?.trim()||null,e[8]=c?.projectLabel,e[9]=k):k=e[9];const D=k;let N;e[10]!==c?.branchLabel?(N=c?.branchLabel?.trim()||null,e[10]=c?.branchLabel,e[11]=N):N=e[11];const I=N,S=I&&I!=="HEAD"?I:null;let z;e[12]!==h||e[13]!==j||e[14]!==s||e[15]!==g?(z=()=>{if(j){h();return}const F=ct(s);g(s.id,F??null),h()},e[12]=h,e[13]=j,e[14]=s,e[15]=g,e[16]=z):z=e[16];const q=z;let E;e[17]!==q?(E=F=>{if(F.target?.closest("[data-switcher-expand]")){F.preventDefault();return}q()},e[17]=q,e[18]=E):E=e[18];const ne=s.id,oe=j&&"bg-interactive-selection text-interactive-selection-foreground hover:bg-interactive-selection data-[highlighted]:bg-interactive-selection";let M;e[19]!==oe?(M=te("group relative flex w-full cursor-pointer items-start gap-2 rounded-lg px-2 py-1.5 outline-hidden select-none","data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover",oe),e[19]=oe,e[20]=M):M=e[20];const ae=8+d*12;let V;e[21]!==ae?(V={paddingLeft:ae},e[21]=ae,e[22]=V):V=e[22];let ie;e[23]!==i||e[24]!==a||e[25]!==u||e[26]!==o||e[27]!==l?(ie=l==="compact"&&i?n.jsx("span",{role:"button",tabIndex:-1,"data-switcher-expand":!0,onClick:F=>{F.preventDefault(),F.stopPropagation(),u?.()},className:"inline-flex h-3.5 w-3.5 flex-shrink-0 items-center justify-center rounded text-muted-foreground/70 hover:text-foreground","aria-label":o(a?"sessions.sidebar.session.subsessions.collapse":"sessions.sidebar.session.subsessions.expand"),children:a?n.jsx(B,{name:"arrow-down-s",className:"h-3.5 w-3.5"}):n.jsx(B,{name:"arrow-right-s",className:"h-3.5 w-3.5"})}):null,e[23]=i,e[24]=a,e[25]=u,e[26]=o,e[27]=l,e[28]=ie):ie=e[28];let K;e[29]!==_?(K=n.jsx("span",{className:"truncate typography-ui-label font-normal leading-tight text-foreground",children:_}),e[29]=_,e[30]=K):K=e[30];let Q;e[31]!==ie||e[32]!==K?(Q=n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[ie,K]}),e[31]=ie,e[32]=K,e[33]=Q):Q=e[33];let Y;e[34]!==S||e[35]!==i||e[36]!==a||e[37]!==u||e[38]!==D||e[39]!==o||e[40]!==b||e[41]!==l?(Y=l==="default"?n.jsxs("div",{className:"flex min-w-0 items-center gap-1.5 truncate text-muted-foreground/70 leading-tight",style:{fontSize:"calc(var(--text-ui-label) * 0.85)"},children:[i?n.jsx("span",{role:"button",tabIndex:-1,"data-switcher-expand":!0,onClick:F=>{F.preventDefault(),F.stopPropagation(),u?.()},className:"inline-flex h-3 w-3 flex-shrink-0 items-center justify-center rounded text-muted-foreground/70 hover:text-foreground","aria-label":o(a?"sessions.sidebar.session.subsessions.collapse":"sessions.sidebar.session.subsessions.expand"),children:a?n.jsx(B,{name:"arrow-down-s",className:"h-3 w-3"}):n.jsx(B,{name:"arrow-right-s",className:"h-3 w-3"})}):null,n.jsx("span",{className:"flex-shrink-0",children:b}),D?n.jsx("span",{className:"truncate",children:D}):null,S?n.jsxs("span",{className:"inline-flex min-w-0 items-center gap-0.5",children:[n.jsx(B,{name:"git-branch",className:"h-3 w-3 flex-shrink-0 text-muted-foreground/70"}),n.jsx("span",{className:"truncate",children:S})]}):null]}):null,e[34]=S,e[35]=i,e[36]=a,e[37]=u,e[38]=D,e[39]=o,e[40]=b,e[41]=l,e[42]=Y):Y=e[42];let R;e[43]!==Q||e[44]!==Y?(R=n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[Q,Y]}),e[43]=Q,e[44]=Y,e[45]=R):R=e[45];let U;e[46]!==T||e[47]!==$||e[48]!==o?(U=T||$?n.jsx("span",{className:"flex h-3 w-3 flex-shrink-0 items-center justify-center self-center",children:T?n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary animate-busy-pulse","aria-label":o("sessions.sidebar.session.status.active"),title:o("sessions.sidebar.session.status.active")}):n.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--status-info)]","aria-label":o("sessions.sidebar.session.status.unread"),title:o("sessions.sidebar.session.status.unread")})}):null,e[46]=T,e[47]=$,e[48]=o,e[49]=U):U=e[49];let J;return e[50]!==s.id||e[51]!==M||e[52]!==V||e[53]!==R||e[54]!==U||e[55]!==E?(J=n.jsxs(Re,{onClick:E,"data-slot":"session-switcher-item","data-switcher-item-id":ne,className:M,style:V,children:[R,U]}),e[50]=s.id,e[51]=M,e[52]=V,e[53]=R,e[54]=U,e[55]=E,e[56]=J):J=e[56],J}function Ft(t){return t.notifyOnSubtasks}function Pt(t){return t.setCurrentSession}function $t(t){return t.currentSessionId}const Et=H.lazy(()=>Ue(()=>import("./GuestAttachDialog-B808E0-d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83])).then(t=>({default:t.GuestAttachDialog}))),Oe=H.lazy(()=>Ue(()=>import("./PluginPane-DEcgDQ9h.js").then(t=>t.k),__vite__mapDeps([83,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82])).then(t=>({default:t.PluginPane}))),ts=()=>{const t=se.c(11),e=$e(Mt),s=$e(Rt),d=dt(Ut),l=ut(At);let c;t[0]!==l?(c=l.map(Ot),t[0]=l,t[1]=c):c=t[1];let i;t[2]!==s||t[3]!==e?(i=e?n.jsx(H.Suspense,{fallback:null,children:n.jsx(Et,{guestId:e.guestId,item:e.item,onOpenChange:h=>{h||s()}})}):null,t[2]=s,t[3]=e,t[4]=i):i=t[4];let a;t[5]!==d?(a=d?n.jsx("div",{"aria-hidden":"true",className:"pointer-events-none fixed top-0 -left-[9999px] h-px w-px overflow-hidden",children:n.jsx(H.Suspense,{fallback:null,children:n.jsx(Oe,{mode:Me(d),surface:"panel",headless:!0})})}):null,t[5]=d,t[6]=a):a=t[6];let u;return t[7]!==c||t[8]!==i||t[9]!==a?(u=n.jsxs(n.Fragment,{children:[c,i,a]}),t[7]=c,t[8]=i,t[9]=a,t[10]=u):u=t[10],u};function Mt(t){return t.request}function Rt(t){return t.close}function Ut(t){return t.guestId}function At(t){return t.requests}function Ot(t){return n.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none fixed top-0 -left-[9999px] h-px w-px overflow-hidden",children:n.jsx(H.Suspense,{fallback:null,children:n.jsx(Oe,{mode:Me(t.guestId),surface:"background",headless:!0,backgroundAction:t})})},t.id)}const Ge=()=>{const t=[document.documentElement,document.body],e=document.getElementById("root");return e&&t.push(e),t},We=()=>{let t=!1;for(const e of Ge())e.scrollTop!==0&&(e.scrollTop=0,t=!0),e.scrollLeft!==0&&(e.scrollLeft=0,t=!0);return t},Gt=t=>t===document||Ge().some(e=>e===t),ss=()=>{const t=se.c(1);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],t[0]=e):e=t[0],H.useEffect(Bt,e)};function Wt(t){Gt(t.target)&&We()}function Bt(){const t=Wt;return document.addEventListener("scroll",t,{capture:!0,passive:!0}),We(),()=>document.removeEventListener("scroll",t,{capture:!0})}export{Jt as C,ts as G,es as S,Zt as W,ss as a,Ee as f,Xt as t,Yt as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-BVBnan19.js","assets/vendor-codemirror-language-BgPj_McA.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-C9awkmn-.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-CiLROUVV.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-DzPz9Wgq.js","assets/vendor-codemirror-lang-cpp-DhkseaMo.js","assets/vendor-lezer-cpp-BleAU9o-.js","assets/vendor-codemirror-lang-css-O0cZX78y.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-go-fMdQYcON.js","assets/vendor-lezer-go-CXK1UKk8.js","assets/vendor-codemirror-lang-html-CfgK872x.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-javascript-Cc2ZYbgX.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-codemirror-lang-java-CQj4S3zl.js","assets/vendor-lezer-java-D_zzj-NV.js","assets/vendor-codemirror-lang-jinja-BmZZv8g-.js","assets/vendor-codemirror-lang-json-CMBS2tG9.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-less-C6Eo8hVS.js","assets/vendor-codemirror-lang-liquid-DSTR47-H.js","assets/vendor-codemirror-lang-markdown-BPGOH9ye.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-lang-php-DD9udfPH.js","assets/vendor-lezer-php-_DHrbsZG.js","assets/vendor-codemirror-lang-python-HahnQaAS.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-lang-rust-nLTovbjv.js","assets/vendor-lezer-rust-Lqgd5SAo.js","assets/vendor-codemirror-lang-sass-pL2Yc72v.js","assets/vendor-lezer-sass-Dnm2lY4t.js","assets/vendor-codemirror-lang-wast-B0_m5DqU.js","assets/vendor-codemirror-lang-xml-Dj3voadT.js","assets/vendor-lezer-xml-hUDuAyS5.js","assets/vendor-codemirror-lang-yaml-yu-9Z5u7.js","assets/vendor-lezer-yaml-BNIl6S_O.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-CIGw5rlb.js","assets/javascript-BO_2ioGC.js","assets/useAppFontEffects-khZXpFL_.js","assets/vendor-react-BUCujlKS.js","assets/vendor-scheduler-7OC5HNn7.js","assets/index-Cbci4i1W.js","assets/vendor-zod-CgAdXWZO.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-zustand-BAGL70zf.js","assets/vendor-opencode-sdk-BJ73u-bH.js","assets/index-DqaMWNrC.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-base-ui-CsXYnR5c.js","assets/vendor-floating-ui-utils-D6FqdtJt.js","assets/vendor-floating-ui-react-dom-DxYCWdHj.js","assets/vendor-floating-ui-dom-BTvzWks8.js","assets/vendor-floating-ui-core-PuGzNPnN.js","assets/vendor-use-sync-external-store-D6wYuSt-.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-dnd-kit-core-BZknOX2w.js","assets/vendor-dnd-kit-utilities-B_MdXhJC.js","assets/vendor-dnd-kit-accessibility-BHxJPORy.js","assets/vendor-dnd-kit-sortable-CsEagZ81.js","assets/vendor-framer-motion-Bq3iTZ6r.js","assets/vendor-motion-dom-DcCgeG69.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-tanstack-react-virtual-ClYN8CzB.js","assets/vendor-tanstack-virtual-core-BewVQryB.js","assets/contextPanelEmbeddedChat-CirXEPJq.js","assets/vendor-sonner-DFyL3AvE.js","assets/vendor-cmdk-DgLInKvT.js","assets/vendor-radix-ui-react-dialog-B94Bt2qq.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-DcAh5WdT.js","assets/vendor-radix-ui-react-context-Czxm7Z62.js","assets/vendor-radix-ui-react-id-f5BLKEVw.js","assets/vendor-radix-ui-react-use-layout-effect-D_3IhJdJ.js","assets/vendor-radix-ui-react-use-controllable-state-BFT5YmkA.js","assets/vendor-radix-ui-react-dismissable-layer-D7kXcwgJ.js","assets/vendor-radix-ui-react-primitive-DhVoX9SD.js","assets/vendor-radix-ui-react-slot-BQgQOasS.js","assets/vendor-radix-ui-react-use-callback-ref-BZPnuXAC.js","assets/vendor-radix-ui-react-use-escape-keydown-oph88g-F.js","assets/vendor-radix-ui-react-focus-scope-CiaxW4dD.js","assets/vendor-radix-ui-react-portal-BMJYHWck.js","assets/vendor-radix-ui-react-presence-CNxf-uq4.js","assets/vendor-radix-ui-react-focus-guards-B6qJXYua.js","assets/vendor-react-remove-scroll-DO7dCTnK.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-BcFYyj3E.js","assets/vendor-react-style-singleton-q6EMHnwf.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-zDC0RhA3.js","assets/vendor-use-callback-ref-D3RC8gqK.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-commands-B7H_j0iU.js","assets/vendor-legendapp-list-BuBPBC3R.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/vendor-codemirror-lang-vue-BqGzJVm1.js","assets/vendor-codemirror-lang-angular-DEPs2M5t.js"])))=>i.map(i=>d[i]);
2
- import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-BgPj_McA.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-BVBnan19.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-DhkseaMo.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-DhkseaMo.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-O0cZX78y.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-fMdQYcON.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-CfgK872x.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-CQj4S3zl.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-BmZZv8g-.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-CMBS2tG9.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-C6Eo8hVS.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-DSTR47-H.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-BPGOH9ye.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-DD9udfPH.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-HahnQaAS.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-nLTovbjv.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-pL2Yc72v.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-pL2Yc72v.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-B0_m5DqU.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml-Dj3voadT.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-yu-9Z5u7.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-VAEuO923.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./useAppFontEffects-khZXpFL_.js").then(e=>e.kP),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,104,105,106,107])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-BqGzJVm1.js"),__vite__mapDeps([108,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-DEPs2M5t.js"),__vite__mapDeps([109,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-codemirror-lang-sql-BVBnan19.js","assets/vendor-codemirror-language-BgPj_McA.js","assets/vendor-lezer-common-B3-cUCR_.js","assets/vendor-codemirror-state-C9awkmn-.js","assets/vendor-marijn-find-cluster-break-DXwl3gUT.js","assets/vendor-codemirror-view-CiLROUVV.js","assets/vendor-style-mod-NZ5MEPvj.js","assets/vendor-w3c-keyname-Vcq4gwWv.js","assets/vendor-crelt-C8TCjufn.js","assets/vendor-lezer-highlight-CDMHUZ74.js","assets/vendor-lezer-lr-bhwg1HMg.js","assets/vendor-codemirror-autocomplete-DzPz9Wgq.js","assets/vendor-codemirror-lang-cpp-DhkseaMo.js","assets/vendor-lezer-cpp-BleAU9o-.js","assets/vendor-codemirror-lang-css-O0cZX78y.js","assets/vendor-lezer-css-C5xB6jxd.js","assets/vendor-codemirror-lang-go-fMdQYcON.js","assets/vendor-lezer-go-CXK1UKk8.js","assets/vendor-codemirror-lang-html-CfgK872x.js","assets/vendor-lezer-html-C0I1p52t.js","assets/vendor-codemirror-lang-javascript-Cc2ZYbgX.js","assets/vendor-lezer-javascript-D7Tj24ot.js","assets/vendor-codemirror-lang-java-CQj4S3zl.js","assets/vendor-lezer-java-D_zzj-NV.js","assets/vendor-codemirror-lang-jinja-BmZZv8g-.js","assets/vendor-codemirror-lang-json-CMBS2tG9.js","assets/vendor-lezer-json-Iaex0UN-.js","assets/vendor-codemirror-lang-less-C6Eo8hVS.js","assets/vendor-codemirror-lang-liquid-DSTR47-H.js","assets/vendor-codemirror-lang-markdown-BPGOH9ye.js","assets/vendor-lezer-markdown-C6g-d6P3.js","assets/vendor-codemirror-lang-php-DD9udfPH.js","assets/vendor-lezer-php-_DHrbsZG.js","assets/vendor-codemirror-lang-python-HahnQaAS.js","assets/vendor-lezer-python-CvuFxeZl.js","assets/vendor-codemirror-lang-rust-nLTovbjv.js","assets/vendor-lezer-rust-Lqgd5SAo.js","assets/vendor-codemirror-lang-sass-pL2Yc72v.js","assets/vendor-lezer-sass-Dnm2lY4t.js","assets/vendor-codemirror-lang-wast-B0_m5DqU.js","assets/vendor-codemirror-lang-xml-Dj3voadT.js","assets/vendor-lezer-xml-hUDuAyS5.js","assets/vendor-codemirror-lang-yaml-yu-9Z5u7.js","assets/vendor-lezer-yaml-BNIl6S_O.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-CIGw5rlb.js","assets/javascript-BO_2ioGC.js","assets/useAppFontEffects-ne84JBVL.js","assets/vendor-react-BUCujlKS.js","assets/vendor-scheduler-7OC5HNn7.js","assets/index-Dqc6USl3.js","assets/vendor-zod-CgAdXWZO.js","assets/vendor-vite-runtime-DD1OZmLC.js","assets/vendor-zustand-BAGL70zf.js","assets/vendor-opencode-sdk-BJ73u-bH.js","assets/index-DqaMWNrC.css","assets/vendor-simplewebauthn-browser-VDA66rT_.js","assets/vendor-base-ui-CsXYnR5c.js","assets/vendor-floating-ui-utils-D6FqdtJt.js","assets/vendor-floating-ui-react-dom-DxYCWdHj.js","assets/vendor-floating-ui-dom-BTvzWks8.js","assets/vendor-floating-ui-core-PuGzNPnN.js","assets/vendor-use-sync-external-store-D6wYuSt-.js","assets/vendor-class-variance-authority-5VPnzWs2.js","assets/vendor-clsx-B-dksMZM.js","assets/vendor-dnd-kit-core-BZknOX2w.js","assets/vendor-dnd-kit-utilities-B_MdXhJC.js","assets/vendor-dnd-kit-accessibility-BHxJPORy.js","assets/vendor-dnd-kit-sortable-CsEagZ81.js","assets/vendor-framer-motion-Bq3iTZ6r.js","assets/vendor-motion-dom-DcCgeG69.js","assets/vendor-motion-utils-BGh8QBgx.js","assets/vendor-tanstack-react-virtual-ClYN8CzB.js","assets/vendor-tanstack-virtual-core-BewVQryB.js","assets/contextPanelEmbeddedChat-CirXEPJq.js","assets/vendor-sonner-DFyL3AvE.js","assets/vendor-cmdk-DgLInKvT.js","assets/vendor-radix-ui-react-dialog-B94Bt2qq.js","assets/vendor-radix-ui-primitive-Dc_FVRD7.js","assets/vendor-radix-ui-react-compose-refs-DcAh5WdT.js","assets/vendor-radix-ui-react-context-Czxm7Z62.js","assets/vendor-radix-ui-react-id-f5BLKEVw.js","assets/vendor-radix-ui-react-use-layout-effect-D_3IhJdJ.js","assets/vendor-radix-ui-react-use-controllable-state-BFT5YmkA.js","assets/vendor-radix-ui-react-dismissable-layer-D7kXcwgJ.js","assets/vendor-radix-ui-react-primitive-DhVoX9SD.js","assets/vendor-radix-ui-react-slot-BQgQOasS.js","assets/vendor-radix-ui-react-use-callback-ref-BZPnuXAC.js","assets/vendor-radix-ui-react-use-escape-keydown-oph88g-F.js","assets/vendor-radix-ui-react-focus-scope-CiaxW4dD.js","assets/vendor-radix-ui-react-portal-BMJYHWck.js","assets/vendor-radix-ui-react-presence-CNxf-uq4.js","assets/vendor-radix-ui-react-focus-guards-B6qJXYua.js","assets/vendor-react-remove-scroll-DO7dCTnK.js","assets/vendor-tslib-De9GV7Vy.js","assets/vendor-react-remove-scroll-bar-BcFYyj3E.js","assets/vendor-react-style-singleton-q6EMHnwf.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-zDC0RhA3.js","assets/vendor-use-callback-ref-D3RC8gqK.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-codemirror-commands-B7H_j0iU.js","assets/vendor-legendapp-list-BuBPBC3R.js","assets/vendor-tailwind-merge-CPcsbTWB.js","assets/vendor-fuse.js-Dw8P0qyA.js","assets/vendor-codemirror-lang-vue-BqGzJVm1.js","assets/vendor-codemirror-lang-angular-DEPs2M5t.js"])))=>i.map(i=>d[i]);
2
+ import{_ as o}from"./vendor-vite-runtime-DD1OZmLC.js";import{o as t,L as i,S as a}from"./vendor-codemirror-language-BgPj_McA.js";function n(e){return new i(a.define(e))}function r(e){return o(()=>import("./vendor-codemirror-lang-sql-BVBnan19.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(_=>_.sql({dialect:_[e]}))}const l=[t.of({name:"C",extensions:["c","h","ino"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-DhkseaMo.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return o(()=>import("./vendor-codemirror-lang-cpp-DhkseaMo.js"),__vite__mapDeps([12,13,10,2,9,1,3,4,5,6,7,8])).then(e=>e.cpp())}}),t.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return r("Cassandra")}}),t.of({name:"CSS",extensions:["css"],load(){return o(()=>import("./vendor-codemirror-lang-css-O0cZX78y.js"),__vite__mapDeps([14,15,10,2,9,1,3,4,5,6,7,8])).then(e=>e.css())}}),t.of({name:"Go",extensions:["go"],load(){return o(()=>import("./vendor-codemirror-lang-go-fMdQYcON.js"),__vite__mapDeps([16,17,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.go())}}),t.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return o(()=>import("./vendor-codemirror-lang-html-CfgK872x.js"),__vite__mapDeps([18,19,10,2,9,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.html())}}),t.of({name:"Java",extensions:["java"],load(){return o(()=>import("./vendor-codemirror-lang-java-CQj4S3zl.js"),__vite__mapDeps([22,23,10,2,9,1,3,4,5,6,7,8])).then(e=>e.java())}}),t.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript())}}),t.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return o(()=>import("./vendor-codemirror-lang-jinja-BmZZv8g-.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.jinja())}}),t.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return o(()=>import("./vendor-codemirror-lang-json-CMBS2tG9.js"),__vite__mapDeps([25,26,10,2,9,1,3,4,5,6,7,8])).then(e=>e.json())}}),t.of({name:"JSX",extensions:["jsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0}))}}),t.of({name:"LESS",extensions:["less"],load(){return o(()=>import("./vendor-codemirror-lang-less-C6Eo8hVS.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,14,15,10])).then(e=>e.less())}}),t.of({name:"Liquid",extensions:["liquid"],load(){return o(()=>import("./vendor-codemirror-lang-liquid-DSTR47-H.js"),__vite__mapDeps([28,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.liquid())}}),t.of({name:"MariaDB SQL",load(){return r("MariaSQL")}}),t.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return o(()=>import("./vendor-codemirror-lang-markdown-BPGOH9ye.js"),__vite__mapDeps([29,3,4,5,6,7,8,1,2,9,11,30,18,19,10,14,15,20,21])).then(e=>e.markdown())}}),t.of({name:"MS SQL",load(){return r("MSSQL")}}),t.of({name:"MySQL",load(){return r("MySQL")}}),t.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return o(()=>import("./vendor-codemirror-lang-php-DD9udfPH.js"),__vite__mapDeps([31,32,10,2,9,18,19,14,15,1,3,4,5,6,7,8,20,21,11])).then(e=>e.php())}}),t.of({name:"PLSQL",extensions:["pls"],load(){return r("PLSQL")}}),t.of({name:"PostgreSQL",load(){return r("PostgreSQL")}}),t.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return o(()=>import("./vendor-codemirror-lang-python-HahnQaAS.js"),__vite__mapDeps([33,34,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.python())}}),t.of({name:"Rust",extensions:["rs"],load(){return o(()=>import("./vendor-codemirror-lang-rust-nLTovbjv.js"),__vite__mapDeps([35,36,10,2,9,1,3,4,5,6,7,8])).then(e=>e.rust())}}),t.of({name:"Sass",extensions:["sass"],load(){return o(()=>import("./vendor-codemirror-lang-sass-pL2Yc72v.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass({indented:!0}))}}),t.of({name:"SCSS",extensions:["scss"],load(){return o(()=>import("./vendor-codemirror-lang-sass-pL2Yc72v.js"),__vite__mapDeps([37,38,10,2,9,1,3,4,5,6,7,8,14,15])).then(e=>e.sass())}}),t.of({name:"SQL",extensions:["sql"],load(){return r("StandardSQL")}}),t.of({name:"SQLite",load(){return r("SQLite")}}),t.of({name:"TSX",extensions:["tsx"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),t.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return o(()=>import("./vendor-codemirror-lang-javascript-Cc2ZYbgX.js"),__vite__mapDeps([20,21,10,2,9,1,3,4,5,6,7,8,11])).then(e=>e.javascript({typescript:!0}))}}),t.of({name:"WebAssembly",extensions:["wat","wast"],load(){return o(()=>import("./vendor-codemirror-lang-wast-B0_m5DqU.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10])).then(e=>e.wast())}}),t.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return o(()=>import("./vendor-codemirror-lang-xml-Dj3voadT.js"),__vite__mapDeps([40,41,10,2,9,1,3,4,5,6,7,8])).then(e=>e.xml())}}),t.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return o(()=>import("./vendor-codemirror-lang-yaml-yu-9Z5u7.js"),__vite__mapDeps([42,43,10,2,9,1,3,4,5,6,7,8])).then(e=>e.yaml())}}),t.of({name:"APL",extensions:["dyalog","apl"],load(){return o(()=>import("./apl-B4CMkyY2.js"),[]).then(e=>n(e.apl))}}),t.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return o(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(e=>n(e.asciiArmor))}}),t.of({name:"ASN.1",extensions:["asn","asn1"],load(){return o(()=>import("./asn1-EdZsLKOL.js"),[]).then(e=>n(e.asn1({})))}}),t.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return o(()=>import("./asterisk-B-8jnY81.js"),[]).then(e=>n(e.asterisk))}}),t.of({name:"Brainfuck",extensions:["b","bf"],load(){return o(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(e=>n(e.brainfuck))}}),t.of({name:"Cobol",extensions:["cob","cpy"],load(){return o(()=>import("./cobol-CWcv1MsR.js"),[]).then(e=>n(e.cobol))}}),t.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.csharp))}}),t.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"ClojureScript",extensions:["cljs"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return o(()=>import("./css-BnMrqG3P.js"),[]).then(e=>n(e.gss))}}),t.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return o(()=>import("./cmake-BQqOBYOt.js"),[]).then(e=>n(e.cmake))}}),t.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return o(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(e=>n(e.coffeeScript))}}),t.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return o(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(e=>n(e.commonLisp))}}),t.of({name:"Cypher",extensions:["cyp","cypher"],load(){return o(()=>import("./cypher-C_CwsFkJ.js"),[]).then(e=>n(e.cypher))}}),t.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return o(()=>import("./python-Cso5vRIg.js"),[]).then(e=>n(e.cython))}}),t.of({name:"Crystal",extensions:["cr"],load(){return o(()=>import("./crystal-SjHAIU92.js"),[]).then(e=>n(e.crystal))}}),t.of({name:"D",extensions:["d"],load(){return o(()=>import("./d-pRatUO7H.js"),[]).then(e=>n(e.d))}}),t.of({name:"Dart",extensions:["dart"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.dart))}}),t.of({name:"diff",extensions:["diff","patch"],load(){return o(()=>import("./diff-DbItnlRl.js"),[]).then(e=>n(e.diff))}}),t.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return o(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([44,45])).then(e=>n(e.dockerFile))}}),t.of({name:"DTD",extensions:["dtd"],load(){return o(()=>import("./dtd-DF_7sFjM.js"),[]).then(e=>n(e.dtd))}}),t.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return o(()=>import("./dylan-DwRh75JA.js"),[]).then(e=>n(e.dylan))}}),t.of({name:"EBNF",load(){return o(()=>import("./ebnf-CDyGwa7X.js"),[]).then(e=>n(e.ebnf))}}),t.of({name:"ECL",extensions:["ecl"],load(){return o(()=>import("./ecl-Cabwm37j.js"),[]).then(e=>n(e.ecl))}}),t.of({name:"edn",extensions:["edn"],load(){return o(()=>import("./clojure-BMjYHr_A.js"),[]).then(e=>n(e.clojure))}}),t.of({name:"Eiffel",extensions:["e"],load(){return o(()=>import("./eiffel-CnydiIhH.js"),[]).then(e=>n(e.eiffel))}}),t.of({name:"Elm",extensions:["elm"],load(){return o(()=>import("./elm-vLlmbW-K.js"),[]).then(e=>n(e.elm))}}),t.of({name:"Erlang",extensions:["erl"],load(){return o(()=>import("./erlang-BNw1qcRV.js"),[]).then(e=>n(e.erlang))}}),t.of({name:"Esper",load(){return o(()=>import("./sql-D0XecflT.js"),[]).then(e=>n(e.esper))}}),t.of({name:"Factor",extensions:["factor"],load(){return o(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([46,45])).then(e=>n(e.factor))}}),t.of({name:"FCL",load(){return o(()=>import("./fcl-Kvtd6kyn.js"),[]).then(e=>n(e.fcl))}}),t.of({name:"Forth",extensions:["forth","fth","4th"],load(){return o(()=>import("./forth-Ffai-XNe.js"),[]).then(e=>n(e.forth))}}),t.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return o(()=>import("./fortran-DYz_wnZ1.js"),[]).then(e=>n(e.fortran))}}),t.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.fSharp))}}),t.of({name:"Gas",extensions:["s"],load(){return o(()=>import("./gas-Bneqetm1.js"),[]).then(e=>n(e.gas))}}),t.of({name:"Gherkin",extensions:["feature"],load(){return o(()=>import("./gherkin-heZmZLOM.js"),[]).then(e=>n(e.gherkin))}}),t.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return o(()=>import("./groovy-D9Dt4D0W.js"),[]).then(e=>n(e.groovy))}}),t.of({name:"Haskell",extensions:["hs"],load(){return o(()=>import("./haskell-Cw1EW3IL.js"),[]).then(e=>n(e.haskell))}}),t.of({name:"Haxe",extensions:["hx"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.haxe))}}),t.of({name:"HXML",extensions:["hxml"],load(){return o(()=>import("./haxe-H-WmDvRZ.js"),[]).then(e=>n(e.hxml))}}),t.of({name:"HTTP",load(){return o(()=>import("./http-DBlCnlav.js"),[]).then(e=>n(e.http))}}),t.of({name:"IDL",extensions:["pro"],load(){return o(()=>import("./idl-BEugSyMb.js"),[]).then(e=>n(e.idl))}}),t.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return o(()=>import("./javascript-BO_2ioGC.js"),[]).then(e=>n(e.jsonld))}}),t.of({name:"Julia",extensions:["jl"],load(){return o(()=>import("./julia-DuME0IfC.js"),[]).then(e=>n(e.julia))}}),t.of({name:"Kotlin",extensions:["kt","kts"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.kotlin))}}),t.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return o(()=>import("./livescript-BwQOo05w.js"),[]).then(e=>n(e.liveScript))}}),t.of({name:"Lua",extensions:["lua"],load(){return o(()=>import("./lua-VAEuO923.js"),[]).then(e=>n(e.lua))}}),t.of({name:"mIRC",extensions:["mrc"],load(){return o(()=>import("./mirc-CjQqDB4T.js"),[]).then(e=>n(e.mirc))}}),t.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return o(()=>import("./mathematica-DTrFuWx2.js"),[]).then(e=>n(e.mathematica))}}),t.of({name:"Modelica",extensions:["mo"],load(){return o(()=>import("./modelica-Dc1JOy9r.js"),[]).then(e=>n(e.modelica))}}),t.of({name:"MUMPS",extensions:["mps"],load(){return o(()=>import("./mumps-BT43cFF4.js"),[]).then(e=>n(e.mumps))}}),t.of({name:"Mbox",extensions:["mbox"],load(){return o(()=>import("./mbox-CNhZ1qSd.js"),[]).then(e=>n(e.mbox))}}),t.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return o(()=>import("./nginx-DdIZxoE0.js"),[]).then(e=>n(e.nginx))}}),t.of({name:"NSIS",extensions:["nsh","nsi"],load(){return o(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([47,45])).then(e=>n(e.nsis))}}),t.of({name:"NTriples",extensions:["nt","nq"],load(){return o(()=>import("./ntriples-BfvgReVJ.js"),[]).then(e=>n(e.ntriples))}}),t.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveC))}}),t.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.objectiveCpp))}}),t.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.oCaml))}}),t.of({name:"Octave",extensions:["m"],load(){return o(()=>import("./octave-CWZ4xMHY.js"),[]).then(e=>n(e.octave))}}),t.of({name:"Oz",extensions:["oz"],load(){return o(()=>import("./oz-BzwKVEFT.js"),[]).then(e=>n(e.oz))}}),t.of({name:"Pascal",extensions:["p","pas"],load(){return o(()=>import("./pascal--L3eBynH.js"),[]).then(e=>n(e.pascal))}}),t.of({name:"Perl",extensions:["pl","pm"],load(){return o(()=>import("./perl-CdXCOZ3F.js"),[]).then(e=>n(e.perl))}}),t.of({name:"Pig",extensions:["pig"],load(){return o(()=>import("./pig-CevX1Tat.js"),[]).then(e=>n(e.pig))}}),t.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return o(()=>import("./powershell-CFHJl5sT.js"),[]).then(e=>n(e.powerShell))}}),t.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return o(()=>import("./properties-C78fOPTZ.js"),[]).then(e=>n(e.properties))}}),t.of({name:"ProtoBuf",extensions:["proto"],load(){return o(()=>import("./protobuf-ChK-085T.js"),[]).then(e=>n(e.protobuf))}}),t.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return o(()=>import("./pug-CIGw5rlb.js"),__vite__mapDeps([48,49])).then(e=>n(e.pug))}}),t.of({name:"Puppet",extensions:["pp"],load(){return o(()=>import("./puppet-DMA9R1ak.js"),[]).then(e=>n(e.puppet))}}),t.of({name:"Q",extensions:["q"],load(){return o(()=>import("./q-pXgVlZs6.js"),[]).then(e=>n(e.q))}}),t.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return o(()=>import("./r-B6wPVr8A.js"),[]).then(e=>n(e.r))}}),t.of({name:"RPM Changes",load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmChanges))}}),t.of({name:"RPM Spec",extensions:["spec"],load(){return o(()=>import("./rpm-CTu-6PCP.js"),[]).then(e=>n(e.rpmSpec))}}),t.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return o(()=>import("./ruby-B2Rjki9n.js"),[]).then(e=>n(e.ruby))}}),t.of({name:"SAS",extensions:["sas"],load(){return o(()=>import("./sas-B4kiWyti.js"),[]).then(e=>n(e.sas))}}),t.of({name:"Scala",extensions:["scala"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.scala))}}),t.of({name:"Scheme",extensions:["scm","ss"],load(){return o(()=>import("./scheme-C41bIUwD.js"),[]).then(e=>n(e.scheme))}}),t.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return o(()=>import("./useAppFontEffects-ne84JBVL.js").then(e=>e.kP),__vite__mapDeps([50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,1,2,3,4,5,6,7,8,9,20,21,10,11,25,26,14,15,18,19,29,30,33,34,104,105,106,107])).then(e=>n(e.shell))}}),t.of({name:"Sieve",extensions:["siv","sieve"],load(){return o(()=>import("./sieve-C3Gn_uJK.js"),[]).then(e=>n(e.sieve))}}),t.of({name:"Smalltalk",extensions:["st"],load(){return o(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(e=>n(e.smalltalk))}}),t.of({name:"Solr",load(){return o(()=>import("./solr-DehyRSwq.js"),[]).then(e=>n(e.solr))}}),t.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return o(()=>import("./mllike-BO34x3tv.js"),[]).then(e=>n(e.sml))}}),t.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return o(()=>import("./sparql-DkYu6x3z.js"),[]).then(e=>n(e.sparql))}}),t.of({name:"Spreadsheet",alias:["excel","formula"],load(){return o(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(e=>n(e.spreadsheet))}}),t.of({name:"Squirrel",extensions:["nut"],load(){return o(()=>import("./clike-B9uivgTg.js"),[]).then(e=>n(e.squirrel))}}),t.of({name:"Stylus",extensions:["styl"],load(){return o(()=>import("./stylus-B533Al4x.js"),[]).then(e=>n(e.stylus))}}),t.of({name:"Swift",extensions:["swift"],load(){return o(()=>import("./swift-BzpIVaGY.js"),[]).then(e=>n(e.swift))}}),t.of({name:"sTeX",load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return o(()=>import("./stex-C3f8Ysf7.js"),[]).then(e=>n(e.stex))}}),t.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"Tcl",extensions:["tcl"],load(){return o(()=>import("./tcl-DVfN8rqt.js"),[]).then(e=>n(e.tcl))}}),t.of({name:"Textile",extensions:["textile"],load(){return o(()=>import("./textile-CnDTJFAw.js"),[]).then(e=>n(e.textile))}}),t.of({name:"TiddlyWiki",load(){return o(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(e=>n(e.tiddlyWiki))}}),t.of({name:"Tiki wiki",load(){return o(()=>import("./tiki-DGYXhP31.js"),[]).then(e=>n(e.tiki))}}),t.of({name:"TOML",extensions:["toml"],load(){return o(()=>import("./toml-Bm5Em-hy.js"),[]).then(e=>n(e.toml))}}),t.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return o(()=>import("./troff-wAsdV37c.js"),[]).then(e=>n(e.troff))}}),t.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return o(()=>import("./ttcn-CfJYG6tj.js"),[]).then(e=>n(e.ttcn))}}),t.of({name:"TTCN_CFG",extensions:["cfg"],load(){return o(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(e=>n(e.ttcnCfg))}}),t.of({name:"Turtle",extensions:["ttl"],load(){return o(()=>import("./turtle-B1tBg_DP.js"),[]).then(e=>n(e.turtle))}}),t.of({name:"Web IDL",extensions:["webidl"],load(){return o(()=>import("./webidl-ZXfAyPTL.js"),[]).then(e=>n(e.webIDL))}}),t.of({name:"VB.NET",extensions:["vb"],load(){return o(()=>import("./vb-CmGdzxic.js"),[]).then(e=>n(e.vb))}}),t.of({name:"VBScript",extensions:["vbs"],load(){return o(()=>import("./vbscript-BuJXcnF6.js"),[]).then(e=>n(e.vbScript))}}),t.of({name:"Velocity",extensions:["vtl"],load(){return o(()=>import("./velocity-D8B20fx6.js"),[]).then(e=>n(e.velocity))}}),t.of({name:"Verilog",extensions:["v"],load(){return o(()=>import("./verilog-C6RDOZhf.js"),[]).then(e=>n(e.verilog))}}),t.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return o(()=>import("./vhdl-lSbBsy5d.js"),[]).then(e=>n(e.vhdl))}}),t.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return o(()=>import("./xquery-DzFWVndE.js"),[]).then(e=>n(e.xQuery))}}),t.of({name:"Yacas",extensions:["ys"],load(){return o(()=>import("./yacas-BJ4BC0dw.js"),[]).then(e=>n(e.yacas))}}),t.of({name:"Z80",extensions:["z80"],load(){return o(()=>import("./z80-Hz9HOZM7.js"),[]).then(e=>n(e.z80))}}),t.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.mscgen))}}),t.of({name:"Xù",extensions:["xu"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.xu))}}),t.of({name:"MsGenny",extensions:["msgenny"],load(){return o(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(e=>n(e.msgenny))}}),t.of({name:"Vue",extensions:["vue"],load(){return o(()=>import("./vendor-codemirror-lang-vue-BqGzJVm1.js"),__vite__mapDeps([108,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.vue())}}),t.of({name:"Angular Template",load(){return o(()=>import("./vendor-codemirror-lang-angular-DEPs2M5t.js"),__vite__mapDeps([109,1,2,3,4,5,6,7,8,9,18,19,10,14,15,20,21,11])).then(e=>e.angular())}})];export{l};
@@ -1,4 +1,4 @@
1
- import{gm as M,jH as V,jI as j,jJ as Y,jK as K,jL as X,jM as J,jN as $,jO as Q,jP as Z}from"./useAppFontEffects-khZXpFL_.js";import{b as ee,j as p,k as I,A as ne,a as G,l as te,m as C}from"./computeVirtualFileMetrics-DxTBMuu-.js";import{t as ie}from"./vendor-hast-util-to-html-BKBhbTDb.js";function U(e,n,t){if(e===n||e==null||n==null)return e===n;const i=new Set(t),a=Object.keys(e),r=new Set(Object.keys(n));for(const s of a)if(r.delete(s),!i.has(s)&&(!(s in n)||e[s]!==n[s]))return!1;for(const s of Array.from(r))if(!i.has(s))return!1;return!0}function Te(e,n){const t=e?.theme??M,i=n?.theme??M,a=R(e),r=R(n);return ee(t,i)&&U(e,n,["theme","parseDiffOptions"])&&U(a,r)}function R(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function H(e,n){return e?.start===n?.start&&e?.end===n?.end&&e?.side===n?.side&&e?.endSide===n?.endSide}function ae(){return p({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[I({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function re(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side}var Ie=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;activeLineHighlightSide;activeLineNumberOnly=!1;editorAttached=!1;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,n){this.mode=e,this.options=n}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:t=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),t?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}setEditorAttached(e){this.editorAttached!==e&&(this.editorAttached=e,this.setSelectionDirty(),this.renderSelection())}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,n){const t=!(e===this.selectedRange||H(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.activeLineHighlightSide=n?.activeLineSide,this.activeLineNumberOnly=n?.lineNumberOnly??!1,this.renderSelection(),this.placeUtility(),t&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:n,onLineClick:t,onLineNumberClick:i,onTokenClick:a,onMergeConflictActionClick:r}=this.options;n==null&&t==null&&i==null&&r==null&&a==null||this.options.onGutterUtilityClick!=null&&E(e.composedPath())||(k(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:t,onLineLeave:i,onTokenEnter:a,onTokenLeave:r,enableGutterUtility:s=!1}=this.options;n==="disabled"&&!s&&t==null&&i==null&&a==null&&r==null||(k(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:n}=this.options;if(k(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){k(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:n}){const{__debugPointerEvents:t}=this.options,i=n.composedPath();k(t,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const a=this.resolvePointerTarget(i);k(t,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:r,onLineNumberClick:s,onLineEnter:l,onLineLeave:o,onTokenClick:d,onTokenEnter:c,onTokenLeave:m,onHunkExpand:h,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const u=T(a)&&this.hoveredLine?.lineElement===a.lineElement;A(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,n),this.clearHoveredToken()),A(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),c?.(this.hoveredToken,n))),u||(this.hoveredLine!=null&&(o?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),T(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),l?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(a==null)break;if(de(a)&&f!=null){f(a);break}if(se(a)&&h!=null){h(a.hunkIndex,a.all||n.shiftKey?"both":a.direction,a.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!T(a))break;A(a)&&d!=null&&d(this.toTokenEventBaseProps(a),n);const u=this.toEventBaseProps(a);s!=null&&a.numberColumn?s({...u,event:n}):r?.({...u,event:n});break}}}syncPointerListeners(e){const{__debugPointerEvents:n,lineHoverHighlight:t="disabled",onLineClick:i,onLineNumberClick:a,onLineEnter:r,onLineLeave:s,onTokenClick:l,onTokenEnter:o,onTokenLeave:d,onHunkExpand:c,onMergeConflictActionClick:m,enableGutterUtility:h=!1,enableLineSelection:f=!1,onGutterUtilityClick:u}=this.options,v=u!=null,b=t!=="disabled"||i!=null||a!=null||r!=null||s!=null||l!=null||o!=null||d!=null||c!=null||m!=null||h||f||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,k(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const x=[];return(n==="both"||n==="click")&&(i!=null&&x.push("onLineClick"),a!=null&&x.push("onLineNumberClick"),c!=null&&x.push("expandable hunk separators"),m!=null&&x.push("merge conflict actions")),x})()),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const g=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",y=this.pointerSession.mode==="gutterSelecting";(!f&&g||!v&&y)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:n,enableLineSelection:t=!1}=this.options,i=e!=null,a=n!=null||t;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=e.composedPath();E(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:n=!1}=this.options;if(!n)return;const t=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(t==null)return;const{pre:i}=this;if(i==null)return;e.preventDefault();const{lineNumber:a,eventSide:r,lineIndex:s}=t;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const o=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:o?this.selectedRange.start:this.selectedRange.end,side:o?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const l={lineNumber:a,side:r};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:r},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),a=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??a;a==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:a},n&&(this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(a.lineNumber,a.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,n===!0&&this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(re(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,n&&this.updateSelection(i.lineNumber,i.side)),t?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=ie(ae());const t=n.firstElementChild;if(!(t instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(e);w(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const n=this.targetForSelectionPoint(e.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const n={lineNumber:e.start,side:e.side},t={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(n),a=this.selectionPointRowIndex(t);if(!(i==null||a==null))return i>a?{top:t,bottom:n}:{top:n,bottom:t}}selectionPointRowIndex(e){const n=this.getLineIndex(e.lineNumber,e.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(e){if(this.pre==null)return;const n=this.getLineIndex(e.lineNumber,e.side);if(n==null)return;const t=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${t}"]`);for(const a of i){if(!(a instanceof HTMLElement))continue;const r=this.resolvePointerTarget(L(a));if(w(r)&&!(this.mode==="diff"&&e.side!=null&&r.side!==e.side))return r}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,n){const t=this.resolvePointerTarget(e);if(w(t)&&!(n&&!t.numberColumn)&&t.splitLineIndex!=null)return{lineIndex:t.splitLineIndex,lineNumber:t.lineNumber,eventSide:this.mode==="diff"?t.side:void 0}}resolveSelectionInfo(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionInfoFromPath(t,n.requireNumberColumn):void 0}selectionPointFromPath(e){const n=this.resolvePointerTarget(e);if(w(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionPointFromPath(t):void 0}resolveSelectionPath(e,n){const t=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(e.composedPath(),t);case"coordinates-first":{const i=this.pathFromCoordinates(e,t);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),t)}}}pathFromCoordinates(e,n){const t=this.hitTest(e);if(t!==void 0)return t===null?null:this.pathFromElement(t,n)??null}pathFromEventPath(e,n){if(!(n&&E(e))){for(const t of e)if(t instanceof Element)return this.pathFromElement(t,n)}}pathFromElement(e,n){const t=L(e);if(n&&E(t))return;const i=fe(e);return i!=null?L(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const n=ue(ce(e));if(n==null)return;const t=this.targetForSelectionPoint(n);return t!=null?L(t.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const n=this.pre?.getRootNode(),t=z(n)?n:z(document)?document:void 0;if(t!=null)return t.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,n){const{getLineIndex:t}=this.options;return t!=null?t(e,n):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,n,t=!0){const i=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const r=this.selectionAnchor?.side??n,s=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(s,e,r,n)}H(i??void 0,a??void 0)||(this.activeLineHighlightSide=void 0,this.activeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),t&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,n){if(this.pre==null)return;const t=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return t!=null&&i!=null?{start:n?t[1]:t[0],end:n?i[1]:i[0]}:void 0}highlightLineNumberOnly(){return this.activeLineHighlightSide!=null?this.activeLineNumberOnly:this.activeLineNumberOnly||this.editorAttached}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const o of e)o.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const t=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,t);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const a=i.start===i.end,r=Math.min(i.start,i.end),s=Math.max(i.start,i.end),l=this.highlightLineNumberOnly();for(const o of n){const d=this.activeLineHighlightSide;if(d!=null&&(d==="additions"&&o.hasAttribute("data-deletions")||d==="deletions"&&o.hasAttribute("data-additions")))continue;const[c,m]=o.children,h=m.children.length;if(h!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let f=0;f<h;f++){const u=m.children[f],v=c.children[f];if(!(u instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const b=this.parseLineIndex(u,t);if((b??0)>s)break;if(b==null||b<r)continue;let g=a?"single":b===r?"first":b===s?"last":"";v.setAttribute("data-selected-line",g),!l&&(u.setAttribute("data-selected-line",g),v.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(a?(g="last",u.setAttribute("data-selected-line","first")):b===r?g="":b===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",g),v.nextSibling.setAttribute("data-selected-line",g)))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,tokenElement:a,tokenText:r}:{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}}buildSelectedLineRange(e,n){return this.buildSelectionRange(e.lineNumber,n.lineNumber,e.side,n.side)}buildSelectionRange(e,n,t,i){return{start:e,end:n,...t!=null?{side:t}:{},...t!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let n=!1,t,i,a,r,s,l,o,d,c,m;for(const f of e){if(!(f instanceof HTMLElement))continue;if(m==null&&f.hasAttribute("data-merge-conflict-action")){const g=f.getAttribute("data-merge-conflict-action")??void 0,y=f.getAttribute("data-merge-conflict-conflict-index")??void 0,x=y!=null?Number.parseInt(y,10):NaN;le(g)&&Number.isFinite(x)&&(m={kind:"merge-conflict-action",resolution:g,conflictIndex:x})}if(l==null&&f.hasAttribute("data-char")){l=f;const g=f.getAttribute("data-char");if(g!=null){const y=Number.parseInt(g,10);if(!Number.isNaN(y)){const x=f.textContent??"",N=y+x.length;(x.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(o={tokenElement:l,lineCharStart:y,lineCharEnd:N,tokenText:x});continue}}}const u=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(u!=null){s=f,c=Number.parseInt(u,10),n=!0,t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}const v=a==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){a=f,c=Number.parseInt(v,10),t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const b=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&b!=null){const g=Number.parseInt(b,10);Number.isNaN(g)||(d.hunkIndex=g);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(m!=null)return m;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(a??=r!=null?D(i,`[data-line][data-line-index="${r}"]`):void 0,s??=r!=null?D(i,`[data-column-number][data-line-index="${r}"]`):void 0,i==null||a==null||s==null||t==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(a,this.isSplitDiff());return o!=null?this.mode==="file"?{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h,...o}:{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h,...o}:this.mode==="file"?{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h}:{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,n){const t=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(n&&t.length===2)return t[1];if(!n)return t[0]}};function Me({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:n,lineHoverHighlight:t,onGutterUtilityClick:i,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,renderGutterUtility:m,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y},x,N,W){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:oe({enableGutterUtility:n,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:t,onGutterUtilityClick:i,onHunkExpand:x,onMergeConflictActionClick:W,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y,getLineIndex:N}}function oe({enableGutterUtility:e,renderGutterUtility:n,onGutterUtilityClick:t}){if(t!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function w(e){return e!=null&&"kind"in e&&e.kind==="line"}function A(e){return e!=null&&"kind"in e&&e.kind==="token"}function T(e){return w(e)||A(e)}function se(e){return"type"in e&&e.type==="line-info"}function de(e){return"kind"in e&&e.kind==="merge-conflict-action"}function le(e){return e==="current"||e==="incoming"||e==="both"}function D(e,n){const t=e?.querySelector(n);return t instanceof HTMLElement?t:void 0}function L(e){const n=[];let t=e;for(;t!=null;)n.push(t),t=t.parentNode;return n}function fe(e){const n=e.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const t=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(t instanceof HTMLElement))return;const i=t.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function ce(e){const n=e.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const t=e.getAttribute("name")??void 0;return t!=null&&t.startsWith("annotation-")?t:void 0}}function ue(e){if(e==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(n==null)return;const t=Number.parseInt(n[2],10);if(!(!Number.isFinite(t)||t<=0))return{lineNumber:t,side:n[1]}}function z(e){return e!=null&&typeof e.elementFromPoint=="function"}function F(e,n){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function O(e){const n=e.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function E(e){for(const n of e)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function k(e="none",n,...t){switch(e){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...t)}var Ue=class S{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=S.resizeObserver??new ResizeObserver(S.handleSharedResizeEntries);return S.resizeObserver=n,n}static handleSharedResizeEntries(n){const t=new Map;for(const i of n){const a=S.managersByElement.get(i.target);if(a==null)continue;const r=t.get(a);r==null?t.set(a,[i]):r.push(i)}for(const[i,a]of t)i.handleResizeEntries(a)}observedNodes=new Map;setup(n,t){const i=new Set;let a=0;const r=new Map(this.observedNodes);this.observedNodes.clear();for(const s of n.children){if(a===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;a++;let o=r.get(l);if(o!=null&&o.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),o!=null?(this.observedNodes.set(l,o),r.delete(l),o.numberElement!==d?(o.numberElement!=null&&(this.unobserve(o.numberElement),r.delete(o.numberElement)),d!=null&&(this.observe(d),r.delete(d),this.observedNodes.set(d,o)),o.numberElement=d,o.numberWidth=0):o.numberElement!=null?(r.delete(o.numberElement),this.observedNodes.set(o.numberElement,o)):o.numberWidth=0):(o={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,o),this.observe(l),d!=null&&(this.observedNodes.set(d,o),this.observe(d)))}if(a>1&&!t){const s=n.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const o of s){if(!(o instanceof HTMLElement))continue;const d=o.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:o});continue}let c=l.get(d);c==null&&(c=[],l.set(d,c)),c.push(o)}for(const[o,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",o,d);continue}const[c,m]=d,h=c.firstElementChild,f=m.firstElementChild;if(!(c instanceof HTMLElement)||!(m instanceof HTMLElement)||!(h instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let u=r.get(h);if(u!=null){this.observedNodes.set(h,u),this.observedNodes.set(f,u),r.delete(h),r.delete(f);continue}const v=h.getBoundingClientRect().height,b=f.getBoundingClientRect().height;u={type:"annotations",column1:{container:c,child:h,childHeight:v},column2:{container:m,child:f,childHeight:b},currentHeight:"auto"},i.add({child1:h,child2:f,item:u,newHeight:Math.max(v,b)})}for(const o of i)this.applyNewHeight(o.item,o.newHeight),this.observedNodes.set(o.child1,o.item),this.observedNodes.set(o.child2,o.item),this.observe(o.child1),this.observe(o.child2);i.clear()}for(const[s,l]of r)this.unobserve(s),l.type==="code"?ge(l):pe(l);r.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:t}=S,i=t.get(n);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");t.set(n,this),S.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:t,resizeObserver:i}=S,a=t.get(n);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");t.delete(n),i?.unobserve(n),i!=null&&t.size===0&&(i.disconnect(),S.resizeObserver=void 0)}}handleResizeEntries(n){const t=new Map,i=new Set;for(const a of n){const{target:r,borderBoxSize:s,contentBoxSize:l}=a;if(!(r instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const o=this.observedNodes.get(r);if(o==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(o.type==="annotations"){const d=(()=>{if(r===o.column1.child)return o.column1;if(r===o.column2.child)return o.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:o,target:r});continue}d.childHeight=s[0].blockSize,i.add(o)}else if(o.type==="code"){const d=t.get(o)??{},c=l[0].inlineSize;r===o.codeElement?d.codeInlineSize=c:r===o.numberElement&&(d.numberInlineSize=c),t.set(o,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(n){for(const t of n)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=n=>{for(const[t,i]of n){const a=i.codeInlineSize!=null?he(i.codeInlineSize):t.codeWidth,r=i.numberInlineSize!=null?me(i.numberInlineSize):t.numberWidth,s=a!==t.codeWidth,l=r!==t.numberWidth;if(!(!s&&!l)&&(t.codeWidth=a,t.numberWidth=r,s&&t.codeElement.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),l&&t.codeElement.style.setProperty("--diffs-column-number-width",`${r===0?"auto":`${r}px`}`),s||l&&a!=="auto")){const o=typeof a=="number"?Math.max(a-r,0):0;t.codeElement.style.setProperty("--diffs-column-content-width",`${o>0?`${o}px`:"auto"}`)}}};applyNewHeight(n,t){t!==n.currentHeight&&(n.currentHeight=Math.max(t,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function he(e){const n=Math.max(Math.floor(e),0);return n===0?"auto":n}function me(e){return Math.max(Math.ceil(e),0)}function ge(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function pe(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function Re(e){for(const n of Array.isArray(e)?e:[e])if(!(n==="text"||n==="ansi")&&!ne.has(n))return!1;return!0}function He(e){for(const n of G(e))if(!te.has(n))return!1;return!0}function De(e,n){return e==null||n==null?e===n:e.startingLine===n.startingLine&&e.totalLines===n.totalLines&&e.bufferBefore===n.bufferBefore&&e.bufferAfter===n.bufferAfter}function ze(e){return p({tagName:"div",children:[p({tagName:"div",children:e.annotations?.map(n=>p({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function be(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Fe({fileOrDiff:e,mode:n,stickyHeader:t}){const i="type"in e?e:void 0,a={"data-diffs-header":n,"data-change-type":i?.type,"data-sticky":t?"":void 0};return p({tagName:"div",children:[n==="custom"?p({tagName:"slot",properties:{name:V}}):ve({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...n==="custom"?[]:[xe(i)]],properties:a})}function ve({name:e,prevName:n,iconType:t}){const i=[p({tagName:"slot",properties:{name:j}}),I({name:be(t),properties:{"data-change-icon":t}})];return n!=null&&(i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(n)]})],properties:{"data-prev-name":""}})),i.push(I({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(e)]})],properties:{"data-title":""}})),i.push(p({tagName:"slot",properties:{name:Y}})),p({tagName:"div",children:i,properties:{"data-header-content":""}})}function xe(e){const n=[];if(e!=null){let t=0,i=0;for(const a of e.hunks)t+=a.additionLines,i+=a.deletionLines;(i>0||t===0)&&n.push(p({tagName:"span",children:[C(`-${i}`)],properties:{"data-deletions-count":""}})),(t>0||i===0)&&n.push(p({tagName:"span",children:[C(`+${t}`)],properties:{"data-additions-count":""}}))}return n.push(p({tagName:"slot",properties:{name:K}})),p({tagName:"div",children:n,properties:{"data-metadata":""}})}function Oe(e){return p({tagName:"pre",properties:ye(e)})}function ye({diffIndicators:e,disableBackground:n,disableLineNumbers:t,overflow:i,split:a,totalLines:r,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?a?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":t?"":void 0,"data-background":n?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${r}`.length}ch;`}}function Be(e,{theme:n,preferredHighlighter:t="shiki-js"}){return{langs:[e??"text"],themes:G(n),preferredHighlighter:t}}function $e(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}const Ge="-1,-1";function _e(e){return e?.some(n=>n.lineNumber===0)??!1}function qe(e){const n=e[0];return n!=null&&n.length>0?n:void 0}function We(e){return e.startingLine===0&&e.totalLines>0}function Ve(e,n){return p({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function je(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const Ye=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
1
+ import{gm as M,jH as V,jI as j,jJ as Y,jK as K,jL as X,jM as J,jN as $,jO as Q,jP as Z}from"./useAppFontEffects-ne84JBVL.js";import{b as ee,j as p,k as I,A as ne,a as G,l as te,m as C}from"./computeVirtualFileMetrics-DlWlEM3x.js";import{t as ie}from"./vendor-hast-util-to-html-BKBhbTDb.js";function U(e,n,t){if(e===n||e==null||n==null)return e===n;const i=new Set(t),a=Object.keys(e),r=new Set(Object.keys(n));for(const s of a)if(r.delete(s),!i.has(s)&&(!(s in n)||e[s]!==n[s]))return!1;for(const s of Array.from(r))if(!i.has(s))return!1;return!0}function Te(e,n){const t=e?.theme??M,i=n?.theme??M,a=R(e),r=R(n);return ee(t,i)&&U(e,n,["theme","parseDiffOptions"])&&U(a,r)}function R(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function H(e,n){return e?.start===n?.start&&e?.end===n?.end&&e?.side===n?.side&&e?.endSide===n?.endSide}function ae(){return p({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[I({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function re(e,n){return e.lineNumber===n.lineNumber&&e.side===n.side}var Ie=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;activeLineHighlightSide;activeLineNumberOnly=!1;editorAttached=!1;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,n){this.mode=e,this.options=n}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:t=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),t?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}setEditorAttached(e){this.editorAttached!==e&&(this.editorAttached=e,this.setSelectionDirty(),this.renderSelection())}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,n){const t=!(e===this.selectedRange||H(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!t||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.activeLineHighlightSide=n?.activeLineSide,this.activeLineNumberOnly=n?.lineNumberOnly??!1,this.renderSelection(),this.placeUtility(),t&&n?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:n,onLineClick:t,onLineNumberClick:i,onTokenClick:a,onMergeConflictActionClick:r}=this.options;n==null&&t==null&&i==null&&r==null&&a==null||this.options.onGutterUtilityClick!=null&&E(e.composedPath())||(k(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:n="disabled",onLineEnter:t,onLineLeave:i,onTokenEnter:a,onTokenLeave:r,enableGutterUtility:s=!1}=this.options;n==="disabled"&&!s&&t==null&&i==null&&a==null&&r==null||(k(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:n}=this.options;if(k(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){k(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:n}){const{__debugPointerEvents:t}=this.options,i=n.composedPath();k(t,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const a=this.resolvePointerTarget(i);k(t,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:r,onLineNumberClick:s,onLineEnter:l,onLineLeave:o,onTokenClick:d,onTokenEnter:c,onTokenLeave:m,onHunkExpand:h,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const u=T(a)&&this.hoveredLine?.lineElement===a.lineElement;A(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(m?.(this.hoveredToken,n),this.clearHoveredToken()),A(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),c?.(this.hoveredToken,n))),u||(this.hoveredLine!=null&&(o?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),T(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),l?.({...this.hoveredLine,event:n})):this.placeUtility());break}case"click":{if(a==null)break;if(de(a)&&f!=null){f(a);break}if(se(a)&&h!=null){h(a.hunkIndex,a.all||n.shiftKey?"both":a.direction,a.all||n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!T(a))break;A(a)&&d!=null&&d(this.toTokenEventBaseProps(a),n);const u=this.toEventBaseProps(a);s!=null&&a.numberColumn?s({...u,event:n}):r?.({...u,event:n});break}}}syncPointerListeners(e){const{__debugPointerEvents:n,lineHoverHighlight:t="disabled",onLineClick:i,onLineNumberClick:a,onLineEnter:r,onLineLeave:s,onTokenClick:l,onTokenEnter:o,onTokenLeave:d,onHunkExpand:c,onMergeConflictActionClick:m,enableGutterUtility:h=!1,enableLineSelection:f=!1,onGutterUtilityClick:u}=this.options,v=u!=null,b=t!=="disabled"||i!=null||a!=null||r!=null||s!=null||l!=null||o!=null||d!=null||c!=null||m!=null||h||f||v;b&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,k(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const x=[];return(n==="both"||n==="click")&&(i!=null&&x.push("onLineClick"),a!=null&&x.push("onLineNumberClick"),c!=null&&x.push("expandable hunk separators"),m!=null&&x.push("merge conflict actions")),x})()),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),k(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!b&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const g=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",y=this.pointerSession.mode==="gutterSelecting";(!f&&g||!v&&y)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:n,enableLineSelection:t=!1}=this.options,i=e!=null,a=n!=null||t;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=e.composedPath();E(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(n),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:n=!1}=this.options;if(!n)return;const t=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(t==null)return;const{pre:i}=this;if(i==null)return;e.preventDefault();const{lineNumber:a,eventSide:r,lineIndex:s}=t;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const o=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:o?this.selectedRange.start:this.selectedRange.end,side:o?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const l={lineNumber:a,side:r};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:r},this.updateSelection(a,r,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;if(t==null)return;const i=this.currentSelectionEnds(),a=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=i?.top??a;a==null||r==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:a},n&&(this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(a.lineNumber,a.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(t==null)return;this.pointerSession.current=t,n===!0&&this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;const i={lineNumber:t.lineNumber,side:t.eventSide};if(re(this.pointerSession.pending,i))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:n=!1,onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,n&&this.updateSelection(i.lineNumber,i.side)),t?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=ie(ae());const t=n.firstElementChild;if(!(t instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const n=this.resolvePointerTarget(e);w(n)&&n.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(n))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const n=this.targetForSelectionPoint(e.bottom);return n==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(n)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const n={lineNumber:e.start,side:e.side},t={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(n),a=this.selectionPointRowIndex(t);if(!(i==null||a==null))return i>a?{top:t,bottom:n}:{top:n,bottom:t}}selectionPointRowIndex(e){const n=this.getLineIndex(e.lineNumber,e.side);if(n!=null)return this.isSplitDiff()?n[1]:n[0]}targetForSelectionPoint(e){if(this.pre==null)return;const n=this.getLineIndex(e.lineNumber,e.side);if(n==null)return;const t=this.mode==="diff"?`${n[0]},${n[1]}`:`${n[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${t}"]`);for(const a of i){if(!(a instanceof HTMLElement))continue;const r=this.resolvePointerTarget(L(a));if(w(r)&&!(this.mode==="diff"&&e.side!=null&&r.side!==e.side))return r}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,n){const t=this.resolvePointerTarget(e);if(w(t)&&!(n&&!t.numberColumn)&&t.splitLineIndex!=null)return{lineIndex:t.splitLineIndex,lineNumber:t.lineNumber,eventSide:this.mode==="diff"?t.side:void 0}}resolveSelectionInfo(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionInfoFromPath(t,n.requireNumberColumn):void 0}selectionPointFromPath(e){const n=this.resolvePointerTarget(e);if(w(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}resolveSelectionPoint(e,n){const t=this.resolveSelectionPath(e,n);return t!=null?this.selectionPointFromPath(t):void 0}resolveSelectionPath(e,n){const t=n.excludeUtility!==!1;switch(n.source){case"event-path":return this.pathFromEventPath(e.composedPath(),t);case"coordinates-first":{const i=this.pathFromCoordinates(e,t);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),t)}}}pathFromCoordinates(e,n){const t=this.hitTest(e);if(t!==void 0)return t===null?null:this.pathFromElement(t,n)??null}pathFromEventPath(e,n){if(!(n&&E(e))){for(const t of e)if(t instanceof Element)return this.pathFromElement(t,n)}}pathFromElement(e,n){const t=L(e);if(n&&E(t))return;const i=fe(e);return i!=null?L(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const n=ue(ce(e));if(n==null)return;const t=this.targetForSelectionPoint(n);return t!=null?L(t.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const n=this.pre?.getRootNode(),t=z(n)?n:z(document)?document:void 0;if(t!=null)return t.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,n){const{getLineIndex:t}=this.options;return t!=null?t(e,n):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,n,t=!0){const i=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const r=this.selectionAnchor?.side??n,s=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(s,e,r,n)}H(i??void 0,a??void 0)||(this.activeLineHighlightSide=void 0,this.activeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),t&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,n){if(this.pre==null)return;const t=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return t!=null&&i!=null?{start:n?t[1]:t[0],end:n?i[1]:i[0]}:void 0}highlightLineNumberOnly(){return this.activeLineHighlightSide!=null?this.activeLineNumberOnly:this.activeLineNumberOnly||this.editorAttached}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const o of e)o.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const t=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,t);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const a=i.start===i.end,r=Math.min(i.start,i.end),s=Math.max(i.start,i.end),l=this.highlightLineNumberOnly();for(const o of n){const d=this.activeLineHighlightSide;if(d!=null&&(d==="additions"&&o.hasAttribute("data-deletions")||d==="deletions"&&o.hasAttribute("data-additions")))continue;const[c,m]=o.children,h=m.children.length;if(h!==c.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let f=0;f<h;f++){const u=m.children[f],v=c.children[f];if(!(u instanceof HTMLElement)||!(v instanceof HTMLElement))continue;const b=this.parseLineIndex(u,t);if((b??0)>s)break;if(b==null||b<r)continue;let g=a?"single":b===r?"first":b===s?"last":"";v.setAttribute("data-selected-line",g),!l&&(u.setAttribute("data-selected-line",g),v.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(a?(g="last",u.setAttribute("data-selected-line","first")):b===r?g="":b===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",g),v.nextSibling.setAttribute("data-selected-line",g)))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,tokenElement:a,tokenText:r}:{type:"token",lineCharEnd:e,lineCharStart:n,lineNumber:t,side:i,tokenElement:a,tokenText:r}}buildSelectedLineRange(e,n){return this.buildSelectionRange(e.lineNumber,n.lineNumber,e.side,n.side)}buildSelectionRange(e,n,t,i){return{start:e,end:n,...t!=null?{side:t}:{},...t!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let n=!1,t,i,a,r,s,l,o,d,c,m;for(const f of e){if(!(f instanceof HTMLElement))continue;if(m==null&&f.hasAttribute("data-merge-conflict-action")){const g=f.getAttribute("data-merge-conflict-action")??void 0,y=f.getAttribute("data-merge-conflict-conflict-index")??void 0,x=y!=null?Number.parseInt(y,10):NaN;le(g)&&Number.isFinite(x)&&(m={kind:"merge-conflict-action",resolution:g,conflictIndex:x})}if(l==null&&f.hasAttribute("data-char")){l=f;const g=f.getAttribute("data-char");if(g!=null){const y=Number.parseInt(g,10);if(!Number.isNaN(y)){const x=f.textContent??"",N=y+x.length;(x.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(o={tokenElement:l,lineCharStart:y,lineCharEnd:N,tokenText:x});continue}}}const u=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(u!=null){s=f,c=Number.parseInt(u,10),n=!0,t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}const v=a==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){a=f,c=Number.parseInt(v,10),t=O(f),r=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const b=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&b!=null){const g=Number.parseInt(b,10);Number.isNaN(g)||(d.hunkIndex=g);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(m!=null)return m;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(a??=r!=null?D(i,`[data-line][data-line-index="${r}"]`):void 0,s??=r!=null?D(i,`[data-column-number][data-line-index="${r}"]`):void 0,i==null||a==null||s==null||t==null||c==null||Number.isNaN(c))return;const h=this.parseLineIndex(a,this.isSplitDiff());return o!=null?this.mode==="file"?{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h,...o}:{kind:"token",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h,...o}:this.mode==="file"?{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:void 0,splitLineIndex:h}:{kind:"line",lineType:t,lineElement:a,lineNumber:c,numberColumn:n,numberElement:s,side:F(t,i),splitLineIndex:h}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,n){const t=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(n&&t.length===2)return t[1];if(!n)return t[0]}};function Me({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:n,lineHoverHighlight:t,onGutterUtilityClick:i,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,renderGutterUtility:m,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y},x,N,W){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:oe({enableGutterUtility:n,renderGutterUtility:m,onGutterUtilityClick:i}),usesCustomGutterUtility:m!=null,lineHoverHighlight:t,onGutterUtilityClick:i,onHunkExpand:x,onMergeConflictActionClick:W,onLineClick:a,onLineEnter:r,onLineLeave:s,onLineNumberClick:l,onTokenClick:o,onTokenEnter:d,onTokenLeave:c,__debugPointerEvents:h,enableLineSelection:f,controlledSelection:u,onLineSelected:v,onLineSelectionStart:b,onLineSelectionChange:g,onLineSelectionEnd:y,getLineIndex:N}}function oe({enableGutterUtility:e,renderGutterUtility:n,onGutterUtilityClick:t}){if(t!=null&&n!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function w(e){return e!=null&&"kind"in e&&e.kind==="line"}function A(e){return e!=null&&"kind"in e&&e.kind==="token"}function T(e){return w(e)||A(e)}function se(e){return"type"in e&&e.type==="line-info"}function de(e){return"kind"in e&&e.kind==="merge-conflict-action"}function le(e){return e==="current"||e==="incoming"||e==="both"}function D(e,n){const t=e?.querySelector(n);return t instanceof HTMLElement?t:void 0}function L(e){const n=[];let t=e;for(;t!=null;)n.push(t),t=t.parentNode;return n}function fe(e){const n=e.closest("[data-line], [data-column-number]");if(n instanceof HTMLElement)return n;const t=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(t instanceof HTMLElement))return;const i=t.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function ce(e){const n=e.closest('[slot^="annotation-"]');if(n instanceof HTMLElement)return n.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const t=e.getAttribute("name")??void 0;return t!=null&&t.startsWith("annotation-")?t:void 0}}function ue(e){if(e==null)return;const n=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(n==null)return;const t=Number.parseInt(n[2],10);if(!(!Number.isFinite(t)||t<=0))return{lineNumber:t,side:n[1]}}function z(e){return e!=null&&typeof e.elementFromPoint=="function"}function F(e,n){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return n.hasAttribute("data-deletions")?"deletions":"additions"}}function O(e){const n=e.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function E(e){for(const n of e)if(n instanceof HTMLElement&&(n.hasAttribute("data-utility-button")||n.hasAttribute("data-gutter-utility-slot")||n.getAttribute("slot")==="gutter-utility-slot"||n.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function k(e="none",n,...t){switch(e){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...t)}var Ue=class S{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const n=S.resizeObserver??new ResizeObserver(S.handleSharedResizeEntries);return S.resizeObserver=n,n}static handleSharedResizeEntries(n){const t=new Map;for(const i of n){const a=S.managersByElement.get(i.target);if(a==null)continue;const r=t.get(a);r==null?t.set(a,[i]):r.push(i)}for(const[i,a]of t)i.handleResizeEntries(a)}observedNodes=new Map;setup(n,t){const i=new Set;let a=0;const r=new Map(this.observedNodes);this.observedNodes.clear();for(const s of n.children){if(a===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;a++;let o=r.get(l);if(o!=null&&o.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),o!=null?(this.observedNodes.set(l,o),r.delete(l),o.numberElement!==d?(o.numberElement!=null&&(this.unobserve(o.numberElement),r.delete(o.numberElement)),d!=null&&(this.observe(d),r.delete(d),this.observedNodes.set(d,o)),o.numberElement=d,o.numberWidth=0):o.numberElement!=null?(r.delete(o.numberElement),this.observedNodes.set(o.numberElement,o)):o.numberWidth=0):(o={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,o),this.observe(l),d!=null&&(this.observedNodes.set(d,o),this.observe(d)))}if(a>1&&!t){const s=n.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const o of s){if(!(o instanceof HTMLElement))continue;const d=o.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:o});continue}let c=l.get(d);c==null&&(c=[],l.set(d,c)),c.push(o)}for(const[o,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",o,d);continue}const[c,m]=d,h=c.firstElementChild,f=m.firstElementChild;if(!(c instanceof HTMLElement)||!(m instanceof HTMLElement)||!(h instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let u=r.get(h);if(u!=null){this.observedNodes.set(h,u),this.observedNodes.set(f,u),r.delete(h),r.delete(f);continue}const v=h.getBoundingClientRect().height,b=f.getBoundingClientRect().height;u={type:"annotations",column1:{container:c,child:h,childHeight:v},column2:{container:m,child:f,childHeight:b},currentHeight:"auto"},i.add({child1:h,child2:f,item:u,newHeight:Math.max(v,b)})}for(const o of i)this.applyNewHeight(o.item,o.newHeight),this.observedNodes.set(o.child1,o.item),this.observedNodes.set(o.child2,o.item),this.observe(o.child1),this.observe(o.child2);i.clear()}for(const[s,l]of r)this.unobserve(s),l.type==="code"?ge(l):pe(l);r.clear()}cleanUp(){for(const n of this.observedNodes.keys())this.unobserve(n);this.observedNodes.clear()}observe(n){const{managersByElement:t}=S,i=t.get(n);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");t.set(n,this),S.getResizeObserver().observe(n)}}unobserve(n){const{managersByElement:t,resizeObserver:i}=S,a=t.get(n);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");t.delete(n),i?.unobserve(n),i!=null&&t.size===0&&(i.disconnect(),S.resizeObserver=void 0)}}handleResizeEntries(n){const t=new Map,i=new Set;for(const a of n){const{target:r,borderBoxSize:s,contentBoxSize:l}=a;if(!(r instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const o=this.observedNodes.get(r);if(o==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(o.type==="annotations"){const d=(()=>{if(r===o.column1.child)return o.column1;if(r===o.column2.child)return o.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:o,target:r});continue}d.childHeight=s[0].blockSize,i.add(o)}else if(o.type==="code"){const d=t.get(o)??{},c=l[0].inlineSize;r===o.codeElement?d.codeInlineSize=c:r===o.numberElement&&(d.numberInlineSize=c),t.set(o,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(n){for(const t of n)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=n=>{for(const[t,i]of n){const a=i.codeInlineSize!=null?he(i.codeInlineSize):t.codeWidth,r=i.numberInlineSize!=null?me(i.numberInlineSize):t.numberWidth,s=a!==t.codeWidth,l=r!==t.numberWidth;if(!(!s&&!l)&&(t.codeWidth=a,t.numberWidth=r,s&&t.codeElement.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),l&&t.codeElement.style.setProperty("--diffs-column-number-width",`${r===0?"auto":`${r}px`}`),s||l&&a!=="auto")){const o=typeof a=="number"?Math.max(a-r,0):0;t.codeElement.style.setProperty("--diffs-column-content-width",`${o>0?`${o}px`:"auto"}`)}}};applyNewHeight(n,t){t!==n.currentHeight&&(n.currentHeight=Math.max(t,0),n.column1.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`),n.column2.container.style.setProperty("--diffs-annotation-min-height",`${n.currentHeight}px`))}};function he(e){const n=Math.max(Math.floor(e),0);return n===0?"auto":n}function me(e){return Math.max(Math.ceil(e),0)}function ge(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function pe(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}function Re(e){for(const n of Array.isArray(e)?e:[e])if(!(n==="text"||n==="ansi")&&!ne.has(n))return!1;return!0}function He(e){for(const n of G(e))if(!te.has(n))return!1;return!0}function De(e,n){return e==null||n==null?e===n:e.startingLine===n.startingLine&&e.totalLines===n.totalLines&&e.bufferBefore===n.bufferBefore&&e.bufferAfter===n.bufferAfter}function ze(e){return p({tagName:"div",children:[p({tagName:"div",children:e.annotations?.map(n=>p({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function be(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Fe({fileOrDiff:e,mode:n,stickyHeader:t}){const i="type"in e?e:void 0,a={"data-diffs-header":n,"data-change-type":i?.type,"data-sticky":t?"":void 0};return p({tagName:"div",children:[n==="custom"?p({tagName:"slot",properties:{name:V}}):ve({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...n==="custom"?[]:[xe(i)]],properties:a})}function ve({name:e,prevName:n,iconType:t}){const i=[p({tagName:"slot",properties:{name:j}}),I({name:be(t),properties:{"data-change-icon":t}})];return n!=null&&(i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(n)]})],properties:{"data-prev-name":""}})),i.push(I({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(p({tagName:"div",children:[p({tagName:"bdi",children:[C(e)]})],properties:{"data-title":""}})),i.push(p({tagName:"slot",properties:{name:Y}})),p({tagName:"div",children:i,properties:{"data-header-content":""}})}function xe(e){const n=[];if(e!=null){let t=0,i=0;for(const a of e.hunks)t+=a.additionLines,i+=a.deletionLines;(i>0||t===0)&&n.push(p({tagName:"span",children:[C(`-${i}`)],properties:{"data-deletions-count":""}})),(t>0||i===0)&&n.push(p({tagName:"span",children:[C(`+${t}`)],properties:{"data-additions-count":""}}))}return n.push(p({tagName:"slot",properties:{name:K}})),p({tagName:"div",children:n,properties:{"data-metadata":""}})}function Oe(e){return p({tagName:"pre",properties:ye(e)})}function ye({diffIndicators:e,disableBackground:n,disableLineNumbers:t,overflow:i,split:a,totalLines:r,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?a?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":t?"":void 0,"data-background":n?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${r}`.length}ch;`}}function Be(e,{theme:n,preferredHighlighter:t="shiki-js"}){return{langs:[e??"text"],themes:G(n),preferredHighlighter:t}}function $e(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}const Ge="-1,-1";function _e(e){return e?.some(n=>n.lineNumber===0)??!1}function qe(e){const n=e[0];return n!=null&&n.length>0?n:void 0}function We(e){return e.startingLine===0&&e.totalLines>0}function Ve(e,n){return p({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${n}`}})}function je(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const Ye=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
2
2
  <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
3
3
  <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
4
4
  </symbol>