@moonshot-ai/kimi-code 2.0.2 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.mjs +1242 -340
- package/dist-web/assets/{CodeBlockNode-CGnsnQxn.js → CodeBlockNode-BKKYmwvi.js} +2 -2
- package/dist-web/assets/{Tooltip-Dpu1bjDQ.js → Tooltip-CIPmRSvR.js} +1 -1
- package/dist-web/assets/{abnfDiagram-VRR7QNED-joqOapmD.js → abnfDiagram-VRR7QNED-BMMI9BxQ.js} +1 -1
- package/dist-web/assets/{arc-B0nh771v.js → arc-CrYCtH7Y.js} +1 -1
- package/dist-web/assets/{architectureDiagram-ZJ3FMSHR-C8MLP9lE.js → architectureDiagram-ZJ3FMSHR-BnFVlZdh.js} +1 -1
- package/dist-web/assets/{blockDiagram-677ZJIJ3-CBCk9Mah.js → blockDiagram-677ZJIJ3-CdD99ZPj.js} +1 -1
- package/dist-web/assets/{c4Diagram-LMCZKHZV-CvYd_Ec_.js → c4Diagram-LMCZKHZV-00KJvcAb.js} +1 -1
- package/dist-web/assets/channel-CVJjJLW-.js +1 -0
- package/dist-web/assets/{chunk-2Q5K7J3B-BH_-KL-y.js → chunk-2Q5K7J3B-BPnkU_Dg.js} +1 -1
- package/dist-web/assets/{chunk-32BRIVSS-ZACHn7Uw.js → chunk-32BRIVSS-Jyv5c8Oy.js} +1 -1
- package/dist-web/assets/{chunk-5VM5RSS4-DhMehVva.js → chunk-5VM5RSS4-ELPNZt4V.js} +1 -1
- package/dist-web/assets/{chunk-EX3LRPZG-BXqBLgAy.js → chunk-EX3LRPZG-DlBdl9hh.js} +1 -1
- package/dist-web/assets/{chunk-JWPE2WC7-XmvrJRon.js → chunk-JWPE2WC7-CCwoyuWi.js} +1 -1
- package/dist-web/assets/{chunk-MOJQB5TN-BaMZaYV6.js → chunk-MOJQB5TN-DlZ2OL1h.js} +1 -1
- package/dist-web/assets/{chunk-RYQCIY6F-CcIPfAlG.js → chunk-RYQCIY6F-hOcXr3tj.js} +1 -1
- package/dist-web/assets/{chunk-V7JOEXUC-B-9YPLdn.js → chunk-V7JOEXUC-DGXwP3rv.js} +1 -1
- package/dist-web/assets/{chunk-VR4S4FIN-Rz7pk0DO.js → chunk-VR4S4FIN-FdPeJe6y.js} +1 -1
- package/dist-web/assets/{chunk-XXDRQBXY-C1mw9Iax.js → chunk-XXDRQBXY-CgSo79dI.js} +1 -1
- package/dist-web/assets/classDiagram-OUVF2IWQ-C7YnXWqb.js +1 -0
- package/dist-web/assets/classDiagram-v2-EOCWNBFH-C7YnXWqb.js +1 -0
- package/dist-web/assets/{cose-bilkent-JH36ORCC-DgiTJLZO.js → cose-bilkent-JH36ORCC-Darjcrxi.js} +1 -1
- package/dist-web/assets/{cynefin-VYW2F7L2-DrwI8Eqm.js → cynefin-VYW2F7L2-5G3hA7cr.js} +1 -1
- package/dist-web/assets/{cynefinDiagram-TSTJHNR4-xjs-sfTy.js → cynefinDiagram-TSTJHNR4-Qyp0nUBB.js} +1 -1
- package/dist-web/assets/{dagre-VKFMJZFB-BI34AG2K.js → dagre-VKFMJZFB-CYSXGctv.js} +1 -1
- package/dist-web/assets/{diagram-FQU43EPY-5l4V6Cn1.js → diagram-FQU43EPY-ZrAxI-dk.js} +1 -1
- package/dist-web/assets/{diagram-G47NLZAW-Cily-iDM.js → diagram-G47NLZAW-BcXugaAM.js} +1 -1
- package/dist-web/assets/{diagram-NH7WQ7WH-CMn2RIs-.js → diagram-NH7WQ7WH-DYlJF7uY.js} +1 -1
- package/dist-web/assets/{diagram-OA4YK3LP-B0rx3Pwv.js → diagram-OA4YK3LP-DT_vdkMQ.js} +1 -1
- package/dist-web/assets/{diagram-WEI45ONY-BvyBnZMz.js → diagram-WEI45ONY-C9NbHUum.js} +1 -1
- package/dist-web/assets/{ebnfDiagram-CCIWWBDH-B6-T6Qdh.js → ebnfDiagram-CCIWWBDH-BtYop6_W.js} +1 -1
- package/dist-web/assets/{erDiagram-Q63AITRT-KdRBpXT6.js → erDiagram-Q63AITRT-hOQ0lT_K.js} +1 -1
- package/dist-web/assets/{flowDiagram-23GEKE2U-DMHc637z.js → flowDiagram-23GEKE2U-CNuvMMcz.js} +1 -1
- package/dist-web/assets/{ganttDiagram-NO4QXBWP-n1EmIix1.js → ganttDiagram-NO4QXBWP-D-jxKbra.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-IHSO6WYX-EMprzE7f.js → gitGraphDiagram-IHSO6WYX-CfAxfZAI.js} +1 -1
- package/dist-web/assets/{index-DX_O_apV.js → index-C-jEQeCU.js} +2 -2
- package/dist-web/assets/index-CiJ6FDOC.js +1126 -0
- package/dist-web/assets/{index-BfTAIyiC.js → index-DmgTlO-b.js} +1 -1
- package/dist-web/assets/{index-C0mVTUAS.js → index-JrJ6_GOd.js} +1 -1
- package/dist-web/assets/index-zbwnJKhO.css +32 -0
- package/dist-web/assets/{index10-qGPpXJ-A.js → index10-Ba5OIfKd.js} +1 -1
- package/dist-web/assets/{index11-DfwvpYsQ.js → index11-1rn8G5-L.js} +1 -1
- package/dist-web/assets/{index5-Baz_oPtJ.js → index5-imM41z_l.js} +1 -1
- package/dist-web/assets/{index6-el9S3mzv.js → index6-DA3uJFWk.js} +1 -1
- package/dist-web/assets/{index7-B6Cwh6v2.js → index7-QSn9lPwh.js} +1 -1
- package/dist-web/assets/{index8-jo0ViEvh.js → index8-DrKPJmGd.js} +1 -1
- package/dist-web/assets/{infoDiagram-FWYZ7A6U-oCoN8bzC.js → infoDiagram-FWYZ7A6U-Bfob5tUX.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-FXEZZL3T-krXOPoON.js → ishikawaDiagram-FXEZZL3T-DVWhDYOu.js} +1 -1
- package/dist-web/assets/{journeyDiagram-5HDEW3XC-C-DBeq46.js → journeyDiagram-5HDEW3XC-BssF6You.js} +1 -1
- package/dist-web/assets/{kanban-definition-HUTT4EX6-DukFGg59.js → kanban-definition-HUTT4EX6-dzAmBIuH.js} +1 -1
- package/dist-web/assets/{linear-DieWGh7l.js → linear-DQD3t2Xn.js} +1 -1
- package/dist-web/assets/{mermaid.core-BGDC9MZG.js → mermaid.core-C9jyadm5.js} +4 -4
- package/dist-web/assets/{mindmap-definition-LN4V7U3C-B83xqBMM.js → mindmap-definition-LN4V7U3C-Cr2y1CVV.js} +1 -1
- package/dist-web/assets/{pegDiagram-2B236MQR-B7RCPBok.js → pegDiagram-2B236MQR-KgvyboWs.js} +1 -1
- package/dist-web/assets/{pieDiagram-ENE6RG2P-C93r__Gw.js → pieDiagram-ENE6RG2P-Bwk5uJs3.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-ABIIQ3AL-CZs54I38.js → quadrantDiagram-ABIIQ3AL-B9nqRXzL.js} +1 -1
- package/dist-web/assets/{railroadDiagram-RFXS5EU6-CrjpRU19.js → railroadDiagram-RFXS5EU6-D8JNLWlO.js} +1 -1
- package/dist-web/assets/{requirementDiagram-TGXJPOKE-CvNzv8Li.js → requirementDiagram-TGXJPOKE-e-2aWNck.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-HTMAVEWB-IXC2Gncj.js → sankeyDiagram-HTMAVEWB-Dy4-rUyp.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-DBY2YBRQ-CwgtuLbL.js → sequenceDiagram-DBY2YBRQ-Cpmd7yl8.js} +1 -1
- package/dist-web/assets/{sizeCapture-X5ZJPWSS-DYEk8h6-.js → sizeCapture-X5ZJPWSS-BEZnpCcJ.js} +1 -1
- package/dist-web/assets/{stateDiagram-2N3HPSRC-4TNBZUAb.js → stateDiagram-2N3HPSRC-BlPnr6FV.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-6OUMAXLB-Dh0BUURk.js +1 -0
- package/dist-web/assets/{swimlanes-5IMT3BWC-DiOQ49Ci.js → swimlanes-5IMT3BWC-NdRerzVX.js} +2 -2
- package/dist-web/assets/swimlanesDiagram-G3AALYLV-DLGtYanS.js +8 -0
- package/dist-web/assets/{timeline-definition-FHXFAJF6-B2d6LeJv.js → timeline-definition-FHXFAJF6-a2gsEX7B.js} +1 -1
- package/dist-web/assets/{vennDiagram-L72KCM5P-BgmbEyYq.js → vennDiagram-L72KCM5P-DmbZn6B3.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-Fks1NQu5.js → vue.runtime.esm-bundler-rUWK3qjQ.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-EHGQE667-4c_za9mC.js → wardleyDiagram-EHGQE667-CPNoDv5i.js} +1 -1
- package/dist-web/assets/{xychartDiagram-FW5EYKEG-BFt3pAU6.js → xychartDiagram-FW5EYKEG-DlWidJnk.js} +1 -1
- package/dist-web/index.html +2 -2
- package/package.json +5 -5
- package/dist-web/assets/channel-O2EO2SUt.js +0 -1
- package/dist-web/assets/classDiagram-OUVF2IWQ-BbHvMn0u.js +0 -1
- package/dist-web/assets/classDiagram-v2-EOCWNBFH-BbHvMn0u.js +0 -1
- package/dist-web/assets/index-BQ60J3dV.css +0 -32
- package/dist-web/assets/index-DkwBvjsJ.js +0 -1118
- package/dist-web/assets/stateDiagram-v2-6OUMAXLB-85QvczWB.js +0 -1
- package/dist-web/assets/swimlanesDiagram-G3AALYLV-DFZ8GCVh.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{bR as l,cx as En,cy as _t,cz as bn,cA as vn,cB as yt,cC as x,cD as V,cE as Pe,cF as J,cG as wn,cH as it,cI as An,cJ as Cn,cK as Rr,cL as Tn,cM as Ln,cN as xr,cO as Vr,cP as Nr,cQ as $r,cR as Mr,cS as Br}from"./index-DkwBvjsJ.js";const Ur=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ee{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Ee.prototype.normal={};Ee.prototype.property={};Ee.prototype.space=void 0;function kn(e,n){const t={},r={};for(const o of e)Object.assign(t,o.property),Object.assign(r,o.normal);return new Ee(t,r,n)}function at(e){return e.toLowerCase()}class N{constructor(n,t){this.attribute=t,this.property=n}}N.prototype.attribute="";N.prototype.booleanish=!1;N.prototype.boolean=!1;N.prototype.commaOrSpaceSeparated=!1;N.prototype.commaSeparated=!1;N.prototype.defined=!1;N.prototype.mustUseProperty=!1;N.prototype.number=!1;N.prototype.overloadedBoolean=!1;N.prototype.property="";N.prototype.spaceSeparated=!1;N.prototype.space=void 0;let Fr=0;const w=ne(),k=ne(),st=ne(),h=ne(),C=ne(),ee=ne(),$=ne();function ne(){return 2**++Fr}const lt=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:k,commaOrSpaceSeparated:$,commaSeparated:ee,number:h,overloadedBoolean:st,spaceSeparated:C},Symbol.toStringTag,{value:"Module"})),qe=Object.keys(lt);class Et extends N{constructor(n,t,r,o){let i=-1;if(super(n,t),Ft(this,"space",o),typeof r=="number")for(;++i<qe.length;){const a=qe[i];Ft(this,qe[i],(r<[a])===lt[a])}}}Et.prototype.defined=!0;function Ft(e,n,t){t&&(e[n]=t)}function ce(e){const n={},t={};for(const[r,o]of Object.entries(e.properties)){const i=new Et(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),n[r]=i,t[at(r)]=r,t[at(i.attribute)]=r}return new Ee(n,t,e.space)}const In=ce({properties:{ariaActiveDescendant:null,ariaAtomic:k,ariaAutoComplete:null,ariaBusy:k,ariaChecked:k,ariaColCount:h,ariaColIndex:h,ariaColSpan:h,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:k,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:k,ariaFlowTo:C,ariaGrabbed:k,ariaHasPopup:null,ariaHidden:k,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:h,ariaLive:null,ariaModal:k,ariaMultiLine:k,ariaMultiSelectable:k,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:h,ariaPressed:k,ariaReadOnly:k,ariaRelevant:null,ariaRequired:k,ariaRoleDescription:C,ariaRowCount:h,ariaRowIndex:h,ariaRowSpan:h,ariaSelected:k,ariaSetSize:h,ariaSort:null,ariaValueMax:h,ariaValueMin:h,ariaValueNow:h,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Pn(e,n){return n in e?e[n]:n}function On(e,n){return Pn(e,n.toLowerCase())}const Gr=ce({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ee,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alpha:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:C,autoFocus:w,autoPlay:w,blocking:C,capture:null,charSet:null,checked:w,cite:null,className:C,closedBy:null,colorSpace:null,cols:h,colSpan:h,command:null,commandFor:null,content:null,contentEditable:k,controls:w,controlsList:C,coords:h|ee,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:st,draggable:k,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:C,height:h,hidden:st,high:h,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:C,itemRef:C,itemScope:w,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:h,manifest:null,max:null,maxLength:h,media:null,method:null,min:null,minLength:h,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:h,pattern:null,ping:C,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:C,required:w,reversed:w,rows:h,rowSpan:h,sandbox:C,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootCustomElementRegistry:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shadowRootSerializable:w,shape:null,size:h,sizes:null,slot:null,span:h,spellCheck:k,src:null,srcDoc:null,srcLang:null,srcSet:null,start:h,step:null,style:null,tabIndex:h,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:k,width:h,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:h,borderColor:null,bottomMargin:h,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:h,leftMargin:h,link:null,longDesc:null,lowSrc:null,marginHeight:h,marginWidth:h,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:h,rules:null,scheme:null,scrolling:k,standby:null,summary:null,text:null,topMargin:h,valueType:null,version:null,vAlign:null,vLink:null,vSpace:h,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:w,disablePictureInPicture:w,disableRemotePlayback:w,exportParts:ee,part:C,prefix:null,property:null,results:h,security:null,unselectable:null},space:"html",transform:On}),Hr=ce({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$,accentHeight:h,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:h,amplitude:h,arabicForm:null,ascent:h,attributeName:null,attributeType:null,azimuth:h,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:h,by:null,calcMode:null,capHeight:h,className:C,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:h,diffuseConstant:h,direction:null,display:null,dur:null,divisor:h,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:h,enableBackground:null,end:null,event:null,exponent:h,externalResourcesRequired:null,fill:null,fillOpacity:h,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ee,g2:ee,glyphName:ee,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:h,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:h,horizOriginX:h,horizOriginY:h,id:null,ideographic:h,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:h,k:h,k1:h,k2:h,k3:h,k4:h,kernelMatrix:$,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:h,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:h,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:h,overlineThickness:h,paintOrder:null,panose1:null,path:null,pathLength:h,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:h,pointsAtY:h,pointsAtZ:h,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$,rev:$,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$,requiredFeatures:$,requiredFonts:$,requiredFormats:$,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:h,specularExponent:h,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:h,strikethroughThickness:h,string:null,stroke:null,strokeDashArray:$,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:h,strokeOpacity:h,strokeWidth:null,style:null,surfaceScale:h,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$,tabIndex:h,tableValues:null,target:null,targetX:h,targetY:h,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:h,underlineThickness:h,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:h,values:null,vAlphabetic:h,vMathematical:h,vectorEffect:null,vHanging:h,vIdeographic:h,version:null,vertAdvY:h,vertOriginX:h,vertOriginY:h,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:h,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pn}),Sn=ce({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Dn=ce({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:On}),Rn=ce({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),jr=/[A-Z]/g,Gt=/-[a-z]/g,zr=/^data[-\w.:]+$/i;function Wr(e,n){const t=at(n);let r=n,o=N;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&zr.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(Gt,Xr);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!Gt.test(i)){let a=i.replace(jr,qr);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}o=Et}return new o(r,n)}function qr(e){return"-"+e.toLowerCase()}function Xr(e){return e.charAt(1).toUpperCase()}const Jr=kn([In,Gr,Sn,Dn,Rn],"html"),xn=kn([In,Hr,Sn,Dn,Rn],"svg"),Ht={}.hasOwnProperty;function Qr(e,n){const t=n||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&Ht.call(o,e)){const u=String(o[e]);a=Ht.call(s,u)?s[u]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const Zr=/["&'<>`]/g,Kr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eo=/[|\\{}()[\]^$+*?.]/g,jt=new WeakMap;function to(e,n){if(e=e.replace(n.subset?no(n.subset):Zr,r),n.subset||n.escapeOnly)return e;return e.replace(Kr,t).replace(Yr,r);function t(o,i,a){return n.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),n)}function r(o,i,a){return n.format(o.charCodeAt(0),a.charCodeAt(i+1),n)}}function no(e){let n=jt.get(e);return n||(n=ro(e),jt.set(e,n)),n}function ro(e){const n=[];let t=-1;for(;++t<e.length;)n.push(e[t].replace(eo,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const oo=/[\dA-Fa-f]/;function io(e,n,t){const r="&#x"+e.toString(16).toUpperCase();return t&&n&&!oo.test(String.fromCharCode(n))?r:r+";"}const ao=/\d/;function so(e,n,t){const r="&#"+String(e);return t&&n&&!ao.test(String.fromCharCode(n))?r:r+";"}const lo=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Xe={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},uo=["cent","copy","divide","gt","lt","not","para","times"],Vn={}.hasOwnProperty,ut={};let we;for(we in Xe)Vn.call(Xe,we)&&(ut[Xe[we]]=we);const co=/[^\dA-Za-z]/;function po(e,n,t,r){const o=String.fromCharCode(e);if(Vn.call(ut,o)){const i=ut[o],a="&"+i;return t&&lo.includes(i)&&!uo.includes(i)&&(!r||n&&n!==61&&co.test(String.fromCharCode(n)))?a:a+";"}return""}function mo(e,n,t){let r=io(e,n,t.omitOptionalSemicolons),o;if((t.useNamedReferences||t.useShortestReferences)&&(o=po(e,n,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!o)&&t.useShortestReferences){const i=so(e,n,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!t.useShortestReferences||o.length<r.length)?o:r}function ue(e,n){return to(e,Object.assign({format:mo},n))}const fo=/^>|^->|<!--|-->|--!>|<!-$/g,go=[">"],ho=["<",">"];function _o(e,n,t,r){return r.settings.bogusComments?"<?"+ue(e.value,Object.assign({},r.settings.characterReferences,{subset:go}))+">":"<!--"+e.value.replace(fo,o)+"-->";function o(i){return ue(i,Object.assign({},r.settings.characterReferences,{subset:ho}))}}function yo(e,n,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function zt(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(n);for(;o!==-1;)r++,o=t.indexOf(n,o+n.length);return r}function Eo(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function bo(e){return e.join(" ").trim()}const vo=/[ \t\n\f\r]/g;function bt(e){return typeof e=="object"?e.type==="text"?Wt(e.value):!1:Wt(e)}function Wt(e){return e.replace(vo,"")===""}const O=$n(1),Nn=$n(-1),wo=[];function $n(e){return n;function n(t,r,o){const i=t?t.children:wo;let a=(r||0)+e,s=i[a];if(!o)for(;s&&bt(s);)a+=e,s=i[a];return s}}const Ao={}.hasOwnProperty;function Mn(e){return n;function n(t,r,o){return Ao.call(e,t.tagName)&&e[t.tagName](t,r,o)}}const vt=Mn({body:To,caption:Je,colgroup:Je,dd:Po,dt:Io,head:Je,html:Co,li:ko,optgroup:Oo,option:So,p:Lo,rp:qt,rt:qt,tbody:Ro,td:Xt,tfoot:xo,th:Xt,thead:Do,tr:Vo});function Je(e,n,t){const r=O(t,n,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&bt(r.value.charAt(0)))}function Co(e,n,t){const r=O(t,n);return!r||r.type!=="comment"}function To(e,n,t){const r=O(t,n);return!r||r.type!=="comment"}function Lo(e,n,t){const r=O(t,n);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ko(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="li"}function Io(e,n,t){const r=O(t,n);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Po(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function qt(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Oo(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="optgroup"}function So(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Do(e,n,t){const r=O(t,n);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Ro(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function xo(e,n,t){return!O(t,n)}function Vo(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="tr"}function Xt(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const No=Mn({body:Bo,colgroup:Uo,head:Mo,html:$o,tbody:Fo});function $o(e){const n=O(e,-1);return!n||n.type!=="comment"}function Mo(e){const n=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(n.has(r.tagName))return!1;n.add(r.tagName)}const t=e.children[0];return!t||t.type==="element"}function Bo(e){const n=O(e,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&bt(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function Uo(e,n,t){const r=Nn(t,n),o=O(e,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&vt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Fo(e,n,t){const r=Nn(t,n),o=O(e,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&vt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Ae={name:[[`
|
|
2
|
+
import{bR as l,cx as En,cy as _t,cz as bn,cA as vn,cB as yt,cC as x,cD as V,cE as Pe,cF as J,cG as wn,cH as it,cI as An,cJ as Cn,cK as Rr,cL as Tn,cM as Ln,cN as xr,cO as Vr,cP as Nr,cQ as $r,cR as Mr,cS as Br}from"./index-CiJ6FDOC.js";const Ur=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ee{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Ee.prototype.normal={};Ee.prototype.property={};Ee.prototype.space=void 0;function kn(e,n){const t={},r={};for(const o of e)Object.assign(t,o.property),Object.assign(r,o.normal);return new Ee(t,r,n)}function at(e){return e.toLowerCase()}class N{constructor(n,t){this.attribute=t,this.property=n}}N.prototype.attribute="";N.prototype.booleanish=!1;N.prototype.boolean=!1;N.prototype.commaOrSpaceSeparated=!1;N.prototype.commaSeparated=!1;N.prototype.defined=!1;N.prototype.mustUseProperty=!1;N.prototype.number=!1;N.prototype.overloadedBoolean=!1;N.prototype.property="";N.prototype.spaceSeparated=!1;N.prototype.space=void 0;let Fr=0;const w=ne(),k=ne(),st=ne(),h=ne(),C=ne(),ee=ne(),$=ne();function ne(){return 2**++Fr}const lt=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:k,commaOrSpaceSeparated:$,commaSeparated:ee,number:h,overloadedBoolean:st,spaceSeparated:C},Symbol.toStringTag,{value:"Module"})),qe=Object.keys(lt);class Et extends N{constructor(n,t,r,o){let i=-1;if(super(n,t),Ft(this,"space",o),typeof r=="number")for(;++i<qe.length;){const a=qe[i];Ft(this,qe[i],(r<[a])===lt[a])}}}Et.prototype.defined=!0;function Ft(e,n,t){t&&(e[n]=t)}function ce(e){const n={},t={};for(const[r,o]of Object.entries(e.properties)){const i=new Et(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),n[r]=i,t[at(r)]=r,t[at(i.attribute)]=r}return new Ee(n,t,e.space)}const In=ce({properties:{ariaActiveDescendant:null,ariaAtomic:k,ariaAutoComplete:null,ariaBusy:k,ariaChecked:k,ariaColCount:h,ariaColIndex:h,ariaColSpan:h,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:k,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:k,ariaFlowTo:C,ariaGrabbed:k,ariaHasPopup:null,ariaHidden:k,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:h,ariaLive:null,ariaModal:k,ariaMultiLine:k,ariaMultiSelectable:k,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:h,ariaPressed:k,ariaReadOnly:k,ariaRelevant:null,ariaRequired:k,ariaRoleDescription:C,ariaRowCount:h,ariaRowIndex:h,ariaRowSpan:h,ariaSelected:k,ariaSetSize:h,ariaSort:null,ariaValueMax:h,ariaValueMin:h,ariaValueNow:h,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Pn(e,n){return n in e?e[n]:n}function On(e,n){return Pn(e,n.toLowerCase())}const Gr=ce({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ee,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alpha:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:C,autoFocus:w,autoPlay:w,blocking:C,capture:null,charSet:null,checked:w,cite:null,className:C,closedBy:null,colorSpace:null,cols:h,colSpan:h,command:null,commandFor:null,content:null,contentEditable:k,controls:w,controlsList:C,coords:h|ee,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:st,draggable:k,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:C,height:h,hidden:st,high:h,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:C,itemRef:C,itemScope:w,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:h,manifest:null,max:null,maxLength:h,media:null,method:null,min:null,minLength:h,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:h,pattern:null,ping:C,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:C,required:w,reversed:w,rows:h,rowSpan:h,sandbox:C,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootCustomElementRegistry:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shadowRootSerializable:w,shape:null,size:h,sizes:null,slot:null,span:h,spellCheck:k,src:null,srcDoc:null,srcLang:null,srcSet:null,start:h,step:null,style:null,tabIndex:h,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:k,width:h,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:h,borderColor:null,bottomMargin:h,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:h,leftMargin:h,link:null,longDesc:null,lowSrc:null,marginHeight:h,marginWidth:h,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:h,rules:null,scheme:null,scrolling:k,standby:null,summary:null,text:null,topMargin:h,valueType:null,version:null,vAlign:null,vLink:null,vSpace:h,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:w,disablePictureInPicture:w,disableRemotePlayback:w,exportParts:ee,part:C,prefix:null,property:null,results:h,security:null,unselectable:null},space:"html",transform:On}),Hr=ce({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$,accentHeight:h,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:h,amplitude:h,arabicForm:null,ascent:h,attributeName:null,attributeType:null,azimuth:h,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:h,by:null,calcMode:null,capHeight:h,className:C,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:h,diffuseConstant:h,direction:null,display:null,dur:null,divisor:h,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:h,enableBackground:null,end:null,event:null,exponent:h,externalResourcesRequired:null,fill:null,fillOpacity:h,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ee,g2:ee,glyphName:ee,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:h,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:h,horizOriginX:h,horizOriginY:h,id:null,ideographic:h,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:h,k:h,k1:h,k2:h,k3:h,k4:h,kernelMatrix:$,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:h,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:h,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:h,overlineThickness:h,paintOrder:null,panose1:null,path:null,pathLength:h,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:h,pointsAtY:h,pointsAtZ:h,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$,rev:$,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$,requiredFeatures:$,requiredFonts:$,requiredFormats:$,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:h,specularExponent:h,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:h,strikethroughThickness:h,string:null,stroke:null,strokeDashArray:$,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:h,strokeOpacity:h,strokeWidth:null,style:null,surfaceScale:h,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$,tabIndex:h,tableValues:null,target:null,targetX:h,targetY:h,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:h,underlineThickness:h,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:h,values:null,vAlphabetic:h,vMathematical:h,vectorEffect:null,vHanging:h,vIdeographic:h,version:null,vertAdvY:h,vertOriginX:h,vertOriginY:h,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:h,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pn}),Sn=ce({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Dn=ce({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:On}),Rn=ce({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),jr=/[A-Z]/g,Gt=/-[a-z]/g,zr=/^data[-\w.:]+$/i;function Wr(e,n){const t=at(n);let r=n,o=N;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&zr.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(Gt,Xr);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!Gt.test(i)){let a=i.replace(jr,qr);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}o=Et}return new o(r,n)}function qr(e){return"-"+e.toLowerCase()}function Xr(e){return e.charAt(1).toUpperCase()}const Jr=kn([In,Gr,Sn,Dn,Rn],"html"),xn=kn([In,Hr,Sn,Dn,Rn],"svg"),Ht={}.hasOwnProperty;function Qr(e,n){const t=n||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&Ht.call(o,e)){const u=String(o[e]);a=Ht.call(s,u)?s[u]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const Zr=/["&'<>`]/g,Kr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eo=/[|\\{}()[\]^$+*?.]/g,jt=new WeakMap;function to(e,n){if(e=e.replace(n.subset?no(n.subset):Zr,r),n.subset||n.escapeOnly)return e;return e.replace(Kr,t).replace(Yr,r);function t(o,i,a){return n.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),n)}function r(o,i,a){return n.format(o.charCodeAt(0),a.charCodeAt(i+1),n)}}function no(e){let n=jt.get(e);return n||(n=ro(e),jt.set(e,n)),n}function ro(e){const n=[];let t=-1;for(;++t<e.length;)n.push(e[t].replace(eo,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const oo=/[\dA-Fa-f]/;function io(e,n,t){const r="&#x"+e.toString(16).toUpperCase();return t&&n&&!oo.test(String.fromCharCode(n))?r:r+";"}const ao=/\d/;function so(e,n,t){const r="&#"+String(e);return t&&n&&!ao.test(String.fromCharCode(n))?r:r+";"}const lo=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Xe={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},uo=["cent","copy","divide","gt","lt","not","para","times"],Vn={}.hasOwnProperty,ut={};let we;for(we in Xe)Vn.call(Xe,we)&&(ut[Xe[we]]=we);const co=/[^\dA-Za-z]/;function po(e,n,t,r){const o=String.fromCharCode(e);if(Vn.call(ut,o)){const i=ut[o],a="&"+i;return t&&lo.includes(i)&&!uo.includes(i)&&(!r||n&&n!==61&&co.test(String.fromCharCode(n)))?a:a+";"}return""}function mo(e,n,t){let r=io(e,n,t.omitOptionalSemicolons),o;if((t.useNamedReferences||t.useShortestReferences)&&(o=po(e,n,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!o)&&t.useShortestReferences){const i=so(e,n,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!t.useShortestReferences||o.length<r.length)?o:r}function ue(e,n){return to(e,Object.assign({format:mo},n))}const fo=/^>|^->|<!--|-->|--!>|<!-$/g,go=[">"],ho=["<",">"];function _o(e,n,t,r){return r.settings.bogusComments?"<?"+ue(e.value,Object.assign({},r.settings.characterReferences,{subset:go}))+">":"<!--"+e.value.replace(fo,o)+"-->";function o(i){return ue(i,Object.assign({},r.settings.characterReferences,{subset:ho}))}}function yo(e,n,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function zt(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(n);for(;o!==-1;)r++,o=t.indexOf(n,o+n.length);return r}function Eo(e,n){const t=n||{};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function bo(e){return e.join(" ").trim()}const vo=/[ \t\n\f\r]/g;function bt(e){return typeof e=="object"?e.type==="text"?Wt(e.value):!1:Wt(e)}function Wt(e){return e.replace(vo,"")===""}const O=$n(1),Nn=$n(-1),wo=[];function $n(e){return n;function n(t,r,o){const i=t?t.children:wo;let a=(r||0)+e,s=i[a];if(!o)for(;s&&bt(s);)a+=e,s=i[a];return s}}const Ao={}.hasOwnProperty;function Mn(e){return n;function n(t,r,o){return Ao.call(e,t.tagName)&&e[t.tagName](t,r,o)}}const vt=Mn({body:To,caption:Je,colgroup:Je,dd:Po,dt:Io,head:Je,html:Co,li:ko,optgroup:Oo,option:So,p:Lo,rp:qt,rt:qt,tbody:Ro,td:Xt,tfoot:xo,th:Xt,thead:Do,tr:Vo});function Je(e,n,t){const r=O(t,n,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&bt(r.value.charAt(0)))}function Co(e,n,t){const r=O(t,n);return!r||r.type!=="comment"}function To(e,n,t){const r=O(t,n);return!r||r.type!=="comment"}function Lo(e,n,t){const r=O(t,n);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ko(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="li"}function Io(e,n,t){const r=O(t,n);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Po(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function qt(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Oo(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="optgroup"}function So(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Do(e,n,t){const r=O(t,n);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Ro(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function xo(e,n,t){return!O(t,n)}function Vo(e,n,t){const r=O(t,n);return!r||r.type==="element"&&r.tagName==="tr"}function Xt(e,n,t){const r=O(t,n);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const No=Mn({body:Bo,colgroup:Uo,head:Mo,html:$o,tbody:Fo});function $o(e){const n=O(e,-1);return!n||n.type!=="comment"}function Mo(e){const n=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(n.has(r.tagName))return!1;n.add(r.tagName)}const t=e.children[0];return!t||t.type==="element"}function Bo(e){const n=O(e,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&bt(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function Uo(e,n,t){const r=Nn(t,n),o=O(e,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&vt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Fo(e,n,t){const r=Nn(t,n),o=O(e,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&vt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Ae={name:[[`
|
|
3
3
|
\f\r &/=>`.split(""),`
|
|
4
4
|
\f\r "&'/=>\``.split("")],[`\0
|
|
5
5
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as fe,b as Sn,c as wr,a as Tr,d as Er,s as Ir,g as Ar,e as Rr}from"./index-BfTAIyiC.js";import{f as Kl}from"./index-BfTAIyiC.js";import{cT as Y,cU as Hr,bR as Mr,cV as Dr,cW as Pr}from"./index-DkwBvjsJ.js";const xi="diffs-container",Or=(()=>{try{return!1}catch{return!1}})(),Nr=/(?=^From [a-f0-9]+ .+$)/m,Li=/(?=^diff --git)/gm,cl=/(?=^---\s+\S)/gm,ul=/(?=^@@ )/gm,Fr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,zr=/(?<=\n)/,Ur=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Br=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,_r=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Vr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,fl=/^<{7,}(?:\s.*)?$/,pl=/^\|{7,}(?:\s.*)?$/,gl=/^={7,}$/,ml=/^>{7,}(?:\s.*)?$/,nn="header-prefix",rn="header-metadata",on="header-custom",P={dark:"pierre-dark",light:"pierre-light"},ki="data-theme-css",wi="data-unsafe-css",$r="data-core-css",Wr="data-diffs-scrollbar-measure",Ti="--diffs-scrollbar-gutter-measured",vl=1,Gr=1e5,sn={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Pe={...sn,hunkLineCount:1},jr={paddingTop:8,paddingBottom:8,gap:8},qr={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Kr=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ei={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ee=new Set;let Ie=null;function K(e){Ee.add(e),Ie??=requestAnimationFrame(Ii)}function Yr(e){Ee.delete(e),Ee.size===0&&Ie!=null&&(cancelAnimationFrame(Ie),Ie=null)}function Ii(e){const t=new Set(Ee);Ee.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ee.size>0?Ie=requestAnimationFrame(Ii):Ie=null}function Re(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Me(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function an(e,t){const n=e?.theme??P,i=t?.theme??P,r=yn(e),o=yn(t);return Me(n,i)&&Re(e,t,["theme","parseDiffOptions"])&&Re(r,o)}function yn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Vt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function $t({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function Xr(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function $(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function ut({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function Qr(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function we(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Ai(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[$(`${t}`)]})]:void 0})}function G(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Jr(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[ut({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function Zr(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Ri=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}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:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):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}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Vt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.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:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&Je(e.composedPath())||(de(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(de(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(de(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){de(t,"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:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();de(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);de(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const p=wt(r)&&this.hoveredLine?.lineElement===r.lineElement;ht(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ht(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),wt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(no(r)&&f!=null){f(r);break}if(to(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!wt(r))break;ht(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const p=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...p,event:t}):o?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:p}=this.options,v=p!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||v;y&&!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,de(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(i!=null&&b.push("onLineClick"),r!=null&&b.push("onLineNumberClick"),h!=null&&b.push("expandable hunk separators"),c!=null&&b.push("merge conflict actions")),b})()),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&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 C=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",g=this.pointerSession.mode==="gutterSelecting";(!f&&C||!v&&g)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&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 t=e.composedPath();Je(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};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:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(Zr(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=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,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(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:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="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 t=document.createElement("div");t.innerHTML=fe(Jr());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Be(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}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 t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!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 t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Qe(r));if(Be(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}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,t){const n=this.resolvePointerTarget(e);if(Be(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Be(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Je(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Qe(e);if(t&&Je(n))return;const i=ro(e);return i!=null?Qe(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=so(oo(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Qe(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=Ln(t)?t:Ln(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Vt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}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 l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const p=this.parseLineIndex(u,n);if((p??0)>s)break;if(p==null||p<o)continue;let v=r?"single":p===o?"first":p===s?"last":"";u.setAttribute("data-selected-line",v),f.setAttribute("data-selected-line",v),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(v="last",u.setAttribute("data-selected-line","first")):p===o?v="":p===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",v),f.nextSibling.setAttribute("data-selected-line",v))}}};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:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const C=f.getAttribute("data-merge-conflict-action")??void 0,g=f.getAttribute("data-merge-conflict-conflict-index")??void 0,b=g!=null?Number.parseInt(g,10):NaN;io(C)&&Number.isFinite(b)&&(c={kind:"merge-conflict-action",resolution:C,conflictIndex:b})}if(l==null&&f.hasAttribute("data-char")){l=f;const C=f.getAttribute("data-char");if(C!=null){const g=Number.parseInt(C,10);if(!Number.isNaN(g)){const b=f.textContent??"",m=g+b.length;(b.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:g,lineCharEnd:m,tokenText:b});continue}}}const p=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(p!=null){s=f,h=Number.parseInt(p,10),t=!0,n=wn(f),o=f.getAttribute("data-line-index")??void 0;continue}const v=r==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){r=f,h=Number.parseInt(v,10),n=wn(f),o=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 y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const C=Number.parseInt(y,10);Number.isNaN(C)||(d.hunkIndex=C);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?xn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?xn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:kn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:kn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function qe({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g},b,m,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:eo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:b,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g,getLineIndex:m}}function eo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Be(e){return e!=null&&"kind"in e&&e.kind==="line"}function ht(e){return e!=null&&"kind"in e&&e.kind==="token"}function wt(e){return Be(e)||ht(e)}function to(e){return"type"in e&&e.type==="line-info"}function no(e){return"kind"in e&&e.kind==="merge-conflict-action"}function io(e){return e==="current"||e==="incoming"||e==="both"}function xn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Qe(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function ro(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function oo(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function so(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ln(e){return e!=null&&typeof e.elementFromPoint=="function"}function kn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function wn(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Je(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function de(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var Hi=class ce{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ce.resizeObserver??new ResizeObserver(ce.handleSharedResizeEntries);return ce.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ce.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.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),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let p=o.get(u);if(p!=null){this.observedNodes.set(u,p),this.observedNodes.set(f,p),o.delete(u),o.delete(f);continue}const v=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;p={type:"annotations",column1:{container:h,child:u,childHeight:v},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:p,newHeight:Math.max(v,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?ho(l):co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ce,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ce.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ce,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ce.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?ao(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?lo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function ao(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function lo(e){return Math.max(Math.ceil(e),0)}function ho(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 co(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")}const Ce=new Map,Tt=new Map,Wt=new Map,ft=new Set;function pt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ft.has(t))return!1;return!0}function Tn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(ft.has(n.name))continue;let i=Ce.get(n.name);i==null&&(i=n,Ce.set(n.name,i)),ft.add(i.name),t.loadLanguageSync(i.data)}}function uo(){Ce.clear(),ft.clear()}function Mi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Di(e){if(Mi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Tt.get(e);if(t!=null)return t;try{let n=Wt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Sn,e)&&(n=Sn[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Ce.has(e)||Ce.set(e,o),o});return Tt.set(e,i),await i}finally{Tt.delete(e)}}function Pi(e){return Ce.get(e)??Di(e)}const gt=new Set;function En(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=Y.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,Y.getResolvedTheme(n)==null&&Y.seedResolvedTheme(n,i);gt.has(n)||(gt.add(n),t.loadThemeSync(i))}}function fo(){Y.clearResolvedThemes(),gt.clear()}function Oi(e){if(Mi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Y.hasRegisteredTheme(e))return;const t=Hr.getTheme(e);if(t!=null){Y.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Ni(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function po(e){Oi(e);const t=await Y.resolveTheme(e);return Ni(e,t),t}function go(e){return Y.getResolvedTheme(e)??po(e)}let V;async function St({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){V??=wr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Tr(Mr(()=>import("./wasm-CG6Dc4jp.js"),[])):Er()});const i=mo(V)?await V:V;V=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Pi(s);"then"in l?r.push(l):Tn(l,i)}const o=[];for(const s of e){const l=go(s);"then"in l?o.push(l):En(l,V)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Tn(s,i)}),Promise.all(o).then(s=>{En(s,i)})]),i}function bl(e=V){return e!=null&&!("then"in e)}function Fi(){if(V!=null&&!("then"in V))return V}function mo(e=V){return e!=null&&"then"in e}function Cl(e=V){return e==null}async function Sl(e){await St(e)}async function yl(){V!=null&&((await V).dispose(),uo(),fo(),V=void 0)}for(const e of Dr.getThemes())Y.registerThemeIfAbsent(e.name,e.load);function ln(e=P){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function We(e){for(const t of ln(e))if(!gt.has(t))return!1;return!0}function vo(e){return Y.hasResolvedThemes(e)}function Oe(e,t){return Me(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function se(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function yt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Gt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function bo(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 zi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:on}}):Co({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[So(i)]],properties:r})}function Co({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:nn}}),ut({name:bo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(t)]})],properties:{"data-prev-name":""}})),i.push(ut({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function So(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[$(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[$(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:rn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Ui(e){return A({tagName:"pre",properties:yo(e)})}function yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const J=new Map;let mt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function X(e){if(J.has(e))return J.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(J.has(t[1]))return J.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return J.has(n)?J.get(n)??"text":Ne[n]??"text"}function xl(e,t){if(e<=mt)return!1;J.clear();for(const n in t){const i=t[n];i!=null&&J.set(n,i)}return mt=e,!0}function Ll(){return mt}function xo(e,t){const n=J.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),J.set(e,t),mt++,!0)}function kl(){return Object.fromEntries(J)}function dn(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:ln(t),preferredHighlighter:n}}function pe(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function ye(e){return e.replace(/\n$|\r\n$/,"")}function Lo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push($(`
|
|
1
|
+
import{t as fe,b as Sn,c as wr,a as Tr,d as Er,s as Ir,g as Ar,e as Rr}from"./index-DmgTlO-b.js";import{f as Kl}from"./index-DmgTlO-b.js";import{cT as Y,cU as Hr,bR as Mr,cV as Dr,cW as Pr}from"./index-CiJ6FDOC.js";const xi="diffs-container",Or=(()=>{try{return!1}catch{return!1}})(),Nr=/(?=^From [a-f0-9]+ .+$)/m,Li=/(?=^diff --git)/gm,cl=/(?=^---\s+\S)/gm,ul=/(?=^@@ )/gm,Fr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,zr=/(?<=\n)/,Ur=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Br=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,_r=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Vr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,fl=/^<{7,}(?:\s.*)?$/,pl=/^\|{7,}(?:\s.*)?$/,gl=/^={7,}$/,ml=/^>{7,}(?:\s.*)?$/,nn="header-prefix",rn="header-metadata",on="header-custom",P={dark:"pierre-dark",light:"pierre-light"},ki="data-theme-css",wi="data-unsafe-css",$r="data-core-css",Wr="data-diffs-scrollbar-measure",Ti="--diffs-scrollbar-gutter-measured",vl=1,Gr=1e5,sn={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Pe={...sn,hunkLineCount:1},jr={paddingTop:8,paddingBottom:8,gap:8},qr={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Kr=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ei={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ee=new Set;let Ie=null;function K(e){Ee.add(e),Ie??=requestAnimationFrame(Ii)}function Yr(e){Ee.delete(e),Ee.size===0&&Ie!=null&&(cancelAnimationFrame(Ie),Ie=null)}function Ii(e){const t=new Set(Ee);Ee.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ee.size>0?Ie=requestAnimationFrame(Ii):Ie=null}function Re(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Me(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function an(e,t){const n=e?.theme??P,i=t?.theme??P,r=yn(e),o=yn(t);return Me(n,i)&&Re(e,t,["theme","parseDiffOptions"])&&Re(r,o)}function yn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Vt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function $t({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function Xr(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function $(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function ut({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function Qr(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function we(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Ai(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[$(`${t}`)]})]:void 0})}function G(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Jr(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[ut({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function Zr(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Ri=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}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:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):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}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Vt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.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:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&Je(e.composedPath())||(de(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(de(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(de(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){de(t,"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:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();de(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);de(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const p=wt(r)&&this.hoveredLine?.lineElement===r.lineElement;ht(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ht(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),wt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(no(r)&&f!=null){f(r);break}if(to(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!wt(r))break;ht(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const p=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...p,event:t}):o?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:p}=this.options,v=p!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||v;y&&!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,de(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(i!=null&&b.push("onLineClick"),r!=null&&b.push("onLineNumberClick"),h!=null&&b.push("expandable hunk separators"),c!=null&&b.push("merge conflict actions")),b})()),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&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 C=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",g=this.pointerSession.mode==="gutterSelecting";(!f&&C||!v&&g)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&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 t=e.composedPath();Je(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};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:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(Zr(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=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,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(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:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="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 t=document.createElement("div");t.innerHTML=fe(Jr());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Be(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}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 t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!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 t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Qe(r));if(Be(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}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,t){const n=this.resolvePointerTarget(e);if(Be(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Be(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Je(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Qe(e);if(t&&Je(n))return;const i=ro(e);return i!=null?Qe(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=so(oo(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Qe(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=Ln(t)?t:Ln(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Vt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}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 l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const p=this.parseLineIndex(u,n);if((p??0)>s)break;if(p==null||p<o)continue;let v=r?"single":p===o?"first":p===s?"last":"";u.setAttribute("data-selected-line",v),f.setAttribute("data-selected-line",v),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(v="last",u.setAttribute("data-selected-line","first")):p===o?v="":p===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",v),f.nextSibling.setAttribute("data-selected-line",v))}}};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:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const C=f.getAttribute("data-merge-conflict-action")??void 0,g=f.getAttribute("data-merge-conflict-conflict-index")??void 0,b=g!=null?Number.parseInt(g,10):NaN;io(C)&&Number.isFinite(b)&&(c={kind:"merge-conflict-action",resolution:C,conflictIndex:b})}if(l==null&&f.hasAttribute("data-char")){l=f;const C=f.getAttribute("data-char");if(C!=null){const g=Number.parseInt(C,10);if(!Number.isNaN(g)){const b=f.textContent??"",m=g+b.length;(b.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:g,lineCharEnd:m,tokenText:b});continue}}}const p=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(p!=null){s=f,h=Number.parseInt(p,10),t=!0,n=wn(f),o=f.getAttribute("data-line-index")??void 0;continue}const v=r==null?f.getAttribute("data-line")??void 0:void 0;if(v!=null){r=f,h=Number.parseInt(v,10),n=wn(f),o=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 y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const C=Number.parseInt(y,10);Number.isNaN(C)||(d.hunkIndex=C);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?xn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?xn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:kn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:kn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function qe({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g},b,m,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:eo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:b,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g,getLineIndex:m}}function eo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Be(e){return e!=null&&"kind"in e&&e.kind==="line"}function ht(e){return e!=null&&"kind"in e&&e.kind==="token"}function wt(e){return Be(e)||ht(e)}function to(e){return"type"in e&&e.type==="line-info"}function no(e){return"kind"in e&&e.kind==="merge-conflict-action"}function io(e){return e==="current"||e==="incoming"||e==="both"}function xn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Qe(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function ro(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function oo(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function so(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ln(e){return e!=null&&typeof e.elementFromPoint=="function"}function kn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function wn(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Je(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function de(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var Hi=class ce{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ce.resizeObserver??new ResizeObserver(ce.handleSharedResizeEntries);return ce.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ce.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.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),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let p=o.get(u);if(p!=null){this.observedNodes.set(u,p),this.observedNodes.set(f,p),o.delete(u),o.delete(f);continue}const v=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;p={type:"annotations",column1:{container:h,child:u,childHeight:v},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:p,newHeight:Math.max(v,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?ho(l):co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ce,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ce.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ce,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ce.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?ao(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?lo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function ao(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function lo(e){return Math.max(Math.ceil(e),0)}function ho(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 co(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")}const Ce=new Map,Tt=new Map,Wt=new Map,ft=new Set;function pt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ft.has(t))return!1;return!0}function Tn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(ft.has(n.name))continue;let i=Ce.get(n.name);i==null&&(i=n,Ce.set(n.name,i)),ft.add(i.name),t.loadLanguageSync(i.data)}}function uo(){Ce.clear(),ft.clear()}function Mi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Di(e){if(Mi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Tt.get(e);if(t!=null)return t;try{let n=Wt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Sn,e)&&(n=Sn[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Ce.has(e)||Ce.set(e,o),o});return Tt.set(e,i),await i}finally{Tt.delete(e)}}function Pi(e){return Ce.get(e)??Di(e)}const gt=new Set;function En(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=Y.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,Y.getResolvedTheme(n)==null&&Y.seedResolvedTheme(n,i);gt.has(n)||(gt.add(n),t.loadThemeSync(i))}}function fo(){Y.clearResolvedThemes(),gt.clear()}function Oi(e){if(Mi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Y.hasRegisteredTheme(e))return;const t=Hr.getTheme(e);if(t!=null){Y.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Ni(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function po(e){Oi(e);const t=await Y.resolveTheme(e);return Ni(e,t),t}function go(e){return Y.getResolvedTheme(e)??po(e)}let V;async function St({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){V??=wr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Tr(Mr(()=>import("./wasm-CG6Dc4jp.js"),[])):Er()});const i=mo(V)?await V:V;V=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Pi(s);"then"in l?r.push(l):Tn(l,i)}const o=[];for(const s of e){const l=go(s);"then"in l?o.push(l):En(l,V)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Tn(s,i)}),Promise.all(o).then(s=>{En(s,i)})]),i}function bl(e=V){return e!=null&&!("then"in e)}function Fi(){if(V!=null&&!("then"in V))return V}function mo(e=V){return e!=null&&"then"in e}function Cl(e=V){return e==null}async function Sl(e){await St(e)}async function yl(){V!=null&&((await V).dispose(),uo(),fo(),V=void 0)}for(const e of Dr.getThemes())Y.registerThemeIfAbsent(e.name,e.load);function ln(e=P){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function We(e){for(const t of ln(e))if(!gt.has(t))return!1;return!0}function vo(e){return Y.hasResolvedThemes(e)}function Oe(e,t){return Me(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function se(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function yt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Gt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function bo(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 zi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:on}}):Co({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[So(i)]],properties:r})}function Co({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:nn}}),ut({name:bo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(t)]})],properties:{"data-prev-name":""}})),i.push(ut({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function So(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[$(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[$(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:rn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Ui(e){return A({tagName:"pre",properties:yo(e)})}function yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const J=new Map;let mt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function X(e){if(J.has(e))return J.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(J.has(t[1]))return J.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return J.has(n)?J.get(n)??"text":Ne[n]??"text"}function xl(e,t){if(e<=mt)return!1;J.clear();for(const n in t){const i=t[n];i!=null&&J.set(n,i)}return mt=e,!0}function Ll(){return mt}function xo(e,t){const n=J.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),J.set(e,t),mt++,!0)}function kl(){return Object.fromEntries(J)}function dn(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:ln(t),preferredHighlighter:n}}function pe(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function ye(e){return e.replace(/\n$|\r\n$/,"")}function Lo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push($(`
|
|
2
2
|
`)),e}const Ze=Symbol("no-token"),Et=Symbol("multiple-tokens");function Bi(e){const t=ko(e);if(t!=null)return t;let n=Ze;const i=[];let r=[],o;const s=()=>{if(r.length===0||o==null){r=[],o=void 0;return}if(r.length===1){const a=r[0];if(a?.type==="element"){wo(a,o);for(const d of a.children)ct(d)}else ct(a);i.push(a),r=[],o=void 0;return}for(const a of r)ct(a);i.push(A({tagName:"span",properties:{"data-char":o},children:r})),r=[],o=void 0},l=a=>{if(a!==Ze){if(a===Et){n=Et;return}if(n===Ze){n=a;return}n!==a&&(n=Et)}};for(const a of e.children){const d=a.type==="element"?Bi(a):Ze;if(l(d),typeof d!="number"){s(),i.push(a);continue}o!=null&&o!==d&&s(),o??=d,r.push(a)}return s(),e.children=i,n}function ko(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function ct(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)ct(t)}}function wo(e,t){e.properties["data-char"]=t}function To(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=l=>l}=e,r=new Map;function o(l){return Object.entries(l).map(([a,d])=>`${a}:${d}`).join(";")}function s(l){let a=t+Eo(typeof l=="string"?l:o(l))+n;return a=i(a),r.has(a)||r.set(a,typeof l=="string"?l:{...l}),a}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=s(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const d of a){if(!d.htmlStyle)continue;const h=s(d.htmlStyle);d.htmlStyle={},d.htmlAttrs||={},d.htmlAttrs.class?d.htmlAttrs.class+=` ${h}`:d.htmlAttrs.class=h}},getClassRegistry(){return r},getCSS(){let l="";for(const[a,d]of r.entries())l+=`.${a}{${typeof d=="string"?d:o(d)}}`;return l},clearRegistry(){r.clear()}}}function Eo(e,t=0){let n=3735928559^t,i=1103547991^t;for(let r=0,o;r<e.length;r++)o=e.charCodeAt(r),n=Math.imul(n^o,2654435761),i=Math.imul(i^o,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function _i(e=!1,t=!1){const n={lineInfo:[]},i=[{line(r){return delete r.properties.class,r},pre(r){const o=Qr(r),s=[];if(o!=null){let l=1;for(const a of o.children)a.type==="element"&&(e&&Bi(a),s.push(Lo(a,l,n)),l++);o.children=s}return r},...e?{tokens(r){for(const o of r){let s=0;for(const l of o){const a=l;a.__lineChar??=s,s+=l.content.length}}},preprocess(r,o){o.mergeWhitespaces="never"},span(r,o,s,l,a){if(a?.offset!=null&&a.content!=null){const d=a.__lineChar;return d!=null&&(r.properties["data-char"]=d),r}return r}}:null}];return t&&i.push(Io,In),{state:n,transformers:i,toClass:In}}const In=To({classPrefix:"hl-"}),Io={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function _(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const Ao=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Ro=/^0(?:\.0+)?%?$/;function Ho(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const r=i.lastIndexOf("/");if(r!==-1)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const o=i.split(",");if(o.length===4)return o[3]?.trim()}}function Mo(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,r=1;return n.length===3?i=n.split("").map(o=>o+o).join(""):n.length===6?i=n:(i=n.slice(0,6),r=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),r]}function It(e){if(e==null)return null;const t=Mo(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,r=t[2]/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function An(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||Ao.test(t))return!0;const n=Ho(t);return n!=null&&Ro.test(n)}function Do(e,t,n){if(t==null||n==null)return!1;const i=It(e),r=It(t),o=It(n);return i==null||r==null||o==null?!1:Math.abs(i-o)<Math.abs(i-r)}const Rn=new WeakMap;function At(e){const t=Rn.get(e);if(t!=null)return t;const n=e.colors??{},i={...n},r=n["editor.background"]??e.bg,o=n["editor.foreground"]??e.fg,s=n["sideBar.background"]??r,l=n["sideBar.foreground"]??o;ne(i,"editor.background",r),ne(i,"editor.foreground",o),ne(i,"sideBar.background",s),ne(i,"sideBar.foreground",l),ne(i,"input.background",n["input.background"]??s),ne(i,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??l),ne(i,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??l),ne(i,"gitDecoration.addedResourceForeground",Rt(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),ne(i,"gitDecoration.modifiedResourceForeground",Rt(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),ne(i,"gitDecoration.deletedResourceForeground",Rt(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const a=(An(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(An(n.focusBorder)?void 0:n.focusBorder);a!=null?i["list.focusOutline"]=a:delete i["list.focusOutline"];const d=n["list.hoverBackground"];d!=null&&(Po(d,s)||Do(d,s,l))&&delete i["list.hoverBackground"];const h=Object.freeze({...e,colors:Object.freeze(i)});return Rn.set(e,h),h}function ne(e,t,n){n!=null&&n!==""&&(e[t]=n)}function Rt(...e){for(const t of e)if(t!=null&&t!=="")return t}function Po(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function hn({theme:e=P,highlighter:t,prefix:n}){let i="";if(typeof e=="string"){const r=t.getTheme(e),o=At(r);i+=`color:${o.fg};`,i+=`background-color:${o.bg};`,i+=`${_("global")}fg:${o.fg};`,i+=`${_("global")}bg:${o.bg};`,i+=Ht(r,n)}else{let r=t.getTheme(e.dark),o=At(r);i+=`${_("global")}dark:${o.fg};`,i+=`${_("global")}dark-bg:${o.bg};`,i+=Ht(r,"dark"),r=t.getTheme(e.light),o=At(r),i+=`${_("global")}light:${o.fg};`,i+=`${_("global")}light-bg:${o.bg};`,i+=Ht(r,"light")}return i}function Ht(e,t){t=t!=null?`${t}-`:"";let n="";const i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];i!=null&&(n+=`${_("global")}${t}addition-color:${i};`);const r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];r!=null&&(n+=`${_("global")}${t}deletion-color:${r};`);const o=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return o!=null&&(n+=`${_("global")}${t}modified-color:${o};`),n}function jt(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function vt({lines:e,startingLine:t=0,totalLines:n=1/0,callback:i}){const r=Math.min(t+n,e.length),o=(()=>{const s=e.at(-1);return s===""||s===`
|
|
3
3
|
`||s===`\r
|
|
4
4
|
`||s==="\r"?Math.max(0,e.length-2):e.length-1})();for(let s=t;s<r;s++){const l=s===o;if(i({lineIndex:s,lineNumber:s+1,content:e[s],isLastLine:l})===!0||l)break}}function bt(e){return e!==""?e.split(zr):[]}const Oo={forcePlainText:!1};function No(e,t,{theme:n=P,tokenizeMaxLineLength:i,useTokenTransformer:r},{forcePlainText:o,startingLine:s,totalLines:l,lines:a}=Oo){o?(s??=0,l??=1/0):(s=0,l=1/0);const d=s>0||l<1/0,{state:h,transformers:c}=_i(r),u=o?"text":e.lang??X(e.name),f=typeof n=="string"?t.getTheme(n).type:void 0,p=hn({theme:n,highlighter:t});h.lineInfo=g=>({type:"context",lineIndex:g-1+s,lineNumber:g+s});const v=typeof n=="string"?{lang:u,theme:n,transformers:c,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:u,themes:n,transformers:c,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},y=jt(t.codeToHast(d?Fo(a??bt(e.contents),s,l):ye(e.contents),v)),C=d?new Array(s):y;return d&&C.push(...y),{code:C,themeStyles:p,baseThemeType:f}}function Fo(e,t,n){let i="";return vt({lines:e,startingLine:t,totalLines:n,callback({content:r}){i+=r}}),i}const Vi="-1,-1";function qt(e){return e?.some(t=>t.lineNumber===0)??!1}function Kt(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function xt(e){return e.startingLine===0&&e.totalLines>0}function $i(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Yt(e){return(e.lang??X(e.name))==="text"}function Wi(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let zo=-1;var Uo=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++zo}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:P},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=We(e.theme??P)?Fi():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=Mt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Oe(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Yt(e),result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??X(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:i=P,tokenizeMaxLineLength:r=1e3}=this.options;return{theme:i,useTokenTransformer:Wi(this.options),tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!se(e,n.file)||!Oe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,bt(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:bt(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Ae){if(e==null)return;let{options:n,forceHighlight:i}=this.getRenderOptions(e);const r=this.getMatchingWorkerResultCache(e,n);r!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...r},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const o=this.getOrCreateLineCache(e),s=e.contents.length>0,l=!s||Yt(e)||Mt(o.length,this.getTokenizeMaxLength()),a=!se(e,this.renderCache.file),d=!yt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(a||d))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||a||d||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,o)),this.renderCache.renderRange=t),!l&&s&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??X(e.name);const h=this.highlighter!=null&&We(n.theme),c=this.highlighter!=null&&pt(this.computedLang),u=!l&&c;if(this.highlighter!=null&&h&&(i||l||!this.renderCache.highlighted&&u||this.renderCache.result==null)){const{result:f,options:p}=this.renderFileWithHighlighter(e,this.highlighter,l||!c);this.renderCache={file:e,options:p,highlighted:u,result:f,renderRange:void 0}}(!h||!l&&!c)&&this.asyncHighlight(e).then(({result:f,options:p})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,f,p,!l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=Mt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??X(e.name);const n=this.highlighter!=null&&vo(ln(this.options.theme)),i=t||this.highlighter!=null&&pt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:No(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{disableFileHeader:o=!1}=this.options,s=[],l=we(),a=this.getOrCreateLineCache(e);let d=0;const h=xt(t)?Kt(this.lineAnnotations):void 0;return h!=null&&(l.children.push(G("context","annotation",1)),s.push(Gt({hunkIndex:-1,lineIndex:-1,annotations:h.map(c=>pe(c))})),d++),vt({lines:a,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:c,lineNumber:u})=>{const f=n[c];if(f==null){const p="FileRenderer.processFileResult: Line doesnt exist";throw console.error(p,{name:e.name,lineIndex:c,lineNumber:u,lines:a}),new Error(p)}if(f!=null){l.children.push(Ai("context",u,`${c}`)),s.push(f),d++;const p=this.lineAnnotations[u];p!=null&&(l.children.push(G("context","annotation",1)),s.push(Gt({hunkIndex:0,lineIndex:u,annotations:p.map(v=>pe(v))})),d++)}}}),l.properties.style=`grid-row: span ${d}`,{gutterAST:l.children??[],contentAST:s,preAST:this.createPreElement(a.length),headerAST:o?void 0:this.renderHeader(e),totalLines:a.length,rowCount:d,themeStyles:i,baseThemeType:r,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return zi({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return fe(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(A({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=we();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,$i(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?fe(A({tagName:"code",children:e,properties:{"data-code":""}})):fe(e)}async initializeHighlighter(){return this.highlighter=await St(dn(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!se(e,this.renderCache.file)||!this.renderCache.highlighted||!Oe(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Oe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&se(e,n.file)&&Oe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Ui({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function Mt(e,t){return e>t}const Gi=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|